@layers-app/shared 0.1.5 → 0.2.0
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/dist/assets/enitityIcons/flow.svg.js +5 -0
- package/dist/assets/enitityIcons/form.svg.js +5 -0
- package/dist/assets/enitityIcons/index.d.ts +5 -0
- package/dist/assets/enitityIcons/page.svg.js +5 -0
- package/dist/assets/enitityIcons/sprint.svg.js +5 -0
- package/dist/assets/fileTypes/archieve.svg.js +4 -0
- package/dist/assets/fileTypes/archives.svg.js +5 -0
- package/dist/assets/fileTypes/audio.svg.js +5 -0
- package/dist/assets/fileTypes/code.svg.js +5 -0
- package/dist/assets/fileTypes/diagram.svg.js +4 -0
- package/dist/assets/fileTypes/documents.svg.js +4 -0
- package/dist/assets/fileTypes/documentsStorage.svg.js +5 -0
- package/dist/assets/fileTypes/docx.svg.js +4 -0
- package/dist/assets/fileTypes/folder.svg.js +4 -0
- package/dist/assets/fileTypes/images.svg.js +5 -0
- package/dist/assets/fileTypes/media.svg.js +4 -0
- package/dist/assets/fileTypes/other.svg.js +4 -0
- package/dist/assets/fileTypes/other.svg2.js +5 -0
- package/dist/assets/fileTypes/pptx.svg.js +4 -0
- package/dist/assets/fileTypes/presentation.svg.js +4 -0
- package/dist/assets/fileTypes/sheet.svg.js +4 -0
- package/dist/assets/fileTypes/videos.svg.js +5 -0
- package/dist/assets/fileTypes/xlsx.svg.js +4 -0
- package/dist/assets/images/flags/es.svg.js +4 -0
- package/dist/assets/images/flags/ru.svg.js +4 -0
- package/dist/assets/images/flags/us.svg.js +4 -0
- package/dist/assets/images/person.png.js +4 -0
- package/dist/assets/images/person2.png.js +4 -0
- package/dist/assets/images/person3.png.js +4 -0
- package/dist/assets/images/person4.png.js +4 -0
- package/dist/assets/jsons/emoji-categorized.json.js +4 -0
- package/dist/assets/jsons/icons.min.json.d.ts +1 -1
- package/dist/assets/jsons/icons.min.json.js +4 -0
- package/dist/assets/layers-logo-full.svg.js +5 -0
- package/dist/assets/layers-logo-icon.svg.js +5 -0
- package/dist/assets/logo-copyright.svg.js +5 -0
- package/dist/assets/svg/alertMan.svg.js +7 -0
- package/dist/assets/svg/default_icon.svg.js +4 -0
- package/dist/assets/svg/discord-icon.svg.js +5 -0
- package/dist/assets/svg/discord.svg.js +5 -0
- package/dist/assets/svg/dog.svg.js +5 -0
- package/dist/assets/svg/layers-logo-full.svg.js +4 -0
- package/dist/assets/svg/noData/404.svg.js +9 -0
- package/dist/assets/svg/noData/500.svg.js +5 -0
- package/dist/assets/svg/noData/empty.svg.js +5 -0
- package/dist/assets/svg/noData/folder.svg.js +5 -0
- package/dist/assets/svg/noData/noAccess.svg.js +7 -0
- package/dist/assets/svg/noData/noAnswers.svg.js +5 -0
- package/dist/assets/svg/noData/noCloud.svg.js +5 -0
- package/dist/assets/svg/noData/noComments.svg.js +5 -0
- package/dist/assets/svg/noData/noData.svg.js +5 -0
- package/dist/assets/svg/noData/noFlows.svg.js +5 -0
- package/dist/assets/svg/noData/noForms.svg.js +5 -0
- package/dist/assets/svg/noData/noGroups.svg.js +17 -0
- package/dist/assets/svg/noData/noImage.svg.js +5 -0
- package/dist/assets/svg/noData/noMembers.svg.js +7 -0
- package/dist/assets/svg/noData/noNotifications.svg.js +5 -0
- package/dist/assets/svg/noData/noResults.svg.js +5 -0
- package/dist/assets/svg/noData/noSearchResults.svg.js +5 -0
- package/dist/assets/svg/noData/noTaskResults.svg.js +5 -0
- package/dist/assets/svg/noData/noTasks.svg.js +5 -0
- package/dist/assets/svg/noData/noWorkspaces.svg.js +7 -0
- package/dist/assets/svg/noData/trash.svg.js +7 -0
- package/dist/assets/svg/notSuccessMan.svg.js +7 -0
- package/dist/assets/svg/successMan.svg.js +5 -0
- package/dist/assets/svg/telegram-icon.svg.js +5 -0
- package/dist/assets/svg/telegram.svg.js +5 -0
- package/dist/components/AlertsBlock/index.js +53 -0
- package/dist/components/AnimationWrapper/index.js +15 -0
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.js +56 -0
- package/dist/components/AppContainer/AppContainer.module.css.js +15 -0
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +44 -0
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +52 -0
- package/dist/components/AppContainer/components/AppsSidebar/AppsSidebar.d.ts +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSidebar.js +16 -0
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +67 -0
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -0
- package/dist/components/AppContainer/{Header.d.ts → components/Header.d.ts} +1 -1
- package/dist/components/AppContainer/components/Header.js +9 -0
- package/dist/components/AppContainer/components/Main.js +18 -0
- package/dist/components/AppContainer/components/NavbarContent.js +6 -0
- package/dist/components/AppContainer/components/RightSidebar.js +30 -0
- package/dist/components/AppContainer/components/SidebarToggleButton.js +27 -0
- package/dist/components/AppContainer/components/SlideAnimation.js +43 -0
- package/dist/components/AppContainer/components/ToolSidebar.d.ts +6 -2
- package/dist/components/AppContainer/components/ToolSidebar.js +84 -0
- package/dist/components/AppContainer/components/ToolbarNewButton.js +28 -0
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +122 -0
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +9 -0
- package/dist/components/AppContainer/components/menus/HelpMenu/WhatsNew.js +58 -0
- package/dist/components/AppContainer/components/menus/MoreMenu.js +42 -0
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -1
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.js +44 -0
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +60 -0
- package/dist/components/AppContainer/hooks/useAppContainerActionsStore.js +10 -0
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +37 -0
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +2 -3
- package/dist/components/AppContainer/hooks/useAppContainerStore.js +62 -0
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +2 -0
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +10 -0
- package/dist/components/AppContainer/types.d.ts +8 -4
- package/dist/components/AppShell/AppShell.js +18 -0
- package/dist/components/AppShell/AppShell.module.css.js +19 -0
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.d.ts +4 -2
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryContext.js +39 -0
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.js +127 -0
- package/dist/components/AttachmentsGalleryModal/components/ErrorSection.js +14 -0
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +69 -0
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +13 -0
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +123 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +4 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +41 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +7 -0
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +54 -0
- package/dist/components/AttachmentsGalleryModal/constants.d.ts +2 -1
- package/dist/components/AttachmentsGalleryModal/constants.js +21 -0
- package/dist/components/AttachmentsGalleryModal/helpers.d.ts +22 -0
- package/dist/components/AttachmentsGalleryModal/helpers.js +40 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.js +35 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useEmblaCarousel.js +49 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +28 -0
- package/dist/components/AttachmentsGalleryModal/hooks/usePanning.d.ts +10 -0
- package/dist/components/AttachmentsGalleryModal/hooks/usePanning.js +61 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useZoomReset.js +16 -0
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +29 -0
- package/dist/components/BottomDrawerWithoutHeader/index.js +75 -0
- package/dist/components/BouncingLogo/BouncingLogo.js +22 -0
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +9 -0
- package/dist/components/CircleColorPicker/CircleColorPicker.js +72 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +131 -0
- package/dist/components/ColorPicker/ColorPickerPopover.js +42 -0
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +61 -0
- package/dist/components/CommentComposer/index.d.ts +2 -1
- package/dist/components/CommentComposer/index.js +288 -0
- package/dist/components/CommentFilterMenu/index.js +92 -0
- package/dist/components/CommentsPanel/CommentsPanel.module.css.js +109 -0
- package/dist/components/CommentsPanel/components/CommentActionMenu.js +49 -0
- package/dist/components/CommentsPanel/components/CommentActions.js +151 -0
- package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +2 -1
- package/dist/components/CommentsPanel/components/CommentPanelListItem.js +366 -0
- package/dist/components/CommentsPanel/components/CommentTabFilter.js +53 -0
- package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.js +17 -0
- package/dist/components/CommentsPanel/components/CommentsFilterHeader.js +83 -0
- package/dist/components/CommentsPanel/components/CommentsListItemMenu.js +63 -0
- package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +2 -1
- package/dist/components/CommentsPanel/components/CommentsPanelList.js +74 -0
- package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.js +108 -0
- package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.js +142 -0
- package/dist/components/CommentsPanel/components/Icon.js +29 -0
- package/dist/components/CommentsPanel/index.d.ts +2 -1
- package/dist/components/CommentsPanel/index.js +137 -0
- package/dist/components/CommentsPanel/store.js +32 -0
- package/dist/components/CommentsPanel/types.d.ts +5 -5
- package/dist/components/CommentsPanel/utils.js +189 -0
- package/dist/components/CommunitiesDialog/index.js +149 -0
- package/dist/components/CommunitiesDialog/styles.module.css.js +7 -0
- package/dist/components/Copyright/Copyright.module.css.js +7 -0
- package/dist/components/Copyright/index.d.ts +1 -2
- package/dist/components/Copyright/index.js +32 -0
- package/dist/components/CustomKBD/CustomKBD.module.css.js +7 -0
- package/dist/components/CustomKBD/index.js +40 -0
- package/dist/components/EmojiPicker/EmojiPanel.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +273 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -0
- package/dist/components/EmojiPicker/EmojiPicker.js +222 -0
- package/dist/components/EmojiPicker/EmojiPicker.module.css.js +13 -0
- package/dist/components/EmojiPicker/IconsPanel.js +267 -0
- package/dist/components/EmojiPicker/constants.js +36 -0
- package/dist/components/EmojiPicker/custom-icons/StatusCancel.js +37 -0
- package/dist/components/EmojiPicker/custom-icons/StatusDone.js +29 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress00.js +17 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress10.js +20 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress100.js +20 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress20.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress30.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress40.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress50.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress60.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress70.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress80.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/StatusProgress90.js +26 -0
- package/dist/components/EmojiPicker/custom-icons/customIcons.js +99 -0
- package/dist/components/EmojiPicker/getIconsList.d.ts +11 -0
- package/dist/components/EmojiPicker/getIconsList.js +32 -0
- package/dist/components/EmojiPicker/getRandomIcon.d.ts +1 -0
- package/dist/components/EmojiPicker/getRandomIcon.js +10 -0
- package/dist/components/EntityIcon.d.ts +2 -0
- package/dist/components/EntityIcon.js +95 -0
- package/dist/components/EntityTitle/EntityTitle.js +86 -0
- package/dist/components/EntityTitle/EntityTitle.module.css.js +9 -0
- package/dist/components/ErrorAlert/index.js +20 -0
- package/dist/components/ErrorPage/components/Error403.js +51 -0
- package/dist/components/ErrorPage/components/Error404.js +5 -0
- package/dist/components/ErrorPage/components/Error406.js +47 -0
- package/dist/components/ErrorPage/components/Error500.js +58 -0
- package/dist/components/ErrorPage/components/ErrorUndefined.js +44 -0
- package/dist/components/ErrorPage/index.js +25 -0
- package/dist/components/FilePicker/FilePicker.js +242 -0
- package/dist/components/FilePicker/FilePicker.module.css.js +13 -0
- package/dist/components/FilePicker/FilePickerGallery.js +38 -0
- package/dist/components/FilePicker/FilePickerGiphy.js +91 -0
- package/dist/components/FilePicker/FilePickerLink.js +48 -0
- package/dist/components/FilePicker/FilePickerSkeletonLoader.js +9 -0
- package/dist/components/FilePicker/FilePickerUnsplash.js +95 -0
- package/dist/components/FilePicker/FilePickerUpload.js +86 -0
- package/dist/components/FilePicker/api/giphyApi.js +26 -0
- package/dist/components/FilePicker/api/unsplashApi.js +29 -0
- package/dist/components/FilePicker/types.d.ts +1 -0
- package/dist/components/FormViewer/FormViewer.js +42 -0
- package/dist/components/FormViewer/FormViewer.module.css.js +37 -0
- package/dist/components/FormViewer/components/AllSlidesLayout.js +24 -0
- package/dist/components/FormViewer/components/Container.js +27 -0
- package/dist/components/FormViewer/components/ListFocusBox.js +22 -0
- package/dist/components/FormViewer/components/NavControls.js +58 -0
- package/dist/components/FormViewer/components/Navigation/Navigation.js +37 -0
- package/dist/components/FormViewer/components/OneSlideLayput.js +133 -0
- package/dist/components/FormViewer/components/Step.js +225 -0
- package/dist/components/FormViewer/components/StepDescription.js +73 -0
- package/dist/components/FormViewer/components/StepTitle.js +118 -0
- package/dist/components/FormViewer/components/fields/AddOptionButton.js +24 -0
- package/dist/components/FormViewer/components/fields/ButtonField/ButtonField.js +63 -0
- package/dist/components/FormViewer/components/fields/ButtonField/InnerButton.js +70 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceCard.js +35 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/ChoiceField.js +135 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +37 -0
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +93 -0
- package/dist/components/FormViewer/components/fields/ConfirmButton.js +49 -0
- package/dist/components/FormViewer/components/fields/ConfirmField.js +21 -0
- package/dist/components/FormViewer/components/fields/DateField.js +31 -0
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.js +81 -0
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +7 -0
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.js +117 -0
- package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +7 -0
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.js +70 -0
- package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +7 -0
- package/dist/components/FormViewer/components/fields/EmailField.js +26 -0
- package/dist/components/FormViewer/components/fields/LocationField.js +27 -0
- package/dist/components/FormViewer/components/fields/LongTextField.js +48 -0
- package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceCard.js +38 -0
- package/dist/components/FormViewer/components/fields/MultipleChoice/MultipleChoiceField.js +152 -0
- package/dist/components/FormViewer/components/fields/NumberField.js +28 -0
- package/dist/components/FormViewer/components/fields/PhoneField.js +24 -0
- package/dist/components/FormViewer/components/fields/ProgressLine.js +30 -0
- package/dist/components/FormViewer/components/fields/RatingField.js +33 -0
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +154 -0
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.js +110 -0
- package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +15 -0
- package/dist/components/FormViewer/components/fields/SliderField.js +31 -0
- package/dist/components/FormViewer/components/fields/StartButton.js +34 -0
- package/dist/components/FormViewer/components/fields/StartField.js +21 -0
- package/dist/components/FormViewer/components/fields/TextField.js +31 -0
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +155 -0
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.js +62 -0
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +7 -0
- package/dist/components/FormViewer/components/fields/YesNoField.js +37 -0
- package/dist/components/FormViewer/constants/defaultTheme.js +41 -0
- package/dist/components/FormViewer/helpers/conditions.d.ts +1 -1
- package/dist/components/FormViewer/helpers/conditions.js +43 -0
- package/dist/components/FormViewer/helpers/controls.js +79 -0
- package/dist/components/FormViewer/helpers/cssScoping.js +10 -0
- package/dist/components/FormViewer/helpers/helpers.d.ts +1 -1
- package/dist/components/FormViewer/helpers/helpers.js +9 -0
- package/dist/components/FormViewer/helpers/slides.js +35 -0
- package/dist/components/FormViewer/helpers/staticClasses.js +48 -0
- package/dist/components/FormViewer/helpers/steps.d.ts +1 -1
- package/dist/components/FormViewer/helpers/steps.js +55 -0
- package/dist/components/FormViewer/helpers/themeUtils.js +8 -0
- package/dist/components/FormViewer/helpers/validation.js +87 -0
- package/dist/components/FormViewer/hooks/useActiveControl.js +9 -0
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useActiveStep.js +9 -0
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +78 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +132 -0
- package/dist/components/FormViewer/hooks/useFormMobile.js +15 -0
- package/dist/components/FormViewer/hooks/useInterpolateText.js +57 -0
- package/dist/components/FormViewer/store/formStore.d.ts +6 -6
- package/dist/components/FormViewer/store/formStore.js +84 -0
- package/dist/components/FormViewer/store/formStoreApi.d.ts +3 -3
- package/dist/components/FormViewer/store/formStoreApi.js +383 -0
- package/dist/components/FormViewer/store/selectors.d.ts +342 -342
- package/dist/components/FormViewer/store/selectors.js +98 -0
- package/dist/components/FormViewer/types/form.js +40 -0
- package/dist/components/FormViewer/types/schemes.d.ts +22 -22
- package/dist/components/FormViewer/types/schemes.js +314 -0
- package/dist/components/ImageModal/ImageModal.js +165 -0
- package/dist/components/LanguagePicker/LanguagePicker.js +41 -0
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +7 -0
- package/dist/components/Loaders/BaseLoader.js +8 -0
- package/dist/components/Loaders/styles.module.css.js +9 -0
- package/dist/components/Logotype.js +40 -0
- package/dist/components/NavMenu/NavMenu.d.ts +4 -2
- package/dist/components/NavMenu/NavMenu.js +98 -0
- package/dist/components/NavMenu/NavMenu.module.css.js +23 -0
- package/dist/components/NavMenu/components/DnDItem.js +44 -0
- package/dist/components/NavMenu/components/DnDProvider.js +64 -0
- package/dist/components/NavMenu/components/DraggableOverlay.js +18 -0
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +27 -0
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +5 -0
- package/dist/components/NavMenu/components/NavMenuItem.js +179 -0
- package/dist/components/NavMenu/components/NavMenuLabel.js +18 -0
- package/dist/components/NavMenu/store.d.ts +12 -2
- package/dist/components/NavMenu/store.js +61 -0
- package/dist/components/NavMenu/types.d.ts +10 -3
- package/dist/components/NavbarResizer/NavbarResizer.js +42 -0
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +7 -0
- package/dist/components/NewColorPicker/components/Pallete.js +46 -0
- package/dist/components/NewColorPicker/components/Target.js +47 -0
- package/dist/components/NewColorPicker/index.js +92 -0
- package/dist/components/NoData/NoData.js +103 -0
- package/dist/components/NoData/NoData.module.css.js +7 -0
- package/dist/components/NotFound/NoFound.js +65 -0
- package/dist/components/NotPublicPanel/NotPublicPanel.js +53 -0
- package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +19 -0
- package/dist/components/Notification/Notification.js +117 -0
- package/dist/components/Notification/Notification.module.css.js +7 -0
- package/dist/components/Notification/NotificationCard.js +92 -0
- package/dist/components/OnBoarding/OnBoardingPage.js +80 -0
- package/dist/components/OnBoarding/ProjectBoard.js +141 -0
- package/dist/components/OnBoarding/StepsNavBar.js +21 -0
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +42 -0
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +51 -0
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +45 -0
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +42 -0
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusBadge.js +22 -0
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +217 -0
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.js +16 -0
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +56 -0
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +272 -0
- package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +9 -0
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +86 -0
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.js +26 -0
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +61 -0
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +42 -0
- package/dist/components/OnBoarding/steps/StartedStep.js +71 -0
- package/dist/components/OnBoarding/steps/Wrapper.js +49 -0
- package/dist/components/OnBoarding/steps/styles.module.css.js +17 -0
- package/dist/components/OnBoarding/styles.module.css.js +15 -0
- package/dist/components/PaymentCancel/PaymentCancel.js +41 -0
- package/dist/components/PaymentError/PaymentError.js +41 -0
- package/dist/components/PaymentSuccess/PaymentSuccess.js +41 -0
- package/dist/components/PinModal/PinModal.js +90 -0
- package/dist/components/PinModal/slice.js +28 -0
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +1 -0
- package/dist/components/ProjectIcon/ProjectIcon.js +88 -0
- package/dist/components/SearchFilters/SearchFilters.js +37 -0
- package/dist/components/SearchFilters/SearchFilters.module.css.js +9 -0
- package/dist/components/SearchFilters/components/DateFilter.js +199 -0
- package/dist/components/SearchFilters/components/SearchHelp.js +121 -0
- package/dist/components/SearchFilters/components/Sort.js +99 -0
- package/dist/components/SearchFilters/components/Type.js +124 -0
- package/dist/components/SortableList/SortableList.js +44 -0
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +82 -0
- package/dist/components/StorageUsageEntityList/StorageEntityItem.js +62 -0
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +27 -0
- package/dist/components/StorageUsageProgress/index.js +52 -0
- package/dist/components/SubmitModal/index.js +12 -0
- package/dist/components/ThemeIndicator/index.js +21 -0
- package/dist/components/UserAvatar/index.d.ts +3 -2
- package/dist/components/UserAvatar/index.js +22 -0
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +22 -0
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +41 -0
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +211 -0
- package/dist/components/modals/RemoveConfirmModal.d.ts +8 -1
- package/dist/components/modals/RemoveConfirmModal.js +68 -0
- package/dist/components/table/FrontTable.js +21 -0
- package/dist/components/table/api.js +248 -0
- package/dist/components/table/components/Table.js +139 -0
- package/dist/components/table/components/TableAggregation.js +31 -0
- package/dist/components/table/components/TableCell.js +55 -0
- package/dist/components/table/components/TableHeaderCell.js +159 -0
- package/dist/components/table/components/TableHeaders.js +99 -0
- package/dist/components/table/components/TableMenu.js +59 -0
- package/dist/components/table/components/TablePagination.js +52 -0
- package/dist/components/table/components/TablePanel.js +26 -0
- package/dist/components/table/components/TableRow.js +85 -0
- package/dist/components/table/components/TableRows.js +66 -0
- package/dist/components/table/components/TableSearch.js +32 -0
- package/dist/components/table/components/TableSkeleton.js +60 -0
- package/dist/components/table/components/TableTitle.js +26 -0
- package/dist/components/table/constants.js +28 -0
- package/dist/components/table/export.js +58 -0
- package/dist/components/table/helpers/columns.js +198 -0
- package/dist/components/table/helpers/formatters.js +65 -0
- package/dist/components/table/hooks/TableProvider.js +62 -0
- package/dist/components/table/hooks/useColumnsResizing.js +51 -0
- package/dist/components/table/hooks/useCreateTable.js +9 -0
- package/dist/components/table/hooks/useSaveRowCount.js +9 -0
- package/dist/components/table/hooks/useSorting.js +36 -0
- package/dist/components/table/hooks/useTableStore.js +6 -0
- package/dist/components/table/selectors.js +203 -0
- package/dist/components/table/store.js +65 -0
- package/dist/components/table/types.js +17 -0
- package/dist/constants.js +19 -0
- package/dist/helpers/combineStatuses.js +5 -0
- package/dist/helpers/dates.js +15 -0
- package/dist/helpers/download.js +17 -0
- package/dist/helpers/feature.js +7 -0
- package/dist/helpers/fileUtils.js +33 -0
- package/dist/helpers/filterHierarchyByTypes.js +13 -0
- package/dist/helpers/formatBytes.js +8 -0
- package/dist/helpers/generateLink.js +9 -0
- package/dist/helpers/getFileIcons.js +42 -0
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.js +40 -0
- package/dist/helpers/getPartOfTheDay.js +12 -0
- package/dist/helpers/getRandomIconColor.js +17 -0
- package/dist/helpers/hotjar.d.ts +9 -0
- package/dist/helpers/hotjar.js +19 -0
- package/dist/helpers/isAppMode.js +4 -0
- package/dist/helpers/pickRandomEmoji.d.ts +1 -0
- package/dist/helpers/pickRandomEmoji.js +12 -0
- package/dist/helpers/showNotifications.js +72 -0
- package/dist/helpers/themeUtils.js +5 -0
- package/dist/helpers/validation.js +38 -0
- package/dist/hooks/useAsyncStatus.d.ts +8 -0
- package/dist/hooks/useAsyncStatus.js +26 -0
- package/dist/hooks/useDateFnsLocale.js +13 -0
- package/dist/hooks/useDateUtils.js +33 -0
- package/dist/hooks/useDisableWindowScroll.js +24 -0
- package/dist/hooks/useEvent.js +12 -0
- package/dist/hooks/useFormatDistance.js +17 -0
- package/dist/hooks/useMenu.js +9 -0
- package/dist/hooks/useNumberQueryParam.js +14 -0
- package/dist/hooks/useOAuthErrorParams.js +16 -0
- package/dist/hooks/useOutsideClick.js +21 -0
- package/dist/hooks/useSwipeDetect.js +21 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +70 -76
- package/dist/index.js +397 -259
- package/dist/lang/locales/ui_en.json.d.ts +6 -5
- package/dist/lang/locales/ui_en.json.js +19 -0
- package/dist/lang/locales/ui_es.json.d.ts +2 -1
- package/dist/lang/locales/ui_es.json.js +19 -0
- package/dist/lang/locales/ui_ru.json.d.ts +2 -1
- package/dist/lang/locales/ui_ru.json.js +19 -0
- package/dist/store/accessOptionsControl.js +10 -0
- package/dist/store/discordDialogStore.js +14 -0
- package/dist/store/onboarding.js +53 -0
- package/dist/store/plansModal.js +13 -0
- package/dist/store/searchModal.js +13 -0
- package/dist/store/timezoneStore.js +19 -0
- package/dist/store/workspacesOrder.js +17 -0
- package/dist/utils/formatStorage.js +8 -0
- package/dist/utils/getPlanBadgeColor.js +17 -0
- package/dist/utils/queryParams.js +15 -0
- package/docs/README.md +486 -0
- package/package.json +32 -11
- package/dist/KanbanLayout-BnHAvyHl.js +0 -297
- package/dist/components/AppContainer/hooks/useHideHeader.d.ts +0 -1
- package/dist/components/AppContainer/hooks/useHideSidebar.d.ts +0 -1
- package/dist/components/AppTour/AppTour.d.ts +0 -7
- package/dist/components/AppTour/FinishModal.d.ts +0 -1
- package/dist/components/AppTour/HelloModal.d.ts +0 -1
- package/dist/components/AppTour/hooks/useAppTour.d.ts +0 -2
- package/dist/components/AppTour/index.d.ts +0 -4
- package/dist/components/AppTour/types.d.ts +0 -17
- package/dist/emoji-categorized-CRsMUQyD.js +0 -4
- package/dist/helpers/pickRandomIcon.d.ts +0 -1
- package/dist/helpers/token.d.ts +0 -3
- package/dist/icons.min-wo13YUY4.js +0 -4
- package/dist/index-BawytWAK.js +0 -96715
- package/dist/index.umd.cjs +0 -356
- /package/dist/components/AppContainer/{Main.d.ts → components/Main.d.ts} +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as h, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as E, useState as u, useEffect as H } from "react";
|
|
3
|
+
import { useTranslation as S } from "react-i18next";
|
|
4
|
+
import { useMantineTheme as k, useMantineColorScheme as M, parseThemeColor as b, Menu as m, ActionIcon as V, ColorSwatch as j, Stack as w, ColorPicker as D, DEFAULT_THEME as y, TextInput as z, isColorValid as A, Button as F } from "@mantine/core";
|
|
5
|
+
const d = (e, t) => e ? e === "var(--mantine-color-bright)" ? t === "dark" ? "#ffffff" : "#000000" : e : null, L = ({
|
|
6
|
+
value: e,
|
|
7
|
+
onChange: t,
|
|
8
|
+
menuProps: p,
|
|
9
|
+
colorPickerProps: x
|
|
10
|
+
}) => {
|
|
11
|
+
const { t: s } = S("common"), f = k(), { colorScheme: n } = M(), a = E(() => {
|
|
12
|
+
const r = d(e, n);
|
|
13
|
+
return b({ color: r, theme: f });
|
|
14
|
+
}, [e, f, n]), [C, i] = u(a.value), [g, l] = u(null);
|
|
15
|
+
H(() => {
|
|
16
|
+
i(d(e, n) || "");
|
|
17
|
+
}, [n, e]);
|
|
18
|
+
const [T, v] = u(!1);
|
|
19
|
+
return /* @__PURE__ */ h(
|
|
20
|
+
m,
|
|
21
|
+
{
|
|
22
|
+
opened: T,
|
|
23
|
+
floatingStrategy: "fixed",
|
|
24
|
+
onChange: v,
|
|
25
|
+
...p,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ o(m.Target, { children: /* @__PURE__ */ o(V, { size: "md", variant: "subtle", radius: "xl", children: /* @__PURE__ */ o(j, { color: a.value || "transparent" }) }) }),
|
|
28
|
+
/* @__PURE__ */ o(m.Dropdown, { style: { padding: 8, minWidth: 220 }, children: /* @__PURE__ */ h(w, { gap: "sm", children: [
|
|
29
|
+
/* @__PURE__ */ o(
|
|
30
|
+
D,
|
|
31
|
+
{
|
|
32
|
+
value: a.value,
|
|
33
|
+
onChange: (r) => {
|
|
34
|
+
t(r), i(r), l(null);
|
|
35
|
+
},
|
|
36
|
+
format: "hex",
|
|
37
|
+
swatches: Object.values(y.colors).map((r) => r[5]),
|
|
38
|
+
...x
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
|
+
z,
|
|
43
|
+
{
|
|
44
|
+
label: s("HEXValue"),
|
|
45
|
+
onChange: (r) => {
|
|
46
|
+
const c = r.currentTarget.value;
|
|
47
|
+
i(c), A(c) ? (t(c), l(null)) : l(s("invalidColorFormat"));
|
|
48
|
+
},
|
|
49
|
+
error: g,
|
|
50
|
+
value: C
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ o(
|
|
54
|
+
F,
|
|
55
|
+
{
|
|
56
|
+
variant: "light",
|
|
57
|
+
size: "xs",
|
|
58
|
+
onClick: () => {
|
|
59
|
+
t(null), l(null);
|
|
60
|
+
},
|
|
61
|
+
mt: "xs",
|
|
62
|
+
children: s("resetColor")
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
L as CircleColorPicker
|
|
72
|
+
};
|
|
@@ -12,6 +12,7 @@ export declare const ColorPicker: import('react').ForwardRefExoticComponent<{
|
|
|
12
12
|
colors?: string[];
|
|
13
13
|
swatchShape?: "circle" | "square";
|
|
14
14
|
fullWidth?: boolean;
|
|
15
|
+
swatchSize?: number;
|
|
15
16
|
} & Omit<FlexProps, "onChange"> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
16
17
|
ColorCircle: import('react').ForwardRefExoticComponent<ColorCircleProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
18
|
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useState as p } from "react";
|
|
3
|
+
import { useMantineTheme as C, Flex as a, Tooltip as L, ColorSwatch as P, getThemeColor as u, parseThemeColor as j, ColorInput as z, ActionIcon as h } from "@mantine/core";
|
|
4
|
+
import { IconPalette as A, IconPencil as E } from "@tabler/icons-react";
|
|
5
|
+
import R from "styled-components";
|
|
6
|
+
import { DEFAULT_VALUES as c } from "../../constants.js";
|
|
7
|
+
const T = f(
|
|
8
|
+
({
|
|
9
|
+
value: e,
|
|
10
|
+
onChange: t,
|
|
11
|
+
allowCustomColor: i,
|
|
12
|
+
colors: l,
|
|
13
|
+
swatchShape: s = "circle",
|
|
14
|
+
fullWidth: n = !1,
|
|
15
|
+
swatchSize: b = 30,
|
|
16
|
+
...g
|
|
17
|
+
}, w) => {
|
|
18
|
+
const y = C(), S = j({
|
|
19
|
+
color: e || c.COLORS[0],
|
|
20
|
+
theme: y
|
|
21
|
+
}), [O, k] = p(S.value), [v, m] = p(!1);
|
|
22
|
+
return v ? /* @__PURE__ */ d(a, { align: "center", mih: 30, children: [
|
|
23
|
+
/* @__PURE__ */ r(
|
|
24
|
+
z,
|
|
25
|
+
{
|
|
26
|
+
w: "100%",
|
|
27
|
+
popoverProps: {
|
|
28
|
+
withinPortal: !1,
|
|
29
|
+
keepMounted: !1
|
|
30
|
+
},
|
|
31
|
+
maxLength: 7,
|
|
32
|
+
withEyeDropper: !1,
|
|
33
|
+
size: "xs",
|
|
34
|
+
value: O,
|
|
35
|
+
onChange: k,
|
|
36
|
+
onChangeEnd: t,
|
|
37
|
+
placeholder: "Select custom color"
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ r(
|
|
41
|
+
h,
|
|
42
|
+
{
|
|
43
|
+
radius: "xl",
|
|
44
|
+
variant: "default",
|
|
45
|
+
color: "gray",
|
|
46
|
+
onClick: () => m(!1),
|
|
47
|
+
children: /* @__PURE__ */ r(A, { size: 16 })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] }, 1) : /* @__PURE__ */ d(
|
|
51
|
+
a,
|
|
52
|
+
{
|
|
53
|
+
ref: w,
|
|
54
|
+
...g,
|
|
55
|
+
justify: n ? "space-between" : "flex-start",
|
|
56
|
+
align: "center",
|
|
57
|
+
mih: 32,
|
|
58
|
+
children: [
|
|
59
|
+
(l || c.COLORS).map((o) => {
|
|
60
|
+
const I = o === e || !e && o === c.COLORS[0];
|
|
61
|
+
return /* @__PURE__ */ r(
|
|
62
|
+
D,
|
|
63
|
+
{
|
|
64
|
+
value: o,
|
|
65
|
+
isActive: I,
|
|
66
|
+
size: b - 4,
|
|
67
|
+
swatchShape: s,
|
|
68
|
+
onClick: () => t?.(o)
|
|
69
|
+
},
|
|
70
|
+
o
|
|
71
|
+
);
|
|
72
|
+
}),
|
|
73
|
+
i && /* @__PURE__ */ r(
|
|
74
|
+
h,
|
|
75
|
+
{
|
|
76
|
+
radius: "xl",
|
|
77
|
+
variant: "default",
|
|
78
|
+
color: "gray",
|
|
79
|
+
onClick: () => m(!0),
|
|
80
|
+
children: /* @__PURE__ */ r(E, { size: 16 })
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
2
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
), x = f(
|
|
89
|
+
({ value: e, isActive: t, swatchShape: i, ...l }, s) => {
|
|
90
|
+
const n = C();
|
|
91
|
+
return /* @__PURE__ */ r(a, { miw: 32, justify: "center", align: "center", children: /* @__PURE__ */ r(L, { label: e || "", withArrow: !0, children: /* @__PURE__ */ r(
|
|
92
|
+
P,
|
|
93
|
+
{
|
|
94
|
+
ref: s,
|
|
95
|
+
color: e ? u(e, n) : "",
|
|
96
|
+
radius: i === "circle" ? "xl" : "sm",
|
|
97
|
+
style: {
|
|
98
|
+
cursor: "pointer",
|
|
99
|
+
color: "var(--mantine-color-white)"
|
|
100
|
+
},
|
|
101
|
+
...l,
|
|
102
|
+
children: t && /* @__PURE__ */ r(
|
|
103
|
+
"span",
|
|
104
|
+
{
|
|
105
|
+
style: {
|
|
106
|
+
position: "absolute",
|
|
107
|
+
top: -3,
|
|
108
|
+
left: -3,
|
|
109
|
+
right: -3,
|
|
110
|
+
bottom: -3,
|
|
111
|
+
border: `1px solid ${e ? u(e, n) : ""}`,
|
|
112
|
+
borderRadius: i === "circle" ? "var(--mantine-radius-xl)" : "var(--mantine-radius-sm)",
|
|
113
|
+
pointerEvents: "none",
|
|
114
|
+
boxSizing: "border-box"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
) }) });
|
|
120
|
+
}
|
|
121
|
+
), D = R(x)`
|
|
122
|
+
.mantine-ColorSwatch-colorOverlay {
|
|
123
|
+
border-radius: ${({ swatchShape: e }) => e === "square" ? "3px" : "50%"};
|
|
124
|
+
}
|
|
125
|
+
`, V = Object.assign(T, {
|
|
126
|
+
ColorCircle: x
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
x as ColorCircle,
|
|
130
|
+
V as ColorPicker
|
|
131
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as f, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h } from "react";
|
|
3
|
+
import { Popover as t } from "@mantine/core";
|
|
4
|
+
import { ColorPicker as n } from "./ColorPicker.js";
|
|
5
|
+
const w = ({
|
|
6
|
+
value: r,
|
|
7
|
+
onChange: i,
|
|
8
|
+
defaultOpened: c,
|
|
9
|
+
size: l = 18,
|
|
10
|
+
radius: d,
|
|
11
|
+
children: p
|
|
12
|
+
}) => {
|
|
13
|
+
const [s, e] = h(c);
|
|
14
|
+
return /* @__PURE__ */ f(
|
|
15
|
+
t,
|
|
16
|
+
{
|
|
17
|
+
opened: s,
|
|
18
|
+
onChange: e,
|
|
19
|
+
position: "bottom-start",
|
|
20
|
+
withArrow: !0,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ o(t.Target, { children: /* @__PURE__ */ o("div", { onClick: () => e((m) => !m), style: { cursor: "pointer" }, children: p || /* @__PURE__ */ o(
|
|
23
|
+
n.ColorCircle,
|
|
24
|
+
{
|
|
25
|
+
value: r,
|
|
26
|
+
size: l,
|
|
27
|
+
radius: d
|
|
28
|
+
}
|
|
29
|
+
) }) }),
|
|
30
|
+
/* @__PURE__ */ o(t.Dropdown, { maw: 270, children: /* @__PURE__ */ o("div", { onClick: () => e(!1), children: /* @__PURE__ */ o(
|
|
31
|
+
n,
|
|
32
|
+
{
|
|
33
|
+
...i ? { value: r, onChange: i } : { defaultValue: r ?? void 0 }
|
|
34
|
+
}
|
|
35
|
+
) }) })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
w as ColorPickerPopover
|
|
42
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as p, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as v, useEffect as i } from "react";
|
|
3
|
+
import s from "../CommentsPanel/CommentsPanel.module.css.js";
|
|
4
|
+
function y({
|
|
5
|
+
children: l,
|
|
6
|
+
onSubmit: c,
|
|
7
|
+
handleBlur: f,
|
|
8
|
+
autoFocus: u = !0,
|
|
9
|
+
registerClearEditor: d
|
|
10
|
+
}) {
|
|
11
|
+
const r = v(null);
|
|
12
|
+
return i(() => {
|
|
13
|
+
const e = r.current;
|
|
14
|
+
!e || !u || setTimeout(() => {
|
|
15
|
+
e.focus(() => ({
|
|
16
|
+
defaultSelection: "rootEnd"
|
|
17
|
+
}));
|
|
18
|
+
}, 0);
|
|
19
|
+
}, [u]), i(() => {
|
|
20
|
+
const e = (a) => {
|
|
21
|
+
const t = a.target, n = r.current;
|
|
22
|
+
if (!(!n || !t) && (t.classList.contains(s.commentPluginInputFooterContainer) || t.classList.contains("editor-scroller") || t.classList.contains("doc-space-styles-provider"))) {
|
|
23
|
+
if (t.querySelector(`.${s.commentPluginImagePreviewList}`) || t.querySelector(`.${s.commentPluginFilePreviewContainer}`))
|
|
24
|
+
return;
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
n.focus(() => ({
|
|
27
|
+
defaultSelection: "rootEnd"
|
|
28
|
+
}));
|
|
29
|
+
}, 0);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return document.addEventListener("mousedown", e), () => {
|
|
33
|
+
document.removeEventListener("mousedown", e);
|
|
34
|
+
};
|
|
35
|
+
}, []), i(() => {
|
|
36
|
+
const e = r.current;
|
|
37
|
+
if (!e) return;
|
|
38
|
+
d?.(() => {
|
|
39
|
+
e.update(() => {
|
|
40
|
+
const n = e._editorState._nodeMap.get("root");
|
|
41
|
+
if (!n) return;
|
|
42
|
+
n.clear();
|
|
43
|
+
const o = e._nodes.get("paragraph");
|
|
44
|
+
if (!o) return;
|
|
45
|
+
const m = new o.klass();
|
|
46
|
+
n.append(m), m.select();
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const t = (n) => {
|
|
50
|
+
n.code === "Enter" && !n.shiftKey && document.activeElement === e.getRootElement() && (c(), setTimeout(() => {
|
|
51
|
+
e.blur();
|
|
52
|
+
}));
|
|
53
|
+
};
|
|
54
|
+
return document.addEventListener("keydown", t), () => {
|
|
55
|
+
document.removeEventListener("keydown", t);
|
|
56
|
+
};
|
|
57
|
+
}, [c, f, d]), /* @__PURE__ */ p(E, { children: l(r) });
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
y as CommentEditorBehavior
|
|
61
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
-
import { EditorType, RangeSelection } from '@layers-app/editor';
|
|
3
2
|
import { Comment, CommentsNs, GeneralComment, ICommentFile, ICommentOptions, IUser, Thread } from '../CommentsPanel/types.ts';
|
|
4
3
|
import * as React from 'react';
|
|
4
|
+
type EditorType = any;
|
|
5
|
+
type RangeSelection = any;
|
|
5
6
|
interface CommentValue {
|
|
6
7
|
value: string;
|
|
7
8
|
files: ICommentFile[];
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { jsx as S, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import * as ge from "react";
|
|
3
|
+
import { useRef as b, useMemo as j, useLayoutEffect as he, useEffect as I } from "react";
|
|
4
|
+
import { showErrorNotification as k } from "../../helpers/showNotifications.js";
|
|
5
|
+
import { CommentsThreadReplyControls as Ce } from "../CommentsPanel/components/CommentsThreadReplyControls.js";
|
|
6
|
+
import { CommentsUploadFilesPreview as Ee } from "../CommentsPanel/components/CommentsUploadFilesPreview.js";
|
|
7
|
+
import { useCommentsStore as X } from "../CommentsPanel/store.js";
|
|
8
|
+
import { preparePreviewFile as H, getClearInputMessage as Me, scrollToTop as K, uploadAllFiles as ye } from "../CommentsPanel/utils.js";
|
|
9
|
+
import { openRemoveConfirmModal as U } from "../modals/RemoveConfirmModal.js";
|
|
10
|
+
import { CommentEditorBehavior as be } from "./CommentEditorHotkeys.js";
|
|
11
|
+
import P from "../CommentsPanel/CommentsPanel.module.css.js";
|
|
12
|
+
const ve = 5 * 1024 * 1024, Fe = 10, De = ({
|
|
13
|
+
submitAddComment: T,
|
|
14
|
+
commentValue: r,
|
|
15
|
+
thread: c,
|
|
16
|
+
setCommentValue: E,
|
|
17
|
+
handleBlur: a,
|
|
18
|
+
autoFocus: D = !0,
|
|
19
|
+
provideCommentOptions: W,
|
|
20
|
+
removeCommentImage: Q,
|
|
21
|
+
handleEditComment: Z,
|
|
22
|
+
isEditInput: i = !1,
|
|
23
|
+
isGeneral: v,
|
|
24
|
+
updateThreadId: _,
|
|
25
|
+
setCommentActions: B,
|
|
26
|
+
updateLocation: p,
|
|
27
|
+
getSelectionText: q,
|
|
28
|
+
children: A,
|
|
29
|
+
providedUser: Y,
|
|
30
|
+
placeholder: G,
|
|
31
|
+
composerLocales: V
|
|
32
|
+
}) => {
|
|
33
|
+
const M = b(null), g = j(
|
|
34
|
+
() => ({
|
|
35
|
+
container: document.createElement("div"),
|
|
36
|
+
elements: []
|
|
37
|
+
}),
|
|
38
|
+
[]
|
|
39
|
+
), L = j(() => i ? { ...r } : null, [r, i]), [ee, te] = ge.useState(!1), h = b(r), O = b(null), y = b(!1), oe = X((e) => e.commentsLocales), t = V ?? oe, { currentUser: ne, commentOptions: re } = X(), se = Y ?? ne, F = W ?? re, C = b(null), ie = G ?? t?.addComment, R = !v && !c && !i;
|
|
40
|
+
he(() => {
|
|
41
|
+
if (!p) return;
|
|
42
|
+
p(M.current, C, g);
|
|
43
|
+
const e = g.container, o = document.body;
|
|
44
|
+
if (o !== null)
|
|
45
|
+
return o.appendChild(e), () => {
|
|
46
|
+
o.removeChild(e);
|
|
47
|
+
};
|
|
48
|
+
}, [p, g.container, g]), I(() => {
|
|
49
|
+
if (!p) return;
|
|
50
|
+
const e = () => {
|
|
51
|
+
p(M.current, C, g);
|
|
52
|
+
};
|
|
53
|
+
return window.addEventListener("resize", e), () => {
|
|
54
|
+
window.removeEventListener("resize", e);
|
|
55
|
+
};
|
|
56
|
+
}, [g, p]), I(() => {
|
|
57
|
+
if (v) return;
|
|
58
|
+
function e(o) {
|
|
59
|
+
const n = o.target;
|
|
60
|
+
if (M.current && M.current.contains(n) || n.closest(".mantine-Popover-dropdown") || n.closest(".floating-text-format-popup") || i && n.closest("[data-ignore-blur='true']") || !i && n.closest(".tabler-icon-messages") || n.closest('[data-menu-dropdown="true"]') || n.closest(".mantine-Modal-content"))
|
|
61
|
+
return;
|
|
62
|
+
const s = L ? JSON.stringify(L) !== JSON.stringify(h.current) : !1;
|
|
63
|
+
if (s && !y.current && i) {
|
|
64
|
+
y.current = !0, U({
|
|
65
|
+
title: t.inputEditor.discardModal.title,
|
|
66
|
+
children: t.inputEditor.discardModal.description,
|
|
67
|
+
labels: {
|
|
68
|
+
confirm: t.inputEditor.discardModal.labels.confirm,
|
|
69
|
+
cancel: t.inputEditor.discardModal.labels.cancel
|
|
70
|
+
},
|
|
71
|
+
onConfirm: () => {
|
|
72
|
+
a();
|
|
73
|
+
},
|
|
74
|
+
onClose: () => {
|
|
75
|
+
y.current = !1;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (R && (h.current.value.trim() !== "" || h.current.files.length > 0)) {
|
|
81
|
+
y.current = !0, o.stopPropagation(), o.preventDefault(), U({
|
|
82
|
+
title: t.inputEditor.discardModal.title,
|
|
83
|
+
children: t.inputEditor.cancelCommentModal.description,
|
|
84
|
+
labels: {
|
|
85
|
+
confirm: t.inputEditor.discardModal.labels.confirm,
|
|
86
|
+
cancel: t.inputEditor.discardModal.labels.cancel
|
|
87
|
+
},
|
|
88
|
+
onConfirm: () => {
|
|
89
|
+
a();
|
|
90
|
+
},
|
|
91
|
+
onClose: () => {
|
|
92
|
+
y.current = !1;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
s || a();
|
|
98
|
+
}
|
|
99
|
+
return document.addEventListener("mousedown", e), () => {
|
|
100
|
+
document.removeEventListener("mousedown", e);
|
|
101
|
+
};
|
|
102
|
+
}, [
|
|
103
|
+
a,
|
|
104
|
+
L,
|
|
105
|
+
i,
|
|
106
|
+
R,
|
|
107
|
+
v,
|
|
108
|
+
t.inputEditor?.cancelCommentModal?.description,
|
|
109
|
+
t.inputEditor.discardModal.description,
|
|
110
|
+
t.inputEditor.discardModal.labels.cancel,
|
|
111
|
+
t.inputEditor.discardModal.labels.confirm,
|
|
112
|
+
t.inputEditor.discardModal.title
|
|
113
|
+
]);
|
|
114
|
+
const le = async () => {
|
|
115
|
+
const e = h.current;
|
|
116
|
+
if (!e.value.trim() && !e.files.length) return;
|
|
117
|
+
const o = c ? c.id : F?.pageId, n = e.files.length > 0, s = c ? "COMMENT" : "PAGE", l = v ? "REVIEW" : "FAQ", d = "temp-" + Date.now() + "-" + Math.random().toString(36).substring(2, 9), m = l === "FAQ" ? c ? "comment" : "thread" : "general", f = JSON.stringify(F?.workspaceInfo);
|
|
118
|
+
let w = q ? q(C.current) : "";
|
|
119
|
+
w.length > 100 && (w = w.slice(0, 99) + "…");
|
|
120
|
+
const x = {
|
|
121
|
+
id: d,
|
|
122
|
+
quote: m === "thread" ? w : m === "general" ? f : "",
|
|
123
|
+
deleted: !1,
|
|
124
|
+
type: m,
|
|
125
|
+
clientKey: crypto.randomUUID(),
|
|
126
|
+
resolution: null,
|
|
127
|
+
edited: !1,
|
|
128
|
+
text: e.value,
|
|
129
|
+
reactions: [],
|
|
130
|
+
files: e.files,
|
|
131
|
+
authorId: se?.id || "",
|
|
132
|
+
timeStamp: performance.timeOrigin + performance.now(),
|
|
133
|
+
children: []
|
|
134
|
+
};
|
|
135
|
+
l === "FAQ" ? c ? (T(x, !1, c, C.current), B((u) => ({
|
|
136
|
+
...u,
|
|
137
|
+
replyList: [...u.replyList, c.id]
|
|
138
|
+
}))) : (K('ul[class*="commentPluginCommentsPanelList"]'), T(
|
|
139
|
+
x,
|
|
140
|
+
!0,
|
|
141
|
+
void 0,
|
|
142
|
+
C.current
|
|
143
|
+
)) : (K('ul[class*="commentPluginCommentsPanelList"]'), O.current?.(), T(x, !0)), a(), C.current = null;
|
|
144
|
+
try {
|
|
145
|
+
await F?.commentActions.submitCommentApi({
|
|
146
|
+
text: e.value,
|
|
147
|
+
commentType: l,
|
|
148
|
+
parentType: s,
|
|
149
|
+
parentId: o,
|
|
150
|
+
onSuccess: async (u) => {
|
|
151
|
+
const z = u.id, ue = u.updatedAt;
|
|
152
|
+
let J = [];
|
|
153
|
+
n && (J = (await ye(
|
|
154
|
+
z,
|
|
155
|
+
e.files,
|
|
156
|
+
F.commentActions.uploadCommentFileApi
|
|
157
|
+
)).map(
|
|
158
|
+
(pe) => H(pe)
|
|
159
|
+
)), _ && _(
|
|
160
|
+
d,
|
|
161
|
+
z,
|
|
162
|
+
ue,
|
|
163
|
+
m,
|
|
164
|
+
J.flat(),
|
|
165
|
+
c
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
} catch (u) {
|
|
170
|
+
console.error("Error submitting comment:", u);
|
|
171
|
+
}
|
|
172
|
+
}, N = () => {
|
|
173
|
+
i ? Z?.(h.current) : le();
|
|
174
|
+
}, ce = () => {
|
|
175
|
+
const e = !!r.value?.trim(), o = !!r.files?.length;
|
|
176
|
+
U({
|
|
177
|
+
title: t.inputEditor.clearModal.title,
|
|
178
|
+
labels: {
|
|
179
|
+
confirm: t.deleteModal.actions.remove,
|
|
180
|
+
cancel: t.deleteModal.actions.cancel
|
|
181
|
+
},
|
|
182
|
+
children: Me(e, o, t),
|
|
183
|
+
onConfirm: () => {
|
|
184
|
+
E({ files: [], value: "" }), O.current?.();
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
I(() => {
|
|
189
|
+
h.current = r;
|
|
190
|
+
}, [r]);
|
|
191
|
+
const ae = (e) => {
|
|
192
|
+
const o = typeof e == "string";
|
|
193
|
+
if (o && Q && !i) {
|
|
194
|
+
Q(e);
|
|
195
|
+
const n = r.files.filter((s) => "file" in s);
|
|
196
|
+
E((s) => ({
|
|
197
|
+
...s,
|
|
198
|
+
files: n
|
|
199
|
+
}));
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
E((n) => {
|
|
203
|
+
const s = o ? n.files.filter((l) => l.id !== e) : n.files.filter((l, d) => d !== e);
|
|
204
|
+
return { ...n, files: s };
|
|
205
|
+
});
|
|
206
|
+
}, de = (e) => {
|
|
207
|
+
!e || e.length === 0 || E((o) => {
|
|
208
|
+
const n = o.files || [], s = Fe - n.length, l = [], d = [];
|
|
209
|
+
e.forEach((f) => {
|
|
210
|
+
f.size <= ve ? l.push(f) : d.push(f);
|
|
211
|
+
}), d.length > 0 && k({
|
|
212
|
+
message: t?.notifications?.uploadMessages?.fileTooLarge
|
|
213
|
+
}), l.length > s && k({
|
|
214
|
+
message: t?.notifications?.uploadMessages?.tooManyFiles
|
|
215
|
+
});
|
|
216
|
+
const m = l.slice(0, s).map((f) => H(f, !0));
|
|
217
|
+
return m.length === 0 ? o : {
|
|
218
|
+
...o,
|
|
219
|
+
files: [...n, ...m]
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
}, me = r.value !== "" || r.files.length > 0, fe = r.files.length === 10;
|
|
223
|
+
return /* @__PURE__ */ S(
|
|
224
|
+
"div",
|
|
225
|
+
{
|
|
226
|
+
ref: M,
|
|
227
|
+
className: `${P.commentPluginCommentsPanelListThreadEditor} ${i ? P.edited : ""}`,
|
|
228
|
+
children: /* @__PURE__ */ $(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
className: P.commentPluginEditorContainer,
|
|
232
|
+
style: {
|
|
233
|
+
"--placeholder-text": `"${ie}..."`
|
|
234
|
+
},
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ S(
|
|
237
|
+
be,
|
|
238
|
+
{
|
|
239
|
+
onSubmit: N,
|
|
240
|
+
handleBlur: a,
|
|
241
|
+
autoFocus: D,
|
|
242
|
+
registerClearEditor: (e) => {
|
|
243
|
+
O.current = e;
|
|
244
|
+
},
|
|
245
|
+
children: (e) => typeof A == "function" ? A({
|
|
246
|
+
onSubmit: N,
|
|
247
|
+
handleBlur: a,
|
|
248
|
+
autoFocus: D,
|
|
249
|
+
setCommentValue: E,
|
|
250
|
+
commentValue: r,
|
|
251
|
+
editorRef: e
|
|
252
|
+
}) : A
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
/* @__PURE__ */ $("div", { className: P.commentPluginInputFooterContainer, children: [
|
|
256
|
+
/* @__PURE__ */ S(
|
|
257
|
+
Ee,
|
|
258
|
+
{
|
|
259
|
+
hasPermission: !0,
|
|
260
|
+
removeImage: ae,
|
|
261
|
+
files: r.files,
|
|
262
|
+
locales: t
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
/* @__PURE__ */ S(
|
|
266
|
+
Ce,
|
|
267
|
+
{
|
|
268
|
+
handleClearInput: ce,
|
|
269
|
+
disabledSubmitButton: !me,
|
|
270
|
+
disabledUploadButton: fe,
|
|
271
|
+
handleFileChange: de,
|
|
272
|
+
onSubmit: N,
|
|
273
|
+
locales: t,
|
|
274
|
+
isFloatInput: R,
|
|
275
|
+
isSubmitting: ee,
|
|
276
|
+
setIsSubmitting: te
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
] })
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
export {
|
|
287
|
+
De as CommentComposer
|
|
288
|
+
};
|