### Start Application with Docker Compose Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Starts the application services using Docker Compose after manual setup and environment variable configuration. ```bash docker-compose up -d ``` -------------------------------- ### Basic ComboBox Usage Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/combobox/README.md Demonstrates the basic setup of the ComboBox with options and a selected option. Includes an example of handling option selection. ```jsx const options = [ { key: 1, icon: "path/to/icon.svg", // optional label: "Option 1", disabled: false, // optional onClick: () => {}, // optional }, ]; console.log("Selected:", option)} /> ``` -------------------------------- ### Show Examples Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/backend/src/scripts/form/QUICKSTART.md Display examples from the EXAMPLES.md file. This command helps users quickly understand how to use the script with practical examples. ```bash # Show examples cat EXAMPLES.md ``` -------------------------------- ### Build Docker Image Script Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Builds and starts Docker containers for the application, including dependency installation and environment variable configuration. ```bash python build.docker.py ``` -------------------------------- ### Run Translation App Script (Windows) Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Executes the convenience script for Windows to install dependencies, run metadata generation, start servers, and open the application in the browser. ```bash # From the translation-app directory run.translation-app.bat ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Installs Node.js dependencies for the frontend application. ```bash cd frontend npm install ``` -------------------------------- ### Install Backend Dependencies Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Installs Node.js dependencies for the backend server. ```bash cd backend npm install ``` -------------------------------- ### Install Button Component Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/button/README.md Import the Button component from the shared components library. ```bash import { Button } from "@docspace/shared/components/button"; ``` -------------------------------- ### Run Translation App Script (macOS/Linux) Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Executes the convenience script for macOS/Linux to install dependencies, run metadata generation, start servers, and open the application in the browser. ```bash # From the translation-app directory ./run.translation-app.sh ``` -------------------------------- ### Serve Ollama API Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Starts the Ollama server to make its API available for AI translation requests. ```bash ollama serve ``` -------------------------------- ### Modal Dialog Example with State Management Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/backdrop/README.md A complete example of using the Backdrop with a modal dialog, including state management to control visibility. This demonstrates how to open and close a modal using the backdrop. ```tsx import { useState } from "react"; import { Button, Backdrop, Modal } from "@docspace/components"; const ModalExample = () => { const [isOpen, setIsOpen] = useState(false); return ( <> setIsOpen(false)} /> {isOpen && Modal Content} ); }; ``` -------------------------------- ### Cron Component Usage Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/cron/README.md Demonstrates how to use the Cron component, including setting its initial value and handling changes and errors. ```jsx import React from "react"; import Cron from "@docspace/shared/components"; const Component = () => { const handleCronChange = (newCronValue) => { console.log("New cron value:", newCronValue); }; const handleCronError = (error) => { console.error("Cron error:", error); }; return ( ); }; export default Component; ``` -------------------------------- ### Basic Modal Dialog Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/modal-dialog/README.md Demonstrates a standard modal dialog with a header, body, and footer. Use this for typical modal pop-ups. ```jsx {}}> Change password
Send the password change instruction to the{" "} example@email.com
setFirstOpen(false)} /> setSecondOpen(false)} /> {isFirstOpen && } {isSecondOpen && } ); }; ``` -------------------------------- ### TabGroup Component Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/tab-item/README.md Provides an example of a TabGroup component that manages the active state of multiple TabItems. ```jsx // Tab group example const TabGroup = () => { const [activeTab, setActiveTab] = useState("tab1"); return (
setActiveTab("tab1")} /> setActiveTab("tab2")} /> setActiveTab("tab3")} />
); }; ``` -------------------------------- ### Install PDF Generation Dependencies Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/backend/src/scripts/form/QUICKSTART.md Install the necessary Python packages for PDF generation using pip. This is only required if you plan to generate PDFs. ```bash pip install -r requirements.txt ``` -------------------------------- ### Loading ToggleButton Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/toggle-button/README.md Demonstrates the loading state of the ToggleButton using the `isLoading` prop. This can be used to indicate an ongoing operation related to the toggle. ```jsx ``` -------------------------------- ### Basic Scrollable Content Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/scrollbar/README.md Renders a Scrollbar with content that requires vertical scrolling. ```jsx

