@webiny/app-admin 0.0.0-unstable.fcdad0bc61 → 0.0.0-unstable.fdd9228b5d
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/assets/icons/add-18px.svg +1 -1
- package/assets/icons/arrow_drop_down-24px.svg +1 -1
- package/assets/icons/file_download.svg +1 -0
- package/assets/icons/file_upload.svg +1 -0
- package/assets/icons/filter-24px.svg +1 -1
- package/assets/icons/highlight-24px.svg +1 -1
- package/assets/icons/info.svg +1 -1
- package/assets/icons/insert_drive_file-24px.svg +1 -1
- package/assets/icons/insert_photo-24px.svg +1 -1
- package/assets/icons/label-24px.svg +1 -1
- package/assets/icons/round-account_circle-24px.svg +1 -1
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
- package/assets/icons/round-help-24px.svg +1 -1
- package/assets/icons/round-settings-24px.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.d.ts +2 -2
- package/base/Admin.js +26 -53
- package/base/Admin.js.map +1 -1
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
- package/base/Base/Menus/SupportMenuItems.js +20 -0
- package/base/Base/Menus/SupportMenuItems.js.map +1 -0
- package/base/Base/Menus/WebinyVersion.d.ts +2 -0
- package/base/Base/Menus/WebinyVersion.js +24 -0
- package/base/Base/Menus/WebinyVersion.js.map +1 -0
- package/base/Base/Menus.d.ts +2 -0
- package/base/Base/Menus.js +129 -0
- package/base/Base/Menus.js.map +1 -0
- package/base/Base/Routes.d.ts +2 -0
- package/base/Base/Routes.js +24 -0
- package/base/Base/Routes.js.map +1 -0
- package/base/Base/Tenant/wby-logo.svg +3 -0
- package/base/Base/Tenant.d.ts +2 -0
- package/base/Base/Tenant.js +19 -0
- package/base/Base/Tenant.js.map +1 -0
- package/base/Base.d.ts +1 -1
- package/base/Base.js +12 -108
- package/base/Base.js.map +1 -1
- package/base/WebinyVersion.d.ts +2 -0
- package/base/WebinyVersion.js +24 -0
- package/base/WebinyVersion.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +2 -3
- package/base/plugins/AddGraphQLQuerySelection.js +12 -25
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.d.ts +1 -0
- package/base/providers/AdminUiStateProvider.js +14 -0
- package/base/providers/AdminUiStateProvider.js.map +1 -0
- package/base/providers/ApolloProvider.d.ts +5 -2
- package/base/providers/ApolloProvider.js +10 -20
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/TelemetryProvider.d.ts +1 -2
- package/base/providers/TelemetryProvider.js +14 -29
- package/base/providers/TelemetryProvider.js.map +1 -1
- package/base/providers/UiProviders.d.ts +1 -0
- package/base/providers/UiProviders.js +14 -0
- package/base/providers/UiProviders.js.map +1 -0
- package/base/providers/UiStateProvider.d.ts +1 -2
- package/base/providers/UiStateProvider.js +11 -20
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/providers/ViewCompositionProvider.d.ts +5 -1
- package/base/providers/ViewCompositionProvider.js +34 -57
- package/base/providers/ViewCompositionProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +39 -2
- package/base/ui/Brand.js +6 -17
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +21 -1
- package/base/ui/CenteredView.js +15 -40
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +39 -2
- package/base/ui/Dashboard.js +6 -17
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +86 -0
- package/base/ui/FileManager.js +60 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +38 -2
- package/base/ui/Layout.js +9 -22
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LocaleSelector.d.ts +39 -2
- package/base/ui/LocaleSelector.js +6 -17
- package/base/ui/LocaleSelector.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +20 -2
- package/base/ui/LoginScreen.js +10 -22
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +38 -7
- package/base/ui/Logo.js +6 -34
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +38 -23
- package/base/ui/Navigation.js +6 -182
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +39 -2
- package/base/ui/NotFound.js +6 -17
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.d.ts +2 -2
- package/base/ui/Tags.js +15 -24
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.d.ts +39 -0
- package/base/ui/TenantSelector.js +8 -0
- package/base/ui/TenantSelector.js.map +1 -0
- package/base/ui/UserMenu/UserMenu.d.ts +39 -0
- package/base/ui/UserMenu/UserMenu.js +8 -0
- package/base/ui/UserMenu/UserMenu.js.map +1 -0
- package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
- package/base/ui/UserMenu/UserMenuHandle.js +8 -0
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
- package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuItem.js +19 -0
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
- package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuLink.js +19 -0
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
- package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
- package/base/ui/UserMenu.d.ts +79 -29
- package/base/ui/UserMenu.js +15 -133
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.d.ts +2 -1
- package/components/AdminLayout.js +8 -18
- package/components/AdminLayout.js.map +1 -1
- package/components/AppInstaller/AppInstaller.d.ts +5 -1
- package/components/AppInstaller/AppInstaller.js +66 -136
- package/components/AppInstaller/AppInstaller.js.map +1 -1
- package/components/AppInstaller/Sidebar.d.ts +2 -2
- package/components/AppInstaller/Sidebar.js +71 -141
- package/components/AppInstaller/Sidebar.js.map +1 -1
- package/components/AppInstaller/index.d.ts +2 -2
- package/components/AppInstaller/index.js +11 -23
- package/components/AppInstaller/index.js.map +1 -1
- package/components/AppInstaller/styled.d.ts +16 -6
- package/components/AppInstaller/styled.js +57 -73
- package/components/AppInstaller/styled.js.map +1 -1
- package/components/AppInstaller/useInstaller.d.ts +2 -8
- package/components/AppInstaller/useInstaller.js +95 -247
- package/components/AppInstaller/useInstaller.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +83 -0
- package/components/BulkActions/Worker.js +126 -0
- package/components/BulkActions/Worker.js.map +1 -0
- package/components/BulkActions/index.d.ts +2 -0
- package/components/BulkActions/index.js +4 -0
- package/components/BulkActions/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +5 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +23 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -0
- package/components/BulkActions/useDialogWithReport/index.js +3 -0
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +19 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +51 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -0
- package/components/Buttons/Buttons.d.ts +24 -0
- package/components/Buttons/Buttons.js +77 -0
- package/components/Buttons/Buttons.js.map +1 -0
- package/components/Buttons/Buttons.styles.d.ts +5 -0
- package/components/Buttons/Buttons.styles.js +18 -0
- package/components/Buttons/Buttons.styles.js.map +1 -0
- package/components/Buttons/index.d.ts +2 -0
- package/components/Buttons/index.js +4 -0
- package/components/Buttons/index.js.map +1 -0
- package/components/Buttons/useButtons.d.ts +14 -0
- package/components/Buttons/useButtons.js +24 -0
- package/components/Buttons/useButtons.js.map +1 -0
- package/components/Dialogs/CustomDialog.d.ts +17 -0
- package/components/Dialogs/CustomDialog.js +48 -0
- package/components/Dialogs/CustomDialog.js.map +1 -0
- package/components/Dialogs/Dialog.d.ts +21 -0
- package/components/Dialogs/Dialog.js +62 -0
- package/components/Dialogs/Dialog.js.map +1 -0
- package/components/Dialogs/DialogsContext.d.ts +43 -0
- package/components/Dialogs/DialogsContext.js +141 -0
- package/components/Dialogs/DialogsContext.js.map +1 -0
- package/components/Dialogs/useDialogs.d.ts +3 -0
- package/components/Dialogs/useDialogs.js +12 -0
- package/components/Dialogs/useDialogs.js.map +1 -0
- package/components/EmptyView.d.ts +4 -3
- package/components/EmptyView.js +30 -65
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +16 -0
- package/components/Filters/Filters.js +21 -0
- package/components/Filters/Filters.js.map +1 -0
- package/components/Filters/FiltersToggle.d.ts +7 -0
- package/components/Filters/FiltersToggle.js +26 -0
- package/components/Filters/FiltersToggle.js.map +1 -0
- package/components/Filters/index.d.ts +2 -0
- package/components/Filters/index.js +4 -0
- package/components/Filters/index.js.map +1 -0
- package/components/FloatingActionButton.d.ts +4 -1
- package/components/FloatingActionButton.js +8 -19
- package/components/FloatingActionButton.js.map +1 -1
- package/components/FloatingPanel.d.ts +13 -0
- package/components/FloatingPanel.js +96 -0
- package/components/FloatingPanel.js.map +1 -0
- package/components/IconPicker/IconPicker.d.ts +13 -0
- package/components/IconPicker/IconPicker.js +39 -0
- package/components/IconPicker/IconPicker.js.map +1 -0
- package/components/IconPicker/IconPickerComponent.d.ts +17 -0
- package/components/IconPicker/IconPickerComponent.js +81 -0
- package/components/IconPicker/IconPickerComponent.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.d.ts +53 -0
- package/components/IconPicker/IconPickerPresenter.js +77 -0
- package/components/IconPicker/IconPickerPresenter.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.test.d.ts +1 -0
- package/components/IconPicker/IconPickerPresenter.test.js +109 -0
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -0
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +9 -0
- package/components/IconPicker/IconPickerPresenterProvider.js +19 -0
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -0
- package/components/IconPicker/IconPickerTab.d.ts +33 -0
- package/components/IconPicker/IconPickerTab.js +159 -0
- package/components/IconPicker/IconPickerTab.js.map +1 -0
- package/components/IconPicker/IconRenderer.d.ts +34 -0
- package/components/IconPicker/IconRenderer.js +27 -0
- package/components/IconPicker/IconRenderer.js.map +1 -0
- package/components/IconPicker/IconRepository.d.ts +19 -0
- package/components/IconPicker/IconRepository.js +47 -0
- package/components/IconPicker/IconRepository.js.map +1 -0
- package/components/IconPicker/IconRepository.test.d.ts +1 -0
- package/components/IconPicker/IconRepository.test.js +66 -0
- package/components/IconPicker/IconRepository.test.js.map +1 -0
- package/components/IconPicker/IconRepositoryFactory.d.ts +9 -0
- package/components/IconPicker/IconRepositoryFactory.js +17 -0
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -0
- package/components/IconPicker/Loading.d.ts +14 -0
- package/components/IconPicker/Loading.js +50 -0
- package/components/IconPicker/Loading.js.map +1 -0
- package/components/IconPicker/components/IconPickerCell.d.ts +12 -0
- package/components/IconPicker/components/IconPickerCell.js +27 -0
- package/components/IconPicker/components/IconPickerCell.js.map +1 -0
- package/components/IconPicker/components/IconPickerContent.d.ts +11 -0
- package/components/IconPicker/components/IconPickerContent.js +41 -0
- package/components/IconPicker/components/IconPickerContent.js.map +1 -0
- package/components/IconPicker/components/IconPickerRow.d.ts +4 -0
- package/components/IconPicker/components/IconPickerRow.js +14 -0
- package/components/IconPicker/components/IconPickerRow.js.map +1 -0
- package/components/IconPicker/components/IconPickerTrigger.d.ts +13 -0
- package/components/IconPicker/components/IconPickerTrigger.js +52 -0
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -0
- package/components/IconPicker/components/index.d.ts +4 -0
- package/components/IconPicker/components/index.js +6 -0
- package/components/IconPicker/components/index.js.map +1 -0
- package/components/IconPicker/config/Emojis.d.ts +2 -0
- package/components/IconPicker/config/Emojis.js +24 -0
- package/components/IconPicker/config/Emojis.js.map +1 -0
- package/components/IconPicker/config/FontAwesomeIcons.d.ts +2 -0
- package/components/IconPicker/config/FontAwesomeIcons.js +61 -0
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -0
- package/components/IconPicker/config/IconPackProvider.d.ts +7 -0
- package/components/IconPicker/config/IconPackProvider.js +23 -0
- package/components/IconPicker/config/IconPackProvider.js.map +1 -0
- package/components/IconPicker/config/IconType.d.ts +32 -0
- package/components/IconPicker/config/IconType.js +89 -0
- package/components/IconPicker/config/IconType.js.map +1 -0
- package/components/IconPicker/config/index.d.ts +31 -0
- package/components/IconPicker/config/index.js +45 -0
- package/components/IconPicker/config/index.js.map +1 -0
- package/components/IconPicker/defaultIcon.d.ts +6 -0
- package/components/IconPicker/defaultIcon.js +8 -0
- package/components/IconPicker/defaultIcon.js.map +1 -0
- package/components/IconPicker/index.d.ts +7 -0
- package/components/IconPicker/index.js +8 -0
- package/components/IconPicker/index.js.map +1 -0
- package/components/IconPicker/plugins/customPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/customPlugin.js +132 -0
- package/components/IconPicker/plugins/customPlugin.js.map +1 -0
- package/components/IconPicker/plugins/emojisPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/emojisPlugin.js +127 -0
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -0
- package/components/IconPicker/plugins/graphql.d.ts +20 -0
- package/components/IconPicker/plugins/graphql.js +27 -0
- package/components/IconPicker/plugins/graphql.js.map +1 -0
- package/components/IconPicker/plugins/iconsPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/iconsPlugin.js +115 -0
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -0
- package/components/IconPicker/types.d.ts +22 -0
- package/components/IconPicker/types.js +10 -0
- package/components/IconPicker/types.js.map +1 -0
- package/components/LexicalEditor/LexicalEditor.d.ts +8 -0
- package/components/LexicalEditor/LexicalEditor.js +29 -0
- package/components/LexicalEditor/LexicalEditor.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +3 -0
- package/components/LexicalEditor/index.js.map +1 -0
- package/components/MultiImageUpload.d.ts +1 -1
- package/components/MultiImageUpload.js +14 -41
- package/components/MultiImageUpload.js.map +1 -1
- package/components/OptionsMenu/OptionsMenu.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenu.js +23 -0
- package/components/OptionsMenu/OptionsMenu.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuItem.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenuItem.js +17 -0
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuLink.d.ts +12 -0
- package/components/OptionsMenu/OptionsMenuLink.js +17 -0
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -0
- package/components/OptionsMenu/index.d.ts +4 -0
- package/components/OptionsMenu/index.js +6 -0
- package/components/OptionsMenu/index.js.map +1 -0
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +13 -0
- package/components/OptionsMenu/useOptionsMenuItem.js +23 -0
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -0
- package/components/OverlayLayout/OverlayLayout.d.ts +6 -17
- package/components/OverlayLayout/OverlayLayout.js +44 -181
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
- package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
- package/components/OverlayLayout/components/OverlayContent.js +21 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
- package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
- package/components/OverlayLayout/components/OverlayHeader.js +44 -0
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
- package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
- package/components/OverlayLayout/components/OverlayRoot.js +19 -0
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
- package/components/OverlayLayout/components/index.d.ts +4 -0
- package/components/OverlayLayout/components/index.js +6 -0
- package/components/OverlayLayout/components/index.js.map +1 -0
- package/components/OverlayLayout/index.js +2 -17
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/CannotUseAaclAlert.d.ts +2 -0
- package/components/Permissions/CannotUseAaclAlert.js +14 -0
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -0
- package/components/Permissions/Permissions.d.ts +4 -2
- package/components/Permissions/Permissions.js +29 -41
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.d.ts +6 -0
- package/components/Permissions/PermissionsGroup.js +18 -0
- package/components/Permissions/PermissionsGroup.js.map +1 -0
- package/components/Permissions/StyledComponents.d.ts +2 -3
- package/components/Permissions/StyledComponents.js +14 -35
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +2 -0
- package/components/Permissions/index.js +5 -29
- package/components/Permissions/index.js.map +1 -1
- package/components/ResizablePanels/index.d.ts +1 -0
- package/components/ResizablePanels/index.js +3 -0
- package/components/ResizablePanels/index.js.map +1 -0
- package/components/RichTextEditor/RichTextEditor.d.ts +2 -2
- package/components/RichTextEditor/RichTextEditor.js +14 -28
- package/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/components/RichTextEditor/index.js +3 -20
- package/components/RichTextEditor/index.js.map +1 -1
- package/components/RichTextEditor/tools/header/index.d.ts +3 -4
- package/components/RichTextEditor/tools/header/index.js +457 -573
- package/components/RichTextEditor/tools/header/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/index.d.ts +2 -4
- package/components/RichTextEditor/tools/image/index.js +150 -213
- package/components/RichTextEditor/tools/image/index.js.map +1 -1
- package/components/RichTextEditor/tools/image/svgs.js +6 -11
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -1
- package/components/RichTextEditor/tools/image/tunes.d.ts +2 -4
- package/components/RichTextEditor/tools/image/tunes.js +75 -118
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -1
- package/components/RichTextEditor/tools/image/types.js +2 -4
- package/components/RichTextEditor/tools/image/types.js.map +1 -1
- package/components/RichTextEditor/tools/image/ui.d.ts +2 -4
- package/components/RichTextEditor/tools/image/ui.js +150 -206
- package/components/RichTextEditor/tools/image/ui.js.map +1 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +3 -4
- package/components/RichTextEditor/tools/paragraph/index.js +341 -420
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -1
- package/components/RichTextEditor/tools/textColor/index.d.ts +1 -4
- package/components/RichTextEditor/tools/textColor/index.js +164 -238
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -1
- package/components/RichTextEditor/tools/utils.d.ts +1 -1
- package/components/RichTextEditor/tools/utils.js +7 -16
- package/components/RichTextEditor/tools/utils.js.map +1 -1
- package/components/Routes.d.ts +1 -1
- package/components/Routes.js +21 -36
- package/components/Routes.js.map +1 -1
- package/components/SearchUI.d.ts +3 -1
- package/components/SearchUI.js +24 -68
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +19 -8
- package/components/SimpleForm/SimpleForm.js +74 -99
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.js +2 -30
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +3 -1
- package/components/SimpleUI/InputField.js +42 -63
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +22 -4
- package/components/SingleImageUpload.js +40 -92
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +10 -8
- package/components/SplitView/SplitView.js +52 -90
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.js +2 -24
- package/components/SplitView/index.js.map +1 -1
- package/components/StateInspector.d.ts +8 -0
- package/components/StateInspector.js +36 -0
- package/components/StateInspector.js.map +1 -0
- package/components/Wcp.d.ts +13 -0
- package/components/Wcp.js +27 -0
- package/components/Wcp.js.map +1 -0
- package/components/index.d.ts +3 -1
- package/components/index.js +4 -12
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Menu/MenuGroup.d.ts +62 -0
- package/config/AdminConfig/Menu/MenuGroup.js +14 -0
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -0
- package/config/AdminConfig/Menu/MenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuItem.js +14 -0
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/MenuLink.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuLink.js +18 -0
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +24 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu.d.ts +72 -0
- package/config/AdminConfig/Menu/SupportMenu.js +49 -0
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/UserMenu/types.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/types.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu.d.ts +129 -0
- package/config/AdminConfig/Menu/UserMenu.js +61 -0
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -0
- package/config/AdminConfig/Menu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/types.js +3 -0
- package/config/AdminConfig/Menu/types.js.map +1 -0
- package/config/AdminConfig/Menu.d.ts +350 -0
- package/config/AdminConfig/Menu.js +75 -0
- package/config/AdminConfig/Menu.js.map +1 -0
- package/config/AdminConfig/Route.d.ts +3 -0
- package/config/AdminConfig/Route.js +8 -0
- package/config/AdminConfig/Route.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantLogo.js +16 -0
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantName.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantName.js +16 -0
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
- package/config/AdminConfig/Tenant.d.ts +66 -0
- package/config/AdminConfig/Tenant.js +23 -0
- package/config/AdminConfig/Tenant.js.map +1 -0
- package/config/AdminConfig/Theme/assignColor.d.ts +2 -0
- package/config/AdminConfig/Theme/assignColor.js +22 -0
- package/config/AdminConfig/Theme/assignColor.js.map +1 -0
- package/config/AdminConfig/Theme/consts.d.ts +2 -0
- package/config/AdminConfig/Theme/consts.js +4 -0
- package/config/AdminConfig/Theme/consts.js.map +1 -0
- package/config/AdminConfig/Theme/types.d.ts +3 -0
- package/config/AdminConfig/Theme/types.js +3 -0
- package/config/AdminConfig/Theme/types.js.map +1 -0
- package/config/AdminConfig/Theme.d.ts +16 -0
- package/config/AdminConfig/Theme.js +22 -0
- package/config/AdminConfig/Theme.js.map +1 -0
- package/config/AdminConfig.d.ts +434 -0
- package/config/AdminConfig.js +47 -0
- package/config/AdminConfig.js.map +1 -0
- package/config/createAdminConfig.d.ts +57 -0
- package/config/createAdminConfig.js +94 -0
- package/config/createAdminConfig.js.map +1 -0
- package/hooks/index.d.ts +10 -0
- package/hooks/index.js +12 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useConfirmationDialog.d.ts +7 -3
- package/hooks/useConfirmationDialog.js +29 -43
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +21 -2
- package/hooks/useDialog.js +17 -26
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useIsMounted.d.ts +3 -0
- package/hooks/useIsMounted.js +15 -0
- package/hooks/useIsMounted.js.map +1 -0
- package/hooks/useKeyHandler.d.ts +8 -0
- package/hooks/useKeyHandler.js +64 -0
- package/hooks/useKeyHandler.js.map +1 -0
- package/hooks/useModKey.d.ts +1 -0
- package/hooks/useModKey.js +30 -0
- package/hooks/useModKey.js.map +1 -0
- package/hooks/useShiftKey.d.ts +1 -0
- package/hooks/useShiftKey.js +33 -0
- package/hooks/useShiftKey.js.map +1 -0
- package/hooks/useSnackbar.d.ts +1 -0
- package/hooks/useSnackbar.js +24 -30
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +2 -0
- package/hooks/useStateIfMounted.js +16 -0
- package/hooks/useStateIfMounted.js.map +1 -0
- package/hooks/useStateWithCallback.d.ts +5 -0
- package/hooks/useStateWithCallback.js +18 -0
- package/hooks/useStateWithCallback.js.map +1 -0
- package/index.d.ts +27 -15
- package/index.js +53 -373
- package/index.js.map +1 -1
- package/package.json +66 -58
- package/plugins/MenuPlugin.d.ts +1 -1
- package/plugins/MenuPlugin.js +16 -55
- package/plugins/MenuPlugin.js.map +1 -1
- package/plugins/PermissionRendererPlugin.d.ts +1 -1
- package/plugins/PermissionRendererPlugin.js +16 -55
- package/plugins/PermissionRendererPlugin.js.map +1 -1
- package/plugins/uiLayoutRenderer/index.js +41 -63
- package/plugins/uiLayoutRenderer/index.js.map +1 -1
- package/styles.scss +7 -2
- package/types.d.ts +58 -69
- package/types.js +6 -4
- package/types.js.map +1 -1
- package/ui/UIElement.js +2 -18
- package/ui/UIElement.js.map +1 -1
- package/ui/UILayout.js +2 -18
- package/ui/UILayout.js.map +1 -1
- package/ui/UIRenderer.js +2 -12
- package/ui/UIRenderer.js.map +1 -1
- package/ui/UIView.js +2 -24
- package/ui/UIView.js.map +1 -1
- package/ui/elements/AccordionElement.d.ts +2 -1
- package/ui/elements/AccordionElement.js +44 -106
- package/ui/elements/AccordionElement.js.map +1 -1
- package/ui/elements/ButtonElement.d.ts +4 -3
- package/ui/elements/ButtonElement.js +47 -100
- package/ui/elements/ButtonElement.js.map +1 -1
- package/ui/elements/ButtonGroupElement.d.ts +2 -1
- package/ui/elements/ButtonGroupElement.js +24 -62
- package/ui/elements/ButtonGroupElement.js.map +1 -1
- package/ui/elements/GenericElement.js +2 -17
- package/ui/elements/GenericElement.js.map +1 -1
- package/ui/elements/LabelElement.d.ts +3 -2
- package/ui/elements/LabelElement.js +16 -53
- package/ui/elements/LabelElement.js.map +1 -1
- package/ui/elements/NavigationMenuElement.d.ts +5 -4
- package/ui/elements/NavigationMenuElement.js +72 -161
- package/ui/elements/NavigationMenuElement.js.map +1 -1
- package/ui/elements/PanelElement.js +3 -32
- package/ui/elements/PanelElement.js.map +1 -1
- package/ui/elements/PlaceholderElement.js +9 -42
- package/ui/elements/PlaceholderElement.js.map +1 -1
- package/ui/elements/SmallButtonElement.d.ts +4 -2
- package/ui/elements/SmallButtonElement.js +21 -61
- package/ui/elements/SmallButtonElement.js.map +1 -1
- package/ui/elements/TypographyElement.d.ts +3 -2
- package/ui/elements/TypographyElement.js +21 -65
- package/ui/elements/TypographyElement.js.map +1 -1
- package/ui/elements/ViewElement.js +2 -17
- package/ui/elements/ViewElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +3 -2
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +17 -51
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -1
- package/ui/elements/form/DynamicFieldsetElement.d.ts +3 -2
- package/ui/elements/form/DynamicFieldsetElement.js +93 -154
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +8 -39
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +41 -89
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +68 -108
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +22 -19
- package/ui/elements/form/FileManagerElement/styled.js +86 -98
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -1
- package/ui/elements/form/FileManagerElement.d.ts +3 -2
- package/ui/elements/form/FileManagerElement.js +44 -106
- package/ui/elements/form/FileManagerElement.js.map +1 -1
- package/ui/elements/form/FormElement.d.ts +3 -2
- package/ui/elements/form/FormElement.js +18 -64
- package/ui/elements/form/FormElement.js.map +1 -1
- package/ui/elements/form/FormFieldElement.d.ts +6 -5
- package/ui/elements/form/FormFieldElement.js +100 -193
- package/ui/elements/form/FormFieldElement.js.map +1 -1
- package/ui/elements/form/HiddenElement.d.ts +2 -1
- package/ui/elements/form/HiddenElement.js +22 -61
- package/ui/elements/form/HiddenElement.js.map +1 -1
- package/ui/elements/form/InputElement.d.ts +3 -2
- package/ui/elements/form/InputElement.js +29 -69
- package/ui/elements/form/InputElement.js.map +1 -1
- package/ui/elements/form/PasswordElement.d.ts +1 -1
- package/ui/elements/form/PasswordElement.js +27 -64
- package/ui/elements/form/PasswordElement.js.map +1 -1
- package/ui/elements/form/SelectElement.d.ts +2 -1
- package/ui/elements/form/SelectElement.js +39 -84
- package/ui/elements/form/SelectElement.js.map +1 -1
- package/ui/elements/form/TextareaElement.d.ts +3 -2
- package/ui/elements/form/TextareaElement.js +31 -69
- package/ui/elements/form/TextareaElement.js.map +1 -1
- package/ui/views/AdminView/ContentElement.js +31 -72
- package/ui/views/AdminView/ContentElement.js.map +1 -1
- package/ui/views/AdminView/HeaderElement.js +61 -137
- package/ui/views/AdminView/HeaderElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +18 -59
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +18 -59
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -1
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +18 -59
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -1
- package/ui/views/AdminView/components/Dialog.d.ts +1 -1
- package/ui/views/AdminView/components/Dialog.js +35 -51
- package/ui/views/AdminView/components/Dialog.js.map +1 -1
- package/ui/views/AdminView/components/Hamburger.d.ts +1 -1
- package/ui/views/AdminView/components/Hamburger.js +13 -29
- package/ui/views/AdminView/components/Hamburger.js.map +1 -1
- package/ui/views/FormView/FormContainerElement.d.ts +4 -3
- package/ui/views/FormView/FormContainerElement.js +17 -69
- package/ui/views/FormView/FormContainerElement.js.map +1 -1
- package/ui/views/FormView/FormContentElement.d.ts +3 -0
- package/ui/views/FormView/FormContentElement.js +8 -31
- package/ui/views/FormView/FormContentElement.js.map +1 -1
- package/ui/views/FormView/FormFooterElement.d.ts +4 -3
- package/ui/views/FormView/FormFooterElement.js +11 -65
- package/ui/views/FormView/FormFooterElement.js.map +1 -1
- package/ui/views/FormView/FormHeaderElement.d.ts +3 -2
- package/ui/views/FormView/FormHeaderElement.js +27 -100
- package/ui/views/FormView/FormHeaderElement.js.map +1 -1
- package/ui/views/FormView.d.ts +3 -3
- package/ui/views/FormView.js +105 -192
- package/ui/views/FormView.js.map +1 -1
- package/ui/views/OverlayView/ContentElement.d.ts +2 -1
- package/ui/views/OverlayView/ContentElement.js +24 -56
- package/ui/views/OverlayView/ContentElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderElement.d.ts +2 -1
- package/ui/views/OverlayView/HeaderElement.js +64 -126
- package/ui/views/OverlayView/HeaderElement.js.map +1 -1
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +4 -2
- package/ui/views/OverlayView/HeaderTitleElement.js +22 -70
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -1
- package/ui/views/OverlayView/useOverlayView.js +18 -38
- package/ui/views/OverlayView/useOverlayView.js.map +1 -1
- package/ui/views/OverlayView.d.ts +3 -2
- package/ui/views/OverlayView.js +80 -170
- package/ui/views/OverlayView.js.map +1 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +2 -1
- package/ui/views/SplitView/SplitViewPanelElement.js +29 -88
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -1
- package/ui/views/SplitView.d.ts +1 -1
- package/ui/views/SplitView.js +57 -133
- package/ui/views/SplitView.js.map +1 -1
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/base/ui/Menu.d.ts +0 -31
- package/base/ui/Menu.js +0 -166
- package/base/ui/Menu.js.map +0 -1
- package/base/ui/Search.d.ts +0 -19
- package/base/ui/Search.js +0 -81
- package/base/ui/Search.js.map +0 -1
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -55
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -60
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
- package/components/FileManager/BottomInfoBar.d.ts +0 -5
- package/components/FileManager/BottomInfoBar.js +0 -60
- package/components/FileManager/BottomInfoBar.js.map +0 -1
- package/components/FileManager/DropFilesHere.d.ts +0 -10
- package/components/FileManager/DropFilesHere.js +0 -76
- package/components/FileManager/DropFilesHere.js.map +0 -1
- package/components/FileManager/File.d.ts +0 -17
- package/components/FileManager/File.js +0 -155
- package/components/FileManager/File.js.map +0 -1
- package/components/FileManager/FileDetails/Name.d.ts +0 -8
- package/components/FileManager/FileDetails/Name.js +0 -138
- package/components/FileManager/FileDetails/Name.js.map +0 -1
- package/components/FileManager/FileDetails/Tags.d.ts +0 -10
- package/components/FileManager/FileDetails/Tags.js +0 -339
- package/components/FileManager/FileDetails/Tags.js.map +0 -1
- package/components/FileManager/FileDetails.d.ts +0 -24
- package/components/FileManager/FileDetails.js +0 -474
- package/components/FileManager/FileDetails.js.map +0 -1
- package/components/FileManager/FileManagerContext.d.ts +0 -42
- package/components/FileManager/FileManagerContext.js +0 -224
- package/components/FileManager/FileManagerContext.js.map +0 -1
- package/components/FileManager/FileManagerView.d.ts +0 -18
- package/components/FileManager/FileManagerView.js +0 -728
- package/components/FileManager/FileManagerView.js.map +0 -1
- package/components/FileManager/LeftSidebar.d.ts +0 -10
- package/components/FileManager/LeftSidebar.js +0 -127
- package/components/FileManager/LeftSidebar.js.map +0 -1
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -87
- package/components/FileManager/NoPermissionView.js.map +0 -1
- package/components/FileManager/NoResults.d.ts +0 -3
- package/components/FileManager/NoResults.js +0 -28
- package/components/FileManager/NoResults.js.map +0 -1
- package/components/FileManager/getFileTypePlugin.d.ts +0 -4
- package/components/FileManager/getFileTypePlugin.js +0 -57
- package/components/FileManager/getFileTypePlugin.js.map +0 -1
- package/components/FileManager/getFileUploader.d.ts +0 -3
- package/components/FileManager/getFileUploader.js +0 -20
- package/components/FileManager/getFileUploader.js.map +0 -1
- package/components/FileManager/graphql.d.ts +0 -96
- package/components/FileManager/graphql.js +0 -58
- package/components/FileManager/graphql.js.map +0 -1
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -7
- package/components/FileManager/outputFileSelectionError.js +0 -54
- package/components/FileManager/outputFileSelectionError.js.map +0 -1
- package/components/FileManager/types.d.ts +0 -21
- package/components/FileManager/types.js +0 -5
- package/components/FileManager/types.js.map +0 -1
- package/components/FileManager.d.ts +0 -67
- package/components/FileManager.js +0 -144
- package/components/FileManager.js.map +0 -1
- package/components/OverlayLayout/icons/close.svg +0 -13
- package/components/OverlayLayout/icons/navigate_before.svg +0 -16
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -63
- package/plugins/FileManagerFileTypePlugin.js.map +0 -1
- package/plugins/fileManager/fileDefault.d.ts +0 -2
- package/plugins/fileManager/fileDefault.js +0 -34
- package/plugins/fileManager/fileDefault.js.map +0 -1
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -83
- package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
- package/plugins/fileManager/fileImage/EditAction.js +0 -179
- package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
- package/plugins/fileManager/fileImage/index.d.ts +0 -2
- package/plugins/fileManager/fileImage/index.js +0 -46
- package/plugins/fileManager/fileImage/index.js.map +0 -1
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -21
- package/plugins/fileManager/index.js.map +0 -1
- package/plugins/globalSearch/SearchBar.d.ts +0 -15
- package/plugins/globalSearch/SearchBar.js +0 -273
- package/plugins/globalSearch/SearchBar.js.map +0 -1
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -23
- package/plugins/globalSearch/SearchBarDropdown.js +0 -101
- package/plugins/globalSearch/SearchBarDropdown.js.map +0 -1
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -7
- package/plugins/globalSearch/index.js +0 -16
- package/plugins/globalSearch/index.js.map +0 -1
- package/plugins/globalSearch/styled.d.ts +0 -11
- package/plugins/globalSearch/styled.js +0 -135
- package/plugins/globalSearch/styled.js.map +0 -1
- package/styles/material-theme-assignments.scss +0 -346
- package/styles/material.scss +0 -43
- package/styles/theme.scss +0 -46
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -41
- package/ui/views/AdminView/components/Snackbar.js.map +0 -1
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.make = exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
|
|
18
1
|
/**
|
|
19
2
|
* Class for working with UI:
|
|
20
3
|
* - rendering base structure
|
|
21
4
|
* - show/hide preview
|
|
22
5
|
* - apply tune view
|
|
23
6
|
*/
|
|
24
|
-
|
|
7
|
+
export default class Ui {
|
|
25
8
|
/**
|
|
26
9
|
* @param ui - image tool Ui module
|
|
27
10
|
* @param ui.api - Editor.js API
|
|
@@ -29,17 +12,12 @@ var Ui = /*#__PURE__*/function () {
|
|
|
29
12
|
* @param ui.onSelectFile - callback for clicks on Select file button
|
|
30
13
|
* @param ui.readOnly - read-only mode flag
|
|
31
14
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(0, _defineProperty2.default)(this, "api", void 0);
|
|
39
|
-
(0, _defineProperty2.default)(this, "config", void 0);
|
|
40
|
-
(0, _defineProperty2.default)(this, "readOnly", void 0);
|
|
41
|
-
(0, _defineProperty2.default)(this, "onSelectFile", void 0);
|
|
42
|
-
(0, _defineProperty2.default)(this, "nodes", void 0);
|
|
15
|
+
constructor({
|
|
16
|
+
api,
|
|
17
|
+
config,
|
|
18
|
+
onSelectFile,
|
|
19
|
+
readOnly
|
|
20
|
+
}) {
|
|
43
21
|
this.api = api;
|
|
44
22
|
this.config = config;
|
|
45
23
|
this.onSelectFile = onSelectFile;
|
|
@@ -53,6 +31,7 @@ var Ui = /*#__PURE__*/function () {
|
|
|
53
31
|
contentEditable: !this.readOnly
|
|
54
32
|
})
|
|
55
33
|
};
|
|
34
|
+
|
|
56
35
|
/**
|
|
57
36
|
* Create base structure
|
|
58
37
|
* <wrapper>
|
|
@@ -60,204 +39,176 @@ var Ui = /*#__PURE__*/function () {
|
|
|
60
39
|
* <caption />
|
|
61
40
|
* </wrapper>
|
|
62
41
|
*/
|
|
63
|
-
|
|
64
42
|
this.nodes.caption.dataset["placeholder"] = this.config.captionPlaceholder;
|
|
65
43
|
this.nodes.wrapper.appendChild(this.nodes.imageContainer);
|
|
66
44
|
this.nodes.wrapper.appendChild(this.nodes.caption);
|
|
67
45
|
this.nodes.wrapper.appendChild(this.nodes.fileButton);
|
|
68
46
|
}
|
|
47
|
+
|
|
69
48
|
/**
|
|
70
49
|
* CSS classes
|
|
71
50
|
*
|
|
72
51
|
* @returns {object}
|
|
73
52
|
*/
|
|
53
|
+
get CSS() {
|
|
54
|
+
return {
|
|
55
|
+
baseClass: this.api.styles.block,
|
|
56
|
+
input: this.api.styles.input,
|
|
57
|
+
button: this.api.styles.button,
|
|
58
|
+
/**
|
|
59
|
+
* Tool's classes
|
|
60
|
+
*/
|
|
61
|
+
wrapper: "image-tool",
|
|
62
|
+
imageContainer: "image-tool__image",
|
|
63
|
+
imageEl: "image-tool__image-picture",
|
|
64
|
+
caption: "image-tool__caption"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
74
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Ui statuses:
|
|
70
|
+
* - empty
|
|
71
|
+
* - filled
|
|
72
|
+
*
|
|
73
|
+
* @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}
|
|
74
|
+
*/
|
|
75
|
+
static get status() {
|
|
76
|
+
return {
|
|
77
|
+
EMPTY: "empty",
|
|
78
|
+
FILLED: "filled"
|
|
79
|
+
};
|
|
80
|
+
}
|
|
75
81
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* Tool's classes
|
|
86
|
-
*/
|
|
87
|
-
wrapper: "image-tool",
|
|
88
|
-
imageContainer: "image-tool__image",
|
|
89
|
-
imageEl: "image-tool__image-picture",
|
|
90
|
-
caption: "image-tool__caption"
|
|
91
|
-
};
|
|
82
|
+
/**
|
|
83
|
+
* Renders tool UI
|
|
84
|
+
*
|
|
85
|
+
* @param {ImageToolData} toolData - saved tool data
|
|
86
|
+
* @returns {Element}
|
|
87
|
+
*/
|
|
88
|
+
render(toolData) {
|
|
89
|
+
if (!toolData.file || Object.keys(toolData.file).length === 0) {
|
|
90
|
+
this.toggleStatus(Ui.status.EMPTY);
|
|
92
91
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
92
|
+
return this.nodes.wrapper;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Creates upload-file button
|
|
97
|
+
*
|
|
98
|
+
* @returns {Element}
|
|
99
|
+
*/
|
|
100
|
+
createFileButton() {
|
|
101
|
+
const button = make("div", [this.CSS.button]);
|
|
102
|
+
button.innerHTML = this.api.i18n.t("Select an Image");
|
|
103
|
+
button.addEventListener("click", () => {
|
|
104
|
+
this.onSelectFile();
|
|
105
|
+
});
|
|
106
|
+
return button;
|
|
107
|
+
}
|
|
100
108
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Shows an image
|
|
111
|
+
*
|
|
112
|
+
* @param {string} url - image source
|
|
113
|
+
* @returns {void}
|
|
114
|
+
*/
|
|
115
|
+
fillImage(url) {
|
|
104
116
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
* @param {ImageToolData} toolData - saved tool data
|
|
108
|
-
* @returns {Element}
|
|
117
|
+
* Check for a source extension to compose element correctly: video tag for mp4, img — for others
|
|
109
118
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
const tag = /\.mp4$/.test(url) ? "VIDEO" : "IMG";
|
|
120
|
+
const attributes = {
|
|
121
|
+
src: url
|
|
122
|
+
};
|
|
114
123
|
|
|
115
|
-
return this.nodes.wrapper;
|
|
116
|
-
}
|
|
117
124
|
/**
|
|
118
|
-
*
|
|
125
|
+
* We use eventName variable because IMG and VIDEO tags have different event to be called on source load
|
|
126
|
+
* - IMG: load
|
|
127
|
+
* - VIDEO: loadeddata
|
|
119
128
|
*
|
|
120
|
-
* @
|
|
129
|
+
* @type {string}
|
|
121
130
|
*/
|
|
131
|
+
let eventName = "load";
|
|
122
132
|
|
|
123
|
-
}, {
|
|
124
|
-
key: "createFileButton",
|
|
125
|
-
value: function createFileButton() {
|
|
126
|
-
var _this = this;
|
|
127
|
-
|
|
128
|
-
var button = make("div", [this.CSS.button]);
|
|
129
|
-
button.innerHTML = this.api.i18n.t("Select an Image");
|
|
130
|
-
button.addEventListener("click", function () {
|
|
131
|
-
_this.onSelectFile();
|
|
132
|
-
});
|
|
133
|
-
return button;
|
|
134
|
-
}
|
|
135
133
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* @param {string} url - image source
|
|
139
|
-
* @returns {void}
|
|
134
|
+
* Update attributes and eventName if source is a mp4 video
|
|
140
135
|
*/
|
|
141
|
-
|
|
142
|
-
}, {
|
|
143
|
-
key: "fillImage",
|
|
144
|
-
value: function fillImage(url) {
|
|
145
|
-
var _this2 = this;
|
|
146
|
-
|
|
136
|
+
if (tag === "VIDEO") {
|
|
147
137
|
/**
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
var tag = /\.mp4$/.test(url) ? "VIDEO" : "IMG";
|
|
151
|
-
var attributes = {
|
|
152
|
-
src: url
|
|
153
|
-
};
|
|
154
|
-
/**
|
|
155
|
-
* We use eventName variable because IMG and VIDEO tags have different event to be called on source load
|
|
156
|
-
* - IMG: load
|
|
157
|
-
* - VIDEO: loadeddata
|
|
138
|
+
* Add attributes for playing muted mp4 as a gif
|
|
158
139
|
*
|
|
159
|
-
* @type {
|
|
140
|
+
* @type {boolean}
|
|
160
141
|
*/
|
|
142
|
+
attributes.autoplay = true;
|
|
143
|
+
attributes.loop = true;
|
|
144
|
+
attributes.muted = true;
|
|
145
|
+
attributes.playsinline = true;
|
|
161
146
|
|
|
162
|
-
var eventName = "load";
|
|
163
147
|
/**
|
|
164
|
-
*
|
|
165
|
-
*/
|
|
166
|
-
|
|
167
|
-
if (tag === "VIDEO") {
|
|
168
|
-
/**
|
|
169
|
-
* Add attributes for playing muted mp4 as a gif
|
|
170
|
-
*
|
|
171
|
-
* @type {boolean}
|
|
172
|
-
*/
|
|
173
|
-
attributes.autoplay = true;
|
|
174
|
-
attributes.loop = true;
|
|
175
|
-
attributes.muted = true;
|
|
176
|
-
attributes.playsinline = true;
|
|
177
|
-
/**
|
|
178
|
-
* Change event to be listened
|
|
179
|
-
*
|
|
180
|
-
* @type {string}
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
eventName = "loadeddata";
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Compose tag with defined attributes
|
|
148
|
+
* Change event to be listened
|
|
187
149
|
*
|
|
188
|
-
* @type {
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);
|
|
193
|
-
/**
|
|
194
|
-
* Add load event listener
|
|
150
|
+
* @type {string}
|
|
195
151
|
*/
|
|
196
|
-
|
|
197
|
-
this.nodes.imageEl.addEventListener(eventName, function () {
|
|
198
|
-
_this2.toggleStatus(Ui.status.FILLED);
|
|
199
|
-
});
|
|
200
|
-
this.nodes.imageContainer.appendChild(this.nodes.imageEl);
|
|
152
|
+
eventName = "loadeddata";
|
|
201
153
|
}
|
|
154
|
+
|
|
202
155
|
/**
|
|
203
|
-
*
|
|
156
|
+
* Compose tag with defined attributes
|
|
204
157
|
*
|
|
205
|
-
* @
|
|
206
|
-
* @returns {void}
|
|
158
|
+
* @type {Element}
|
|
207
159
|
*/
|
|
160
|
+
this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);
|
|
208
161
|
|
|
209
|
-
}, {
|
|
210
|
-
key: "fillCaption",
|
|
211
|
-
value: function fillCaption(text) {
|
|
212
|
-
if (!this.nodes.caption) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
this.nodes.caption.innerHTML = text;
|
|
217
|
-
}
|
|
218
162
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* @param {string} status - see {@link Ui.status} constants
|
|
222
|
-
* @returns {void}
|
|
163
|
+
* Add load event listener
|
|
223
164
|
*/
|
|
165
|
+
this.nodes.imageEl.addEventListener(eventName, () => {
|
|
166
|
+
this.toggleStatus(Ui.status.FILLED);
|
|
167
|
+
});
|
|
168
|
+
this.nodes.imageContainer.appendChild(this.nodes.imageEl);
|
|
169
|
+
}
|
|
224
170
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
171
|
+
/**
|
|
172
|
+
* Shows caption input
|
|
173
|
+
*
|
|
174
|
+
* @param {string} text - caption text
|
|
175
|
+
* @returns {void}
|
|
176
|
+
*/
|
|
177
|
+
fillCaption(text) {
|
|
178
|
+
if (!this.nodes.caption) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
this.nodes.caption.innerHTML = text;
|
|
182
|
+
}
|
|
232
183
|
|
|
233
|
-
|
|
234
|
-
|
|
184
|
+
/**
|
|
185
|
+
* Changes UI status
|
|
186
|
+
*
|
|
187
|
+
* @param {string} status - see {@link Ui.status} constants
|
|
188
|
+
* @returns {void}
|
|
189
|
+
*/
|
|
190
|
+
toggleStatus(status) {
|
|
191
|
+
for (const statusType in Ui.status) {
|
|
192
|
+
if (Object.prototype.hasOwnProperty.call(Ui.status, statusType) === false) {
|
|
193
|
+
continue;
|
|
235
194
|
}
|
|
195
|
+
const newStatus = Ui.status[statusType];
|
|
196
|
+
this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${newStatus}`, status === newStatus);
|
|
236
197
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Apply visual representation of activated tune
|
|
202
|
+
*
|
|
203
|
+
* @param {string} tuneName - one of available tunes {@link Tunes.tunes}
|
|
204
|
+
* @param {boolean} status - true for enable, false for disable
|
|
205
|
+
* @returns {void}
|
|
206
|
+
*/
|
|
207
|
+
applyTune(tuneName, status) {
|
|
208
|
+
this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
244
211
|
|
|
245
|
-
}, {
|
|
246
|
-
key: "applyTune",
|
|
247
|
-
value: function applyTune(tuneName, status) {
|
|
248
|
-
this.nodes.wrapper.classList.toggle("".concat(this.CSS.wrapper, "--").concat(tuneName), status);
|
|
249
|
-
}
|
|
250
|
-
}], [{
|
|
251
|
-
key: "status",
|
|
252
|
-
get: function get() {
|
|
253
|
-
return {
|
|
254
|
-
EMPTY: "empty",
|
|
255
|
-
FILLED: "filled"
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
}]);
|
|
259
|
-
return Ui;
|
|
260
|
-
}();
|
|
261
212
|
/**
|
|
262
213
|
* Helper for making Elements with attributes
|
|
263
214
|
*
|
|
@@ -266,36 +217,29 @@ var Ui = /*#__PURE__*/function () {
|
|
|
266
217
|
* @param {object} attributes - any attributes
|
|
267
218
|
* @returns {HTMLElement}
|
|
268
219
|
*/
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
exports.default = Ui;
|
|
272
|
-
|
|
273
|
-
var make = function make(tagName) {
|
|
274
|
-
var classNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
275
|
-
var attributes = arguments.length > 2 ? arguments[2] : undefined;
|
|
276
|
-
var el = document.createElement(tagName);
|
|
277
|
-
|
|
220
|
+
export const make = function make(tagName, classNames = null, attributes) {
|
|
221
|
+
const element = document.createElement(tagName);
|
|
278
222
|
if (Array.isArray(classNames)) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
(_el$classList = el.classList).add.apply(_el$classList, (0, _toConsumableArray2.default)(classNames));
|
|
223
|
+
element.classList.add(...classNames);
|
|
282
224
|
} else if (classNames) {
|
|
283
|
-
|
|
225
|
+
element.classList.add(classNames);
|
|
284
226
|
}
|
|
285
|
-
|
|
286
227
|
if (!attributes) {
|
|
287
|
-
return
|
|
228
|
+
return element;
|
|
288
229
|
}
|
|
289
|
-
|
|
290
|
-
for (var attrName in attributes) {
|
|
230
|
+
for (const attrName in attributes) {
|
|
291
231
|
/**
|
|
292
232
|
* Unfortunately it is a problem to map attributes to element because element is complaining
|
|
293
233
|
* that attrName is a string, which cannot index the HTMLElement
|
|
294
234
|
*/
|
|
295
|
-
|
|
235
|
+
const key = attrName;
|
|
236
|
+
/**
|
|
237
|
+
* Error says that each key is a read-only property.
|
|
238
|
+
*/
|
|
239
|
+
// @ts-expect-error
|
|
240
|
+
element[key] = attributes[attrName];
|
|
296
241
|
}
|
|
297
|
-
|
|
298
|
-
return el;
|
|
242
|
+
return element;
|
|
299
243
|
};
|
|
300
244
|
|
|
301
|
-
|
|
245
|
+
//# sourceMappingURL=ui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ui","api","config","onSelectFile","readOnly","nodes","wrapper","make","CSS","baseClass","imageContainer","fileButton","createFileButton","imageEl","undefined","caption","input","contentEditable","dataset","captionPlaceholder","appendChild","styles","block","button","toolData","file","Object","keys","length","toggleStatus","status","EMPTY","innerHTML","i18n","t","addEventListener","url","tag","test","attributes","src","eventName","autoplay","loop","muted","playsinline","FILLED","text","statusType","prototype","hasOwnProperty","call","newStatus","classList","toggle","tuneName","tagName","classNames","el","document","createElement","Array","isArray","add","attrName"],"sources":["ui.ts"],"sourcesContent":["import { API } from \"@editorjs/editorjs\";\nimport { ImageToolConfig, ImageToolData } from \"./types\";\n\ninterface OnSelectFileCallable {\n (): void;\n}\ninterface UiStatus {\n EMPTY: \"empty\";\n FILLED: \"filled\";\n [key: string]: string;\n}\ninterface UiParams {\n api: API;\n config: ImageToolConfig;\n onSelectFile: OnSelectFileCallable;\n readOnly: boolean;\n}\n/**\n * Class for working with UI:\n * - rendering base structure\n * - show/hide preview\n * - apply tune view\n */\nexport default class Ui {\n private api: API;\n private config: ImageToolConfig;\n private readonly readOnly: boolean;\n private readonly onSelectFile: OnSelectFileCallable;\n\n public readonly nodes: {\n wrapper: HTMLElement;\n imageContainer: HTMLElement;\n fileButton: HTMLElement;\n imageEl?: HTMLElement;\n caption: HTMLElement;\n };\n\n /**\n * @param ui - image tool Ui module\n * @param ui.api - Editor.js API\n * @param ui.config - user config\n * @param ui.onSelectFile - callback for clicks on Select file button\n * @param ui.readOnly - read-only mode flag\n */\n constructor({ api, config, onSelectFile, readOnly }: UiParams) {\n this.api = api;\n this.config = config;\n this.onSelectFile = onSelectFile;\n this.readOnly = readOnly;\n this.nodes = {\n wrapper: make(\"div\", [this.CSS.baseClass, this.CSS.wrapper]),\n imageContainer: make(\"div\", [this.CSS.imageContainer]),\n fileButton: this.createFileButton(),\n imageEl: undefined,\n caption: make(\"div\", [this.CSS.input, this.CSS.caption], {\n contentEditable: !this.readOnly\n })\n };\n\n /**\n * Create base structure\n * <wrapper>\n * <image-container/>\n * <caption />\n * </wrapper>\n */\n this.nodes.caption.dataset[\"placeholder\"] = this.config.captionPlaceholder;\n this.nodes.wrapper.appendChild(this.nodes.imageContainer);\n this.nodes.wrapper.appendChild(this.nodes.caption);\n this.nodes.wrapper.appendChild(this.nodes.fileButton);\n }\n\n /**\n * CSS classes\n *\n * @returns {object}\n */\n get CSS() {\n return {\n baseClass: this.api.styles.block,\n input: this.api.styles.input,\n button: this.api.styles.button,\n\n /**\n * Tool's classes\n */\n wrapper: \"image-tool\",\n imageContainer: \"image-tool__image\",\n imageEl: \"image-tool__image-picture\",\n caption: \"image-tool__caption\"\n };\n }\n\n /**\n * Ui statuses:\n * - empty\n * - filled\n *\n * @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}\n */\n static get status(): UiStatus {\n return {\n EMPTY: \"empty\",\n FILLED: \"filled\"\n };\n }\n\n /**\n * Renders tool UI\n *\n * @param {ImageToolData} toolData - saved tool data\n * @returns {Element}\n */\n render(toolData: ImageToolData) {\n if (!toolData.file || Object.keys(toolData.file).length === 0) {\n this.toggleStatus(Ui.status.EMPTY);\n }\n\n return this.nodes.wrapper;\n }\n\n /**\n * Creates upload-file button\n *\n * @returns {Element}\n */\n createFileButton() {\n const button = make(\"div\", [this.CSS.button]);\n\n button.innerHTML = this.api.i18n.t(\"Select an Image\");\n\n button.addEventListener(\"click\", () => {\n this.onSelectFile();\n });\n\n return button;\n }\n\n /**\n * Shows an image\n *\n * @param {string} url - image source\n * @returns {void}\n */\n public fillImage(url: string): void {\n /**\n * Check for a source extension to compose element correctly: video tag for mp4, img — for others\n */\n const tag = /\\.mp4$/.test(url) ? \"VIDEO\" : \"IMG\";\n\n const attributes: any = {\n src: url\n };\n\n /**\n * We use eventName variable because IMG and VIDEO tags have different event to be called on source load\n * - IMG: load\n * - VIDEO: loadeddata\n *\n * @type {string}\n */\n let eventName = \"load\";\n\n /**\n * Update attributes and eventName if source is a mp4 video\n */\n if (tag === \"VIDEO\") {\n /**\n * Add attributes for playing muted mp4 as a gif\n *\n * @type {boolean}\n */\n attributes.autoplay = true;\n attributes.loop = true;\n attributes.muted = true;\n attributes.playsinline = true;\n\n /**\n * Change event to be listened\n *\n * @type {string}\n */\n eventName = \"loadeddata\";\n }\n\n /**\n * Compose tag with defined attributes\n *\n * @type {Element}\n */\n this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);\n\n /**\n * Add load event listener\n */\n this.nodes.imageEl.addEventListener(eventName, () => {\n this.toggleStatus(Ui.status.FILLED);\n });\n\n this.nodes.imageContainer.appendChild(this.nodes.imageEl);\n }\n\n /**\n * Shows caption input\n *\n * @param {string} text - caption text\n * @returns {void}\n */\n public fillCaption(text: string): void {\n if (!this.nodes.caption) {\n return;\n }\n this.nodes.caption.innerHTML = text;\n }\n\n /**\n * Changes UI status\n *\n * @param {string} status - see {@link Ui.status} constants\n * @returns {void}\n */\n public toggleStatus(status: string): void {\n for (const statusType in Ui.status) {\n if (Object.prototype.hasOwnProperty.call(Ui.status, statusType) === false) {\n continue;\n }\n const newStatus = Ui.status[statusType];\n this.nodes.wrapper.classList.toggle(\n `${this.CSS.wrapper}--${newStatus}`,\n status === newStatus\n );\n }\n }\n\n /**\n * Apply visual representation of activated tune\n *\n * @param {string} tuneName - one of available tunes {@link Tunes.tunes}\n * @param {boolean} status - true for enable, false for disable\n * @returns {void}\n */\n public applyTune(tuneName: string, status: boolean) {\n this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);\n }\n}\n\n/**\n * Helper for making Elements with attributes\n *\n * @param {string} tagName - new Element tag name\n * @param {Array|string} classNames - list or name of CSS class\n * @param {object} attributes - any attributes\n * @returns {HTMLElement}\n */\nexport const make = function make(\n tagName: string,\n classNames: string[] | string | null = null,\n attributes?: Record<string, string | number | boolean>\n): HTMLElement {\n const el: HTMLElement = document.createElement(tagName);\n\n if (Array.isArray(classNames)) {\n el.classList.add(...classNames);\n } else if (classNames) {\n el.classList.add(classNames);\n }\n\n if (!attributes) {\n return el;\n }\n for (const attrName in attributes) {\n /**\n * Unfortunately it is a problem to map attributes to element because element is complaining\n * that attrName is a string, which cannot index the HTMLElement\n */\n (el as any)[attrName] = (attributes as any)[attrName];\n }\n\n return el;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;IACqBA,E;EAcjB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,kBAA+D;IAAA,IAAjDC,GAAiD,QAAjDA,GAAiD;IAAA,IAA5CC,MAA4C,QAA5CA,MAA4C;IAAA,IAApCC,YAAoC,QAApCA,YAAoC;IAAA,IAAtBC,QAAsB,QAAtBA,QAAsB;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAC3D,KAAKH,GAAL,GAAWA,GAAX;IACA,KAAKC,MAAL,GAAcA,MAAd;IACA,KAAKC,YAAL,GAAoBA,YAApB;IACA,KAAKC,QAAL,GAAgBA,QAAhB;IACA,KAAKC,KAAL,GAAa;MACTC,OAAO,EAAEC,IAAI,CAAC,KAAD,EAAQ,CAAC,KAAKC,GAAL,CAASC,SAAV,EAAqB,KAAKD,GAAL,CAASF,OAA9B,CAAR,CADJ;MAETI,cAAc,EAAEH,IAAI,CAAC,KAAD,EAAQ,CAAC,KAAKC,GAAL,CAASE,cAAV,CAAR,CAFX;MAGTC,UAAU,EAAE,KAAKC,gBAAL,EAHH;MAITC,OAAO,EAAEC,SAJA;MAKTC,OAAO,EAAER,IAAI,CAAC,KAAD,EAAQ,CAAC,KAAKC,GAAL,CAASQ,KAAV,EAAiB,KAAKR,GAAL,CAASO,OAA1B,CAAR,EAA4C;QACrDE,eAAe,EAAE,CAAC,KAAKb;MAD8B,CAA5C;IALJ,CAAb;IAUA;AACR;AACA;AACA;AACA;AACA;AACA;;IACQ,KAAKC,KAAL,CAAWU,OAAX,CAAmBG,OAAnB,CAA2B,aAA3B,IAA4C,KAAKhB,MAAL,CAAYiB,kBAAxD;IACA,KAAKd,KAAL,CAAWC,OAAX,CAAmBc,WAAnB,CAA+B,KAAKf,KAAL,CAAWK,cAA1C;IACA,KAAKL,KAAL,CAAWC,OAAX,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L,EAAiB;IACb,OAAOmB,EAAP;EACH;;EACD,KAAK,IAAMM,QAAX,IAAuBzB,UAAvB,EAAmC;IAC/B;AACR;AACA;AACA;IACSmB,EAAD,CAAYM,QAAZ,IAAyBzB,UAAD,CAAoByB,QAApB,CAAxB;EACH;;EAED,OAAON,EAAP;AACH,CAzBM"}
|
|
1
|
+
{"version":3,"names":["Ui","constructor","api","config","onSelectFile","readOnly","nodes","wrapper","make","CSS","baseClass","imageContainer","fileButton","createFileButton","imageEl","undefined","caption","input","contentEditable","dataset","captionPlaceholder","appendChild","styles","block","button","status","EMPTY","FILLED","render","toolData","file","Object","keys","length","toggleStatus","innerHTML","i18n","t","addEventListener","fillImage","url","tag","test","attributes","src","eventName","autoplay","loop","muted","playsinline","fillCaption","text","statusType","prototype","hasOwnProperty","call","newStatus","classList","toggle","applyTune","tuneName","tagName","classNames","element","document","createElement","Array","isArray","add","attrName","key"],"sources":["ui.ts"],"sourcesContent":["import type { API } from \"@editorjs/editorjs\";\nimport type { ImageToolConfig, ImageToolData } from \"./types\";\n\ninterface OnSelectFileCallable {\n (): void;\n}\ninterface UiStatus {\n EMPTY: \"empty\";\n FILLED: \"filled\";\n [key: string]: string;\n}\ninterface UiParams {\n api: API;\n config: ImageToolConfig;\n onSelectFile: OnSelectFileCallable;\n readOnly: boolean;\n}\n/**\n * Class for working with UI:\n * - rendering base structure\n * - show/hide preview\n * - apply tune view\n */\nexport default class Ui {\n private api: API;\n private config: ImageToolConfig;\n private readonly readOnly: boolean;\n private readonly onSelectFile: OnSelectFileCallable;\n\n public readonly nodes: {\n wrapper: HTMLElement;\n imageContainer: HTMLElement;\n fileButton: HTMLElement;\n imageEl?: HTMLElement;\n caption: HTMLElement;\n };\n\n /**\n * @param ui - image tool Ui module\n * @param ui.api - Editor.js API\n * @param ui.config - user config\n * @param ui.onSelectFile - callback for clicks on Select file button\n * @param ui.readOnly - read-only mode flag\n */\n constructor({ api, config, onSelectFile, readOnly }: UiParams) {\n this.api = api;\n this.config = config;\n this.onSelectFile = onSelectFile;\n this.readOnly = readOnly;\n this.nodes = {\n wrapper: make(\"div\", [this.CSS.baseClass, this.CSS.wrapper]),\n imageContainer: make(\"div\", [this.CSS.imageContainer]),\n fileButton: this.createFileButton(),\n imageEl: undefined,\n caption: make(\"div\", [this.CSS.input, this.CSS.caption], {\n contentEditable: !this.readOnly\n })\n };\n\n /**\n * Create base structure\n * <wrapper>\n * <image-container/>\n * <caption />\n * </wrapper>\n */\n this.nodes.caption.dataset[\"placeholder\"] = this.config.captionPlaceholder;\n this.nodes.wrapper.appendChild(this.nodes.imageContainer);\n this.nodes.wrapper.appendChild(this.nodes.caption);\n this.nodes.wrapper.appendChild(this.nodes.fileButton);\n }\n\n /**\n * CSS classes\n *\n * @returns {object}\n */\n get CSS() {\n return {\n baseClass: this.api.styles.block,\n input: this.api.styles.input,\n button: this.api.styles.button,\n\n /**\n * Tool's classes\n */\n wrapper: \"image-tool\",\n imageContainer: \"image-tool__image\",\n imageEl: \"image-tool__image-picture\",\n caption: \"image-tool__caption\"\n };\n }\n\n /**\n * Ui statuses:\n * - empty\n * - filled\n *\n * @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}\n */\n static get status(): UiStatus {\n return {\n EMPTY: \"empty\",\n FILLED: \"filled\"\n };\n }\n\n /**\n * Renders tool UI\n *\n * @param {ImageToolData} toolData - saved tool data\n * @returns {Element}\n */\n render(toolData: ImageToolData) {\n if (!toolData.file || Object.keys(toolData.file).length === 0) {\n this.toggleStatus(Ui.status.EMPTY);\n }\n\n return this.nodes.wrapper;\n }\n\n /**\n * Creates upload-file button\n *\n * @returns {Element}\n */\n createFileButton() {\n const button = make(\"div\", [this.CSS.button]);\n\n button.innerHTML = this.api.i18n.t(\"Select an Image\");\n\n button.addEventListener(\"click\", () => {\n this.onSelectFile();\n });\n\n return button;\n }\n\n /**\n * Shows an image\n *\n * @param {string} url - image source\n * @returns {void}\n */\n public fillImage(url: string): void {\n /**\n * Check for a source extension to compose element correctly: video tag for mp4, img — for others\n */\n const tag = /\\.mp4$/.test(url) ? \"VIDEO\" : \"IMG\";\n\n const attributes: any = {\n src: url\n };\n\n /**\n * We use eventName variable because IMG and VIDEO tags have different event to be called on source load\n * - IMG: load\n * - VIDEO: loadeddata\n *\n * @type {string}\n */\n let eventName = \"load\";\n\n /**\n * Update attributes and eventName if source is a mp4 video\n */\n if (tag === \"VIDEO\") {\n /**\n * Add attributes for playing muted mp4 as a gif\n *\n * @type {boolean}\n */\n attributes.autoplay = true;\n attributes.loop = true;\n attributes.muted = true;\n attributes.playsinline = true;\n\n /**\n * Change event to be listened\n *\n * @type {string}\n */\n eventName = \"loadeddata\";\n }\n\n /**\n * Compose tag with defined attributes\n *\n * @type {Element}\n */\n this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);\n\n /**\n * Add load event listener\n */\n this.nodes.imageEl.addEventListener(eventName, () => {\n this.toggleStatus(Ui.status.FILLED);\n });\n\n this.nodes.imageContainer.appendChild(this.nodes.imageEl);\n }\n\n /**\n * Shows caption input\n *\n * @param {string} text - caption text\n * @returns {void}\n */\n public fillCaption(text: string): void {\n if (!this.nodes.caption) {\n return;\n }\n this.nodes.caption.innerHTML = text;\n }\n\n /**\n * Changes UI status\n *\n * @param {string} status - see {@link Ui.status} constants\n * @returns {void}\n */\n public toggleStatus(status: string): void {\n for (const statusType in Ui.status) {\n if (Object.prototype.hasOwnProperty.call(Ui.status, statusType) === false) {\n continue;\n }\n const newStatus = Ui.status[statusType];\n this.nodes.wrapper.classList.toggle(\n `${this.CSS.wrapper}--${newStatus}`,\n status === newStatus\n );\n }\n }\n\n /**\n * Apply visual representation of activated tune\n *\n * @param {string} tuneName - one of available tunes {@link Tunes.tunes}\n * @param {boolean} status - true for enable, false for disable\n * @returns {void}\n */\n public applyTune(tuneName: string, status: boolean) {\n this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);\n }\n}\n\n/**\n * Helper for making Elements with attributes\n *\n * @param {string} tagName - new Element tag name\n * @param {Array|string} classNames - list or name of CSS class\n * @param {object} attributes - any attributes\n * @returns {HTMLElement}\n */\nexport const make = function make(\n tagName: string,\n classNames: string[] | string | null = null,\n attributes?: Record<string, string | number | boolean>\n): HTMLElement {\n const element: HTMLElement = document.createElement(tagName);\n\n if (Array.isArray(classNames)) {\n element.classList.add(...classNames);\n } else if (classNames) {\n element.classList.add(classNames);\n }\n\n if (!attributes) {\n return element;\n }\n for (const attrName in attributes) {\n /**\n * Unfortunately it is a problem to map attributes to element because element is complaining\n * that attrName is a string, which cannot index the HTMLElement\n */\n const key = attrName as keyof HTMLElement;\n /**\n * Error says that each key is a read-only property.\n */\n // @ts-expect-error\n element[key] = attributes[attrName];\n }\n\n return element;\n};\n"],"mappings":"AAiBA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMA,EAAE,CAAC;EAcpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAAC;IAAEC,GAAG;IAAEC,MAAM;IAAEC,YAAY;IAAEC;EAAmB,CAAC,EAAE;IAC3D,IAAI,CAACH,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,KAAK,GAAG;MACTC,OAAO,EAAEC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACC,SAAS,EAAE,IAAI,CAACD,GAAG,CAACF,OAAO,CAAC,CAAC;MAC5DI,cAAc,EAAEH,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACE,cAAc,CAAC,CAAC;MACtDC,UAAU,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAC;MACnCC,OAAO,EAAEC,SAAS;MAClBC,OAAO,EAAER,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACQ,KAAK,EAAE,IAAI,CAACR,GA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EACnF;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMjB,IAAI,GAAG,SAASA,IAAIA,CAC7BqD,OAAe,EACfC,UAAoC,GAAG,IAAI,EAC3CnB,UAAsD,EAC3C;EACX,MAAMoB,OAAoB,GAAGC,QAAQ,CAACC,aAAa,CAACJ,OAAO,CAAC;EAE5D,IAAIK,KAAK,CAACC,OAAO,CAACL,UAAU,CAAC,EAAE;IAC3BC,OAAO,CAACN,SAAS,CAACW,GAAG,CAAC,GAAGN,UAAU,CAAC;EACxC,CAAC,MAAM,IAAIA,UAAU,EAAE;IACnBC,OAAO,CAACN,SAAS,CAACW,GAAG,CAACN,UAAU,CAAC;EACrC;EAEA,IAAI,CAACnB,UAAU,EAAE;IACb,OAAOoB,OAAO;EAClB;EACA,KAAK,MAAMM,QAAQ,IAAI1B,UAAU,EAAE;IAC/B;AACR;AACA;AACA;IACQ,MAAM2B,GAAG,GAAGD,QAA6B;IACzC;AACR;AACA;IACQ;IACAN,OAAO,CAACO,GAAG,CAAC,GAAG3B,UAAU,CAAC0B,QAAQ,CAAC;EACvC;EAEA,OAAON,OAAO;AAClB,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { Alignment, TextAlign } from "../utils";
|
|
1
|
+
import type { PasteEvent } from "@editorjs/editorjs";
|
|
2
|
+
import type { Alignment } from "../utils";
|
|
3
|
+
import { TextAlign } from "../utils";
|
|
5
4
|
/**
|
|
6
5
|
* @typedef {object} ParagraphConfig
|
|
7
6
|
* @property {string} placeholder - placeholder for the empty paragraph
|