@edifice.io/react 2.0.0-develop-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/README.md +110 -0
- package/dist/audience.js +16 -0
- package/dist/components/ActionBar/ActionBar.d.ts +10 -0
- package/dist/components/ActionBar/ActionBar.js +8 -0
- package/dist/components/ActionBar/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +60 -0
- package/dist/components/Alert/Alert.js +78 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AppHeader/AppHeader.d.ts +17 -0
- package/dist/components/AppHeader/AppHeader.js +22 -0
- package/dist/components/AppHeader/index.d.ts +2 -0
- package/dist/components/AppIcon/AppIcon.d.ts +45 -0
- package/dist/components/AppIcon/AppIcon.js +49 -0
- package/dist/components/AppIcon/index.d.ts +1 -0
- package/dist/components/Attachment/Attachment.d.ts +14 -0
- package/dist/components/Attachment/Attachment.js +15 -0
- package/dist/components/Attachment/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +32 -0
- package/dist/components/Avatar/Avatar.js +33 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +47 -0
- package/dist/components/Badge/Badge.js +31 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +28 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.d.ts +13 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +14 -0
- package/dist/components/Breadcrumb/BreadcrumbList.d.ts +13 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +13 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +18 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.js +22 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +63 -0
- package/dist/components/Button/Button.js +35 -0
- package/dist/components/Button/IconButton.d.ts +11 -0
- package/dist/components/Button/IconButton.js +18 -0
- package/dist/components/Button/SearchButton.d.ts +21 -0
- package/dist/components/Button/SearchButton.js +17 -0
- package/dist/components/Button/index.d.ts +6 -0
- package/dist/components/Card/Card.d.ts +83 -0
- package/dist/components/Card/Card.js +51 -0
- package/dist/components/Card/CardBody.d.ts +10 -0
- package/dist/components/Card/CardBody.js +18 -0
- package/dist/components/Card/CardContext.d.ts +12 -0
- package/dist/components/Card/CardContext.js +11 -0
- package/dist/components/Card/CardFooter.d.ts +8 -0
- package/dist/components/Card/CardFooter.js +7 -0
- package/dist/components/Card/CardHeader.d.ts +5 -0
- package/dist/components/Card/CardHeader.js +19 -0
- package/dist/components/Card/CardImage.d.ts +9 -0
- package/dist/components/Card/CardImage.js +21 -0
- package/dist/components/Card/CardText.d.ts +9 -0
- package/dist/components/Card/CardText.js +12 -0
- package/dist/components/Card/CardTitle.d.ts +9 -0
- package/dist/components/Card/CardTitle.js +12 -0
- package/dist/components/Card/CardUser.d.ts +8 -0
- package/dist/components/Card/CardUser.js +10 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +21 -0
- package/dist/components/Checkbox/Checkbox.js +35 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPalette.d.ts +46 -0
- package/dist/components/ColorPicker/ColorPalette.js +171 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +18 -0
- package/dist/components/ColorPicker/ColorPicker.js +37 -0
- package/dist/components/ColorPicker/ColorPickerItem.d.ts +20 -0
- package/dist/components/ColorPicker/ColorPickerItem.js +13 -0
- package/dist/components/ColorPicker/index.d.ts +5 -0
- package/dist/components/Combobox/Combobox.d.ts +31 -0
- package/dist/components/Combobox/Combobox.js +41 -0
- package/dist/components/Combobox/ComboboxTrigger.d.ts +9 -0
- package/dist/components/Combobox/ComboboxTrigger.js +30 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Dropdown/Dropdown.d.ts +79 -0
- package/dist/components/Dropdown/Dropdown.js +60 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.d.ts +24 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.js +34 -0
- package/dist/components/Dropdown/DropdownContext.d.ts +8 -0
- package/dist/components/Dropdown/DropdownContext.js +11 -0
- package/dist/components/Dropdown/DropdownItem.d.ts +29 -0
- package/dist/components/Dropdown/DropdownItem.js +33 -0
- package/dist/components/Dropdown/DropdownMenu.d.ts +35 -0
- package/dist/components/Dropdown/DropdownMenu.js +26 -0
- package/dist/components/Dropdown/DropdownMenuGroup.d.ts +13 -0
- package/dist/components/Dropdown/DropdownMenuGroup.js +12 -0
- package/dist/components/Dropdown/DropdownRadioItem.d.ts +24 -0
- package/dist/components/Dropdown/DropdownRadioItem.js +34 -0
- package/dist/components/Dropdown/DropdownSeparator.d.ts +5 -0
- package/dist/components/Dropdown/DropdownSeparator.js +5 -0
- package/dist/components/Dropdown/DropdownTrigger.d.ts +38 -0
- package/dist/components/Dropdown/DropdownTrigger.js +34 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropzone/Dropzone.d.ts +28 -0
- package/dist/components/Dropzone/Dropzone.js +56 -0
- package/dist/components/Dropzone/DropzoneContext.d.ts +10 -0
- package/dist/components/Dropzone/DropzoneContext.js +12 -0
- package/dist/components/Dropzone/DropzoneDrag.d.ts +5 -0
- package/dist/components/Dropzone/DropzoneDrag.js +11 -0
- package/dist/components/Dropzone/DropzoneFile.d.ts +8 -0
- package/dist/components/Dropzone/DropzoneFile.js +32 -0
- package/dist/components/Dropzone/DropzoneImport.d.ts +5 -0
- package/dist/components/Dropzone/DropzoneImport.js +28 -0
- package/dist/components/Dropzone/index.d.ts +2 -0
- package/dist/components/EmptyScreen/EmptyScreen.d.ts +27 -0
- package/dist/components/EmptyScreen/EmptyScreen.js +20 -0
- package/dist/components/EmptyScreen/index.d.ts +2 -0
- package/dist/components/FileCard/FileCard.d.ts +13 -0
- package/dist/components/FileCard/FileCard.js +91 -0
- package/dist/components/FileCard/FileIcon.d.ts +6 -0
- package/dist/components/FileCard/FileIcon.js +15 -0
- package/dist/components/FileCard/index.d.ts +2 -0
- package/dist/components/Form/FormContext.d.ts +6 -0
- package/dist/components/Form/FormContext.js +11 -0
- package/dist/components/Form/FormControl.d.ts +42 -0
- package/dist/components/Form/FormControl.js +32 -0
- package/dist/components/Form/FormText.d.ts +8 -0
- package/dist/components/Form/FormText.js +17 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Grid/Grid.d.ts +56 -0
- package/dist/components/Grid/Grid.js +32 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Heading/Heading.d.ts +27 -0
- package/dist/components/Heading/Heading.js +16 -0
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +17 -0
- package/dist/components/Icon/Icon.js +10 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Image/Image.d.ts +29 -0
- package/dist/components/Image/Image.js +41 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +38 -0
- package/dist/components/ImagePicker/ImagePicker.js +58 -0
- package/dist/components/ImagePicker/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +33 -0
- package/dist/components/Input/Input.js +31 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Label/Label.d.ts +26 -0
- package/dist/components/Label/Label.js +37 -0
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Loading/Loading.d.ts +29 -0
- package/dist/components/Loading/Loading.js +27 -0
- package/dist/components/Loading/index.d.ts +2 -0
- package/dist/components/LoadingScreen/LoadingScreen.d.ts +7 -0
- package/dist/components/LoadingScreen/LoadingScreen.js +25 -0
- package/dist/components/LoadingScreen/index.d.ts +1 -0
- package/dist/components/Logo/Logo.d.ts +8 -0
- package/dist/components/Logo/Logo.js +14 -0
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +14 -0
- package/dist/components/Menu/Menu.js +58 -0
- package/dist/components/Menu/MenuButton.d.ts +5 -0
- package/dist/components/Menu/MenuButton.js +21 -0
- package/dist/components/Menu/MenuContext.d.ts +10 -0
- package/dist/components/Menu/MenuContext.js +12 -0
- package/dist/components/Menu/MenuItem.d.ts +4 -0
- package/dist/components/Menu/MenuItem.js +19 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Modal/Modal.d.ts +56 -0
- package/dist/components/Modal/Modal.js +72 -0
- package/dist/components/Modal/ModalBody.d.ts +19 -0
- package/dist/components/Modal/ModalBody.js +15 -0
- package/dist/components/Modal/ModalContext.d.ts +8 -0
- package/dist/components/Modal/ModalContext.js +15 -0
- package/dist/components/Modal/ModalFooter.d.ts +12 -0
- package/dist/components/Modal/ModalFooter.js +5 -0
- package/dist/components/Modal/ModalHeader.d.ts +19 -0
- package/dist/components/Modal/ModalHeader.js +27 -0
- package/dist/components/Modal/ModalSubtitle.d.ts +12 -0
- package/dist/components/Modal/ModalSubtitle.js +5 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +33 -0
- package/dist/components/Popover/Popover.js +51 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +25 -0
- package/dist/components/Radio/Radio.js +31 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.d.ts +51 -0
- package/dist/components/SearchBar/SearchBar.js +36 -0
- package/dist/components/SearchBar/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.js +37 -0
- package/dist/components/Select/SelectTrigger.d.ts +8 -0
- package/dist/components/Select/SelectTrigger.js +6 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Table/TableExplorer.d.ts +14 -0
- package/dist/components/Table/TableExplorer.js +8 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +42 -0
- package/dist/components/Tabs/Tabs.js +75 -0
- package/dist/components/Tabs/TabsContext.d.ts +12 -0
- package/dist/components/Tabs/TabsContext.js +12 -0
- package/dist/components/Tabs/TabsItem.d.ts +26 -0
- package/dist/components/Tabs/TabsItem.js +26 -0
- package/dist/components/Tabs/TabsList.d.ts +6 -0
- package/dist/components/Tabs/TabsList.js +24 -0
- package/dist/components/Tabs/TabsPanel.d.ts +17 -0
- package/dist/components/Tabs/TabsPanel.js +14 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/TextArea/TextArea.d.ts +33 -0
- package/dist/components/TextArea/TextArea.js +34 -0
- package/dist/components/TextArea/TextareaCounter.d.ts +4 -0
- package/dist/components/TextArea/TextareaCounter.js +8 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/Toolbar/Toolbar.d.ts +76 -0
- package/dist/components/Toolbar/Toolbar.js +77 -0
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.js +40 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/TreeView/TreeItem.d.ts +52 -0
- package/dist/components/TreeView/TreeItem.js +54 -0
- package/dist/components/TreeView/TreeNode.d.ts +22 -0
- package/dist/components/TreeView/TreeView.d.ts +40 -0
- package/dist/components/TreeView/TreeView.js +39 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.d.ts +8 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.js +28 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/UploadCard/UploadCard.d.ts +42 -0
- package/dist/components/UploadCard/UploadCard.js +72 -0
- package/dist/components/UploadCard/index.d.ts +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +6 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -0
- package/dist/components/VisuallyHidden/index.d.ts +1 -0
- package/dist/components/index.d.ts +42 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +28 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.js +62 -0
- package/dist/core/OdeClientProvider/index.d.ts +1 -0
- package/dist/core/ThemeProvider/ThemeProvider.d.ts +11 -0
- package/dist/core/ThemeProvider/ThemeProvider.js +52 -0
- package/dist/core/ThemeProvider/index.d.ts +1 -0
- package/dist/core/index.d.ts +24 -0
- package/dist/core/useAvatar/index.d.ts +1 -0
- package/dist/core/useAvatar/useAvatar.d.ts +6 -0
- package/dist/core/useAvatar/useAvatar.js +30 -0
- package/dist/core/useBookmark/index.d.ts +1 -0
- package/dist/core/useBookmark/useBookmark.d.ts +2 -0
- package/dist/core/useBookmark/useBookmark.js +14 -0
- package/dist/core/useConf/index.d.ts +1 -0
- package/dist/core/useConf/useConf.d.ts +4 -0
- package/dist/core/useConf/useConf.js +13 -0
- package/dist/core/useConversation/index.d.ts +1 -0
- package/dist/core/useConversation/useConversation.d.ts +6 -0
- package/dist/core/useConversation/useConversation.js +43 -0
- package/dist/core/useCookiesConsent/index.d.ts +1 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.d.ts +5 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.js +29 -0
- package/dist/core/useDate/index.d.ts +2 -0
- package/dist/core/useDate/useDate.d.ts +13 -0
- package/dist/core/useDate/useDate.js +65 -0
- package/dist/core/useHasWorkflow/index.d.ts +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.d.ts +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.js +22 -0
- package/dist/core/useHeader/index.d.ts +1 -0
- package/dist/core/useHeader/useHeader.d.ts +5 -0
- package/dist/core/useHeader/useHeader.js +46 -0
- package/dist/core/useHttpErrorToast/index.d.ts +1 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.d.ts +2 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js +21 -0
- package/dist/core/useIsAdml/index.d.ts +1 -0
- package/dist/core/useIsAdml/useIsAdml.d.ts +3 -0
- package/dist/core/useIsAdml/useIsAdml.js +18 -0
- package/dist/core/useLibraryUrl/index.d.ts +1 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.d.ts +7 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.js +21 -0
- package/dist/core/useMediaLibrary/index.d.ts +1 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +12 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.js +58 -0
- package/dist/core/useOdeIcons/index.d.ts +1 -0
- package/dist/core/useOdeIcons/useOdeIcons.d.ts +9 -0
- package/dist/core/useOdeIcons/useOdeIcons.js +92 -0
- package/dist/core/usePaths/index.d.ts +1 -0
- package/dist/core/usePaths/usePaths.d.ts +1 -0
- package/dist/core/usePaths/usePaths.js +6 -0
- package/dist/core/usePreferences/index.d.ts +1 -0
- package/dist/core/usePreferences/usePreferences.d.ts +4 -0
- package/dist/core/usePreferences/usePreferences.js +10 -0
- package/dist/core/useResource/index.d.ts +1 -0
- package/dist/core/useResource/useResource.d.ts +3 -0
- package/dist/core/useResource/useResource.js +25 -0
- package/dist/core/useResourceSearch/index.d.ts +1 -0
- package/dist/core/useResourceSearch/useResourceSearch.d.ts +18 -0
- package/dist/core/useResourceSearch/useResourceSearch.js +34 -0
- package/dist/core/useSession/index.d.ts +1 -0
- package/dist/core/useSession/useSession.d.ts +1 -0
- package/dist/core/useSession/useSession.js +11 -0
- package/dist/core/useTrashedResource/index.d.ts +1 -0
- package/dist/core/useTrashedResource/useTrashedResource.d.ts +6 -0
- package/dist/core/useTrashedResource/useTrashedResource.js +27 -0
- package/dist/core/useUpload/index.d.ts +1 -0
- package/dist/core/useUpload/useUpload.d.ts +18 -0
- package/dist/core/useUpload/useUpload.js +106 -0
- package/dist/core/useUploadFiles/index.d.ts +1 -0
- package/dist/core/useUploadFiles/useUploadFiles.d.ts +25 -0
- package/dist/core/useUploadFiles/useUploadFiles.js +101 -0
- package/dist/core/useUser/index.d.ts +1 -0
- package/dist/core/useUser/useUser.d.ts +7 -0
- package/dist/core/useUser/useUser.js +22 -0
- package/dist/core/useWorkspaceFile/index.d.ts +1 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +21 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js +49 -0
- package/dist/core/useWorkspaceSearch/index.d.ts +1 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +9 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +58 -0
- package/dist/core/useXitiTrackPageLoad/index.d.ts +1 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.d.ts +4 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +28 -0
- package/dist/core/useZendeskGuide/index.d.ts +1 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.d.ts +2 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.js +101 -0
- package/dist/editor.js +58 -0
- package/dist/hooks/index.d.ts +14 -0
- package/dist/hooks/useBrowserInfo/index.d.ts +1 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.d.ts +9 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +16 -0
- package/dist/hooks/useClickOutside/index.d.ts +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +2 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +26 -0
- package/dist/hooks/useDebounce/index.d.ts +1 -0
- package/dist/hooks/useDebounce/useDebounce.d.ts +2 -0
- package/dist/hooks/useDebounce/useDebounce.js +15 -0
- package/dist/hooks/useDropdown/index.d.ts +1 -0
- package/dist/hooks/useDropdown/useDropdown.d.ts +32 -0
- package/dist/hooks/useDropdown/useDropdown.js +158 -0
- package/dist/hooks/useDropzone/index.d.ts +1 -0
- package/dist/hooks/useDropzone/useDropzone.d.ts +34 -0
- package/dist/hooks/useDropzone/useDropzone.js +76 -0
- package/dist/hooks/useHover/index.d.ts +1 -0
- package/dist/hooks/useHover/useHover.d.ts +2 -0
- package/dist/hooks/useHover/useHover.js +22 -0
- package/dist/hooks/useImage/index.d.ts +1 -0
- package/dist/hooks/useImage/useImage.d.ts +9 -0
- package/dist/hooks/useImage/useImage.js +18 -0
- package/dist/hooks/useImageResizer/index.d.ts +1 -0
- package/dist/hooks/useImageResizer/useImageResizer.d.ts +8 -0
- package/dist/hooks/useImageResizer/useImageResizer.js +42 -0
- package/dist/hooks/useKeyPress/index.d.ts +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.d.ts +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +14 -0
- package/dist/hooks/useScrollToTop/index.d.ts +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.d.ts +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.js +9 -0
- package/dist/hooks/useThumbnail/index.d.ts +1 -0
- package/dist/hooks/useThumbnail/useThumbnail.d.ts +14 -0
- package/dist/hooks/useThumbnail/useThumbnail.js +29 -0
- package/dist/hooks/useTitle/index.d.ts +1 -0
- package/dist/hooks/useTitle/useTitle.d.ts +1 -0
- package/dist/hooks/useTitle/useTitle.js +10 -0
- package/dist/hooks/useToast/index.d.ts +1 -0
- package/dist/hooks/useToast/useToast.d.ts +17 -0
- package/dist/hooks/useToast/useToast.js +34 -0
- package/dist/hooks/useToggle/index.d.ts +1 -0
- package/dist/hooks/useToggle/useToggle.d.ts +1 -0
- package/dist/hooks/useToggle/useToggle.js +10 -0
- package/dist/hooks/useTrapFocus/index.d.ts +1 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.d.ts +2 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.js +16 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +227 -0
- package/dist/modals.js +18 -0
- package/dist/modules/audience/ReactionChoice.d.ts +11 -0
- package/dist/modules/audience/ReactionChoice.js +33 -0
- package/dist/modules/audience/ReactionModal.Card.d.ts +4 -0
- package/dist/modules/audience/ReactionModal.Card.js +34 -0
- package/dist/modules/audience/ReactionModal.d.ts +20 -0
- package/dist/modules/audience/ReactionModal.js +73 -0
- package/dist/modules/audience/ReactionSummary.d.ts +10 -0
- package/dist/modules/audience/ReactionSummary.js +27 -0
- package/dist/modules/audience/ViewsByProfileCard.d.ts +9 -0
- package/dist/modules/audience/ViewsByProfileCard.js +35 -0
- package/dist/modules/audience/ViewsCounter.d.ts +11 -0
- package/dist/modules/audience/ViewsCounter.js +18 -0
- package/dist/modules/audience/ViewsModal.d.ts +11 -0
- package/dist/modules/audience/ViewsModal.js +40 -0
- package/dist/modules/audience/hooks/useReactionIcons.d.ts +5 -0
- package/dist/modules/audience/hooks/useReactionIcons.js +37 -0
- package/dist/modules/audience/hooks/useReactions.d.ts +15 -0
- package/dist/modules/audience/hooks/useReactions.js +35 -0
- package/dist/modules/audience/hooks/useViews.d.ts +11 -0
- package/dist/modules/audience/index.d.ts +12 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.d.ts +8 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +132 -0
- package/dist/modules/editor/components/BubbleMenuEditImage/index.d.ts +1 -0
- package/dist/modules/editor/components/Editor/Editor.d.ts +45 -0
- package/dist/modules/editor/components/Editor/Editor.js +83 -0
- package/dist/modules/editor/components/Editor/MathsModal.d.ts +8 -0
- package/dist/modules/editor/components/Editor/MathsModal.js +50 -0
- package/dist/modules/editor/components/Editor/index.d.ts +2 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.d.ts +22 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +17 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +54 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +47 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.d.ts +9 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +18 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.d.ts +14 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +50 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +62 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +52 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.d.ts +10 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +319 -0
- package/dist/modules/editor/components/EditorToolbar/index.d.ts +1 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.d.ts +2 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.js +10 -0
- package/dist/modules/editor/components/NodeView/index.d.ts +5 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.d.ts +7 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +34 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.d.ts +7 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +11 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.d.ts +9 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +34 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.d.ts +2 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +69 -0
- package/dist/modules/editor/components/Renderer/index.d.ts +4 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.d.ts +2 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +8 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.d.ts +15 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +59 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +28 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.d.ts +13 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +45 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +27 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.d.ts +9 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +88 -0
- package/dist/modules/editor/components/Toolbar/index.d.ts +2 -0
- package/dist/modules/editor/components/index.d.ts +6 -0
- package/dist/modules/editor/hooks/index.d.ts +12 -0
- package/dist/modules/editor/hooks/useActionOptions.d.ts +5 -0
- package/dist/modules/editor/hooks/useActionOptions.js +75 -0
- package/dist/modules/editor/hooks/useCommentEditor.d.ts +13 -0
- package/dist/modules/editor/hooks/useCommentEditor.js +37 -0
- package/dist/modules/editor/hooks/useEditorContext.d.ts +37 -0
- package/dist/modules/editor/hooks/useEditorContext.js +12 -0
- package/dist/modules/editor/hooks/useImageModal.d.ts +31 -0
- package/dist/modules/editor/hooks/useImageModal.js +46 -0
- package/dist/modules/editor/hooks/useImageSelection.d.ts +21 -0
- package/dist/modules/editor/hooks/useImageSelection.js +46 -0
- package/dist/modules/editor/hooks/useLinkToolbar.d.ts +17 -0
- package/dist/modules/editor/hooks/useLinkToolbar.js +37 -0
- package/dist/modules/editor/hooks/useMathsModal.d.ts +17 -0
- package/dist/modules/editor/hooks/useMathsModal.js +17 -0
- package/dist/modules/editor/hooks/useMathsStyles.d.ts +1 -0
- package/dist/modules/editor/hooks/useMathsStyles.js +20 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +19 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +152 -0
- package/dist/modules/editor/hooks/useResizeMedia.d.ts +10 -0
- package/dist/modules/editor/hooks/useResizeMedia.js +47 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.d.ts +6 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.js +21 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.d.ts +12 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +20 -0
- package/dist/modules/editor/hooks/useTipTapEditor.d.ts +15 -0
- package/dist/modules/editor/hooks/useTipTapEditor.js +75 -0
- package/dist/modules/editor/index.d.ts +3 -0
- package/dist/modules/editor/utils/has-extension.d.ts +2 -0
- package/dist/modules/editor/utils/has-extension.js +4 -0
- package/dist/modules/editor/utils/has-mark.d.ts +2 -0
- package/dist/modules/editor/utils/has-mark.js +4 -0
- package/dist/modules/editor/utils/has-text-style.d.ts +2 -0
- package/dist/modules/editor/utils/has-text-style.js +5 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +43 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +59 -0
- package/dist/modules/modals/OnboardingModal/index.d.ts +1 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.d.ts +7 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +30 -0
- package/dist/modules/modals/PublishModal/PublishModal.d.ts +9 -0
- package/dist/modules/modals/PublishModal/PublishModal.js +120 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.d.ts +7 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +29 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.d.ts +8 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.js +20 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.d.ts +5 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.js +19 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.d.ts +1 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +23 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.d.ts +7 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +29 -0
- package/dist/modules/modals/PublishModal/components/ToastError.d.ts +5 -0
- package/dist/modules/modals/PublishModal/components/ToastError.js +24 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +4 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js +18 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.d.ts +1 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.js +4 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +34 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +43 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +38 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +106 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.d.ts +4 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +118 -0
- package/dist/modules/modals/PublishModal/index.d.ts +1 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +30 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.js +156 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +13 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +62 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +17 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js +41 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +11 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js +17 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +7 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +12 -0
- package/dist/modules/modals/ResourceModal/index.d.ts +3 -0
- package/dist/modules/modals/ShareModal/ShareBookmark.d.ts +8 -0
- package/dist/modules/modals/ShareModal/ShareBookmark.js +22 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +9 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.js +42 -0
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +41 -0
- package/dist/modules/modals/ShareModal/ShareModal.js +128 -0
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +8 -0
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js +42 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +24 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.js +178 -0
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +54 -0
- package/dist/modules/modals/ShareModal/hooks/useShare.js +192 -0
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +23 -0
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +67 -0
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +13 -0
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +15 -0
- package/dist/modules/modals/ShareModal/index.d.ts +3 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +2 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.js +4 -0
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +2 -0
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.js +4 -0
- package/dist/modules/modals/index.d.ts +4 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +12 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +49 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.d.ts +10 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +24 -0
- package/dist/modules/multimedia/AudioRecorder/index.d.ts +1 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +16 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +307 -0
- package/dist/modules/multimedia/Embed/Embed.d.ts +5 -0
- package/dist/modules/multimedia/Embed/Embed.js +32 -0
- package/dist/modules/multimedia/Embed/index.d.ts +2 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.d.ts +27 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +116 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.d.ts +7 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +69 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.d.ts +19 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +72 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.d.ts +28 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.js +155 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.d.ts +154 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.js +162 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.d.ts +25 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.js +157 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.d.ts +8 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js +33 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.d.ts +32 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +66 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.d.ts +30 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +76 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.d.ts +23 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +52 -0
- package/dist/modules/multimedia/ImageEditor/index.d.ts +1 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.d.ts +9 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +13 -0
- package/dist/modules/multimedia/ImageEditor/utils/debounceAggregate.d.ts +10 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +46 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +39 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/index.d.ts +2 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.d.ts +28 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.js +45 -0
- package/dist/modules/multimedia/Linker/InternalLinker.d.ts +28 -0
- package/dist/modules/multimedia/Linker/InternalLinker.js +114 -0
- package/dist/modules/multimedia/Linker/index.d.ts +4 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +13 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +38 -0
- package/dist/modules/multimedia/LinkerCard/index.d.ts +2 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +84 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +211 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +60 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +12 -0
- package/dist/modules/multimedia/MediaLibrary/index.d.ts +3 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +19 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.d.ts +6 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +17 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +14 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +11 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +35 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +34 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +22 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +14 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.d.ts +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +31 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.d.ts +10 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +21 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +9 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js +56 -0
- package/dist/modules/multimedia/UploadFiles/index.d.ts +2 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.d.ts +5 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +77 -0
- package/dist/modules/multimedia/VideoEmbed/index.d.ts +1 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +14 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +259 -0
- package/dist/modules/multimedia/VideoRecorder/index.d.ts +1 -0
- package/dist/modules/multimedia/Workspace/Workspace.d.ts +33 -0
- package/dist/modules/multimedia/Workspace/Workspace.js +169 -0
- package/dist/modules/multimedia/Workspace/index.d.ts +2 -0
- package/dist/modules/multimedia/index.d.ts +8 -0
- package/dist/multimedia.js +20 -0
- package/dist/portal/Header/Badge.d.ts +5 -0
- package/dist/portal/Header/Badge.js +9 -0
- package/dist/portal/Header/Header.d.ts +9 -0
- package/dist/portal/Header/Header.js +170 -0
- package/dist/portal/Header/NavItem.d.ts +6 -0
- package/dist/portal/Header/NavItem.js +14 -0
- package/dist/portal/Header/NavLink.d.ts +24 -0
- package/dist/portal/Header/NavLink.js +19 -0
- package/dist/portal/Header/Navbar.d.ts +6 -0
- package/dist/portal/Header/Navbar.js +13 -0
- package/dist/portal/Header/NavbarNav.d.ts +6 -0
- package/dist/portal/Header/NavbarNav.js +13 -0
- package/dist/portal/Header/WidgetApps.d.ts +9 -0
- package/dist/portal/Header/WidgetApps.js +23 -0
- package/dist/portal/Header/index.d.ts +5 -0
- package/dist/portal/Help/Help.d.ts +9 -0
- package/dist/portal/Help/Help.js +25 -0
- package/dist/portal/Help/hooks/useHelp.d.ts +10 -0
- package/dist/portal/Help/hooks/useHelp.js +85 -0
- package/dist/portal/Help/index.d.ts +1 -0
- package/dist/portal/Layout/Layout.d.ts +12 -0
- package/dist/portal/Layout/Layout.js +42 -0
- package/dist/portal/Layout/index.d.ts +1 -0
- package/dist/portal/Main/Main.d.ts +16 -0
- package/dist/portal/Main/index.d.ts +2 -0
- package/dist/portal/SearchEngine/SearchEngine.d.ts +5 -0
- package/dist/portal/SearchEngine/SearchEngine.js +33 -0
- package/dist/portal/SearchEngine/index.d.ts +1 -0
- package/dist/portal/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/size.d.ts +1 -0
- package/dist/types/status.d.ts +1 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +28 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.js +26 -0
- package/dist/utils/MockedDataProvider/index.d.ts +1 -0
- package/dist/utils/StringUtils.d.ts +5 -0
- package/dist/utils/StringUtils.js +14 -0
- package/dist/utils/addTimestampToUrl.d.ts +6 -0
- package/dist/utils/addTimestampToUrl.js +7 -0
- package/dist/utils/blob.d.ts +9 -0
- package/dist/utils/blob.js +15 -0
- package/dist/utils/checkUserRight.d.ts +11 -0
- package/dist/utils/checkUserRight.js +44 -0
- package/dist/utils/fileSize.d.ts +1 -0
- package/dist/utils/fileSize.js +8 -0
- package/dist/utils/findTreeNode.d.ts +9 -0
- package/dist/utils/findTreeNode.js +11 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/isActionAvailable.d.ts +2 -0
- package/dist/utils/isActionAvailable.js +7 -0
- package/dist/utils/libraryMaps.d.ts +4 -0
- package/dist/utils/libraryMaps.js +12 -0
- package/dist/utils/noop.d.ts +4 -0
- package/dist/utils/noop.js +5 -0
- package/dist/utils/ref.d.ts +5 -0
- package/dist/utils/ref.js +14 -0
- package/dist/utils/thumbnail.d.ts +8 -0
- package/dist/utils/thumbnail.js +6 -0
- package/dist/utils/time.d.ts +2 -0
- package/dist/utils/time.js +11 -0
- package/dist/utils/treeview.d.ts +33 -0
- package/dist/utils/treeview.js +133 -0
- package/dist/utils/video.d.ts +1 -0
- package/dist/utils/video.js +4 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +8 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js +8 -0
- package/dist/widgets/BookmarkedApps/index.d.ts +2 -0
- package/dist/widgets/Widget/Widget.d.ts +17 -0
- package/dist/widgets/Widget/Widget.js +22 -0
- package/dist/widgets/Widget/index.d.ts +2 -0
- package/dist/widgets/index.d.ts +2 -0
- package/package.json +134 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useTranslation } from "react-i18next";
|
|
2
|
+
const useActivitiesOptions = () => {
|
|
3
|
+
const {
|
|
4
|
+
t
|
|
5
|
+
} = useTranslation();
|
|
6
|
+
return [{
|
|
7
|
+
value: "bpr.activityType.classroomActivity",
|
|
8
|
+
label: t("bpr.activityType.classroomActivity")
|
|
9
|
+
}, {
|
|
10
|
+
value: "bpr.activityType.groupActivity",
|
|
11
|
+
label: t("bpr.activityType.groupActivity")
|
|
12
|
+
}, {
|
|
13
|
+
value: "bpr.activityType.personalActivity",
|
|
14
|
+
label: t("bpr.activityType.personalActivity")
|
|
15
|
+
}, {
|
|
16
|
+
value: "bpr.activityType.homework",
|
|
17
|
+
label: t("bpr.activityType.homework")
|
|
18
|
+
}, {
|
|
19
|
+
value: "bpr.activityType.exercize",
|
|
20
|
+
label: t("bpr.activityType.exercize")
|
|
21
|
+
}, {
|
|
22
|
+
value: "bpr.activityType.learningPath",
|
|
23
|
+
label: t("bpr.activityType.learningPath")
|
|
24
|
+
}, {
|
|
25
|
+
value: "bpr.activityType.courseElement",
|
|
26
|
+
label: t("bpr.activityType.courseElement")
|
|
27
|
+
}, {
|
|
28
|
+
value: "bpr.other",
|
|
29
|
+
label: t("bpr.other")
|
|
30
|
+
}];
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
useActivitiesOptions
|
|
34
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useTranslation } from "react-i18next";
|
|
2
|
+
const useLanguageOptions = () => {
|
|
3
|
+
const {
|
|
4
|
+
t
|
|
5
|
+
} = useTranslation();
|
|
6
|
+
return [{
|
|
7
|
+
value: "de_DE",
|
|
8
|
+
label: t("de_DE")
|
|
9
|
+
}, {
|
|
10
|
+
value: "en_EN",
|
|
11
|
+
label: t("en_EN")
|
|
12
|
+
}, {
|
|
13
|
+
value: "ar_DZ",
|
|
14
|
+
label: t("ar_DZ")
|
|
15
|
+
}, {
|
|
16
|
+
value: "es_ES",
|
|
17
|
+
label: t("es_ES")
|
|
18
|
+
}, {
|
|
19
|
+
value: "fr_FR",
|
|
20
|
+
label: t("fr_FR")
|
|
21
|
+
}, {
|
|
22
|
+
value: "it_IT",
|
|
23
|
+
label: t("it_IT")
|
|
24
|
+
}, {
|
|
25
|
+
value: "ja_JP",
|
|
26
|
+
label: t("ja_JP")
|
|
27
|
+
}, {
|
|
28
|
+
value: "zh_CN",
|
|
29
|
+
label: t("zh_CN")
|
|
30
|
+
}, {
|
|
31
|
+
value: "pt_PT",
|
|
32
|
+
label: t("pt_PT")
|
|
33
|
+
}, {
|
|
34
|
+
value: "ru_RU",
|
|
35
|
+
label: t("ru_RU")
|
|
36
|
+
}, {
|
|
37
|
+
value: "bpr.other",
|
|
38
|
+
label: t("bpr.other")
|
|
39
|
+
}];
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
useLanguageOptions
|
|
43
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { IResource } from 'edifice-ts-client';
|
|
2
|
+
import { SubmitHandler } from 'react-hook-form';
|
|
3
|
+
interface ModalProps {
|
|
4
|
+
resource: IResource;
|
|
5
|
+
onSuccess?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface FormDataProps {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
activityType: string;
|
|
11
|
+
subjectArea: string;
|
|
12
|
+
language: string;
|
|
13
|
+
ageMin: string;
|
|
14
|
+
ageMax: string;
|
|
15
|
+
keyWords: string;
|
|
16
|
+
}
|
|
17
|
+
export default function usePublishModal({ onSuccess, resource }: ModalProps): {
|
|
18
|
+
control: import('react-hook-form').Control<FormDataProps, any>;
|
|
19
|
+
cover: string | Blob | File;
|
|
20
|
+
formState: {
|
|
21
|
+
errors: import('react-hook-form').FieldErrors<FormDataProps>;
|
|
22
|
+
isSubmitting: boolean;
|
|
23
|
+
isDirty: boolean;
|
|
24
|
+
isValid: boolean;
|
|
25
|
+
};
|
|
26
|
+
handleDeleteImage: () => void;
|
|
27
|
+
handlePublish: SubmitHandler<FormDataProps>;
|
|
28
|
+
handleSubmit: import('react-hook-form').UseFormHandleSubmit<FormDataProps, undefined>;
|
|
29
|
+
handleUploadImage: (file: File | string) => void;
|
|
30
|
+
register: import('react-hook-form').UseFormRegister<FormDataProps>;
|
|
31
|
+
selectActivities: (value: string | number) => void;
|
|
32
|
+
selectedActivities: (string | number)[];
|
|
33
|
+
selectedSubjectAreas: (string | number)[];
|
|
34
|
+
selectSubjects: (value: string | number) => void;
|
|
35
|
+
setValue: import('react-hook-form').UseFormSetValue<FormDataProps>;
|
|
36
|
+
watch: import('react-hook-form').UseFormWatch<FormDataProps>;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { odeServices } from "edifice-ts-client";
|
|
4
|
+
import { useForm } from "react-hook-form";
|
|
5
|
+
import { libraryMaps } from "../../../../utils/libraryMaps.js";
|
|
6
|
+
import { ToastError } from "../components/ToastError.js";
|
|
7
|
+
import { ToastSuccess } from "../components/ToastSuccess.js";
|
|
8
|
+
import useToast from "../../../../hooks/useToast/useToast.js";
|
|
9
|
+
import { useOdeClient } from "../../../../core/OdeClientProvider/OdeClientProvider.js";
|
|
10
|
+
function usePublishModal({
|
|
11
|
+
onSuccess,
|
|
12
|
+
resource
|
|
13
|
+
}) {
|
|
14
|
+
const {
|
|
15
|
+
user,
|
|
16
|
+
appCode
|
|
17
|
+
} = useOdeClient(), toast = useToast(), [cover, setCover] = useState((resource == null ? void 0 : resource.thumbnail) || "");
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setCover(resource == null ? void 0 : resource.thumbnail);
|
|
20
|
+
}, [resource]);
|
|
21
|
+
const {
|
|
22
|
+
control,
|
|
23
|
+
register,
|
|
24
|
+
watch,
|
|
25
|
+
setValue,
|
|
26
|
+
handleSubmit,
|
|
27
|
+
formState: {
|
|
28
|
+
errors,
|
|
29
|
+
isSubmitting,
|
|
30
|
+
isDirty,
|
|
31
|
+
isValid
|
|
32
|
+
}
|
|
33
|
+
} = useForm({
|
|
34
|
+
mode: "onChange"
|
|
35
|
+
}), [selectedActivities, setSelectedActivities] = useState([]), [selectedSubjectAreas, setSelectedSubjectAreas] = useState([]), selectOption = (value, selectedOptions, setSelectedOptions) => {
|
|
36
|
+
let checked = [...selectedOptions];
|
|
37
|
+
const findIndex = checked.findIndex((item) => item === value);
|
|
38
|
+
selectedOptions.includes(value) ? checked = selectedOptions.filter((_, index) => index !== findIndex) : checked = [...selectedOptions, value], setSelectedOptions(checked);
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
control,
|
|
42
|
+
cover,
|
|
43
|
+
formState: {
|
|
44
|
+
errors,
|
|
45
|
+
isSubmitting,
|
|
46
|
+
isDirty,
|
|
47
|
+
isValid
|
|
48
|
+
},
|
|
49
|
+
handleDeleteImage: () => setCover(""),
|
|
50
|
+
handlePublish: async (formData) => {
|
|
51
|
+
const userId = user ? user == null ? void 0 : user.userId : "";
|
|
52
|
+
try {
|
|
53
|
+
let coverBlob = new Blob();
|
|
54
|
+
typeof cover == "string" ? coverBlob = await odeServices.http().get(cover, {
|
|
55
|
+
responseType: "blob"
|
|
56
|
+
}) : cover ? coverBlob = await odeServices.http().get(URL.createObjectURL(cover), {
|
|
57
|
+
responseType: "blob"
|
|
58
|
+
}) : resource != null && resource.thumbnail && (coverBlob = await odeServices.http().get(resource == null ? void 0 : resource.thumbnail, {
|
|
59
|
+
responseType: "blob"
|
|
60
|
+
}));
|
|
61
|
+
const teacherAvatar = await odeServices.http().get(`/userbook/avatar/${userId}?thumbnail=48x48`, {
|
|
62
|
+
responseType: "blob"
|
|
63
|
+
}), resAttachmentSchool = await odeServices.http().get(`/directory/user/${userId}/attachment-school`, {
|
|
64
|
+
responseType: "json"
|
|
65
|
+
}), application = libraryMaps[appCode], parameters = {
|
|
66
|
+
activityType: selectedActivities,
|
|
67
|
+
age: [formData.ageMin, formData.ageMax],
|
|
68
|
+
application,
|
|
69
|
+
cover: coverBlob,
|
|
70
|
+
description: formData.description,
|
|
71
|
+
keyWords: formData.keyWords,
|
|
72
|
+
language: formData.language,
|
|
73
|
+
licence: "CC-BY",
|
|
74
|
+
resourceId: resource == null ? void 0 : resource.assetId,
|
|
75
|
+
resourceEntId: resource == null ? void 0 : resource.assetId,
|
|
76
|
+
subjectArea: selectedSubjectAreas,
|
|
77
|
+
teacherAvatar,
|
|
78
|
+
title: formData.title,
|
|
79
|
+
userId,
|
|
80
|
+
userStructureName: resAttachmentSchool.name || (user == null ? void 0 : user.structureNames[0])
|
|
81
|
+
}, result = await odeServices.resource(appCode).publish(parameters);
|
|
82
|
+
result.success ? toast.success(/* @__PURE__ */ jsx(ToastSuccess, { result }), {
|
|
83
|
+
duration: 1e4
|
|
84
|
+
}) : result.message === "CONTENT_TOO_LARGE" ? toast.error(/* @__PURE__ */ jsx(ToastError, { errorMessage: result.message })) : toast.error(/* @__PURE__ */ jsx(ToastError, { formData })), onSuccess == null || onSuccess();
|
|
85
|
+
} catch (error) {
|
|
86
|
+
console.error(error), toast.error(/* @__PURE__ */ jsx(ToastError, { formData }));
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
handleSubmit,
|
|
90
|
+
handleUploadImage: (file) => setCover(file),
|
|
91
|
+
register,
|
|
92
|
+
selectActivities: (value) => {
|
|
93
|
+
selectOption(value, selectedActivities, setSelectedActivities);
|
|
94
|
+
},
|
|
95
|
+
selectedActivities,
|
|
96
|
+
selectedSubjectAreas,
|
|
97
|
+
selectSubjects: (value) => {
|
|
98
|
+
selectOption(value, selectedSubjectAreas, setSelectedSubjectAreas);
|
|
99
|
+
},
|
|
100
|
+
setValue,
|
|
101
|
+
watch
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
usePublishModal as default
|
|
106
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useTranslation } from "react-i18next";
|
|
2
|
+
const useSubjectsOptions = () => {
|
|
3
|
+
const {
|
|
4
|
+
t
|
|
5
|
+
} = useTranslation();
|
|
6
|
+
return [{
|
|
7
|
+
value: "bpr.subjectArea.artActivity",
|
|
8
|
+
label: t("bpr.subjectArea.artActivity")
|
|
9
|
+
}, {
|
|
10
|
+
value: "bpr.subjectArea.readLearning",
|
|
11
|
+
label: t("bpr.subjectArea.readLearning")
|
|
12
|
+
}, {
|
|
13
|
+
value: "bpr.subjectArea.chemistry",
|
|
14
|
+
label: t("bpr.subjectArea.chemistry")
|
|
15
|
+
}, {
|
|
16
|
+
value: "bpr.subjectArea.law",
|
|
17
|
+
label: t("bpr.subjectArea.law")
|
|
18
|
+
}, {
|
|
19
|
+
value: "bpr.subjectArea.worldDiscovery",
|
|
20
|
+
label: t("bpr.subjectArea.worldDiscovery")
|
|
21
|
+
}, {
|
|
22
|
+
value: "bpr.subjectArea.economy",
|
|
23
|
+
label: t("bpr.subjectArea.economy")
|
|
24
|
+
}, {
|
|
25
|
+
value: "bpr.subjectArea.mediaEducation",
|
|
26
|
+
label: t("bpr.subjectArea.mediaEducation")
|
|
27
|
+
}, {
|
|
28
|
+
value: "bpr.subjectArea.musicEducation",
|
|
29
|
+
label: t("bpr.subjectArea.musicEducation")
|
|
30
|
+
}, {
|
|
31
|
+
value: "bpr.subjectArea.sportEducation",
|
|
32
|
+
label: t("bpr.subjectArea.sportEducation")
|
|
33
|
+
}, {
|
|
34
|
+
value: "bpr.subjectArea.citizenshipEducation",
|
|
35
|
+
label: t("bpr.subjectArea.citizenshipEducation")
|
|
36
|
+
}, {
|
|
37
|
+
value: "bpr.subjectArea.geography",
|
|
38
|
+
label: t("bpr.subjectArea.geography")
|
|
39
|
+
}, {
|
|
40
|
+
value: "bpr.subjectArea.history",
|
|
41
|
+
label: t("bpr.subjectArea.history")
|
|
42
|
+
}, {
|
|
43
|
+
value: "bpr.subjectArea.artHistory",
|
|
44
|
+
label: t("bpr.subjectArea.artHistory")
|
|
45
|
+
}, {
|
|
46
|
+
value: "bpr.subjectArea.ComputerScience",
|
|
47
|
+
label: t("bpr.subjectArea.ComputerScience")
|
|
48
|
+
}, {
|
|
49
|
+
value: "bpr.subjectArea.languages",
|
|
50
|
+
label: t("bpr.subjectArea.languages")
|
|
51
|
+
}, {
|
|
52
|
+
value: "bpr.subjectArea.italian",
|
|
53
|
+
label: t("bpr.subjectArea.italian")
|
|
54
|
+
}, {
|
|
55
|
+
value: "bpr.subjectArea.spanish",
|
|
56
|
+
label: t("bpr.subjectArea.spanish")
|
|
57
|
+
}, {
|
|
58
|
+
value: "bpr.subjectArea.french",
|
|
59
|
+
label: t("bpr.subjectArea.french")
|
|
60
|
+
}, {
|
|
61
|
+
value: "bpr.subjectArea.german",
|
|
62
|
+
label: t("bpr.subjectArea.german")
|
|
63
|
+
}, {
|
|
64
|
+
value: "bpr.subjectArea.english",
|
|
65
|
+
label: t("bpr.subjectArea.english")
|
|
66
|
+
}, {
|
|
67
|
+
value: "bpr.subjectArea.ancientLanguages",
|
|
68
|
+
label: t("bpr.subjectArea.ancientLanguages")
|
|
69
|
+
}, {
|
|
70
|
+
value: "bpr.subjectArea.literature",
|
|
71
|
+
label: t("bpr.subjectArea.literature")
|
|
72
|
+
}, {
|
|
73
|
+
value: "bpr.subjectArea.mathematics",
|
|
74
|
+
label: t("bpr.subjectArea.mathematics")
|
|
75
|
+
}, {
|
|
76
|
+
value: "bpr.subjectArea.vocationalGuidance",
|
|
77
|
+
label: t("bpr.subjectArea.vocationalGuidance")
|
|
78
|
+
}, {
|
|
79
|
+
value: "bpr.subjectArea.philosohppy",
|
|
80
|
+
label: t("bpr.subjectArea.philosohppy")
|
|
81
|
+
}, {
|
|
82
|
+
value: "bpr.subjectArea.physics",
|
|
83
|
+
label: t("bpr.subjectArea.physics")
|
|
84
|
+
}, {
|
|
85
|
+
value: "bpr.subjectArea.politicalSscience",
|
|
86
|
+
label: t("bpr.subjectArea.politicalSscience")
|
|
87
|
+
}, {
|
|
88
|
+
value: "bpr.subjectArea.sociology",
|
|
89
|
+
label: t("bpr.subjectArea.sociology")
|
|
90
|
+
}, {
|
|
91
|
+
value: "bpr.subjectArea.biology",
|
|
92
|
+
label: t("bpr.subjectArea.biology")
|
|
93
|
+
}, {
|
|
94
|
+
value: "bpr.subjectArea.geology",
|
|
95
|
+
label: t("bpr.subjectArea.geology")
|
|
96
|
+
}, {
|
|
97
|
+
value: "bpr.subjectArea.technology",
|
|
98
|
+
label: t("bpr.subjectArea.technology")
|
|
99
|
+
}, {
|
|
100
|
+
value: "bpr.subjectArea.Arabic",
|
|
101
|
+
label: t("bpr.subjectArea.Arabic")
|
|
102
|
+
}, {
|
|
103
|
+
value: "bpr.subjectArea.Chinese",
|
|
104
|
+
label: t("bpr.subjectArea.Chinese")
|
|
105
|
+
}, {
|
|
106
|
+
value: "bpr.subjectArea.NaturalSciences",
|
|
107
|
+
label: t("bpr.subjectArea.NaturalSciences")
|
|
108
|
+
}, {
|
|
109
|
+
value: "bpr.subjectArea.SocioEmotionalEducation",
|
|
110
|
+
label: t("bpr.subjectArea.SocioEmotionalEducation")
|
|
111
|
+
}, {
|
|
112
|
+
value: "bpr.other",
|
|
113
|
+
label: t("bpr.other")
|
|
114
|
+
}];
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
useSubjectsOptions
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PublishModal } from './PublishModal';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { UseMutationResult } from '../../../../node_modules/@tanstack/react-query';
|
|
3
|
+
import { CreateParameters, CreateResult, ID, IFolder, UpdateParameters, UpdateResult } from 'edifice-ts-client';
|
|
4
|
+
export interface FormInputs {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
enablePublic: boolean;
|
|
8
|
+
formSlug: string;
|
|
9
|
+
}
|
|
10
|
+
interface BaseProps {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
children?: ReactNode | ((...props: any) => ReactNode);
|
|
13
|
+
inputMaxLength?: number;
|
|
14
|
+
textareaMaxLength?: number;
|
|
15
|
+
onSuccess: () => void;
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
}
|
|
18
|
+
interface CreateProps extends BaseProps {
|
|
19
|
+
mode: 'create';
|
|
20
|
+
createResource?: UseMutationResult<CreateResult, Error, CreateParameters, unknown>;
|
|
21
|
+
currentFolder: Partial<IFolder>;
|
|
22
|
+
}
|
|
23
|
+
interface UpdateProps extends BaseProps {
|
|
24
|
+
mode: 'update';
|
|
25
|
+
updateResource?: UseMutationResult<UpdateResult, unknown, UpdateParameters, unknown>;
|
|
26
|
+
resourceId: ID;
|
|
27
|
+
}
|
|
28
|
+
type Props = CreateProps | UpdateProps;
|
|
29
|
+
declare const ResourceModal: ({ isOpen, onCancel, onSuccess, children, inputMaxLength, textareaMaxLength, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export default ResourceModal;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { odeServices } from "edifice-ts-client";
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
|
+
import { useForm } from "react-hook-form";
|
|
6
|
+
import { useTranslation } from "react-i18next";
|
|
7
|
+
import { TextareaCounter } from "../../../components/TextArea/TextareaCounter.js";
|
|
8
|
+
import ImagePickerWorkspace from "../../multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js";
|
|
9
|
+
import { useThumb } from "./hooks/useThumb.js";
|
|
10
|
+
import useToast from "../../../hooks/useToast/useToast.js";
|
|
11
|
+
import useResource from "../../../core/useResource/useResource.js";
|
|
12
|
+
import MediaLibrary from "../../multimedia/MediaLibrary/MediaLibrary.js";
|
|
13
|
+
import { useOdeClient } from "../../../core/OdeClientProvider/OdeClientProvider.js";
|
|
14
|
+
import useMediaLibrary from "../../../core/useMediaLibrary/useMediaLibrary.js";
|
|
15
|
+
import LoadingScreen from "../../../components/LoadingScreen/LoadingScreen.js";
|
|
16
|
+
import Modal from "../../../components/Modal/Modal.js";
|
|
17
|
+
import Heading from "../../../components/Heading/Heading.js";
|
|
18
|
+
import FormControl from "../../../components/Form/FormControl.js";
|
|
19
|
+
import Label from "../../../components/Label/Label.js";
|
|
20
|
+
import Input from "../../../components/Input/Input.js";
|
|
21
|
+
import TextArea from "../../../components/TextArea/TextArea.js";
|
|
22
|
+
import Button from "../../../components/Button/Button.js";
|
|
23
|
+
const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, ResourceModal = ({
|
|
24
|
+
isOpen,
|
|
25
|
+
onCancel,
|
|
26
|
+
onSuccess,
|
|
27
|
+
children,
|
|
28
|
+
inputMaxLength = DEFAULT_INPUT_MAX_LENGTH,
|
|
29
|
+
textareaMaxLength = DEFAULT_TEXTAREA_MAX_LENGTH,
|
|
30
|
+
...props
|
|
31
|
+
}) => {
|
|
32
|
+
const {
|
|
33
|
+
appCode: application,
|
|
34
|
+
currentApp
|
|
35
|
+
} = useOdeClient(), {
|
|
36
|
+
t
|
|
37
|
+
} = useTranslation(), {
|
|
38
|
+
mode
|
|
39
|
+
} = props, toast = useToast(), formId = useId(), isCreating = mode === "create", isUpdating = mode === "update", resource = useResource(application, isUpdating ? props.resourceId : ""), {
|
|
40
|
+
watch,
|
|
41
|
+
register,
|
|
42
|
+
handleSubmit,
|
|
43
|
+
setValue,
|
|
44
|
+
formState: {
|
|
45
|
+
isSubmitting,
|
|
46
|
+
isValid
|
|
47
|
+
}
|
|
48
|
+
} = useForm({
|
|
49
|
+
mode: "onChange",
|
|
50
|
+
defaultValues: {
|
|
51
|
+
description: isUpdating ? resource == null ? void 0 : resource.description : "",
|
|
52
|
+
enablePublic: isUpdating ? resource == null ? void 0 : resource.public : !1,
|
|
53
|
+
title: isUpdating ? resource == null ? void 0 : resource.name : "",
|
|
54
|
+
formSlug: isUpdating ? resource == null ? void 0 : resource.slug : ""
|
|
55
|
+
}
|
|
56
|
+
}), {
|
|
57
|
+
ref: mediaLibraryRef,
|
|
58
|
+
libraryMedia,
|
|
59
|
+
...mediaLibraryHandlers
|
|
60
|
+
} = useMediaLibrary(), {
|
|
61
|
+
appCode
|
|
62
|
+
} = useOdeClient(), {
|
|
63
|
+
thumbnail,
|
|
64
|
+
handleDeleteImage,
|
|
65
|
+
handleUploadImage
|
|
66
|
+
} = useThumb({
|
|
67
|
+
isUpdating,
|
|
68
|
+
selectedResource: isUpdating ? resource : void 0
|
|
69
|
+
}), watchedDescription = watch("description"), onSubmit = async function(formData) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
try {
|
|
72
|
+
const data = {
|
|
73
|
+
description: formData.description || "",
|
|
74
|
+
name: formData.title,
|
|
75
|
+
public: formData.enablePublic,
|
|
76
|
+
slug: formData.enablePublic && formData.formSlug || "",
|
|
77
|
+
thumbnail
|
|
78
|
+
};
|
|
79
|
+
if (isCreating) {
|
|
80
|
+
const createParams = {
|
|
81
|
+
...data,
|
|
82
|
+
folder: ((_a = props.currentFolder) == null ? void 0 : _a.id) === "default" ? void 0 : parseInt(((_b = props.currentFolder) == null ? void 0 : _b.id) || ""),
|
|
83
|
+
application
|
|
84
|
+
};
|
|
85
|
+
props.createResource ? await props.createResource.mutateAsync(createParams) : await odeServices.resource(application).create(createParams);
|
|
86
|
+
} else {
|
|
87
|
+
const updateParams = {
|
|
88
|
+
...data,
|
|
89
|
+
entId: resource.assetId,
|
|
90
|
+
trashed: resource.trashed
|
|
91
|
+
};
|
|
92
|
+
props.updateResource ? await props.updateResource.mutateAsync(updateParams) : await odeServices.resource(application).update(updateParams);
|
|
93
|
+
}
|
|
94
|
+
toast.success(/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
95
|
+
/* @__PURE__ */ jsx("strong", { children: t(isCreating ? "explorer.resource.created" : "explorer.resource.updated") }),
|
|
96
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
97
|
+
t("title"),
|
|
98
|
+
" : ",
|
|
99
|
+
formData.title
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
102
|
+
t("description"),
|
|
103
|
+
" : ",
|
|
104
|
+
formData.description
|
|
105
|
+
] }),
|
|
106
|
+
application === "blog" && /* @__PURE__ */ jsxs("p", { children: [
|
|
107
|
+
"Public:",
|
|
108
|
+
formData.enablePublic ? t("explorer.enable.public.yes") : t("explorer.enable.public.no")
|
|
109
|
+
] })
|
|
110
|
+
] })), onSuccess();
|
|
111
|
+
} catch (e) {
|
|
112
|
+
console.error(e);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
return isUpdating && !resource ? /* @__PURE__ */ jsx(LoadingScreen, {}) : /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: `${mode}-resource`, size: "lg", isOpen, onModalClose: onCancel, children: [
|
|
116
|
+
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t(`explorer.resource.editModal.header.${isCreating ? "create" : "edit"}`) }),
|
|
117
|
+
/* @__PURE__ */ jsxs(Modal.Body, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(Heading, { headingStyle: "h4", level: "h3", className: "mb-16", children: t("explorer.resource.editModal.heading.general") }),
|
|
119
|
+
/* @__PURE__ */ jsxs("form", { id: formId, onSubmit: handleSubmit(onSubmit), children: [
|
|
120
|
+
/* @__PURE__ */ jsxs("div", { className: "d-block d-md-flex gap-16 mb-24", children: [
|
|
121
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ImagePickerWorkspace, { app: currentApp, src: isUpdating && (resource == null ? void 0 : resource.thumbnail) || "", addButtonLabel: t("explorer.imagepicker.button.add"), deleteButtonLabel: t("explorer.imagepicker.button.delete"), onUploadImage: handleUploadImage, onDeleteImage: handleDeleteImage, className: "align-self-center mt-8", libraryMedia, mediaLibraryRef }) }),
|
|
122
|
+
/* @__PURE__ */ jsxs("div", { className: "col", children: [
|
|
123
|
+
/* @__PURE__ */ jsxs(FormControl, { id: "title", className: "mb-16", isRequired: !0, children: [
|
|
124
|
+
/* @__PURE__ */ jsx(Label, { children: t("title") }),
|
|
125
|
+
/* @__PURE__ */ jsx(Input, { type: "text", defaultValue: isUpdating ? resource == null ? void 0 : resource.name : "", ...register("title", {
|
|
126
|
+
required: !0,
|
|
127
|
+
maxLength: inputMaxLength,
|
|
128
|
+
pattern: {
|
|
129
|
+
value: /[^ ]/,
|
|
130
|
+
message: "invalid title"
|
|
131
|
+
}
|
|
132
|
+
}), placeholder: t("explorer.resource.editModal.title.placeholder"), size: "md", "aria-required": !0, maxLength: inputMaxLength })
|
|
133
|
+
] }),
|
|
134
|
+
/* @__PURE__ */ jsxs(FormControl, { id: "description", isOptional: !0, children: [
|
|
135
|
+
/* @__PURE__ */ jsx(Label, { children: t("description") }),
|
|
136
|
+
/* @__PURE__ */ jsx(TextArea, { defaultValue: (resource == null ? void 0 : resource.description) || "", ...register("description", {
|
|
137
|
+
required: !1,
|
|
138
|
+
maxLength: textareaMaxLength
|
|
139
|
+
}), placeholder: t("explorer.resource.editModal.description.placeholder"), size: "md", maxLength: textareaMaxLength }),
|
|
140
|
+
watchedDescription && /* @__PURE__ */ jsx(TextareaCounter, { content: watchedDescription, maxLength: textareaMaxLength })
|
|
141
|
+
] })
|
|
142
|
+
] })
|
|
143
|
+
] }),
|
|
144
|
+
typeof children == "function" ? children(resource, isUpdating, watch, setValue, register) : children
|
|
145
|
+
] })
|
|
146
|
+
] }),
|
|
147
|
+
/* @__PURE__ */ jsxs(Modal.Footer, { children: [
|
|
148
|
+
/* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("explorer.cancel") }),
|
|
149
|
+
/* @__PURE__ */ jsx(Button, { form: formId, type: "submit", color: "primary", isLoading: isSubmitting, variant: "filled", disabled: !isValid || isSubmitting, children: t(isCreating ? "explorer.create" : "save") })
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ jsx(MediaLibrary, { appCode, ref: mediaLibraryRef, multiple: !1, visibility: "protected", ...mediaLibraryHandlers })
|
|
152
|
+
] }), document.getElementById("portal"));
|
|
153
|
+
}, ResourceModal$1 = ResourceModal;
|
|
154
|
+
export {
|
|
155
|
+
ResourceModal$1 as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IResource } from 'edifice-ts-client';
|
|
2
|
+
import { UseFormRegister, UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { FormInputs } from '../ResourceModal';
|
|
4
|
+
interface BlogPublicProps {
|
|
5
|
+
appCode: string;
|
|
6
|
+
isUpdating: boolean;
|
|
7
|
+
resource: IResource;
|
|
8
|
+
watch: UseFormWatch<FormInputs>;
|
|
9
|
+
register: UseFormRegister<FormInputs>;
|
|
10
|
+
setValue: UseFormSetValue<FormInputs>;
|
|
11
|
+
}
|
|
12
|
+
declare const BlogPublic: ({ appCode, isUpdating, resource, watch, register, setValue, }: BlogPublicProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default BlogPublic;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation } from "react-i18next";
|
|
3
|
+
import { useSlug } from "../hooks/useSlug.js";
|
|
4
|
+
import Alert from "../../../../components/Alert/Alert.js";
|
|
5
|
+
import Heading from "../../../../components/Heading/Heading.js";
|
|
6
|
+
import FormControl from "../../../../components/Form/FormControl.js";
|
|
7
|
+
import Input from "../../../../components/Input/Input.js";
|
|
8
|
+
import Button from "../../../../components/Button/Button.js";
|
|
9
|
+
import { Icon } from "../../../../components/Icon/Icon.js";
|
|
10
|
+
const BlogPublic = ({
|
|
11
|
+
appCode,
|
|
12
|
+
isUpdating,
|
|
13
|
+
resource,
|
|
14
|
+
watch,
|
|
15
|
+
register,
|
|
16
|
+
setValue
|
|
17
|
+
}) => {
|
|
18
|
+
const {
|
|
19
|
+
t
|
|
20
|
+
} = useTranslation(), {
|
|
21
|
+
slug,
|
|
22
|
+
isPublic,
|
|
23
|
+
resourceName,
|
|
24
|
+
onPublicChange,
|
|
25
|
+
onCopyToClipBoard
|
|
26
|
+
} = useSlug({
|
|
27
|
+
watch,
|
|
28
|
+
setValue,
|
|
29
|
+
selectedResource: isUpdating ? resource : void 0
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ jsxs(Heading, { headingStyle: "h4", level: "h3", className: "mb-16", children: [
|
|
33
|
+
t("explorer.resource.editModal.heading.access"),
|
|
34
|
+
appCode
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsx(Alert, { type: "info", children: t("explorer.resource.editModal.access.alert") }),
|
|
37
|
+
/* @__PURE__ */ jsxs(FormControl, { id: "flexSwitchCheckDefault", className: "form-switch d-flex gap-8 mt-16 mb-8", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(FormControl.Input, { type: "checkbox", role: "switch", defaultChecked: isUpdating ? resource.public : !1, ...register("enablePublic", {
|
|
39
|
+
disabled: !resourceName,
|
|
40
|
+
onChange: (event) => {
|
|
41
|
+
const checked = event.target.checked;
|
|
42
|
+
onPublicChange(checked);
|
|
43
|
+
}
|
|
44
|
+
}), className: "form-check-input mt-0", size: "md" }),
|
|
45
|
+
/* @__PURE__ */ jsx(FormControl.Label, { className: "form-check-label mb-0", children: t("explorer.resource.editModal.access.flexSwitchCheckDefault.label") })
|
|
46
|
+
] }),
|
|
47
|
+
isPublic && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48
|
+
/* @__PURE__ */ jsx(FormControl, { id: "formSlug", children: /* @__PURE__ */ jsx(Input, { type: "text", hidden: !0, defaultValue: isUpdating ? slug : "", ...register("formSlug"), size: "sm" }) }, slug),
|
|
49
|
+
/* @__PURE__ */ jsxs("div", { className: "d-flex flex-wrap align-items-center gap-4", children: [
|
|
50
|
+
/* @__PURE__ */ jsxs("p", { className: "text-break", children: [
|
|
51
|
+
window.location.origin,
|
|
52
|
+
"/blog/pub/",
|
|
53
|
+
slug
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx(Button, { color: "primary", disabled: !isPublic, onClick: () => onCopyToClipBoard("/blog"), type: "button", leftIcon: /* @__PURE__ */ jsx(Icon, { name: "copy" }), variant: "ghost", className: "text-nowrap", children: t("explorer.resource.editModal.access.url.button") })
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] });
|
|
59
|
+
}, BlogPublic$1 = BlogPublic;
|
|
60
|
+
export {
|
|
61
|
+
BlogPublic$1 as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IResource } from 'edifice-ts-client';
|
|
2
|
+
import { UseFormSetValue, UseFormWatch } from 'react-hook-form';
|
|
3
|
+
import { FormInputs } from '../ResourceModal';
|
|
4
|
+
interface UseSlugProps {
|
|
5
|
+
watch: UseFormWatch<FormInputs>;
|
|
6
|
+
setValue: UseFormSetValue<FormInputs>;
|
|
7
|
+
selectedResource?: IResource;
|
|
8
|
+
}
|
|
9
|
+
export declare const useSlug: ({ watch, setValue, selectedResource, }: UseSlugProps) => {
|
|
10
|
+
slug: string;
|
|
11
|
+
uniqueId: string;
|
|
12
|
+
isPublic: boolean;
|
|
13
|
+
resourceName: string;
|
|
14
|
+
onPublicChange: (value: boolean) => void;
|
|
15
|
+
onCopyToClipBoard: (pathname: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|