Scrollable content here...

``` -------------------------------- ### Configure and Render MainButtonMobile Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/main-button-mobile/README.md Configure action and button options, then render the MainButtonMobile component with various props to customize its appearance and behavior. This example demonstrates setting styles, titles, and dropdown content. ```jsx const actionOptions = [ { key: "1", label: "New document", icon: MobileActionsFolderReactSvgUrl, }, { key: "2", label: "New presentation", icon: MobileActionsFolderReactSvgUrl, }, ]; const buttonOptions = [ { key: "1", label: "Import point", }, { key: "2", label: "Import point", }, ]; ; ``` -------------------------------- ### Basic Link with Dropdown Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/link-with-dropdown/README.md Render a basic LinkWithDropdown component with custom color and font weight, passing data for the dropdown menu. ```jsx Link with dropdown ``` -------------------------------- ### Tags Component Usage Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/tags/README.md Demonstrates how to import and use the Tags component with various properties. It includes handling tag selection via the onSelectTag callback. ```jsx import React from "react"; import Tags from "@docspace/shared/components"; const MyComponent = () => { const handleTagSelection = (selectedTag) => { console.log("Selected tag:", selectedTag); }; return ( ); }; export default MyComponent; ``` -------------------------------- ### Basic EmptyView Usage Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/empty-view/README.md Render the EmptyView component with a title, description, and a custom icon. This example shows how to display a simple empty state. ```jsx } options={[ { key: "create", title: "Create New Item", description: "Click to add a new item", icon: , onClick: handleCreate } ]} /> ``` -------------------------------- ### SocialButton Usage Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/social-button/README.md Demonstrates how to use the SocialButton component with various properties to configure its appearance and behavior. This includes setting labels, icons, disabled states, custom styles, and click handlers. ```jsx import React from "react"; import SocialButton from "@docspace/shared/components"; const MyComponent = () => { const handleButtonClick = (event) => { console.log("Button clicked!", event); }; return ( ); }; export default MyComponent; ``` -------------------------------- ### Badge Component Usage Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/badge/README.md Demonstrates how to use the Badge component with various props to customize its appearance and behavior. The onClick prop can be used to handle user interactions. ```jsx {}} /> ``` -------------------------------- ### Basic Aside Usage Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/aside/README.md A simple example of rendering the Aside component with basic content. Ensure `visible` is set to `true` to display the panel. ```tsx ``` -------------------------------- ### Render MainButton as Action Button Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/main-button/README.md This example shows how to render the MainButton as a standard action button with an associated click handler. The `isDropdown` prop is set to false. ```jsx SomeFunction()} moduleName="people" /> ``` -------------------------------- ### Docker Compose Commands Source: https://github.com/onlyoffice/docspace-client/blob/master/common/translation-app/README.md Commands to manage Docker containers for the application. Use these to start, rebuild, stop, and view logs. ```bash # Start containers docker-compose up -d ``` ```bash # Rebuild containers docker-compose up -d --build ``` ```bash # Stop containers docker-compose down ``` ```bash # View logs docker-compose logs -f ``` -------------------------------- ### Aside (Side Panel) Dialog Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/modal-dialog/README.md Shows how to use the ModalDialog as an aside or side panel. Enable 'withBodyScroll' for scrollable content within the panel. ```jsx {}} > Side Panel {/* Long scrollable content */} ``` -------------------------------- ### Import Campaigns Banner Component Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/campaigns-banner/README.md Import the CampaignsBanner component from the shared components library. This is a required setup step before using the component. ```javascript import CampaignsBanner , from "@docspace/shared/components/campaigns-banner"; ``` -------------------------------- ### Basic Avatar Usage Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/avatar/README.md Render a basic Avatar component with essential props. This example shows a default configuration for displaying an avatar. ```jsx ``` -------------------------------- ### Basic Label Example Source: https://github.com/onlyoffice/docspace-client/blob/master/packages/shared/components/label/README.md Render a basic label with text, title, and display properties. Associates the label with a form input using htmlFor. ```jsx