microboard-ui-temp 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +66 -0
- package/Dockerfile +15 -0
- package/LICENSE.txt +17 -0
- package/MicroboardLicense.txt +84 -0
- package/README.md +23 -0
- package/bun.lock +1079 -0
- package/bunPlugins/copyPlugin.ts +81 -0
- package/bunfig.toml +1 -0
- package/docker-compose.yml +7 -0
- package/package.json +49 -0
- package/scripts/buildPkg.ts +29 -0
- package/scripts/buildSpa.ts +29 -0
- package/server.ts +18 -0
- package/src/App/App.ts +502 -0
- package/src/App/BoardsList.ts +752 -0
- package/src/App/Clipboard.ts +22 -0
- package/src/App/Connection.ts +758 -0
- package/src/App/Location.ts +23 -0
- package/src/App/MediaHelpers.ts +221 -0
- package/src/App/Paste/index.ts +5 -0
- package/src/App/Paste/pasteTextToTheBoard.ts +19 -0
- package/src/App/Paste/tryToGetMarkdownFromDataTransfer.ts +60 -0
- package/src/App/Paste/tryToPasteAsItemOrReturnText.ts +72 -0
- package/src/App/Paste/tryToPasteAudioByLink.ts +35 -0
- package/src/App/Paste/tryToPasteFromMicroboard.ts +15 -0
- package/src/App/Paste/tryToPasteFromMiro.ts +75 -0
- package/src/App/Paste/tryToPasteImages.ts +44 -0
- package/src/App/Paste/tryToPasteVideoByLink.ts +68 -0
- package/src/App/Permissions.ts +43 -0
- package/src/App/README.md +58 -0
- package/src/App/SessionStorage.ts +248 -0
- package/src/App/Storage.ts +122 -0
- package/src/App/Wheel/Wheel.spec.ts +40 -0
- package/src/App/Wheel/Wheel.ts +229 -0
- package/src/App/Wheel/WheelEventLogger.ts +70 -0
- package/src/App/Wheel/WheelEvents.spec.ts +418 -0
- package/src/App/Wheel/index.ts +1 -0
- package/src/App/Wheel/mockedWheelData.ts +77658 -0
- package/src/App/getController.ts +878 -0
- package/src/App/getSubscriptions.ts +155 -0
- package/src/App/index.ts +1 -0
- package/src/App/isFirefox.ts +3 -0
- package/src/App/isMacos.ts +2 -0
- package/src/App/isSafari.ts +17 -0
- package/src/App/router.tsx +149 -0
- package/src/App/testRecorder.ts +393 -0
- package/src/App/throttlePointerEvent.ts +27 -0
- package/src/App/useAccount.ts +19 -0
- package/src/App/useBoardSubscription.ts +14 -0
- package/src/App/useBoardsList.ts +18 -0
- package/src/App/useDomMbr.ts +65 -0
- package/src/Config.ts +41 -0
- package/src/Globals.d.ts +6 -0
- package/src/WhiteBoardModule/Readme.md +21 -0
- package/src/WhiteBoardModule/WhiteBoardModuleNative.tsx +60 -0
- package/src/WhiteBoardModule/WhiteboardModuleReact.tsx +61 -0
- package/src/development.entrypoint.ts +38 -0
- package/src/entities/AIInput/AIContext.tsx +377 -0
- package/src/entities/AIInput/AIDropdown.tsx +296 -0
- package/src/entities/AIInput/AIGenerationButton.tsx +54 -0
- package/src/entities/AIInput/AIInput.module.css +488 -0
- package/src/entities/AIInput/AIInput.tsx +427 -0
- package/src/entities/AIInput/StarIcon.tsx +201 -0
- package/src/entities/AIInput/index.ts +12 -0
- package/src/entities/AIInput/utils.ts +384 -0
- package/src/entities/BoardMenu/BoardMenu.module.css +38 -0
- package/src/entities/BoardMenu/BoardMenu.tsx +86 -0
- package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTrackpadModal.tsx +138 -0
- package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTracpadModal.module.css +93 -0
- package/src/entities/BoardMenu/index.ts +1 -0
- package/src/entities/BoardMenu/sections/Comments.tsx +65 -0
- package/src/entities/BoardMenu/sections/Items.tsx +85 -0
- package/src/entities/BoardMenu/sections/MouseOrTrackpad.tsx +108 -0
- package/src/entities/BoardName/BoardName.module.css +61 -0
- package/src/entities/BoardName/BoardName.tsx +66 -0
- package/src/entities/BoardName/BoardRename.module.css +15 -0
- package/src/entities/BoardName/BoardRename.tsx +93 -0
- package/src/entities/BoardName/index.ts +3 -0
- package/src/entities/Canvas/Canvas.tsx +250 -0
- package/src/entities/Canvas/CanvasNoRouter.tsx +216 -0
- package/src/entities/Canvas/index.ts +2 -0
- package/src/entities/Folder/DragOverlay.tsx +52 -0
- package/src/entities/Folder/DragPlaceholder.module.css +5 -0
- package/src/entities/Folder/DragPlaceholder.tsx +6 -0
- package/src/entities/Folder/DraggingItem.module.css +8 -0
- package/src/entities/Folder/DraggingWrapper.tsx +18 -0
- package/src/entities/Folder/Folder.module.css +113 -0
- package/src/entities/Folder/Folder.tsx +356 -0
- package/src/entities/Folder/FolderItem.module.css +89 -0
- package/src/entities/Folder/FolderItem.tsx +165 -0
- package/src/entities/Folder/FoldersDndContext.tsx +129 -0
- package/src/entities/Folder/OpenedFoldersContext.tsx +33 -0
- package/src/entities/Folder/index.ts +8 -0
- package/src/entities/account/Account.ts +542 -0
- package/src/entities/account/AuthForm.module.css +150 -0
- package/src/entities/account/AuthForm.tsx +48 -0
- package/src/entities/account/AuthGuard.tsx +17 -0
- package/src/entities/account/AuthInterceptor.ts +21 -0
- package/src/entities/account/UnauthGuard.tsx +17 -0
- package/src/entities/account/index.ts +5 -0
- package/src/entities/comments/Cluster/Cluster.module.css +43 -0
- package/src/entities/comments/Cluster/Cluster.tsx +100 -0
- package/src/entities/comments/CommentContainer/CommentContainer.module.css +51 -0
- package/src/entities/comments/CommentContainer/CommentContainer.tsx +232 -0
- package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.module.css +89 -0
- package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.tsx +92 -0
- package/src/entities/comments/CommentInput/CommentInput.module.css +69 -0
- package/src/entities/comments/CommentInput/CommentInput.tsx +122 -0
- package/src/entities/comments/CommentsContext.tsx +65 -0
- package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.module.css +36 -0
- package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.tsx +132 -0
- package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.module.css +73 -0
- package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.tsx +72 -0
- package/src/entities/comments/CommentsPanel/CommentsPanel.module.css +143 -0
- package/src/entities/comments/CommentsPanel/CommentsPanel.tsx +278 -0
- package/src/entities/comments/CommentsPanel/CommentsPanelContext.tsx +37 -0
- package/src/entities/comments/CommentsProvider.module.css +4 -0
- package/src/entities/comments/CommentsProvider.tsx +73 -0
- package/src/entities/comments/CreateComment/CreateComment.module.css +8 -0
- package/src/entities/comments/CreateComment/CreateComment.tsx +66 -0
- package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.module.css +44 -0
- package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.tsx +127 -0
- package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.module.css +32 -0
- package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.tsx +38 -0
- package/src/entities/comments/Thread/ThreadPanel.module.css +82 -0
- package/src/entities/comments/Thread/ThreadPanel.tsx +298 -0
- package/src/entities/comments/Thread/message/Message.module.css +71 -0
- package/src/entities/comments/Thread/message/Message.tsx +137 -0
- package/src/entities/comments/index.ts +7 -0
- package/src/entities/comments/lib.ts +22 -0
- package/src/entities/comments/useCommentsMerge.ts +88 -0
- package/src/entities/comments/useIntersectionObserver.ts +58 -0
- package/src/entities/comments/useScrollToUnreadMessage.ts +24 -0
- package/src/env.d.ts +12 -0
- package/src/features/AccessDeniedModal/AccessDeniedModal.module.css +56 -0
- package/src/features/AccessDeniedModal/AccessDeniedModal.tsx +94 -0
- package/src/features/AccessDeniedModal/index.ts +1 -0
- package/src/features/AiUnavailableModal/AiUnavailableModal.module.css +52 -0
- package/src/features/AiUnavailableModal/AiUnavailableModal.tsx +59 -0
- package/src/features/AiUnavailableModal/index.ts +1 -0
- package/src/features/AppContext.tsx +17 -0
- package/src/features/AppView/AppView.module.css +18 -0
- package/src/features/AppView/AppView.tsx +302 -0
- package/src/features/AppView/InactiveBoardHidder.tsx +14 -0
- package/src/features/AppView/LocalAppView.tsx +177 -0
- package/src/features/AppView/NoBoardIsOpen.module.css +29 -0
- package/src/features/AppView/NoBoardIsOpen.tsx +69 -0
- package/src/features/AppView/QuickAddPanel/QuickAddPanel.module.css +12 -0
- package/src/features/AppView/QuickAddPanel/QuickAddPanel.tsx +171 -0
- package/src/features/AppView/QuickAddPanel/index.ts +1 -0
- package/src/features/AppView/index.ts +2 -0
- package/src/features/AppView/listeners.ts +0 -0
- package/src/features/AudioPlayer/AudioPlayer.module.css +213 -0
- package/src/features/AudioPlayer/AudioPlayer.tsx +517 -0
- package/src/features/AudioPlayer/index.ts +1 -0
- package/src/features/ChangePasswordModal/ChangePassword.module.css +129 -0
- package/src/features/ChangePasswordModal/ChangePasswordModal.tsx +247 -0
- package/src/features/ChangePasswordModal/index.ts +4 -0
- package/src/features/ContextMenu/ContextMenu.module.css +38 -0
- package/src/features/ContextMenu/ContextMenu.tsx +507 -0
- package/src/features/ContextMenu/ContextMenuContext.tsx +77 -0
- package/src/features/ContextMenu/index.ts +5 -0
- package/src/features/ContextPanel/Buttons/AIGeneration.tsx +72 -0
- package/src/features/ContextPanel/Buttons/AIModel/AIModel.module.css +5 -0
- package/src/features/ContextPanel/Buttons/AIModel/AIModel.tsx +97 -0
- package/src/features/ContextPanel/Buttons/AIModel/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/AIModel.tsx +95 -0
- package/src/features/ContextPanel/Buttons/AddList/AddList.tsx +83 -0
- package/src/features/ContextPanel/Buttons/AddList/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +107 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/UiButtonWithMenu.module.css +49 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/CardGame/Card/CreateDeck.tsx +65 -0
- package/src/features/ContextPanel/Buttons/CardGame/Card/FlipCard.tsx +41 -0
- package/src/features/ContextPanel/Buttons/CardGame/Deck/GetCard.tsx +61 -0
- package/src/features/ContextPanel/Buttons/CardGame/Deck/ShuffleDeck.tsx +39 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.module.css +53 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.tsx +133 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ThrowDice.tsx +38 -0
- package/src/features/ContextPanel/Buttons/ConnectorAddText.tsx +55 -0
- package/src/features/ContextPanel/Buttons/ConnectorFontStyle.tsx +28 -0
- package/src/features/ContextPanel/Buttons/ConnectorLineColor.tsx +96 -0
- package/src/features/ContextPanel/Buttons/ConnectorTextColor.tsx +22 -0
- package/src/features/ContextPanel/Buttons/ConnectorTextHighlight.tsx +28 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.module.css +5 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.tsx +108 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/ContextPanelButton.module.css +19 -0
- package/src/features/ContextPanel/Buttons/Delete.tsx +32 -0
- package/src/features/ContextPanel/Buttons/DrawFillStyle.tsx +107 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.module.css +4 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.tsx +32 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/Duplicate.tsx +25 -0
- package/src/features/ContextPanel/Buttons/Edit.tsx +23 -0
- package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.module.css +14 -0
- package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.tsx +80 -0
- package/src/features/ContextPanel/Buttons/EndPointer/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/FillStyle.tsx +91 -0
- package/src/features/ContextPanel/Buttons/FontSize/ConnectorFontSize.tsx +34 -0
- package/src/features/ContextPanel/Buttons/FontSize/FontSize.module.css +53 -0
- package/src/features/ContextPanel/Buttons/FontSize/FontSize.tsx +217 -0
- package/src/features/ContextPanel/Buttons/FontSize/index.ts +2 -0
- package/src/features/ContextPanel/Buttons/FontStyle.tsx +68 -0
- package/src/features/ContextPanel/Buttons/FrameFill.tsx +91 -0
- package/src/features/ContextPanel/Buttons/FrameNavNext.tsx +33 -0
- package/src/features/ContextPanel/Buttons/FrameNavPrev.tsx +37 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.module.css +14 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.tsx +113 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/HyperLinkBtn.tsx +53 -0
- package/src/features/ContextPanel/Buttons/ItemType/ItemType.module.css +15 -0
- package/src/features/ContextPanel/Buttons/ItemType/ItemType.tsx +115 -0
- package/src/features/ContextPanel/Buttons/ItemType/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/Lock.tsx +98 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/BringToFront.tsx +28 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyFrameLink.tsx +50 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyItemLink.tsx +48 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/ExportFrame.tsx +32 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveImg.tsx +32 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveVideoOrAudio.tsx +45 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SendToBack.tsx +28 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SetLinkTo.tsx +35 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/getLinkToItem.tsx +3 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/index.ts +5 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.module.css +51 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.tsx +96 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenuItem.tsx +29 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.module.css +18 -0
- package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.tsx +87 -0
- package/src/features/ContextPanel/Buttons/StartPointer/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/StickerFillStyle.tsx +74 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.module.css +19 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.tsx +144 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/SwitchPointers.tsx +28 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.module.css +6 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.tsx +98 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/TextAlignmentSticker.tsx +87 -0
- package/src/features/ContextPanel/Buttons/TextColor.tsx +86 -0
- package/src/features/ContextPanel/Buttons/TextHighlight.tsx +85 -0
- package/src/features/ContextPanel/Buttons/ToggleFrameRatio.tsx +38 -0
- package/src/features/ContextPanel/Buttons/ToggleIsShining.tsx +36 -0
- package/src/features/ContextPanel/ContextPanel.module.css +9 -0
- package/src/features/ContextPanel/ContextPanel.tsx +531 -0
- package/src/features/ContextPanel/PanelContext.ts +17 -0
- package/src/features/ContextPanel/index.ts +1 -0
- package/src/features/ContextWrapper.tsx +47 -0
- package/src/features/Counter/Counter.module.css +20 -0
- package/src/features/Counter/Counter.tsx +49 -0
- package/src/features/CryptoWrapper/CryptoWrapper.tsx +79 -0
- package/src/features/CryptoWrapper/index.ts +1 -0
- package/src/features/Cursors/comment.svg +22 -0
- package/src/features/Cursors/customCursors.ts +31 -0
- package/src/features/Cursors/eraser.svg +3 -0
- package/src/features/Cursors/index.ts +1 -0
- package/src/features/Cursors/pencil.svg +3 -0
- package/src/features/Cursors/sticker/sticker-black.svg +27 -0
- package/src/features/Cursors/sticker/sticker-blue.svg +27 -0
- package/src/features/Cursors/sticker/sticker-gray.svg +27 -0
- package/src/features/Cursors/sticker/sticker-green.svg +27 -0
- package/src/features/Cursors/sticker/sticker-light-blue.svg +28 -0
- package/src/features/Cursors/sticker/sticker-light-gray.svg +27 -0
- package/src/features/Cursors/sticker/sticker-light-green.svg +27 -0
- package/src/features/Cursors/sticker/sticker-orange.svg +27 -0
- package/src/features/Cursors/sticker/sticker-pink.svg +27 -0
- package/src/features/Cursors/sticker/sticker-purple.svg +27 -0
- package/src/features/Cursors/sticker/sticker-sky-blue.svg +27 -0
- package/src/features/Cursors/sticker/sticker-yellow.svg +27 -0
- package/src/features/ErrorBoundary/ErrorBoundary.module.css +64 -0
- package/src/features/ErrorBoundary/ErrorBoundary.tsx +112 -0
- package/src/features/ErrorBoundary/index.ts +1 -0
- package/src/features/ExportPanel/ExportPanel.module.css +55 -0
- package/src/features/ExportPanel/ExportPanel.tsx +73 -0
- package/src/features/ExportPanel/ExportVisible.tsx +18 -0
- package/src/features/ExportPanel/index.ts +1 -0
- package/src/features/GameItems/CreateCardsModal.tsx +178 -0
- package/src/features/GameItems/CreateDiceModal.tsx +213 -0
- package/src/features/GameItems/Modal.module.css +148 -0
- package/src/features/GameItems/index.ts +1 -0
- package/src/features/GenerateChart/AIChat.module.css +162 -0
- package/src/features/GenerateChart/AIChat.tsx +198 -0
- package/src/features/GenerateChart/AIChatPanel.module.css +34 -0
- package/src/features/GenerateChart/AIChatPanel.tsx +72 -0
- package/src/features/GenerateChart/lib/engine/index.ts +616 -0
- package/src/features/GenerateChart/lib/transformOutput.ts +338 -0
- package/src/features/GoogleAuthBtn/GoogleAuthBtn.module.css +19 -0
- package/src/features/GoogleAuthBtn/GoogleAuthBtn.tsx +19 -0
- package/src/features/GoogleAuthBtn/icons.tsx +301 -0
- package/src/features/GoogleAuthBtn/index.ts +1 -0
- package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.module.css +26 -0
- package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.tsx +38 -0
- package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.module.css +36 -0
- package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.tsx +74 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/MiroClipboardTransformer.ts +765 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/index.ts +1 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/useCopyBoardItems.tsx +1156 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.module.css +157 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.tsx +95 -0
- package/src/features/ImportMiro/ImportMiroBoards/MiroModels.ts +250 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/ErrorNotification.tsx +48 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/LoadingNotification.tsx +53 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/SuccessNotification.tsx +54 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnClipboardNotification.tsx +57 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnNotification.tsx +68 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/index.ts +5 -0
- package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.module.css +35 -0
- package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.tsx +47 -0
- package/src/features/ImportMiro/index.ts +5 -0
- package/src/features/ItemTooltip/ItemTooltip.tsx +77 -0
- package/src/features/ItemTooltip/index.ts +1 -0
- package/src/features/ItemsProvider/ItemsProvider.tsx +45 -0
- package/src/features/ItemsProvider/index.ts +1 -0
- package/src/features/LandingMenu/LandingMenu.module.css +54 -0
- package/src/features/LandingMenu/LandingMenu.tsx +88 -0
- package/src/features/LandingMenu/MobileLandingMenu.module.css +78 -0
- package/src/features/LandingMenu/MobileLandingMenu.tsx +133 -0
- package/src/features/LandingMenu/const.ts +2 -0
- package/src/features/LandingMenu/index.ts +2 -0
- package/src/features/LinksProvider/LinkToButton/LinkToButton.module.css +34 -0
- package/src/features/LinksProvider/LinkToButton/LinkToButton.tsx +175 -0
- package/src/features/LinksProvider/LinksProvider.tsx +84 -0
- package/src/features/LinksProvider/index.ts +1 -0
- package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.module.css +6 -0
- package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.tsx +30 -0
- package/src/features/LocalFileSavingProgress/index.ts +1 -0
- package/src/features/LoginWith/LoginWith.module.css +18 -0
- package/src/features/LoginWith/LoginWith.tsx +15 -0
- package/src/features/MediaUnavailableModal/MediaUnavailableModal.module.css +52 -0
- package/src/features/MediaUnavailableModal/MediaUnavailableModal.tsx +64 -0
- package/src/features/MediaUnavailableModal/index.ts +4 -0
- package/src/features/Modal/ConfirmModal.module.css +71 -0
- package/src/features/Modal/ConfirmModal.tsx +199 -0
- package/src/features/Modal/CookiesModal.module.css +32 -0
- package/src/features/Modal/CookiesModal.tsx +75 -0
- package/src/features/Modal/InfoModal.module.css +49 -0
- package/src/features/Modal/InfoModal.tsx +90 -0
- package/src/features/Modal/ModalsWrapper.tsx +13 -0
- package/src/features/Modal/SetLinkToModal.module.css +49 -0
- package/src/features/Modal/SetLinkToModal.tsx +112 -0
- package/src/features/Notifications/Notifications.module.css +14 -0
- package/src/features/Notifications/SigninErrorNotification.tsx +34 -0
- package/src/features/Notifications/SignupErrorNotification.tsx +33 -0
- package/src/features/Notifications/index.ts +8 -0
- package/src/features/Pickers/ColorPicker/ColorItem.module.css +44 -0
- package/src/features/Pickers/ColorPicker/ColorItem.tsx +33 -0
- package/src/features/Pickers/ColorPicker/ColorPicker.module.css +12 -0
- package/src/features/Pickers/ColorPicker/ColorPicker.tsx +43 -0
- package/src/features/Pickers/ColorPicker/SquareColorItem.module.css +41 -0
- package/src/features/Pickers/ColorPicker/SquareColorItem.tsx +27 -0
- package/src/features/Pickers/ColorPicker/index.ts +1 -0
- package/src/features/Pickers/ConnectorLineStylePicker.tsx +52 -0
- package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.module.css +4 -0
- package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.tsx +39 -0
- package/src/features/Pickers/ConnectorPointerPicker/index.ts +1 -0
- package/src/features/Pickers/DrawingToolPicker.tsx +31 -0
- package/src/features/Pickers/FontSizePicker/FontSizePicker.module.css +8 -0
- package/src/features/Pickers/FontSizePicker/FontSizePicker.tsx +61 -0
- package/src/features/Pickers/FontSizePicker/index.ts +1 -0
- package/src/features/Pickers/FontStylePicker.tsx +88 -0
- package/src/features/Pickers/FramePicker/FramePicker.module.css +11 -0
- package/src/features/Pickers/FramePicker/FramePicker.tsx +40 -0
- package/src/features/Pickers/FramePicker/index.ts +1 -0
- package/src/features/Pickers/HorizontalAlignmentPicker.tsx +49 -0
- package/src/features/Pickers/ShapeTypePicker.tsx +80 -0
- package/src/features/Pickers/SliderPicker/SliderPicker.module.css +13 -0
- package/src/features/Pickers/SliderPicker/SliderPicker.tsx +43 -0
- package/src/features/Pickers/SliderPicker/index.ts +1 -0
- package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.module.css +4 -0
- package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.tsx +59 -0
- package/src/features/Pickers/StrokeStylePicker/index.ts +1 -0
- package/src/features/Pickers/VerticalAlignmentPicker.tsx +48 -0
- package/src/features/Presence/BringToMe/BringToMe.module.css +134 -0
- package/src/features/Presence/BringToMe/BringToMe.tsx +363 -0
- package/src/features/Presence/PresenceUsers/Dropdown.tsx +70 -0
- package/src/features/Presence/PresenceUsers/EyeIcon.tsx +16 -0
- package/src/features/Presence/PresenceUsers/PresenceUserAvatar.tsx +93 -0
- package/src/features/Presence/PresenceUsers/PresenceUsers.module.css +366 -0
- package/src/features/Presence/PresenceUsers/PresenceUsers.tsx +239 -0
- package/src/features/Presence/PresenceUsers/UserAvatar.tsx +92 -0
- package/src/features/Presence/PresenceUsers/mock.ts +34 -0
- package/src/features/Presence/UserTracking/UserTracking.module.css +72 -0
- package/src/features/Presence/UserTracking/UserTracking.tsx +67 -0
- package/src/features/ProfileSettingsModal/ProfileSettingsModal.module.css +100 -0
- package/src/features/ProfileSettingsModal/ProfileSettingsModal.tsx +333 -0
- package/src/features/ProfileSettingsModal/index.ts +4 -0
- package/src/features/QuickAddButtons/QuickAddButtonsClear.tsx +12 -0
- package/src/features/README.md +36 -0
- package/src/features/Rename/RenameContext.tsx +54 -0
- package/src/features/Rename/RenameInput.module.css +15 -0
- package/src/features/Rename/RenameInput.tsx +78 -0
- package/src/features/Rename/index.ts +2 -0
- package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.module.css +29 -0
- package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.tsx +70 -0
- package/src/features/ShapesPanel/ShapesPanel.module.css +75 -0
- package/src/features/ShapesPanel/ShapesPanel.tsx +69 -0
- package/src/features/ShapesPanel/ShapesPanelContext.tsx +109 -0
- package/src/features/ShapesPanel/index.ts +5 -0
- package/src/features/ShareModal/SaveShareModal.module.css +31 -0
- package/src/features/ShareModal/SaveShareModal.tsx +63 -0
- package/src/features/ShareModal/SearchInput.module.css +188 -0
- package/src/features/ShareModal/SearchInput.tsx +441 -0
- package/src/features/ShareModal/ShareModal.module.css +297 -0
- package/src/features/ShareModal/ShareModal.tsx +627 -0
- package/src/features/ShareModal/SharePanel.module.css +74 -0
- package/src/features/ShareModal/SharePanel.tsx +258 -0
- package/src/features/ShareModal/index.ts +1 -0
- package/src/features/ShareSnapshotModal/ShareSnapshotModal.module.css +286 -0
- package/src/features/ShareSnapshotModal/ShareSnapshotModal.tsx +41 -0
- package/src/features/ShareSnapshotModal/SnapshotNameInput.module.css +92 -0
- package/src/features/ShareSnapshotModal/SnapshotNameInput.tsx +225 -0
- package/src/features/ShareSnapshotModal/index.ts +1 -0
- package/src/features/SidePanel/LocalSidePanelContext.tsx +66 -0
- package/src/features/SidePanel/ResizableEdge.module.css +9 -0
- package/src/features/SidePanel/ResizableEdge.tsx +77 -0
- package/src/features/SidePanel/SidePanel.module.css +140 -0
- package/src/features/SidePanel/SidePanel.tsx +179 -0
- package/src/features/SidePanel/SidePanelContext.tsx +108 -0
- package/src/features/SidePanel/index.ts +3 -0
- package/src/features/SidePanelsContainer/SidePanelsContainer.module.css +15 -0
- package/src/features/SidePanelsContainer/SidePanelsContainer.tsx +61 -0
- package/src/features/SidePanelsContainer/index.ts +1 -0
- package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.module.css +34 -0
- package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.tsx +463 -0
- package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.module.css +48 -0
- package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.tsx +62 -0
- package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.module.css +61 -0
- package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.tsx +72 -0
- package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.module.css +152 -0
- package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.tsx +206 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.module.css +151 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.tsx +77 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/TemplateItem.tsx +119 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/templateItem.module.css +88 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.module.css +51 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.tsx +39 -0
- package/src/features/Templates/TolgeeProvider.tsx +29 -0
- package/src/features/Templates/config.ts +6 -0
- package/src/features/Templates/index.ts +2 -0
- package/src/features/Templates/lib.ts +59 -0
- package/src/features/TextEditor/Element.tsx +204 -0
- package/src/features/TextEditor/Leaf.tsx +72 -0
- package/src/features/TextEditor/README.md +3 -0
- package/src/features/TextEditor/TextEditor.module.css +115 -0
- package/src/features/TextEditor/TextEditor.tsx +610 -0
- package/src/features/TextEditor/index.ts +1 -0
- package/src/features/TextEditor/verticalAlignmentToFlex.tsx +14 -0
- package/src/features/TitlePanel/TitlePanel.module.css +123 -0
- package/src/features/TitlePanel/TitlePanel.tsx +341 -0
- package/src/features/TitlePanel/index.ts +1 -0
- package/src/features/ToastProvider.tsx +33 -0
- package/src/features/ToolsPanel/Buttons/AddConnector.tsx +73 -0
- package/src/features/ToolsPanel/Buttons/AddCounter.tsx +29 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.module.css +13 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.tsx +115 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawingContext.tsx +15 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.module.css +26 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.tsx +138 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.module.css +26 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.tsx +126 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/Eraser/Eraser.tsx +47 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/AddFrame.tsx +57 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddCard.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddDice.tsx +32 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.module.css +3 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.tsx +39 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.module.css +3 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.tsx +72 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMediaButton.tsx +146 -0
- package/src/features/ToolsPanel/Buttons/AddShape/AddShape.module.css +18 -0
- package/src/features/ToolsPanel/Buttons/AddShape/AddShape.tsx +97 -0
- package/src/features/ToolsPanel/Buttons/AddShape/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/AddSticker.tsx +73 -0
- package/src/features/ToolsPanel/Buttons/AddTemplate.tsx +28 -0
- package/src/features/ToolsPanel/Buttons/AddText.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +9 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/EventList/EventList.module.css +5 -0
- package/src/features/ToolsPanel/Buttons/EventList/EventList.tsx +144 -0
- package/src/features/ToolsPanel/Buttons/EventList/History.tsx +140 -0
- package/src/features/ToolsPanel/Buttons/EventList/HistoryEvent.tsx +28 -0
- package/src/features/ToolsPanel/Buttons/EventList/PrettifiedEvent.tsx +212 -0
- package/src/features/ToolsPanel/Buttons/EventList/SyncJournal.tsx +89 -0
- package/src/features/ToolsPanel/Buttons/EventList/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/Grab.tsx +29 -0
- package/src/features/ToolsPanel/Buttons/Redo.tsx +40 -0
- package/src/features/ToolsPanel/Buttons/Select.tsx +37 -0
- package/src/features/ToolsPanel/Buttons/Star.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/Undo.tsx +39 -0
- package/src/features/ToolsPanel/PanelContext.ts +13 -0
- package/src/features/ToolsPanel/ToolsPanel.module.css +33 -0
- package/src/features/ToolsPanel/ToolsPanel.tsx +84 -0
- package/src/features/ToolsPanel/ViewToolsPanel.tsx +30 -0
- package/src/features/ToolsPanel/index.ts +1 -0
- package/src/features/UserPanel/ActionButtons/ActionButtons.module.css +9 -0
- package/src/features/UserPanel/ActionButtons/ActionButtons.tsx +22 -0
- package/src/features/UserPanel/Avatar/Avatar.module.css +21 -0
- package/src/features/UserPanel/Avatar/Avatar.tsx +44 -0
- package/src/features/UserPanel/Buttons/AddComment/AddComment.module.css +14 -0
- package/src/features/UserPanel/Buttons/AddComment/AddComment.tsx +61 -0
- package/src/features/UserPanel/Buttons/AddComment/index.ts +1 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +8 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/UserPanel/Buttons/ShareBtn/ShareBtn.tsx +49 -0
- package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.module.css +48 -0
- package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.tsx +38 -0
- package/src/features/UserPanel/UserAvatar/UserAvatar.tsx +66 -0
- package/src/features/UserPanel/UserDropdown/UserDropdown.tsx +75 -0
- package/src/features/UserPanel/UserPanel.module.css +516 -0
- package/src/features/UserPanel/UserPanel.tsx +153 -0
- package/src/features/UserPanel/UserPic/UserPic.tsx +171 -0
- package/src/features/UserPanel/icons/ChangePassword.tsx +22 -0
- package/src/features/UserPanel/icons/Click.tsx +20 -0
- package/src/features/UserPanel/icons/Logout.tsx +22 -0
- package/src/features/UserPanel/icons/Ring.tsx +18 -0
- package/src/features/UserPanel/icons/Thumb.tsx +18 -0
- package/src/features/UserPanel/icons/Upgrade.tsx +20 -0
- package/src/features/UserPanel/icons/UserShare.tsx +18 -0
- package/src/features/UserPlan/HistoryModal.tsx +30 -0
- package/src/features/UserPlan/HistoryTable.tsx +114 -0
- package/src/features/UserPlan/LimitsModal.tsx +102 -0
- package/src/features/UserPlan/LimitsTable.module.css +131 -0
- package/src/features/UserPlan/LimitsTable.tsx +171 -0
- package/src/features/UserPlan/PlanCard.module.css +184 -0
- package/src/features/UserPlan/PlanCard.tsx +245 -0
- package/src/features/UserPlan/PlanCards.module.css +26 -0
- package/src/features/UserPlan/PlanCards.tsx +476 -0
- package/src/features/UserPlan/SelectPaymentModal.module.css +206 -0
- package/src/features/UserPlan/SelectPaymentModal.tsx +810 -0
- package/src/features/UserPlan/UserPlanModal.module.css +145 -0
- package/src/features/UserPlan/UserPlanModal.tsx +124 -0
- package/src/features/UserPlan/UserPlanUsage.module.css +101 -0
- package/src/features/UserPlan/UserPlanUsage.tsx +186 -0
- package/src/features/UserPlan/index.ts +1 -0
- package/src/features/VideoPlayer/VideoCanvasControls.tsx +59 -0
- package/src/features/VideoPlayer/VideoPlayer.module.css +3 -0
- package/src/features/VideoPlayer/VideoPlayer.tsx +158 -0
- package/src/features/VideoPlayer/index.ts +2 -0
- package/src/features/ViewModeGuard.tsx +62 -0
- package/src/features/WalletLoginButton/WalletLoginButton.module.css +7 -0
- package/src/features/WalletLoginButton/WalletLoginButton.tsx +77 -0
- package/src/features/WalletLoginButton/index.ts +1 -0
- package/src/features/Widgets/Navbar/Navbar.css +148 -0
- package/src/features/Widgets/Navbar/Navbar.tsx +75 -0
- package/src/features/Widgets/Navbar/lead-icon.tsx +25 -0
- package/src/features/Widgets/form-notifications/password-changed.module.css +39 -0
- package/src/features/Widgets/form-notifications/password-changed.tsx +28 -0
- package/src/features/ZoomPanel/ZoomPanel.module.css +32 -0
- package/src/features/ZoomPanel/ZoomPanel.tsx +105 -0
- package/src/features/ZoomPanel/index.ts +1 -0
- package/src/features/hotkeys.json +315 -0
- package/src/features/hyperLink/HyperLink.module.css +20 -0
- package/src/features/hyperLink/HyperLink.tsx +77 -0
- package/src/features/hyperLink/HyperLinkContext.tsx +57 -0
- package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.module.css +47 -0
- package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.tsx +196 -0
- package/src/features/hyperLink/index.ts +6 -0
- package/src/features/index.drawio +115 -0
- package/src/features/index.svg +1 -0
- package/src/features/modules.d.ts +22 -0
- package/src/index.css +65 -0
- package/src/index.html +74 -0
- package/src/index.ts +4 -0
- package/src/initI18N.ts +42 -0
- package/src/pages/AddEmailView/AddEmailPage.module.css +136 -0
- package/src/pages/AddEmailView/AddEmailPage.tsx +125 -0
- package/src/pages/AddEmailView/index.ts +1 -0
- package/src/pages/BindEmailPage/BindEmailPage.module.css +73 -0
- package/src/pages/BindEmailPage/BindEmailPage.tsx +263 -0
- package/src/pages/BindEmailPage/index.ts +1 -0
- package/src/pages/BoardPage.tsx +161 -0
- package/src/pages/ForgotPasswordPage/ForgotPasswordPage.module.css +82 -0
- package/src/pages/ForgotPasswordPage/ForgotPasswordPage.tsx +148 -0
- package/src/pages/ForgotPasswordPage/SuccessIcon.tsx +20 -0
- package/src/pages/ForgotPasswordPage/index.ts +1 -0
- package/src/pages/HTMLSnapshot/HTMLSnapshot.tsx +60 -0
- package/src/pages/HTMLSnapshot/index.ts +1 -0
- package/src/pages/RestorePasswordPage/RestorePasswordPage.module.css +46 -0
- package/src/pages/RestorePasswordPage/RestorePasswordPage.tsx +197 -0
- package/src/pages/RestorePasswordPage/index.ts +1 -0
- package/src/pages/SelectBoardPage/SelectBoardPage.module.css +247 -0
- package/src/pages/SelectBoardPage/SelectBoardPage.tsx +419 -0
- package/src/pages/SelectBoardPage/getEmbedUrl.ts +3 -0
- package/src/pages/SelectBoardPage/index.ts +1 -0
- package/src/pages/SigninPage/SigninPage.module.css +17 -0
- package/src/pages/SigninPage/SigninPage.tsx +201 -0
- package/src/pages/SigninPage/index.ts +1 -0
- package/src/pages/SignupPage/EmailIcon.tsx +24 -0
- package/src/pages/SignupPage/LockIcon.tsx +24 -0
- package/src/pages/SignupPage/PeopleIcon.tsx +23 -0
- package/src/pages/SignupPage/SignupPage.module.css +52 -0
- package/src/pages/SignupPage/SignupPage.tsx +282 -0
- package/src/pages/SignupPage/index.ts +1 -0
- package/src/pages/TestPage.tsx +52 -0
- package/src/pages/VerifyMailPage/VerifyMailPage.module.css +20 -0
- package/src/pages/VerifyMailPage/VerifyMailPage.tsx +287 -0
- package/src/pages/VerifyMailPage/index.ts +1 -0
- package/src/pages/WelcomePage/WelcomePage.tsx +76 -0
- package/src/pages/WelcomePage/index.ts +1 -0
- package/src/pages/WelcomePage/welcomeBoard.json +8727 -0
- package/src/pages/WelcomePage/welcomeBoardEn.json +9683 -0
- package/src/pages/WheelLogger/WheelLogger.module.css +32 -0
- package/src/pages/WheelLogger/WheelLogger.tsx +94 -0
- package/src/pages/layouts/AppLayout.tsx +86 -0
- package/src/pages/layouts/AuthLayout/AuthLayout.module.css +80 -0
- package/src/pages/layouts/AuthLayout/AuthLayout.tsx +74 -0
- package/src/pages/layouts/AuthLayout/Tail.tsx +23 -0
- package/src/pages/layouts/AuthLayout/index.ts +1 -0
- package/src/production.entrypoint.ts +39 -0
- package/src/public/customWebComponents.js +323 -0
- package/src/public/favicon.svg +20 -0
- package/src/public/favicons/apple-touch-icon.png +0 -0
- package/src/public/favicons/favicon-16x16.png +0 -0
- package/src/public/favicons/favicon-32x32.png +0 -0
- package/src/public/favicons/favicon.ico +0 -0
- package/src/public/favicons/favicon.svg +6 -0
- package/src/public/favicons/site.webmanifest +21 -0
- package/src/public/favicons/web-app-manifest-192x192.png +0 -0
- package/src/public/favicons/web-app-manifest-512x512.png +0 -0
- package/src/public/fonts/NotoColorEmoji-Regular.ttf +0 -0
- package/src/public/fonts/OpenSans-Bold.ttf +0 -0
- package/src/public/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/src/public/fonts/OpenSans-Italic.ttf +0 -0
- package/src/public/fonts/OpenSans-Regular.ttf +0 -0
- package/src/public/fonts/RobotoMono-Regular.ttf +0 -0
- package/src/public/loadLinksImages.js +26 -0
- package/src/public/loader.svg +26 -0
- package/src/public/pdf/installiation_ru.pdf +0 -0
- package/src/public/pdf/lifecycle_ru.pdf +0 -0
- package/src/public/pdf/personal_data_policy_ru.pdf +0 -0
- package/src/public/pdf/privacy_policy_en.pdf +0 -0
- package/src/public/pdf/privacy_policy_ru.pdf +0 -0
- package/src/public/pdf/terms_conditions_en.pdf +0 -0
- package/src/public/pdf/terms_conditions_ru.pdf +0 -0
- package/src/public/pdf/user_agreement_ru.pdf +0 -0
- package/src/public/pdf/user_manual_ru.pdf +0 -0
- package/src/shared/Lang/en.json +1227 -0
- package/src/shared/Lang/i18n.d.ts +8 -0
- package/src/shared/Lang/index.ts +32 -0
- package/src/shared/Lang/ru.json +1226 -0
- package/src/shared/Logger.ts +72 -0
- package/src/shared/RawEvents.ts +7 -0
- package/src/shared/Subject.ts +29 -0
- package/src/shared/SubjectOperation.ts +31 -0
- package/src/shared/ViewSettings.tsx +9 -0
- package/src/shared/api/ai/api.ts +6 -0
- package/src/shared/api/ai/index.ts +3 -0
- package/src/shared/api/ai/requestMap.ts +22 -0
- package/src/shared/api/ai/types.ts +6 -0
- package/src/shared/api/auth/api.ts +78 -0
- package/src/shared/api/auth/index.ts +2 -0
- package/src/shared/api/auth/types.ts +51 -0
- package/src/shared/api/base/base.ts +244 -0
- package/src/shared/api/base/httpError.ts +10 -0
- package/src/shared/api/base/httpResponse.ts +7 -0
- package/src/shared/api/base/interceptors.ts +64 -0
- package/src/shared/api/base/types.ts +18 -0
- package/src/shared/api/billing/api.ts +79 -0
- package/src/shared/api/billing/index.ts +2 -0
- package/src/shared/api/billing/types.ts +155 -0
- package/src/shared/api/boards/api.ts +128 -0
- package/src/shared/api/boards/index.ts +2 -0
- package/src/shared/api/boards/types.ts +15 -0
- package/src/shared/api/index.ts +8 -0
- package/src/shared/api/media/index.ts +3 -0
- package/src/shared/api/media/uploadAudio.ts +53 -0
- package/src/shared/api/media/uploadImage.ts +180 -0
- package/src/shared/api/media/uploadVideo.ts +48 -0
- package/src/shared/api/types.ts +3 -0
- package/src/shared/api/users/api.ts +37 -0
- package/src/shared/api/users/index.ts +2 -0
- package/src/shared/api/users/types.ts +17 -0
- package/src/shared/apiV2/base.ts +9 -0
- package/src/shared/apiV2/boards/api.ts +143 -0
- package/src/shared/apiV2/boards/index.ts +2 -0
- package/src/shared/apiV2/boards/types.ts +66 -0
- package/src/shared/apiV2/folders/api.ts +81 -0
- package/src/shared/apiV2/folders/index.ts +2 -0
- package/src/shared/apiV2/folders/types.ts +35 -0
- package/src/shared/apiV2/index.ts +2 -0
- package/src/shared/assets/imgs/default-user-icon.svg +12 -0
- package/src/shared/assets/imgs/no-img-icon.svg +3 -0
- package/src/shared/lib/IframeModule.ts +223 -0
- package/src/shared/lib/convertColors.ts +51 -0
- package/src/shared/lib/debounce.ts +9 -0
- package/src/shared/lib/getCorrectEnding.ts +19 -0
- package/src/shared/lib/getEmailPrefix.ts +13 -0
- package/src/shared/lib/handleClickDetection.ts +25 -0
- package/src/shared/lib/isIframe.ts +3 -0
- package/src/shared/lib/isMicroboardIframe.ts +3 -0
- package/src/shared/lib/queryStringParser.ts +18 -0
- package/src/shared/lib/regex.ts +4 -0
- package/src/shared/lib/strictContext.ts +14 -0
- package/src/shared/lib/throttle.ts +59 -0
- package/src/shared/lib/useClickOutside.ts +50 -0
- package/src/shared/lib/useClientRect.ts +34 -0
- package/src/shared/lib/useDebounce.ts +22 -0
- package/src/shared/lib/useForceUpdate.ts +7 -0
- package/src/shared/lib/useHoverState.ts +14 -0
- package/src/shared/lib/useIsPhoneScreen.ts +21 -0
- package/src/shared/lib/useMediaQuery.tsx +19 -0
- package/src/shared/lib/withRouter.tsx +21 -0
- package/src/shared/sha256.ts +22 -0
- package/src/shared/ui-lib/Button/Button.module.css +179 -0
- package/src/shared/ui-lib/Button/Button.tsx +43 -0
- package/src/shared/ui-lib/Button/Loader.tsx +20 -0
- package/src/shared/ui-lib/Button/index.ts +1 -0
- package/src/shared/ui-lib/Checkbox/Checkbox.module.css +44 -0
- package/src/shared/ui-lib/Checkbox/Checkbox.tsx +42 -0
- package/src/shared/ui-lib/Checkbox/index.ts +1 -0
- package/src/shared/ui-lib/Dropdown/Chevron.tsx +24 -0
- package/src/shared/ui-lib/Dropdown/Dropdown.module.css +48 -0
- package/src/shared/ui-lib/Dropdown/Dropdown.tsx +42 -0
- package/src/shared/ui-lib/Icon/ConnectorIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/ConnectorPointerIcon.tsx +50 -0
- package/src/shared/ui-lib/Icon/EyeClosed.tsx +34 -0
- package/src/shared/ui-lib/Icon/EyeOpened.tsx +56 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.module.css +11 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.tsx +26 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/bg.png +0 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/FrameIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/Icon.module.css +11 -0
- package/src/shared/ui-lib/Icon/Icon.tsx +212 -0
- package/src/shared/ui-lib/Icon/Logo.tsx +23 -0
- package/src/shared/ui-lib/Icon/ShapeIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/StrokeColorIndicator.tsx +51 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.module.css +14 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.tsx +22 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.module.css +15 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.tsx +22 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/index.ts +11 -0
- package/src/shared/ui-lib/Icon/sprite.svg +1707 -0
- package/src/shared/ui-lib/Input/EyeClose.tsx +22 -0
- package/src/shared/ui-lib/Input/EyeOpen.tsx +23 -0
- package/src/shared/ui-lib/Input/Input.css +130 -0
- package/src/shared/ui-lib/Input/Input.tsx +205 -0
- package/src/shared/ui-lib/Input/index.ts +1 -0
- package/src/shared/ui-lib/Link/Link.module.css +38 -0
- package/src/shared/ui-lib/Link/Link.tsx +19 -0
- package/src/shared/ui-lib/Link/index.ts +1 -0
- package/src/shared/ui-lib/Loader/Loader.module.css +9 -0
- package/src/shared/ui-lib/Loader/Loader.tsx +27 -0
- package/src/shared/ui-lib/Message/Message.module.css +26 -0
- package/src/shared/ui-lib/Message/Message.tsx +37 -0
- package/src/shared/ui-lib/Notification/Notification.module.css +58 -0
- package/src/shared/ui-lib/Notification/Notification.tsx +75 -0
- package/src/shared/ui-lib/Notification/index.ts +1 -0
- package/src/shared/ui-lib/OuterLink/OuterLink.module.css +38 -0
- package/src/shared/ui-lib/OuterLink/OuterLink.tsx +16 -0
- package/src/shared/ui-lib/OuterLink/index.ts +1 -0
- package/src/shared/ui-lib/Progress/Progress.module.css +16 -0
- package/src/shared/ui-lib/Progress/Progress.tsx +35 -0
- package/src/shared/ui-lib/Selector/Selector.module.css +91 -0
- package/src/shared/ui-lib/Selector/Selector.tsx +170 -0
- package/src/shared/ui-lib/Selector/index.ts +1 -0
- package/src/shared/ui-lib/Toast/Toast.module.css +142 -0
- package/src/shared/ui-lib/Toast/index.ts +2 -0
- package/src/shared/ui-lib/Toast/notify.tsx +119 -0
- package/src/shared/ui-lib/ToggleMark/ToggleMark.module.css +22 -0
- package/src/shared/ui-lib/ToggleMark/ToggleMark.tsx +15 -0
- package/src/shared/ui-lib/Tooltip/Tooltip.module.css +195 -0
- package/src/shared/ui-lib/Tooltip/Tooltip.tsx +99 -0
- package/src/shared/ui-lib/Tooltip/index.tsx +1 -0
- package/src/shared/ui-lib/Transitions/FadeTransition.module.css +22 -0
- package/src/shared/ui-lib/Transitions/FadeTransition.tsx +25 -0
- package/src/shared/ui-lib/Transitions/OpacityTransition.module.css +17 -0
- package/src/shared/ui-lib/Transitions/OpacityTransition.tsx +27 -0
- package/src/shared/ui-lib/Transitions/TopFade.module.css +25 -0
- package/src/shared/ui-lib/Transitions/TopFade.tsx +27 -0
- package/src/shared/ui-lib/Transitions/index.ts +2 -0
- package/src/shared/ui-lib/Transitions/types.ts +7 -0
- package/src/shared/ui-lib/UIMainLoader/UIMainLoader.module.css +8 -0
- package/src/shared/ui-lib/UIMainLoader/UIMainLoader.tsx +10 -0
- package/src/shared/ui-lib/UiAccordion/UiAccordion.module.css +4 -0
- package/src/shared/ui-lib/UiAccordion/UiAccordion.tsx +47 -0
- package/src/shared/ui-lib/UiAccordion/index.ts +1 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.module.css +22 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.tsx +90 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/index.ts +2 -0
- package/src/shared/ui-lib/UiButton/Loader.tsx +20 -0
- package/src/shared/ui-lib/UiButton/Tooltip.tsx +98 -0
- package/src/shared/ui-lib/UiButton/UiButton.module.css +306 -0
- package/src/shared/ui-lib/UiButton/UiButton.tsx +119 -0
- package/src/shared/ui-lib/UiButton/index.ts +1 -0
- package/src/shared/ui-lib/UiColorInput/UiColorInput.module.css +66 -0
- package/src/shared/ui-lib/UiColorInput/UiColorInput.tsx +66 -0
- package/src/shared/ui-lib/UiColorInput/index.ts +1 -0
- package/src/shared/ui-lib/UiColorInput/palette.png +0 -0
- package/src/shared/ui-lib/UiLink/UiLink.module.css +175 -0
- package/src/shared/ui-lib/UiLink/UiLink.tsx +72 -0
- package/src/shared/ui-lib/UiLink/index.ts +1 -0
- package/src/shared/ui-lib/UiLoader/UiLoader.module.css +19 -0
- package/src/shared/ui-lib/UiLoader/UiLoader.tsx +31 -0
- package/src/shared/ui-lib/UiLoader/index.ts +1 -0
- package/src/shared/ui-lib/UiModal/UiModal.module.css +188 -0
- package/src/shared/ui-lib/UiModal/UiModal.tsx +182 -0
- package/src/shared/ui-lib/UiModal/UiModalBackground.tsx +62 -0
- package/src/shared/ui-lib/UiModal/UiModalContext.tsx +90 -0
- package/src/shared/ui-lib/UiModal/index.ts +2 -0
- package/src/shared/ui-lib/UiPanel/UiPanel.module.css +52 -0
- package/src/shared/ui-lib/UiPanel/UiPanel.tsx +70 -0
- package/src/shared/ui-lib/UiPanel/index.ts +1 -0
- package/src/shared/ui-lib/UiSelector/UiSelector.module.css +143 -0
- package/src/shared/ui-lib/UiSelector/UiSelector.tsx +202 -0
- package/src/shared/ui-lib/UiSelector/index.ts +2 -0
- package/src/shared/ui-lib/UiSeparator/UiSeparator.module.css +18 -0
- package/src/shared/ui-lib/UiSeparator/UiSeparator.tsx +33 -0
- package/src/shared/ui-lib/UiSeparator/index.ts +1 -0
- package/src/shared/ui-lib/UiSkeleton/UiSkeleton.module.css +37 -0
- package/src/shared/ui-lib/UiSkeleton/UiSkeleton.tsx +10 -0
- package/src/shared/ui-lib/UiSkeleton/index.ts +1 -0
- package/src/shared/ui-lib/UiSlider/UiSlider.module.css +75 -0
- package/src/shared/ui-lib/UiSlider/UiSlider.tsx +50 -0
- package/src/shared/ui-lib/UiSlider/index.ts +1 -0
- package/src/shared/ui-lib/UiSwitch/UiSwitch.module.css +48 -0
- package/src/shared/ui-lib/UiSwitch/UiSwitch.tsx +103 -0
- package/src/shared/ui-lib/UiSwitch/index.ts +1 -0
- package/src/staticResources.ts +410 -0
- package/src/version.ts +1 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
import { useAccount } from "App/useAccount";
|
|
2
|
+
import { useBoardsList } from "App/useBoardsList";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { useContextMenuContext } from "features/ContextMenu";
|
|
5
|
+
import { UserAvatar } from "features/UserPanel/UserAvatar/UserAvatar";
|
|
6
|
+
import i18next from "i18next";
|
|
7
|
+
import React, {
|
|
8
|
+
type ChangeEventHandler,
|
|
9
|
+
useCallback,
|
|
10
|
+
useEffect,
|
|
11
|
+
useRef,
|
|
12
|
+
useState,
|
|
13
|
+
} from "react";
|
|
14
|
+
import { useTranslation } from "react-i18next";
|
|
15
|
+
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
|
16
|
+
import { usersApi } from "shared/api";
|
|
17
|
+
import { boardsApiV2 } from "shared/apiV2";
|
|
18
|
+
import {
|
|
19
|
+
DirectAccessType,
|
|
20
|
+
UserAccessType,
|
|
21
|
+
type GrantedUser,
|
|
22
|
+
} from "shared/apiV2/boards";
|
|
23
|
+
import { debounce } from "shared/lib/debounce";
|
|
24
|
+
import { getEmailPrefix } from "shared/lib/getEmailPrefix";
|
|
25
|
+
import { UiButton } from "shared/ui-lib/UiButton";
|
|
26
|
+
import { Icon } from "shared/ui-lib/Icon";
|
|
27
|
+
import { Link } from "shared/ui-lib/Link";
|
|
28
|
+
import { notify } from "shared/ui-lib/Toast";
|
|
29
|
+
import { useUiModalContext } from "shared/ui-lib/UiModal";
|
|
30
|
+
import { UiModal } from "shared/ui-lib/UiModal/UiModal";
|
|
31
|
+
import { UiSelector, type Option } from "shared/ui-lib/UiSelector";
|
|
32
|
+
import { UiSeparator } from "shared/ui-lib/UiSeparator";
|
|
33
|
+
import { UiSkeleton } from "shared/ui-lib/UiSkeleton";
|
|
34
|
+
import styles from "./ShareModal.module.css";
|
|
35
|
+
import { SAVE_SHARE_MODAL, SaveShareModal } from "./SaveShareModal";
|
|
36
|
+
import { SharePanel } from "features/ShareModal/SharePanel";
|
|
37
|
+
import { Input } from "shared/ui-lib/Input/Input";
|
|
38
|
+
import isEmail from "validator/lib/isEmail";
|
|
39
|
+
|
|
40
|
+
export const SHARE_MODAL_ID = Symbol("shareModal");
|
|
41
|
+
|
|
42
|
+
const PRIVACY_SELECTOR_OPTIONS: Option[] = [
|
|
43
|
+
{
|
|
44
|
+
label: i18next.t("sharing.privacyOptions.public"),
|
|
45
|
+
value: "public",
|
|
46
|
+
icon: <Icon width={20} height={20} iconName="publicDrafts" />,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: i18next.t("sharing.privacyOptions.private"),
|
|
50
|
+
value: "private",
|
|
51
|
+
icon: <Icon width={20} height={20} iconName="lock" />,
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const MODE_SELECTOR_OPTIONS: Option[] = [
|
|
56
|
+
{
|
|
57
|
+
label: i18next.t("sharing.accessOptions.edit"),
|
|
58
|
+
value: "edit",
|
|
59
|
+
icon: <Icon width={20} height={20} iconName="drawingPen" />,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: i18next.t("sharing.accessOptions.view"),
|
|
63
|
+
value: "view",
|
|
64
|
+
icon: <Icon width={20} height={20} iconName="canView" />,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export function ShareModal() {
|
|
69
|
+
const { boardId } = useContextMenuContext();
|
|
70
|
+
const { openModal, closeModal } = useUiModalContext();
|
|
71
|
+
const boardsList = useBoardsList();
|
|
72
|
+
const account = useAccount();
|
|
73
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
74
|
+
const [userEmails, setUserEmails] = useState<string[]>([]);
|
|
75
|
+
const [userEmails2, setUserEmails2] = useState<string[]>([]);
|
|
76
|
+
const [usersMode, setUsersMode] = useState<UserAccessType>(
|
|
77
|
+
UserAccessType.Edit,
|
|
78
|
+
);
|
|
79
|
+
const [usersMode2, setUsersMode2] = useState<UserAccessType>(
|
|
80
|
+
UserAccessType.View,
|
|
81
|
+
);
|
|
82
|
+
const [isGrantedUsersLoading, setIsGrantedUsersLoading] = useState(true);
|
|
83
|
+
const [grantedUsers, setGrantedUsers] = useState<boardsApiV2.GrantedUser[]>(
|
|
84
|
+
[],
|
|
85
|
+
);
|
|
86
|
+
const [searchOptions, setSearchOptions] = useState<usersApi.User[]>([]);
|
|
87
|
+
const [isSearchOptionsLoading, setIsSearchOptionsLoading] = useState(false);
|
|
88
|
+
const [highlightedEmail, setHighlightedEmail] = useState<string | null>(
|
|
89
|
+
null,
|
|
90
|
+
);
|
|
91
|
+
const [inputValue, setInputValue] = useState("");
|
|
92
|
+
const [isSharePanelOpen, setIsSharePanelOpen] = useState(false);
|
|
93
|
+
const { t } = useTranslation();
|
|
94
|
+
const isSettingsChange = useRef(false);
|
|
95
|
+
const sharePanelRef = useRef<HTMLDivElement>(null);
|
|
96
|
+
|
|
97
|
+
const loadInfo = async () => {
|
|
98
|
+
if (!boardId) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
try {
|
|
102
|
+
const { data } = await boardsApiV2.getGrantedUsers(boardId);
|
|
103
|
+
setGrantedUsers(
|
|
104
|
+
data?.map(user => {
|
|
105
|
+
return {
|
|
106
|
+
...user,
|
|
107
|
+
name: user.name || getEmailPrefix(user.email),
|
|
108
|
+
};
|
|
109
|
+
}) ?? [],
|
|
110
|
+
);
|
|
111
|
+
} catch {
|
|
112
|
+
setGrantedUsers([]);
|
|
113
|
+
} finally {
|
|
114
|
+
setIsGrantedUsersLoading(false);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
loadInfo();
|
|
120
|
+
}, [boardId]);
|
|
121
|
+
|
|
122
|
+
const boardInfo = boardsList.getBoardInfo(boardId);
|
|
123
|
+
const [isPublic, setIsPublic] = useState<boolean>(
|
|
124
|
+
() => boardInfo?.isPublic ?? true,
|
|
125
|
+
);
|
|
126
|
+
const [mode, setMode] = useState<DirectAccessType>(
|
|
127
|
+
() => boardInfo?.directAccessType ?? DirectAccessType.EDIT,
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
const isOwner = account.permissions.checkPermissions(
|
|
131
|
+
"owns",
|
|
132
|
+
"boards",
|
|
133
|
+
boardId,
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const toggleSearchPanel = () => {
|
|
137
|
+
setIsSharePanelOpen(!isSharePanelOpen);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (account.isLoggedIn && isOwner) {
|
|
142
|
+
handleSubmit();
|
|
143
|
+
}
|
|
144
|
+
}, [mode, isPublic]);
|
|
145
|
+
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
setIsPublic(boardInfo?.isPublic ?? true);
|
|
148
|
+
setMode(boardInfo?.directAccessType ?? DirectAccessType.EDIT);
|
|
149
|
+
}, [boardInfo]);
|
|
150
|
+
|
|
151
|
+
const disabled = !account.isLoggedIn || !isOwner || isSubmitting;
|
|
152
|
+
|
|
153
|
+
const handleUserAccessChange = (info: {
|
|
154
|
+
userId: number;
|
|
155
|
+
accessType: UserAccessType;
|
|
156
|
+
}) => {
|
|
157
|
+
const copy = structuredClone(grantedUsers);
|
|
158
|
+
const targetIdx = copy.findIndex(user => user.id === info.userId);
|
|
159
|
+
if (!copy[targetIdx]) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
copy[targetIdx].accessType = info.accessType;
|
|
163
|
+
isSettingsChange.current = true;
|
|
164
|
+
setGrantedUsers(copy);
|
|
165
|
+
};
|
|
166
|
+
const handleCopy = async () => {
|
|
167
|
+
try {
|
|
168
|
+
await navigator.clipboard.writeText(
|
|
169
|
+
`${window.location.origin}/boards/${boardId}`,
|
|
170
|
+
);
|
|
171
|
+
notify({
|
|
172
|
+
body: t("sharing.copyLink.success"),
|
|
173
|
+
variant: "success",
|
|
174
|
+
});
|
|
175
|
+
} catch {
|
|
176
|
+
notify({ body: t("sharing.copyLink.error"), variant: "error" });
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const handleSearchInput = async (val: string) => {
|
|
181
|
+
const { data } = await usersApi.getUsers(val, 1);
|
|
182
|
+
if (data) {
|
|
183
|
+
setSearchOptions(data);
|
|
184
|
+
isSettingsChange.current =
|
|
185
|
+
val.length !== 0 || userEmails.length !== 0;
|
|
186
|
+
}
|
|
187
|
+
setIsSearchOptionsLoading(false);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const debouncedHandleInputSearch = useCallback(
|
|
191
|
+
debounce(handleSearchInput, 700),
|
|
192
|
+
[usersApi],
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
const handleInputChange = (val: string) => {
|
|
196
|
+
setIsSearchOptionsLoading(true);
|
|
197
|
+
debouncedHandleInputSearch(val);
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const handleSubmit = async () => {
|
|
201
|
+
if (
|
|
202
|
+
!mode ||
|
|
203
|
+
typeof isPublic !== "boolean" ||
|
|
204
|
+
!boardId ||
|
|
205
|
+
isSubmitting
|
|
206
|
+
) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
setIsSubmitting(true);
|
|
211
|
+
|
|
212
|
+
const filteredGrantedUsers = grantedUsers.filter(user => {
|
|
213
|
+
return (
|
|
214
|
+
!user.isOwner &&
|
|
215
|
+
!userEmails.includes(user.email) &&
|
|
216
|
+
!userEmails2.includes(user.email)
|
|
217
|
+
);
|
|
218
|
+
});
|
|
219
|
+
await boardsList.manageAccess(boardId, {
|
|
220
|
+
users: [
|
|
221
|
+
...filteredGrantedUsers.map(user => ({
|
|
222
|
+
userId: user.id,
|
|
223
|
+
accessType: user.accessType,
|
|
224
|
+
email: null,
|
|
225
|
+
})),
|
|
226
|
+
...userEmails.map(email => ({
|
|
227
|
+
userId:
|
|
228
|
+
searchOptions.find(user => user.email === email)?.id ||
|
|
229
|
+
null,
|
|
230
|
+
accessType: usersMode,
|
|
231
|
+
email,
|
|
232
|
+
})),
|
|
233
|
+
...userEmails2.map(email => ({
|
|
234
|
+
userId:
|
|
235
|
+
searchOptions.find(user => user.email === email)?.id ||
|
|
236
|
+
null,
|
|
237
|
+
accessType: usersMode2,
|
|
238
|
+
email,
|
|
239
|
+
})),
|
|
240
|
+
],
|
|
241
|
+
directAccessType: mode,
|
|
242
|
+
isPublic,
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
await loadInfo();
|
|
246
|
+
setUserEmails([]);
|
|
247
|
+
setUserEmails2([]);
|
|
248
|
+
setIsSubmitting(false);
|
|
249
|
+
isSettingsChange.current = false;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const handleAddUser =
|
|
253
|
+
(setUserEmails: (val: string[]) => void) =>
|
|
254
|
+
(values: string[], currValue: string) => {
|
|
255
|
+
const addedUser = grantedUsers.find(
|
|
256
|
+
({ email }) => email === currValue.trim(),
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
if (addedUser) {
|
|
260
|
+
setHighlightedEmail(addedUser.email);
|
|
261
|
+
setTimeout(() => {
|
|
262
|
+
setHighlightedEmail(null);
|
|
263
|
+
}, 3000);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
setUserEmails(values);
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
const onCloseModal = (): void => {
|
|
271
|
+
if (isSettingsChange.current) {
|
|
272
|
+
openModal(SAVE_SHARE_MODAL);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
const handleSearchInputChange: ChangeEventHandler<
|
|
277
|
+
HTMLInputElement
|
|
278
|
+
> = event => {
|
|
279
|
+
const text = event.target.value;
|
|
280
|
+
setInputValue(text);
|
|
281
|
+
handleInputChange(text);
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const handleSearchInputKeydown = (
|
|
285
|
+
event: React.KeyboardEvent<HTMLInputElement>,
|
|
286
|
+
): void => {
|
|
287
|
+
event.stopPropagation();
|
|
288
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
289
|
+
event.preventDefault();
|
|
290
|
+
const isExistsInOptions = isEmail(inputValue.trim());
|
|
291
|
+
const isValidInputValue = inputValue.trim() && isExistsInOptions;
|
|
292
|
+
|
|
293
|
+
if (!isExistsInOptions) {
|
|
294
|
+
setInputValue("");
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
if (isValidInputValue) {
|
|
299
|
+
const existingUser = grantedUsers.find(
|
|
300
|
+
user => user.email === inputValue.trim(),
|
|
301
|
+
);
|
|
302
|
+
if (existingUser) {
|
|
303
|
+
setHighlightedEmail(existingUser.email);
|
|
304
|
+
setTimeout(() => {
|
|
305
|
+
setHighlightedEmail(null);
|
|
306
|
+
}, 3000);
|
|
307
|
+
setInputValue("");
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
setUserEmails([inputValue.trim()]);
|
|
311
|
+
setInputValue("");
|
|
312
|
+
toggleSearchPanel();
|
|
313
|
+
event.currentTarget.blur();
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
return (
|
|
319
|
+
<>
|
|
320
|
+
<UiModal
|
|
321
|
+
className={styles.modalContainer}
|
|
322
|
+
modalId={SHARE_MODAL_ID}
|
|
323
|
+
onClose={onCloseModal}
|
|
324
|
+
clickOutsideRefs={
|
|
325
|
+
isSharePanelOpen ? [sharePanelRef] : undefined
|
|
326
|
+
}
|
|
327
|
+
>
|
|
328
|
+
<div className={styles.wrapper}>
|
|
329
|
+
<h1 className={styles.heading}>
|
|
330
|
+
{t("sharing.share")} - {boardInfo?.title}
|
|
331
|
+
</h1>
|
|
332
|
+
<div className={styles.inputContainer}>
|
|
333
|
+
<Input
|
|
334
|
+
id="share-modal-input"
|
|
335
|
+
disabled={!account.isLoggedIn || !isOwner}
|
|
336
|
+
onChange={handleSearchInputChange}
|
|
337
|
+
onKeyDown={handleSearchInputKeydown}
|
|
338
|
+
value={inputValue}
|
|
339
|
+
placeholder={t("sharing.addUsers")}
|
|
340
|
+
prefixIcon={
|
|
341
|
+
<Icon
|
|
342
|
+
width={20}
|
|
343
|
+
height={20}
|
|
344
|
+
style={{ color: "rgba(13, 17, 38, 0.4)" }}
|
|
345
|
+
iconName="People"
|
|
346
|
+
/>
|
|
347
|
+
}
|
|
348
|
+
/>
|
|
349
|
+
</div>
|
|
350
|
+
{account.isLoggedIn && isOwner && (
|
|
351
|
+
<div className={styles.grantedUsers}>
|
|
352
|
+
<h2 className={styles.settingsHeading}>
|
|
353
|
+
{t("sharing.grantedUsers")}
|
|
354
|
+
</h2>
|
|
355
|
+
<div className={styles.usersList}>
|
|
356
|
+
{isGrantedUsersLoading ? (
|
|
357
|
+
<GrantedUserSkeleton />
|
|
358
|
+
) : (
|
|
359
|
+
<TransitionGroup component={null}>
|
|
360
|
+
{grantedUsers.map(user => (
|
|
361
|
+
<CSSTransition
|
|
362
|
+
key={user.id}
|
|
363
|
+
timeout={500}
|
|
364
|
+
classNames={{
|
|
365
|
+
enter: styles.fadeEnter,
|
|
366
|
+
enterActive:
|
|
367
|
+
styles.fadeEnterActive,
|
|
368
|
+
exit: styles.fadeExit,
|
|
369
|
+
exitActive:
|
|
370
|
+
styles.fadeExitActive,
|
|
371
|
+
}}
|
|
372
|
+
>
|
|
373
|
+
<GrantedUser
|
|
374
|
+
highlighted={
|
|
375
|
+
highlightedEmail ===
|
|
376
|
+
user.email
|
|
377
|
+
}
|
|
378
|
+
onChange={
|
|
379
|
+
handleUserAccessChange
|
|
380
|
+
}
|
|
381
|
+
saveChanges={handleSubmit}
|
|
382
|
+
{...user}
|
|
383
|
+
/>
|
|
384
|
+
</CSSTransition>
|
|
385
|
+
))}
|
|
386
|
+
</TransitionGroup>
|
|
387
|
+
)}
|
|
388
|
+
</div>
|
|
389
|
+
<UiSeparator />
|
|
390
|
+
</div>
|
|
391
|
+
)}
|
|
392
|
+
{!account.isLoggedIn && isOwner && (
|
|
393
|
+
<p className={styles.notAuth}>
|
|
394
|
+
{t("sharing.notAuthMsg")}{" "}
|
|
395
|
+
<Link to="/auth/sign-in">{t("sharing.login")}</Link>{" "}
|
|
396
|
+
{t("sharing.or")}{" "}
|
|
397
|
+
<Link to="/auth/sign-up">
|
|
398
|
+
{t("sharing.register")}
|
|
399
|
+
</Link>
|
|
400
|
+
.
|
|
401
|
+
</p>
|
|
402
|
+
)}
|
|
403
|
+
<div className={styles.settings}>
|
|
404
|
+
{account.isLoggedIn && isOwner && (
|
|
405
|
+
<h2 className={styles.settingsHeading}>
|
|
406
|
+
{t("sharing.publicAccess")}
|
|
407
|
+
</h2>
|
|
408
|
+
)}
|
|
409
|
+
<div
|
|
410
|
+
className={clsx(
|
|
411
|
+
styles.selectors,
|
|
412
|
+
isPublic && styles.modeVisible,
|
|
413
|
+
)}
|
|
414
|
+
>
|
|
415
|
+
<UiSelector
|
|
416
|
+
isLoading={boardsList.isLoading}
|
|
417
|
+
disabled={disabled}
|
|
418
|
+
iconColor="rgba(105, 107, 118, 1)"
|
|
419
|
+
options={PRIVACY_SELECTOR_OPTIONS}
|
|
420
|
+
onChange={opt => {
|
|
421
|
+
isSettingsChange.current = true;
|
|
422
|
+
setIsPublic(opt === "public");
|
|
423
|
+
}}
|
|
424
|
+
value={
|
|
425
|
+
isPublic
|
|
426
|
+
? PRIVACY_SELECTOR_OPTIONS[0].value
|
|
427
|
+
: PRIVACY_SELECTOR_OPTIONS[1].value
|
|
428
|
+
}
|
|
429
|
+
/>
|
|
430
|
+
<div className={styles.selector}>
|
|
431
|
+
<UiSelector
|
|
432
|
+
isLoading={boardsList.isLoading}
|
|
433
|
+
disabled={disabled}
|
|
434
|
+
iconColor="rgba(105, 107, 118, 1)"
|
|
435
|
+
options={MODE_SELECTOR_OPTIONS}
|
|
436
|
+
onChange={opt => {
|
|
437
|
+
isSettingsChange.current = true;
|
|
438
|
+
setMode(opt as DirectAccessType);
|
|
439
|
+
}}
|
|
440
|
+
value={
|
|
441
|
+
mode ===
|
|
442
|
+
boardsApiV2.DirectAccessType.EDIT
|
|
443
|
+
? MODE_SELECTOR_OPTIONS[0].value
|
|
444
|
+
: MODE_SELECTOR_OPTIONS[1].value
|
|
445
|
+
}
|
|
446
|
+
/>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
{boardInfo?.isPublic && (
|
|
450
|
+
<p className={styles.publicMsg}>
|
|
451
|
+
{t("sharing.publicBoard")}
|
|
452
|
+
</p>
|
|
453
|
+
)}
|
|
454
|
+
</div>
|
|
455
|
+
<div className={styles.btns}>
|
|
456
|
+
<UiButton
|
|
457
|
+
onClick={handleCopy}
|
|
458
|
+
className={clsx(styles.btn, styles.copyBtn)}
|
|
459
|
+
variant="ghostFilled"
|
|
460
|
+
size="lg"
|
|
461
|
+
>
|
|
462
|
+
<span className={styles.copyIcon}>
|
|
463
|
+
<Icon iconName="CopyLink" />{" "}
|
|
464
|
+
</span>
|
|
465
|
+
<span>{t("sharing.copyLink.label")}</span>
|
|
466
|
+
</UiButton>
|
|
467
|
+
<UiButton
|
|
468
|
+
variant="primary"
|
|
469
|
+
onClick={() => closeModal()}
|
|
470
|
+
className={styles.btn}
|
|
471
|
+
disabled={disabled}
|
|
472
|
+
size="lg"
|
|
473
|
+
>
|
|
474
|
+
{t("sharing.submit")}
|
|
475
|
+
</UiButton>
|
|
476
|
+
</div>
|
|
477
|
+
</div>
|
|
478
|
+
{isSubmitting && <div className={styles.loader} />}
|
|
479
|
+
</UiModal>
|
|
480
|
+
<SaveShareModal onSave={handleSubmit} />
|
|
481
|
+
{isSharePanelOpen && (
|
|
482
|
+
<SharePanel
|
|
483
|
+
ref={sharePanelRef}
|
|
484
|
+
boardName={boardInfo?.title}
|
|
485
|
+
searchOptions={searchOptions}
|
|
486
|
+
onInput={handleInputChange}
|
|
487
|
+
isLoading={isSearchOptionsLoading || isSubmitting}
|
|
488
|
+
grantedUsers={grantedUsers}
|
|
489
|
+
userEmails2={userEmails2}
|
|
490
|
+
userEmails={userEmails}
|
|
491
|
+
setUserEmails={setUserEmails}
|
|
492
|
+
setUserEmails2={setUserEmails2}
|
|
493
|
+
handleAddUser={handleAddUser}
|
|
494
|
+
usersMode={usersMode}
|
|
495
|
+
usersMode2={usersMode2}
|
|
496
|
+
setUsersMode={setUsersMode}
|
|
497
|
+
setUsersMode2={setUsersMode2}
|
|
498
|
+
toggleIsOpen={toggleSearchPanel}
|
|
499
|
+
onSubmit={handleSubmit}
|
|
500
|
+
/>
|
|
501
|
+
)}
|
|
502
|
+
</>
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
const USER_ACCESS_SELECTOR_OPTIONS: Option[] = [
|
|
507
|
+
{
|
|
508
|
+
value: "edit",
|
|
509
|
+
label: i18next.t("sharing.accessOptions.edit"),
|
|
510
|
+
icon: <Icon width={20} height={20} iconName="drawingPen" />,
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
value: "view",
|
|
514
|
+
label: i18next.t("sharing.accessOptions.view"),
|
|
515
|
+
icon: <Icon width={20} height={20} iconName="canView" />,
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
value: "noAccess",
|
|
519
|
+
label: i18next.t("sharing.accessOptions.noAccess"),
|
|
520
|
+
icon: <Icon width={20} height={20} iconName="Close" />,
|
|
521
|
+
},
|
|
522
|
+
];
|
|
523
|
+
|
|
524
|
+
type GrantedUserProps = GrantedUser & {
|
|
525
|
+
onChange: (userAcces: {
|
|
526
|
+
userId: number;
|
|
527
|
+
accessType: UserAccessType;
|
|
528
|
+
}) => void;
|
|
529
|
+
highlighted?: boolean;
|
|
530
|
+
saveChanges: () => Promise<void>;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
function GrantedUser({
|
|
534
|
+
id,
|
|
535
|
+
email,
|
|
536
|
+
name,
|
|
537
|
+
accessType,
|
|
538
|
+
avatar,
|
|
539
|
+
isOwner,
|
|
540
|
+
onChange,
|
|
541
|
+
highlighted,
|
|
542
|
+
saveChanges,
|
|
543
|
+
}: GrantedUserProps) {
|
|
544
|
+
const account = useAccount();
|
|
545
|
+
const isLoggedInUser = account.info?.id === id;
|
|
546
|
+
const { t } = useTranslation();
|
|
547
|
+
const accessChanged = useRef(false);
|
|
548
|
+
|
|
549
|
+
useEffect(() => {
|
|
550
|
+
if (accessChanged) {
|
|
551
|
+
saveChanges();
|
|
552
|
+
}
|
|
553
|
+
}, [accessType]);
|
|
554
|
+
|
|
555
|
+
return (
|
|
556
|
+
<div
|
|
557
|
+
className={clsx(
|
|
558
|
+
styles.grantedUser,
|
|
559
|
+
highlighted && styles.highlighted,
|
|
560
|
+
)}
|
|
561
|
+
>
|
|
562
|
+
<div className={styles.userInfo}>
|
|
563
|
+
<div className={styles.avatar}>
|
|
564
|
+
<UserAvatar
|
|
565
|
+
width={40}
|
|
566
|
+
height={40}
|
|
567
|
+
src={avatar ?? undefined}
|
|
568
|
+
/>
|
|
569
|
+
</div>
|
|
570
|
+
<div className={styles.userInfoText}>
|
|
571
|
+
<h3 className={styles.userName}>
|
|
572
|
+
{name} {isLoggedInUser && `(${t("sharing.itsYou")})`}
|
|
573
|
+
</h3>
|
|
574
|
+
<span className={styles.userEmail}>{email}</span>
|
|
575
|
+
</div>
|
|
576
|
+
</div>
|
|
577
|
+
<div className={styles.userStatus}>
|
|
578
|
+
{isOwner ? (
|
|
579
|
+
<span className={styles.ownerLabel}>
|
|
580
|
+
{t("sharing.owner")}
|
|
581
|
+
</span>
|
|
582
|
+
) : (
|
|
583
|
+
<UiSelector
|
|
584
|
+
className={styles.grantedUserSelector}
|
|
585
|
+
iconColor="rgba(105, 107, 118, 1)"
|
|
586
|
+
options={USER_ACCESS_SELECTOR_OPTIONS}
|
|
587
|
+
value={accessType}
|
|
588
|
+
onChange={type => {
|
|
589
|
+
onChange({
|
|
590
|
+
accessType: type as UserAccessType,
|
|
591
|
+
userId: id,
|
|
592
|
+
});
|
|
593
|
+
accessChanged.current = true;
|
|
594
|
+
}}
|
|
595
|
+
/>
|
|
596
|
+
)}
|
|
597
|
+
</div>
|
|
598
|
+
</div>
|
|
599
|
+
);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function GrantedUserSkeleton() {
|
|
603
|
+
return (
|
|
604
|
+
<div className={styles.grantedUser}>
|
|
605
|
+
<div className={styles.userInfo}>
|
|
606
|
+
<div className={styles.avatar}>
|
|
607
|
+
<UiSkeleton
|
|
608
|
+
className={styles.skeletonAvatar}
|
|
609
|
+
width={40}
|
|
610
|
+
height={40}
|
|
611
|
+
/>
|
|
612
|
+
</div>
|
|
613
|
+
<div className={styles.userInfoText}>
|
|
614
|
+
<h3 className={styles.userName}>
|
|
615
|
+
<UiSkeleton className={styles.skeletonInfo} />
|
|
616
|
+
</h3>
|
|
617
|
+
<span className={styles.userEmail}>
|
|
618
|
+
<UiSkeleton className={styles.skeletonInfo} />
|
|
619
|
+
</span>
|
|
620
|
+
</div>
|
|
621
|
+
</div>
|
|
622
|
+
<div className={styles.userStatus}>
|
|
623
|
+
<UiSkeleton className={styles.skeletonSelector} />
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
);
|
|
627
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.blackout {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100dvw;
|
|
6
|
+
height: 100dvh;
|
|
7
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
8
|
+
z-index: 1000;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
padding: 20px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.panel {
|
|
17
|
+
position: fixed;
|
|
18
|
+
max-width: 800px;
|
|
19
|
+
min-width: 700px;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
padding: 0 !important;
|
|
22
|
+
border-radius: 24px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.wrapper {
|
|
26
|
+
width: 100%;
|
|
27
|
+
padding: 32px 64px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.heading {
|
|
31
|
+
font-size: 30px;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btns {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: flex-start;
|
|
42
|
+
padding-top: 24px;
|
|
43
|
+
padding-bottom: 8px;
|
|
44
|
+
gap: 16px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.btns .btn {
|
|
48
|
+
width: auto;
|
|
49
|
+
padding: 10px 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.closeBtn {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 20px;
|
|
55
|
+
right: 20px;
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
min-width: 20px;
|
|
58
|
+
min-height: 20px;
|
|
59
|
+
color: rgba(13, 17, 38, 0.4);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
padding: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media screen and (max-width: 768px) {
|
|
65
|
+
.panel {
|
|
66
|
+
min-width: 320px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media screen and (max-width: 500px) {
|
|
71
|
+
.panel {
|
|
72
|
+
width: 100vw;
|
|
73
|
+
}
|
|
74
|
+
}
|