@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,366 @@
|
|
|
1
|
+
import { jsxs as u, jsx as s, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import { useState as V } from "react";
|
|
3
|
+
import { useMantineColorScheme as oe, LoadingOverlay as de, Button as ce } from "@mantine/core";
|
|
4
|
+
import { IconFile as ae } from "@tabler/icons-react";
|
|
5
|
+
import { format as me } from "date-fns";
|
|
6
|
+
import { CommentComposer as J } from "../../CommentComposer/index.js";
|
|
7
|
+
import { ProjectIcon as ue } from "../../ProjectIcon/ProjectIcon.js";
|
|
8
|
+
import { UserAvatar as re } from "../../UserAvatar/index.js";
|
|
9
|
+
import { useCommentsStore as fe } from "../store.js";
|
|
10
|
+
import { cutDeleteImageId as Ce } from "../utils.js";
|
|
11
|
+
import { CommentActions as pe } from "./CommentActions.js";
|
|
12
|
+
import { CommentsUploadFilesPreview as ge } from "./CommentsUploadFilesPreview.js";
|
|
13
|
+
import o from "../CommentsPanel.module.css.js";
|
|
14
|
+
function Pe(e, C, f) {
|
|
15
|
+
const c = new Date(e);
|
|
16
|
+
return me(c, "dd/MM/yyyy, HH:mm") + (C ? ` (${f.edited})` : "");
|
|
17
|
+
}
|
|
18
|
+
function ye(e, C, f) {
|
|
19
|
+
if (C) return e.repliesToggle?.hide;
|
|
20
|
+
const c = f === 1 ? "show_one" : "show_other";
|
|
21
|
+
return e.repliesToggle?.[c]?.replace("{{count}}", String(f));
|
|
22
|
+
}
|
|
23
|
+
const he = ({
|
|
24
|
+
commentOrThread: e,
|
|
25
|
+
handleClickThread: C,
|
|
26
|
+
markNodeMap: f,
|
|
27
|
+
parentThreadOrGeneral: c,
|
|
28
|
+
submitAddComment: A,
|
|
29
|
+
removeCommentReactions: x,
|
|
30
|
+
updateThreadId: M,
|
|
31
|
+
addCommentReaction: R,
|
|
32
|
+
deleteCommentImage: N,
|
|
33
|
+
activeIDs: y,
|
|
34
|
+
updateCommentTextOrImage: $,
|
|
35
|
+
resolveThreat: X,
|
|
36
|
+
toggleRepliesInput: h,
|
|
37
|
+
locales: p,
|
|
38
|
+
deleteCommentOrThread: k,
|
|
39
|
+
replyInput: F
|
|
40
|
+
}) => {
|
|
41
|
+
const [r, g] = V({
|
|
42
|
+
replyList: [],
|
|
43
|
+
editCommentId: "",
|
|
44
|
+
editedContent: ""
|
|
45
|
+
}), [j, v] = V({
|
|
46
|
+
value: "",
|
|
47
|
+
files: []
|
|
48
|
+
}), [Y, D] = V(!1), { workspaceMembers: Z, currentUser: L, getEditor: U, isGuest: E, adminPermission: G } = fe(), { colorScheme: T } = oe(), O = T === "dark", ee = y && y[0] === e.id, W = L?.id === e.authorId, _ = r.replyList.includes(e.id), S = e.id.includes("temp"), I = e.type !== "comment" && e.children ? e.children.filter(
|
|
49
|
+
(t) => !t.deleted
|
|
50
|
+
) : [], z = _ ? I : I.slice(0, 1), te = e.id === F, ie = (t, i = !1) => {
|
|
51
|
+
r.replyList.includes(t) && i || g((n) => ({
|
|
52
|
+
...n,
|
|
53
|
+
replyList: n.replyList.includes(t) ? n.replyList.filter((l) => l !== t) : [...n.replyList, t]
|
|
54
|
+
}));
|
|
55
|
+
}, se = (t) => {
|
|
56
|
+
F && h(""), g((i) => ({
|
|
57
|
+
...i,
|
|
58
|
+
editCommentId: t.id,
|
|
59
|
+
editedContent: t.text
|
|
60
|
+
})), v({ value: t.text, files: t.files });
|
|
61
|
+
}, w = () => {
|
|
62
|
+
g((t) => ({
|
|
63
|
+
...t,
|
|
64
|
+
editCommentId: ""
|
|
65
|
+
})), v({ value: "", files: [] }), h("");
|
|
66
|
+
}, b = async (t) => {
|
|
67
|
+
const i = String(t), n = Ce(i), a = (e?.files || []).length === 1, d = (e?.text || "").replace(/<[^>]*>/g, "").replace(/\s| /g, "");
|
|
68
|
+
a && d.length === 0 ? k(e, c) : c ? N(
|
|
69
|
+
n,
|
|
70
|
+
c.id,
|
|
71
|
+
e?.id
|
|
72
|
+
) : N(n, e?.id);
|
|
73
|
+
}, B = e.type !== "comment" && e.resolution === "ACCEPTED", H = e.id, ne = (e?.reactions || []).reduce(
|
|
74
|
+
(t, i) => (t[i.reaction] || (t[i.reaction] = {
|
|
75
|
+
count: 0,
|
|
76
|
+
id: i.id,
|
|
77
|
+
authors: /* @__PURE__ */ new Set()
|
|
78
|
+
}), t[i.reaction].count += 1, t[i.reaction].authors.add(i.userId), t),
|
|
79
|
+
{}
|
|
80
|
+
), Q = (t) => {
|
|
81
|
+
const { isDuplicateReaction: i, hasTempReaction: n } = e.reactions.reduce(
|
|
82
|
+
(l, { reaction: a, userId: m, id: d }) => (a === t && m === L?.id && (d.startsWith("temp") ? l.hasTempReaction = !0 : l.isDuplicateReaction = !0), l),
|
|
83
|
+
{ isDuplicateReaction: !1, hasTempReaction: !1 }
|
|
84
|
+
);
|
|
85
|
+
if (!n) {
|
|
86
|
+
if (i) {
|
|
87
|
+
const l = e.reactions.find(
|
|
88
|
+
({ reaction: a, userId: m }) => a === t && m === L?.id
|
|
89
|
+
)?.id;
|
|
90
|
+
c ? x(
|
|
91
|
+
l,
|
|
92
|
+
c,
|
|
93
|
+
e
|
|
94
|
+
) : x(
|
|
95
|
+
l,
|
|
96
|
+
e,
|
|
97
|
+
c
|
|
98
|
+
);
|
|
99
|
+
} else
|
|
100
|
+
R(t, e, c);
|
|
101
|
+
D(!1);
|
|
102
|
+
}
|
|
103
|
+
}, q = (t) => {
|
|
104
|
+
const i = new Set(t.files.map((d) => d.id)), n = t.files.filter((d) => d.id?.startsWith("temp-")), a = {
|
|
105
|
+
deletedFile: e.files.filter(
|
|
106
|
+
(d) => !!d.id && !i.has(d.id)
|
|
107
|
+
),
|
|
108
|
+
newFiles: n
|
|
109
|
+
}, m = {
|
|
110
|
+
value: t.value,
|
|
111
|
+
restore: e.text !== t.value
|
|
112
|
+
};
|
|
113
|
+
$(
|
|
114
|
+
m,
|
|
115
|
+
a,
|
|
116
|
+
r.editCommentId,
|
|
117
|
+
c?.id
|
|
118
|
+
), w();
|
|
119
|
+
}, P = Z?.find(
|
|
120
|
+
(t) => t.userId === e.authorId
|
|
121
|
+
), K = P ? {
|
|
122
|
+
id: P.userId,
|
|
123
|
+
name: P.name,
|
|
124
|
+
email: P.email,
|
|
125
|
+
avatar: P.avatarUrl
|
|
126
|
+
} : {
|
|
127
|
+
id: e.authorId,
|
|
128
|
+
name: "Deleted user",
|
|
129
|
+
email: "",
|
|
130
|
+
avatar: ""
|
|
131
|
+
};
|
|
132
|
+
return /* @__PURE__ */ u(
|
|
133
|
+
"li",
|
|
134
|
+
{
|
|
135
|
+
onMouseDown: C,
|
|
136
|
+
"data-id": e.id,
|
|
137
|
+
className: `${o.commentPluginCommentsPanelListThread} ${f?.has(H) ? "interactive" : ""} ${y ? y.indexOf(H) === -1 ? "" : "active" : ""}
|
|
138
|
+
${B ? `${o.commentPluginCommentsPanelListThreadAccepted}` : ""}`,
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ u("div", { className: o.commentPluginThreadContainer, children: [
|
|
141
|
+
/* @__PURE__ */ s(re, { user: K }),
|
|
142
|
+
/* @__PURE__ */ u("div", { className: o.commentPluginThreadWrapper, children: [
|
|
143
|
+
/* @__PURE__ */ u("div", { className: o.commentPluginCommentsPanelListThreadQuoteBox, children: [
|
|
144
|
+
/* @__PURE__ */ u("div", { className: o.commentPluginCommentsPanelListDetails, children: [
|
|
145
|
+
/* @__PURE__ */ s(
|
|
146
|
+
"span",
|
|
147
|
+
{
|
|
148
|
+
className: o.commentPluginCommentsPanelListCommentAuthor,
|
|
149
|
+
children: K.name
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
/* @__PURE__ */ s(
|
|
153
|
+
"span",
|
|
154
|
+
{
|
|
155
|
+
className: o.commentPluginCommentsPanelListCommentTime,
|
|
156
|
+
children: Pe(
|
|
157
|
+
e.timeStamp ?? 0,
|
|
158
|
+
e.edited,
|
|
159
|
+
p
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] }),
|
|
164
|
+
!S && (G || !E) && /* @__PURE__ */ s(
|
|
165
|
+
pe,
|
|
166
|
+
{
|
|
167
|
+
hasPermission: W,
|
|
168
|
+
accepted: B,
|
|
169
|
+
showEmojiPicker: Y,
|
|
170
|
+
setShowEmojiPicker: D,
|
|
171
|
+
resolveThreat: X,
|
|
172
|
+
commentOrThread: e,
|
|
173
|
+
commentSelected: ee,
|
|
174
|
+
handleBlur: w,
|
|
175
|
+
toggleRepliesInput: h,
|
|
176
|
+
deleteCommentOrThread: k,
|
|
177
|
+
handleEditClick: se,
|
|
178
|
+
handleReactionClick: Q
|
|
179
|
+
}
|
|
180
|
+
)
|
|
181
|
+
] }),
|
|
182
|
+
/* @__PURE__ */ u(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
className: o.commentPluginCommentsPanelListContentContainer,
|
|
186
|
+
children: [
|
|
187
|
+
e.type === "thread" && /* @__PURE__ */ s(
|
|
188
|
+
"blockquote",
|
|
189
|
+
{
|
|
190
|
+
className: o.commentPluginCommentsPanelListThreadQuote,
|
|
191
|
+
children: /* @__PURE__ */ s(
|
|
192
|
+
"span",
|
|
193
|
+
{
|
|
194
|
+
className: o.commentPluginCommentsPanelListThreadQuoteText,
|
|
195
|
+
children: e.quote
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
}
|
|
199
|
+
),
|
|
200
|
+
r.editCommentId !== e.id && /* @__PURE__ */ u(le, { children: [
|
|
201
|
+
/* @__PURE__ */ s("div", { className: "doc-space-styles-provider", children: /* @__PURE__ */ s(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
className: o.commentPluginCommentThreadResponses,
|
|
205
|
+
dangerouslySetInnerHTML: {
|
|
206
|
+
__html: e.text
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
) }),
|
|
210
|
+
e.files && e.files.length && r.editCommentId !== e.id ? /* @__PURE__ */ s(
|
|
211
|
+
ge,
|
|
212
|
+
{
|
|
213
|
+
hasPermission: W,
|
|
214
|
+
removeImage: b,
|
|
215
|
+
files: e.files,
|
|
216
|
+
showLoading: !S
|
|
217
|
+
}
|
|
218
|
+
) : null
|
|
219
|
+
] }),
|
|
220
|
+
r.editCommentId !== e.id && /* @__PURE__ */ s(
|
|
221
|
+
"div",
|
|
222
|
+
{
|
|
223
|
+
className: `${o.commentPluginCommentsPanelReactionsContainer} ${E ? o.guest : ""}`,
|
|
224
|
+
children: Object.entries(ne).map(
|
|
225
|
+
([t, i], n) => {
|
|
226
|
+
const l = i.authors.has(
|
|
227
|
+
L?.id || ""
|
|
228
|
+
);
|
|
229
|
+
return /* @__PURE__ */ u(
|
|
230
|
+
"div",
|
|
231
|
+
{
|
|
232
|
+
style: {
|
|
233
|
+
background: l && (O ? "rgba(67, 155, 255, 0.24)" : "rgba(35, 131, 226, 0.14)") || void 0
|
|
234
|
+
},
|
|
235
|
+
onClick: E ? void 0 : () => Q(t),
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ s(
|
|
238
|
+
ue,
|
|
239
|
+
{
|
|
240
|
+
size: 16,
|
|
241
|
+
fz: 16,
|
|
242
|
+
icon: t,
|
|
243
|
+
fallback: /* @__PURE__ */ s(ae, { size: "16px" })
|
|
244
|
+
},
|
|
245
|
+
n
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ s("span", { children: i.count })
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
n
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
)
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
] })
|
|
260
|
+
] }),
|
|
261
|
+
r.editCommentId === e.id && /* @__PURE__ */ s(
|
|
262
|
+
J,
|
|
263
|
+
{
|
|
264
|
+
commentValue: j,
|
|
265
|
+
setCommentValue: v,
|
|
266
|
+
isEditInput: !0,
|
|
267
|
+
updateThreadId: M,
|
|
268
|
+
removeCommentImage: b,
|
|
269
|
+
setCommentActions: g,
|
|
270
|
+
submitAddComment: A || (() => {
|
|
271
|
+
}),
|
|
272
|
+
handleEditComment: q,
|
|
273
|
+
handleBlur: w,
|
|
274
|
+
placeholder: p.replyComment,
|
|
275
|
+
children: ({
|
|
276
|
+
onSubmit: t,
|
|
277
|
+
handleBlur: i,
|
|
278
|
+
autoFocus: n,
|
|
279
|
+
setCommentValue: l,
|
|
280
|
+
commentValue: a,
|
|
281
|
+
registerClearEditor: m,
|
|
282
|
+
editorRef: d
|
|
283
|
+
}) => U?.({
|
|
284
|
+
onSubmit: t,
|
|
285
|
+
handleBlur: i,
|
|
286
|
+
autoFocus: n,
|
|
287
|
+
setCommentValue: l,
|
|
288
|
+
commentValue: a,
|
|
289
|
+
initialContent: e.text,
|
|
290
|
+
registerClearEditor: m,
|
|
291
|
+
editorRef: d
|
|
292
|
+
})
|
|
293
|
+
}
|
|
294
|
+
),
|
|
295
|
+
/* @__PURE__ */ s(de, { visible: S }),
|
|
296
|
+
z.length ? /* @__PURE__ */ s("ul", { className: o.commentPluginCommentsPanelListThreadComments, children: z.map((t) => {
|
|
297
|
+
const i = t.id;
|
|
298
|
+
return /* @__PURE__ */ s(
|
|
299
|
+
he,
|
|
300
|
+
{
|
|
301
|
+
commentOrThread: t,
|
|
302
|
+
locales: p,
|
|
303
|
+
deleteCommentOrThread: () => k(t, e),
|
|
304
|
+
deleteCommentImage: N,
|
|
305
|
+
addCommentReaction: R,
|
|
306
|
+
removeCommentReactions: x,
|
|
307
|
+
updateCommentTextOrImage: $,
|
|
308
|
+
toggleRepliesInput: h,
|
|
309
|
+
parentThreadOrGeneral: e
|
|
310
|
+
},
|
|
311
|
+
t.clientKey ?? i
|
|
312
|
+
);
|
|
313
|
+
}) }) : null,
|
|
314
|
+
!B && te && /* @__PURE__ */ s(
|
|
315
|
+
J,
|
|
316
|
+
{
|
|
317
|
+
commentValue: j,
|
|
318
|
+
setCommentValue: v,
|
|
319
|
+
thread: e,
|
|
320
|
+
isEditInput: !1,
|
|
321
|
+
updateThreadId: M,
|
|
322
|
+
removeCommentImage: b,
|
|
323
|
+
setCommentActions: g,
|
|
324
|
+
submitAddComment: A || (() => {
|
|
325
|
+
}),
|
|
326
|
+
handleEditComment: q,
|
|
327
|
+
handleBlur: w,
|
|
328
|
+
placeholder: p.replyComment,
|
|
329
|
+
children: ({
|
|
330
|
+
onSubmit: t,
|
|
331
|
+
handleBlur: i,
|
|
332
|
+
autoFocus: n,
|
|
333
|
+
setCommentValue: l,
|
|
334
|
+
commentValue: a,
|
|
335
|
+
registerClearEditor: m,
|
|
336
|
+
editorRef: d
|
|
337
|
+
}) => U?.({
|
|
338
|
+
onSubmit: t,
|
|
339
|
+
handleBlur: i,
|
|
340
|
+
autoFocus: n,
|
|
341
|
+
setCommentValue: l,
|
|
342
|
+
commentValue: a,
|
|
343
|
+
registerClearEditor: m,
|
|
344
|
+
editorRef: d
|
|
345
|
+
})
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
e.type !== "comment" && I.length - 1 > 0 ? /* @__PURE__ */ s(
|
|
349
|
+
ce,
|
|
350
|
+
{
|
|
351
|
+
onClick: () => ie(e.id),
|
|
352
|
+
variant: "default",
|
|
353
|
+
fullWidth: !0,
|
|
354
|
+
radius: "sm",
|
|
355
|
+
className: o.commentPluginShowMoreBtn,
|
|
356
|
+
children: ye(p, _, I.length - 1)
|
|
357
|
+
}
|
|
358
|
+
) : null
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
e.clientKey ?? e.id
|
|
362
|
+
);
|
|
363
|
+
};
|
|
364
|
+
export {
|
|
365
|
+
he as CommentPanelListItem
|
|
366
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Tabs as e, Divider as c } from "@mantine/core";
|
|
3
|
+
import { useCommentsStore as a } from "../store.js";
|
|
4
|
+
import { toggleFilter as d } from "../utils.js";
|
|
5
|
+
const f = ({
|
|
6
|
+
commentsFilter: i,
|
|
7
|
+
setCommentsFilter: t,
|
|
8
|
+
listRef: n
|
|
9
|
+
}) => {
|
|
10
|
+
const l = a((r) => r.commentsLocales), s = a((r) => r.isSidebar);
|
|
11
|
+
return /* @__PURE__ */ o(
|
|
12
|
+
e,
|
|
13
|
+
{
|
|
14
|
+
value: i.resolved,
|
|
15
|
+
onChange: (r) => {
|
|
16
|
+
r && d(t, "resolved", r, n);
|
|
17
|
+
},
|
|
18
|
+
variant: "pills",
|
|
19
|
+
color: "light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-3))",
|
|
20
|
+
styles: {
|
|
21
|
+
list: {
|
|
22
|
+
gap: 4
|
|
23
|
+
},
|
|
24
|
+
tab: {
|
|
25
|
+
color: "light-dark(black, var(--mantine-color-gray-3))"
|
|
26
|
+
},
|
|
27
|
+
root: {
|
|
28
|
+
marginBottom: 16,
|
|
29
|
+
marginTop: 6,
|
|
30
|
+
marginLeft: 4
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
children: /* @__PURE__ */ m(e.List, { children: [
|
|
34
|
+
/* @__PURE__ */ o(e.Tab, { value: "not-resolved", children: l.filter?.open }),
|
|
35
|
+
/* @__PURE__ */ o(e.Tab, { value: "resolved", children: l.filter?.resolved }),
|
|
36
|
+
!s && /* @__PURE__ */ o(
|
|
37
|
+
c,
|
|
38
|
+
{
|
|
39
|
+
mx: "2px",
|
|
40
|
+
my: -2,
|
|
41
|
+
size: "xs",
|
|
42
|
+
orientation: "vertical",
|
|
43
|
+
color: "light-dark(#DEE2E6, var(--mantine-color-gray-7))"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ o(e.Tab, { value: "all", children: l.filter?.all })
|
|
47
|
+
] })
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
f as CommentTabFilter
|
|
53
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import r from "./Icon.js";
|
|
3
|
+
import m from "../CommentsPanel.module.css.js";
|
|
4
|
+
import { useCommentsStore as c } from "../store.js";
|
|
5
|
+
const y = ({
|
|
6
|
+
commentsFilter: o,
|
|
7
|
+
listRef: t
|
|
8
|
+
}) => {
|
|
9
|
+
const s = c((l) => l.commentsLocales).emptyState[o.resolved];
|
|
10
|
+
return /* @__PURE__ */ n("div", { ref: t, className: m.commentPluginCommentsPanelEmpty, children: [
|
|
11
|
+
/* @__PURE__ */ e(r, { name: "messages", color: "#ADB5BD", size: 24 }),
|
|
12
|
+
/* @__PURE__ */ e("div", { className: m.commentPluginCommentsPanelEmptyTitle, children: s })
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
y as CommentsEmptyPlaceholder
|
|
17
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { CommentComposer as F } from "../../CommentComposer/index.js";
|
|
3
|
+
import { CommentFilterMenu as G } from "../../CommentFilterMenu/index.js";
|
|
4
|
+
import { ActionIcon as H, Divider as V } from "@mantine/core";
|
|
5
|
+
import { useCommentsStore as t } from "../store.js";
|
|
6
|
+
import { CommentTabFilter as W } from "./CommentTabFilter.js";
|
|
7
|
+
import j from "./Icon.js";
|
|
8
|
+
import r from "../CommentsPanel.module.css.js";
|
|
9
|
+
const L = ({
|
|
10
|
+
commentsFilter: n,
|
|
11
|
+
setCommentsFilter: a,
|
|
12
|
+
commentValue: i,
|
|
13
|
+
updateThreadId: c,
|
|
14
|
+
listRef: d,
|
|
15
|
+
setCommentValue: l,
|
|
16
|
+
submitAddComment: p
|
|
17
|
+
}) => {
|
|
18
|
+
const s = t(
|
|
19
|
+
(o) => o.commentOptions?.setShowComments
|
|
20
|
+
), { getEditor: u, isSidebar: h, isGuest: C } = t.getState(), f = t((o) => o.commentsLocales), v = () => {
|
|
21
|
+
l({ files: [], value: "" });
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ m(y, { children: [
|
|
24
|
+
h && /* @__PURE__ */ m("div", { className: r.commentsHeaderWrapper, children: [
|
|
25
|
+
/* @__PURE__ */ m("div", { className: r.commentsHeaderTitle, children: [
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
H,
|
|
28
|
+
{
|
|
29
|
+
color: "black",
|
|
30
|
+
size: "md",
|
|
31
|
+
"aria-label": "Close",
|
|
32
|
+
variant: "transparent",
|
|
33
|
+
onClick: () => s && s(!1),
|
|
34
|
+
children: /* @__PURE__ */ e(j, { size: 20, name: "close-panel" })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
G,
|
|
39
|
+
{
|
|
40
|
+
commentsFilter: n,
|
|
41
|
+
setCommentsFilter: a
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ e(V, { my: "md" })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ m("div", { className: r.commentsBodyWrapper, children: [
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
W,
|
|
50
|
+
{
|
|
51
|
+
listRef: d,
|
|
52
|
+
commentsFilter: n,
|
|
53
|
+
setCommentsFilter: a
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
!C && /* @__PURE__ */ e("div", { className: r.commentPluginGeneralCommentWrapper, children: /* @__PURE__ */ e(
|
|
57
|
+
F,
|
|
58
|
+
{
|
|
59
|
+
commentValue: i,
|
|
60
|
+
setCommentValue: l,
|
|
61
|
+
handleBlur: v,
|
|
62
|
+
autoFocus: !1,
|
|
63
|
+
isGeneral: !0,
|
|
64
|
+
updateThreadId: c,
|
|
65
|
+
submitAddComment: p,
|
|
66
|
+
placeholder: f.generalComment,
|
|
67
|
+
children: ({ onSubmit: o, handleBlur: g, autoFocus: S, setCommentValue: b, commentValue: B, registerClearEditor: N, editorRef: x }) => u?.({
|
|
68
|
+
onSubmit: o,
|
|
69
|
+
handleBlur: g,
|
|
70
|
+
autoFocus: S,
|
|
71
|
+
setCommentValue: b,
|
|
72
|
+
commentValue: B,
|
|
73
|
+
registerClearEditor: N,
|
|
74
|
+
editorRef: x
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
) })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
L as CommentsFilterHeader
|
|
83
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { openRemoveConfirmModal as a } from "../../modals/RemoveConfirmModal.js";
|
|
3
|
+
import { Menu as t, ActionIcon as d } from "@mantine/core";
|
|
4
|
+
import { IconPencil as p, IconTrash as f } from "@tabler/icons-react";
|
|
5
|
+
import { useCommentsStore as h } from "../store.js";
|
|
6
|
+
import { getDescription as I, getTitle as C } from "../utils.js";
|
|
7
|
+
import u from "./Icon.js";
|
|
8
|
+
import M from "../CommentsPanel.module.css.js";
|
|
9
|
+
const y = ({
|
|
10
|
+
handleEditClick: c,
|
|
11
|
+
commentOrThread: n,
|
|
12
|
+
deleteCommentOrThread: l,
|
|
13
|
+
hasPermission: r
|
|
14
|
+
}) => {
|
|
15
|
+
const o = h((m) => m.commentsLocales), s = () => {
|
|
16
|
+
a({
|
|
17
|
+
title: C(n.type, o),
|
|
18
|
+
labels: {
|
|
19
|
+
cancel: o.deleteModal.actions.cancel,
|
|
20
|
+
confirm: o.deleteModal.actions.remove
|
|
21
|
+
},
|
|
22
|
+
children: I(n.type, o),
|
|
23
|
+
onConfirm: () => {
|
|
24
|
+
l(n);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ i(t, { shadow: "md", width: 200, children: [
|
|
29
|
+
/* @__PURE__ */ e(t.Target, { children: /* @__PURE__ */ e(
|
|
30
|
+
d,
|
|
31
|
+
{
|
|
32
|
+
color: "black",
|
|
33
|
+
size: 16,
|
|
34
|
+
"aria-label": "Settings",
|
|
35
|
+
className: M.threadActionIcon,
|
|
36
|
+
variant: "transparent",
|
|
37
|
+
children: /* @__PURE__ */ e(u, { name: "dots-vertical" })
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ i(t.Dropdown, { children: [
|
|
41
|
+
r && /* @__PURE__ */ e(
|
|
42
|
+
t.Item,
|
|
43
|
+
{
|
|
44
|
+
onClick: () => c(n),
|
|
45
|
+
leftSection: /* @__PURE__ */ e(p, { size: 16 }),
|
|
46
|
+
children: o.menuActions.edit
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
t.Item,
|
|
51
|
+
{
|
|
52
|
+
color: "red",
|
|
53
|
+
onClick: s,
|
|
54
|
+
leftSection: /* @__PURE__ */ e(f, { size: 16 }),
|
|
55
|
+
children: o.menuActions.delete
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
y as CommentsListItemMenu
|
|
63
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { RangeSelection, NodeKey } from '@layers-app/editor';
|
|
3
2
|
import { Comment, Comments, GeneralComment, ICommentFile, SharedCommentProps, Thread, UpdateCommentTextArgs } from '../types.ts';
|
|
4
3
|
import * as React from 'react';
|
|
4
|
+
type RangeSelection = any;
|
|
5
|
+
type NodeKey = string;
|
|
5
6
|
interface CommentsPanelListProps extends Omit<SharedCommentProps, 'commentOrThread'> {
|
|
6
7
|
activeIDs: string[];
|
|
7
8
|
comments: Comments;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as i, useEffect as R } from "react";
|
|
3
|
+
import { useCommentsStore as c } from "../store.js";
|
|
4
|
+
import { CommentPanelListItem as S } from "./CommentPanelListItem.js";
|
|
5
|
+
import j from "../CommentsPanel.module.css.js";
|
|
6
|
+
function F({
|
|
7
|
+
activeIDs: n,
|
|
8
|
+
comments: m,
|
|
9
|
+
deleteCommentOrThread: u,
|
|
10
|
+
listRef: a,
|
|
11
|
+
addCommentReaction: p,
|
|
12
|
+
updateThreadId: f,
|
|
13
|
+
submitAddComment: d,
|
|
14
|
+
deleteCommentImage: g,
|
|
15
|
+
removeCommentReactions: y,
|
|
16
|
+
markNodeMap: o,
|
|
17
|
+
resolveThreat: C,
|
|
18
|
+
updateCommentTextOrImage: L
|
|
19
|
+
}) {
|
|
20
|
+
const { selectMarkNode: P } = c(), [s, k] = i(0), [x, E] = i(""), h = c((t) => t.commentsLocales);
|
|
21
|
+
R(() => {
|
|
22
|
+
const t = setTimeout(() => {
|
|
23
|
+
k(s + 1);
|
|
24
|
+
}, 1e4);
|
|
25
|
+
return () => {
|
|
26
|
+
clearTimeout(t);
|
|
27
|
+
};
|
|
28
|
+
}, [s]);
|
|
29
|
+
const I = (t) => {
|
|
30
|
+
E((e) => e === t ? "" : t);
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ r(
|
|
33
|
+
"ul",
|
|
34
|
+
{
|
|
35
|
+
className: j.commentPluginCommentsPanelList,
|
|
36
|
+
ref: a,
|
|
37
|
+
children: m.map((t) => {
|
|
38
|
+
const e = t.id;
|
|
39
|
+
if (t.type === "thread" || t.type === "general")
|
|
40
|
+
return /* @__PURE__ */ r(
|
|
41
|
+
S,
|
|
42
|
+
{
|
|
43
|
+
commentOrThread: t,
|
|
44
|
+
locales: h,
|
|
45
|
+
deleteCommentOrThread: u,
|
|
46
|
+
deleteCommentImage: g,
|
|
47
|
+
addCommentReaction: p,
|
|
48
|
+
removeCommentReactions: y,
|
|
49
|
+
handleClickThread: (K) => {
|
|
50
|
+
if (!K.target || t.type !== "thread") return;
|
|
51
|
+
const l = o?.get(e);
|
|
52
|
+
if (l !== void 0 && (n === null || n.indexOf(e) === -1)) {
|
|
53
|
+
const N = document.activeElement;
|
|
54
|
+
P?.(l, N);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
markNodeMap: o,
|
|
58
|
+
replyInput: x,
|
|
59
|
+
updateThreadId: f,
|
|
60
|
+
toggleRepliesInput: I,
|
|
61
|
+
updateCommentTextOrImage: L,
|
|
62
|
+
resolveThreat: C,
|
|
63
|
+
activeIDs: n,
|
|
64
|
+
submitAddComment: d
|
|
65
|
+
},
|
|
66
|
+
t.clientKey ?? e
|
|
67
|
+
);
|
|
68
|
+
})
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
F as CommentsPanelList
|
|
74
|
+
};
|