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,419 @@
|
|
|
1
|
+
import { useAccount } from "App/useAccount";
|
|
2
|
+
import { useBoardsList } from "App/useBoardsList";
|
|
3
|
+
import { TFunction } from "i18next";
|
|
4
|
+
import { getEmbedUrl } from "./getEmbedUrl";
|
|
5
|
+
import { useForceUpdate } from "shared/lib/useForceUpdate";
|
|
6
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
7
|
+
import { useTranslation } from "react-i18next";
|
|
8
|
+
import { useNavigate } from "react-router-dom";
|
|
9
|
+
import { Folder } from "entities/Folder";
|
|
10
|
+
import { boardsApiV2 } from "shared/apiV2";
|
|
11
|
+
import { AccessKeyType } from "shared/apiV2/boards";
|
|
12
|
+
import { useAppContext } from "features/AppContext";
|
|
13
|
+
import { Icon, Logo } from "shared/ui-lib/Icon";
|
|
14
|
+
import { Selector, type SelectorHandle } from "shared/ui-lib/Selector";
|
|
15
|
+
import { Logout } from "features/UserPanel/icons/Logout";
|
|
16
|
+
import { UserAvatar } from "features/UserPanel/UserAvatar/UserAvatar";
|
|
17
|
+
import { UserDropDown } from "features/UserPanel/UserDropdown/UserDropdown";
|
|
18
|
+
import style from "./SelectBoardPage.module.css";
|
|
19
|
+
import { UiButton } from "shared/ui-lib/UiButton";
|
|
20
|
+
|
|
21
|
+
const getName = (i18t: TFunction, name?: string | null): string =>
|
|
22
|
+
name || i18t("board.untitled");
|
|
23
|
+
|
|
24
|
+
export const SelectBoardPage: React.FC = () => {
|
|
25
|
+
const { app } = useAppContext();
|
|
26
|
+
const { t } = useTranslation();
|
|
27
|
+
const navigate = useNavigate();
|
|
28
|
+
const forceUpdate = useForceUpdate();
|
|
29
|
+
const boardsList = useBoardsList();
|
|
30
|
+
const account = useAccount();
|
|
31
|
+
const isAuth = account.isLoggedIn;
|
|
32
|
+
const newBoardRef = useRef<HTMLInputElement>(null);
|
|
33
|
+
const selectorRef = useRef<SelectorHandle<false>>(null);
|
|
34
|
+
const userPanelRef = useRef<HTMLDivElement>(null);
|
|
35
|
+
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
36
|
+
const [loading, setLoading] = useState(false);
|
|
37
|
+
const [selected, setSelected] = useState<
|
|
38
|
+
boardsApiV2.Board | null | "addNew"
|
|
39
|
+
>(null);
|
|
40
|
+
const [newBoardName, setNewBoardName] = useState(t("board.untitled"));
|
|
41
|
+
|
|
42
|
+
function handleError(er: unknown): void {
|
|
43
|
+
window.opener?.postMessage(
|
|
44
|
+
{
|
|
45
|
+
error: er,
|
|
46
|
+
},
|
|
47
|
+
"*",
|
|
48
|
+
);
|
|
49
|
+
// "*" - ANY OPENER ORIGIN, REPLACE HERE
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function successMessageToParent(
|
|
53
|
+
boardId: string,
|
|
54
|
+
accessKey: string,
|
|
55
|
+
name: string,
|
|
56
|
+
): void {
|
|
57
|
+
window.opener?.postMessage(
|
|
58
|
+
{
|
|
59
|
+
success: {
|
|
60
|
+
visitorsLink: `${getEmbedUrl()}/boards/${boardId}?titlePanel=false&accessKey=${accessKey}`,
|
|
61
|
+
authorLink: `${getEmbedUrl()}/boards/${boardId}?titlePanel=false`,
|
|
62
|
+
name,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
"*",
|
|
66
|
+
);
|
|
67
|
+
// "*" - ANY OPENER ORIGIN, REPLACE HERE
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function handleSuccess(
|
|
71
|
+
boardId: string,
|
|
72
|
+
name?: string | null,
|
|
73
|
+
authorKey?: string,
|
|
74
|
+
): Promise<void> {
|
|
75
|
+
const accessKeyType = selectorRef.current?.getSelectedOptions().value;
|
|
76
|
+
|
|
77
|
+
if (!accessKeyType) {
|
|
78
|
+
throw new Error("Error creating access key");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const { data: accessKey } = await boardsApiV2.createAccessKey(
|
|
82
|
+
boardId,
|
|
83
|
+
{
|
|
84
|
+
keyType: accessKeyType as AccessKeyType,
|
|
85
|
+
},
|
|
86
|
+
authorKey,
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
if (!accessKey) {
|
|
90
|
+
throw new Error("Error creating access key");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
successMessageToParent(boardId, accessKey.accessKey, getName(t, name));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (selected === "addNew" && newBoardRef.current) {
|
|
98
|
+
newBoardRef.current.focus();
|
|
99
|
+
newBoardRef.current.select();
|
|
100
|
+
}
|
|
101
|
+
}, [selected]);
|
|
102
|
+
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
const fetchBoards = async (): Promise<void> => {
|
|
105
|
+
await app.boardsList.loadBoards();
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
fetchBoards();
|
|
109
|
+
}, []);
|
|
110
|
+
|
|
111
|
+
const handleEmbed = async (): Promise<void> => {
|
|
112
|
+
try {
|
|
113
|
+
if (selected === "addNew") {
|
|
114
|
+
const createdId = await boardsList.createBoard(
|
|
115
|
+
newBoardRef.current?.value,
|
|
116
|
+
true,
|
|
117
|
+
);
|
|
118
|
+
const unauthedData = app.storage.getCreatedBoard(createdId);
|
|
119
|
+
if (unauthedData) {
|
|
120
|
+
handleSuccess(
|
|
121
|
+
unauthedData.id,
|
|
122
|
+
unauthedData.title,
|
|
123
|
+
unauthedData.authorKey ?? undefined,
|
|
124
|
+
);
|
|
125
|
+
} else {
|
|
126
|
+
handleSuccess(createdId, newBoardRef.current?.value);
|
|
127
|
+
}
|
|
128
|
+
} else if (selected) {
|
|
129
|
+
setLoading(true);
|
|
130
|
+
const res = boardsList.getBoardInfo(selected.id);
|
|
131
|
+
if (!res) {
|
|
132
|
+
setLoading(false);
|
|
133
|
+
// selected.notFound = true;
|
|
134
|
+
// TODO fixed not found boards
|
|
135
|
+
setSelected({ ...selected, notFound: true });
|
|
136
|
+
boardsList.subject.publish();
|
|
137
|
+
// app.storage.subject.publish();
|
|
138
|
+
forceUpdate();
|
|
139
|
+
} else {
|
|
140
|
+
handleSuccess(
|
|
141
|
+
res.id,
|
|
142
|
+
res.title,
|
|
143
|
+
res.authorKey ?? undefined,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
} catch (er) {
|
|
148
|
+
setLoading(false);
|
|
149
|
+
handleError(er);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return (
|
|
154
|
+
<>
|
|
155
|
+
<div className={style.container}>
|
|
156
|
+
<div className={style.header} style={{ position: "relative" }}>
|
|
157
|
+
<div className={style.logo}>
|
|
158
|
+
<Logo id="logo" />
|
|
159
|
+
<div className={style.headerTitle}>Microboard</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div
|
|
162
|
+
ref={userPanelRef}
|
|
163
|
+
className={`${style.profile} ${!isAuth && style.unAuth}`}
|
|
164
|
+
onClick={() => setIsDropdownOpen(prev => !prev)}
|
|
165
|
+
>
|
|
166
|
+
<UserAvatar src={account.info?.avatar} />
|
|
167
|
+
<UserDropDown
|
|
168
|
+
openerRef={userPanelRef}
|
|
169
|
+
isOpen={isDropdownOpen}
|
|
170
|
+
setIsDropdownOpen={setIsDropdownOpen}
|
|
171
|
+
customTop={50}
|
|
172
|
+
email={account.info?.email}
|
|
173
|
+
buttons={
|
|
174
|
+
isAuth
|
|
175
|
+
? [
|
|
176
|
+
<UiButton
|
|
177
|
+
key="userDropDown2"
|
|
178
|
+
variant="ghost"
|
|
179
|
+
onClick={async () => {
|
|
180
|
+
await account.logout();
|
|
181
|
+
}}
|
|
182
|
+
size="lg"
|
|
183
|
+
>
|
|
184
|
+
<Logout /> {t("auth.logout")}
|
|
185
|
+
</UiButton>,
|
|
186
|
+
]
|
|
187
|
+
: [
|
|
188
|
+
<UiButton
|
|
189
|
+
key="userDropDown1"
|
|
190
|
+
onClick={() => {
|
|
191
|
+
setIsDropdownOpen(false);
|
|
192
|
+
navigate(
|
|
193
|
+
"/auth/sign-in?backToSelect=true",
|
|
194
|
+
);
|
|
195
|
+
}}
|
|
196
|
+
variant="ghost"
|
|
197
|
+
size="lg"
|
|
198
|
+
>
|
|
199
|
+
<Icon
|
|
200
|
+
iconName="SignIn"
|
|
201
|
+
width={20}
|
|
202
|
+
height={20}
|
|
203
|
+
/>{" "}
|
|
204
|
+
{t("auth.signIn")}
|
|
205
|
+
</UiButton>,
|
|
206
|
+
<UiButton
|
|
207
|
+
key="userDropDown2"
|
|
208
|
+
variant="ghost"
|
|
209
|
+
onClick={() => {
|
|
210
|
+
setIsDropdownOpen(false);
|
|
211
|
+
navigate(
|
|
212
|
+
"/auth/sign-up?backToSelect=true",
|
|
213
|
+
);
|
|
214
|
+
}}
|
|
215
|
+
size="lg"
|
|
216
|
+
>
|
|
217
|
+
<Icon
|
|
218
|
+
iconName="BoxedPlus"
|
|
219
|
+
width={20}
|
|
220
|
+
height={20}
|
|
221
|
+
/>{" "}
|
|
222
|
+
{t("auth.signUp")}
|
|
223
|
+
</UiButton>,
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
/>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
<div className={style.title}>
|
|
230
|
+
{!selected && t("embedding.title")}
|
|
231
|
+
{selected && t("embedding.customize")}
|
|
232
|
+
</div>
|
|
233
|
+
{!selected && (
|
|
234
|
+
<>
|
|
235
|
+
<div
|
|
236
|
+
className={style.addContainer}
|
|
237
|
+
onClick={() => setSelected("addNew")}
|
|
238
|
+
>
|
|
239
|
+
<button
|
|
240
|
+
className={style.add}
|
|
241
|
+
onClick={() => setSelected("addNew")}
|
|
242
|
+
>
|
|
243
|
+
<Icon
|
|
244
|
+
iconName="addButton"
|
|
245
|
+
width={16}
|
|
246
|
+
height={16}
|
|
247
|
+
/>
|
|
248
|
+
</button>
|
|
249
|
+
<span>{t("embedding.addNew")}</span>
|
|
250
|
+
</div>
|
|
251
|
+
<Folder
|
|
252
|
+
folder={boardsList.getRootFolder()}
|
|
253
|
+
handleOpenBoard={board => setSelected(board)}
|
|
254
|
+
/>
|
|
255
|
+
<Folder
|
|
256
|
+
folder={boardsList.getSharedFolder()}
|
|
257
|
+
handleOpenBoard={board => setSelected(board)}
|
|
258
|
+
/>
|
|
259
|
+
</>
|
|
260
|
+
)}
|
|
261
|
+
{selected && selected !== "addNew" && (
|
|
262
|
+
<div className={style.selected}>
|
|
263
|
+
<span className={style.selectedIcon}>
|
|
264
|
+
<Icon
|
|
265
|
+
iconName="EmbedBoardIcon"
|
|
266
|
+
width={20}
|
|
267
|
+
height={20}
|
|
268
|
+
/>
|
|
269
|
+
</span>
|
|
270
|
+
<span>{selected.title}</span>
|
|
271
|
+
</div>
|
|
272
|
+
)}
|
|
273
|
+
{selected === "addNew" && (
|
|
274
|
+
<div className={style.search}>
|
|
275
|
+
<input
|
|
276
|
+
type="text"
|
|
277
|
+
placeholder={t("embedding.newBoardPlaceholder")}
|
|
278
|
+
ref={newBoardRef}
|
|
279
|
+
value={newBoardName}
|
|
280
|
+
onChange={event =>
|
|
281
|
+
setNewBoardName(event.target.value)
|
|
282
|
+
}
|
|
283
|
+
/>
|
|
284
|
+
</div>
|
|
285
|
+
)}
|
|
286
|
+
{selected && (
|
|
287
|
+
<>
|
|
288
|
+
{/* {selected !== "addNew" &&
|
|
289
|
+
<Selector
|
|
290
|
+
label={t("embedding.startingView")}
|
|
291
|
+
options={[
|
|
292
|
+
{
|
|
293
|
+
value: "full",
|
|
294
|
+
label: (
|
|
295
|
+
<span>
|
|
296
|
+
{t("embedding.fullBoard")}
|
|
297
|
+
</span>
|
|
298
|
+
),
|
|
299
|
+
},
|
|
300
|
+
// TODO add frames
|
|
301
|
+
]}
|
|
302
|
+
/>} */}
|
|
303
|
+
{selected === "addNew" ||
|
|
304
|
+
boardsList.getBoardInfo(selected.id) ? (
|
|
305
|
+
<div className={style.selectorsContainer}>
|
|
306
|
+
<Selector
|
|
307
|
+
ref={selectorRef}
|
|
308
|
+
label={t("embedding.allVisitors")}
|
|
309
|
+
options={[
|
|
310
|
+
{
|
|
311
|
+
value: "edit",
|
|
312
|
+
label: (
|
|
313
|
+
<div
|
|
314
|
+
className={
|
|
315
|
+
style.selectorText
|
|
316
|
+
}
|
|
317
|
+
>
|
|
318
|
+
{
|
|
319
|
+
<Icon
|
|
320
|
+
style={{
|
|
321
|
+
marginRight:
|
|
322
|
+
"10px",
|
|
323
|
+
}}
|
|
324
|
+
iconName="canEdit"
|
|
325
|
+
width={20}
|
|
326
|
+
height={20}
|
|
327
|
+
/>
|
|
328
|
+
}{" "}
|
|
329
|
+
{t("embedding.canEdit")}
|
|
330
|
+
</div>
|
|
331
|
+
),
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
value: "view",
|
|
335
|
+
label: (
|
|
336
|
+
<div
|
|
337
|
+
className={
|
|
338
|
+
style.selectorText
|
|
339
|
+
}
|
|
340
|
+
>
|
|
341
|
+
{
|
|
342
|
+
<Icon
|
|
343
|
+
style={{
|
|
344
|
+
marginRight:
|
|
345
|
+
"10px",
|
|
346
|
+
}}
|
|
347
|
+
iconName="canView"
|
|
348
|
+
width={20}
|
|
349
|
+
height={20}
|
|
350
|
+
/>
|
|
351
|
+
}{" "}
|
|
352
|
+
{t("embedding.canView")}
|
|
353
|
+
</div>
|
|
354
|
+
),
|
|
355
|
+
},
|
|
356
|
+
]}
|
|
357
|
+
/>
|
|
358
|
+
</div>
|
|
359
|
+
) : (
|
|
360
|
+
!selected.notFound && (
|
|
361
|
+
<div className={style.infoMessage}>
|
|
362
|
+
<div>
|
|
363
|
+
<Icon
|
|
364
|
+
iconName="Info"
|
|
365
|
+
width={16}
|
|
366
|
+
height={16}
|
|
367
|
+
/>
|
|
368
|
+
{t("embedding.notOwner")}
|
|
369
|
+
</div>
|
|
370
|
+
<div className={style.secondary}>
|
|
371
|
+
{t("embedding.optionsUnavailable")}
|
|
372
|
+
</div>
|
|
373
|
+
</div>
|
|
374
|
+
)
|
|
375
|
+
)}
|
|
376
|
+
{selected !== "addNew" && selected.notFound && (
|
|
377
|
+
<div
|
|
378
|
+
className={`${style.infoMessage} ${style.error}`}
|
|
379
|
+
>
|
|
380
|
+
<div>
|
|
381
|
+
<Icon
|
|
382
|
+
iconName="Info"
|
|
383
|
+
width={16}
|
|
384
|
+
height={16}
|
|
385
|
+
/>
|
|
386
|
+
{t("modalInfo.accessDenied.title")}
|
|
387
|
+
</div>
|
|
388
|
+
<div className={style.secondary}>
|
|
389
|
+
{t("modalInfo.accessDenied.description")}
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
)}
|
|
393
|
+
<div className={style.buttonContainer}>
|
|
394
|
+
<UiButton
|
|
395
|
+
className={`${style.button} ${style.primary}`}
|
|
396
|
+
onClick={handleEmbed}
|
|
397
|
+
disabled={
|
|
398
|
+
loading ||
|
|
399
|
+
(selected !== "addNew" && selected.notFound)
|
|
400
|
+
}
|
|
401
|
+
size="sm"
|
|
402
|
+
>
|
|
403
|
+
{t("embedding.embedBoardButton")}
|
|
404
|
+
</UiButton>
|
|
405
|
+
<UiButton
|
|
406
|
+
className={`${style.button} ${style.secondary}`}
|
|
407
|
+
onClick={() => setSelected(null)}
|
|
408
|
+
disabled={loading}
|
|
409
|
+
size="sm"
|
|
410
|
+
>
|
|
411
|
+
{t("embedding.back")}
|
|
412
|
+
</UiButton>
|
|
413
|
+
</div>
|
|
414
|
+
</>
|
|
415
|
+
)}
|
|
416
|
+
</div>
|
|
417
|
+
</>
|
|
418
|
+
);
|
|
419
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectBoardPage } from "./SelectBoardPage";
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { LAST_BOARD_KEY_QS } from "App/App";
|
|
2
|
+
import { useAccount } from "App/useAccount";
|
|
3
|
+
import { useBoardsList } from "App/useBoardsList";
|
|
4
|
+
import { AuthForm } from "entities/account";
|
|
5
|
+
import { Tail } from "pages/layouts/AuthLayout/Tail";
|
|
6
|
+
import { EmailIcon } from "pages/SignupPage/EmailIcon";
|
|
7
|
+
import { LockIcon } from "pages/SignupPage/LockIcon";
|
|
8
|
+
import React, { useRef, useState } from "react";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import { createSearchParams, useNavigate } from "react-router-dom";
|
|
11
|
+
import { isEmail } from "shared/lib/regex";
|
|
12
|
+
import { UiButton } from "shared/ui-lib/UiButton";
|
|
13
|
+
import { Input } from "shared/ui-lib/Input/Input";
|
|
14
|
+
import styles from "./SigninPage.module.css";
|
|
15
|
+
import {
|
|
16
|
+
ERROR_SIGNIN_NOTIFY,
|
|
17
|
+
SigninErrorNotification,
|
|
18
|
+
} from "features/Notifications";
|
|
19
|
+
import { useUiModalContext } from "shared/ui-lib/UiModal";
|
|
20
|
+
|
|
21
|
+
export const SigninPage: React.FC = (): React.ReactElement => {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
// const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
24
|
+
const [submitDisabled, setSubmitDisabled] = useState(true);
|
|
25
|
+
const [isSubmitLoading, setIsSubmitLoading] = useState(false);
|
|
26
|
+
const navigate = useNavigate();
|
|
27
|
+
const formRef = useRef<HTMLFormElement>(null);
|
|
28
|
+
const [emailError, setEmailError] = useState<string>("");
|
|
29
|
+
const [errorText, setErrorText] = useState<string>("");
|
|
30
|
+
const account = useAccount();
|
|
31
|
+
const boards = useBoardsList();
|
|
32
|
+
const { openModal } = useUiModalContext();
|
|
33
|
+
|
|
34
|
+
const onSubmit = async (
|
|
35
|
+
event: React.FormEvent<HTMLFormElement>,
|
|
36
|
+
): Promise<void> => {
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
|
|
39
|
+
const form = formRef.current;
|
|
40
|
+
const email = form?.email.value;
|
|
41
|
+
const password = form?.password.value;
|
|
42
|
+
const searchParams = createSearchParams(window.location.search);
|
|
43
|
+
|
|
44
|
+
setIsSubmitLoading(true);
|
|
45
|
+
setSubmitDisabled(true);
|
|
46
|
+
account
|
|
47
|
+
.login(email, password)
|
|
48
|
+
.then(async () => {
|
|
49
|
+
setErrorText("");
|
|
50
|
+
if (searchParams.get("backToSelect") === "true") {
|
|
51
|
+
navigate("/selectBoard");
|
|
52
|
+
} else if (localStorage.getItem(LAST_BOARD_KEY_QS)) {
|
|
53
|
+
navigate(
|
|
54
|
+
`/boards/${localStorage.getItem(LAST_BOARD_KEY_QS)}`,
|
|
55
|
+
);
|
|
56
|
+
} else {
|
|
57
|
+
const boardId = await boards.createBoard();
|
|
58
|
+
if (boardId) {
|
|
59
|
+
navigate(`/boards/${boardId}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
await account.fetchAccountInfo();
|
|
63
|
+
await account.onLogin?.();
|
|
64
|
+
})
|
|
65
|
+
.catch(error => {
|
|
66
|
+
// setErrorMessage(error.message);
|
|
67
|
+
console.log(error);
|
|
68
|
+
console.log(
|
|
69
|
+
"sign in error:",
|
|
70
|
+
error?.message === "User not activated",
|
|
71
|
+
);
|
|
72
|
+
if (error.status === 400) {
|
|
73
|
+
openModal(ERROR_SIGNIN_NOTIFY);
|
|
74
|
+
}
|
|
75
|
+
if (error?.message === "User not activated") {
|
|
76
|
+
const form = formRef.current;
|
|
77
|
+
const email = form?.email.value;
|
|
78
|
+
navigate({
|
|
79
|
+
pathname: "/auth/verify",
|
|
80
|
+
search: createSearchParams({
|
|
81
|
+
...Object.fromEntries(searchParams),
|
|
82
|
+
email: email,
|
|
83
|
+
}).toString(),
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
setErrorText(t("auth.incorrectEmailOrPassword"));
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
.finally(() => {
|
|
90
|
+
setIsSubmitLoading(false);
|
|
91
|
+
setSubmitDisabled(false);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const checkEmail = (): boolean => {
|
|
96
|
+
if (formRef.current && formRef.current.email) {
|
|
97
|
+
formRef.current.email.value = formRef.current.email.value.trim();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const email = formRef.current?.email.value;
|
|
101
|
+
if (email && !isEmail(email)) {
|
|
102
|
+
setEmailError(t("auth.enterAValidEmailAddress"));
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
setEmailError("");
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const checkForm = (): void => {
|
|
110
|
+
const form = formRef.current;
|
|
111
|
+
const email = form?.email.value;
|
|
112
|
+
const password = form?.password.value;
|
|
113
|
+
|
|
114
|
+
if (!email || !password) {
|
|
115
|
+
setErrorText("");
|
|
116
|
+
setEmailError("");
|
|
117
|
+
setSubmitDisabled(true);
|
|
118
|
+
if (email && !checkEmail()) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (!isEmail(email)) {
|
|
125
|
+
setSubmitDisabled(true);
|
|
126
|
+
setEmailError(t("auth.enterAValidEmailAddress"));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
setEmailError("");
|
|
131
|
+
setSubmitDisabled(false);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const dbCheckForm = checkForm;
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<>
|
|
138
|
+
<AuthForm
|
|
139
|
+
title={t("auth.signIn")}
|
|
140
|
+
id="signin-form"
|
|
141
|
+
onSubmit={onSubmit}
|
|
142
|
+
ref={formRef}
|
|
143
|
+
showPolicies
|
|
144
|
+
showAnotherAuthWay
|
|
145
|
+
>
|
|
146
|
+
<Input
|
|
147
|
+
id="email"
|
|
148
|
+
prefixIcon={<EmailIcon />}
|
|
149
|
+
placeholder={t("auth.emailPlaceholder")}
|
|
150
|
+
hasError={!!emailError.length}
|
|
151
|
+
errorText={emailError}
|
|
152
|
+
onBlur={checkEmail}
|
|
153
|
+
/>
|
|
154
|
+
<Input
|
|
155
|
+
id="password"
|
|
156
|
+
prefixIcon={<LockIcon />}
|
|
157
|
+
placeholder={t("auth.passwordPlaceholder")}
|
|
158
|
+
password
|
|
159
|
+
onInput={dbCheckForm}
|
|
160
|
+
errorText={errorText}
|
|
161
|
+
hasError={!!errorText}
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<div className={styles.btns}>
|
|
165
|
+
<UiButton
|
|
166
|
+
type="submit"
|
|
167
|
+
disabled={submitDisabled}
|
|
168
|
+
loading={isSubmitLoading}
|
|
169
|
+
variant="primary"
|
|
170
|
+
size="lg"
|
|
171
|
+
>
|
|
172
|
+
{t("auth.submit")}
|
|
173
|
+
<Tail />
|
|
174
|
+
</UiButton>
|
|
175
|
+
|
|
176
|
+
<UiButton
|
|
177
|
+
variant="secondary"
|
|
178
|
+
className={styles.forgot}
|
|
179
|
+
onClick={() =>
|
|
180
|
+
navigate(`/auth/forgot-password${location.search}`)
|
|
181
|
+
}
|
|
182
|
+
size="lg"
|
|
183
|
+
>
|
|
184
|
+
{t("auth.forgotPassword")}
|
|
185
|
+
</UiButton>
|
|
186
|
+
|
|
187
|
+
<UiButton
|
|
188
|
+
variant="ghost"
|
|
189
|
+
onClick={() =>
|
|
190
|
+
navigate(`/auth/sign-up${location.search}`)
|
|
191
|
+
}
|
|
192
|
+
size="lg"
|
|
193
|
+
>
|
|
194
|
+
{t("auth.signUpForFree")}
|
|
195
|
+
</UiButton>
|
|
196
|
+
</div>
|
|
197
|
+
</AuthForm>
|
|
198
|
+
<SigninErrorNotification />
|
|
199
|
+
</>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SigninPage } from "./SigninPage";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const EmailIcon: React.FC<Props> = ({ width = 20, height = 20 }) => {
|
|
9
|
+
return (
|
|
10
|
+
<svg
|
|
11
|
+
width={width}
|
|
12
|
+
height={height}
|
|
13
|
+
viewBox="0 0 20 20"
|
|
14
|
+
fill="none"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M2.49935 2.5H17.4993C17.7204 2.5 17.9323 2.5878 18.0886 2.74408C18.2449 2.90036 18.3327 3.11232 18.3327 3.33333V16.6667C18.3327 16.8877 18.2449 17.0996 18.0886 17.2559C17.9323 17.4122 17.7204 17.5 17.4993 17.5H2.49935C2.27834 17.5 2.06637 17.4122 1.91009 17.2559C1.75381 17.0996 1.66602 16.8877 1.66602 16.6667V3.33333C1.66602 3.11232 1.75381 2.90036 1.91009 2.74408C2.06637 2.5878 2.27834 2.5 2.49935 2.5V2.5ZM16.666 6.03167L10.0593 11.9483L3.33268 6.01333V15.8333H16.666V6.03167ZM3.75852 4.16667L10.0502 9.71833L16.251 4.16667H3.75852Z"
|
|
19
|
+
fill="#0D1126"
|
|
20
|
+
fillOpacity="0.4"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const LockIcon: React.FC<Props> = ({ width = 20, height = 20 }) => {
|
|
9
|
+
return (
|
|
10
|
+
<svg
|
|
11
|
+
width={width}
|
|
12
|
+
height={height}
|
|
13
|
+
viewBox="0 0 20 20"
|
|
14
|
+
fill="none"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M15 6.66634H16.6667C16.8877 6.66634 17.0996 6.75414 17.2559 6.91042C17.4122 7.0667 17.5 7.27866 17.5 7.49967V17.4997C17.5 17.7207 17.4122 17.9327 17.2559 18.0889C17.0996 18.2452 16.8877 18.333 16.6667 18.333H3.33333C3.11232 18.333 2.90036 18.2452 2.74408 18.0889C2.5878 17.9327 2.5 17.7207 2.5 17.4997V7.49967C2.5 7.27866 2.5878 7.0667 2.74408 6.91042C2.90036 6.75414 3.11232 6.66634 3.33333 6.66634H5V5.83301C5 4.50693 5.52678 3.23516 6.46447 2.29747C7.40215 1.35979 8.67392 0.833008 10 0.833008C11.3261 0.833008 12.5979 1.35979 13.5355 2.29747C14.4732 3.23516 15 4.50693 15 5.83301V6.66634ZM4.16667 8.33301V16.6663H15.8333V8.33301H4.16667ZM9.16667 11.6663H10.8333V13.333H9.16667V11.6663ZM5.83333 11.6663H7.5V13.333H5.83333V11.6663ZM12.5 11.6663H14.1667V13.333H12.5V11.6663ZM13.3333 6.66634V5.83301C13.3333 4.94895 12.9821 4.10111 12.357 3.47598C11.7319 2.85086 10.8841 2.49967 10 2.49967C9.11594 2.49967 8.2681 2.85086 7.64298 3.47598C7.01786 4.10111 6.66667 4.94895 6.66667 5.83301V6.66634H13.3333Z"
|
|
19
|
+
fill="#0D1126"
|
|
20
|
+
fillOpacity="0.4"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
};
|