@layers-app/shared 0.2.4 → 0.2.6
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/jsons/emoji-categorized-windows.json.js +4 -0
- package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
- package/dist/assets/svg/flags/es.svg.js +4 -0
- package/dist/assets/svg/flags/ru.svg.js +4 -0
- package/dist/assets/svg/flags/us.svg.js +4 -0
- package/dist/assets/svg/globeIcon.svg.js +5 -0
- package/dist/assets/svg/socials/github.svg.js +5 -0
- package/dist/assets/svg/socials/instagram.svg.js +5 -0
- package/dist/assets/svg/socials/x.svg.js +5 -0
- package/dist/assets/svg/socials/youtube.svg.js +5 -0
- package/dist/assets/svg/users.svg.js +5 -0
- package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
- package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +48 -45
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +57 -44
- package/dist/components/AppContainer/components/Main.d.ts +5 -1
- package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Main.js +11 -8
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +45 -42
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +1 -0
- package/dist/components/AppContainer/types.d.ts +2 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +66 -59
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/index.d.ts.map +1 -1
- package/dist/components/Copyright/index.js +6 -6
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +14 -14
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +37 -38
- package/dist/components/EmojiPicker/utils.d.ts +11 -0
- package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
- package/dist/components/EmojiPicker/utils.js +46 -0
- package/dist/components/EntityIcon.d.ts +5 -2
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +44 -46
- package/dist/components/FilePicker/FilePicker.d.ts +33 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +155 -105
- package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
- package/dist/components/FilePicker/types.d.ts +1 -1
- package/dist/components/FilePicker/types.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
- package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
- package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
- package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
- package/dist/components/FormViewer/store/formStore.d.ts +10 -3
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.js +3 -3
- package/dist/components/FormViewer/store/selectors.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +1 -0
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +9 -8
- package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
- package/dist/components/ImageCropper/ImageCropper.js +356 -0
- package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
- package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
- package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
- package/dist/components/ImageCropper/cropUtils.js +42 -0
- package/dist/components/ImageCropper/index.d.ts +4 -0
- package/dist/components/ImageCropper/index.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.js +76 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +26 -22
- package/dist/components/Loaders/styles.module.css.js +1 -1
- package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
- package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
- package/dist/components/MediaLibrary/index.d.ts +4 -0
- package/dist/components/MediaLibrary/index.d.ts.map +1 -0
- package/dist/components/MediaLibrary/types.d.ts +31 -0
- package/dist/components/MediaLibrary/types.d.ts.map +1 -0
- package/dist/components/NavMenu/NavMenu.d.ts +4 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +96 -77
- package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
- package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
- package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDItem.js +32 -30
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.js +28 -26
- package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +108 -94
- package/dist/components/NavMenu/store.d.ts +1 -0
- package/dist/components/NavMenu/store.d.ts.map +1 -1
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NoData/NoData.d.ts +38 -27
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +82 -79
- package/dist/components/OnBoarding/ProjectBoard.js +17 -17
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
- package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
- package/dist/components/SearchFilters/components/DateFilter.js +19 -19
- package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
- package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
- package/dist/components/SettingsSection/index.d.ts +12 -0
- package/dist/components/SettingsSection/index.d.ts.map +1 -0
- package/dist/components/SettingsSection/index.js +36 -0
- package/dist/components/SettingsSection/styles.module.css.js +7 -0
- package/dist/components/SocialLinkRow/index.d.ts +11 -0
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
- package/dist/components/SocialLinkRow/index.js +109 -0
- package/dist/components/SortableList/SortableList.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +4 -12
- package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
- package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
- package/dist/components/StorageUsageProgress/index.d.ts +2 -2
- package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
- package/dist/components/StorageUsageProgress/index.js +76 -41
- package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
- package/dist/components/ThemeIndicator/index.js +4 -4
- package/dist/components/TimezonePicker/index.d.ts +9 -0
- package/dist/components/TimezonePicker/index.d.ts.map +1 -0
- package/dist/components/TimezonePicker/index.js +90 -0
- package/dist/components/UserAvatar/index.js +14 -14
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +18 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +78 -74
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +31 -24
- package/dist/components/table/components/TableHeaders.js +3 -3
- package/dist/components/table/components/TablePanel.js +1 -1
- package/dist/components/table/export.d.ts.map +1 -1
- package/dist/components/table/helpers/columns.js +3 -3
- package/dist/components/table/hooks/TableProvider.js +3 -3
- package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.js +4 -4
- package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
- package/dist/components/table/hooks/useSorting.js +3 -1
- package/dist/components/table/selectors.js +6 -6
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -1
- package/dist/helpers/getFileIcons.js +12 -12
- package/dist/helpers/getFileType.d.ts +1 -2
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +5 -6
- package/dist/helpers/isAppMode.d.ts +1 -1
- package/dist/helpers/isAppMode.d.ts.map +1 -1
- package/dist/helpers/showNotifications.d.ts +14 -3
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +152 -61
- package/dist/helpers/showNotifications.module.css.js +29 -0
- package/dist/helpers/timezones.d.ts +12 -0
- package/dist/helpers/timezones.d.ts.map +1 -0
- package/dist/helpers/timezones.js +59 -0
- package/dist/helpers/validateAliasFormat.d.ts +2 -0
- package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
- package/dist/helpers/validateAliasFormat.js +4 -0
- package/dist/hooks/useNumberQueryParam.js +3 -3
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
- package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
- package/dist/hooks/useVideoUploadGuard.js +24 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +388 -346
- package/dist/lang/locales/ui_en.json.js +24 -22
- package/dist/lang/locales/ui_es.json.js +22 -20
- package/dist/lang/locales/ui_ru.json.js +18 -16
- package/dist/lib/contentImport/index.d.ts +4 -0
- package/dist/lib/contentImport/index.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.js +215 -0
- package/dist/lib/contentImport/types.d.ts +161 -0
- package/dist/lib/contentImport/types.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.d.ts +35 -0
- package/dist/lib/contentImport/utils.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.js +145 -0
- package/dist/node_modules/countries-and-timezones/esm/index.js +4031 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -7
- package/dist/store/trashModal.d.ts +8 -0
- package/dist/store/trashModal.d.ts.map +1 -0
- package/dist/store/trashModal.js +13 -0
- package/dist/types/storageCategories.d.ts +4 -0
- package/dist/types/storageCategories.d.ts.map +1 -0
- package/dist/types/storageCategories.js +21 -0
- package/dist/utils/formatStorage.d.ts +8 -2
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +10 -5
- package/dist/utils/getCroppedBlob.d.ts +3 -0
- package/dist/utils/getCroppedBlob.d.ts.map +1 -0
- package/dist/utils/getCroppedBlob.js +21 -0
- package/docs/README.md +17 -4
- package/package.json +1 -1
- package/dist/assets/fileTypes/archives.svg.js +0 -5
- package/dist/assets/fileTypes/audio.svg.js +0 -5
- package/dist/assets/fileTypes/code.svg.js +0 -5
- package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
- package/dist/assets/fileTypes/images.svg.js +0 -5
- package/dist/assets/fileTypes/other.svg.js +0 -5
- package/dist/assets/fileTypes/videos.svg.js +0 -5
- package/dist/assets/images/flags/es.svg.js +0 -4
- package/dist/assets/images/flags/ru.svg.js +0 -4
- package/dist/assets/images/flags/us.svg.js +0 -4
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
- package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
- package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getIconsList.js +0 -32
- package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
- package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
- package/dist/components/NoData/NoData.module.css.js +0 -7
- package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
- package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
- package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
- package/dist/components/PaymentError/PaymentError.d.ts +0 -2
- package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
- package/dist/components/PaymentError/PaymentError.js +0 -41
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
- package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
- package/dist/store/accessOptionsControl.d.ts +0 -17
- package/dist/store/accessOptionsControl.d.ts.map +0 -1
- package/dist/store/accessOptionsControl.js +0 -18
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_itemImage_1me1c_1", o = "_imageAuthor_1me1c_14", a = "_originalTab_1me1c_22", e = "_customTab_1me1c_28", m = "_button_1me1c_36", _ = {
|
|
2
2
|
itemImage: t,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
imageAuthor: o,
|
|
4
|
+
originalTab: a,
|
|
5
|
+
customTab: e,
|
|
6
|
+
button: m
|
|
6
7
|
};
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
m as button,
|
|
10
|
+
e as customTab,
|
|
10
11
|
_ as default,
|
|
12
|
+
o as imageAuthor,
|
|
11
13
|
t as itemImage,
|
|
12
|
-
|
|
14
|
+
a as originalTab
|
|
13
15
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface GoogleDriveFile {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
mimeType: string;
|
|
5
|
+
thumbnailLink?: string;
|
|
6
|
+
iconLink?: string;
|
|
7
|
+
}
|
|
8
|
+
interface FilePickerGoogleDriveProps {
|
|
9
|
+
isConnected: boolean;
|
|
10
|
+
connectedEmail?: string;
|
|
11
|
+
files: GoogleDriveFile[];
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
isImporting: boolean;
|
|
15
|
+
onSearch: (query: string) => void;
|
|
16
|
+
onLoadMore: () => void;
|
|
17
|
+
onSelect: (file: GoogleDriveFile) => void;
|
|
18
|
+
error: string | null;
|
|
19
|
+
}
|
|
20
|
+
export declare const FilePickerGoogleDrive: ({ isConnected, files, isLoading, hasMore, isImporting, onSearch, onLoadMore, onSelect, error, }: FilePickerGoogleDriveProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=FilePickerGoogleDrive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilePickerGoogleDrive.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerGoogleDrive.tsx"],"names":[],"mappings":"AA6BA,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,0BAA0B;IAClC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,GAAI,iGAUnC,0BAA0B,4CAmH5B,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as C, useRef as D, useEffect as y, useCallback as I } from "react";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import { Search01Icon as G } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as R } from "@hugeicons/react";
|
|
6
|
+
import { Center as h, Stack as a, Loader as g, Text as l, TextInput as V, Box as p, SimpleGrid as F, AspectRatio as L, Button as P } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as j } from "@mantine/hooks";
|
|
8
|
+
import { NoData as w } from "../NoData/NoData.js";
|
|
9
|
+
import { FilePickerSkeletonLoader as B } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import N from "./FilePicker.module.css.js";
|
|
11
|
+
const O = ({
|
|
12
|
+
isConnected: f,
|
|
13
|
+
files: o,
|
|
14
|
+
isLoading: n,
|
|
15
|
+
hasMore: v,
|
|
16
|
+
isImporting: x,
|
|
17
|
+
onSearch: c,
|
|
18
|
+
onLoadMore: k,
|
|
19
|
+
onSelect: b,
|
|
20
|
+
error: s
|
|
21
|
+
}) => {
|
|
22
|
+
const { t } = T("ui"), [m, S] = C(""), [u] = j(m, 800), d = D(c);
|
|
23
|
+
d.current = c, y(() => {
|
|
24
|
+
d.current(u);
|
|
25
|
+
}, [u]);
|
|
26
|
+
const z = I(
|
|
27
|
+
(r) => {
|
|
28
|
+
S(r.currentTarget.value);
|
|
29
|
+
},
|
|
30
|
+
[]
|
|
31
|
+
);
|
|
32
|
+
return x ? /* @__PURE__ */ e(h, { h: 200, children: /* @__PURE__ */ i(a, { align: "center", gap: "xs", children: [
|
|
33
|
+
/* @__PURE__ */ e(g, { size: "sm" }),
|
|
34
|
+
/* @__PURE__ */ e(l, { size: "sm", c: "dimmed", children: t("externalDrive.importing", {
|
|
35
|
+
defaultValue: "Importing file..."
|
|
36
|
+
}) })
|
|
37
|
+
] }) }) : f ? /* @__PURE__ */ i(a, { gap: "sm", children: [
|
|
38
|
+
s && /* @__PURE__ */ e(l, { size: "xs", c: "red", children: s }),
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
V,
|
|
41
|
+
{
|
|
42
|
+
leftSection: n ? /* @__PURE__ */ e(g, { size: 16 }) : /* @__PURE__ */ e(R, { size: 16, icon: G }),
|
|
43
|
+
maxLength: 50,
|
|
44
|
+
placeholder: t("externalDrive.searchFiles", {
|
|
45
|
+
defaultValue: "Search Google Drive"
|
|
46
|
+
}),
|
|
47
|
+
"data-autofocus": !0,
|
|
48
|
+
value: m,
|
|
49
|
+
onChange: z
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ i(p, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
53
|
+
!!o.length && /* @__PURE__ */ i(a, { gap: 8, children: [
|
|
54
|
+
/* @__PURE__ */ e(F, { cols: 4, spacing: 10, children: o.map((r) => /* @__PURE__ */ e(
|
|
55
|
+
L,
|
|
56
|
+
{
|
|
57
|
+
onClick: () => b(r),
|
|
58
|
+
ratio: 120 / 65,
|
|
59
|
+
className: N.itemImage,
|
|
60
|
+
style: {
|
|
61
|
+
backgroundImage: r.thumbnailLink ? `url(${r.thumbnailLink})` : void 0,
|
|
62
|
+
backgroundColor: r.thumbnailLink ? void 0 : "var(--mantine-color-gray-light)"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
r.id
|
|
66
|
+
)) }),
|
|
67
|
+
v && /* @__PURE__ */ e(P, { variant: "subtle", loading: n, onClick: k, children: t("loadMore") })
|
|
68
|
+
] }),
|
|
69
|
+
!o.length && !n && /* @__PURE__ */ e(p, { pb: 16, children: /* @__PURE__ */ e(
|
|
70
|
+
w,
|
|
71
|
+
{
|
|
72
|
+
size: 120,
|
|
73
|
+
illustration: "noImage",
|
|
74
|
+
description: t("changeCover.noResult"),
|
|
75
|
+
titleProps: { size: "xs", c: "dimmed" }
|
|
76
|
+
}
|
|
77
|
+
) }),
|
|
78
|
+
!o.length && n && /* @__PURE__ */ e(B, {})
|
|
79
|
+
] })
|
|
80
|
+
] }) : /* @__PURE__ */ e(h, { h: 200, children: /* @__PURE__ */ e(a, { align: "center", gap: "sm", children: /* @__PURE__ */ e(l, { size: "sm", c: "dimmed", ta: "center", children: t("externalDrive.goToSettings", {
|
|
81
|
+
defaultValue: "Connect Google Drive in Settings to import files"
|
|
82
|
+
}) }) }) });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
O as FilePickerGoogleDrive
|
|
86
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"AAoCA,eAAO,MAAM,kBAAkB,GAAI,yBAGhC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAwHA,CAAC"}
|
|
@@ -1,94 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Search01Icon as
|
|
5
|
-
import { HugeiconsIcon as
|
|
6
|
-
import { Stack as
|
|
7
|
-
import { useDebouncedValue as w, useDebouncedCallback as
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useMemo as z, useEffect as k, useCallback as T } from "react";
|
|
3
|
+
import { useTranslation as L } from "react-i18next";
|
|
4
|
+
import { Search01Icon as j } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as B } from "@hugeicons/react";
|
|
6
|
+
import { Stack as C, TextInput as D, Loader as M, Box as c, SimpleGrid as N, AspectRatio as _, Text as b, Button as q } from "@mantine/core";
|
|
7
|
+
import { useDebouncedValue as w, useDebouncedCallback as A } from "@mantine/hooks";
|
|
8
8
|
import { NoData as F } from "../NoData/NoData.js";
|
|
9
|
-
import { FilePickerSkeletonLoader as
|
|
10
|
-
import { useUnsplashPhotos as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
onChange:
|
|
9
|
+
import { FilePickerSkeletonLoader as Q } from "./FilePickerSkeletonLoader.js";
|
|
10
|
+
import { useUnsplashPhotos as R } from "./api/unsplashApi.js";
|
|
11
|
+
import y from "./FilePicker.module.css.js";
|
|
12
|
+
const x = (l) => (l || []).reduce((s, o) => (s[o.id] = o, s), {}), X = ({
|
|
13
|
+
onChange: l,
|
|
14
14
|
clientId: s
|
|
15
15
|
}) => {
|
|
16
|
-
const { t } =
|
|
16
|
+
const { t: o } = L("ui"), [u, v] = m(""), [h] = w(u, 800), [I, p] = m(1), [d, g] = m({}), { data: r, isLoading: n } = R(
|
|
17
17
|
{
|
|
18
|
-
query:
|
|
18
|
+
query: h,
|
|
19
19
|
page: I,
|
|
20
20
|
per_page: 24,
|
|
21
21
|
order_by: "popular"
|
|
22
22
|
},
|
|
23
23
|
s
|
|
24
|
-
), i =
|
|
25
|
-
() => Object.values({ ...d, ...
|
|
24
|
+
), i = z(
|
|
25
|
+
() => Object.values({ ...d, ...x(r?.items) }),
|
|
26
26
|
[d, r?.items]
|
|
27
|
-
),
|
|
27
|
+
), f = A(() => {
|
|
28
28
|
setTimeout(() => {
|
|
29
|
-
|
|
29
|
+
g((e) => ({ ...e, ...x(r?.items) }));
|
|
30
30
|
}, 0);
|
|
31
31
|
}, 100);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, [r?.items,
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
32
|
+
k(() => {
|
|
33
|
+
f();
|
|
34
|
+
}, [r?.items, f]), k(() => {
|
|
35
|
+
g({});
|
|
36
|
+
}, [h]);
|
|
37
|
+
const S = T(
|
|
38
38
|
(e) => {
|
|
39
|
-
|
|
39
|
+
v(e.currentTarget.value), p(1);
|
|
40
40
|
},
|
|
41
41
|
[]
|
|
42
42
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
43
|
+
return /* @__PURE__ */ a(C, { gap: "sm", children: [
|
|
44
|
+
/* @__PURE__ */ t(
|
|
45
|
+
D,
|
|
46
46
|
{
|
|
47
|
-
leftSection:
|
|
47
|
+
leftSection: n ? /* @__PURE__ */ t(M, { size: 16 }) : /* @__PURE__ */ t(B, { size: 16, icon: j }),
|
|
48
48
|
maxLength: 50,
|
|
49
|
-
placeholder:
|
|
49
|
+
placeholder: o("changeCover.searchImage"),
|
|
50
50
|
"data-autofocus": !0,
|
|
51
|
-
value:
|
|
52
|
-
onChange:
|
|
51
|
+
value: u,
|
|
52
|
+
onChange: S
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */ c
|
|
56
|
-
!!i.length && /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
/* @__PURE__ */ a(c, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
|
|
56
|
+
!!i.length && /* @__PURE__ */ a(C, { gap: 8, children: [
|
|
57
|
+
/* @__PURE__ */ t(N, { cols: 4, spacing: 10, children: i.map((e) => /* @__PURE__ */ a(c, { children: [
|
|
58
|
+
/* @__PURE__ */ t(
|
|
59
|
+
_,
|
|
60
|
+
{
|
|
61
|
+
onClick: () => l?.(e.urls.regular),
|
|
62
|
+
ratio: 120 / 65,
|
|
63
|
+
className: y.itemImage,
|
|
64
|
+
style: {
|
|
65
|
+
backgroundImage: `url(${e.urls.small})`
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ t(c, { className: y.imageAuthor, children: /* @__PURE__ */ a(b, { truncate: !0, c: "gray", size: "xs", children: [
|
|
70
|
+
o("changeCover.photoBy"),
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
b,
|
|
74
|
+
{
|
|
75
|
+
component: "a",
|
|
76
|
+
inherit: !0,
|
|
77
|
+
href: e.user.links.html,
|
|
78
|
+
target: "_blank",
|
|
79
|
+
rel: "noopener noreferrer",
|
|
80
|
+
onClick: (P) => P.stopPropagation(),
|
|
81
|
+
children: e.user.name
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] }) })
|
|
85
|
+
] }, e.id)) }),
|
|
86
|
+
r?.hasMore && /* @__PURE__ */ t(
|
|
70
87
|
q,
|
|
71
88
|
{
|
|
72
89
|
variant: "subtle",
|
|
73
|
-
loading:
|
|
90
|
+
loading: n,
|
|
74
91
|
onClick: () => p((e) => e + 1),
|
|
75
|
-
children:
|
|
92
|
+
children: o("loadMore")
|
|
76
93
|
}
|
|
77
94
|
)
|
|
78
95
|
] }),
|
|
79
|
-
!i.length && !
|
|
96
|
+
!i.length && !n && /* @__PURE__ */ t(c, { pb: 16, children: /* @__PURE__ */ t(
|
|
80
97
|
F,
|
|
81
98
|
{
|
|
82
99
|
size: 120,
|
|
83
100
|
illustration: "noImage",
|
|
84
|
-
description:
|
|
101
|
+
description: o("changeCover.noResult"),
|
|
85
102
|
titleProps: { size: "xs", c: "dimmed" }
|
|
86
103
|
}
|
|
87
104
|
) }),
|
|
88
|
-
!i.length &&
|
|
105
|
+
!i.length && n && /* @__PURE__ */ t(Q, {})
|
|
89
106
|
] })
|
|
90
107
|
] });
|
|
91
108
|
};
|
|
92
109
|
export {
|
|
93
|
-
|
|
110
|
+
X as FilePickerUnsplash
|
|
94
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_themeProvider_1lm79_1", o = "_root_1lm79_7", e = "_container_1lm79_36", n = "_media_1lm79_42", _ = "_background_1lm79_46", s = "_stepRoot_1lm79_59", c = "_content_1lm79_104", l = "_mediaInner_1lm79_169", i = "_stepTitle_1lm79_332", a = "_stepDescription_1lm79_355", r = "_stepIndicator_1lm79_369", d = "_stepIndicatorIcon_1lm79_386", m = "_focusBox_1lm79_405", p = "_dropzone_1lm79_414", u = "_allSlidesLayout_1lm79_432", I = "_allSlidesLayoutStep_1lm79_438", S = {
|
|
2
2
|
themeProvider: t,
|
|
3
3
|
root: o,
|
|
4
4
|
container: e,
|
|
5
5
|
media: n,
|
|
6
6
|
background: _,
|
|
7
|
-
stepRoot:
|
|
8
|
-
content:
|
|
9
|
-
mediaInner:
|
|
10
|
-
stepTitle:
|
|
11
|
-
stepDescription:
|
|
12
|
-
stepIndicator:
|
|
7
|
+
stepRoot: s,
|
|
8
|
+
content: c,
|
|
9
|
+
mediaInner: l,
|
|
10
|
+
stepTitle: i,
|
|
11
|
+
stepDescription: a,
|
|
12
|
+
stepIndicator: r,
|
|
13
13
|
stepIndicatorIcon: d,
|
|
14
|
-
focusBox:
|
|
15
|
-
dropzone:
|
|
14
|
+
focusBox: m,
|
|
15
|
+
dropzone: p,
|
|
16
16
|
allSlidesLayout: u,
|
|
17
17
|
allSlidesLayoutStep: I
|
|
18
18
|
};
|
|
@@ -21,17 +21,17 @@ export {
|
|
|
21
21
|
I as allSlidesLayoutStep,
|
|
22
22
|
_ as background,
|
|
23
23
|
e as container,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
c as content,
|
|
25
|
+
S as default,
|
|
26
|
+
p as dropzone,
|
|
27
|
+
m as focusBox,
|
|
28
28
|
n as media,
|
|
29
|
-
|
|
29
|
+
l as mediaInner,
|
|
30
30
|
o as root,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
a as stepDescription,
|
|
32
|
+
r as stepIndicator,
|
|
33
33
|
d as stepIndicatorIcon,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
s as stepRoot,
|
|
35
|
+
i as stepTitle,
|
|
36
36
|
t as themeProvider
|
|
37
37
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
|
|
1
|
+
import { PictureChoiceControl, PictureChoiceControlItem, ThemeData } from '../../../types/form';
|
|
2
2
|
export type PictureChoiceCardProps = {
|
|
3
3
|
label: string;
|
|
4
4
|
showInput?: boolean;
|
|
@@ -8,6 +8,8 @@ export type PictureChoiceCardProps = {
|
|
|
8
8
|
controlId: string;
|
|
9
9
|
id: string;
|
|
10
10
|
theme?: ThemeData;
|
|
11
|
+
stepId: string;
|
|
12
|
+
options: PictureChoiceControl['options'];
|
|
11
13
|
};
|
|
12
|
-
export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
14
|
+
export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, stepId, options, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
13
15
|
//# sourceMappingURL=PictureChoiceCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,gIAYzB,sBAAsB,6CAkD1B,CAAC"}
|
|
@@ -1,37 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useSteps as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { memo as F, useCallback as U } from "react";
|
|
3
|
+
import { useSteps as b } from "../../../hooks/useCreateFormContext.js";
|
|
4
|
+
import { useFormViewerStore as x } from "../../../store/formStore.js";
|
|
5
|
+
import { PictureSelectableCard as P } from "../SelectableCard/PictureSelectableCard.js";
|
|
6
|
+
const L = F(
|
|
6
7
|
({
|
|
7
|
-
label:
|
|
8
|
-
showInput:
|
|
9
|
-
onUpdate:
|
|
10
|
-
onRemove:
|
|
11
|
-
image:
|
|
8
|
+
label: n,
|
|
9
|
+
showInput: c,
|
|
10
|
+
onUpdate: u,
|
|
11
|
+
onRemove: m,
|
|
12
|
+
image: p,
|
|
12
13
|
controlId: e,
|
|
13
|
-
id:
|
|
14
|
-
theme:
|
|
14
|
+
id: o,
|
|
15
|
+
theme: f,
|
|
16
|
+
stepId: t,
|
|
17
|
+
options: i
|
|
15
18
|
}) => {
|
|
16
|
-
const { form:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const { form: d, setValue: C } = b(), { useStore: h } = x(), s = h((r) => r.uploadFileFn), a = d.values[e] === o, S = () => {
|
|
20
|
+
C(e, a ? null : o);
|
|
21
|
+
}, V = U(
|
|
22
|
+
(r, k) => {
|
|
23
|
+
const l = r[0];
|
|
24
|
+
return s?.(
|
|
25
|
+
{
|
|
26
|
+
file: l,
|
|
27
|
+
id: l.name,
|
|
28
|
+
isError: !1,
|
|
29
|
+
isLoading: !0,
|
|
30
|
+
isSuccess: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
stepId: t,
|
|
34
|
+
controlId: e,
|
|
35
|
+
optionId: o,
|
|
36
|
+
setOpen: k,
|
|
37
|
+
pictureChoiceOptions: i
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
[e, o, s, i, t]
|
|
42
|
+
);
|
|
43
|
+
return /* @__PURE__ */ v(
|
|
44
|
+
P,
|
|
19
45
|
{
|
|
20
|
-
label:
|
|
21
|
-
hasInput:
|
|
46
|
+
label: n,
|
|
47
|
+
hasInput: c,
|
|
22
48
|
inputType: "radio",
|
|
23
|
-
active:
|
|
24
|
-
onClick:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
theme: s
|
|
49
|
+
active: a,
|
|
50
|
+
onClick: S,
|
|
51
|
+
onUpdate: u,
|
|
52
|
+
onRemove: m,
|
|
53
|
+
image: p,
|
|
54
|
+
theme: f,
|
|
55
|
+
onUpload: V
|
|
31
56
|
}
|
|
32
57
|
);
|
|
33
58
|
}
|
|
34
59
|
);
|
|
35
60
|
export {
|
|
36
|
-
|
|
61
|
+
L as PictureChoiceCard
|
|
37
62
|
};
|
package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PictureChoiceField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.tsx"],"names":[],"mappings":"AAYA,OAAO,EACL,oBAAoB,EAEpB,QAAQ,EACR,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,kBAAkB,GAAI,2BAIhC;IACD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"PictureChoiceField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.tsx"],"names":[],"mappings":"AAYA,OAAO,EACL,oBAAoB,EAEpB,QAAQ,EACR,SAAS,EACV,MAAM,qBAAqB,CAAC;AAK7B,eAAO,MAAM,kBAAkB,GAAI,2BAIhC;IACD,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,4CAqGA,CAAC"}
|
|
@@ -13,42 +13,44 @@ import { DragOptions as j } from "../DragOptions/DragOptions.js";
|
|
|
13
13
|
import { PictureChoiceCard as k } from "./PictureChoiceCard.js";
|
|
14
14
|
const Y = ({
|
|
15
15
|
control: I,
|
|
16
|
-
step:
|
|
16
|
+
step: t,
|
|
17
17
|
theme: m
|
|
18
18
|
}) => {
|
|
19
|
-
const { t: C } = A("forms"), { id: r, options:
|
|
20
|
-
const { active:
|
|
21
|
-
if (
|
|
22
|
-
const E =
|
|
23
|
-
s.updateControl(
|
|
19
|
+
const { t: C } = A("forms"), { id: r, options: o, showInput: l } = I, { api: s, useStore: g } = N(), n = g((i) => i.editing), { form: x } = B(), c = x.errors[r], O = (i) => {
|
|
20
|
+
const { active: e, over: d } = i;
|
|
21
|
+
if (e.id !== d?.id && o) {
|
|
22
|
+
const E = o.findIndex((p) => p.id === e.id), v = o.findIndex((p) => p.id === d?.id), w = L(o, E, v);
|
|
23
|
+
s.updateControl(t.id, r, {
|
|
24
24
|
options: w
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
}, f = M(), S = h(() =>
|
|
28
|
-
id:
|
|
27
|
+
}, f = M(), S = h(() => o?.map((i) => ({
|
|
28
|
+
id: i.id || "",
|
|
29
29
|
element: /* @__PURE__ */ a(
|
|
30
30
|
k,
|
|
31
31
|
{
|
|
32
|
-
...
|
|
33
|
-
label:
|
|
32
|
+
...i,
|
|
33
|
+
label: n ? i.label : f(i.label),
|
|
34
34
|
controlId: r,
|
|
35
35
|
showInput: l,
|
|
36
36
|
theme: m,
|
|
37
|
-
onUpdate:
|
|
38
|
-
s.updateControl(
|
|
39
|
-
options:
|
|
40
|
-
(
|
|
37
|
+
onUpdate: n ? (e) => {
|
|
38
|
+
s.updateControl(t.id, r, {
|
|
39
|
+
options: o.map(
|
|
40
|
+
(d) => d.id === i.id ? { ...d, ...e } : d
|
|
41
41
|
)
|
|
42
42
|
});
|
|
43
43
|
} : void 0,
|
|
44
|
-
onRemove:
|
|
45
|
-
s.updateControl(
|
|
46
|
-
options:
|
|
44
|
+
onRemove: n ? () => {
|
|
45
|
+
s.updateControl(t.id, r, {
|
|
46
|
+
options: o.filter((e) => e.id !== i.id)
|
|
47
47
|
});
|
|
48
|
-
} : void 0
|
|
48
|
+
} : void 0,
|
|
49
|
+
stepId: t.id,
|
|
50
|
+
options: o
|
|
49
51
|
}
|
|
50
52
|
)
|
|
51
|
-
})), [s,
|
|
53
|
+
})), [s, n, r, f, o, l, t.id, m]);
|
|
52
54
|
return /* @__PURE__ */ b(
|
|
53
55
|
R,
|
|
54
56
|
{
|
|
@@ -60,20 +62,20 @@ const Y = ({
|
|
|
60
62
|
/* @__PURE__ */ a(
|
|
61
63
|
j,
|
|
62
64
|
{
|
|
63
|
-
editable:
|
|
65
|
+
editable: n,
|
|
64
66
|
options: S,
|
|
65
67
|
onDragEnd: O,
|
|
66
68
|
isGrid: !0,
|
|
67
69
|
align: m?.align
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
|
-
|
|
72
|
+
n && /* @__PURE__ */ a(T, { mx: -8, children: /* @__PURE__ */ a(
|
|
71
73
|
P,
|
|
72
74
|
{
|
|
73
75
|
onClick: () => {
|
|
74
|
-
s.updateControl(
|
|
76
|
+
s.updateControl(t.id, r, {
|
|
75
77
|
options: [
|
|
76
|
-
...
|
|
78
|
+
...o || [],
|
|
77
79
|
{
|
|
78
80
|
id: _(),
|
|
79
81
|
label: C("newOption")
|
package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FileWithPath } from '@mantine/dropzone';
|
|
2
3
|
import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
|
|
3
4
|
type PictureSelectableCardProps = {
|
|
4
5
|
label: string;
|
|
@@ -11,12 +12,14 @@ type PictureSelectableCardProps = {
|
|
|
11
12
|
onRemove?: () => void;
|
|
12
13
|
onUpdate?: (v: Partial<PictureChoiceControlItem>) => void;
|
|
13
14
|
theme?: ThemeData;
|
|
15
|
+
onUpload?: (files: FileWithPath[], setOpened: (state: boolean) => void) => void;
|
|
14
16
|
};
|
|
15
|
-
export declare const PictureSelectableCard: import("react").MemoExoticComponent<({ label, active, disabled, hasInput, image, onClick, inputType, onUpdate, onRemove, theme, }: PictureSelectableCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
16
|
-
export declare const UploadOptionImageButton: ({ children, onUpdate, onRemove, hasImage, }: PropsWithChildren<{
|
|
17
|
+
export declare const PictureSelectableCard: import("react").MemoExoticComponent<({ label, active, disabled, hasInput, image, onClick, inputType, onUpdate, onRemove, theme, onUpload, }: PictureSelectableCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
|
+
export declare const UploadOptionImageButton: ({ children, onUpdate, onRemove, hasImage, onUpload, }: PropsWithChildren<{
|
|
17
19
|
onUpdate?: (v: Partial<PictureChoiceControlItem>) => void;
|
|
18
20
|
onRemove?: () => void;
|
|
19
21
|
hasImage?: boolean;
|
|
22
|
+
onUpload?: (files: FileWithPath[], setOpened: (state: boolean) => void) => void;
|
|
20
23
|
}>) => import("react/jsx-runtime").JSX.Element;
|
|
21
24
|
export {};
|
|
22
25
|
//# sourceMappingURL=PictureSelectableCard.d.ts.map
|
package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PictureSelectableCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PictureSelectableCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,OAAO,CAAC;AAYzD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAOjD,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAQ1E,KAAK,0BAA0B,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,YAAY,EAAE,EACrB,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAChC,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,qBAAqB,+IAa7B,0BAA0B,6CAsI9B,CAAC;AAeF,eAAO,MAAM,uBAAuB,GAAI,uDAMrC,iBAAiB,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CACT,KAAK,EAAE,YAAY,EAAE,EACrB,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,KAChC,IAAI,CAAC;CACX,CAAC,4CAsBD,CAAC"}
|