@webiny/app-admin 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
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/slack-logo.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.d.ts +7 -0
- package/base/Admin.js +28 -0
- package/base/Admin.js.map +1 -0
- 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 +2 -0
- package/base/Base.js +14 -0
- package/base/Base.js.map +1 -0
- 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 +8 -0
- package/base/plugins/AddGraphQLQuerySelection.js +18 -0
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -0
- 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 +13 -0
- package/base/providers/ApolloProvider.js +16 -0
- package/base/providers/ApolloProvider.js.map +1 -0
- package/base/providers/TelemetryProvider.d.ts +1 -0
- package/base/providers/TelemetryProvider.js +22 -0
- package/base/providers/TelemetryProvider.js.map +1 -0
- 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 -0
- package/base/providers/UiStateProvider.js +14 -0
- package/base/providers/UiStateProvider.js.map +1 -0
- package/base/providers/ViewCompositionProvider.d.ts +21 -0
- package/base/providers/ViewCompositionProvider.js +47 -0
- package/base/providers/ViewCompositionProvider.js.map +1 -0
- package/base/ui/Brand.d.ts +39 -0
- package/base/ui/Brand.js +8 -0
- package/base/ui/Brand.js.map +1 -0
- package/base/ui/CenteredView.d.ts +24 -0
- package/base/ui/CenteredView.js +15 -0
- package/base/ui/CenteredView.js.map +1 -0
- package/base/ui/Dashboard.d.ts +39 -0
- package/base/ui/Dashboard.js +8 -0
- package/base/ui/Dashboard.js.map +1 -0
- 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 +45 -0
- package/base/ui/Layout.js +11 -0
- package/base/ui/Layout.js.map +1 -0
- package/base/ui/LocaleSelector.d.ts +39 -0
- package/base/ui/LocaleSelector.js +8 -0
- package/base/ui/LocaleSelector.js.map +1 -0
- package/base/ui/LoginScreen.d.ts +25 -0
- package/base/ui/LoginScreen.js +25 -0
- package/base/ui/LoginScreen.js.map +1 -0
- package/base/ui/Logo.d.ts +39 -0
- package/base/ui/Logo.js +8 -0
- package/base/ui/Logo.js.map +1 -0
- package/base/ui/Navigation.d.ts +40 -0
- package/base/ui/Navigation.js +19 -0
- package/base/ui/Navigation.js.map +1 -0
- package/base/ui/NotFound.d.ts +39 -0
- package/base/ui/NotFound.js +8 -0
- package/base/ui/NotFound.js.map +1 -0
- package/base/ui/Tags.d.ts +10 -0
- package/base/ui/Tags.js +20 -0
- package/base/ui/Tags.js.map +1 -0
- 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 +80 -0
- package/base/ui/UserMenu.js +19 -0
- package/base/ui/UserMenu.js.map +1 -0
- package/components/AdminLayout.d.ts +2 -2
- package/components/AdminLayout.js +12 -35
- package/components/AdminLayout.js.map +1 -0
- package/components/AppInstaller/AppInstaller.d.ts +11 -0
- package/components/AppInstaller/AppInstaller.js +113 -0
- package/components/AppInstaller/AppInstaller.js.map +1 -0
- package/components/AppInstaller/Sidebar.d.ts +8 -6
- package/components/AppInstaller/Sidebar.js +65 -115
- package/components/AppInstaller/Sidebar.js.map +1 -0
- package/components/AppInstaller/index.d.ts +2 -5
- package/components/AppInstaller/index.js +16 -133
- package/components/AppInstaller/index.js.map +1 -0
- package/components/AppInstaller/styled.d.ts +16 -4
- package/components/AppInstaller/styled.js +61 -59
- package/components/AppInstaller/styled.js.map +1 -0
- package/components/AppInstaller/useInstaller.d.ts +23 -9
- package/components/AppInstaller/useInstaller.js +105 -215
- package/components/AppInstaller/useInstaller.js.map +1 -0
- 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 +6 -5
- package/components/EmptyView.js +29 -50
- package/components/EmptyView.js.map +1 -0
- 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 +5 -2
- package/components/FloatingActionButton.js +5 -4
- package/components/FloatingActionButton.js.map +1 -0
- 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 +13 -4
- package/components/MultiImageUpload.js +13 -17
- package/components/MultiImageUpload.js.map +1 -0
- 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 +7 -20
- package/components/OverlayLayout/OverlayLayout.js +41 -153
- package/components/OverlayLayout/OverlayLayout.js.map +1 -0
- 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.d.ts +1 -1
- package/components/OverlayLayout/index.js +3 -1
- package/components/OverlayLayout/index.js.map +1 -0
- 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 +7 -5
- package/components/Permissions/Permissions.js +27 -22
- package/components/Permissions/Permissions.js.map +1 -0
- 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 +7 -6
- package/components/Permissions/StyledComponents.js +13 -17
- package/components/Permissions/StyledComponents.js.map +1 -0
- package/components/Permissions/index.d.ts +2 -0
- package/components/Permissions/index.js +5 -1
- package/components/Permissions/index.js.map +1 -0
- 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 +3 -3
- package/components/RichTextEditor/RichTextEditor.js +14 -13
- package/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/components/RichTextEditor/index.js +3 -1
- package/components/RichTextEditor/index.js.map +1 -0
- package/components/RichTextEditor/styles.scss +39 -7
- package/components/RichTextEditor/tools/header/index.d.ts +35 -35
- package/components/RichTextEditor/tools/header/index.js +454 -570
- package/components/RichTextEditor/tools/header/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/index.d.ts +38 -13
- package/components/RichTextEditor/tools/image/index.js +145 -200
- package/components/RichTextEditor/tools/image/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/svgs.js +6 -4
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -0
- package/components/RichTextEditor/tools/image/tunes.d.ts +12 -15
- package/components/RichTextEditor/tools/image/tunes.js +74 -105
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -0
- package/components/RichTextEditor/tools/image/types.d.ts +29 -0
- package/components/RichTextEditor/tools/image/types.js +3 -0
- package/components/RichTextEditor/tools/image/types.js.map +1 -0
- package/components/RichTextEditor/tools/image/ui.d.ts +36 -27
- package/components/RichTextEditor/tools/image/ui.js +164 -200
- package/components/RichTextEditor/tools/image/ui.js.map +1 -0
- package/components/RichTextEditor/tools/paragraph/index.d.ts +34 -37
- package/components/RichTextEditor/tools/paragraph/index.js +340 -425
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -0
- package/components/RichTextEditor/tools/textColor/index.d.ts +31 -28
- package/components/RichTextEditor/tools/textColor/index.js +164 -199
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -0
- package/components/RichTextEditor/tools/utils.d.ts +1 -1
- package/components/RichTextEditor/tools/utils.js +8 -8
- package/components/RichTextEditor/tools/utils.js.map +1 -0
- package/components/Routes.d.ts +6 -0
- package/components/Routes.js +34 -0
- package/components/Routes.js.map +1 -0
- package/components/SearchUI.d.ts +6 -4
- package/components/SearchUI.js +23 -53
- package/components/SearchUI.js.map +1 -0
- package/components/SimpleForm/SimpleForm.d.ts +23 -12
- package/components/SimpleForm/SimpleForm.js +74 -68
- package/components/SimpleForm/SimpleForm.js.map +1 -0
- package/components/SimpleForm/index.js +3 -1
- package/components/SimpleForm/index.js.map +1 -0
- package/components/SimpleUI/InputField.d.ts +6 -3
- package/components/SimpleUI/InputField.js +34 -36
- package/components/SimpleUI/InputField.js.map +1 -0
- package/components/SingleImageUpload.d.ts +63 -15
- package/components/SingleImageUpload.js +61 -101
- package/components/SingleImageUpload.js.map +1 -0
- package/components/SplitView/SplitView.d.ts +11 -8
- package/components/SplitView/SplitView.js +51 -70
- package/components/SplitView/SplitView.js.map +1 -0
- package/components/SplitView/index.js +3 -1
- package/components/SplitView/index.js.map +1 -0
- 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 +5 -1
- package/components/index.js.map +1 -0
- 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 +10 -5
- package/hooks/useConfirmationDialog.js +27 -29
- package/hooks/useConfirmationDialog.js.map +1 -0
- package/hooks/useDialog.d.ts +27 -3
- package/hooks/useDialog.js +16 -15
- package/hooks/useDialog.js.map +1 -0
- 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 +7 -3
- package/hooks/useSnackbar.js +26 -19
- package/hooks/useSnackbar.js.map +1 -0
- 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 +47 -0
- package/index.js +53 -0
- package/index.js.map +1 -0
- package/package.json +70 -60
- package/plugins/MenuPlugin.d.ts +23 -6
- package/plugins/MenuPlugin.js +15 -37
- package/plugins/MenuPlugin.js.map +1 -0
- package/plugins/PermissionRendererPlugin.d.ts +4 -4
- package/plugins/PermissionRendererPlugin.js +15 -37
- package/plugins/PermissionRendererPlugin.js.map +1 -0
- package/plugins/uiLayoutRenderer/index.d.ts +1 -2
- package/plugins/uiLayoutRenderer/index.js +39 -49
- package/plugins/uiLayoutRenderer/index.js.map +1 -0
- package/styles.scss +7 -2
- package/types.d.ts +67 -85
- package/types.js +7 -1
- package/types.js.map +1 -0
- package/ui/UIElement.d.ts +1 -1
- package/ui/UIElement.js +3 -1
- package/ui/UIElement.js.map +1 -0
- package/ui/UILayout.js +3 -1
- package/ui/UILayout.js.map +1 -0
- package/ui/UIRenderer.js +3 -1
- package/ui/UIRenderer.js.map +1 -0
- package/ui/UIView.d.ts +1 -1
- package/ui/UIView.js +3 -1
- package/ui/UIView.js.map +1 -0
- package/ui/elements/AccordionElement.d.ts +6 -5
- package/ui/elements/AccordionElement.js +41 -79
- package/ui/elements/AccordionElement.js.map +1 -0
- package/ui/elements/ButtonElement.d.ts +7 -6
- package/ui/elements/ButtonElement.js +41 -67
- package/ui/elements/ButtonElement.js.map +1 -0
- package/ui/elements/ButtonGroupElement.d.ts +2 -1
- package/ui/elements/ButtonGroupElement.js +22 -41
- package/ui/elements/ButtonGroupElement.js.map +1 -0
- package/ui/elements/GenericElement.js +3 -1
- package/ui/elements/GenericElement.js.map +1 -0
- package/ui/elements/LabelElement.d.ts +3 -2
- package/ui/elements/LabelElement.js +15 -39
- package/ui/elements/LabelElement.js.map +1 -0
- package/ui/elements/NavigationMenuElement.d.ts +6 -4
- package/ui/elements/NavigationMenuElement.js +70 -140
- package/ui/elements/NavigationMenuElement.js.map +1 -0
- package/ui/elements/PanelElement.js +2 -15
- package/ui/elements/PanelElement.js.map +1 -0
- package/ui/elements/PlaceholderElement.d.ts +2 -1
- package/ui/elements/PlaceholderElement.js +8 -27
- package/ui/elements/PlaceholderElement.js.map +1 -0
- package/ui/elements/SmallButtonElement.d.ts +5 -3
- package/ui/elements/SmallButtonElement.js +15 -38
- package/ui/elements/SmallButtonElement.js.map +1 -0
- package/ui/elements/TypographyElement.d.ts +4 -3
- package/ui/elements/TypographyElement.js +18 -44
- package/ui/elements/TypographyElement.js.map +1 -0
- package/ui/elements/ViewElement.js +3 -1
- package/ui/elements/ViewElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +3 -2
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +20 -38
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement.d.ts +22 -20
- package/ui/elements/form/DynamicFieldsetElement.js +86 -116
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +6 -20
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +34 -59
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +65 -87
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/styled.d.ts +22 -13
- package/ui/elements/form/FileManagerElement/styled.js +86 -84
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -0
- package/ui/elements/form/FileManagerElement.d.ts +9 -8
- package/ui/elements/form/FileManagerElement.js +41 -86
- package/ui/elements/form/FileManagerElement.js.map +1 -0
- package/ui/elements/form/FormElement.d.ts +7 -6
- package/ui/elements/form/FormElement.js +15 -40
- package/ui/elements/form/FormElement.js.map +1 -0
- package/ui/elements/form/FormFieldElement.d.ts +14 -12
- package/ui/elements/form/FormFieldElement.js +99 -169
- package/ui/elements/form/FormFieldElement.js.map +1 -0
- package/ui/elements/form/HiddenElement.d.ts +2 -1
- package/ui/elements/form/HiddenElement.js +20 -44
- package/ui/elements/form/HiddenElement.js.map +1 -0
- package/ui/elements/form/InputElement.d.ts +3 -1
- package/ui/elements/form/InputElement.js +26 -49
- package/ui/elements/form/InputElement.js.map +1 -0
- package/ui/elements/form/PasswordElement.d.ts +1 -1
- package/ui/elements/form/PasswordElement.js +24 -45
- package/ui/elements/form/PasswordElement.js.map +1 -0
- package/ui/elements/form/SelectElement.d.ts +3 -2
- package/ui/elements/form/SelectElement.js +36 -65
- package/ui/elements/form/SelectElement.js.map +1 -0
- package/ui/elements/form/TextareaElement.d.ts +3 -2
- package/ui/elements/form/TextareaElement.js +28 -50
- package/ui/elements/form/TextareaElement.js.map +1 -0
- package/ui/views/AdminView/ContentElement.js +28 -53
- package/ui/views/AdminView/ContentElement.js.map +1 -0
- package/ui/views/AdminView/HeaderElement.js +49 -92
- package/ui/views/AdminView/HeaderElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -0
- package/ui/views/AdminView/components/Dialog.d.ts +1 -1
- package/ui/views/AdminView/components/Dialog.js +34 -33
- package/ui/views/AdminView/components/Dialog.js.map +1 -0
- package/ui/views/AdminView/components/Hamburger.d.ts +2 -2
- package/ui/views/AdminView/components/Hamburger.js +7 -9
- package/ui/views/AdminView/components/Hamburger.js.map +1 -0
- package/ui/views/FormView/FormContainerElement.d.ts +4 -3
- package/ui/views/FormView/FormContainerElement.js +14 -46
- package/ui/views/FormView/FormContainerElement.js.map +1 -0
- package/ui/views/FormView/FormContentElement.d.ts +3 -0
- package/ui/views/FormView/FormContentElement.js +7 -14
- package/ui/views/FormView/FormContentElement.js.map +1 -0
- package/ui/views/FormView/FormFooterElement.d.ts +4 -3
- package/ui/views/FormView/FormFooterElement.js +9 -44
- package/ui/views/FormView/FormFooterElement.js.map +1 -0
- package/ui/views/FormView/FormHeaderElement.d.ts +5 -4
- package/ui/views/FormView/FormHeaderElement.js +25 -76
- package/ui/views/FormView/FormHeaderElement.js.map +1 -0
- package/ui/views/FormView.d.ts +4 -4
- package/ui/views/FormView.js +99 -138
- package/ui/views/FormView.js.map +1 -0
- package/ui/views/OverlayView/ContentElement.d.ts +2 -1
- package/ui/views/OverlayView/ContentElement.js +22 -35
- package/ui/views/OverlayView/ContentElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderElement.d.ts +6 -5
- package/ui/views/OverlayView/HeaderElement.js +58 -101
- package/ui/views/OverlayView/HeaderElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +5 -3
- package/ui/views/OverlayView/HeaderTitleElement.js +18 -47
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -0
- package/ui/views/OverlayView/useOverlayView.d.ts +4 -5
- package/ui/views/OverlayView/useOverlayView.js +12 -16
- package/ui/views/OverlayView/useOverlayView.js.map +1 -0
- package/ui/views/OverlayView.d.ts +4 -5
- package/ui/views/OverlayView.js +76 -143
- package/ui/views/OverlayView.js.map +1 -0
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +3 -2
- package/ui/views/SplitView/SplitViewPanelElement.js +25 -65
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -0
- package/ui/views/SplitView.d.ts +4 -4
- package/ui/views/SplitView.js +51 -107
- package/ui/views/SplitView.js.map +1 -0
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -35
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -47
- package/components/FileManager/BottomInfoBar.d.ts +0 -3
- package/components/FileManager/BottomInfoBar.js +0 -42
- package/components/FileManager/DropFilesHere.d.ts +0 -8
- package/components/FileManager/DropFilesHere.js +0 -58
- package/components/FileManager/File.d.ts +0 -18
- package/components/FileManager/File.js +0 -129
- package/components/FileManager/FileDetails/Name.d.ts +0 -6
- package/components/FileManager/FileDetails/Name.js +0 -113
- package/components/FileManager/FileDetails/Tags.d.ts +0 -6
- package/components/FileManager/FileDetails/Tags.js +0 -241
- package/components/FileManager/FileDetails.d.ts +0 -23
- package/components/FileManager/FileDetails.js +0 -392
- package/components/FileManager/FileManagerContext.d.ts +0 -23
- package/components/FileManager/FileManagerContext.js +0 -174
- package/components/FileManager/FileManagerView.d.ts +0 -23
- package/components/FileManager/FileManagerView.js +0 -632
- package/components/FileManager/LeftSidebar.d.ts +0 -8
- package/components/FileManager/LeftSidebar.js +0 -95
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -70
- package/components/FileManager/NoResults.d.ts +0 -2
- package/components/FileManager/NoResults.js +0 -13
- package/components/FileManager/getFileTypePlugin.d.ts +0 -1
- package/components/FileManager/getFileTypePlugin.js +0 -27
- package/components/FileManager/getFileUploader.d.ts +0 -2
- package/components/FileManager/getFileUploader.js +0 -10
- package/components/FileManager/graphql.d.ts +0 -6
- package/components/FileManager/graphql.js +0 -17
- 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 -2
- package/components/FileManager/outputFileSelectionError.js +0 -39
- package/components/FileManager.d.ts +0 -18
- package/components/FileManager.js +0 -133
- 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 -46
- package/plugins/fileManager/fileDefault.d.ts +0 -3
- package/plugins/fileManager/fileDefault.js +0 -20
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -3
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -62
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -9
- package/plugins/fileManager/fileImage/EditAction.js +0 -143
- package/plugins/fileManager/fileImage/index.d.ts +0 -3
- package/plugins/fileManager/fileImage/index.js +0 -29
- 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 -3
- package/plugins/globalSearch/SearchBar.d.ts +0 -3
- package/plugins/globalSearch/SearchBar.js +0 -241
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -5
- package/plugins/globalSearch/SearchBarDropdown.js +0 -82
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -8
- package/plugins/globalSearch/index.js +0 -30
- package/plugins/globalSearch/styled.d.ts +0 -9
- package/plugins/globalSearch/styled.js +0 -115
- package/plugins/index.d.ts +0 -6
- package/plugins/index.js +0 -8
- package/plugins/logo/Logo.d.ts +0 -22
- package/plugins/logo/Logo.js +0 -108
- package/plugins/logo/index.d.ts +0 -5
- package/plugins/logo/index.js +0 -32
- package/plugins/menu/documentation.d.ts +0 -4
- package/plugins/menu/documentation.js +0 -16
- package/plugins/menu/fileManager.d.ts +0 -4
- package/plugins/menu/fileManager.js +0 -64
- package/plugins/menu/index.d.ts +0 -6
- package/plugins/menu/index.js +0 -24
- package/plugins/menu/renderers/MenuGroupRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuGroupRenderer.js +0 -126
- package/plugins/menu/renderers/MenuLinkRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuLinkRenderer.js +0 -52
- package/plugins/menu/renderers/MenuSectionItemRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionItemRenderer.js +0 -77
- package/plugins/menu/renderers/MenuSectionRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionRenderer.js +0 -51
- package/plugins/menu/slack.d.ts +0 -4
- package/plugins/menu/slack.js +0 -16
- package/plugins/menu/source.d.ts +0 -4
- package/plugins/menu/source.js +0 -16
- package/plugins/userMenu/UserMenuElement.d.ts +0 -7
- package/plugins/userMenu/UserMenuElement.js +0 -43
- package/plugins/userMenu/UserMenuRenderer.d.ts +0 -6
- package/plugins/userMenu/UserMenuRenderer.js +0 -47
- package/plugins/userMenu/index.d.ts +0 -4
- package/plugins/userMenu/index.js +0 -16
- package/styles/material-theme-assignments.scss +0 -333
- package/styles/material.scss +0 -74
- package/styles/theme.scss +0 -43
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -28
- package/ui/views/AdminView.d.ts +0 -12
- package/ui/views/AdminView.js +0 -90
- package/ui/views/NavigationView/ContentElement.d.ts +0 -10
- package/ui/views/NavigationView/ContentElement.js +0 -86
- package/ui/views/NavigationView/FooterElement.d.ts +0 -13
- package/ui/views/NavigationView/FooterElement.js +0 -57
- package/ui/views/NavigationView/HeaderElement.d.ts +0 -16
- package/ui/views/NavigationView/HeaderElement.js +0 -66
- package/ui/views/NavigationView/NavigationViewRenderer.d.ts +0 -6
- package/ui/views/NavigationView/NavigationViewRenderer.js +0 -38
- package/ui/views/NavigationView/Styled.d.ts +0 -7
- package/ui/views/NavigationView/Styled.js +0 -47
- package/ui/views/NavigationView/legacyMenu.d.ts +0 -22
- package/ui/views/NavigationView/legacyMenu.js +0 -1
- package/ui/views/NavigationView/useNavigation.d.ts +0 -6
- package/ui/views/NavigationView/useNavigation.js +0 -22
- package/ui/views/NavigationView.d.ts +0 -26
- package/ui/views/NavigationView.js +0 -204
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
1
|
import { ALIGNMENTS, ALIGNMENT_ICONS, TextAlign } from "../utils";
|
|
5
|
-
|
|
6
|
-
var Header = /*#__PURE__*/function () {
|
|
2
|
+
class Header {
|
|
7
3
|
/**
|
|
8
4
|
* Render plugin`s main Element and fill it with saved data
|
|
9
5
|
*
|
|
@@ -13,84 +9,64 @@ var Header = /*#__PURE__*/function () {
|
|
|
13
9
|
* api - Editor.js API
|
|
14
10
|
* readOnly - read only mode flag
|
|
15
11
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_classCallCheck(this, Header);
|
|
23
|
-
|
|
24
|
-
_defineProperty(this, "api", void 0);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "readOnly", void 0);
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "settingsButtons", void 0);
|
|
29
|
-
|
|
30
|
-
_defineProperty(this, "_CSS", void 0);
|
|
31
|
-
|
|
32
|
-
_defineProperty(this, "_settings", void 0);
|
|
33
|
-
|
|
34
|
-
_defineProperty(this, "_data", void 0);
|
|
35
|
-
|
|
36
|
-
_defineProperty(this, "_element", void 0);
|
|
37
|
-
|
|
38
|
-
_defineProperty(this, "alignments", void 0);
|
|
39
|
-
|
|
40
|
-
_defineProperty(this, "typography", void 0);
|
|
41
|
-
|
|
12
|
+
constructor({
|
|
13
|
+
data,
|
|
14
|
+
config,
|
|
15
|
+
api,
|
|
16
|
+
readOnly
|
|
17
|
+
}) {
|
|
42
18
|
this.api = api;
|
|
43
19
|
this.readOnly = readOnly;
|
|
44
20
|
this.alignments = ALIGNMENTS;
|
|
45
21
|
/**
|
|
46
22
|
* Import typography from theme
|
|
47
23
|
*/
|
|
48
|
-
|
|
49
24
|
this.typography = config.typography || null;
|
|
25
|
+
|
|
50
26
|
/**
|
|
51
27
|
* Styles
|
|
52
28
|
*
|
|
53
29
|
* @type {object}
|
|
54
30
|
*/
|
|
55
|
-
|
|
56
31
|
this._CSS = {
|
|
57
32
|
block: this.api.styles.block,
|
|
58
33
|
settingsButton: this.api.styles.settingsButton,
|
|
59
34
|
settingsButtonActive: this.api.styles.settingsButtonActive,
|
|
60
35
|
wrapper: "ce-header"
|
|
61
36
|
};
|
|
37
|
+
|
|
62
38
|
/**
|
|
63
39
|
* Tool's settings passed from Editor
|
|
64
40
|
*
|
|
65
41
|
* @type {HeaderConfig}
|
|
66
42
|
* @private
|
|
67
43
|
*/
|
|
68
|
-
|
|
69
44
|
this._settings = config;
|
|
45
|
+
|
|
70
46
|
/**
|
|
71
47
|
* Block's data
|
|
72
48
|
*
|
|
73
49
|
* @type {HeaderData}
|
|
74
50
|
* @private
|
|
75
51
|
*/
|
|
76
|
-
|
|
77
52
|
this._data = this.normalizeData(data);
|
|
53
|
+
|
|
78
54
|
/**
|
|
79
55
|
* List of settings buttons
|
|
80
56
|
*
|
|
81
57
|
* @type {HTMLElement[]}
|
|
82
58
|
*/
|
|
83
|
-
|
|
84
59
|
this.settingsButtons = [];
|
|
60
|
+
|
|
85
61
|
/**
|
|
86
62
|
* Main Block wrapper
|
|
87
63
|
*
|
|
88
64
|
* @type {HTMLElement}
|
|
89
65
|
* @private
|
|
90
66
|
*/
|
|
91
|
-
|
|
92
67
|
this._element = this.getTag();
|
|
93
68
|
}
|
|
69
|
+
|
|
94
70
|
/**
|
|
95
71
|
* Normalize input data
|
|
96
72
|
*
|
|
@@ -99,633 +75,541 @@ var Header = /*#__PURE__*/function () {
|
|
|
99
75
|
* @returns {HeaderData}
|
|
100
76
|
* @private
|
|
101
77
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
value: function normalizeData(data) {
|
|
107
|
-
var newData = {};
|
|
108
|
-
|
|
109
|
-
if (typeof data !== "object") {
|
|
110
|
-
data = {};
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
newData.text = data.text || "";
|
|
114
|
-
newData.level = parseInt(data.level) || this.defaultLevel.number;
|
|
115
|
-
newData.textAlign = data.textAlign || TextAlign.START;
|
|
116
|
-
return newData;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Return Tool's view
|
|
120
|
-
*
|
|
121
|
-
* @returns {HTMLHeadingElement}
|
|
122
|
-
* @public
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
}, {
|
|
126
|
-
key: "render",
|
|
127
|
-
value: function render() {
|
|
128
|
-
return this._element;
|
|
78
|
+
normalizeData(data) {
|
|
79
|
+
const newData = {};
|
|
80
|
+
if (typeof data !== "object") {
|
|
81
|
+
data = {};
|
|
129
82
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
83
|
+
newData.text = data.text || "";
|
|
84
|
+
newData.level = parseInt(data.level) || this.defaultLevel.number;
|
|
85
|
+
newData.textAlign = data.textAlign || TextAlign.START;
|
|
86
|
+
return newData;
|
|
87
|
+
}
|
|
135
88
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
89
|
+
/**
|
|
90
|
+
* Return Tool's view
|
|
91
|
+
*
|
|
92
|
+
* @returns {HTMLHeadingElement}
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
render() {
|
|
96
|
+
return this._element;
|
|
97
|
+
}
|
|
140
98
|
|
|
141
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Create Block's settings block
|
|
101
|
+
*
|
|
102
|
+
* @returns {HTMLElement}
|
|
103
|
+
*/
|
|
104
|
+
renderSettings() {
|
|
105
|
+
const holder = document.createElement("DIV");
|
|
142
106
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
/** Add type selectors */
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
this.levels.forEach(function (level) {
|
|
150
|
-
var selectTypeButton = document.createElement("SPAN");
|
|
151
|
-
selectTypeButton.classList.add(_this._CSS.settingsButton);
|
|
152
|
-
/**
|
|
153
|
-
* Highlight current level button
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
|
-
if (_this.currentLevel.number === level.number) {
|
|
157
|
-
selectTypeButton.classList.add(_this._CSS.settingsButtonActive);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Add SVG icon
|
|
161
|
-
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
selectTypeButton.innerHTML = level.svg;
|
|
165
|
-
/**
|
|
166
|
-
* Save level to its button
|
|
167
|
-
*/
|
|
168
|
-
|
|
169
|
-
selectTypeButton.dataset.level = level.number + "";
|
|
170
|
-
/**
|
|
171
|
-
* Set up click handler
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
selectTypeButton.addEventListener("click", function () {
|
|
175
|
-
_this.setLevel(level.number);
|
|
176
|
-
});
|
|
177
|
-
/**
|
|
178
|
-
* Append settings button to holder
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
|
-
holder.appendChild(selectTypeButton);
|
|
182
|
-
/**
|
|
183
|
-
* Save settings buttons
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
_this.settingsButtons.push(selectTypeButton);
|
|
187
|
-
});
|
|
188
|
-
/**
|
|
189
|
-
* Add alignment selectors
|
|
190
|
-
* */
|
|
191
|
-
|
|
192
|
-
this.alignments.forEach(function (alignment) {
|
|
193
|
-
var selectTypeButton = document.createElement("SPAN");
|
|
194
|
-
selectTypeButton.classList.add(_this._CSS.settingsButton);
|
|
195
|
-
/**
|
|
196
|
-
* Highlight current level button
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
if (_this.currentAlignment.name === alignment.name) {
|
|
200
|
-
selectTypeButton.classList.add(_this._CSS.settingsButtonActive);
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Add SVG icon
|
|
204
|
-
*/
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
selectTypeButton.innerHTML = alignment.svg;
|
|
208
|
-
/**
|
|
209
|
-
* Save alignment to its button
|
|
210
|
-
*/
|
|
211
|
-
|
|
212
|
-
selectTypeButton.dataset.textAlign = alignment.name;
|
|
213
|
-
/**
|
|
214
|
-
* Set up click handler
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
selectTypeButton.addEventListener("click", function () {
|
|
218
|
-
_this.setAlignment(alignment);
|
|
219
|
-
});
|
|
220
|
-
/**
|
|
221
|
-
* Append settings button to holder
|
|
222
|
-
*/
|
|
223
|
-
|
|
224
|
-
holder.appendChild(selectTypeButton);
|
|
225
|
-
/**
|
|
226
|
-
* Save settings buttons
|
|
227
|
-
*/
|
|
228
|
-
|
|
229
|
-
_this.settingsButtons.push(selectTypeButton);
|
|
230
|
-
});
|
|
107
|
+
// do not add settings button, when only one level is configured
|
|
108
|
+
if (this.levels.length <= 1) {
|
|
231
109
|
return holder;
|
|
232
110
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Callback for Block's settings buttons
|
|
235
|
-
*
|
|
236
|
-
* @param {number} level - level to set
|
|
237
|
-
*/
|
|
238
111
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
112
|
+
/** Add type selectors */
|
|
113
|
+
this.levels.forEach(level => {
|
|
114
|
+
const selectTypeButton = document.createElement("SPAN");
|
|
115
|
+
selectTypeButton.classList.add(this._CSS.settingsButton);
|
|
243
116
|
|
|
244
|
-
this.data = {
|
|
245
|
-
level: level,
|
|
246
|
-
text: this.data.text
|
|
247
|
-
};
|
|
248
117
|
/**
|
|
249
|
-
* Highlight
|
|
118
|
+
* Highlight current level button
|
|
250
119
|
*/
|
|
120
|
+
if (this.currentLevel.number === level.number) {
|
|
121
|
+
selectTypeButton.classList.add(this._CSS.settingsButtonActive);
|
|
122
|
+
}
|
|
251
123
|
|
|
252
|
-
this.settingsButtons.forEach(function (button) {
|
|
253
|
-
button.classList.toggle(_this2._CSS.settingsButtonActive, parseInt(button.dataset.level) === level);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Callback for Block's settings buttons
|
|
258
|
-
*
|
|
259
|
-
* @param {number} alignment - level to set
|
|
260
|
-
*/
|
|
261
|
-
|
|
262
|
-
}, {
|
|
263
|
-
key: "setAlignment",
|
|
264
|
-
value: function setAlignment(alignment) {
|
|
265
|
-
var _this3 = this;
|
|
266
|
-
|
|
267
|
-
this.data = {
|
|
268
|
-
textAlign: alignment.name,
|
|
269
|
-
text: this.data.text,
|
|
270
|
-
level: this.data.level
|
|
271
|
-
};
|
|
272
124
|
/**
|
|
273
|
-
*
|
|
125
|
+
* Add SVG icon
|
|
274
126
|
*/
|
|
127
|
+
selectTypeButton.innerHTML = level.svg;
|
|
275
128
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Method that specified how to merge two Text blocks.
|
|
282
|
-
* Called by Editor.js by backspace at the beginning of the Block
|
|
283
|
-
*
|
|
284
|
-
* @param {HeaderData} data - saved data to merger with current block
|
|
285
|
-
* @public
|
|
286
|
-
*/
|
|
287
|
-
|
|
288
|
-
}, {
|
|
289
|
-
key: "merge",
|
|
290
|
-
value: function merge(data) {
|
|
291
|
-
var newData = {
|
|
292
|
-
text: this.data.text + data.text,
|
|
293
|
-
level: this.data.level,
|
|
294
|
-
alignment: this.data.alignment
|
|
295
|
-
};
|
|
296
|
-
this.data = newData;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Validate Text block data:
|
|
300
|
-
* - check for emptiness
|
|
301
|
-
*
|
|
302
|
-
* @param {HeaderData} blockData — data received after saving
|
|
303
|
-
* @returns {boolean} false if saved data is not correct, otherwise true
|
|
304
|
-
* @public
|
|
305
|
-
*/
|
|
306
|
-
|
|
307
|
-
}, {
|
|
308
|
-
key: "validate",
|
|
309
|
-
value: function validate(blockData) {
|
|
310
|
-
return blockData.text.trim() !== "";
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Extract Tool's data from the view
|
|
314
|
-
*
|
|
315
|
-
* @param {HTMLHeadingElement} toolsContent - Text tools rendered view
|
|
316
|
-
* @returns {HeaderData} - saved data
|
|
317
|
-
* @public
|
|
318
|
-
*/
|
|
319
|
-
|
|
320
|
-
}, {
|
|
321
|
-
key: "save",
|
|
322
|
-
value: function save(toolsContent) {
|
|
323
|
-
return {
|
|
324
|
-
text: toolsContent.innerHTML,
|
|
325
|
-
level: this.currentLevel.number,
|
|
326
|
-
textAlign: this.getTextAlign(toolsContent.className),
|
|
327
|
-
className: toolsContent.className
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* Extract textAlign from className
|
|
332
|
-
*
|
|
333
|
-
* @param {string} className - heading element className
|
|
334
|
-
* @returns {TextAlign} textAlign
|
|
335
|
-
*/
|
|
336
|
-
|
|
337
|
-
}, {
|
|
338
|
-
key: "getTextAlign",
|
|
339
|
-
value: function getTextAlign(className) {
|
|
340
|
-
var textAlign = TextAlign.START; // Match className with alignment
|
|
129
|
+
/**
|
|
130
|
+
* Save level to its button
|
|
131
|
+
*/
|
|
132
|
+
selectTypeButton.dataset["level"] = level.number + "";
|
|
341
133
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Set up click handler
|
|
136
|
+
*/
|
|
137
|
+
selectTypeButton.addEventListener("click", () => {
|
|
138
|
+
this.setLevel(level.number);
|
|
346
139
|
});
|
|
347
|
-
return textAlign;
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Allow Header to be converted to/from other blocks
|
|
351
|
-
*/
|
|
352
140
|
|
|
353
|
-
}, {
|
|
354
|
-
key: "data",
|
|
355
|
-
get:
|
|
356
|
-
/**
|
|
357
|
-
* Get current Tools`s data
|
|
358
|
-
*
|
|
359
|
-
* @returns {HeaderData} Current data
|
|
360
|
-
* @private
|
|
361
|
-
*/
|
|
362
|
-
function get() {
|
|
363
|
-
this._data.text = this._element.innerHTML;
|
|
364
|
-
this._data.level = this.currentLevel.number;
|
|
365
|
-
this._data.textAlign = this.currentAlignment.name;
|
|
366
|
-
return this._data;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* Store data in plugin:
|
|
370
|
-
* - at the this._data property
|
|
371
|
-
* - at the HTML
|
|
372
|
-
*
|
|
373
|
-
* @param {HeaderData} data — data to set
|
|
374
|
-
* @private
|
|
375
|
-
*/
|
|
376
|
-
,
|
|
377
|
-
set: function set(data) {
|
|
378
|
-
this._data = this.normalizeData(data);
|
|
379
141
|
/**
|
|
380
|
-
*
|
|
381
|
-
* then replace it to a new block
|
|
142
|
+
* Append settings button to holder
|
|
382
143
|
*/
|
|
144
|
+
holder.appendChild(selectTypeButton);
|
|
383
145
|
|
|
384
|
-
if (data.level !== undefined && this._element.parentNode) {
|
|
385
|
-
/**
|
|
386
|
-
* Create a new tag
|
|
387
|
-
*
|
|
388
|
-
* @type {HTMLHeadingElement}
|
|
389
|
-
*/
|
|
390
|
-
var newHeader = this.getTag();
|
|
391
|
-
/**
|
|
392
|
-
* Save Block's content
|
|
393
|
-
*/
|
|
394
|
-
|
|
395
|
-
newHeader.innerHTML = this._element.innerHTML;
|
|
396
|
-
/**
|
|
397
|
-
* Replace blocks
|
|
398
|
-
*/
|
|
399
|
-
|
|
400
|
-
this._element.parentNode.replaceChild(newHeader, this._element);
|
|
401
|
-
/**
|
|
402
|
-
* Save new block to private variable
|
|
403
|
-
*
|
|
404
|
-
* @type {HTMLHeadingElement}
|
|
405
|
-
* @private
|
|
406
|
-
*/
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
this._element = newHeader;
|
|
410
|
-
}
|
|
411
146
|
/**
|
|
412
|
-
*
|
|
147
|
+
* Save settings buttons
|
|
413
148
|
*/
|
|
149
|
+
this.settingsButtons.push(selectTypeButton);
|
|
150
|
+
});
|
|
414
151
|
|
|
415
|
-
|
|
416
|
-
if (data.text !== undefined) {
|
|
417
|
-
this._element.innerHTML = this._data.text || "";
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
152
|
/**
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}, {
|
|
428
|
-
key: "getTag",
|
|
429
|
-
value: function getTag() {
|
|
430
|
-
var _this4 = this;
|
|
153
|
+
* Add alignment selectors
|
|
154
|
+
* */
|
|
155
|
+
this.alignments.forEach(alignment => {
|
|
156
|
+
const selectTypeButton = document.createElement("SPAN");
|
|
157
|
+
selectTypeButton.classList.add(this._CSS.settingsButton);
|
|
431
158
|
|
|
432
159
|
/**
|
|
433
|
-
*
|
|
160
|
+
* Highlight current level button
|
|
434
161
|
*/
|
|
435
|
-
|
|
162
|
+
if (this.currentAlignment.name === alignment.name) {
|
|
163
|
+
selectTypeButton.classList.add(this._CSS.settingsButtonActive);
|
|
164
|
+
}
|
|
165
|
+
|
|
436
166
|
/**
|
|
437
|
-
* Add
|
|
167
|
+
* Add SVG icon
|
|
438
168
|
*/
|
|
169
|
+
selectTypeButton.innerHTML = alignment.svg;
|
|
439
170
|
|
|
440
|
-
tag.innerHTML = this._data.text || "";
|
|
441
171
|
/**
|
|
442
|
-
*
|
|
172
|
+
* Save alignment to its button
|
|
443
173
|
*/
|
|
174
|
+
selectTypeButton.dataset["textAlign"] = alignment.name;
|
|
444
175
|
|
|
445
|
-
if (this.typography) {
|
|
446
|
-
var component = this.currentLevel.tag.toLowerCase();
|
|
447
|
-
var typographyConfig = this.typography[component];
|
|
448
|
-
tag.classList.add(typographyConfig.className);
|
|
449
|
-
} else {
|
|
450
|
-
/**
|
|
451
|
-
* Add styles class
|
|
452
|
-
*/
|
|
453
|
-
tag.classList.add(this._CSS.wrapper);
|
|
454
|
-
}
|
|
455
176
|
/**
|
|
456
|
-
*
|
|
177
|
+
* Set up click handler
|
|
457
178
|
*/
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
this.alignments.forEach(function (alignment) {
|
|
461
|
-
var textAlignClass = "ce-header-text--".concat(alignment.name);
|
|
462
|
-
|
|
463
|
-
if (alignment.name === _this4._data.textAlign) {
|
|
464
|
-
tag.classList.add(textAlignClass);
|
|
465
|
-
} else {
|
|
466
|
-
tag.classList.remove(textAlignClass);
|
|
467
|
-
}
|
|
179
|
+
selectTypeButton.addEventListener("click", () => {
|
|
180
|
+
this.setAlignment(alignment);
|
|
468
181
|
});
|
|
182
|
+
|
|
469
183
|
/**
|
|
470
|
-
*
|
|
184
|
+
* Append settings button to holder
|
|
471
185
|
*/
|
|
186
|
+
holder.appendChild(selectTypeButton);
|
|
472
187
|
|
|
473
|
-
tag.contentEditable = this.readOnly ? "false" : "true";
|
|
474
188
|
/**
|
|
475
|
-
*
|
|
189
|
+
* Save settings buttons
|
|
476
190
|
*/
|
|
191
|
+
this.settingsButtons.push(selectTypeButton);
|
|
192
|
+
});
|
|
193
|
+
return holder;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Callback for Block's settings buttons
|
|
198
|
+
*
|
|
199
|
+
* @param {number} level - level to set
|
|
200
|
+
*/
|
|
201
|
+
setLevel(level) {
|
|
202
|
+
this.data = {
|
|
203
|
+
level: level,
|
|
204
|
+
text: this.data.text
|
|
205
|
+
};
|
|
477
206
|
|
|
478
|
-
tag.dataset.placeholder = this.api.i18n.t(this._settings.placeholder || "");
|
|
479
|
-
return tag;
|
|
480
|
-
}
|
|
481
207
|
/**
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
* @returns {level}
|
|
208
|
+
* Highlight button by selected level
|
|
485
209
|
*/
|
|
210
|
+
this.settingsButtons.forEach(button => {
|
|
211
|
+
button.classList.toggle(this._CSS.settingsButtonActive, parseInt(button.dataset.level) === level);
|
|
212
|
+
});
|
|
213
|
+
}
|
|
486
214
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
}
|
|
215
|
+
/**
|
|
216
|
+
* Callback for Block's settings buttons
|
|
217
|
+
*
|
|
218
|
+
* @param {number} alignment - level to set
|
|
219
|
+
*/
|
|
220
|
+
setAlignment(alignment) {
|
|
221
|
+
this.data = {
|
|
222
|
+
textAlign: alignment.name,
|
|
223
|
+
text: this.data.text,
|
|
224
|
+
level: this.data.level
|
|
225
|
+
};
|
|
499
226
|
|
|
500
|
-
return level;
|
|
501
|
-
}
|
|
502
227
|
/**
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
* @returns {alignment}
|
|
228
|
+
* Highlight button by selected level
|
|
506
229
|
*/
|
|
230
|
+
this.settingsButtons.forEach(button => {
|
|
231
|
+
button.classList.toggle(this._CSS.settingsButtonActive, button.dataset.textAlign === alignment.name);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
507
234
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
235
|
+
/**
|
|
236
|
+
* Method that specified how to merge two Text blocks.
|
|
237
|
+
* Called by Editor.js by backspace at the beginning of the Block
|
|
238
|
+
*
|
|
239
|
+
* @param {HeaderData} data - saved data to merger with current block
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
242
|
+
merge(data) {
|
|
243
|
+
this.data = {
|
|
244
|
+
text: this.data.text + data.text,
|
|
245
|
+
level: this.data.level,
|
|
246
|
+
alignment: this.data.alignment
|
|
247
|
+
};
|
|
248
|
+
}
|
|
512
249
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
250
|
+
/**
|
|
251
|
+
* Validate Text block data:
|
|
252
|
+
* - check for emptiness
|
|
253
|
+
*
|
|
254
|
+
* @param {HeaderData} blockData — data received after saving
|
|
255
|
+
* @returns {boolean} false if saved data is not correct, otherwise true
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
validate(blockData) {
|
|
259
|
+
return blockData.text.trim() !== "";
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Extract Tool's data from the view
|
|
264
|
+
*
|
|
265
|
+
* @param {HTMLHeadingElement} toolsContent - Text tools rendered view
|
|
266
|
+
* @returns {HeaderData} - saved data
|
|
267
|
+
* @public
|
|
268
|
+
*/
|
|
269
|
+
save(toolsContent) {
|
|
270
|
+
return {
|
|
271
|
+
text: toolsContent.innerHTML,
|
|
272
|
+
level: this.currentLevel.number,
|
|
273
|
+
textAlign: this.getTextAlign(toolsContent.className),
|
|
274
|
+
className: toolsContent.className
|
|
275
|
+
};
|
|
276
|
+
}
|
|
516
277
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
278
|
+
/**
|
|
279
|
+
* Extract textAlign from className
|
|
280
|
+
*
|
|
281
|
+
* @param {string} className - heading element className
|
|
282
|
+
* @returns {TextAlign} textAlign
|
|
283
|
+
*/
|
|
284
|
+
getTextAlign(className) {
|
|
285
|
+
let textAlign = TextAlign.START;
|
|
286
|
+
// Match className with alignment
|
|
287
|
+
this.alignments.forEach(alignment => {
|
|
288
|
+
if (className.includes(`ce-header-text--${alignment.name}`)) {
|
|
289
|
+
textAlign = alignment.name;
|
|
522
290
|
}
|
|
291
|
+
});
|
|
292
|
+
return textAlign;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Allow Header to be converted to/from other blocks
|
|
297
|
+
*/
|
|
298
|
+
static get conversionConfig() {
|
|
299
|
+
return {
|
|
300
|
+
export: "text",
|
|
301
|
+
// use 'text' property for other blocks
|
|
302
|
+
import: "text" // fill 'text' property from other block's export string
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Sanitizer Rules
|
|
308
|
+
*/
|
|
309
|
+
static get sanitize() {
|
|
310
|
+
return {
|
|
311
|
+
level: false,
|
|
312
|
+
text: {}
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Returns true to notify core that read-only is supported
|
|
318
|
+
*
|
|
319
|
+
* @returns {boolean}
|
|
320
|
+
*/
|
|
321
|
+
static get isReadOnlySupported() {
|
|
322
|
+
return true;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Get current Tools`s data
|
|
327
|
+
*
|
|
328
|
+
* @returns {HeaderData} Current data
|
|
329
|
+
* @private
|
|
330
|
+
*/
|
|
331
|
+
get data() {
|
|
332
|
+
this._data.text = this._element.innerHTML;
|
|
333
|
+
this._data.level = this.currentLevel.number;
|
|
334
|
+
this._data.textAlign = this.currentAlignment.name;
|
|
335
|
+
return this._data;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Store data in plugin:
|
|
340
|
+
* - at the this._data property
|
|
341
|
+
* - at the HTML
|
|
342
|
+
*
|
|
343
|
+
* @param {HeaderData} data — data to set
|
|
344
|
+
* @private
|
|
345
|
+
*/
|
|
346
|
+
set data(data) {
|
|
347
|
+
this._data = this.normalizeData(data);
|
|
523
348
|
|
|
524
|
-
return alignment;
|
|
525
|
-
}
|
|
526
349
|
/**
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* @returns {level}
|
|
350
|
+
* If level is set and block in DOM
|
|
351
|
+
* then replace it to a new block
|
|
530
352
|
*/
|
|
353
|
+
if (data.level !== undefined && this._element.parentNode) {
|
|
354
|
+
/**
|
|
355
|
+
* Create a new tag
|
|
356
|
+
*
|
|
357
|
+
* @type {HTMLHeadingElement}
|
|
358
|
+
*/
|
|
359
|
+
const newHeader = this.getTag();
|
|
531
360
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Save Block's content
|
|
363
|
+
*/
|
|
364
|
+
newHeader.innerHTML = this._element.innerHTML;
|
|
536
365
|
|
|
537
366
|
/**
|
|
538
|
-
*
|
|
367
|
+
* Replace blocks
|
|
539
368
|
*/
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
return levelItem.number === _this7._settings.defaultLevel;
|
|
543
|
-
});
|
|
544
|
-
|
|
545
|
-
if (userSpecified) {
|
|
546
|
-
return userSpecified;
|
|
547
|
-
} else {
|
|
548
|
-
console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels");
|
|
549
|
-
}
|
|
550
|
-
}
|
|
369
|
+
this._element.parentNode.replaceChild(newHeader, this._element);
|
|
370
|
+
|
|
551
371
|
/**
|
|
552
|
-
*
|
|
372
|
+
* Save new block to private variable
|
|
553
373
|
*
|
|
554
|
-
* @type {
|
|
374
|
+
* @type {HTMLHeadingElement}
|
|
375
|
+
* @private
|
|
555
376
|
*/
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
return this.levels[1];
|
|
377
|
+
this._element = newHeader;
|
|
559
378
|
}
|
|
379
|
+
|
|
560
380
|
/**
|
|
561
|
-
*
|
|
562
|
-
* @property {number} number - level number
|
|
563
|
-
* @property {string} tag - tag corresponds with level number
|
|
564
|
-
* @property {string} svg - icon
|
|
381
|
+
* If data.text was passed then update block's content
|
|
565
382
|
*/
|
|
383
|
+
if (data.text !== undefined) {
|
|
384
|
+
this._element.innerHTML = this._data.text || "";
|
|
385
|
+
}
|
|
386
|
+
}
|
|
566
387
|
|
|
388
|
+
/**
|
|
389
|
+
* Get tag for target level
|
|
390
|
+
* By default returns second-leveled header
|
|
391
|
+
*
|
|
392
|
+
* @returns {HTMLElement}
|
|
393
|
+
*/
|
|
394
|
+
getTag() {
|
|
567
395
|
/**
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
* @returns {level[]}
|
|
396
|
+
* Create element for current Block's level
|
|
571
397
|
*/
|
|
398
|
+
const tag = document.createElement(this.currentLevel.tag);
|
|
572
399
|
|
|
573
|
-
}, {
|
|
574
|
-
key: "levels",
|
|
575
|
-
get: function get() {
|
|
576
|
-
var _this8 = this;
|
|
577
|
-
|
|
578
|
-
var availableLevels = [{
|
|
579
|
-
number: 1,
|
|
580
|
-
tag: "H1",
|
|
581
|
-
svg: '<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.14 1.494V4.98h4.62V1.494c0-.498.098-.871.293-1.12A.927.927 0 0 1 7.82 0c.322 0 .583.123.782.37.2.246.3.62.3 1.124v9.588c0 .503-.101.88-.303 1.128a.957.957 0 0 1-.779.374.921.921 0 0 1-.77-.378c-.193-.251-.29-.626-.29-1.124V6.989H2.14v4.093c0 .503-.1.88-.302 1.128a.957.957 0 0 1-.778.374.921.921 0 0 1-.772-.378C.096 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.285.374A.922.922 0 0 1 1.06 0c.321 0 .582.123.782.37.199.246.299.62.299 1.124zm11.653 9.985V5.27c-1.279.887-2.14 1.33-2.583 1.33a.802.802 0 0 1-.563-.228.703.703 0 0 1-.245-.529c0-.232.08-.402.241-.511.161-.11.446-.25.854-.424.61-.259 1.096-.532 1.462-.818a5.84 5.84 0 0 0 .97-.962c.282-.355.466-.573.552-.655.085-.082.246-.123.483-.123.267 0 .481.093.642.28.161.186.242.443.242.77v7.813c0 .914-.345 1.371-1.035 1.371-.307 0-.554-.093-.74-.28-.187-.186-.28-.461-.28-.825z"/></svg>'
|
|
582
|
-
}, {
|
|
583
|
-
number: 2,
|
|
584
|
-
tag: "H2",
|
|
585
|
-
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm10.99 9.288h3.527c.351 0 .62.072.804.216.185.144.277.34.277.588 0 .22-.073.408-.22.56-.146.154-.368.23-.665.23h-4.972c-.338 0-.601-.093-.79-.28a.896.896 0 0 1-.284-.659c0-.162.06-.377.182-.645s.255-.478.399-.631a38.617 38.617 0 0 1 1.621-1.598c.482-.444.827-.735 1.034-.875.369-.261.676-.523.922-.787.245-.263.432-.534.56-.81.129-.278.193-.549.193-.815 0-.288-.069-.546-.206-.773a1.428 1.428 0 0 0-.56-.53 1.618 1.618 0 0 0-.774-.19c-.59 0-1.054.26-1.392.777-.045.068-.12.252-.226.554-.106.302-.225.534-.358.696-.133.162-.328.243-.585.243a.76.76 0 0 1-.56-.223c-.149-.148-.223-.351-.223-.608 0-.31.07-.635.21-.972.139-.338.347-.645.624-.92a3.093 3.093 0 0 1 1.054-.665c.426-.169.924-.253 1.496-.253.69 0 1.277.108 1.764.324.315.144.592.343.83.595.24.252.425.544.558.875.133.33.2.674.2 1.03 0 .558-.14 1.066-.416 1.523-.277.457-.56.815-.848 1.074-.288.26-.771.666-1.45 1.22-.677.554-1.142.984-1.394 1.29a3.836 3.836 0 0 0-.331.44z"/></svg>'
|
|
586
|
-
}, {
|
|
587
|
-
number: 3,
|
|
588
|
-
tag: "H3",
|
|
589
|
-
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm11.61 4.919c.418 0 .778-.123 1.08-.368.301-.245.452-.597.452-1.055 0-.35-.12-.65-.36-.902-.241-.252-.566-.378-.974-.378-.277 0-.505.038-.684.116a1.1 1.1 0 0 0-.426.306 2.31 2.31 0 0 0-.296.49c-.093.2-.178.388-.255.565a.479.479 0 0 1-.245.225.965.965 0 0 1-.409.081.706.706 0 0 1-.5-.22c-.152-.148-.228-.345-.228-.59 0-.236.071-.484.214-.745a2.72 2.72 0 0 1 .627-.746 3.149 3.149 0 0 1 1.024-.568 4.122 4.122 0 0 1 1.368-.214c.44 0 .842.06 1.205.18.364.12.679.294.947.52.267.228.47.49.606.79.136.3.204.622.204.967 0 .454-.099.843-.296 1.168-.198.324-.48.64-.848.95.354.19.653.408.895.653.243.245.426.516.548.813.123.298.184.619.184.964 0 .413-.083.812-.248 1.198-.166.386-.41.73-.732 1.031a3.49 3.49 0 0 1-1.147.708c-.443.17-.932.256-1.467.256a3.512 3.512 0 0 1-1.464-.293 3.332 3.332 0 0 1-1.699-1.64c-.142-.314-.214-.573-.214-.777 0-.263.085-.475.255-.636a.89.89 0 0 1 .637-.242c.127 0 .25.037.367.112a.53.53 0 0 1 .232.27c.236.63.489 1.099.759 1.405.27.306.65.46 1.14.46a1.714 1.714 0 0 0 1.46-.824c.17-.273.256-.588.256-.947 0-.53-.145-.947-.436-1.249-.29-.302-.694-.453-1.212-.453-.09 0-.231.01-.422.028-.19.018-.313.027-.367.027-.25 0-.443-.062-.579-.187-.136-.125-.204-.299-.204-.521 0-.218.081-.394.245-.528.163-.134.406-.2.728-.2h.28z"/></svg>'
|
|
590
|
-
}, {
|
|
591
|
-
number: 4,
|
|
592
|
-
tag: "H4",
|
|
593
|
-
svg: '<svg width="20" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm13.003 10.09v-1.252h-3.38c-.427 0-.746-.097-.96-.29-.213-.193-.32-.456-.32-.788 0-.085.016-.171.048-.259.031-.088.078-.18.141-.276.063-.097.128-.19.195-.28.068-.09.15-.2.25-.33l3.568-4.774a5.44 5.44 0 0 1 .576-.683.763.763 0 0 1 .542-.212c.682 0 1.023.39 1.023 1.171v5.212h.29c.346 0 .623.047.832.142.208.094.313.3.313.62 0 .26-.086.45-.256.568-.17.12-.427.179-.768.179h-.41v1.252c0 .346-.077.603-.23.771-.152.168-.356.253-.612.253a.78.78 0 0 1-.61-.26c-.154-.173-.232-.427-.232-.764zm-2.895-2.76h2.895V4.91L12.26 8.823z"/></svg>'
|
|
594
|
-
}, {
|
|
595
|
-
number: 5,
|
|
596
|
-
tag: "H5",
|
|
597
|
-
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm14.16 2.645h-3.234l-.388 2.205c.644-.344 1.239-.517 1.783-.517.436 0 .843.082 1.222.245.38.164.712.39.998.677.286.289.51.63.674 1.025.163.395.245.82.245 1.273 0 .658-.148 1.257-.443 1.797-.295.54-.72.97-1.276 1.287-.556.318-1.197.477-1.923.477-.813 0-1.472-.15-1.978-.45-.506-.3-.865-.643-1.076-1.031-.21-.388-.316-.727-.316-1.018 0-.177.073-.345.22-.504a.725.725 0 0 1 .556-.238c.381 0 .665.22.85.66.182.404.427.719.736.943.309.225.654.337 1.035.337.35 0 .656-.09.919-.272.263-.182.466-.431.61-.749.142-.318.214-.678.214-1.082 0-.436-.078-.808-.232-1.117a1.607 1.607 0 0 0-.62-.69 1.674 1.674 0 0 0-.864-.229c-.39 0-.67.048-.837.143-.168.095-.41.262-.725.5-.316.239-.576.358-.78.358a.843.843 0 0 1-.592-.242c-.173-.16-.259-.344-.259-.548 0-.022.025-.177.075-.463l.572-3.26c.063-.39.181-.675.354-.852.172-.177.454-.265.844-.265h3.595c.708 0 1.062.27 1.062.81a.711.711 0 0 1-.26.572c-.172.145-.426.218-.762.218z"/></svg>'
|
|
598
|
-
}, {
|
|
599
|
-
number: 6,
|
|
600
|
-
tag: "H6",
|
|
601
|
-
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zM12.53 7.058a3.093 3.093 0 0 1 1.004-.814 2.734 2.734 0 0 1 1.214-.264c.43 0 .827.08 1.19.24.365.161.684.39.957.686.274.296.485.645.635 1.048a3.6 3.6 0 0 1 .223 1.262c0 .637-.145 1.216-.437 1.736-.292.52-.699.926-1.221 1.218-.522.292-1.114.438-1.774.438-.76 0-1.416-.186-1.967-.557-.552-.37-.974-.919-1.265-1.645-.292-.726-.438-1.613-.438-2.662 0-.855.088-1.62.265-2.293.176-.674.43-1.233.76-1.676.33-.443.73-.778 1.2-1.004.47-.226 1.006-.339 1.608-.339.579 0 1.089.113 1.53.34.44.225.773.506.997.84.224.335.335.656.335.964 0 .185-.07.354-.21.505a.698.698 0 0 1-.536.227.874.874 0 0 1-.529-.18 1.039 1.039 0 0 1-.36-.498 1.42 1.42 0 0 0-.495-.655 1.3 1.3 0 0 0-.786-.247c-.24 0-.479.069-.716.207a1.863 1.863 0 0 0-.6.56c-.33.479-.525 1.333-.584 2.563zm1.832 4.213c.456 0 .834-.186 1.133-.56.298-.373.447-.862.447-1.468 0-.412-.07-.766-.21-1.062a1.584 1.584 0 0 0-.577-.678 1.47 1.47 0 0 0-.807-.234c-.28 0-.548.074-.804.224-.255.149-.461.365-.617.647a2.024 2.024 0 0 0-.234.994c0 .61.158 1.12.475 1.527.316.407.714.61 1.194.61z"/></svg>'
|
|
602
|
-
}];
|
|
603
|
-
return this._settings.levels ? availableLevels.filter(function (l) {
|
|
604
|
-
return _this8._settings.levels.includes(l.number);
|
|
605
|
-
}) : availableLevels;
|
|
606
|
-
}
|
|
607
400
|
/**
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
* @param {PasteEvent} event - event with pasted content
|
|
401
|
+
* Add text to block
|
|
611
402
|
*/
|
|
403
|
+
tag.innerHTML = this._data.text || "";
|
|
612
404
|
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
405
|
+
/**
|
|
406
|
+
* Add styles class from typography
|
|
407
|
+
*/
|
|
408
|
+
if (this.typography) {
|
|
409
|
+
const component = this.currentLevel.tag.toLowerCase();
|
|
410
|
+
const typographyConfig = this.typography[component];
|
|
411
|
+
tag.classList.add(typographyConfig.className);
|
|
412
|
+
} else {
|
|
617
413
|
/**
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
* @type {number}
|
|
414
|
+
* Add styles class
|
|
621
415
|
*/
|
|
416
|
+
tag.classList.add(this._CSS.wrapper);
|
|
417
|
+
}
|
|
622
418
|
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
break;
|
|
633
|
-
|
|
634
|
-
case "H3":
|
|
635
|
-
level = 3;
|
|
636
|
-
break;
|
|
637
|
-
|
|
638
|
-
case "H4":
|
|
639
|
-
level = 4;
|
|
640
|
-
break;
|
|
641
|
-
|
|
642
|
-
case "H5":
|
|
643
|
-
level = 5;
|
|
644
|
-
break;
|
|
645
|
-
|
|
646
|
-
case "H6":
|
|
647
|
-
level = 6;
|
|
648
|
-
break;
|
|
419
|
+
/**
|
|
420
|
+
* Add Alignment class
|
|
421
|
+
*/
|
|
422
|
+
this.alignments.forEach(alignment => {
|
|
423
|
+
const textAlignClass = `ce-header-text--${alignment.name}`;
|
|
424
|
+
if (alignment.name === this._data.textAlign) {
|
|
425
|
+
tag.classList.add(textAlignClass);
|
|
426
|
+
} else {
|
|
427
|
+
tag.classList.remove(textAlignClass);
|
|
649
428
|
}
|
|
429
|
+
});
|
|
650
430
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
});
|
|
656
|
-
}
|
|
431
|
+
/**
|
|
432
|
+
* Make tag editable
|
|
433
|
+
*/
|
|
434
|
+
tag.contentEditable = this.readOnly ? "false" : "true";
|
|
657
435
|
|
|
658
|
-
this.data = {
|
|
659
|
-
level: level,
|
|
660
|
-
text: content.innerHTML
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
436
|
/**
|
|
664
|
-
*
|
|
665
|
-
* Provides configuration to handle H1-H6 tags.
|
|
666
|
-
*
|
|
667
|
-
* @returns {{handler: (function(HTMLElement): {text: string}), tags: string[]}}
|
|
437
|
+
* Add Placeholder
|
|
668
438
|
*/
|
|
439
|
+
tag.dataset["placeholder"] = this.api.i18n.t(this._settings.placeholder || "");
|
|
440
|
+
return tag;
|
|
441
|
+
}
|
|
669
442
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
443
|
+
/**
|
|
444
|
+
* Get current level
|
|
445
|
+
*
|
|
446
|
+
* @returns {level}
|
|
447
|
+
*/
|
|
448
|
+
get currentLevel() {
|
|
449
|
+
let level = this.levels.find(levelItem => levelItem.number === this._data.level);
|
|
450
|
+
if (!level) {
|
|
451
|
+
level = this.defaultLevel;
|
|
452
|
+
}
|
|
453
|
+
return level;
|
|
454
|
+
}
|
|
677
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Get current alignment
|
|
458
|
+
*
|
|
459
|
+
* @returns {alignment}
|
|
460
|
+
*/
|
|
461
|
+
get currentAlignment() {
|
|
462
|
+
let alignment = this.alignments.find(alignment => alignment.name === this._data.textAlign);
|
|
463
|
+
if (!alignment) {
|
|
464
|
+
alignment = {
|
|
465
|
+
name: TextAlign.START,
|
|
466
|
+
svg: ALIGNMENT_ICONS.start
|
|
678
467
|
};
|
|
679
468
|
}
|
|
469
|
+
return alignment;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Return default level
|
|
474
|
+
*
|
|
475
|
+
* @returns {level}
|
|
476
|
+
*/
|
|
477
|
+
get defaultLevel() {
|
|
680
478
|
/**
|
|
681
|
-
*
|
|
479
|
+
* User can specify own default level value
|
|
682
480
|
*/
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
481
|
+
if (this._settings.defaultLevel) {
|
|
482
|
+
const userSpecified = this.levels.find(levelItem => {
|
|
483
|
+
return levelItem.number === this._settings.defaultLevel;
|
|
484
|
+
});
|
|
485
|
+
if (userSpecified) {
|
|
486
|
+
return userSpecified;
|
|
487
|
+
} else {
|
|
488
|
+
console.warn("(ง'̀-'́)ง Heading Tool: the default level specified was not found in available levels");
|
|
489
|
+
}
|
|
691
490
|
}
|
|
491
|
+
|
|
692
492
|
/**
|
|
693
|
-
*
|
|
493
|
+
* With no additional options, there will be H2 by default
|
|
694
494
|
*
|
|
695
|
-
* @
|
|
495
|
+
* @type {level}
|
|
696
496
|
*/
|
|
497
|
+
return this.levels[1];
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* @typedef {object} level
|
|
502
|
+
* @property {number} number - level number
|
|
503
|
+
* @property {string} tag - tag corresponds with level number
|
|
504
|
+
* @property {string} svg - icon
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* Available header levels
|
|
509
|
+
*
|
|
510
|
+
* @returns {level[]}
|
|
511
|
+
*/
|
|
512
|
+
get levels() {
|
|
513
|
+
const availableLevels = [{
|
|
514
|
+
number: 1,
|
|
515
|
+
tag: "H1",
|
|
516
|
+
svg: '<svg width="16" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.14 1.494V4.98h4.62V1.494c0-.498.098-.871.293-1.12A.927.927 0 0 1 7.82 0c.322 0 .583.123.782.37.2.246.3.62.3 1.124v9.588c0 .503-.101.88-.303 1.128a.957.957 0 0 1-.779.374.921.921 0 0 1-.77-.378c-.193-.251-.29-.626-.29-1.124V6.989H2.14v4.093c0 .503-.1.88-.302 1.128a.957.957 0 0 1-.778.374.921.921 0 0 1-.772-.378C.096 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.285.374A.922.922 0 0 1 1.06 0c.321 0 .582.123.782.37.199.246.299.62.299 1.124zm11.653 9.985V5.27c-1.279.887-2.14 1.33-2.583 1.33a.802.802 0 0 1-.563-.228.703.703 0 0 1-.245-.529c0-.232.08-.402.241-.511.161-.11.446-.25.854-.424.61-.259 1.096-.532 1.462-.818a5.84 5.84 0 0 0 .97-.962c.282-.355.466-.573.552-.655.085-.082.246-.123.483-.123.267 0 .481.093.642.28.161.186.242.443.242.77v7.813c0 .914-.345 1.371-1.035 1.371-.307 0-.554-.093-.74-.28-.187-.186-.28-.461-.28-.825z"/></svg>'
|
|
517
|
+
}, {
|
|
518
|
+
number: 2,
|
|
519
|
+
tag: "H2",
|
|
520
|
+
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm10.99 9.288h3.527c.351 0 .62.072.804.216.185.144.277.34.277.588 0 .22-.073.408-.22.56-.146.154-.368.23-.665.23h-4.972c-.338 0-.601-.093-.79-.28a.896.896 0 0 1-.284-.659c0-.162.06-.377.182-.645s.255-.478.399-.631a38.617 38.617 0 0 1 1.621-1.598c.482-.444.827-.735 1.034-.875.369-.261.676-.523.922-.787.245-.263.432-.534.56-.81.129-.278.193-.549.193-.815 0-.288-.069-.546-.206-.773a1.428 1.428 0 0 0-.56-.53 1.618 1.618 0 0 0-.774-.19c-.59 0-1.054.26-1.392.777-.045.068-.12.252-.226.554-.106.302-.225.534-.358.696-.133.162-.328.243-.585.243a.76.76 0 0 1-.56-.223c-.149-.148-.223-.351-.223-.608 0-.31.07-.635.21-.972.139-.338.347-.645.624-.92a3.093 3.093 0 0 1 1.054-.665c.426-.169.924-.253 1.496-.253.69 0 1.277.108 1.764.324.315.144.592.343.83.595.24.252.425.544.558.875.133.33.2.674.2 1.03 0 .558-.14 1.066-.416 1.523-.277.457-.56.815-.848 1.074-.288.26-.771.666-1.45 1.22-.677.554-1.142.984-1.394 1.29a3.836 3.836 0 0 0-.331.44z"/></svg>'
|
|
521
|
+
}, {
|
|
522
|
+
number: 3,
|
|
523
|
+
tag: "H3",
|
|
524
|
+
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm11.61 4.919c.418 0 .778-.123 1.08-.368.301-.245.452-.597.452-1.055 0-.35-.12-.65-.36-.902-.241-.252-.566-.378-.974-.378-.277 0-.505.038-.684.116a1.1 1.1 0 0 0-.426.306 2.31 2.31 0 0 0-.296.49c-.093.2-.178.388-.255.565a.479.479 0 0 1-.245.225.965.965 0 0 1-.409.081.706.706 0 0 1-.5-.22c-.152-.148-.228-.345-.228-.59 0-.236.071-.484.214-.745a2.72 2.72 0 0 1 .627-.746 3.149 3.149 0 0 1 1.024-.568 4.122 4.122 0 0 1 1.368-.214c.44 0 .842.06 1.205.18.364.12.679.294.947.52.267.228.47.49.606.79.136.3.204.622.204.967 0 .454-.099.843-.296 1.168-.198.324-.48.64-.848.95.354.19.653.408.895.653.243.245.426.516.548.813.123.298.184.619.184.964 0 .413-.083.812-.248 1.198-.166.386-.41.73-.732 1.031a3.49 3.49 0 0 1-1.147.708c-.443.17-.932.256-1.467.256a3.512 3.512 0 0 1-1.464-.293 3.332 3.332 0 0 1-1.699-1.64c-.142-.314-.214-.573-.214-.777 0-.263.085-.475.255-.636a.89.89 0 0 1 .637-.242c.127 0 .25.037.367.112a.53.53 0 0 1 .232.27c.236.63.489 1.099.759 1.405.27.306.65.46 1.14.46a1.714 1.714 0 0 0 1.46-.824c.17-.273.256-.588.256-.947 0-.53-.145-.947-.436-1.249-.29-.302-.694-.453-1.212-.453-.09 0-.231.01-.422.028-.19.018-.313.027-.367.027-.25 0-.443-.062-.579-.187-.136-.125-.204-.299-.204-.521 0-.218.081-.394.245-.528.163-.134.406-.2.728-.2h.28z"/></svg>'
|
|
525
|
+
}, {
|
|
526
|
+
number: 4,
|
|
527
|
+
tag: "H4",
|
|
528
|
+
svg: '<svg width="20" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm13.003 10.09v-1.252h-3.38c-.427 0-.746-.097-.96-.29-.213-.193-.32-.456-.32-.788 0-.085.016-.171.048-.259.031-.088.078-.18.141-.276.063-.097.128-.19.195-.28.068-.09.15-.2.25-.33l3.568-4.774a5.44 5.44 0 0 1 .576-.683.763.763 0 0 1 .542-.212c.682 0 1.023.39 1.023 1.171v5.212h.29c.346 0 .623.047.832.142.208.094.313.3.313.62 0 .26-.086.45-.256.568-.17.12-.427.179-.768.179h-.41v1.252c0 .346-.077.603-.23.771-.152.168-.356.253-.612.253a.78.78 0 0 1-.61-.26c-.154-.173-.232-.427-.232-.764zm-2.895-2.76h2.895V4.91L12.26 8.823z"/></svg>'
|
|
529
|
+
}, {
|
|
530
|
+
number: 5,
|
|
531
|
+
tag: "H5",
|
|
532
|
+
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zm14.16 2.645h-3.234l-.388 2.205c.644-.344 1.239-.517 1.783-.517.436 0 .843.082 1.222.245.38.164.712.39.998.677.286.289.51.63.674 1.025.163.395.245.82.245 1.273 0 .658-.148 1.257-.443 1.797-.295.54-.72.97-1.276 1.287-.556.318-1.197.477-1.923.477-.813 0-1.472-.15-1.978-.45-.506-.3-.865-.643-1.076-1.031-.21-.388-.316-.727-.316-1.018 0-.177.073-.345.22-.504a.725.725 0 0 1 .556-.238c.381 0 .665.22.85.66.182.404.427.719.736.943.309.225.654.337 1.035.337.35 0 .656-.09.919-.272.263-.182.466-.431.61-.749.142-.318.214-.678.214-1.082 0-.436-.078-.808-.232-1.117a1.607 1.607 0 0 0-.62-.69 1.674 1.674 0 0 0-.864-.229c-.39 0-.67.048-.837.143-.168.095-.41.262-.725.5-.316.239-.576.358-.78.358a.843.843 0 0 1-.592-.242c-.173-.16-.259-.344-.259-.548 0-.022.025-.177.075-.463l.572-3.26c.063-.39.181-.675.354-.852.172-.177.454-.265.844-.265h3.595c.708 0 1.062.27 1.062.81a.711.711 0 0 1-.26.572c-.172.145-.426.218-.762.218z"/></svg>'
|
|
533
|
+
}, {
|
|
534
|
+
number: 6,
|
|
535
|
+
tag: "H6",
|
|
536
|
+
svg: '<svg width="18" height="14" xmlns="http://www.w3.org/2000/svg"><path d="M2.152 1.494V4.98h4.646V1.494c0-.498.097-.871.293-1.12A.934.934 0 0 1 7.863 0c.324 0 .586.123.786.37.2.246.301.62.301 1.124v9.588c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378c-.194-.251-.29-.626-.29-1.124V6.989H2.152v4.093c0 .503-.101.88-.304 1.128a.964.964 0 0 1-.783.374.928.928 0 0 1-.775-.378C.097 11.955 0 11.58 0 11.082V1.494C0 .996.095.623.286.374A.929.929 0 0 1 1.066 0c.323 0 .585.123.786.37.2.246.3.62.3 1.124zM12.53 7.058a3.093 3.093 0 0 1 1.004-.814 2.734 2.734 0 0 1 1.214-.264c.43 0 .827.08 1.19.24.365.161.684.39.957.686.274.296.485.645.635 1.048a3.6 3.6 0 0 1 .223 1.262c0 .637-.145 1.216-.437 1.736-.292.52-.699.926-1.221 1.218-.522.292-1.114.438-1.774.438-.76 0-1.416-.186-1.967-.557-.552-.37-.974-.919-1.265-1.645-.292-.726-.438-1.613-.438-2.662 0-.855.088-1.62.265-2.293.176-.674.43-1.233.76-1.676.33-.443.73-.778 1.2-1.004.47-.226 1.006-.339 1.608-.339.579 0 1.089.113 1.53.34.44.225.773.506.997.84.224.335.335.656.335.964 0 .185-.07.354-.21.505a.698.698 0 0 1-.536.227.874.874 0 0 1-.529-.18 1.039 1.039 0 0 1-.36-.498 1.42 1.42 0 0 0-.495-.655 1.3 1.3 0 0 0-.786-.247c-.24 0-.479.069-.716.207a1.863 1.863 0 0 0-.6.56c-.33.479-.525 1.333-.584 2.563zm1.832 4.213c.456 0 .834-.186 1.133-.56.298-.373.447-.862.447-1.468 0-.412-.07-.766-.21-1.062a1.584 1.584 0 0 0-.577-.678 1.47 1.47 0 0 0-.807-.234c-.28 0-.548.074-.804.224-.255.149-.461.365-.617.647a2.024 2.024 0 0 0-.234.994c0 .61.158 1.12.475 1.527.316.407.714.61 1.194.61z"/></svg>'
|
|
537
|
+
}];
|
|
538
|
+
return this._settings.levels ? availableLevels.filter(l => this._settings.levels.includes(l.number)) : availableLevels;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Handle H1-H6 tags on paste to substitute it with header Tool
|
|
543
|
+
*
|
|
544
|
+
* @param {HTMLPasteEvent} event - event with pasted content
|
|
545
|
+
*/
|
|
546
|
+
onPaste(event) {
|
|
547
|
+
const content = event.detail.data;
|
|
697
548
|
|
|
698
|
-
}, {
|
|
699
|
-
key: "isReadOnlySupported",
|
|
700
|
-
get: function get() {
|
|
701
|
-
return true;
|
|
702
|
-
}
|
|
703
|
-
}, {
|
|
704
|
-
key: "pasteConfig",
|
|
705
|
-
get: function get() {
|
|
706
|
-
return {
|
|
707
|
-
tags: ["H1", "H2", "H3", "H4", "H5", "H6"]
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
549
|
/**
|
|
711
|
-
*
|
|
712
|
-
* icon - Tool icon's SVG
|
|
713
|
-
* title - title to show in toolbox
|
|
550
|
+
* Define default level value
|
|
714
551
|
*
|
|
715
|
-
* @
|
|
552
|
+
* @type {number}
|
|
716
553
|
*/
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
554
|
+
let level = this.defaultLevel.number;
|
|
555
|
+
switch (content.tagName) {
|
|
556
|
+
case "H1":
|
|
557
|
+
level = 1;
|
|
558
|
+
break;
|
|
559
|
+
case "H2":
|
|
560
|
+
level = 2;
|
|
561
|
+
break;
|
|
562
|
+
case "H3":
|
|
563
|
+
level = 3;
|
|
564
|
+
break;
|
|
565
|
+
case "H4":
|
|
566
|
+
level = 4;
|
|
567
|
+
break;
|
|
568
|
+
case "H5":
|
|
569
|
+
level = 5;
|
|
570
|
+
break;
|
|
571
|
+
case "H6":
|
|
572
|
+
level = 6;
|
|
573
|
+
break;
|
|
725
574
|
}
|
|
726
|
-
|
|
575
|
+
if (this._settings.levels) {
|
|
576
|
+
// Fallback to nearest level when specified not available
|
|
577
|
+
level = this._settings.levels.reduce((prevLevel, currLevel) => {
|
|
578
|
+
return Math.abs(currLevel - level) < Math.abs(prevLevel - level) ? currLevel : prevLevel;
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
this.data = {
|
|
582
|
+
level,
|
|
583
|
+
text: content.innerHTML
|
|
584
|
+
};
|
|
585
|
+
}
|
|
727
586
|
|
|
728
|
-
|
|
729
|
-
|
|
587
|
+
/**
|
|
588
|
+
* Used by Editor.js paste handling API.
|
|
589
|
+
* Provides configuration to handle H1-H6 tags.
|
|
590
|
+
*
|
|
591
|
+
* @returns {{handler: (function(HTMLElement): {text: string}), tags: string[]}}
|
|
592
|
+
*/
|
|
593
|
+
static get pasteConfig() {
|
|
594
|
+
return {
|
|
595
|
+
tags: ["H1", "H2", "H3", "H4", "H5", "H6"]
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Get Tool toolbox settings
|
|
601
|
+
* icon - Tool icon's SVG
|
|
602
|
+
* title - title to show in toolbox
|
|
603
|
+
*
|
|
604
|
+
* @returns {{icon: string, title: string}}
|
|
605
|
+
*/
|
|
606
|
+
static get toolbox() {
|
|
607
|
+
return {
|
|
608
|
+
icon: '<svg width="10" height="14" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 14">\n' + ' <path d="M7.6 8.15H2.25v4.525a1.125 1.125 0 0 1-2.25 0V1.125a1.125 1.125 0 1 1 2.25 0V5.9H7.6V1.125a1.125 1.125 0 0 1 2.25 0v11.55a1.125 1.125 0 0 1-2.25 0V8.15z"/>\n' + "</svg>",
|
|
609
|
+
title: "Heading"
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
export default Header;
|
|
730
614
|
|
|
731
|
-
|
|
615
|
+
//# sourceMappingURL=index.js.map
|