@edifice.io/react 2.0.0-develop-rc.7 → 2.0.0-develop-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audience.js +15 -14
- package/dist/audience.js.map +1 -0
- package/dist/components/ActionBar/ActionBar.js +8 -7
- package/dist/components/ActionBar/ActionBar.js.map +1 -0
- package/dist/components/Alert/Alert.js +60 -59
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/AppHeader/AppHeader.js +19 -18
- package/dist/components/AppHeader/AppHeader.js.map +1 -0
- package/dist/components/AppIcon/AppIcon.d.ts +1 -1
- package/dist/components/AppIcon/AppIcon.js +45 -44
- package/dist/components/AppIcon/AppIcon.js.map +1 -0
- package/dist/components/Attachment/Attachment.js +14 -13
- package/dist/components/Attachment/Attachment.js.map +1 -0
- package/dist/components/Avatar/Avatar.js +28 -27
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Badge/Badge.js +21 -20
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +24 -23
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +12 -11
- package/dist/components/Breadcrumb/BreadcrumbItem.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +11 -10
- package/dist/components/Breadcrumb/BreadcrumbList.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbNav.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbNav.js +16 -15
- package/dist/components/Breadcrumb/BreadcrumbNav.js.map +1 -0
- package/dist/components/Button/Button.js +33 -32
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/IconButton.js +16 -15
- package/dist/components/Button/IconButton.js.map +1 -0
- package/dist/components/Button/SearchButton.js +16 -15
- package/dist/components/Button/SearchButton.js.map +1 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +48 -47
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/CardBody.js +14 -13
- package/dist/components/Card/CardBody.js.map +1 -0
- package/dist/components/Card/CardContext.d.ts +1 -1
- package/dist/components/Card/CardContext.js +8 -7
- package/dist/components/Card/CardContext.js.map +1 -0
- package/dist/components/Card/CardFooter.js +6 -5
- package/dist/components/Card/CardFooter.js.map +1 -0
- package/dist/components/Card/CardHeader.js +15 -14
- package/dist/components/Card/CardHeader.js.map +1 -0
- package/dist/components/Card/CardImage.js +14 -13
- package/dist/components/Card/CardImage.js.map +1 -0
- package/dist/components/Card/CardText.js +9 -8
- package/dist/components/Card/CardText.js.map +1 -0
- package/dist/components/Card/CardTitle.js +9 -8
- package/dist/components/Card/CardTitle.js.map +1 -0
- package/dist/components/Card/CardUser.js +9 -8
- package/dist/components/Card/CardUser.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +31 -30
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/ColorPicker/ColorPalette.js +5 -4
- package/dist/components/ColorPicker/ColorPalette.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.js +29 -28
- package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/ColorPicker/ColorPickerItem.js +12 -11
- package/dist/components/ColorPicker/ColorPickerItem.js.map +1 -0
- package/dist/components/Combobox/Combobox.js +36 -35
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Combobox/ComboboxTrigger.js +22 -21
- package/dist/components/Combobox/ComboboxTrigger.js.map +1 -0
- package/dist/components/Dropdown/Dropdown.js +56 -55
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/DropdownCheckboxItem.js +27 -26
- package/dist/components/Dropdown/DropdownCheckboxItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownContext.js +8 -7
- package/dist/components/Dropdown/DropdownContext.js.map +1 -0
- package/dist/components/Dropdown/DropdownItem.js +28 -27
- package/dist/components/Dropdown/DropdownItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownMenu.js +22 -21
- package/dist/components/Dropdown/DropdownMenu.js.map +1 -0
- package/dist/components/Dropdown/DropdownMenuGroup.js +10 -9
- package/dist/components/Dropdown/DropdownMenuGroup.js.map +1 -0
- package/dist/components/Dropdown/DropdownRadioItem.js +27 -26
- package/dist/components/Dropdown/DropdownRadioItem.js.map +1 -0
- package/dist/components/Dropdown/DropdownSeparator.js +4 -3
- package/dist/components/Dropdown/DropdownSeparator.js.map +1 -0
- package/dist/components/Dropdown/DropdownTrigger.js +29 -28
- package/dist/components/Dropdown/DropdownTrigger.js.map +1 -0
- package/dist/components/Dropzone/Dropzone.js +48 -47
- package/dist/components/Dropzone/Dropzone.js.map +1 -0
- package/dist/components/Dropzone/DropzoneContext.js +9 -8
- package/dist/components/Dropzone/DropzoneContext.js.map +1 -0
- package/dist/components/Dropzone/DropzoneDrag.js +8 -7
- package/dist/components/Dropzone/DropzoneDrag.js.map +1 -0
- package/dist/components/Dropzone/DropzoneFile.js +26 -25
- package/dist/components/Dropzone/DropzoneFile.js.map +1 -0
- package/dist/components/Dropzone/DropzoneImport.js +21 -20
- package/dist/components/Dropzone/DropzoneImport.js.map +1 -0
- package/dist/components/EmptyScreen/EmptyScreen.js +17 -16
- package/dist/components/EmptyScreen/EmptyScreen.js.map +1 -0
- package/dist/components/FileCard/FileCard.d.ts +1 -1
- package/dist/components/FileCard/FileCard.js +38 -37
- package/dist/components/FileCard/FileCard.js.map +1 -0
- package/dist/components/FileCard/FileIcon.d.ts +1 -1
- package/dist/components/FileCard/FileIcon.js +12 -11
- package/dist/components/FileCard/FileIcon.js.map +1 -0
- package/dist/components/Form/FormContext.js +8 -7
- package/dist/components/Form/FormContext.js.map +1 -0
- package/dist/components/Form/FormControl.js +31 -30
- package/dist/components/Form/FormControl.js.map +1 -0
- package/dist/components/Form/FormText.js +13 -12
- package/dist/components/Form/FormText.js.map +1 -0
- package/dist/components/Grid/Grid.js +28 -27
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Heading/Heading.js +15 -14
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Icon/Icon.js +9 -8
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Image/Image.js +40 -39
- package/dist/components/Image/Image.js.map +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +1 -1
- package/dist/components/ImagePicker/ImagePicker.js +52 -51
- package/dist/components/ImagePicker/ImagePicker.js.map +1 -0
- package/dist/components/Input/Input.js +29 -28
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Label/Label.js +31 -30
- package/dist/components/Label/Label.js.map +1 -0
- package/dist/components/Loading/Loading.js +24 -23
- package/dist/components/Loading/Loading.js.map +1 -0
- package/dist/components/LoadingScreen/LoadingScreen.js +21 -20
- package/dist/components/LoadingScreen/LoadingScreen.js.map +1 -0
- package/dist/components/Logo/Logo.js +13 -12
- package/dist/components/Logo/Logo.js.map +1 -0
- package/dist/components/Menu/Menu.js +40 -39
- package/dist/components/Menu/Menu.js.map +1 -0
- package/dist/components/Menu/MenuButton.js +18 -17
- package/dist/components/Menu/MenuButton.js.map +1 -0
- package/dist/components/Menu/MenuContext.js +9 -8
- package/dist/components/Menu/MenuContext.js.map +1 -0
- package/dist/components/Menu/MenuItem.js +15 -14
- package/dist/components/Menu/MenuItem.js.map +1 -0
- package/dist/components/Modal/Modal.js +50 -49
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/ModalBody.js +12 -11
- package/dist/components/Modal/ModalBody.js.map +1 -0
- package/dist/components/Modal/ModalContext.js +9 -8
- package/dist/components/Modal/ModalContext.js.map +1 -0
- package/dist/components/Modal/ModalFooter.js +4 -3
- package/dist/components/Modal/ModalFooter.js.map +1 -0
- package/dist/components/Modal/ModalHeader.js +23 -22
- package/dist/components/Modal/ModalHeader.js.map +1 -0
- package/dist/components/Modal/ModalSubtitle.js +4 -3
- package/dist/components/Modal/ModalSubtitle.js.map +1 -0
- package/dist/components/Popover/Popover.js +34 -33
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Radio/Radio.js +27 -26
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/SearchBar/SearchBar.js +30 -29
- package/dist/components/SearchBar/SearchBar.js.map +1 -0
- package/dist/components/Select/Select.js +32 -31
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/SelectTrigger.js +5 -4
- package/dist/components/Select/SelectTrigger.js.map +1 -0
- package/dist/components/Table/TableExplorer.js +8 -7
- package/dist/components/Table/TableExplorer.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +59 -58
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/TabsContext.js +9 -8
- package/dist/components/Tabs/TabsContext.js.map +1 -0
- package/dist/components/Tabs/TabsItem.js +21 -20
- package/dist/components/Tabs/TabsItem.js.map +1 -0
- package/dist/components/Tabs/TabsList.js +19 -18
- package/dist/components/Tabs/TabsList.js.map +1 -0
- package/dist/components/Tabs/TabsPanel.js +10 -9
- package/dist/components/Tabs/TabsPanel.js.map +1 -0
- package/dist/components/TextArea/TextArea.js +32 -31
- package/dist/components/TextArea/TextArea.js.map +1 -0
- package/dist/components/TextArea/TextareaCounter.js +7 -6
- package/dist/components/TextArea/TextareaCounter.js.map +1 -0
- package/dist/components/Toolbar/Toolbar.js +61 -60
- package/dist/components/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +29 -28
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/TreeView/TreeItem.js +47 -46
- package/dist/components/TreeView/TreeItem.js.map +1 -0
- package/dist/components/TreeView/TreeView.js +34 -33
- package/dist/components/TreeView/TreeView.js.map +1 -0
- package/dist/components/TreeView/hooks/useTreeItemEvents.js +19 -18
- package/dist/components/TreeView/hooks/useTreeItemEvents.js.map +1 -0
- package/dist/components/UploadCard/UploadCard.js +53 -52
- package/dist/components/UploadCard/UploadCard.js.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +8 -7
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/core/OdeClientProvider/OdeClientProvider.d.ts +1 -1
- package/dist/core/OdeClientProvider/OdeClientProvider.js +45 -44
- package/dist/core/OdeClientProvider/OdeClientProvider.js.map +1 -0
- package/dist/core/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/core/ThemeProvider/ThemeProvider.js +36 -35
- package/dist/core/ThemeProvider/ThemeProvider.js.map +1 -0
- package/dist/core/useAvatar/useAvatar.d.ts +1 -1
- package/dist/core/useAvatar/useAvatar.js +22 -21
- package/dist/core/useAvatar/useAvatar.js.map +1 -0
- package/dist/core/useBookmark/useBookmark.d.ts +1 -1
- package/dist/core/useBookmark/useBookmark.js +10 -9
- package/dist/core/useBookmark/useBookmark.js.map +1 -0
- package/dist/core/useConf/useConf.d.ts +1 -1
- package/dist/core/useConf/useConf.js +8 -7
- package/dist/core/useConf/useConf.js.map +1 -0
- package/dist/core/useConversation/useConversation.js +29 -28
- package/dist/core/useConversation/useConversation.js.map +1 -0
- package/dist/core/useCookiesConsent/useCookiesConsent.js +17 -16
- package/dist/core/useCookiesConsent/useCookiesConsent.js.map +1 -0
- package/dist/core/useDate/useDate.js +36 -35
- package/dist/core/useDate/useDate.js.map +1 -0
- package/dist/core/useHasWorkflow/useHasWorkflow.js +15 -14
- package/dist/core/useHasWorkflow/useHasWorkflow.js.map +1 -0
- package/dist/core/useHeader/useHeader.d.ts +1 -1
- package/dist/core/useHeader/useHeader.js +42 -41
- package/dist/core/useHeader/useHeader.js.map +1 -0
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js +18 -17
- package/dist/core/useHttpErrorToast/useHttpErrorToast.js.map +1 -0
- package/dist/core/useIsAdml/useIsAdml.js +12 -11
- package/dist/core/useIsAdml/useIsAdml.js.map +1 -0
- package/dist/core/useLibraryUrl/useLibraryUrl.js +16 -15
- package/dist/core/useLibraryUrl/useLibraryUrl.js.map +1 -0
- package/dist/core/useMediaLibrary/useMediaLibrary.d.ts +1 -1
- package/dist/core/useMediaLibrary/useMediaLibrary.js +32 -31
- package/dist/core/useMediaLibrary/useMediaLibrary.js.map +1 -0
- package/dist/core/useOdeIcons/useOdeIcons.d.ts +1 -1
- package/dist/core/useOdeIcons/useOdeIcons.js +38 -37
- package/dist/core/useOdeIcons/useOdeIcons.js.map +1 -0
- package/dist/core/usePaths/usePaths.js +3 -2
- package/dist/core/usePaths/usePaths.js.map +1 -0
- package/dist/core/usePreferences/usePreferences.js +6 -5
- package/dist/core/usePreferences/usePreferences.js.map +1 -0
- package/dist/core/useResource/useResource.d.ts +1 -0
- package/dist/core/useResource/useResource.js +15 -14
- package/dist/core/useResource/useResource.js.map +1 -0
- package/dist/core/useResourceSearch/useResourceSearch.d.ts +1 -1
- package/dist/core/useResourceSearch/useResourceSearch.js +23 -22
- package/dist/core/useResourceSearch/useResourceSearch.js.map +1 -0
- package/dist/core/useSession/useSession.js +7 -6
- package/dist/core/useSession/useSession.js.map +1 -0
- package/dist/core/useTrashedResource/useTrashedResource.js +18 -17
- package/dist/core/useTrashedResource/useTrashedResource.js.map +1 -0
- package/dist/core/useUpload/useUpload.d.ts +5 -4
- package/dist/core/useUpload/useUpload.js +69 -68
- package/dist/core/useUpload/useUpload.js.map +1 -0
- package/dist/core/useUploadFiles/useUploadFiles.d.ts +6 -6
- package/dist/core/useUploadFiles/useUploadFiles.js +82 -81
- package/dist/core/useUploadFiles/useUploadFiles.js.map +1 -0
- package/dist/core/useUser/useUser.d.ts +1 -1
- package/dist/core/useUser/useUser.js +16 -15
- package/dist/core/useUser/useUser.js.map +1 -0
- package/dist/core/useWorkspaceFile/useWorkspaceFile.d.ts +5 -5
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js +31 -30
- package/dist/core/useWorkspaceFile/useWorkspaceFile.js.map +1 -0
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.d.ts +2 -2
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js +42 -41
- package/dist/core/useWorkspaceSearch/useWorkspaceSearch.js.map +1 -0
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js +18 -17
- package/dist/core/useXitiTrackPageLoad/useXitiTrackPageLoad.js.map +1 -0
- package/dist/core/useZendeskGuide/useZendeskGuide.js +47 -46
- package/dist/core/useZendeskGuide/useZendeskGuide.js.map +1 -0
- package/dist/editor.js +57 -56
- package/dist/editor.js.map +1 -0
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js +12 -11
- package/dist/hooks/useBrowserInfo/useBrowserInfo.js.map +1 -0
- package/dist/hooks/useClickOutside/useClickOutside.js +19 -18
- package/dist/hooks/useClickOutside/useClickOutside.js.map +1 -0
- package/dist/hooks/useDebounce/useDebounce.js +11 -10
- package/dist/hooks/useDebounce/useDebounce.js.map +1 -0
- package/dist/hooks/useDropdown/useDropdown.js +96 -95
- package/dist/hooks/useDropdown/useDropdown.js.map +1 -0
- package/dist/hooks/useDropzone/useDropzone.js +53 -52
- package/dist/hooks/useDropzone/useDropzone.js.map +1 -0
- package/dist/hooks/useHover/useHover.js +15 -14
- package/dist/hooks/useHover/useHover.js.map +1 -0
- package/dist/hooks/useImage/useImage.js +14 -13
- package/dist/hooks/useImage/useImage.js.map +1 -0
- package/dist/hooks/useImageResizer/useImageResizer.js +32 -31
- package/dist/hooks/useImageResizer/useImageResizer.js.map +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +11 -10
- package/dist/hooks/useKeyPress/useKeyPress.js.map +1 -0
- package/dist/hooks/useScrollToTop/useScrollToTop.js +5 -4
- package/dist/hooks/useScrollToTop/useScrollToTop.js.map +1 -0
- package/dist/hooks/useThumbnail/useThumbnail.js +22 -21
- package/dist/hooks/useThumbnail/useThumbnail.js.map +1 -0
- package/dist/hooks/useTitle/useTitle.js +8 -7
- package/dist/hooks/useTitle/useTitle.js.map +1 -0
- package/dist/hooks/useToast/useToast.js +26 -25
- package/dist/hooks/useToast/useToast.js.map +1 -0
- package/dist/hooks/useToggle/useToggle.js +7 -6
- package/dist/hooks/useToggle/useToggle.js.map +1 -0
- package/dist/hooks/useTrapFocus/useTrapFocus.js +12 -11
- package/dist/hooks/useTrapFocus/useTrapFocus.js.map +1 -0
- package/dist/index.js +226 -225
- package/dist/index.js.map +1 -0
- package/dist/modals.js +15 -14
- package/dist/modals.js.map +1 -0
- package/dist/modules/audience/ReactionChoice.d.ts +1 -1
- package/dist/modules/audience/ReactionChoice.js +24 -23
- package/dist/modules/audience/ReactionChoice.js.map +1 -0
- package/dist/modules/audience/ReactionModal.Card.d.ts +1 -1
- package/dist/modules/audience/ReactionModal.Card.js +26 -25
- package/dist/modules/audience/ReactionModal.Card.js.map +1 -0
- package/dist/modules/audience/ReactionModal.d.ts +1 -1
- package/dist/modules/audience/ReactionModal.js +59 -58
- package/dist/modules/audience/ReactionModal.js.map +1 -0
- package/dist/modules/audience/ReactionSummary.d.ts +1 -1
- package/dist/modules/audience/ReactionSummary.js +19 -18
- package/dist/modules/audience/ReactionSummary.js.map +1 -0
- package/dist/modules/audience/ViewsByProfileCard.d.ts +1 -1
- package/dist/modules/audience/ViewsByProfileCard.js +23 -22
- package/dist/modules/audience/ViewsByProfileCard.js.map +1 -0
- package/dist/modules/audience/ViewsCounter.js +14 -13
- package/dist/modules/audience/ViewsCounter.js.map +1 -0
- package/dist/modules/audience/ViewsModal.d.ts +1 -1
- package/dist/modules/audience/ViewsModal.js +32 -31
- package/dist/modules/audience/ViewsModal.js.map +1 -0
- package/dist/modules/audience/hooks/useReactionIcons.d.ts +1 -1
- package/dist/modules/audience/hooks/useReactionIcons.js +14 -13
- package/dist/modules/audience/hooks/useReactionIcons.js.map +1 -0
- package/dist/modules/audience/hooks/useReactions.d.ts +6 -4
- package/dist/modules/audience/hooks/useReactions.js +25 -24
- package/dist/modules/audience/hooks/useReactions.js.map +1 -0
- package/dist/modules/audience/hooks/useViews.d.ts +3 -3
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js +59 -58
- package/dist/modules/editor/components/BubbleMenuEditImage/BubbleMenuEditImage.js.map +1 -0
- package/dist/modules/editor/components/Editor/Editor.d.ts +1 -1
- package/dist/modules/editor/components/Editor/Editor.js +70 -69
- package/dist/modules/editor/components/Editor/Editor.js.map +1 -0
- package/dist/modules/editor/components/Editor/MathsModal.js +38 -37
- package/dist/modules/editor/components/Editor/MathsModal.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js +15 -14
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.DropdownMenu.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js +38 -37
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Emoji.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js +34 -33
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.HighlightColor.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js +13 -12
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.PlusMenu.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js +37 -36
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextColor.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js +36 -35
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.TextSize.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js +31 -30
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.Typography.js.map +1 -0
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js +96 -95
- package/dist/modules/editor/components/EditorToolbar/EditorToolbar.js.map +1 -0
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js +6 -5
- package/dist/modules/editor/components/NodeView/AttachmentNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/AudioNodeView.js +6 -5
- package/dist/modules/editor/components/NodeView/AudioNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/ImageNodeView.js +6 -5
- package/dist/modules/editor/components/NodeView/ImageNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js +6 -5
- package/dist/modules/editor/components/NodeView/LinkerNodeView.js.map +1 -0
- package/dist/modules/editor/components/NodeView/VideoNodeView.js +6 -5
- package/dist/modules/editor/components/NodeView/VideoNodeView.js.map +1 -0
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js +25 -24
- package/dist/modules/editor/components/Renderer/AttachmentRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/AudioRenderer.js +8 -7
- package/dist/modules/editor/components/Renderer/AudioRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js +27 -26
- package/dist/modules/editor/components/Renderer/LinkerRenderer.js.map +1 -0
- package/dist/modules/editor/components/Renderer/MediaRenderer.js +38 -37
- package/dist/modules/editor/components/Renderer/MediaRenderer.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js +3 -2
- package/dist/modules/editor/components/Toolbar/LinkToolbar.TippyOptions.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js +32 -31
- package/dist/modules/editor/components/Toolbar/LinkToolbar.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +22 -21
- package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js +31 -30
- package/dist/modules/editor/components/Toolbar/TableToolbar.CellColor.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +21 -20
- package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js.map +1 -0
- package/dist/modules/editor/components/Toolbar/TableToolbar.js +40 -39
- package/dist/modules/editor/components/Toolbar/TableToolbar.js.map +1 -0
- package/dist/modules/editor/hooks/useActionOptions.js +48 -47
- package/dist/modules/editor/hooks/useActionOptions.js.map +1 -0
- package/dist/modules/editor/hooks/useCommentEditor.js +28 -27
- package/dist/modules/editor/hooks/useCommentEditor.js.map +1 -0
- package/dist/modules/editor/hooks/useEditorContext.js +9 -8
- package/dist/modules/editor/hooks/useEditorContext.js.map +1 -0
- package/dist/modules/editor/hooks/useImageModal.d.ts +2 -1
- package/dist/modules/editor/hooks/useImageModal.js +33 -32
- package/dist/modules/editor/hooks/useImageModal.js.map +1 -0
- package/dist/modules/editor/hooks/useImageSelection.js +32 -31
- package/dist/modules/editor/hooks/useImageSelection.js.map +1 -0
- package/dist/modules/editor/hooks/useLinkToolbar.js +25 -24
- package/dist/modules/editor/hooks/useLinkToolbar.js.map +1 -0
- package/dist/modules/editor/hooks/useMathsModal.js +10 -9
- package/dist/modules/editor/hooks/useMathsModal.js.map +1 -0
- package/dist/modules/editor/hooks/useMathsStyles.js +14 -13
- package/dist/modules/editor/hooks/useMathsStyles.js.map +1 -0
- package/dist/modules/editor/hooks/useMediaLibraryEditor.d.ts +1 -1
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js +97 -96
- package/dist/modules/editor/hooks/useMediaLibraryEditor.js.map +1 -0
- package/dist/modules/editor/hooks/useResizeMedia.js +32 -31
- package/dist/modules/editor/hooks/useResizeMedia.js.map +1 -0
- package/dist/modules/editor/hooks/useSpeechRecognition.js +13 -12
- package/dist/modules/editor/hooks/useSpeechRecognition.js.map +1 -0
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js +14 -13
- package/dist/modules/editor/hooks/useSpeechSynthetisis.js.map +1 -0
- package/dist/modules/editor/hooks/useTipTapEditor.js +58 -57
- package/dist/modules/editor/hooks/useTipTapEditor.js.map +1 -0
- package/dist/modules/editor/utils/has-extension.js +3 -2
- package/dist/modules/editor/utils/has-extension.js.map +1 -0
- package/dist/modules/editor/utils/has-mark.js +3 -2
- package/dist/modules/editor/utils/has-mark.js.map +1 -0
- package/dist/modules/editor/utils/has-text-style.js +4 -3
- package/dist/modules/editor/utils/has-text-style.js.map +1 -0
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +49 -48
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js.map +1 -0
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +19 -18
- package/dist/modules/modals/OnboardingModal/useOnboardingModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/PublishModal.d.ts +1 -1
- package/dist/modules/modals/PublishModal/PublishModal.js +98 -97
- package/dist/modules/modals/PublishModal/PublishModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js +20 -19
- package/dist/modules/modals/PublishModal/components/ActivitiesDropdown.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/AgeSelect.js +15 -14
- package/dist/modules/modals/PublishModal/components/AgeSelect.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/LangSelect.js +12 -11
- package/dist/modules/modals/PublishModal/components/LangSelect.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js +17 -16
- package/dist/modules/modals/PublishModal/components/PublishModalFooter.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js +20 -19
- package/dist/modules/modals/PublishModal/components/SubjectsDropdown.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ToastError.js +18 -17
- package/dist/modules/modals/PublishModal/components/ToastError.js.map +1 -0
- package/dist/modules/modals/PublishModal/components/ToastSuccess.d.ts +1 -1
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js +13 -12
- package/dist/modules/modals/PublishModal/components/ToastSuccess.js.map +1 -0
- package/dist/modules/modals/PublishModal/constants/ageOptions.js +3 -2
- package/dist/modules/modals/PublishModal/constants/ageOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js +5 -4
- package/dist/modules/modals/PublishModal/hooks/useActivitiesOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js +17 -16
- package/dist/modules/modals/PublishModal/hooks/useLanguageOptions.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.d.ts +1 -1
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js +80 -79
- package/dist/modules/modals/PublishModal/hooks/usePublishModal.js.map +1 -0
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js +42 -41
- package/dist/modules/modals/PublishModal/hooks/useSubjectsOptions.js.map +1 -0
- package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/ResourceModal.js +116 -115
- package/dist/modules/modals/ResourceModal/ResourceModal.js.map +1 -0
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js +48 -47
- package/dist/modules/modals/ResourceModal/apps/BlogPublic.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useSlug.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js +33 -32
- package/dist/modules/modals/ResourceModal/hooks/useSlug.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useThumb.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js +13 -12
- package/dist/modules/modals/ResourceModal/hooks/useThumb.js.map +1 -0
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.d.ts +1 -1
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js +11 -10
- package/dist/modules/modals/ResourceModal/hooks/useUpdateMutation.js.map +1 -0
- package/dist/modules/modals/ShareModal/ShareBookmarkLine.d.ts +2 -2
- package/dist/modules/modals/ShareModal/ShareModal.d.ts +1 -1
- package/dist/modules/modals/ShareModal/apps/ShareBlog.d.ts +1 -1
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js +34 -33
- package/dist/modules/modals/ShareModal/apps/ShareBlog.js.map +1 -0
- package/dist/modules/modals/ShareModal/hooks/useSearch.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShare.d.ts +2 -2
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.d.ts +1 -1
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js +13 -12
- package/dist/modules/modals/ShareModal/hooks/useShareMutation.js.map +1 -0
- package/dist/modules/modals/ShareModal/utils/hasRight.d.ts +1 -0
- package/dist/modules/modals/ShareModal/utils/showShareRightLine.d.ts +1 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +1 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +43 -42
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js.map +1 -0
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +19 -18
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js.map +1 -0
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +1 -1
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +158 -157
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js.map +1 -0
- package/dist/modules/multimedia/Embed/Embed.js +22 -21
- package/dist/modules/multimedia/Embed/Embed.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js +79 -78
- package/dist/modules/multimedia/ImageEditor/components/ImageEditor.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js +38 -37
- package/dist/modules/multimedia/ImageEditor/components/ImageEditorToolbar.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +50 -49
- package/dist/modules/multimedia/ImageEditor/effects/blur.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/crop.js +100 -99
- package/dist/modules/multimedia/ImageEditor/effects/crop.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/misc.js +108 -107
- package/dist/modules/multimedia/ImageEditor/effects/misc.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/resize.js +97 -96
- package/dist/modules/multimedia/ImageEditor/effects/resize.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js +26 -25
- package/dist/modules/multimedia/ImageEditor/effects/rotate.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js +39 -38
- package/dist/modules/multimedia/ImageEditor/hooks/useHistoryTool.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js +57 -56
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEditor.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js +29 -28
- package/dist/modules/multimedia/ImageEditor/hooks/useImageEffects.js.map +1 -0
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js +10 -9
- package/dist/modules/multimedia/ImageEditor/utils/aggregate.js.map +1 -0
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.d.ts +1 -1
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js +34 -33
- package/dist/modules/multimedia/ImagePickerWorkspace/ImagePickerWorkspace.js.map +1 -0
- package/dist/modules/multimedia/Linker/ExternalLinker.js +35 -34
- package/dist/modules/multimedia/Linker/ExternalLinker.js.map +1 -0
- package/dist/modules/multimedia/Linker/InternalLinker.d.ts +1 -1
- package/dist/modules/multimedia/Linker/InternalLinker.js +88 -87
- package/dist/modules/multimedia/Linker/InternalLinker.js.map +1 -0
- package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +1 -1
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +32 -31
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +1 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +119 -118
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.d.ts +4 -4
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js +9 -8
- package/dist/modules/multimedia/MediaLibrary/MediaLibraryContext.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js +16 -15
- package/dist/modules/multimedia/MediaLibrary/innertabs/Audio.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js +13 -12
- package/dist/modules/multimedia/MediaLibrary/innertabs/ExternalLink.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js +10 -9
- package/dist/modules/multimedia/MediaLibrary/innertabs/Iframe.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.d.ts +1 -1
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js +29 -28
- package/dist/modules/multimedia/MediaLibrary/innertabs/InternalLink.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js +23 -22
- package/dist/modules/multimedia/MediaLibrary/innertabs/Upload.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js +18 -17
- package/dist/modules/multimedia/MediaLibrary/innertabs/Video.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js +10 -9
- package/dist/modules/multimedia/MediaLibrary/innertabs/VideoEmbedder.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js +17 -16
- package/dist/modules/multimedia/MediaLibrary/innertabs/Workspace.js.map +1 -0
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js +19 -18
- package/dist/modules/multimedia/MediaLibrary/innertabs/index.js.map +1 -0
- package/dist/modules/multimedia/UploadFiles/UploadFiles.d.ts +2 -2
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js +42 -41
- package/dist/modules/multimedia/UploadFiles/UploadFiles.js.map +1 -0
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js +60 -59
- package/dist/modules/multimedia/VideoEmbed/VideoEmbed.js.map +1 -0
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +1 -1
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +153 -152
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js.map +1 -0
- package/dist/modules/multimedia/Workspace/Workspace.d.ts +1 -1
- package/dist/modules/multimedia/Workspace/Workspace.js +110 -109
- package/dist/modules/multimedia/Workspace/Workspace.js.map +1 -0
- package/dist/multimedia.js +19 -18
- package/dist/multimedia.js.map +1 -0
- package/dist/portal/Header/Badge.js +6 -5
- package/dist/portal/Header/Badge.js.map +1 -0
- package/dist/portal/Header/Header.js +138 -137
- package/dist/portal/Header/Header.js.map +1 -0
- package/dist/portal/Header/NavItem.js +12 -11
- package/dist/portal/Header/NavItem.js.map +1 -0
- package/dist/portal/Header/NavLink.js +15 -14
- package/dist/portal/Header/NavLink.js.map +1 -0
- package/dist/portal/Header/Navbar.js +10 -9
- package/dist/portal/Header/Navbar.js.map +1 -0
- package/dist/portal/Header/NavbarNav.js +10 -9
- package/dist/portal/Header/NavbarNav.js.map +1 -0
- package/dist/portal/Header/WidgetApps.d.ts +1 -1
- package/dist/portal/Header/WidgetApps.js +17 -16
- package/dist/portal/Header/WidgetApps.js.map +1 -0
- package/dist/portal/Help/Help.js +19 -18
- package/dist/portal/Help/Help.js.map +1 -0
- package/dist/portal/Help/hooks/useHelp.js +64 -63
- package/dist/portal/Help/hooks/useHelp.js.map +1 -0
- package/dist/portal/Layout/Layout.js +35 -34
- package/dist/portal/Layout/Layout.js.map +1 -0
- package/dist/portal/SearchEngine/SearchEngine.js +26 -25
- package/dist/portal/SearchEngine/SearchEngine.js.map +1 -0
- package/dist/utils/MockedDataProvider/MockedDataProvider.d.ts +1 -1
- package/dist/utils/MockedDataProvider/MockedDataProvider.js +22 -21
- package/dist/utils/MockedDataProvider/MockedDataProvider.js.map +1 -0
- package/dist/utils/StringUtils.js +9 -8
- package/dist/utils/StringUtils.js.map +1 -0
- package/dist/utils/addTimestampToUrl.js +5 -4
- package/dist/utils/addTimestampToUrl.js.map +1 -0
- package/dist/utils/blob.js +10 -9
- package/dist/utils/blob.js.map +1 -0
- package/dist/utils/checkUserRight.d.ts +1 -1
- package/dist/utils/checkUserRight.js +28 -27
- package/dist/utils/checkUserRight.js.map +1 -0
- package/dist/utils/fileSize.js +6 -5
- package/dist/utils/fileSize.js.map +1 -0
- package/dist/utils/findTreeNode.js +8 -7
- package/dist/utils/findTreeNode.js.map +1 -0
- package/dist/utils/isActionAvailable.d.ts +1 -1
- package/dist/utils/isActionAvailable.js +5 -4
- package/dist/utils/isActionAvailable.js.map +1 -0
- package/dist/utils/libraryMaps.js +3 -2
- package/dist/utils/libraryMaps.js.map +1 -0
- package/dist/utils/noop.js +3 -2
- package/dist/utils/noop.js.map +1 -0
- package/dist/utils/ref.js +9 -8
- package/dist/utils/ref.js.map +1 -0
- package/dist/utils/thumbnail.js +4 -3
- package/dist/utils/thumbnail.js.map +1 -0
- package/dist/utils/time.js +8 -7
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/treeview.d.ts +1 -1
- package/dist/utils/treeview.js +97 -96
- package/dist/utils/treeview.js.map +1 -0
- package/dist/utils/video.js +3 -2
- package/dist/utils/video.js.map +1 -0
- package/dist/widgets/BookmarkedApps/BookmarkedApps.d.ts +1 -1
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js +7 -6
- package/dist/widgets/BookmarkedApps/BookmarkedApps.js.map +1 -0
- package/dist/widgets/Widget/Widget.js +19 -18
- package/dist/widgets/Widget/Widget.js.map +1 -0
- package/package.json +4 -4
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useId, useEffect } from "react";
|
|
3
|
-
import { odeServices } from "edifice
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import { useMediaLibraryContext } from "../MediaLibrary/MediaLibraryContext.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Icon } from "../../../components/Icon/Icon.js";
|
|
9
|
-
import { FormControl } from "../../../components/Form/FormControl.js";
|
|
10
|
-
import { Input } from "../../../components/Input/Input.js";
|
|
11
|
-
import { Image } from "../../../components/Image/Image.js";
|
|
12
|
-
import { EmptyScreen } from "../../../components/EmptyScreen/EmptyScreen.js";
|
|
13
|
-
import { Button } from "../../../components/Button/Button.js";
|
|
14
|
-
const
|
|
15
|
-
onSuccess
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s, useId as I, useEffect as h } from "react";
|
|
3
|
+
import { odeServices as l } from "@edifice.io/ts-client";
|
|
4
|
+
import { useTranslation as T } from "react-i18next";
|
|
5
|
+
import { useMediaLibraryContext as F } from "../MediaLibrary/MediaLibraryContext.js";
|
|
6
|
+
import S from "../../../hooks/useDebounce/useDebounce.js";
|
|
7
|
+
import U from "../../../core/usePaths/usePaths.js";
|
|
8
|
+
import { Icon as c } from "../../../components/Icon/Icon.js";
|
|
9
|
+
import { FormControl as V } from "../../../components/Form/FormControl.js";
|
|
10
|
+
import { Input as k } from "../../../components/Input/Input.js";
|
|
11
|
+
import { Image as j } from "../../../components/Image/Image.js";
|
|
12
|
+
import { EmptyScreen as D } from "../../../components/EmptyScreen/EmptyScreen.js";
|
|
13
|
+
import { Button as p } from "../../../components/Button/Button.js";
|
|
14
|
+
const O = ({
|
|
15
|
+
onSuccess: n
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
|
-
t
|
|
19
|
-
} =
|
|
20
|
-
switchType
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, []),
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
18
|
+
t: i
|
|
19
|
+
} = T(), {
|
|
20
|
+
switchType: u
|
|
21
|
+
} = F(), [g, x] = s(), [b, C] = s(), [d, v] = s(void 0), [a, N] = s(), m = S(g || "", 300), y = I(), [E] = U();
|
|
22
|
+
h(() => {
|
|
23
|
+
w();
|
|
24
|
+
}, []), h(() => {
|
|
25
|
+
if (a && m) {
|
|
26
|
+
const t = l.embedder().getProviderFromUrl(a, m);
|
|
27
|
+
if (t) {
|
|
28
|
+
v(t);
|
|
29
|
+
const e = l.embedder().getEmbedCodeForProvider(t, m);
|
|
30
|
+
C(e), n(e);
|
|
31
31
|
} else
|
|
32
|
-
|
|
32
|
+
v(void 0), n();
|
|
33
33
|
}
|
|
34
|
-
}, [
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
34
|
+
}, [m, a]);
|
|
35
|
+
const w = async () => {
|
|
36
|
+
const t = await Promise.all([l.embedder().getDefault(), l.embedder().getCustom()]).then((e) => e.flat());
|
|
37
|
+
N(t);
|
|
38
38
|
};
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
39
|
+
function P(t) {
|
|
40
|
+
const e = t.currentTarget.value;
|
|
41
|
+
x(e), n(e != null && e.length ? e : void 0);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
|
|
43
|
+
function f() {
|
|
44
|
+
u("embedder");
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
46
|
+
const L = () => m ? d ? /* @__PURE__ */ o("div", { className: "mx-auto mt-16", children: [
|
|
47
|
+
/* @__PURE__ */ o("div", { className: "video-embed-provider d-flex align-items-center", children: [
|
|
48
|
+
/* @__PURE__ */ r(j, { src: d.logo, alt: "Logo " + d.displayName, className: "video-embed-provider-logo" }),
|
|
49
|
+
d.displayName
|
|
50
50
|
] }),
|
|
51
|
-
|
|
52
|
-
__html:
|
|
51
|
+
b && /* @__PURE__ */ r("div", { className: "video-embed-preview mt-12", dangerouslySetInnerHTML: {
|
|
52
|
+
__html: b
|
|
53
53
|
} })
|
|
54
|
-
] }) : /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
54
|
+
] }) : /* @__PURE__ */ o("div", { className: "d-flex flex-column align-items-center m-16", children: [
|
|
55
|
+
/* @__PURE__ */ r(D, { imageSrc: `${E}/emptyscreen/illu-error.svg`, title: i("bbm.video.previewError.title"), text: i("bbm.video.previewError.text") }),
|
|
56
|
+
/* @__PURE__ */ o(p, { variant: "ghost", color: "primary", onClick: f, className: "align-items-start mt-16", children: [
|
|
57
|
+
i("bbm.video.useEmbedCode"),
|
|
58
58
|
" ",
|
|
59
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ r(c, { name: "arrow-right" })
|
|
60
60
|
] })
|
|
61
|
-
] }) : /* @__PURE__ */
|
|
62
|
-
|
|
61
|
+
] }) : /* @__PURE__ */ r("div", { className: "d-flex my-16 align-items-start", children: /* @__PURE__ */ o(p, { variant: "ghost", color: "primary", onClick: f, className: "align-items-start", children: [
|
|
62
|
+
i("bbm.video.useEmbedCode"),
|
|
63
63
|
" ",
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ r(c, { name: "arrow-right" })
|
|
65
65
|
] }) });
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
66
|
+
return /* @__PURE__ */ o("div", { className: "d-flex flex-column flex-fill video-embed", children: [
|
|
67
|
+
/* @__PURE__ */ o("div", { className: "mb-8 d-flex", children: [
|
|
68
|
+
/* @__PURE__ */ r(c, { name: "globe", className: "me-8" }),
|
|
69
|
+
i("bbm.video.url.title")
|
|
70
70
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
71
|
+
/* @__PURE__ */ r(V, { id: y, children: /* @__PURE__ */ r(k, { size: "md", type: "text", placeholder: i("bbm.video.url.placeholder"), onChange: P }) }),
|
|
72
|
+
L()
|
|
73
73
|
] });
|
|
74
74
|
};
|
|
75
75
|
export {
|
|
76
|
-
|
|
76
|
+
O as default
|
|
77
77
|
};
|
|
78
|
+
//# sourceMappingURL=VideoEmbed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoEmbed.js","sources":["../../../../src/modules/multimedia/VideoEmbed/VideoEmbed.tsx"],"sourcesContent":["import { useEffect, useId, useState } from 'react';\n\nimport { Embedder, odeServices } from '@edifice.io/ts-client';\nimport { useTranslation } from 'react-i18next';\n\nimport {\n Button,\n EmptyScreen,\n FormControl,\n Icon,\n Image,\n Input,\n} from '../../../components';\nimport { usePaths } from '../../../core';\nimport { useDebounce } from '../../../hooks';\nimport { useMediaLibraryContext } from '../MediaLibrary/MediaLibraryContext';\n\nexport interface VideoEmbedProps {\n onSuccess: (resource?: string) => void;\n}\n\nconst VideoEmbed = ({ onSuccess }: VideoEmbedProps) => {\n const { t } = useTranslation();\n const { switchType } = useMediaLibraryContext();\n\n const [url, setUrl] = useState<string>();\n const [embedVideo, setEmbedVideo] = useState<string>();\n const [embedder, setEmbedder] = useState<Embedder | undefined>(undefined);\n const [whiteListProvider, setWhiteListProvider] = useState<Embedder[]>();\n const debounceChangeUrl = useDebounce<string>(url || '', 300);\n const formControlId = useId();\n\n const [imagePath] = usePaths();\n\n useEffect(() => {\n initWhiteListProvider();\n }, []);\n\n useEffect(() => {\n if (whiteListProvider && debounceChangeUrl) {\n const embedderFound = odeServices\n .embedder()\n .getProviderFromUrl(whiteListProvider, debounceChangeUrl);\n if (embedderFound) {\n setEmbedder(embedderFound);\n const embedVideo = odeServices\n .embedder()\n .getEmbedCodeForProvider(embedderFound, debounceChangeUrl);\n setEmbedVideo(embedVideo);\n onSuccess(embedVideo);\n } else {\n setEmbedder(undefined);\n onSuccess();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debounceChangeUrl, whiteListProvider]);\n\n const initWhiteListProvider = async () => {\n const whiteListProviderResponse = await Promise.all([\n odeServices.embedder().getDefault(),\n odeServices.embedder().getCustom(),\n ]).then((results) => results.flat());\n setWhiteListProvider(whiteListProviderResponse);\n };\n\n function handleUrlChange(event: React.ChangeEvent<HTMLInputElement>) {\n const url: string = event.currentTarget.value;\n setUrl(url);\n onSuccess(url?.length ? url : undefined);\n }\n\n function handleSwitchToEmbedderClick() {\n switchType('embedder');\n }\n\n const renderContent = () => {\n if (debounceChangeUrl) {\n if (embedder) {\n return (\n <div className=\"mx-auto mt-16\">\n <div className=\"video-embed-provider d-flex align-items-center\">\n <Image\n src={embedder.logo}\n alt={'Logo ' + embedder.displayName}\n className=\"video-embed-provider-logo\"\n ></Image>\n {embedder.displayName}\n </div>\n {embedVideo && (\n <div\n className=\"video-embed-preview mt-12\"\n dangerouslySetInnerHTML={{\n __html: embedVideo,\n }}\n ></div>\n )}\n </div>\n );\n } else {\n return (\n <div className=\"d-flex flex-column align-items-center m-16\">\n <EmptyScreen\n imageSrc={`${imagePath}/emptyscreen/illu-error.svg`}\n title={t('bbm.video.previewError.title')}\n text={t('bbm.video.previewError.text')}\n />\n <Button\n variant=\"ghost\"\n color=\"primary\"\n onClick={handleSwitchToEmbedderClick}\n className=\"align-items-start mt-16\"\n >\n {t('bbm.video.useEmbedCode')} <Icon name=\"arrow-right\" />\n </Button>\n </div>\n );\n }\n } else {\n return (\n <div className=\"d-flex my-16 align-items-start\">\n <Button\n variant=\"ghost\"\n color=\"primary\"\n onClick={handleSwitchToEmbedderClick}\n className=\"align-items-start\"\n >\n {t('bbm.video.useEmbedCode')} <Icon name=\"arrow-right\" />\n </Button>\n </div>\n );\n }\n };\n\n return (\n <div className=\"d-flex flex-column flex-fill video-embed\">\n <div className=\"mb-8 d-flex\">\n <Icon name=\"globe\" className=\"me-8\" />\n {t('bbm.video.url.title')}\n </div>\n <FormControl id={formControlId}>\n <Input\n size=\"md\"\n type=\"text\"\n placeholder={t('bbm.video.url.placeholder')}\n onChange={handleUrlChange}\n />\n </FormControl>\n {renderContent()}\n </div>\n );\n};\n\nexport default VideoEmbed;\n"],"names":["VideoEmbed","onSuccess","t","useTranslation","switchType","useMediaLibraryContext","url","setUrl","useState","embedVideo","setEmbedVideo","embedder","setEmbedder","undefined","whiteListProvider","setWhiteListProvider","debounceChangeUrl","useDebounce","formControlId","useId","imagePath","usePaths","useEffect","initWhiteListProvider","embedderFound","odeServices","getProviderFromUrl","getEmbedCodeForProvider","whiteListProviderResponse","Promise","all","getDefault","getCustom","then","results","flat","handleUrlChange","event","currentTarget","value","length","handleSwitchToEmbedderClick","renderContent","jsxs","jsx","Image","logo","displayName","__html","EmptyScreen","Button","Icon","FormControl","Input"],"mappings":";;;;;;;;;;;;;AAqBA,MAAMA,IAAaA,CAAC;AAAA,EAAEC,WAAAA;AAA2B,MAAM;AAC/C,QAAA;AAAA,IAAEC,GAAAA;AAAAA,MAAMC,EAAe,GACvB;AAAA,IAAEC,YAAAA;AAAAA,MAAeC,EAAuB,GAExC,CAACC,GAAKC,CAAM,IAAIC,EAAiB,GACjC,CAACC,GAAYC,CAAa,IAAIF,EAAiB,GAC/C,CAACG,GAAUC,CAAW,IAAIJ,EAA+BK,MAAS,GAClE,CAACC,GAAmBC,CAAoB,IAAIP,EAAqB,GACjEQ,IAAoBC,EAAoBX,KAAO,IAAI,GAAG,GACtDY,IAAgBC,KAEhB,CAACC,CAAS,IAAIC;AAEpBC,EAAAA,EAAU,MAAM;AACQ,IAAAC;EACxB,GAAG,CAAE,CAAA,GAELD,EAAU,MAAM;AACd,QAAIR,KAAqBE,GAAmB;AAC1C,YAAMQ,IAAgBC,EACnBd,SAAAA,EACAe,mBAAmBZ,GAAmBE,CAAiB;AAC1D,UAAIQ,GAAe;AACjBZ,QAAAA,EAAYY,CAAa;AACzB,cAAMf,IAAagB,EAChBd,SAAAA,EACAgB,wBAAwBH,GAAeR,CAAiB;AAC3DN,QAAAA,EAAcD,CAAU,GACxBR,EAAUQ,CAAU;AAAA,MAAA;AAEpBG,QAAAA,EAAYC,MAAS,GACXZ;IAEd;AAAA,EAAA,GAEC,CAACe,GAAmBF,CAAiB,CAAC;AAEzC,QAAMS,IAAwB,YAAY;AAClCK,UAAAA,IAA4B,MAAMC,QAAQC,IAAI,CAClDL,EAAYd,SAAAA,EAAWoB,cACvBN,EAAYd,WAAWqB,UAAW,CAAA,CACnC,EAAEC,KAAMC,CAAAA,MAAYA,EAAQC,KAAAA,CAAM;AACnCpB,IAAAA,EAAqBa,CAAyB;AAAA,EAAA;AAGhD,WAASQ,EAAgBC,GAA4C;AAC7D/B,UAAAA,IAAc+B,EAAMC,cAAcC;AACxChC,IAAAA,EAAOD,CAAG,GACAA,EAAAA,KAAAA,QAAAA,EAAKkC,SAASlC,IAAMO,MAAS;AAAA,EACzC;AAEA,WAAS4B,IAA8B;AACrCrC,IAAAA,EAAW,UAAU;AAAA,EACvB;AAEA,QAAMsC,IAAgBA,MAChB1B,IACEL,IAEA,gBAAAgC,EAAC,OAAI,EAAA,WAAU,iBACb,UAAA;AAAA,IAAC,gBAAAA,EAAA,OAAA,EAAI,WAAU,kDACb,UAAA;AAAA,MAAC,gBAAAC,EAAAC,GAAA,EACC,KAAKlC,EAASmC,MACd,KAAK,UAAUnC,EAASoC,aACxB,WAAU,4BACX,CAAA;AAAA,MACApC,EAASoC;AAAAA,IAAAA,GACZ;AAAA,IACCtC,KACC,gBAAAmC,EAAC,OACC,EAAA,WAAU,6BACV,yBAAyB;AAAA,MACvBI,QAAQvC;AAAAA,IAAAA,GAEX;AAAA,EAEL,EAAA,CAAA,IAIA,gBAAAkC,EAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,gBAAAC,EAACK,GACC,EAAA,UAAU,GAAG7B,CAAS,+BACtB,OAAOlB,EAAE,8BAA8B,GACvC,MAAMA,EAAE,6BAA6B,EAAE,CAAA;AAAA,IAEzC,gBAAAyC,EAACO,KACC,SAAQ,SACR,OAAM,WACN,SAAST,GACT,WAAU,2BAETvC,UAAAA;AAAAA,MAAAA,EAAE,wBAAwB;AAAA,MAAE;AAAA,MAAC,gBAAA0C,EAACO,GAAK,EAAA,MAAK,cAAa,CAAA;AAAA,IAAA,GACxD;AAAA,EACF,EAAA,CAAA,IAKD,gBAAAP,EAAA,OAAA,EAAI,WAAU,kCACb,UAAC,gBAAAD,EAAAO,GAAA,EACC,SAAQ,SACR,OAAM,WACN,SAAST,GACT,WAAU,qBAETvC,UAAAA;AAAAA,IAAAA,EAAE,wBAAwB;AAAA,IAAE;AAAA,IAAC,gBAAA0C,EAACO,GAAK,EAAA,MAAK,cAAa,CAAA;AAAA,EAAA,EACxD,CAAA,EACF,CAAA;AAMJ,SAAA,gBAAAR,EAAC,OAAI,EAAA,WAAU,4CACb,UAAA;AAAA,IAAC,gBAAAA,EAAA,OAAA,EAAI,WAAU,eACb,UAAA;AAAA,MAAA,gBAAAC,EAACO,GAAK,EAAA,MAAK,SAAQ,WAAU,QAAM;AAAA,MAClCjD,EAAE,qBAAqB;AAAA,IAAA,GAC1B;AAAA,sBACCkD,GAAY,EAAA,IAAIlC,GACf,UAAA,gBAAA0B,EAACS,KACC,MAAK,MACL,MAAK,QACL,aAAanD,EAAE,2BAA2B,GAC1C,UAAUkC,EAAgB,CAAA,GAE9B;AAAA,IACCM,EAAc;AAAA,EACjB,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,169 +1,169 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useState, useRef, useImperativeHandle, useEffect, useCallback } from "react";
|
|
3
|
-
import { odeServices } from "edifice
|
|
4
|
-
import { useTranslation } from "react-i18next";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { getBestSupportedMimeType } from "../../../utils/video.js";
|
|
8
|
-
import { Select } from "../../../components/Select/Select.js";
|
|
9
|
-
import { Icon } from "../../../components/Icon/Icon.js";
|
|
10
|
-
import { FormControl } from "../../../components/Form/FormControl.js";
|
|
11
|
-
import { Label } from "../../../components/Label/Label.js";
|
|
12
|
-
import { convertMsToMS } from "../../../utils/time.js";
|
|
13
|
-
import { Toolbar } from "../../../components/Toolbar/Toolbar.js";
|
|
14
|
-
import { LoadingScreen } from "../../../components/LoadingScreen/LoadingScreen.js";
|
|
15
|
-
const
|
|
16
|
-
appCode,
|
|
17
|
-
caption,
|
|
18
|
-
onSuccess,
|
|
19
|
-
onError,
|
|
20
|
-
onRecordUpdated,
|
|
21
|
-
hideSaveAction = !1
|
|
22
|
-
},
|
|
23
|
-
const [
|
|
1
|
+
import { jsx as i, jsxs as m, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as pe, useState as n, useRef as W, useImperativeHandle as ve, useEffect as f, useCallback as N } from "react";
|
|
3
|
+
import { odeServices as fe } from "@edifice.io/ts-client";
|
|
4
|
+
import { useTranslation as be } from "react-i18next";
|
|
5
|
+
import he from "../../../hooks/useBrowserInfo/useBrowserInfo.js";
|
|
6
|
+
import ye from "../../../core/useUpload/useUpload.js";
|
|
7
|
+
import { getBestSupportedMimeType as ge } from "../../../utils/video.js";
|
|
8
|
+
import { Select as we } from "../../../components/Select/Select.js";
|
|
9
|
+
import { Icon as u } from "../../../components/Icon/Icon.js";
|
|
10
|
+
import { FormControl as Ie } from "../../../components/Form/FormControl.js";
|
|
11
|
+
import { Label as ke } from "../../../components/Label/Label.js";
|
|
12
|
+
import { convertMsToMS as w } from "../../../utils/time.js";
|
|
13
|
+
import { Toolbar as Ce } from "../../../components/Toolbar/Toolbar.js";
|
|
14
|
+
import { LoadingScreen as Te } from "../../../components/LoadingScreen/LoadingScreen.js";
|
|
15
|
+
const L = 9, V = 16, He = /* @__PURE__ */ pe(({
|
|
16
|
+
appCode: J,
|
|
17
|
+
caption: K,
|
|
18
|
+
onSuccess: I,
|
|
19
|
+
onError: Q,
|
|
20
|
+
onRecordUpdated: h,
|
|
21
|
+
hideSaveAction: X = !1
|
|
22
|
+
}, Y) => {
|
|
23
|
+
const [O, Z] = n(18e4), [k, C] = n([]), [d, T] = n(!1), [l, j] = n(!1), [v, y] = n(!1), [p, R] = n(!1), [$, S] = n(!1), [U, ee] = n({
|
|
24
24
|
audio: !0,
|
|
25
25
|
video: {
|
|
26
26
|
facingMode: "environment",
|
|
27
|
-
aspectRatio:
|
|
27
|
+
aspectRatio: V / L
|
|
28
28
|
}
|
|
29
|
-
}), [
|
|
30
|
-
uploadBlob
|
|
31
|
-
} =
|
|
32
|
-
device
|
|
33
|
-
} =
|
|
34
|
-
|
|
35
|
-
save:
|
|
29
|
+
}), [c, P] = n(), [re, oe] = n(""), [x, B] = n([]), [H, z] = n(), [b, q] = n(0), [te, A] = n(0), o = W(null), a = W(null), {
|
|
30
|
+
uploadBlob: ie
|
|
31
|
+
} = ye(void 0, J), {
|
|
32
|
+
device: ne
|
|
33
|
+
} = he(navigator.userAgent);
|
|
34
|
+
ve(Y, () => ({
|
|
35
|
+
save: _
|
|
36
36
|
}));
|
|
37
37
|
const {
|
|
38
38
|
t
|
|
39
|
-
} =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, []),
|
|
43
|
-
|
|
44
|
-
}), [
|
|
45
|
-
if (
|
|
46
|
-
const
|
|
47
|
-
type:
|
|
39
|
+
} = be();
|
|
40
|
+
f(() => {
|
|
41
|
+
ae(), se();
|
|
42
|
+
}, []), f(() => (c || D(U), () => {
|
|
43
|
+
c && c.getTracks().forEach((r) => r.stop());
|
|
44
|
+
}), [c]), f(() => {
|
|
45
|
+
if (x.length && !d && o.current) {
|
|
46
|
+
const r = new Blob(x, {
|
|
47
|
+
type: re
|
|
48
48
|
});
|
|
49
|
-
if (
|
|
50
|
-
const
|
|
51
|
-
|
|
49
|
+
if (z(r), h) {
|
|
50
|
+
const e = window.URL.createObjectURL(r);
|
|
51
|
+
h(e);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
o.current.autoplay = !1, o.current.srcObject = null, o.current.src = window.URL.createObjectURL(r);
|
|
54
54
|
}
|
|
55
|
-
}, [
|
|
56
|
-
if (
|
|
57
|
-
const
|
|
55
|
+
}, [d, x]), f(() => {
|
|
56
|
+
if (d) {
|
|
57
|
+
const r = Date.now(), e = window.setInterval(
|
|
58
58
|
// Compute exact elapsed time by diffing the start time.
|
|
59
|
-
() =>
|
|
59
|
+
() => q(Date.now() - r),
|
|
60
60
|
500
|
|
61
61
|
);
|
|
62
62
|
return () => {
|
|
63
|
-
window.clearInterval(
|
|
63
|
+
window.clearInterval(e);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}, [
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
66
|
+
}, [d]), f(() => {
|
|
67
|
+
if (v) {
|
|
68
|
+
const r = window.setInterval(() => A((e) => e + 500), 500);
|
|
69
69
|
return () => {
|
|
70
|
-
window.clearInterval(
|
|
70
|
+
window.clearInterval(r);
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
const
|
|
79
|
-
switch (
|
|
73
|
+
}, [v]);
|
|
74
|
+
const ae = async () => {
|
|
75
|
+
const r = await fe.video().getVideoConf();
|
|
76
|
+
Z((r.maxDuration ?? 3) * 60 * 1e3);
|
|
77
|
+
}, se = async () => {
|
|
78
|
+
const e = (await navigator.mediaDevices.enumerateDevices()).filter((s) => s.kind === "videoinput");
|
|
79
|
+
switch (ne.type) {
|
|
80
80
|
case "mobile":
|
|
81
81
|
case "tablet": {
|
|
82
|
-
const
|
|
82
|
+
const s = {
|
|
83
83
|
deviceId: "environment",
|
|
84
84
|
label: t("video.back.camera"),
|
|
85
85
|
groupId: "",
|
|
86
86
|
kind: "videoinput"
|
|
87
|
-
},
|
|
87
|
+
}, g = {
|
|
88
88
|
deviceId: "user",
|
|
89
89
|
label: t("video.front.camera"),
|
|
90
90
|
groupId: "",
|
|
91
91
|
kind: "videoinput"
|
|
92
92
|
};
|
|
93
|
-
(
|
|
93
|
+
(e == null ? void 0 : e.length) > 1 ? C([s, g]) : C([s]);
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
96
96
|
default:
|
|
97
|
-
|
|
97
|
+
C(e);
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, D = async (r) => {
|
|
101
101
|
try {
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
} catch (
|
|
105
|
-
console.error(
|
|
102
|
+
const e = await navigator.mediaDevices.getUserMedia(r);
|
|
103
|
+
P(e), o.current && (o.current.src && (window.URL.revokeObjectURL(o.current.src), o.current.src = ""), o.current.srcObject = e, o.current.autoplay = !0, o.current.volume = 1, o.current.muted = !0);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
console.error(e);
|
|
106
106
|
}
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
mimeType:
|
|
112
|
-
}),
|
|
113
|
-
data
|
|
107
|
+
}, ce = N(() => {
|
|
108
|
+
T(!0), o && o.current && (o.current.muted = !0);
|
|
109
|
+
const r = ge();
|
|
110
|
+
oe(r), c && (a.current = new MediaRecorder(c, {
|
|
111
|
+
mimeType: r
|
|
112
|
+
}), a.current.ondataavailable = ({
|
|
113
|
+
data: e
|
|
114
114
|
}) => {
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
}, [
|
|
118
|
-
var
|
|
119
|
-
|
|
120
|
-
}, [
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
if (
|
|
115
|
+
e.size > 0 && B((s) => [...s, e]);
|
|
116
|
+
}, a.current.onerror = (e) => console.error(e), a.current.start(1e3));
|
|
117
|
+
}, [c]), M = N(() => {
|
|
118
|
+
var r;
|
|
119
|
+
T(!1), j(!0), ((r = a.current) == null ? void 0 : r.state) === "recording" && (a.current.requestData(), a.current.stop());
|
|
120
|
+
}, [a]), F = N(() => {
|
|
121
|
+
var r, e;
|
|
122
|
+
o && o.current && (o.current.muted = !1), v ? ((e = o == null ? void 0 : o.current) == null || e.pause(), y(!1)) : ((r = o == null ? void 0 : o.current) == null || r.play(), y(!0));
|
|
123
|
+
}, [v]), de = () => {
|
|
124
|
+
j(!1), T(!1), y(!1), S(!1), q(0), B([]), z(void 0), D(U), h && h();
|
|
125
|
+
}, _ = async () => {
|
|
126
|
+
if (R(!0), !H) {
|
|
127
127
|
console.error("Error while saving video: recorded video is undefined.");
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
|
-
const
|
|
131
|
-
duration:
|
|
130
|
+
const r = await ie(H, {
|
|
131
|
+
duration: b
|
|
132
132
|
});
|
|
133
|
-
if (
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
let
|
|
142
|
-
|
|
133
|
+
if (r != null)
|
|
134
|
+
return I == null || I([r]), R(!1), S(!0), [r];
|
|
135
|
+
Q("Error while uploading video"), R(!1), S(!0);
|
|
136
|
+
}, le = () => {
|
|
137
|
+
y(!1), A(0), o.current && (o.current.currentTime = 0);
|
|
138
|
+
}, me = (r) => {
|
|
139
|
+
var g;
|
|
140
|
+
const e = k.find((E) => E.label === r);
|
|
141
|
+
let s = {};
|
|
142
|
+
e != null && e.deviceId ? ((e == null ? void 0 : e.deviceId) === "environment" || (e == null ? void 0 : e.deviceId) === "user" ? s = {
|
|
143
143
|
audio: !0,
|
|
144
144
|
video: {
|
|
145
|
-
aspectRatio:
|
|
146
|
-
facingMode:
|
|
145
|
+
aspectRatio: V / L,
|
|
146
|
+
facingMode: e == null ? void 0 : e.deviceId
|
|
147
147
|
}
|
|
148
|
-
} :
|
|
148
|
+
} : s = {
|
|
149
149
|
audio: !0,
|
|
150
150
|
video: {
|
|
151
|
-
aspectRatio:
|
|
152
|
-
deviceId:
|
|
151
|
+
aspectRatio: V / L,
|
|
152
|
+
deviceId: e.deviceId
|
|
153
153
|
}
|
|
154
|
-
},
|
|
154
|
+
}, ee(s), c && (((g = a.current) == null ? void 0 : g.state) === "recording" && (a.current.requestData(), a.current.stop()), c.getTracks().forEach((E) => E.stop()), P(void 0)), D(s)) : console.error("Selected input device id is null");
|
|
155
155
|
};
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}, [
|
|
159
|
-
const
|
|
156
|
+
f(() => {
|
|
157
|
+
b >= O && M();
|
|
158
|
+
}, [b, M]);
|
|
159
|
+
const ue = [{
|
|
160
160
|
type: "icon",
|
|
161
161
|
name: "record",
|
|
162
162
|
props: {
|
|
163
|
-
icon: /* @__PURE__ */
|
|
163
|
+
icon: /* @__PURE__ */ i(u, { name: "record", color: d || l ? "" : "red" }),
|
|
164
164
|
color: "danger",
|
|
165
|
-
disabled:
|
|
166
|
-
onClick:
|
|
165
|
+
disabled: d || l || p,
|
|
166
|
+
onClick: ce,
|
|
167
167
|
"aria-label": t("bbm.video.record.start")
|
|
168
168
|
},
|
|
169
169
|
tooltip: t("bbm.video.record.start")
|
|
@@ -171,31 +171,31 @@ const VIDEO_HEIGHT = 9, VIDEO_WIDTH = 16, VideoRecorder = /* @__PURE__ */ forwar
|
|
|
171
171
|
type: "icon",
|
|
172
172
|
name: "stop",
|
|
173
173
|
props: {
|
|
174
|
-
icon: /* @__PURE__ */
|
|
175
|
-
disabled: !
|
|
176
|
-
onClick:
|
|
174
|
+
icon: /* @__PURE__ */ i(u, { name: "record-stop" }),
|
|
175
|
+
disabled: !d || l || p,
|
|
176
|
+
onClick: M,
|
|
177
177
|
"aria-label": t("bbm.video.record.stop")
|
|
178
178
|
},
|
|
179
179
|
tooltip: t("bbm.video.record.stop")
|
|
180
180
|
}, {
|
|
181
181
|
type: "icon",
|
|
182
182
|
name: "play",
|
|
183
|
-
visibility:
|
|
183
|
+
visibility: v ? "hide" : "show",
|
|
184
184
|
props: {
|
|
185
|
-
icon: /* @__PURE__ */
|
|
186
|
-
disabled: !
|
|
187
|
-
onClick:
|
|
185
|
+
icon: /* @__PURE__ */ i(u, { name: "play-filled" }),
|
|
186
|
+
disabled: !l || p,
|
|
187
|
+
onClick: F,
|
|
188
188
|
"aria-label": t("bbm.video.play.start")
|
|
189
189
|
},
|
|
190
190
|
tooltip: t("bbm.video.play.start")
|
|
191
191
|
}, {
|
|
192
192
|
type: "icon",
|
|
193
193
|
name: "pause",
|
|
194
|
-
visibility:
|
|
194
|
+
visibility: v ? "show" : "hide",
|
|
195
195
|
props: {
|
|
196
|
-
icon: /* @__PURE__ */
|
|
197
|
-
disabled: !
|
|
198
|
-
onClick:
|
|
196
|
+
icon: /* @__PURE__ */ i(u, { name: "pause" }),
|
|
197
|
+
disabled: !l || p,
|
|
198
|
+
onClick: F,
|
|
199
199
|
"aria-label": t("bbm.video.play.pause")
|
|
200
200
|
},
|
|
201
201
|
tooltip: t("bbm.video.play.pause")
|
|
@@ -205,55 +205,56 @@ const VIDEO_HEIGHT = 9, VIDEO_WIDTH = 16, VideoRecorder = /* @__PURE__ */ forwar
|
|
|
205
205
|
type: "icon",
|
|
206
206
|
name: "reset",
|
|
207
207
|
props: {
|
|
208
|
-
icon: /* @__PURE__ */
|
|
209
|
-
disabled: !
|
|
210
|
-
onClick:
|
|
208
|
+
icon: /* @__PURE__ */ i(u, { name: "refresh" }),
|
|
209
|
+
disabled: !l || p,
|
|
210
|
+
onClick: de,
|
|
211
211
|
"aria-label": t("bbm.video.record.reset")
|
|
212
212
|
},
|
|
213
213
|
tooltip: t("bbm.video.record.reset")
|
|
214
214
|
}, {
|
|
215
215
|
type: "icon",
|
|
216
216
|
name: "save",
|
|
217
|
-
visibility:
|
|
217
|
+
visibility: X ? "hide" : "show",
|
|
218
218
|
props: {
|
|
219
|
-
icon: /* @__PURE__ */
|
|
220
|
-
disabled: !
|
|
221
|
-
onClick:
|
|
219
|
+
icon: /* @__PURE__ */ i(u, { name: "save" }),
|
|
220
|
+
disabled: !l || p || $,
|
|
221
|
+
onClick: _,
|
|
222
222
|
"aria-label": t("bbm.video.record.save")
|
|
223
223
|
},
|
|
224
224
|
tooltip: t("bbm.video.record.save")
|
|
225
225
|
}];
|
|
226
|
-
return /* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
226
|
+
return /* @__PURE__ */ m("div", { className: "video-recorder d-flex flex-fill flex-column align-items-center pb-8", children: [
|
|
227
|
+
/* @__PURE__ */ i("div", { className: "video-recorder-caption d-none d-md-block", children: K }),
|
|
228
|
+
k.length > 1 && /* @__PURE__ */ i("div", { className: "video-recorder-devices mb-12", children: /* @__PURE__ */ m(Ie, { id: "selectInputDevice", children: [
|
|
229
|
+
/* @__PURE__ */ i(ke, { className: "d-none d-md-block", children: t("bbm.video.record.select.devices.label") }),
|
|
230
|
+
/* @__PURE__ */ i(we, { placeholderOption: t("bbm.video.record.select.devices.placeholder"), options: k.map((r) => r.label), onValueChange: me })
|
|
231
231
|
] }) }),
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
(
|
|
235
|
-
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
|
|
232
|
+
/* @__PURE__ */ m("div", { className: "video-recorder-video-container position-relative align-self-stretch", children: [
|
|
233
|
+
/* @__PURE__ */ i("video", { ref: o, playsInline: !0, autoPlay: !0, controls: !1, muted: !0, onEnded: le, className: "rounded", children: /* @__PURE__ */ i("track", { default: !0, kind: "captions", srcLang: "fr", src: "" }) }),
|
|
234
|
+
(d || l) && /* @__PURE__ */ m("div", { className: "video-recorder-time d-flex align-items-center font-monospace fs-6 text-bg-dark rounded", children: [
|
|
235
|
+
d && /* @__PURE__ */ m(G, { children: [
|
|
236
|
+
/* @__PURE__ */ i(u, { name: "record", size: "12", color: "red", className: "me-4" }),
|
|
237
|
+
/* @__PURE__ */ m("span", { children: [
|
|
238
|
+
w(b),
|
|
239
239
|
"/",
|
|
240
|
-
|
|
240
|
+
w(O)
|
|
241
241
|
] })
|
|
242
242
|
] }),
|
|
243
|
-
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
|
|
243
|
+
l && /* @__PURE__ */ m(G, { children: [
|
|
244
|
+
/* @__PURE__ */ i(u, { name: "record-video", size: "14", className: "me-4" }),
|
|
245
|
+
/* @__PURE__ */ m("span", { children: [
|
|
246
|
+
w(te),
|
|
247
247
|
"/",
|
|
248
|
-
|
|
248
|
+
w(b)
|
|
249
249
|
] })
|
|
250
250
|
] })
|
|
251
251
|
] }),
|
|
252
|
-
|
|
252
|
+
c && /* @__PURE__ */ i(Ce, { items: ue, className: "position-absolute bottom-0 start-50 bg-white" })
|
|
253
253
|
] }),
|
|
254
|
-
|
|
254
|
+
p && /* @__PURE__ */ i(Te, { position: !1, caption: t("bbm.video.save.loader.caption") })
|
|
255
255
|
] });
|
|
256
256
|
});
|
|
257
257
|
export {
|
|
258
|
-
|
|
258
|
+
He as default
|
|
259
259
|
};
|
|
260
|
+
//# sourceMappingURL=VideoRecorder.js.map
|