@edifice.io/react 2.0.0-develop-rc.12 → 2.0.0-develop-rc.13
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/README.md +88 -17
- package/dist/common/OnboardingModal/OnboardingModal.js +59 -0
- package/dist/common/OnboardingModal/useOnboardingModal.js +30 -0
- package/dist/{modules/modals → common}/PublishModal/PublishModal.d.ts +1 -1
- package/dist/common/PublishModal/PublishModal.js +120 -0
- package/dist/common/PublishModal/components/ActivitiesDropdown.js +29 -0
- package/dist/common/PublishModal/components/AgeSelect.js +20 -0
- package/dist/common/PublishModal/components/LangSelect.js +19 -0
- package/dist/common/PublishModal/components/PublishModalFooter.js +23 -0
- package/dist/common/PublishModal/components/SubjectsDropdown.js +29 -0
- package/dist/common/PublishModal/components/ToastError.js +24 -0
- package/dist/{modules/modals → common}/PublishModal/components/ToastSuccess.d.ts +1 -1
- package/dist/common/PublishModal/components/ToastSuccess.js +18 -0
- package/dist/common/PublishModal/constants/ageOptions.js +4 -0
- package/dist/{modules/modals → common}/PublishModal/hooks/useActivitiesOptions.js +4 -5
- package/dist/common/PublishModal/hooks/useLanguageOptions.js +43 -0
- package/dist/{modules/modals → common}/PublishModal/hooks/usePublishModal.d.ts +1 -1
- package/dist/common/PublishModal/hooks/usePublishModal.js +106 -0
- package/dist/{modules/modals → common}/PublishModal/hooks/useSubjectsOptions.js +41 -42
- package/dist/{modules/modals → common}/ResourceModal/ResourceModal.d.ts +3 -3
- package/dist/common/ResourceModal/ResourceModal.js +156 -0
- package/dist/{modules/modals → common}/ResourceModal/apps/BlogPublic.d.ts +2 -2
- package/dist/common/ResourceModal/apps/BlogPublic.js +62 -0
- package/dist/{modules/modals → common}/ResourceModal/hooks/useSlug.d.ts +1 -1
- package/dist/common/ResourceModal/hooks/useSlug.js +41 -0
- package/dist/{modules/modals → common}/ResourceModal/hooks/useThumb.d.ts +1 -1
- package/dist/common/ResourceModal/hooks/useThumb.js +17 -0
- package/dist/{modules/modals → common}/ResourceModal/hooks/useUpdateMutation.d.ts +3 -3
- package/dist/common/ResourceModal/hooks/useUpdateMutation.js +12 -0
- package/dist/common/ResourceModal/index.d.ts +3 -0
- package/dist/common/ShareModal/ShareBookmark.js +22 -0
- package/dist/{modules/modals → common}/ShareModal/ShareBookmarkLine.d.ts +1 -1
- package/dist/common/ShareModal/ShareBookmarkLine.js +42 -0
- package/dist/{modules/modals → common}/ShareModal/ShareModal.d.ts +2 -2
- package/dist/common/ShareModal/ShareModal.js +128 -0
- package/dist/common/ShareModal/apps/ShareBlog.d.ts +8 -0
- package/dist/common/ShareModal/apps/ShareBlog.js +43 -0
- package/dist/{modules/modals → common}/ShareModal/hooks/useSearch.d.ts +2 -2
- package/dist/common/ShareModal/hooks/useSearch.js +178 -0
- package/dist/{modules/modals → common}/ShareModal/hooks/useShare.d.ts +1 -1
- package/dist/common/ShareModal/hooks/useShare.js +192 -0
- package/dist/{modules/modals → common}/ShareModal/hooks/useShareBookmark.d.ts +1 -1
- package/dist/common/ShareModal/hooks/useShareBookmark.js +67 -0
- package/dist/{modules/modals → common}/ShareModal/hooks/useShareMutation.d.ts +3 -3
- package/dist/common/ShareModal/hooks/useShareMutation.js +15 -0
- package/dist/common/ShareModal/index.d.ts +3 -0
- package/dist/{modules/modals → common}/ShareModal/utils/hasRight.d.ts +1 -1
- package/dist/common/ShareModal/utils/hasRight.js +4 -0
- package/dist/{modules/modals → common}/ShareModal/utils/showShareRightLine.d.ts +1 -1
- package/dist/common/ShareModal/utils/showShareRightLine.js +4 -0
- package/dist/components/ActionBar/ActionBar.d.ts +1 -1
- package/dist/components/ActionBar/ActionBar.js +6 -8
- package/dist/components/ActionBar/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/Alert.js +60 -62
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/AppHeader/AppHeader.js +18 -20
- package/dist/components/AppHeader/index.d.ts +1 -0
- package/dist/components/AppIcon/AppIcon.d.ts +1 -1
- package/dist/components/AppIcon/AppIcon.js +44 -45
- package/dist/components/Attachment/Attachment.d.ts +1 -1
- package/dist/components/Attachment/Attachment.js +13 -15
- package/dist/components/Attachment/index.d.ts +1 -0
- package/dist/{modules/audience → components/Audience}/ReactionChoice.d.ts +1 -1
- package/dist/components/Audience/ReactionChoice.js +33 -0
- package/dist/{modules/audience → components/Audience}/ReactionModal.Card.d.ts +1 -1
- package/dist/components/Audience/ReactionModal.Card.js +33 -0
- package/dist/{modules/audience → components/Audience}/ReactionModal.d.ts +1 -1
- package/dist/components/Audience/ReactionModal.js +73 -0
- package/dist/{modules/audience → components/Audience}/ReactionSummary.d.ts +1 -1
- package/dist/components/Audience/ReactionSummary.js +27 -0
- package/dist/{modules/audience → components/Audience}/ViewsByProfileCard.d.ts +1 -1
- package/dist/components/Audience/ViewsByProfileCard.js +36 -0
- package/dist/components/Audience/ViewsCounter.js +18 -0
- package/dist/{modules/audience → components/Audience}/ViewsModal.d.ts +1 -1
- package/dist/components/Audience/ViewsModal.js +40 -0
- package/dist/{modules/audience → components/Audience}/hooks/useReactionIcons.d.ts +1 -1
- package/dist/components/Audience/hooks/useReactionIcons.js +38 -0
- package/dist/{modules/audience → components/Audience}/hooks/useReactions.d.ts +3 -3
- package/dist/components/Audience/hooks/useReactions.js +35 -0
- package/dist/{modules/audience → components/Audience}/hooks/useViews.d.ts +2 -2
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +27 -29
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +20 -22
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +23 -24
- package/dist/components/Breadcrumb/BreadcrumbItem.js +11 -12
- package/dist/components/Breadcrumb/BreadcrumbList.js +10 -11
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbNav.js +15 -16
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +32 -34
- package/dist/components/Button/IconButton.d.ts +1 -1
- package/dist/components/Button/IconButton.js +15 -17
- package/dist/components/Button/SearchButton.d.ts +1 -1
- package/dist/components/Button/SearchButton.js +15 -17
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Card/Card.d.ts +4 -4
- package/dist/components/Card/Card.js +47 -49
- package/dist/components/Card/CardBody.d.ts +1 -1
- package/dist/components/Card/CardBody.js +13 -14
- package/dist/components/Card/CardContext.d.ts +1 -1
- package/dist/components/Card/CardContext.js +7 -8
- package/dist/components/Card/CardFooter.js +5 -6
- package/dist/components/Card/CardHeader.js +14 -15
- package/dist/components/Card/CardImage.d.ts +1 -1
- package/dist/components/Card/CardImage.js +13 -14
- package/dist/components/Card/CardText.js +8 -9
- package/dist/components/Card/CardTitle.js +8 -9
- package/dist/components/Card/CardUser.js +8 -9
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +30 -32
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPalette.js +4 -5
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +28 -30
- package/dist/components/ColorPicker/ColorPickerItem.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPickerItem.js +11 -13
- package/dist/components/ColorPicker/index.d.ts +3 -1
- package/dist/components/Combobox/Combobox.d.ts +1 -1
- package/dist/components/Combobox/Combobox.js +35 -36
- package/dist/components/Combobox/ComboboxTrigger.js +21 -22
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.js +55 -57
- package/dist/components/Dropdown/DropdownCheckboxItem.js +26 -27
- package/dist/components/Dropdown/DropdownContext.js +7 -8
- package/dist/components/Dropdown/DropdownItem.js +27 -28
- package/dist/components/Dropdown/DropdownMenu.js +21 -22
- package/dist/components/Dropdown/DropdownMenuGroup.js +9 -10
- package/dist/components/Dropdown/DropdownRadioItem.js +26 -27
- package/dist/components/Dropdown/DropdownSeparator.js +3 -4
- package/dist/components/Dropdown/DropdownTrigger.js +28 -29
- package/dist/components/Dropdown/index.d.ts +1 -0
- package/dist/components/Dropzone/Dropzone.d.ts +1 -1
- package/dist/components/Dropzone/Dropzone.js +47 -48
- package/dist/components/Dropzone/DropzoneContext.js +8 -9
- package/dist/components/Dropzone/DropzoneDrag.js +7 -8
- package/dist/components/Dropzone/DropzoneFile.js +25 -26
- package/dist/components/Dropzone/DropzoneImport.js +20 -21
- package/dist/components/Dropzone/index.d.ts +1 -0
- package/dist/components/EmptyScreen/EmptyScreen.d.ts +1 -1
- package/dist/components/EmptyScreen/EmptyScreen.js +16 -18
- package/dist/components/EmptyScreen/index.d.ts +1 -0
- package/dist/components/FileCard/FileCard.d.ts +2 -2
- package/dist/components/FileCard/FileCard.js +37 -39
- package/dist/components/FileCard/FileIcon.d.ts +1 -1
- package/dist/components/FileCard/FileIcon.js +11 -12
- package/dist/components/FileCard/index.d.ts +1 -0
- package/dist/components/Form/FormContext.js +7 -8
- package/dist/components/Form/FormControl.d.ts +1 -1
- package/dist/components/Form/FormControl.js +30 -32
- package/dist/components/Form/FormText.d.ts +1 -1
- package/dist/components/Form/FormText.js +12 -14
- package/dist/components/Form/index.d.ts +2 -1
- package/dist/components/Grid/Grid.js +27 -28
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/Heading/Heading.js +14 -16
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +1 -1
- package/dist/components/Image/Image.js +39 -41
- package/dist/components/Image/index.d.ts +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +1 -1
- package/dist/components/ImagePicker/ImagePicker.js +51 -52
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +28 -30
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.js +30 -32
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/Loading/Loading.d.ts +1 -1
- package/dist/components/Loading/Loading.js +23 -25
- package/dist/components/Loading/index.d.ts +1 -0
- package/dist/components/LoadingScreen/LoadingScreen.d.ts +1 -1
- package/dist/components/LoadingScreen/LoadingScreen.js +20 -22
- package/dist/components/LoadingScreen/index.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts +1 -1
- package/dist/components/Logo/Logo.js +12 -14
- package/dist/components/Logo/index.d.ts +1 -0
- package/dist/components/Menu/Menu.js +39 -40
- package/dist/components/Menu/MenuButton.js +17 -18
- package/dist/components/Menu/MenuContext.js +8 -9
- package/dist/components/Menu/MenuItem.js +14 -15
- package/dist/components/Modal/Modal.d.ts +4 -1
- package/dist/components/Modal/Modal.js +49 -51
- package/dist/components/Modal/ModalBody.js +11 -12
- package/dist/components/Modal/ModalContext.js +8 -9
- package/dist/components/Modal/ModalFooter.js +3 -4
- package/dist/components/Modal/ModalHeader.js +22 -23
- package/dist/components/Modal/ModalSubtitle.js +3 -4
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Popover/Popover.js +33 -34
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js +26 -28
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +29 -31
- package/dist/components/SearchBar/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.js +31 -33
- package/dist/components/Select/SelectTrigger.js +4 -5
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Table/Table.components.d.ts +20 -0
- package/dist/components/Table/Table.components.js +39 -0
- package/dist/components/Table/Table.d.ts +33 -0
- package/dist/components/Table/Table.js +16 -0
- package/dist/components/Table/TableExplorer.d.ts +1 -1
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +58 -59
- package/dist/components/Tabs/TabsContext.js +8 -9
- package/dist/components/Tabs/TabsItem.js +20 -21
- package/dist/components/Tabs/TabsList.js +18 -19
- package/dist/components/Tabs/TabsPanel.js +9 -10
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextArea/TextArea.js +31 -33
- package/dist/components/TextArea/TextareaCounter.js +6 -7
- package/dist/components/TextArea/index.d.ts +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +1 -1
- package/dist/components/Toolbar/Toolbar.js +60 -62
- package/dist/components/Toolbar/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +28 -30
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/TreeView/TreeItem.js +46 -47
- package/dist/components/TreeView/TreeView.d.ts +1 -1
- package/dist/components/TreeView/TreeView.js +33 -35
- package/dist/components/TreeView/hooks/useTreeItemEvents.js +18 -19
- package/dist/components/TreeView/index.d.ts +1 -0
- package/dist/components/UploadCard/UploadCard.js +52 -53
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js +6 -8
- package/dist/components/VisuallyHidden/index.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +1 -1
- package/dist/core/OdeClientProvider/OdeClientProvider.js +44 -45
- package/dist/core/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/core/ThemeProvider/ThemeProvider.js +36 -36
- package/dist/core/index.d.ts +1 -0
- package/dist/core/useAvatar/useAvatar.d.ts +1 -1
- package/dist/core/useAvatar/useAvatar.js +21 -22
- package/dist/core/useBookmark/useBookmark.d.ts +1 -1
- package/dist/core/useBookmark/useBookmark.js +9 -10
- package/dist/core/useCantoo/index.d.ts +1 -0
- package/dist/core/useCantoo/useCantoo.d.ts +1 -0
- package/dist/core/useCantoo/useCantoo.js +18 -0
- package/dist/core/useConf/useConf.d.ts +1 -1
- package/dist/core/useConf/useConf.js +7 -8
- package/dist/core/useConversation/useConversation.js +29 -30
- package/dist/core/useCookiesConsent/useCookiesConsent.js +16 -17
- package/dist/core/useDate/useDate.js +35 -36
- package/dist/core/useHasWorkflow/useHasWorkflow.js +15 -16
- package/dist/core/useHeader/useHeader.d.ts +1 -1
- package/dist/core/useHeader/useHeader.js +45 -42
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js +17 -18
- package/dist/core/useIsAdml/useIsAdml.js +11 -12
- package/dist/core/useLibraryUrl/useLibraryUrl.js +16 -17
- package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +2 -2
- package/dist/core/useMediaLibrary/useMediaLibrary.js +32 -33
- package/dist/core/useOdeIcons/useOdeIcons.d.ts +1 -1
- package/dist/core/useOdeIcons/useOdeIcons.js +37 -38
- package/dist/core/usePaths/usePaths.js +2 -3
- package/dist/core/usePreferences/usePreferences.js +5 -6
- package/dist/core/useResource/useResource.d.ts +1 -1
- package/dist/core/useResource/useResource.js +14 -15
- package/dist/core/useResourceSearch/useResourceSearch.d.ts +1 -1
- package/dist/core/useResourceSearch/useResourceSearch.js +22 -23
- package/dist/core/useSession/useSession.js +6 -7
- package/dist/core/useTrashedResource/useTrashedResource.js +18 -19
- package/dist/core/useUpload/useUpload.d.ts +1 -1
- package/dist/core/useUpload/useUpload.js +68 -69
- package/dist/core/useUploadFiles/useUploadFiles.d.ts +1 -1
- package/dist/core/useUploadFiles/useUploadFiles.js +82 -83
- package/dist/core/useUser/useUser.d.ts +1 -1
- package/dist/core/useUser/useUser.js +15 -16
- package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +1 -1
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js +31 -32
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +1 -1
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +41 -42
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +17 -18
- package/dist/core/useZendeskGuide/useZendeskGuide.js +46 -47
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +11 -12
- package/dist/hooks/useClickOutside/useClickOutside.js +18 -19
- package/dist/hooks/useDebounce/useDebounce.js +10 -11
- package/dist/hooks/useDropdown/useDropdown.d.ts +1 -1
- package/dist/hooks/useDropdown/useDropdown.js +96 -97
- package/dist/hooks/useDropzone/useDropzone.js +53 -54
- package/dist/hooks/useHover/useHover.js +14 -15
- package/dist/hooks/useImage/useImage.js +13 -14
- package/dist/hooks/useImageResizer/useImageResizer.js +31 -32
- package/dist/hooks/useKeyPress/useKeyPress.js +10 -11
- package/dist/hooks/useScrollToTop/useScrollToTop.js +4 -5
- package/dist/hooks/useThumbnail/useThumbnail.js +21 -22
- package/dist/hooks/useTitle/useTitle.js +7 -8
- package/dist/hooks/useToast/useToast.js +25 -26
- package/dist/hooks/useToggle/useToggle.js +6 -7
- package/dist/hooks/useTrapFocus/useTrapFocus.js +11 -12
- package/dist/index.d.ts +3 -1
- package/dist/index.js +274 -226
- package/dist/{modules/multimedia → multimedia}/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/dist/multimedia/AudioRecorder/AudioRecorder.js +49 -0
- package/dist/multimedia/AudioRecorder/AudioRecorderTimer.js +24 -0
- package/dist/{modules/multimedia → multimedia}/AudioRecorder/useAudioRecorder.d.ts +2 -2
- package/dist/multimedia/AudioRecorder/useAudioRecorder.js +307 -0
- package/dist/multimedia/Embed/Embed.js +32 -0
- package/dist/multimedia/ImageEditor/components/ImageEditor.js +116 -0
- package/dist/multimedia/ImageEditor/components/ImageEditorToolbar.js +69 -0
- package/dist/multimedia/ImageEditor/effects/blur.js +72 -0
- package/dist/multimedia/ImageEditor/effects/crop.js +155 -0
- package/dist/multimedia/ImageEditor/effects/misc.js +162 -0
- package/dist/multimedia/ImageEditor/effects/resize.js +157 -0
- package/dist/multimedia/ImageEditor/effects/rotate.js +33 -0
- package/dist/multimedia/ImageEditor/hooks/useHistoryTool.js +66 -0
- package/dist/multimedia/ImageEditor/hooks/useImageEditor.js +76 -0
- package/dist/multimedia/ImageEditor/hooks/useImageEffects.js +52 -0
- package/dist/multimedia/ImageEditor/utils/aggregate.js +13 -0
- package/dist/{modules/multimedia → multimedia}/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +1 -1
- package/dist/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +39 -0
- package/dist/multimedia/Linker/ExternalLinker.js +45 -0
- package/dist/{modules/multimedia → multimedia}/Linker/InternalLinker.d.ts +1 -1
- package/dist/multimedia/Linker/InternalLinker.js +114 -0
- package/dist/{modules/multimedia → multimedia}/LinkerCard/LinkerCard.d.ts +3 -3
- package/dist/multimedia/LinkerCard/LinkerCard.js +38 -0
- package/dist/multimedia/LinkerCard/index.d.ts +2 -0
- package/dist/{modules/multimedia → multimedia}/MediaLibrary/MediaLibrary.d.ts +2 -2
- package/dist/multimedia/MediaLibrary/MediaLibrary.js +211 -0
- package/dist/{modules/multimedia → multimedia}/MediaLibrary/MediaLibraryContext.d.ts +2 -2
- package/dist/multimedia/MediaLibrary/MediaLibraryContext.js +12 -0
- package/dist/multimedia/MediaLibrary/innertabs/Audio.js +19 -0
- package/dist/multimedia/MediaLibrary/innertabs/ExternalLink.js +17 -0
- package/dist/multimedia/MediaLibrary/innertabs/Iframe.js +14 -0
- package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/InternalLink.d.ts +1 -1
- package/dist/multimedia/MediaLibrary/innertabs/InternalLink.js +35 -0
- package/dist/multimedia/MediaLibrary/innertabs/Upload.js +34 -0
- package/dist/multimedia/MediaLibrary/innertabs/Video.js +22 -0
- package/dist/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +14 -0
- package/dist/multimedia/MediaLibrary/innertabs/Workspace.js +31 -0
- package/dist/multimedia/MediaLibrary/innertabs/index.js +21 -0
- package/dist/{modules/multimedia → multimedia}/UploadFiles/UploadFiles.d.ts +1 -1
- package/dist/multimedia/UploadFiles/UploadFiles.js +56 -0
- package/dist/multimedia/VideoEmbed/VideoEmbed.js +77 -0
- package/dist/{modules/multimedia → multimedia}/VideoRecorder/VideoRecorder.d.ts +1 -1
- package/dist/multimedia/VideoRecorder/VideoRecorder.js +259 -0
- package/dist/{modules/multimedia → multimedia}/Workspace/Workspace.d.ts +1 -1
- package/dist/multimedia/Workspace/Workspace.js +169 -0
- package/dist/portal/Header/Badge.js +5 -6
- package/dist/portal/Header/Header.js +138 -138
- package/dist/portal/Header/NavItem.js +11 -12
- package/dist/portal/Header/NavLink.js +14 -15
- package/dist/portal/Header/Navbar.js +9 -10
- package/dist/portal/Header/NavbarNav.js +9 -10
- package/dist/portal/Header/WidgetApps.d.ts +1 -1
- package/dist/portal/Header/WidgetApps.js +16 -17
- package/dist/portal/Help/Help.js +18 -19
- package/dist/portal/Help/hooks/useHelp.js +63 -64
- package/dist/portal/Layout/Layout.js +36 -36
- package/dist/portal/SearchEngine/SearchEngine.js +25 -26
- package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +1 -1
- package/dist/utils/MockedDataProvider/MockedDataProvider.js +21 -22
- package/dist/utils/StringUtils.js +8 -9
- package/dist/utils/addTimestampToUrl.js +4 -5
- package/dist/utils/blob.js +9 -10
- package/dist/utils/checkUserRight.d.ts +1 -1
- package/dist/utils/checkUserRight.js +27 -28
- package/dist/utils/fileSize.js +5 -6
- package/dist/utils/findTreeNode.js +7 -8
- package/dist/utils/isActionAvailable.d.ts +1 -1
- package/dist/utils/isActionAvailable.js +4 -5
- package/dist/utils/libraryMaps.js +2 -3
- package/dist/utils/noop.js +2 -3
- package/dist/utils/ref.js +8 -9
- package/dist/utils/thumbnail.js +3 -4
- package/dist/utils/time.js +7 -8
- package/dist/utils/treeview.d.ts +1 -1
- package/dist/utils/treeview.js +96 -97
- package/dist/utils/video.js +2 -3
- package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +1 -1
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js +6 -7
- package/dist/widgets/Widget/Widget.js +18 -19
- package/package.json +27 -58
- package/dist/audience.js +0 -17
- package/dist/audience.js.map +0 -1
- package/dist/components/ActionBar/ActionBar.js.map +0 -1
- package/dist/components/Alert/Alert.js.map +0 -1
- package/dist/components/AppHeader/AppHeader.js.map +0 -1
- package/dist/components/AppIcon/AppIcon.js.map +0 -1
- package/dist/components/Attachment/Attachment.js.map +0 -1
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Badge/Badge.js.map +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.js.map +0 -1
- package/dist/components/Breadcrumb/BreadcrumbItem.js.map +0 -1
- package/dist/components/Breadcrumb/BreadcrumbList.js.map +0 -1
- package/dist/components/Breadcrumb/BreadcrumbNav.js.map +0 -1
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/IconButton.js.map +0 -1
- package/dist/components/Button/SearchButton.js.map +0 -1
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/CardBody.js.map +0 -1
- package/dist/components/Card/CardContext.js.map +0 -1
- package/dist/components/Card/CardFooter.js.map +0 -1
- package/dist/components/Card/CardHeader.js.map +0 -1
- package/dist/components/Card/CardImage.js.map +0 -1
- package/dist/components/Card/CardText.js.map +0 -1
- package/dist/components/Card/CardTitle.js.map +0 -1
- package/dist/components/Card/CardUser.js.map +0 -1
- package/dist/components/Checkbox/Checkbox.js.map +0 -1
- package/dist/components/ColorPicker/ColorPalette.js.map +0 -1
- package/dist/components/ColorPicker/ColorPicker.js.map +0 -1
- package/dist/components/ColorPicker/ColorPickerItem.js.map +0 -1
- package/dist/components/Combobox/Combobox.js.map +0 -1
- package/dist/components/Combobox/ComboboxTrigger.js.map +0 -1
- package/dist/components/Dropdown/Dropdown.js.map +0 -1
- package/dist/components/Dropdown/DropdownCheckboxItem.js.map +0 -1
- package/dist/components/Dropdown/DropdownContext.js.map +0 -1
- package/dist/components/Dropdown/DropdownItem.js.map +0 -1
- package/dist/components/Dropdown/DropdownMenu.js.map +0 -1
- package/dist/components/Dropdown/DropdownMenuGroup.js.map +0 -1
- package/dist/components/Dropdown/DropdownRadioItem.js.map +0 -1
- package/dist/components/Dropdown/DropdownSeparator.js.map +0 -1
- package/dist/components/Dropdown/DropdownTrigger.js.map +0 -1
- package/dist/components/Dropzone/Dropzone.js.map +0 -1
- package/dist/components/Dropzone/DropzoneContext.js.map +0 -1
- package/dist/components/Dropzone/DropzoneDrag.js.map +0 -1
- package/dist/components/Dropzone/DropzoneFile.js.map +0 -1
- package/dist/components/Dropzone/DropzoneImport.js.map +0 -1
- package/dist/components/EmptyScreen/EmptyScreen.js.map +0 -1
- package/dist/components/FileCard/FileCard.js.map +0 -1
- package/dist/components/FileCard/FileIcon.js.map +0 -1
- package/dist/components/Form/FormContext.js.map +0 -1
- package/dist/components/Form/FormControl.js.map +0 -1
- package/dist/components/Form/FormText.js.map +0 -1
- package/dist/components/Grid/Grid.js.map +0 -1
- package/dist/components/Heading/Heading.js.map +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -17
- package/dist/components/Icon/Icon.js +0 -11
- package/dist/components/Icon/Icon.js.map +0 -1
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Image/Image.js.map +0 -1
- package/dist/components/ImagePicker/ImagePicker.js.map +0 -1
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Label/Label.js.map +0 -1
- package/dist/components/Loading/Loading.js.map +0 -1
- package/dist/components/LoadingScreen/LoadingScreen.js.map +0 -1
- package/dist/components/Logo/Logo.js.map +0 -1
- package/dist/components/Menu/Menu.js.map +0 -1
- package/dist/components/Menu/MenuButton.js.map +0 -1
- package/dist/components/Menu/MenuContext.js.map +0 -1
- package/dist/components/Menu/MenuItem.js.map +0 -1
- package/dist/components/Modal/Modal.js.map +0 -1
- package/dist/components/Modal/ModalBody.js.map +0 -1
- package/dist/components/Modal/ModalContext.js.map +0 -1
- package/dist/components/Modal/ModalFooter.js.map +0 -1
- package/dist/components/Modal/ModalHeader.js.map +0 -1
- package/dist/components/Modal/ModalSubtitle.js.map +0 -1
- package/dist/components/Popover/Popover.js.map +0 -1
- package/dist/components/Radio/Radio.js.map +0 -1
- package/dist/components/SearchBar/SearchBar.js.map +0 -1
- package/dist/components/Select/Select.js.map +0 -1
- package/dist/components/Select/SelectTrigger.js.map +0 -1
- package/dist/components/Table/TableExplorer.js +0 -10
- package/dist/components/Table/TableExplorer.js.map +0 -1
- package/dist/components/Tabs/Tabs.js.map +0 -1
- package/dist/components/Tabs/TabsContext.js.map +0 -1
- package/dist/components/Tabs/TabsItem.js.map +0 -1
- package/dist/components/Tabs/TabsList.js.map +0 -1
- package/dist/components/Tabs/TabsPanel.js.map +0 -1
- package/dist/components/TextArea/TextArea.js.map +0 -1
- package/dist/components/TextArea/TextareaCounter.js.map +0 -1
- package/dist/components/Toolbar/Toolbar.js.map +0 -1
- package/dist/components/Tooltip/Tooltip.js.map +0 -1
- package/dist/components/TreeView/TreeItem.js.map +0 -1
- package/dist/components/TreeView/TreeView.js.map +0 -1
- package/dist/components/TreeView/hooks/useTreeItemEvents.js.map +0 -1
- package/dist/components/UploadCard/UploadCard.js.map +0 -1
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +0 -1
- package/dist/core/OdeClientProvider/OdeClientProvider.js.map +0 -1
- package/dist/core/ThemeProvider/ThemeProvider.js.map +0 -1
- package/dist/core/useAvatar/useAvatar.js.map +0 -1
- package/dist/core/useBookmark/useBookmark.js.map +0 -1
- package/dist/core/useConf/useConf.js.map +0 -1
- package/dist/core/useConversation/useConversation.js.map +0 -1
- package/dist/core/useCookiesConsent/useCookiesConsent.js.map +0 -1
- package/dist/core/useDate/useDate.js.map +0 -1
- package/dist/core/useHasWorkflow/useHasWorkflow.js.map +0 -1
- package/dist/core/useHeader/useHeader.js.map +0 -1
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js.map +0 -1
- package/dist/core/useIsAdml/useIsAdml.js.map +0 -1
- package/dist/core/useLibraryUrl/useLibraryUrl.js.map +0 -1
- package/dist/core/useMediaLibrary/useMediaLibrary.js.map +0 -1
- package/dist/core/useOdeIcons/useOdeIcons.js.map +0 -1
- package/dist/core/usePaths/usePaths.js.map +0 -1
- package/dist/core/usePreferences/usePreferences.js.map +0 -1
- package/dist/core/useResource/useResource.js.map +0 -1
- package/dist/core/useResourceSearch/useResourceSearch.js.map +0 -1
- package/dist/core/useSession/useSession.js.map +0 -1
- package/dist/core/useTrashedResource/useTrashedResource.js.map +0 -1
- package/dist/core/useUpload/useUpload.js.map +0 -1
- package/dist/core/useUploadFiles/useUploadFiles.js.map +0 -1
- package/dist/core/useUser/useUser.js.map +0 -1
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js.map +0 -1
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js.map +0 -1
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js.map +0 -1
- package/dist/core/useZendeskGuide/useZendeskGuide.js.map +0 -1
- package/dist/editor.js +0 -59
- package/dist/editor.js.map +0 -1
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js.map +0 -1
- package/dist/hooks/useClickOutside/useClickOutside.js.map +0 -1
- package/dist/hooks/useDebounce/useDebounce.js.map +0 -1
- package/dist/hooks/useDropdown/useDropdown.js.map +0 -1
- package/dist/hooks/useDropzone/useDropzone.js.map +0 -1
- package/dist/hooks/useHover/useHover.js.map +0 -1
- package/dist/hooks/useImage/useImage.js.map +0 -1
- package/dist/hooks/useImageResizer/useImageResizer.js.map +0 -1
- package/dist/hooks/useKeyPress/useKeyPress.js.map +0 -1
- package/dist/hooks/useScrollToTop/useScrollToTop.js.map +0 -1
- package/dist/hooks/useThumbnail/useThumbnail.js.map +0 -1
- package/dist/hooks/useTitle/useTitle.js.map +0 -1
- package/dist/hooks/useToast/useToast.js.map +0 -1
- package/dist/hooks/useToggle/useToggle.js.map +0 -1
- package/dist/hooks/useTrapFocus/useTrapFocus.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/modals.js +0 -17
- package/dist/modals.js.map +0 -1
- package/dist/modules/audience/ReactionChoice.js +0 -34
- package/dist/modules/audience/ReactionChoice.js.map +0 -1
- package/dist/modules/audience/ReactionModal.Card.js +0 -35
- package/dist/modules/audience/ReactionModal.Card.js.map +0 -1
- package/dist/modules/audience/ReactionModal.js +0 -73
- package/dist/modules/audience/ReactionModal.js.map +0 -1
- package/dist/modules/audience/ReactionSummary.js +0 -28
- package/dist/modules/audience/ReactionSummary.js.map +0 -1
- package/dist/modules/audience/ViewsByProfileCard.js +0 -36
- package/dist/modules/audience/ViewsByProfileCard.js.map +0 -1
- package/dist/modules/audience/ViewsCounter.js +0 -19
- package/dist/modules/audience/ViewsCounter.js.map +0 -1
- package/dist/modules/audience/ViewsModal.js +0 -41
- package/dist/modules/audience/ViewsModal.js.map +0 -1
- package/dist/modules/audience/hooks/useReactionIcons.js +0 -38
- package/dist/modules/audience/hooks/useReactionIcons.js.map +0 -1
- package/dist/modules/audience/hooks/useReactions.js +0 -36
- package/dist/modules/audience/hooks/useReactions.js.map +0 -1
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.d.ts +0 -8
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +0 -133
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js.map +0 -1
- package/dist/modules/editor/components/BubbleMenuEditImage/index.d.ts +0 -1
- package/dist/modules/editor/components/Editor/Editor.d.ts +0 -45
- package/dist/modules/editor/components/Editor/Editor.js +0 -84
- package/dist/modules/editor/components/Editor/Editor.js.map +0 -1
- package/dist/modules/editor/components/Editor/MathsModal.d.ts +0 -7
- package/dist/modules/editor/components/Editor/MathsModal.js +0 -51
- package/dist/modules/editor/components/Editor/MathsModal.js.map +0 -1
- package/dist/modules/editor/components/Editor/index.d.ts +0 -2
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +0 -22
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +0 -18
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +0 -14
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +0 -55
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +0 -14
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +0 -48
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.d.ts +0 -9
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +0 -19
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +0 -14
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +0 -51
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +0 -10
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +0 -63
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +0 -10
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +0 -53
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +0 -10
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +0 -320
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js.map +0 -1
- package/dist/modules/editor/components/EditorToolbar/index.d.ts +0 -1
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +0 -11
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js.map +0 -1
- package/dist/modules/editor/components/NodeView/AudioNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/AudioNodeView.js +0 -11
- package/dist/modules/editor/components/NodeView/AudioNodeView.js.map +0 -1
- package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +0 -11
- package/dist/modules/editor/components/NodeView/ImageNodeView.js.map +0 -1
- package/dist/modules/editor/components/NodeView/LinkerNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js +0 -11
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js.map +0 -1
- package/dist/modules/editor/components/NodeView/VideoNodeView.d.ts +0 -2
- package/dist/modules/editor/components/NodeView/VideoNodeView.js +0 -11
- package/dist/modules/editor/components/NodeView/VideoNodeView.js.map +0 -1
- package/dist/modules/editor/components/NodeView/index.d.ts +0 -5
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.d.ts +0 -7
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +0 -35
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js.map +0 -1
- package/dist/modules/editor/components/Renderer/AudioRenderer.d.ts +0 -7
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +0 -12
- package/dist/modules/editor/components/Renderer/AudioRenderer.js.map +0 -1
- package/dist/modules/editor/components/Renderer/LinkerRenderer.d.ts +0 -9
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +0 -35
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js.map +0 -1
- package/dist/modules/editor/components/Renderer/MediaRenderer.d.ts +0 -2
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +0 -70
- package/dist/modules/editor/components/Renderer/MediaRenderer.js.map +0 -1
- package/dist/modules/editor/components/Renderer/index.d.ts +0 -4
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +0 -2
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +0 -9
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +0 -15
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +0 -60
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.d.ts +0 -9
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +0 -29
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.d.ts +0 -13
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +0 -46
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.d.ts +0 -9
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +0 -28
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +0 -9
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +0 -89
- package/dist/modules/editor/components/Toolbar/TableToolbar.js.map +0 -1
- package/dist/modules/editor/components/Toolbar/index.d.ts +0 -2
- package/dist/modules/editor/components/index.d.ts +0 -6
- package/dist/modules/editor/hooks/index.d.ts +0 -12
- package/dist/modules/editor/hooks/useActionOptions.d.ts +0 -5
- package/dist/modules/editor/hooks/useActionOptions.js +0 -76
- package/dist/modules/editor/hooks/useActionOptions.js.map +0 -1
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +0 -13
- package/dist/modules/editor/hooks/useCommentEditor.js +0 -38
- package/dist/modules/editor/hooks/useCommentEditor.js.map +0 -1
- package/dist/modules/editor/hooks/useEditorContext.d.ts +0 -37
- package/dist/modules/editor/hooks/useEditorContext.js +0 -13
- package/dist/modules/editor/hooks/useEditorContext.js.map +0 -1
- package/dist/modules/editor/hooks/useImageModal.d.ts +0 -31
- package/dist/modules/editor/hooks/useImageModal.js +0 -47
- package/dist/modules/editor/hooks/useImageModal.js.map +0 -1
- package/dist/modules/editor/hooks/useImageSelection.d.ts +0 -21
- package/dist/modules/editor/hooks/useImageSelection.js +0 -47
- package/dist/modules/editor/hooks/useImageSelection.js.map +0 -1
- package/dist/modules/editor/hooks/useLinkToolbar.d.ts +0 -17
- package/dist/modules/editor/hooks/useLinkToolbar.js +0 -38
- package/dist/modules/editor/hooks/useLinkToolbar.js.map +0 -1
- package/dist/modules/editor/hooks/useMathsModal.d.ts +0 -17
- package/dist/modules/editor/hooks/useMathsModal.js +0 -18
- package/dist/modules/editor/hooks/useMathsModal.js.map +0 -1
- package/dist/modules/editor/hooks/useMathsStyles.d.ts +0 -1
- package/dist/modules/editor/hooks/useMathsStyles.js +0 -21
- package/dist/modules/editor/hooks/useMathsStyles.js.map +0 -1
- package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +0 -19
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +0 -153
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js.map +0 -1
- package/dist/modules/editor/hooks/useResizeMedia.d.ts +0 -10
- package/dist/modules/editor/hooks/useResizeMedia.js +0 -48
- package/dist/modules/editor/hooks/useResizeMedia.js.map +0 -1
- package/dist/modules/editor/hooks/useSpeechRecognition.d.ts +0 -6
- package/dist/modules/editor/hooks/useSpeechRecognition.js +0 -22
- package/dist/modules/editor/hooks/useSpeechRecognition.js.map +0 -1
- package/dist/modules/editor/hooks/useSpeechSynthetisis.d.ts +0 -12
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +0 -21
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js.map +0 -1
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +0 -15
- package/dist/modules/editor/hooks/useTipTapEditor.js +0 -76
- package/dist/modules/editor/hooks/useTipTapEditor.js.map +0 -1
- package/dist/modules/editor/index.d.ts +0 -3
- package/dist/modules/editor/utils/has-extension.d.ts +0 -2
- package/dist/modules/editor/utils/has-extension.js +0 -5
- package/dist/modules/editor/utils/has-extension.js.map +0 -1
- package/dist/modules/editor/utils/has-mark.d.ts +0 -2
- package/dist/modules/editor/utils/has-mark.js +0 -5
- package/dist/modules/editor/utils/has-mark.js.map +0 -1
- package/dist/modules/editor/utils/has-text-style.d.ts +0 -2
- package/dist/modules/editor/utils/has-text-style.js +0 -6
- package/dist/modules/editor/utils/has-text-style.js.map +0 -1
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +0 -60
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js.map +0 -1
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +0 -31
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js.map +0 -1
- package/dist/modules/modals/PublishModal/PublishModal.js +0 -121
- package/dist/modules/modals/PublishModal/PublishModal.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +0 -30
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/AgeSelect.js +0 -21
- package/dist/modules/modals/PublishModal/components/AgeSelect.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/LangSelect.js +0 -20
- package/dist/modules/modals/PublishModal/components/LangSelect.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +0 -24
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +0 -30
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/ToastError.js +0 -25
- package/dist/modules/modals/PublishModal/components/ToastError.js.map +0 -1
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js +0 -19
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js.map +0 -1
- package/dist/modules/modals/PublishModal/constants/ageOptions.js +0 -5
- package/dist/modules/modals/PublishModal/constants/ageOptions.js.map +0 -1
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js.map +0 -1
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +0 -44
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js.map +0 -1
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +0 -107
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js.map +0 -1
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js.map +0 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.js +0 -158
- package/dist/modules/modals/ResourceModal/ResourceModal.js.map +0 -1
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +0 -64
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js.map +0 -1
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js +0 -42
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js.map +0 -1
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js +0 -18
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js.map +0 -1
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +0 -14
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js.map +0 -1
- package/dist/modules/modals/ResourceModal/index.d.ts +0 -3
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +0 -9
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js +0 -44
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js.map +0 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +0 -17
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js.map +0 -1
- package/dist/modules/modals/ShareModal/index.d.ts +0 -3
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +0 -50
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js.map +0 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +0 -25
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js.map +0 -1
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +0 -308
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js.map +0 -1
- package/dist/modules/multimedia/Embed/Embed.js +0 -33
- package/dist/modules/multimedia/Embed/Embed.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +0 -117
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +0 -70
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +0 -73
- package/dist/modules/multimedia/ImageEditor/effects/blur.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/effects/crop.js +0 -156
- package/dist/modules/multimedia/ImageEditor/effects/crop.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/effects/misc.js +0 -163
- package/dist/modules/multimedia/ImageEditor/effects/misc.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/effects/resize.js +0 -158
- package/dist/modules/multimedia/ImageEditor/effects/resize.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js +0 -34
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +0 -65
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +0 -77
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +0 -53
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js.map +0 -1
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +0 -14
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js.map +0 -1
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +0 -40
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js.map +0 -1
- package/dist/modules/multimedia/Linker/ExternalLinker.js +0 -46
- package/dist/modules/multimedia/Linker/ExternalLinker.js.map +0 -1
- package/dist/modules/multimedia/Linker/InternalLinker.js +0 -115
- package/dist/modules/multimedia/Linker/InternalLinker.js.map +0 -1
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +0 -40
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js.map +0 -1
- package/dist/modules/multimedia/LinkerCard/index.d.ts +0 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +0 -212
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +0 -13
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +0 -20
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +0 -18
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +0 -15
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +0 -36
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +0 -35
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +0 -23
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +0 -15
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +0 -32
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js.map +0 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +0 -22
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js.map +0 -1
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js +0 -57
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js.map +0 -1
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +0 -78
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js.map +0 -1
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +0 -260
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js.map +0 -1
- package/dist/modules/multimedia/Workspace/Workspace.js +0 -170
- package/dist/modules/multimedia/Workspace/Workspace.js.map +0 -1
- package/dist/multimedia.js +0 -21
- package/dist/multimedia.js.map +0 -1
- package/dist/portal/Header/Badge.js.map +0 -1
- package/dist/portal/Header/Header.js.map +0 -1
- package/dist/portal/Header/NavItem.js.map +0 -1
- package/dist/portal/Header/NavLink.js.map +0 -1
- package/dist/portal/Header/Navbar.js.map +0 -1
- package/dist/portal/Header/NavbarNav.js.map +0 -1
- package/dist/portal/Header/WidgetApps.js.map +0 -1
- package/dist/portal/Help/Help.js.map +0 -1
- package/dist/portal/Help/hooks/useHelp.js.map +0 -1
- package/dist/portal/Layout/Layout.js.map +0 -1
- package/dist/portal/SearchEngine/SearchEngine.js.map +0 -1
- package/dist/utils/MockedDataProvider/MockedDataProvider.js.map +0 -1
- package/dist/utils/StringUtils.js.map +0 -1
- package/dist/utils/addTimestampToUrl.js.map +0 -1
- package/dist/utils/blob.js.map +0 -1
- package/dist/utils/checkUserRight.js.map +0 -1
- package/dist/utils/fileSize.js.map +0 -1
- package/dist/utils/findTreeNode.js.map +0 -1
- package/dist/utils/isActionAvailable.js.map +0 -1
- package/dist/utils/libraryMaps.js.map +0 -1
- package/dist/utils/noop.js.map +0 -1
- package/dist/utils/ref.js.map +0 -1
- package/dist/utils/thumbnail.js.map +0 -1
- package/dist/utils/time.js.map +0 -1
- package/dist/utils/treeview.js.map +0 -1
- package/dist/utils/video.js.map +0 -1
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js.map +0 -1
- package/dist/widgets/Widget/Widget.js.map +0 -1
- /package/dist/{modules/modals → common}/OnboardingModal/OnboardingModal.d.ts +0 -0
- /package/dist/{modules/modals → common}/OnboardingModal/index.d.ts +0 -0
- /package/dist/{modules/modals → common}/OnboardingModal/useOnboardingModal.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/ActivitiesDropdown.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/AgeSelect.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/LangSelect.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/PublishModalFooter.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/SubjectsDropdown.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/components/ToastError.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/constants/ageOptions.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/hooks/useActivitiesOptions.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/hooks/useLanguageOptions.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/hooks/useSubjectsOptions.d.ts +0 -0
- /package/dist/{modules/modals → common}/PublishModal/index.d.ts +0 -0
- /package/dist/{modules/modals → common}/ShareModal/ShareBookmark.d.ts +0 -0
- /package/dist/{modules/modals → common}/index.d.ts +0 -0
- /package/dist/{modules/audience → components/Audience}/ViewsCounter.d.ts +0 -0
- /package/dist/{modules/audience → components/Audience}/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/AudioRecorder/AudioRecorderTimer.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/AudioRecorder/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/Embed/Embed.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/Embed/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/components/ImageEditor.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/components/ImageEditorToolbar.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/blur.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/crop.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/misc.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/resize.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/effects/rotate.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useHistoryTool.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useImageEditor.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/hooks/useImageEffects.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/utils/aggregate.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImageEditor/utils/debounceAggregate.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/ImagePickerWorkspace/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/Linker/ExternalLinker.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/Linker/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Audio.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/ExternalLink.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Iframe.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Upload.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Video.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/VideoEmbedder.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/Workspace.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/MediaLibrary/innertabs/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/UploadFiles/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/VideoEmbed/VideoEmbed.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/VideoEmbed/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/VideoRecorder/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/Workspace/index.d.ts +0 -0
- /package/dist/{modules/multimedia → multimedia}/index.d.ts +0 -0
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useState as i, useMemo as f, useEffect as u } from "react";
|
|
3
|
-
import { findParentNodeClosestToPos as r, FloatingMenu as g } from "@tiptap/react";
|
|
4
|
-
import { useTranslation as h } from "react-i18next";
|
|
5
|
-
import { TableToolbarAddMenu as w } from "./TableToolbar.AddMenu.js";
|
|
6
|
-
import { TableToolbarCellColor as y } from "./TableToolbar.CellColor.js";
|
|
7
|
-
import { TableToolbarDelMenu as S } from "./TableToolbar.DelMenu.js";
|
|
8
|
-
import { Toolbar as T } from "../../../../components/Toolbar/Toolbar.js";
|
|
9
|
-
import { Icon as c } from "../../../../components/Icon/Icon.js";
|
|
10
|
-
const P = ({
|
|
11
|
-
editor: e
|
|
12
|
-
}) => {
|
|
13
|
-
const {
|
|
14
|
-
t: p
|
|
15
|
-
} = h(), [a, m] = i(void 0), b = f(() => {
|
|
16
|
-
function l(n) {
|
|
17
|
-
let o = 0;
|
|
18
|
-
if (window.visualViewport) {
|
|
19
|
-
const s = window.innerHeight || document.documentElement.clientHeight;
|
|
20
|
-
n.bottom >= s && (o += n.bottom - s - n.height);
|
|
21
|
-
}
|
|
22
|
-
return new DOMRect(n.x, n.y - o, n.width, n.height);
|
|
23
|
-
}
|
|
24
|
-
return {
|
|
25
|
-
placement: "bottom",
|
|
26
|
-
offset: [0, 0],
|
|
27
|
-
zIndex: 999,
|
|
28
|
-
// popperOptions: {modifiers: [ /*see popper v2 modifiers*/ ]},
|
|
29
|
-
// Try to get the bounding rect of the table.
|
|
30
|
-
getReferenceClientRect: () => {
|
|
31
|
-
const n = e != null && e.isActive("table") ? r(e.state.selection.$anchor, (o) => o.type.name === "table") : null;
|
|
32
|
-
if (n) {
|
|
33
|
-
const o = e == null ? void 0 : e.view.nodeDOM(n.pos), s = (o == null ? void 0 : o.querySelector("table")) || o;
|
|
34
|
-
if (s)
|
|
35
|
-
return l(s.getBoundingClientRect());
|
|
36
|
-
}
|
|
37
|
-
return new DOMRect(0, 0, 100, 100);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}, [e]);
|
|
41
|
-
return u(() => {
|
|
42
|
-
const l = e == null ? void 0 : e.getAttributes("tableCell"), n = e == null ? void 0 : e.getAttributes("tableHeader");
|
|
43
|
-
if (typeof l < "u" || typeof n < "u") {
|
|
44
|
-
const o = (l == null ? void 0 : l.colspan) > 1 || (l == null ? void 0 : l.rowspan) > 1 || (n == null ? void 0 : n.colspan) > 1 || (n == null ? void 0 : n.rowspan) > 1;
|
|
45
|
-
o !== a && m(o);
|
|
46
|
-
} else
|
|
47
|
-
a && m(void 0);
|
|
48
|
-
}, [e, e == null ? void 0 : e.state, a]), e && /* @__PURE__ */ t(g, { editor: e, tippyOptions: b, shouldShow: () => (e == null ? void 0 : e.isEditable) && e.isActive("table") || !1, children: /* @__PURE__ */ t(T, { className: "p-4", items: [{
|
|
49
|
-
type: "dropdown",
|
|
50
|
-
name: "bkg-col",
|
|
51
|
-
// isEnable:
|
|
52
|
-
// typeof editor?.getAttributes("tableCell") !== "undefined",
|
|
53
|
-
props: {
|
|
54
|
-
children: (l, n) => /* @__PURE__ */ t(y, { editor: e, itemRefs: n })
|
|
55
|
-
}
|
|
56
|
-
}, {
|
|
57
|
-
type: "icon",
|
|
58
|
-
name: "mergeorsplit",
|
|
59
|
-
// isEnable: typeof isSpan !== "undefined",
|
|
60
|
-
props: {
|
|
61
|
-
icon: a ? /* @__PURE__ */ t(c, { name: "split-cells" }) : /* @__PURE__ */ t(c, { name: "merge-cells" }),
|
|
62
|
-
"aria-label": p(a ? "tiptap.table.toolbar.split" : "tiptap.table.toolbar.merge"),
|
|
63
|
-
onClick: () => e == null ? void 0 : e.chain().focus().mergeOrSplit().run()
|
|
64
|
-
},
|
|
65
|
-
tooltip: p(a ? "tiptap.table.toolbar.split" : "tiptap.table.toolbar.merge")
|
|
66
|
-
}, {
|
|
67
|
-
type: "divider",
|
|
68
|
-
name: "add-d0"
|
|
69
|
-
}, {
|
|
70
|
-
type: "dropdown",
|
|
71
|
-
name: "add",
|
|
72
|
-
props: {
|
|
73
|
-
children: () => /* @__PURE__ */ t(w, { editor: e })
|
|
74
|
-
}
|
|
75
|
-
}, {
|
|
76
|
-
type: "divider",
|
|
77
|
-
name: "add-d1"
|
|
78
|
-
}, {
|
|
79
|
-
type: "dropdown",
|
|
80
|
-
name: "del",
|
|
81
|
-
props: {
|
|
82
|
-
children: () => /* @__PURE__ */ t(S, { editor: e })
|
|
83
|
-
}
|
|
84
|
-
}] }) });
|
|
85
|
-
};
|
|
86
|
-
export {
|
|
87
|
-
P as default
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=TableToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableToolbar.js","sources":["../../../../../src/modules/editor/components/Toolbar/TableToolbar.tsx"],"sourcesContent":["import { RefAttributes, useEffect, useMemo, useState } from 'react';\n\nimport {\n Editor,\n FloatingMenu,\n FloatingMenuProps,\n findParentNodeClosestToPos,\n} from '@tiptap/react';\nimport { useTranslation } from 'react-i18next';\n\nimport { Icon, IconButtonProps, Toolbar } from '../../../../components';\nimport { TableToolbarAddMenu } from './TableToolbar.AddMenu';\nimport { TableToolbarCellColor } from './TableToolbar.CellColor';\nimport { TableToolbarDelMenu } from './TableToolbar.DelMenu';\n\ninterface TableToolbarProps {\n /**\n * editor instance\n */\n editor: Editor | null;\n}\n\nconst TableToolbar = ({ editor }: TableToolbarProps) => {\n const { t } = useTranslation();\n\n // Display the Split action when truthy, and Merge action when falsy.\n const [isSpan, setSpan] = useState<boolean | undefined>(undefined);\n\n // Options need some computing\n const tippyOptions: FloatingMenuProps['tippyOptions'] = useMemo(() => {\n // Adjust a DOMRect to make it visible at a correct place.\n function adjustRect(rect: DOMRect) {\n let yOffset = 0;\n if (window.visualViewport) {\n const bottomScreen =\n window.innerHeight || document.documentElement.clientHeight;\n if (rect.bottom >= bottomScreen) {\n yOffset += rect.bottom - bottomScreen - rect.height;\n }\n }\n return new DOMRect(rect.x, rect.y - yOffset, rect.width, rect.height);\n }\n\n return {\n placement: 'bottom',\n offset: [0, 0],\n zIndex: 999,\n // popperOptions: {modifiers: [ /*see popper v2 modifiers*/ ]},\n // Try to get the bounding rect of the table.\n getReferenceClientRect: () => {\n const parentDiv = editor?.isActive('table')\n ? findParentNodeClosestToPos(\n editor.state.selection.$anchor,\n (node) => node.type.name === 'table',\n )\n : null;\n\n // Try to retrieve the <div class=\"tableWrapper\"> that wraps the <table>\n if (parentDiv) {\n const parentDomNode = editor?.view.nodeDOM(parentDiv.pos) as\n | HTMLElement\n | undefined;\n\n const tableDomNode =\n parentDomNode?.querySelector('table') || parentDomNode;\n if (tableDomNode) {\n return adjustRect(tableDomNode.getBoundingClientRect());\n }\n }\n\n // This should never happen... but it keeps the transpiler happy.\n return new DOMRect(0, 0, 100, 100);\n },\n };\n }, [editor]);\n\n useEffect(() => {\n const cellAttr = editor?.getAttributes('tableCell');\n const headAttr = editor?.getAttributes('tableHeader');\n if (typeof cellAttr !== 'undefined' || typeof headAttr !== 'undefined') {\n const newSpan =\n cellAttr?.['colspan'] > 1 ||\n cellAttr?.['rowspan'] > 1 ||\n headAttr?.['colspan'] > 1 ||\n headAttr?.['rowspan'] > 1;\n newSpan !== isSpan && setSpan(newSpan);\n } else {\n isSpan && setSpan(undefined);\n }\n }, [editor, editor?.state, isSpan]);\n\n const handleShouldShow = () =>\n (editor?.isEditable && editor.isActive('table')) || false;\n\n return (\n editor && (\n <FloatingMenu\n editor={editor}\n tippyOptions={tippyOptions}\n shouldShow={handleShouldShow}\n >\n <Toolbar\n className=\"p-4\"\n items={[\n {\n type: 'dropdown',\n name: 'bkg-col',\n // isEnable:\n // typeof editor?.getAttributes(\"tableCell\") !== \"undefined\",\n props: {\n children: (\n triggerProps: JSX.IntrinsicAttributes &\n Omit<IconButtonProps, 'ref'> &\n RefAttributes<HTMLButtonElement>,\n itemRefs,\n ) => (\n <TableToolbarCellColor editor={editor} itemRefs={itemRefs} />\n ),\n },\n },\n {\n type: 'icon',\n name: 'mergeorsplit',\n // isEnable: typeof isSpan !== \"undefined\",\n props: {\n icon: isSpan ? (\n <Icon name=\"split-cells\" />\n ) : (\n <Icon name=\"merge-cells\" />\n ),\n 'aria-label': isSpan\n ? t('tiptap.table.toolbar.split')\n : t('tiptap.table.toolbar.merge'),\n onClick: () => editor?.chain().focus().mergeOrSplit().run(),\n },\n tooltip: isSpan\n ? t('tiptap.table.toolbar.split')\n : t('tiptap.table.toolbar.merge'),\n },\n {\n type: 'divider',\n name: 'add-d0',\n },\n {\n type: 'dropdown',\n name: 'add',\n props: {\n children: () => <TableToolbarAddMenu editor={editor} />,\n },\n },\n {\n type: 'divider',\n name: 'add-d1',\n },\n {\n type: 'dropdown',\n name: 'del',\n props: {\n children: () => <TableToolbarDelMenu editor={editor} />,\n },\n },\n ]}\n />\n </FloatingMenu>\n )\n );\n};\n\nexport default TableToolbar;\n"],"names":["TableToolbar","editor","t","useTranslation","isSpan","setSpan","useState","undefined","tippyOptions","useMemo","adjustRect","rect","yOffset","window","visualViewport","bottomScreen","innerHeight","document","documentElement","clientHeight","bottom","height","DOMRect","x","y","width","placement","offset","zIndex","getReferenceClientRect","parentDiv","isActive","findParentNodeClosestToPos","state","selection","$anchor","node","type","name","parentDomNode","view","nodeDOM","pos","tableDomNode","querySelector","getBoundingClientRect","useEffect","cellAttr","getAttributes","headAttr","newSpan","jsx","FloatingMenu","handleShouldShow","isEditable","Toolbar","props","children","triggerProps","itemRefs","TableToolbarCellColor","icon","Icon","onClick","chain","focus","mergeOrSplit","run","tooltip","TableToolbarAddMenu","TableToolbarDelMenu"],"mappings":"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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './useActionOptions';
|
|
2
|
-
export * from './useCommentEditor';
|
|
3
|
-
export * from './useEditorContext';
|
|
4
|
-
export * from './useImageModal';
|
|
5
|
-
export * from './useImageSelection';
|
|
6
|
-
export * from './useLinkToolbar';
|
|
7
|
-
export * from './useMathsModal';
|
|
8
|
-
export * from './useMediaLibraryEditor';
|
|
9
|
-
export * from './useResizeMedia';
|
|
10
|
-
export * from './useSpeechRecognition';
|
|
11
|
-
export * from './useSpeechSynthetisis';
|
|
12
|
-
export * from './useTipTapEditor';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
import { DropdownMenuOptions } from '../../..';
|
|
4
|
-
import { MediaLibraryRef } from '../../multimedia';
|
|
5
|
-
export declare const useActionOptions: (editor: Editor | null, toggleMathsModal: Function, mediaLibraryRef: RefObject<MediaLibraryRef>) => DropdownMenuOptions[][];
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as u } from "react-i18next";
|
|
3
|
-
import { Icon as l } from "../../../components/Icon/Icon.js";
|
|
4
|
-
const f = (a, s, i) => {
|
|
5
|
-
const {
|
|
6
|
-
t: n
|
|
7
|
-
} = u(), o = [{
|
|
8
|
-
icon: /* @__PURE__ */ t(l, { name: "text-vanilla" }),
|
|
9
|
-
label: n("tiptap.toolbar.removeFormat"),
|
|
10
|
-
action: () => a == null ? void 0 : a.chain().clearNodes().unsetAllMarks().run()
|
|
11
|
-
}, {
|
|
12
|
-
type: "divider"
|
|
13
|
-
}, {
|
|
14
|
-
icon: /* @__PURE__ */ t(l, { name: "table" }),
|
|
15
|
-
label: n("tiptap.toolbar.table"),
|
|
16
|
-
action: () => a == null ? void 0 : a.chain().focus().insertTable({
|
|
17
|
-
rows: 3,
|
|
18
|
-
cols: 3,
|
|
19
|
-
withHeaderRow: !0
|
|
20
|
-
}).run()
|
|
21
|
-
}, {
|
|
22
|
-
type: "divider"
|
|
23
|
-
}, {
|
|
24
|
-
icon: /* @__PURE__ */ t(l, { name: "superscript" }),
|
|
25
|
-
label: n("tiptap.toolbar.superscript"),
|
|
26
|
-
action: () => a == null ? void 0 : a.chain().focus().toggleSuperscript().run()
|
|
27
|
-
}, {
|
|
28
|
-
icon: /* @__PURE__ */ t(l, { name: "subscript" }),
|
|
29
|
-
label: n("tiptap.toolbar.subscript"),
|
|
30
|
-
action: () => a == null ? void 0 : a.chain().focus().toggleSubscript().run()
|
|
31
|
-
}, {
|
|
32
|
-
icon: /* @__PURE__ */ t(l, { name: "square-root" }),
|
|
33
|
-
label: n("tiptap.toolbar.mathjax"),
|
|
34
|
-
action: () => {
|
|
35
|
-
s();
|
|
36
|
-
}
|
|
37
|
-
}, {
|
|
38
|
-
type: "divider"
|
|
39
|
-
}, {
|
|
40
|
-
icon: /* @__PURE__ */ t(l, { name: "code" }),
|
|
41
|
-
label: n("tiptap.toolbar.embed.iframe"),
|
|
42
|
-
action: () => {
|
|
43
|
-
var c;
|
|
44
|
-
return (c = i.current) == null ? void 0 : c.show("embedder");
|
|
45
|
-
}
|
|
46
|
-
}], p = [{
|
|
47
|
-
icon: /* @__PURE__ */ t(l, { name: "bullet-list" }),
|
|
48
|
-
label: n("tiptap.toolbar.ulist"),
|
|
49
|
-
action: () => a == null ? void 0 : a.chain().focus().toggleBulletList().run()
|
|
50
|
-
}, {
|
|
51
|
-
icon: /* @__PURE__ */ t(l, { name: "ordered-list" }),
|
|
52
|
-
label: n("tiptap.toolbar.olist"),
|
|
53
|
-
action: () => a == null ? void 0 : a.chain().focus().toggleOrderedList().run()
|
|
54
|
-
}], e = [{
|
|
55
|
-
icon: /* @__PURE__ */ t(l, { name: "align-left" }),
|
|
56
|
-
label: n("tiptap.toolbar.text.left"),
|
|
57
|
-
action: () => a == null ? void 0 : a.chain().focus().setTextAlign("left").run()
|
|
58
|
-
}, {
|
|
59
|
-
icon: /* @__PURE__ */ t(l, { name: "align-center" }),
|
|
60
|
-
label: n("tiptap.toolbar.text.center"),
|
|
61
|
-
action: () => a == null ? void 0 : a.chain().focus().setTextAlign("center").run()
|
|
62
|
-
}, {
|
|
63
|
-
icon: /* @__PURE__ */ t(l, { name: "align-right" }),
|
|
64
|
-
label: n("tiptap.toolbar.text.right"),
|
|
65
|
-
action: () => a == null ? void 0 : a.chain().focus().setTextAlign("right").run()
|
|
66
|
-
}, {
|
|
67
|
-
icon: /* @__PURE__ */ t(l, { name: "align-justify" }),
|
|
68
|
-
label: n("tiptap.toolbar.text.justify"),
|
|
69
|
-
action: () => a == null ? void 0 : a.chain().focus().setTextAlign("justify").run()
|
|
70
|
-
}];
|
|
71
|
-
return [o, p, e];
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
f as useActionOptions
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=useActionOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useActionOptions.js","sources":["../../../../src/modules/editor/hooks/useActionOptions.tsx"],"sourcesContent":["import { RefObject } from 'react';\n\nimport { Editor } from '@tiptap/react';\nimport { useTranslation } from 'react-i18next';\nimport { DropdownMenuOptions, Icon } from '../../..';\nimport { MediaLibraryRef } from '../../multimedia';\n\nexport const useActionOptions = (\n editor: Editor | null,\n toggleMathsModal: Function,\n mediaLibraryRef: RefObject<MediaLibraryRef>,\n) => {\n const { t } = useTranslation();\n const options: DropdownMenuOptions[] = [\n {\n icon: <Icon name=\"text-vanilla\" />,\n label: t('tiptap.toolbar.removeFormat'),\n action: () => editor?.chain().clearNodes().unsetAllMarks().run(),\n },\n {\n type: 'divider',\n },\n {\n icon: <Icon name=\"table\" />,\n label: t('tiptap.toolbar.table'),\n action: () =>\n editor\n ?.chain()\n .focus()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run(),\n },\n {\n type: 'divider',\n },\n {\n icon: <Icon name=\"superscript\" />,\n label: t('tiptap.toolbar.superscript'),\n action: () => editor?.chain().focus().toggleSuperscript().run(),\n },\n {\n icon: <Icon name=\"subscript\" />,\n label: t('tiptap.toolbar.subscript'),\n action: () => editor?.chain().focus().toggleSubscript().run(),\n },\n {\n icon: <Icon name=\"square-root\" />,\n label: t('tiptap.toolbar.mathjax'),\n action: () => {\n toggleMathsModal();\n },\n },\n {\n type: 'divider',\n },\n {\n icon: <Icon name=\"code\" />,\n label: t('tiptap.toolbar.embed.iframe'),\n action: () => mediaLibraryRef.current?.show('embedder'),\n },\n ];\n const listOptions: DropdownMenuOptions[] = [\n {\n icon: <Icon name=\"bullet-list\" />,\n label: t('tiptap.toolbar.ulist'),\n action: () => editor?.chain().focus().toggleBulletList().run(),\n },\n {\n icon: <Icon name=\"ordered-list\" />,\n label: t('tiptap.toolbar.olist'),\n action: () => editor?.chain().focus().toggleOrderedList().run(),\n },\n ];\n const alignmentOptions: DropdownMenuOptions[] = [\n {\n icon: <Icon name=\"align-left\" />,\n label: t('tiptap.toolbar.text.left'),\n action: () => editor?.chain().focus().setTextAlign('left').run(),\n },\n {\n icon: <Icon name=\"align-center\" />,\n label: t('tiptap.toolbar.text.center'),\n action: () => editor?.chain().focus().setTextAlign('center').run(),\n },\n {\n icon: <Icon name=\"align-right\" />,\n label: t('tiptap.toolbar.text.right'),\n action: () => editor?.chain().focus().setTextAlign('right').run(),\n },\n {\n icon: <Icon name=\"align-justify\" />,\n label: t('tiptap.toolbar.text.justify'),\n action: () => editor?.chain().focus().setTextAlign('justify').run(),\n },\n ];\n return [options, listOptions, alignmentOptions];\n};\n"],"names":["useActionOptions","editor","toggleMathsModal","mediaLibraryRef","t","useTranslation","options","icon","jsx","Icon","label","action","chain","clearNodes","unsetAllMarks","run","type","focus","insertTable","rows","cols","withHeaderRow","toggleSuperscript","toggleSubscript","current","show","listOptions","toggleBulletList","toggleOrderedList","alignmentOptions","setTextAlign"],"mappings":"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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Content } from '@tiptap/react';
|
|
2
|
-
/**
|
|
3
|
-
* Hook that creates a tiptap editor instance with plugins for editing comments.
|
|
4
|
-
*
|
|
5
|
-
* @param editable truthy if the editor content should be editable
|
|
6
|
-
* @param content default rich content
|
|
7
|
-
*/
|
|
8
|
-
export declare const useCommentEditor: (editable: boolean, content: Content, maxLength?: number) => {
|
|
9
|
-
editor: import('@tiptap/react').Editor | null;
|
|
10
|
-
commentLength: number;
|
|
11
|
-
getComment: () => string;
|
|
12
|
-
resetComment: () => void;
|
|
13
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useState as a, useEffect as e } from "react";
|
|
2
|
-
import { Hyperlink as C } from "@edifice.io/tiptap-extensions";
|
|
3
|
-
import f from "@tiptap/extension-character-count";
|
|
4
|
-
import { useEditor as p } from "@tiptap/react";
|
|
5
|
-
import g from "@tiptap/starter-kit";
|
|
6
|
-
const k = (n, m, r = 800) => {
|
|
7
|
-
const [c, o] = a(0), t = p({
|
|
8
|
-
editable: n,
|
|
9
|
-
extensions: [g, C, f.configure({
|
|
10
|
-
limit: r
|
|
11
|
-
})],
|
|
12
|
-
content: m
|
|
13
|
-
});
|
|
14
|
-
return e(() => {
|
|
15
|
-
t == null || t.commands.setContent(m);
|
|
16
|
-
}, [m, t]), e(() => {
|
|
17
|
-
t == null || t.setEditable(n);
|
|
18
|
-
}, [n, t]), e(() => {
|
|
19
|
-
function s() {
|
|
20
|
-
const u = (t == null ? void 0 : t.storage.characterCount.characters()) ?? 0;
|
|
21
|
-
o(u);
|
|
22
|
-
}
|
|
23
|
-
return t == null || t.on("update", s), () => {
|
|
24
|
-
t == null || t.off("update", s);
|
|
25
|
-
};
|
|
26
|
-
}, [t]), {
|
|
27
|
-
editor: t,
|
|
28
|
-
commentLength: c,
|
|
29
|
-
getComment: () => t == null ? void 0 : t.getHTML(),
|
|
30
|
-
resetComment: () => {
|
|
31
|
-
o(0), t == null || t.commands.setContent(m);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
k as useCommentEditor
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=useCommentEditor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCommentEditor.js","sources":["../../../../src/modules/editor/hooks/useCommentEditor.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { Hyperlink } from '@edifice.io/tiptap-extensions';\nimport CharacterCount from '@tiptap/extension-character-count';\nimport { Content, HTMLContent, useEditor } from '@tiptap/react';\nimport StarterKit from '@tiptap/starter-kit';\n\n/**\n * Hook that creates a tiptap editor instance with plugins for editing comments.\n *\n * @param editable truthy if the editor content should be editable\n * @param content default rich content\n */\nexport const useCommentEditor = (\n editable: boolean,\n content: Content,\n maxLength = 800,\n) => {\n const [commentLength, setCommentLength] = useState(0);\n\n const editor = useEditor({\n editable,\n extensions: [\n StarterKit,\n Hyperlink,\n CharacterCount.configure({ limit: maxLength }),\n ],\n content,\n });\n\n // When content is updated through props, render it.\n useEffect(() => {\n editor?.commands.setContent(content);\n }, [content, editor]);\n\n // When editable flag is changing, so does the corresponding editor's property.\n useEffect(() => {\n editor?.setEditable(editable);\n }, [editable, editor]);\n\n // When content is updated manually, update the characters counter.\n useEffect(() => {\n function setCounter() {\n const length = editor?.storage.characterCount.characters() ?? 0;\n setCommentLength(length);\n }\n\n editor?.on('update', setCounter);\n\n return () => {\n editor?.off('update', setCounter);\n };\n }, [editor]);\n\n const getComment = () => editor?.getHTML() as HTMLContent;\n const resetComment = () => {\n setCommentLength(0);\n editor?.commands.setContent(content);\n };\n\n return { editor, commentLength, getComment, resetComment };\n};\n"],"names":["useCommentEditor","editable","content","maxLength","commentLength","setCommentLength","useState","editor","useEditor","extensions","StarterKit","Hyperlink","CharacterCount","configure","limit","useEffect","commands","setContent","setEditable","setCounter","length","storage","characterCount","characters","on","off","getComment","getHTML","resetComment"],"mappings":";;;;;AAaO,MAAMA,IAAmBA,CAC9BC,GACAC,GACAC,IAAY,QACT;AACH,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,CAAC,GAE9CC,IAASC,EAAU;AAAA,IACvBP,UAAAA;AAAAA,IACAQ,YAAY,CACVC,GACAC,GACAC,EAAeC,UAAU;AAAA,MAAEC,OAAOX;AAAAA,IAAAA,CAAW,CAAC;AAAA,IAEhDD,SAAAA;AAAAA,EAAAA,CACD;AAGDa,SAAAA,EAAU,MAAM;AACNC,IAAAA,KAAAA,QAAAA,EAAAA,SAASC,WAAWf;AAAAA,EAAO,GAClC,CAACA,GAASK,CAAM,CAAC,GAGpBQ,EAAU,MAAM;AACdR,IAAAA,KAAAA,QAAAA,EAAQW,YAAYjB;AAAAA,EAAQ,GAC3B,CAACA,GAAUM,CAAM,CAAC,GAGrBQ,EAAU,MAAM;AACd,aAASI,IAAa;AACpB,YAAMC,KAASb,KAAAA,gBAAAA,EAAQc,QAAQC,eAAeC,iBAAgB;AAC9DlB,MAAAA,EAAiBe,CAAM;AAAA,IACzB;AAEQI,WAAAA,KAAAA,QAAAA,EAAAA,GAAG,UAAUL,IAEd,MAAM;AACHM,MAAAA,KAAAA,QAAAA,EAAAA,IAAI,UAAUN;AAAAA,IAAU;AAAA,EAClC,GACC,CAACZ,CAAM,CAAC,GAQJ;AAAA,IAAEA,QAAAA;AAAAA,IAAQH,eAAAA;AAAAA,IAAesB,YANbA,MAAMnB,KAAAA,gBAAAA,EAAQoB;AAAAA,IAMWC,cALvBA,MAAM;AACzBvB,MAAAA,EAAiB,CAAC,GACVW,KAAAA,QAAAA,EAAAA,SAASC,WAAWf;AAAAA,IAAO;AAAA,EAGO0B;AAC9C;"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
export declare const EditorContext: import('react').Context<{
|
|
3
|
-
/**
|
|
4
|
-
* Application code (example: "blog")
|
|
5
|
-
*/
|
|
6
|
-
appCode: string;
|
|
7
|
-
/**
|
|
8
|
-
* TipTap editor instance
|
|
9
|
-
*/
|
|
10
|
-
editor: Editor | null;
|
|
11
|
-
/**
|
|
12
|
-
* To know if TipTap editor is editable
|
|
13
|
-
*/
|
|
14
|
-
editable: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Id of the editor's HTMLElement
|
|
17
|
-
*/
|
|
18
|
-
id: string;
|
|
19
|
-
}>;
|
|
20
|
-
export declare function useEditorContext(): {
|
|
21
|
-
/**
|
|
22
|
-
* Application code (example: "blog")
|
|
23
|
-
*/
|
|
24
|
-
appCode: string;
|
|
25
|
-
/**
|
|
26
|
-
* TipTap editor instance
|
|
27
|
-
*/
|
|
28
|
-
editor: Editor | null;
|
|
29
|
-
/**
|
|
30
|
-
* To know if TipTap editor is editable
|
|
31
|
-
*/
|
|
32
|
-
editable: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Id of the editor's HTMLElement
|
|
35
|
-
*/
|
|
36
|
-
id: string;
|
|
37
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createContext as o, useContext as e } from "react";
|
|
2
|
-
const n = /* @__PURE__ */ o(null);
|
|
3
|
-
function c() {
|
|
4
|
-
const t = e(n);
|
|
5
|
-
if (!t)
|
|
6
|
-
throw new Error("Editor compound components cannot be rendered outside the Editor component");
|
|
7
|
-
return t;
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
n as EditorContext,
|
|
11
|
-
c as useEditorContext
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=useEditorContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useEditorContext.js","sources":["../../../../src/modules/editor/hooks/useEditorContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\n\nimport { Editor } from '@tiptap/react';\n\nexport const EditorContext = createContext<{\n /**\n * Application code (example: \"blog\")\n */\n appCode: string;\n\n /**\n * TipTap editor instance\n */\n editor: Editor | null;\n /**\n * To know if TipTap editor is editable\n */\n editable: boolean;\n /**\n * Id of the editor's HTMLElement\n */\n id: string;\n}>(null!);\n\nexport function useEditorContext() {\n const context = useContext(EditorContext);\n if (!context) {\n throw new Error(\n `Editor compound components cannot be rendered outside the Editor component`,\n );\n }\n return context;\n}\n"],"names":["EditorContext","useEditorContext","context","useContext","Error"],"mappings":";AAIaA,MAAAA,sBAkBV,IAAK;AAED,SAASC,IAAmB;AAC3BC,QAAAA,IAAUC,EAAWH,CAAa;AACxC,MAAI,CAACE;AACG,UAAA,IAAIE,MACR,4EACF;AAEKF,SAAAA;AACT;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { WorkspaceVisibility } from '@edifice.io/ts-client';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
type EditedImage = {
|
|
4
|
-
src: string;
|
|
5
|
-
alt?: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
} | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Custom hook to manage ImageModal success and cancelation in the current editor context.
|
|
10
|
-
* @returns {
|
|
11
|
-
* `isOpen`: truthy boolean when the modal should be visible,
|
|
12
|
-
* `currentImage`: the image being edited,
|
|
13
|
-
* `toggle`: an imperative function to toggle the `isOpen` value,
|
|
14
|
-
* `handleCancel`: Cancel event handler,
|
|
15
|
-
* `handleEdit`: Edit event handler,
|
|
16
|
-
* `handleSave`: Success event handler,
|
|
17
|
-
* }
|
|
18
|
-
*/
|
|
19
|
-
export declare const useImageModal: (editor: Editor | null, application?: string, visibility?: WorkspaceVisibility) => {
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
currentImage: EditedImage;
|
|
22
|
-
toggle: any;
|
|
23
|
-
handleCancel: () => void;
|
|
24
|
-
handleEdit: () => void;
|
|
25
|
-
handleSave: ({ blob, legend, altText: alt, }: {
|
|
26
|
-
blob: Blob;
|
|
27
|
-
legend: string;
|
|
28
|
-
altText: string;
|
|
29
|
-
}) => Promise<void>;
|
|
30
|
-
};
|
|
31
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { useState as f } from "react";
|
|
2
|
-
import { useImageSelection as g } from "./useImageSelection.js";
|
|
3
|
-
import h from "../../../hooks/useToggle/useToggle.js";
|
|
4
|
-
import S from "../../../core/useWorkspaceFile/useWorkspaceFile.js";
|
|
5
|
-
const O = (c, r, i) => {
|
|
6
|
-
const [e, l] = f(void 0), [d, t] = h(!1), {
|
|
7
|
-
createOrUpdate: m
|
|
8
|
-
} = S(), {
|
|
9
|
-
setAttributes: p,
|
|
10
|
-
getSelection: u
|
|
11
|
-
} = g(c);
|
|
12
|
-
return {
|
|
13
|
-
isOpen: d,
|
|
14
|
-
currentImage: e,
|
|
15
|
-
toggle: t,
|
|
16
|
-
handleCancel: () => {
|
|
17
|
-
t();
|
|
18
|
-
},
|
|
19
|
-
handleEdit: () => {
|
|
20
|
-
const o = u()[0];
|
|
21
|
-
o && (l(o), t());
|
|
22
|
-
},
|
|
23
|
-
handleSave: async ({
|
|
24
|
-
blob: o,
|
|
25
|
-
legend: s,
|
|
26
|
-
altText: n
|
|
27
|
-
}) => {
|
|
28
|
-
const a = await m({
|
|
29
|
-
blob: o,
|
|
30
|
-
legend: s,
|
|
31
|
-
alt: n,
|
|
32
|
-
uri: e == null ? void 0 : e.src,
|
|
33
|
-
visibility: i,
|
|
34
|
-
application: r
|
|
35
|
-
});
|
|
36
|
-
t(), typeof a == "object" && p({
|
|
37
|
-
url: a.src,
|
|
38
|
-
alt: n,
|
|
39
|
-
title: s
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
O as useImageModal
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=useImageModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useImageModal.js","sources":["../../../../src/modules/editor/hooks/useImageModal.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { WorkspaceVisibility } from '@edifice.io/ts-client';\nimport { Editor } from '@tiptap/react';\n\nimport { useWorkspaceFile } from '../../../core';\nimport { useToggle } from '../../../hooks';\nimport { useImageSelection } from './useImageSelection';\n\ntype EditedImage = { src: string; alt?: string; title?: string } | undefined;\n\n/**\n * Custom hook to manage ImageModal success and cancelation in the current editor context.\n * @returns {\n * `isOpen`: truthy boolean when the modal should be visible,\n * `currentImage`: the image being edited,\n * `toggle`: an imperative function to toggle the `isOpen` value,\n * `handleCancel`: Cancel event handler,\n * `handleEdit`: Edit event handler,\n * `handleSave`: Success event handler,\n * }\n */\nexport const useImageModal = (\n editor: Editor | null,\n application?: string,\n visibility?: WorkspaceVisibility,\n) => {\n const [currentImage, setCurrentImage] = useState<EditedImage | undefined>(\n undefined,\n );\n\n const [isOpen, toggle] = useToggle(false);\n\n // Use hook to createOrUpdate image\n const { createOrUpdate } = useWorkspaceFile();\n // Use hook to get selected images\n const { setAttributes, getSelection } = useImageSelection(editor);\n\n const handleCancel = () => {\n toggle();\n };\n\n const handleEdit = () => {\n const selected = getSelection()[0];\n if (selected) {\n setCurrentImage(selected);\n toggle();\n }\n };\n\n // Callback when image has been edited\n const handleSave = async ({\n blob,\n legend,\n altText: alt,\n }: {\n blob: Blob;\n legend: string;\n altText: string;\n }) => {\n const res = await createOrUpdate({\n blob,\n legend,\n alt,\n uri: currentImage?.src,\n visibility,\n application,\n });\n toggle();\n /**\n * WB-3053: res is of type object because\n * @returns {\n * updated file\n * src path\n * }\n */\n if (typeof res === 'object') {\n setAttributes({\n url: res.src,\n alt,\n title: legend,\n });\n }\n };\n\n return {\n isOpen,\n currentImage,\n toggle,\n handleCancel,\n handleEdit,\n handleSave,\n };\n};\n"],"names":["useImageModal","editor","application","visibility","currentImage","setCurrentImage","useState","undefined","isOpen","toggle","useToggle","createOrUpdate","useWorkspaceFile","setAttributes","getSelection","useImageSelection","handleCancel","handleEdit","selected","handleSave","blob","legend","altText","alt","res","uri","src","url","title"],"mappings":";;;;AAsBO,MAAMA,IAAgBA,CAC3BC,GACAC,GACAC,MACG;AACH,QAAM,CAACC,GAAcC,CAAe,IAAIC,EACtCC,MACF,GAEM,CAACC,GAAQC,CAAM,IAAIC,EAAU,EAAK,GAGlC;AAAA,IAAEC,gBAAAA;AAAAA,MAAmBC,EAAiB,GAEtC;AAAA,IAAEC,eAAAA;AAAAA,IAAeC,cAAAA;AAAAA,EAAAA,IAAiBC,EAAkBd,CAAM;AAiDzD,SAAA;AAAA,IACLO,QAAAA;AAAAA,IACAJ,cAAAA;AAAAA,IACAK,QAAAA;AAAAA,IACAO,cAnDmBA,MAAM;AAClB,MAAAP;IAAA;AAAA,IAmDPQ,YAhDiBA,MAAM;AACjBC,YAAAA,IAAWJ,IAAe,CAAC;AACjC,MAAII,MACFb,EAAgBa,CAAQ,GACjBT;IACT;AAAA,IA4CAU,YAxCiB,OAAO;AAAA,MACxBC,MAAAA;AAAAA,MACAC,QAAAA;AAAAA,MACAC,SAASC;AAAAA,IAAAA,MAKL;AACEC,YAAAA,IAAM,MAAMb,EAAe;AAAA,QAC/BS,MAAAA;AAAAA,QACAC,QAAAA;AAAAA,QACAE,KAAAA;AAAAA,QACAE,KAAKrB,KAAAA,gBAAAA,EAAcsB;AAAAA,QACnBvB,YAAAA;AAAAA,QACAD,aAAAA;AAAAA,MAAAA,CACD;AACM,MAAAO,KAQH,OAAOe,KAAQ,YACHX,EAAA;AAAA,QACZc,KAAKH,EAAIE;AAAAA,QACTH,KAAAA;AAAAA,QACAK,OAAOP;AAAAA,MAAAA,CACR;AAAA,IACH;AAAA,EASAF;AAEJ;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
/**
|
|
3
|
-
* This hooks lets manipulate selected image node by
|
|
4
|
-
* - setting attributes
|
|
5
|
-
* - getting their attributes
|
|
6
|
-
*
|
|
7
|
-
* @param editor
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare function useImageSelection(editor?: Editor | null | undefined): {
|
|
11
|
-
setAttributes: ({ url, alt, title, }: {
|
|
12
|
-
url: string;
|
|
13
|
-
alt?: string | undefined;
|
|
14
|
-
title?: string | undefined;
|
|
15
|
-
}) => void;
|
|
16
|
-
getSelection: () => {
|
|
17
|
-
src: string;
|
|
18
|
-
title: string;
|
|
19
|
-
alt: string;
|
|
20
|
-
}[];
|
|
21
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { addTimestampToImageUrl as c } from "../../../utils/addTimestampToUrl.js";
|
|
2
|
-
function r(t) {
|
|
3
|
-
return {
|
|
4
|
-
setAttributes: ({
|
|
5
|
-
url: s,
|
|
6
|
-
alt: a,
|
|
7
|
-
title: n
|
|
8
|
-
}) => {
|
|
9
|
-
(t == null ? void 0 : t.chain().updateAttributes("custom-image", {
|
|
10
|
-
src: c(s),
|
|
11
|
-
alt: a,
|
|
12
|
-
title: n
|
|
13
|
-
}).run()) || t == null || t.chain().updateAttributes("image", {
|
|
14
|
-
src: c(s),
|
|
15
|
-
alt: a,
|
|
16
|
-
title: n
|
|
17
|
-
}).run();
|
|
18
|
-
},
|
|
19
|
-
getSelection: () => {
|
|
20
|
-
const s = [];
|
|
21
|
-
if (!t)
|
|
22
|
-
return s;
|
|
23
|
-
const {
|
|
24
|
-
$from: a,
|
|
25
|
-
$to: n
|
|
26
|
-
} = t.state.selection;
|
|
27
|
-
return t.state.doc.nodesBetween(a.pos, n.pos, (e) => {
|
|
28
|
-
if (e.isAtom && (e.type.name === "image" || e.type.name === "custom-image")) {
|
|
29
|
-
const {
|
|
30
|
-
src: m,
|
|
31
|
-
title: u,
|
|
32
|
-
alt: p
|
|
33
|
-
} = e.attrs;
|
|
34
|
-
s.push({
|
|
35
|
-
src: m,
|
|
36
|
-
title: u,
|
|
37
|
-
alt: p
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}), s;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
r as useImageSelection
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=useImageSelection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useImageSelection.js","sources":["../../../../src/modules/editor/hooks/useImageSelection.ts"],"sourcesContent":["import { Editor } from '@tiptap/react';\nimport { addTimestampToImageUrl } from '../../../utils/addTimestampToUrl';\n/**\n * This hooks lets manipulate selected image node by\n * - setting attributes\n * - getting their attributes\n *\n * @param editor\n * @returns\n */\nexport function useImageSelection(editor?: Editor | null | undefined) {\n const getSelection = () => {\n const datas: Array<{ src: string; title: string; alt: string }> = [];\n if (!editor) {\n return datas;\n }\n const { $from, $to } = editor.state.selection;\n editor.state.doc.nodesBetween($from.pos, $to.pos, (node) => {\n if (\n node.isAtom &&\n (node.type.name === 'image' || node.type.name === 'custom-image')\n ) {\n const { src, title, alt } = node.attrs;\n datas.push({\n src,\n title,\n alt,\n });\n }\n });\n return datas;\n };\n const setAttributes = ({\n url,\n alt,\n title,\n }: {\n url: string;\n alt?: string;\n title?: string;\n }) => {\n // Update our custom image node\n const hasUpdate = editor\n ?.chain()\n .updateAttributes('custom-image', {\n src: addTimestampToImageUrl(url),\n alt,\n title,\n })\n .run();\n // If run failed => try update native image node\n if (!hasUpdate) {\n editor\n ?.chain()\n .updateAttributes('image', {\n src: addTimestampToImageUrl(url),\n alt,\n title,\n })\n .run();\n }\n };\n return { setAttributes, getSelection };\n}\n"],"names":["useImageSelection","editor","setAttributes","url","alt","title","chain","updateAttributes","src","addTimestampToImageUrl","run","getSelection","datas","$from","$to","state","selection","doc","nodesBetween","pos","node","isAtom","type","name","attrs","push"],"mappings":";AAUO,SAASA,EAAkBC,GAAoC;AAoD7D,SAAA;AAAA,IAAEC,eA9BaA,CAAC;AAAA,MACrBC,KAAAA;AAAAA,MACAC,KAAAA;AAAAA,MACAC,OAAAA;AAAAA,IAAAA,MAKI;AAWJ,OATkBJ,KAAAA,gBAAAA,EACdK,QACDC,iBAAiB,gBAAgB;AAAA,QAChCC,KAAKC,EAAuBN,CAAG;AAAA,QAC/BC,KAAAA;AAAAA,QACAC,OAAAA;AAAAA,MAAAA,GAEDK,UAIGJ,KAAAA,QAAAA,EAAAA,QACDC,iBAAiB,SAAS;AAAA,QACzBC,KAAKC,EAAuBN,CAAG;AAAA,QAC/BC,KAAAA;AAAAA,QACAC,OAAAA;AAAAA,MAAAA,GAEDK;AAAAA,IACL;AAAA,IAEsBC,cAnDHA,MAAM;AACzB,YAAMC,IAA4D,CAAA;AAClE,UAAI,CAACX;AACIW,eAAAA;AAEH,YAAA;AAAA,QAAEC,OAAAA;AAAAA,QAAOC,KAAAA;AAAAA,MAAAA,IAAQb,EAAOc,MAAMC;AACpCf,aAAAA,EAAOc,MAAME,IAAIC,aAAaL,EAAMM,KAAKL,EAAIK,KAAMC,CAASA,MAAA;AAExDA,YAAAA,EAAKC,WACJD,EAAKE,KAAKC,SAAS,WAAWH,EAAKE,KAAKC,SAAS,iBAClD;AACM,gBAAA;AAAA,YAAEf,KAAAA;AAAAA,YAAKH,OAAAA;AAAAA,YAAOD,KAAAA;AAAAA,UAAAA,IAAQgB,EAAKI;AACjCZ,UAAAA,EAAMa,KAAK;AAAA,YACTjB,KAAAA;AAAAA,YACAH,OAAAA;AAAAA,YACAD,KAAAA;AAAAA,UAAAA,CACD;AAAA,QACH;AAAA,MAAA,CACD,GACMQ;AAAAA,IAAAA;AAAAA,EAgCeD;AAC1B;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { HyperlinkAttributes, LinkerAttributes } from '@edifice.io/tiptap-extensions';
|
|
3
|
-
import { Editor } from '@tiptap/react';
|
|
4
|
-
import { MediaLibraryRef } from '../../multimedia';
|
|
5
|
-
/**
|
|
6
|
-
* Custom hook to handle LinkToolbar events.
|
|
7
|
-
* @returns {
|
|
8
|
-
* `onOpen`: Opens a link ,
|
|
9
|
-
* `onEdit`: Edit a link,
|
|
10
|
-
* `onUnlink`: Removes a link,
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export declare const useLinkToolbar: (editor: Editor | null, mediaLibraryRef: RefObject<MediaLibraryRef>) => {
|
|
14
|
-
onEdit: (attrs: LinkerAttributes | HyperlinkAttributes) => void;
|
|
15
|
-
onOpen: (attrs: LinkerAttributes) => void;
|
|
16
|
-
onUnlink: () => void;
|
|
17
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { useCallback as e } from "react";
|
|
2
|
-
const f = (n, p) => ({
|
|
3
|
-
onEdit: e((a) => {
|
|
4
|
-
var c, t;
|
|
5
|
-
n != null && n.isActive("hyperlink") && n.commands.extendMarkRange("hyperlink");
|
|
6
|
-
const s = a;
|
|
7
|
-
if (s["data-id"] || s["data-app-prefix"])
|
|
8
|
-
(c = p.current) == null || c.showLink({
|
|
9
|
-
target: a.target,
|
|
10
|
-
resourceId: s["data-id"],
|
|
11
|
-
appPrefix: s["data-app-prefix"]
|
|
12
|
-
});
|
|
13
|
-
else {
|
|
14
|
-
const {
|
|
15
|
-
href: k,
|
|
16
|
-
target: l
|
|
17
|
-
} = a;
|
|
18
|
-
(t = p.current) == null || t.showLink({
|
|
19
|
-
link: {
|
|
20
|
-
url: k || "",
|
|
21
|
-
target: l || void 0,
|
|
22
|
-
text: n != null && n.state.selection.empty ? "" : n == null ? void 0 : n.state.selection.content().content.child(0).textContent
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}, [n, p]),
|
|
27
|
-
onOpen: (a) => {
|
|
28
|
-
window.open(a.href || "about:blank", "_blank");
|
|
29
|
-
},
|
|
30
|
-
onUnlink: () => {
|
|
31
|
-
var a, s, c, t;
|
|
32
|
-
(s = n == null ? void 0 : (a = n.commands).unsetLinker) == null || s.call(a), (t = n == null ? void 0 : (c = n.commands).unsetLink) == null || t.call(c);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
f as useLinkToolbar
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=useLinkToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkToolbar.js","sources":["../../../../src/modules/editor/hooks/useLinkToolbar.ts"],"sourcesContent":["import { RefObject, useCallback } from 'react';\n\nimport {\n HyperlinkAttributes,\n LinkerAttributes,\n} from '@edifice.io/tiptap-extensions';\nimport { Editor } from '@tiptap/react';\nimport { MediaLibraryRef } from '../../multimedia';\n\n/**\n * Custom hook to handle LinkToolbar events.\n * @returns {\n * `onOpen`: Opens a link ,\n * `onEdit`: Edit a link,\n * `onUnlink`: Removes a link,\n * }\n */\nexport const useLinkToolbar = (\n editor: Editor | null,\n mediaLibraryRef: RefObject<MediaLibraryRef>,\n) => {\n const onEdit = useCallback(\n (attrs: LinkerAttributes | HyperlinkAttributes) => {\n // If a link is active, select it.\n // see https://github.com/ProseMirror/prosemirror-state/blob/88e2a24104481098f0f660e74240c0f846e7fd6e/src/selection.ts#L320\n // Edit: 2024-01-08 when this function is called, the linker node is already selected !\n // => Nothing to do, since the linkToolbar only appears when linker node is selected.\n // if (editor?.isActive(\"linker\"))\n // editor?.commands.setNodeSelection(editor?.state.selection.$from.pos);\n if (editor?.isActive('hyperlink'))\n editor.commands.extendMarkRange('hyperlink');\n\n const attrsLinker = attrs as LinkerAttributes;\n if (attrsLinker['data-id'] || attrsLinker['data-app-prefix']) {\n mediaLibraryRef.current?.showLink({\n target: attrs.target,\n resourceId: attrsLinker['data-id'],\n appPrefix: attrsLinker['data-app-prefix'],\n });\n } else {\n const { href, target } = attrs as HyperlinkAttributes;\n mediaLibraryRef.current?.showLink({\n link: {\n url: href || '',\n target: target || undefined,\n text: editor?.state.selection.empty\n ? ''\n : editor?.state.selection.content().content.child(0).textContent,\n },\n });\n }\n },\n [editor, mediaLibraryRef],\n );\n\n const onOpen = (attrs: LinkerAttributes) => {\n window.open(attrs.href || 'about:blank', '_blank');\n };\n\n const onUnlink = (/*attrs: LinkerAttributes*/) => {\n editor?.commands.unsetLinker?.();\n editor?.commands.unsetLink?.();\n };\n\n return {\n onEdit,\n onOpen,\n onUnlink,\n };\n};\n"],"names":["useLinkToolbar","editor","mediaLibraryRef","onEdit","useCallback","attrs","isActive","commands","extendMarkRange","attrsLinker","current","showLink","target","resourceId","appPrefix","href","link","url","undefined","text","state","selection","empty","content","child","textContent","onOpen","window","open","onUnlink","unsetLinker","unsetLink"],"mappings":";AAiBaA,MAAAA,IAAiBA,CAC5BC,GACAC,OA6CO;AAAA,EACLC,QA5CaC,EACb,CAACC,MAAkD;;AAOjD,IAAIJ,KAAAA,QAAAA,EAAQK,SAAS,gBACZC,EAAAA,SAASC,gBAAgB,WAAW;AAE7C,UAAMC,IAAcJ;AACpB,QAAII,EAAY,SAAS,KAAKA,EAAY,iBAAiB;AACzDP,OAAAA,IAAAA,EAAgBQ,YAAhBR,QAAAA,EAAyBS,SAAS;AAAA,QAChCC,QAAQP,EAAMO;AAAAA,QACdC,YAAYJ,EAAY,SAAS;AAAA,QACjCK,WAAWL,EAAY,iBAAiB;AAAA,MAAA;AAAA,SAErC;AACC,YAAA;AAAA,QAAEM,MAAAA;AAAAA,QAAMH,QAAAA;AAAAA,MAAWP,IAAAA;AACzBH,OAAAA,IAAAA,EAAgBQ,YAAhBR,QAAAA,EAAyBS,SAAS;AAAA,QAChCK,MAAM;AAAA,UACJC,KAAKF,KAAQ;AAAA,UACbH,QAAQA,KAAUM;AAAAA,UAClBC,MAAMlB,KAAAA,QAAAA,EAAQmB,MAAMC,UAAUC,QAC1B,KACArB,KAAAA,gBAAAA,EAAQmB,MAAMC,UAAUE,UAAUA,QAAQC,MAAM,GAAGC;AAAAA,QACzD;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA,GAEF,CAACxB,GAAQC,CAAe,CAC1B;AAAA,EAaEwB,QAXaA,CAACrB,MAA4B;AAC1CsB,WAAOC,KAAKvB,EAAMU,QAAQ,eAAe,QAAQ;AAAA,EAAA;AAAA,EAWjDc,UAReA,MAAiC;;AAChD5B,KAAAA,IAAAA,KAAAA,iBAAAA,IAAAA,EAAQM,UAASuB,gBAAjB7B,QAAAA,EAAAA,KAAAA,KACAA,IAAAA,KAAAA,iBAAAA,IAAAA,EAAQM,UAASwB,cAAjB9B,QAAAA,EAAAA,KAAAA;AAAAA,EAA6B;AAM7B4B;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/react';
|
|
2
|
-
/**
|
|
3
|
-
* Custom hook to manage MathsModal events in an editor.
|
|
4
|
-
* @param editor an instance
|
|
5
|
-
* @returns {
|
|
6
|
-
* `isOpen`: truthy boolean when MathsModal sholud be visible,
|
|
7
|
-
* `toggle`: an imperative function to toggle the `isOpen` value,
|
|
8
|
-
* `onCancel`: Cancel event handler,
|
|
9
|
-
* `onSuccess`: Success event handler (adds a formula to the editor content),
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export declare const useMathsModal: (editor: Editor | null) => {
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
toggle: any;
|
|
15
|
-
onCancel: () => void;
|
|
16
|
-
onSuccess: (formulaEditor: string) => void;
|
|
17
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import a from "../../../hooks/useToggle/useToggle.js";
|
|
2
|
-
const m = (n) => {
|
|
3
|
-
const [c, s] = a(!1);
|
|
4
|
-
return {
|
|
5
|
-
isOpen: c,
|
|
6
|
-
toggle: s,
|
|
7
|
-
onCancel: () => {
|
|
8
|
-
s();
|
|
9
|
-
},
|
|
10
|
-
onSuccess: (e) => {
|
|
11
|
-
n == null || n.commands.insertContentAt(n.view.state.selection, e), n == null || n.commands.enter(), s();
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
m as useMathsModal
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=useMathsModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMathsModal.js","sources":["../../../../src/modules/editor/hooks/useMathsModal.ts"],"sourcesContent":["import { Editor } from '@tiptap/react';\nimport { useToggle } from '../../../hooks';\n\n/**\n * Custom hook to manage MathsModal events in an editor.\n * @param editor an instance\n * @returns {\n * `isOpen`: truthy boolean when MathsModal sholud be visible,\n * `toggle`: an imperative function to toggle the `isOpen` value,\n * `onCancel`: Cancel event handler,\n * `onSuccess`: Success event handler (adds a formula to the editor content),\n * }\n */\nexport const useMathsModal = (editor: Editor | null) => {\n const [isOpen, toggle] = useToggle(false);\n\n const onCancel = () => {\n toggle();\n };\n\n const onSuccess = (formulaEditor: string) => {\n editor?.commands.insertContentAt(\n editor.view.state.selection,\n formulaEditor,\n );\n editor?.commands.enter();\n toggle();\n };\n\n return {\n isOpen,\n toggle,\n onCancel,\n onSuccess,\n };\n};\n"],"names":["useMathsModal","editor","isOpen","toggle","useToggle","onCancel","onSuccess","formulaEditor","commands","insertContentAt","view","state","selection","enter"],"mappings":";AAaaA,MAAAA,IAAgBA,CAACC,MAA0B;AACtD,QAAM,CAACC,GAAQC,CAAM,IAAIC,EAAU,EAAK;AAejC,SAAA;AAAA,IACLF,QAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAE,UAhBeA,MAAM;AACd,MAAAF;IAAA;AAAA,IAgBPG,WAbgBA,CAACC,MAA0B;AAC3CN,MAAAA,KAAAA,QAAAA,EAAQO,SAASC,gBACfR,EAAOS,KAAKC,MAAMC,WAClBL,IAEFN,KAAAA,QAAAA,EAAQO,SAASK,SACVV;IAAA;AAAA,EAOPG;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useMathsStyles: () => void;
|