@webiny/app-admin 6.0.0-alpha.5 → 6.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -17
- package/base/Admin.d.ts +5 -2
- package/base/Admin.js +32 -16
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset.d.ts +2 -0
- package/base/Base/LexicalPreset.js +67 -0
- package/base/Base/LexicalPreset.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -2
- package/base/Base/Menus/SupportMenuItems.js +2 -4
- package/base/Base/Menus/SupportMenuItems.js.map +1 -1
- package/base/Base/Menus/WebinyVersion.js +4 -4
- package/base/Base/Menus/WebinyVersion.js.map +1 -1
- package/base/Base/Menus.js +12 -27
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.d.ts +2 -0
- package/base/Base/RoutesConfig.js +30 -0
- package/base/Base/RoutesConfig.js.map +1 -0
- package/base/Base/Tenant/wby-horizontal.svg +23 -0
- package/base/Base/Tenant.js +14 -9
- package/base/Base/Tenant.js.map +1 -1
- package/base/Base/UserMenu/ExitTenant.d.ts +20 -0
- package/base/Base/UserMenu/ExitTenant.js +37 -0
- package/base/Base/UserMenu/ExitTenant.js.map +1 -0
- package/base/Base/UserMenu/SignOut.d.ts +2 -0
- package/base/Base/UserMenu/SignOut.js +19 -0
- package/base/Base/UserMenu/SignOut.js.map +1 -0
- package/base/Base/UserMenu/UserInfo.d.ts +6 -0
- package/base/Base/UserMenu/UserInfo.js +43 -0
- package/base/Base/UserMenu/UserInfo.js.map +1 -0
- package/base/Base/UserMenu.d.ts +2 -0
- package/base/Base/UserMenu.js +21 -0
- package/base/Base/UserMenu.js.map +1 -0
- package/base/Base.js +7 -8
- package/base/Base.js.map +1 -1
- package/base/TelemetryAdminAppStart.d.ts +1 -0
- package/base/TelemetryAdminAppStart.js +19 -0
- package/base/TelemetryAdminAppStart.js.map +1 -0
- package/base/WebinyVersion.js +4 -4
- package/base/WebinyVersion.js.map +1 -1
- package/base/createRootContainer.d.ts +2 -0
- package/base/createRootContainer.js +55 -0
- package/base/createRootContainer.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.js +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.js +1 -1
- package/base/providers/AdminUiStateProvider.js.map +1 -1
- package/base/providers/ApolloProvider.d.ts +1 -1
- package/base/providers/ApolloProvider.js +2 -5
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.js +24 -3
- package/base/providers/UiProviders.js.map +1 -1
- package/base/providers/UiStateProvider.js +1 -1
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/CenteredView.d.ts +1 -1
- package/base/ui/CenteredView.js +2 -2
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/FileManager.d.ts +9 -21
- package/base/ui/FileManager.js +18 -12
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +19 -0
- package/base/ui/LoginScreen.js +2 -1
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Navigation.js +1 -1
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/UserMenu/UserMenuItem.d.ts +5 -5
- package/base/ui/UserMenu/UserMenuItem.js +1 -1
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -1
- package/base/ui/UserMenu/UserMenuLink.d.ts +5 -5
- package/base/ui/UserMenu/UserMenuLink.js +1 -1
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +8 -8
- package/base/ui/UserMenu/UserMenuSeparator.js +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -1
- package/base/ui/UserMenu.d.ts +3 -3
- package/base/ui/UserMenu.js +3 -3
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +1 -1
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +0 -1
- package/components/BulkActions/Worker.js +1 -1
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.d.ts +2 -2
- package/components/BulkActions/index.js +2 -2
- package/components/BulkActions/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +2 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/index.js +1 -1
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +2 -2
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +1 -1
- package/components/Buttons/Buttons.js +4 -4
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.d.ts +2 -3
- package/components/Buttons/Buttons.styles.js +1 -2
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.d.ts +2 -2
- package/components/Buttons/index.js +2 -2
- package/components/Buttons/index.js.map +1 -1
- package/components/Buttons/useButtons.d.ts +1 -1
- package/components/Buttons/useButtons.js +1 -1
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/Dialogs/Dialog.js +2 -2
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogsContext.d.ts +1 -6
- package/components/Dialogs/DialogsContext.js +14 -23
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.d.ts +1 -2
- package/components/Dialogs/useDialogs.js +1 -2
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.d.ts +1 -2
- package/components/EmptyView.js +6 -7
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +1 -1
- package/components/Filters/Filters.js +2 -2
- package/components/Filters/Filters.js.map +1 -1
- package/components/Filters/index.d.ts +2 -2
- package/components/Filters/index.js +2 -2
- package/components/Filters/index.js.map +1 -1
- package/components/FloatingActionButton.js +1 -1
- package/components/FloatingActionButton.js.map +1 -1
- package/components/FloatingPanel.js +4 -6
- package/components/FloatingPanel.js.map +1 -1
- package/components/IconPicker/IconPicker.d.ts +3 -3
- package/components/IconPicker/IconPicker.js +6 -6
- package/components/IconPicker/IconPicker.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.d.ts +3 -3
- package/components/IconPicker/IconPickerComponent.js +4 -4
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.d.ts +3 -3
- package/components/IconPicker/IconPickerPresenter.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.test.js +3 -2
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -1
- package/components/IconPicker/IconPickerTab.d.ts +1 -1
- package/components/IconPicker/IconPickerTab.js +10 -10
- package/components/IconPicker/IconPickerTab.js.map +1 -1
- package/components/IconPicker/IconRenderer.d.ts +1 -1
- package/components/IconPicker/IconRenderer.js.map +1 -1
- package/components/IconPicker/IconRepository.d.ts +2 -2
- package/components/IconPicker/IconRepository.js +2 -2
- package/components/IconPicker/IconRepository.js.map +1 -1
- package/components/IconPicker/IconRepository.test.js +2 -1
- package/components/IconPicker/IconRepository.test.js.map +1 -1
- package/components/IconPicker/IconRepositoryFactory.d.ts +2 -2
- package/components/IconPicker/IconRepositoryFactory.js +1 -1
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -1
- package/components/IconPicker/components/IconPickerCell.d.ts +2 -2
- package/components/IconPicker/components/IconPickerCell.js +3 -3
- package/components/IconPicker/components/IconPickerCell.js.map +1 -1
- package/components/IconPicker/components/IconPickerContent.d.ts +1 -1
- package/components/IconPicker/components/IconPickerContent.js +4 -4
- package/components/IconPicker/components/IconPickerContent.js.map +1 -1
- package/components/IconPicker/components/IconPickerRow.js +1 -1
- package/components/IconPicker/components/IconPickerRow.js.map +1 -1
- package/components/IconPicker/components/IconPickerTrigger.d.ts +1 -1
- package/components/IconPicker/components/IconPickerTrigger.js +7 -7
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -1
- package/components/IconPicker/components/index.d.ts +4 -4
- package/components/IconPicker/components/index.js +4 -4
- package/components/IconPicker/components/index.js.map +1 -1
- package/components/IconPicker/config/Emojis.js +1 -1
- package/components/IconPicker/config/Emojis.js.map +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -1
- package/components/IconPicker/config/IconPackProvider.d.ts +1 -1
- package/components/IconPicker/config/IconPackProvider.js.map +1 -1
- package/components/IconPicker/config/IconType.js +2 -2
- package/components/IconPicker/config/IconType.js.map +1 -1
- package/components/IconPicker/config/index.d.ts +3 -3
- package/components/IconPicker/config/index.js +7 -7
- package/components/IconPicker/config/index.js.map +1 -1
- package/components/IconPicker/index.d.ts +7 -7
- package/components/IconPicker/index.js +6 -6
- package/components/IconPicker/index.js.map +1 -1
- package/components/IconPicker/plugins/customPlugin.js +19 -24
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/IconPicker/plugins/emojisPlugin.js +9 -9
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -1
- package/components/IconPicker/plugins/iconsPlugin.js +4 -4
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -1
- package/components/IconPicker/types.js.map +1 -1
- package/components/LexicalEditor/LexicalEditor.d.ts +9 -5
- package/components/LexicalEditor/LexicalEditor.js +32 -21
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +83 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +3 -1
- package/components/LexicalEditor/index.js +3 -1
- package/components/LexicalEditor/index.js.map +1 -1
- package/components/LexicalEditor/lexicalValueWithHtml.d.ts +7 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js +36 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -0
- package/components/NavigationPrompt.d.ts +27 -0
- package/components/NavigationPrompt.js +39 -0
- package/components/NavigationPrompt.js.map +1 -0
- package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js +20 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
- package/components/NotAuthorizedError/SecureRouteError.svg +1 -0
- package/components/NotAuthorizedError/index.d.ts +1 -0
- package/components/NotAuthorizedError/index.js +3 -0
- package/components/NotAuthorizedError/index.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.js +1 -1
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/index.d.ts +4 -4
- package/components/OptionsMenu/index.js +4 -4
- package/components/OptionsMenu/index.js.map +1 -1
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.d.ts +1 -1
- package/components/OverlayLayout/OverlayLayout.js +8 -11
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +1 -1
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/OverlayLayout/components/OverlayHeader.js +3 -3
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -1
- package/components/OverlayLayout/components/index.d.ts +4 -4
- package/components/OverlayLayout/components/index.js +4 -4
- package/components/OverlayLayout/components/index.js.map +1 -1
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +1 -1
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +1 -3
- package/components/Permissions/Permissions.js +37 -31
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.js +2 -2
- package/components/Permissions/PermissionsGroup.js.map +1 -1
- package/components/Permissions/StyledComponents.js +1 -1
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +4 -4
- package/components/Permissions/index.js +4 -4
- package/components/Permissions/index.js.map +1 -1
- package/components/RegisterFeature.d.ts +11 -0
- package/components/RegisterFeature.js +26 -0
- package/components/RegisterFeature.js.map +1 -0
- package/components/ResizablePanels/index.d.ts +1 -1
- package/components/ResizablePanels/index.js +1 -1
- package/components/ResizablePanels/index.js.map +1 -1
- package/components/RoleAutocomplete/graphql.d.ts +1 -0
- package/components/RoleAutocomplete/graphql.js +18 -0
- package/components/RoleAutocomplete/graphql.js.map +1 -0
- package/components/RoleAutocomplete/index.d.ts +5 -0
- package/components/RoleAutocomplete/index.js +18 -0
- package/components/RoleAutocomplete/index.js.map +1 -0
- package/components/RolesMultiAutocomplete/graphql.d.ts +1 -0
- package/components/RolesMultiAutocomplete/graphql.js +23 -0
- package/components/RolesMultiAutocomplete/graphql.js.map +1 -0
- package/components/RolesMultiAutocomplete/index.d.ts +5 -0
- package/components/RolesMultiAutocomplete/index.js +19 -0
- package/components/RolesMultiAutocomplete/index.js.map +1 -0
- package/components/SearchUI.d.ts +1 -2
- package/components/SearchUI.js +1 -2
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/SimpleForm/SimpleForm.js +10 -10
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.d.ts +1 -1
- package/components/SimpleForm/index.js +1 -1
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.js +3 -3
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +3 -8
- package/components/SingleImageUpload.js +1 -1
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +7 -7
- package/components/SplitView/SplitView.js +20 -12
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.d.ts +1 -1
- package/components/SplitView/index.js +1 -1
- package/components/SplitView/index.js.map +1 -1
- package/components/StateInspector.js +1 -1
- package/components/StateInspector.js.map +1 -1
- package/components/TeamAutocomplete/graphql.d.ts +1 -0
- package/components/TeamAutocomplete/graphql.js +18 -0
- package/components/TeamAutocomplete/graphql.js.map +1 -0
- package/components/TeamAutocomplete/index.d.ts +5 -0
- package/components/TeamAutocomplete/index.js +18 -0
- package/components/TeamAutocomplete/index.js.map +1 -0
- package/components/TeamsMultiAutocomplete/graphql.d.ts +1 -0
- package/components/TeamsMultiAutocomplete/graphql.js +23 -0
- package/components/TeamsMultiAutocomplete/graphql.js.map +1 -0
- package/components/TeamsMultiAutocomplete/index.d.ts +5 -0
- package/components/TeamsMultiAutocomplete/index.js +19 -0
- package/components/TeamsMultiAutocomplete/index.js.map +1 -0
- package/components/Wcp.d.ts +2 -0
- package/components/Wcp.js +9 -2
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +29 -3
- package/components/index.js +28 -3
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Dashboard.d.ts +3 -0
- package/config/AdminConfig/Dashboard.js +6 -0
- package/config/AdminConfig/Dashboard.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Color.d.ts +11 -0
- package/config/AdminConfig/LexicalTheme/Color.js +45 -0
- package/config/AdminConfig/LexicalTheme/Color.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Typography.d.ts +30 -0
- package/config/AdminConfig/LexicalTheme/Typography.js +79 -0
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -0
- package/config/AdminConfig/LexicalTheme.d.ts +9 -0
- package/config/AdminConfig/LexicalTheme.js +8 -0
- package/config/AdminConfig/LexicalTheme.js.map +1 -0
- package/config/AdminConfig/Logo.d.ts +24 -0
- package/config/AdminConfig/Logo.js +21 -0
- package/config/AdminConfig/Logo.js.map +1 -0
- package/config/AdminConfig/Menu/MenuGroup.d.ts +10 -10
- package/config/AdminConfig/Menu/MenuGroup.js +1 -1
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -1
- package/config/AdminConfig/Menu/MenuItem.d.ts +9 -9
- package/config/AdminConfig/Menu/MenuItem.js +1 -1
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/MenuLink.d.ts +14 -14
- package/config/AdminConfig/Menu/MenuLink.js +10 -4
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu.d.ts +15 -15
- package/config/AdminConfig/Menu/SupportMenu.js +3 -3
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +14 -15
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +14 -15
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu.d.ts +31 -31
- package/config/AdminConfig/Menu/UserMenu.js +4 -4
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -1
- package/config/AdminConfig/Menu.d.ts +105 -103
- package/config/AdminConfig/Menu.js +17 -7
- package/config/AdminConfig/Menu.js.map +1 -1
- package/config/AdminConfig/Route.d.ts +1 -1
- package/config/AdminConfig/Route.js +2 -2
- package/config/AdminConfig/Route.js.map +1 -1
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +6 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +31 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +8 -7
- package/config/AdminConfig/Tenant/TenantLogo.js +14 -6
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantName.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantName.js +5 -2
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -1
- package/config/AdminConfig/Tenant.d.ts +14 -31
- package/config/AdminConfig/Tenant.js +4 -13
- package/config/AdminConfig/Tenant.js.map +1 -1
- package/config/AdminConfig/Theme/assignColor.d.ts +1 -1
- package/config/AdminConfig/Theme/assignColor.js +1 -1
- package/config/AdminConfig/Theme/assignColor.js.map +1 -1
- package/config/AdminConfig/Theme/types.d.ts +1 -1
- package/config/AdminConfig/Theme/types.js.map +1 -1
- package/config/AdminConfig/Theme.d.ts +1 -1
- package/config/AdminConfig/Theme.js +1 -1
- package/config/AdminConfig/Theme.js.map +1 -1
- package/config/AdminConfig/Title.d.ts +23 -0
- package/config/AdminConfig/Title.js +16 -0
- package/config/AdminConfig/Title.js.map +1 -0
- package/config/AdminConfig/Widget.d.ts +15 -0
- package/config/AdminConfig/Widget.js +36 -0
- package/config/AdminConfig/Widget.js.map +1 -0
- package/config/AdminConfig.d.ts +200 -149
- package/config/AdminConfig.js +30 -6
- package/config/AdminConfig.js.map +1 -1
- package/config/createAdminConfig.js.map +1 -1
- package/css/tokens.css +379 -0
- package/css/typography.css +70 -0
- package/domain/Identity.d.ts +59 -0
- package/domain/Identity.js +96 -0
- package/domain/Identity.js.map +1 -0
- package/errors/ErrorOverlayNetworkErrorHandler.d.ts +11 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js +66 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -0
- package/errors/TenantIsDisabled.d.ts +2 -0
- package/errors/TenantIsDisabled.js +23 -0
- package/errors/TenantIsDisabled.js.map +1 -0
- package/exports/admin/buildParams.d.ts +1 -0
- package/exports/admin/buildParams.js +3 -0
- package/exports/admin/buildParams.js.map +1 -0
- package/exports/admin/configs.d.ts +1 -0
- package/exports/admin/configs.js +3 -0
- package/exports/admin/configs.js.map +1 -0
- package/exports/admin/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/security.d.ts +8 -0
- package/exports/admin/security.js +10 -0
- package/exports/admin/security.js.map +1 -0
- package/exports/admin/tenancy.d.ts +2 -0
- package/exports/admin/tenancy.js +4 -0
- package/exports/admin/tenancy.js.map +1 -0
- package/exports/admin/ui.d.ts +3 -0
- package/exports/admin/ui.js +5 -0
- package/exports/admin/ui.js.map +1 -0
- package/exports/admin.d.ts +6 -0
- package/exports/admin.js +8 -0
- package/exports/admin.js.map +1 -0
- package/extensions/AdminBuildParam.d.ts +11 -0
- package/extensions/AdminBuildParam.js +184 -0
- package/extensions/AdminBuildParam.js.map +1 -0
- package/extensions/AdminExtension.d.ts +11 -0
- package/extensions/AdminExtension.js +99 -0
- package/extensions/AdminExtension.js.map +1 -0
- package/extensions/index.d.ts +23 -0
- package/extensions/index.js +7 -0
- package/extensions/index.js.map +1 -0
- package/features/apolloClient/abstraction.d.ts +5 -0
- package/features/apolloClient/abstraction.js +4 -0
- package/features/apolloClient/abstraction.js.map +1 -0
- package/features/apolloClient/feature.d.ts +2 -0
- package/features/apolloClient/feature.js +39 -0
- package/features/apolloClient/feature.js.map +1 -0
- package/features/buildParams/BuildParams.d.ts +9 -0
- package/features/buildParams/BuildParams.js +18 -0
- package/features/buildParams/BuildParams.js.map +1 -0
- package/features/buildParams/abstractions.d.ts +15 -0
- package/features/buildParams/abstractions.js +5 -0
- package/features/buildParams/abstractions.js.map +1 -0
- package/features/buildParams/feature.d.ts +1 -0
- package/features/buildParams/feature.js +10 -0
- package/features/buildParams/feature.js.map +1 -0
- package/features/buildParams/index.d.ts +2 -0
- package/features/buildParams/index.js +4 -0
- package/features/buildParams/index.js.map +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.d.ts +15 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +31 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.d.ts +12 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +30 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.d.ts +10 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +17 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -0
- package/features/security/AuthenticationContext/abstractions.d.ts +26 -0
- package/features/security/AuthenticationContext/abstractions.js +5 -0
- package/features/security/AuthenticationContext/abstractions.js.map +1 -0
- package/features/security/AuthenticationContext/feature.d.ts +3 -0
- package/features/security/AuthenticationContext/feature.js +20 -0
- package/features/security/AuthenticationContext/feature.js.map +1 -0
- package/features/security/AuthenticationContext/index.d.ts +1 -0
- package/features/security/AuthenticationContext/index.js +3 -0
- package/features/security/AuthenticationContext/index.js.map +1 -0
- package/features/security/AuthenticationContext/types.d.ts +11 -0
- package/features/security/AuthenticationContext/types.js.map +1 -0
- package/features/security/IdentityContext/IdentityContext.d.ts +13 -0
- package/features/security/IdentityContext/IdentityContext.js +24 -0
- package/features/security/IdentityContext/IdentityContext.js.map +1 -0
- package/features/security/IdentityContext/abstractions.d.ts +10 -0
- package/features/security/IdentityContext/abstractions.js +4 -0
- package/features/security/IdentityContext/abstractions.js.map +1 -0
- package/features/security/IdentityContext/feature.d.ts +3 -0
- package/features/security/IdentityContext/feature.js +16 -0
- package/features/security/IdentityContext/feature.js.map +1 -0
- package/features/security/IdentityContext/index.d.ts +2 -0
- package/features/security/IdentityContext/index.js +4 -0
- package/features/security/IdentityContext/index.js.map +1 -0
- package/features/security/LogIn/IdentityMapper.d.ts +9 -0
- package/features/security/LogIn/IdentityMapper.js +13 -0
- package/features/security/LogIn/IdentityMapper.js.map +1 -0
- package/features/security/LogIn/LogInGateway.d.ts +11 -0
- package/features/security/LogIn/LogInGateway.js +27 -0
- package/features/security/LogIn/LogInGateway.js.map +1 -0
- package/features/security/LogIn/LogInRepository.d.ts +14 -0
- package/features/security/LogIn/LogInRepository.js +19 -0
- package/features/security/LogIn/LogInRepository.js.map +1 -0
- package/features/security/LogIn/LogInUseCase.d.ts +15 -0
- package/features/security/LogIn/LogInUseCase.js +40 -0
- package/features/security/LogIn/LogInUseCase.js.map +1 -0
- package/features/security/LogIn/abstractions.d.ts +48 -0
- package/features/security/LogIn/abstractions.js +19 -0
- package/features/security/LogIn/abstractions.js.map +1 -0
- package/features/security/LogIn/createLoginMutation.d.ts +1 -0
- package/features/security/LogIn/createLoginMutation.js +49 -0
- package/features/security/LogIn/createLoginMutation.js.map +1 -0
- package/features/security/LogIn/feature.d.ts +3 -0
- package/features/security/LogIn/feature.js +22 -0
- package/features/security/LogIn/feature.js.map +1 -0
- package/features/security/LogIn/index.d.ts +1 -0
- package/features/security/LogIn/index.js +3 -0
- package/features/security/LogIn/index.js.map +1 -0
- package/features/security/LogOut/LogOutUseCase.d.ts +13 -0
- package/features/security/LogOut/LogOutUseCase.js +23 -0
- package/features/security/LogOut/LogOutUseCase.js.map +1 -0
- package/features/security/LogOut/abstractions.d.ts +7 -0
- package/features/security/LogOut/abstractions.js +4 -0
- package/features/security/LogOut/abstractions.js.map +1 -0
- package/features/security/LogOut/feature.d.ts +3 -0
- package/features/security/LogOut/feature.js +16 -0
- package/features/security/LogOut/feature.js.map +1 -0
- package/features/security/LogOut/index.d.ts +2 -0
- package/features/security/LogOut/index.js +4 -0
- package/features/security/LogOut/index.js.map +1 -0
- package/features/security/SecurityFeature.d.ts +1 -0
- package/features/security/SecurityFeature.js +16 -0
- package/features/security/SecurityFeature.js.map +1 -0
- package/features/telemetry/TelemetryService.d.ts +6 -0
- package/features/telemetry/TelemetryService.js +20 -0
- package/features/telemetry/TelemetryService.js.map +1 -0
- package/features/telemetry/abstractions.d.ts +7 -0
- package/features/telemetry/abstractions.js +4 -0
- package/features/telemetry/abstractions.js.map +1 -0
- package/features/telemetry/feature.d.ts +3 -0
- package/features/telemetry/feature.js +16 -0
- package/features/telemetry/feature.js.map +1 -0
- package/features/telemetry/index.d.ts +2 -0
- package/features/telemetry/index.js +4 -0
- package/features/telemetry/index.js.map +1 -0
- package/features/tenancy/GraphQLClientDecorator.d.ts +12 -0
- package/features/tenancy/GraphQLClientDecorator.js +27 -0
- package/features/tenancy/GraphQLClientDecorator.js.map +1 -0
- package/features/tenancy/TenantContext.d.ts +17 -0
- package/features/tenancy/TenantContext.js +61 -0
- package/features/tenancy/TenantContext.js.map +1 -0
- package/features/tenancy/abstractions.d.ts +14 -0
- package/features/tenancy/abstractions.js +4 -0
- package/features/tenancy/abstractions.js.map +1 -0
- package/features/tenancy/feature.d.ts +5 -0
- package/features/tenancy/feature.js +41 -0
- package/features/tenancy/feature.js.map +1 -0
- package/features/tenancy/types.d.ts +4 -0
- package/features/tenancy/types.js +3 -0
- package/features/tenancy/types.js.map +1 -0
- package/features/wcp/ReactLicense.d.ts +18 -0
- package/features/wcp/ReactLicense.js +43 -0
- package/features/wcp/ReactLicense.js.map +1 -0
- package/features/wcp/WcpGateway.d.ts +10 -0
- package/features/wcp/WcpGateway.js +73 -0
- package/features/wcp/WcpGateway.js.map +1 -0
- package/features/wcp/WcpService.d.ts +20 -0
- package/features/wcp/WcpService.js +84 -0
- package/features/wcp/WcpService.js.map +1 -0
- package/features/wcp/abstractions.d.ts +19 -0
- package/features/wcp/abstractions.js +5 -0
- package/features/wcp/abstractions.js.map +1 -0
- package/features/wcp/feature.d.ts +3 -0
- package/features/wcp/feature.js +18 -0
- package/features/wcp/feature.js.map +1 -0
- package/features/wcp/types.d.ts +21 -0
- package/features/wcp/types.js +3 -0
- package/features/wcp/types.js.map +1 -0
- package/hooks/index.d.ts +11 -10
- package/hooks/index.js +11 -10
- package/hooks/index.js.map +1 -1
- package/hooks/useConfirmationDialog.js +3 -3
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.js +1 -1
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useKeyHandler.js +1 -1
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +1 -2
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useShiftKey.js +1 -1
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +0 -1
- package/hooks/useStateIfMounted.js +1 -1
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useToggler.d.ts +7 -0
- package/hooks/useToggler.js +15 -0
- package/hooks/useToggler.js.map +1 -0
- package/index.d.ts +34 -45
- package/index.js +36 -43
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +45 -47
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +211 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +224 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +216 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +179 -0
- package/permissions/usePermissions.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +70 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.d.ts +2 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +17 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/index.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/index.js +3 -0
- package/presentation/installation/components/SystemInstaller/index.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +32 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +15 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +69 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +95 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.d.ts +4 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js +10 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js +28 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.d.ts +11 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +58 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +21 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/introduction.svg +154 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js +3 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +10 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +63 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.d.ts +24 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +138 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.d.ts +11 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +30 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.d.ts +59 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js +6 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/feature.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js +20 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/index.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/index.js +4 -0
- package/presentation/installation/presenters/SystemInstaller/index.js.map +1 -0
- package/presentation/security/components/HasPermission.d.ts +10 -0
- package/presentation/security/components/HasPermission.js +31 -0
- package/presentation/security/components/HasPermission.js.map +1 -0
- package/presentation/security/components/SecureRoute.d.ts +7 -0
- package/presentation/security/components/SecureRoute.js +16 -0
- package/presentation/security/components/SecureRoute.js.map +1 -0
- package/presentation/security/hooks/useAuthentication.d.ts +9 -0
- package/presentation/security/hooks/useAuthentication.js +24 -0
- package/presentation/security/hooks/useAuthentication.js.map +1 -0
- package/presentation/security/hooks/useIdentity.d.ts +6 -0
- package/presentation/security/hooks/useIdentity.js +25 -0
- package/presentation/security/hooks/useIdentity.js.map +1 -0
- package/presentation/security/hooks/useSecurity.d.ts +10 -0
- package/presentation/security/hooks/useSecurity.js +28 -0
- package/presentation/security/hooks/useSecurity.js.map +1 -0
- package/presentation/tenancy/TenancyProvider.d.ts +6 -0
- package/presentation/tenancy/TenancyProvider.js +43 -0
- package/presentation/tenancy/TenancyProvider.js.map +1 -0
- package/presentation/tenancy/createTenancyProvider.d.ts +1 -0
- package/presentation/tenancy/createTenancyProvider.js +14 -0
- package/presentation/tenancy/createTenancyProvider.js.map +1 -0
- package/presentation/tenancy/useTenantContext.d.ts +5 -0
- package/presentation/tenancy/useTenantContext.js +24 -0
- package/presentation/tenancy/useTenantContext.js.map +1 -0
- package/presentation/wcp/WcpProvider.d.ts +7 -0
- package/presentation/wcp/WcpProvider.js +26 -0
- package/presentation/wcp/WcpProvider.js.map +1 -0
- package/presentation/wcp/useWcp.d.ts +2 -0
- package/presentation/wcp/useWcp.js +18 -0
- package/presentation/wcp/useWcp.js.map +1 -0
- package/routes.d.ts +6 -0
- package/routes.js +17 -0
- package/routes.js.map +1 -0
- package/types.d.ts +3 -76
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/base/Base/Routes.d.ts +0 -2
- package/base/Base/Routes.js +0 -24
- package/base/Base/Routes.js.map +0 -1
- package/base/providers/TelemetryProvider.d.ts +0 -1
- package/base/providers/TelemetryProvider.js +0 -22
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -21
- package/base/providers/ViewCompositionProvider.js +0 -47
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -39
- package/base/ui/LocaleSelector.js +0 -8
- package/base/ui/LocaleSelector.js.map +0 -1
- package/components/AppInstaller/AppInstaller.d.ts +0 -11
- package/components/AppInstaller/AppInstaller.js +0 -113
- package/components/AppInstaller/AppInstaller.js.map +0 -1
- package/components/AppInstaller/Sidebar.d.ts +0 -9
- package/components/AppInstaller/Sidebar.js +0 -108
- package/components/AppInstaller/Sidebar.js.map +0 -1
- package/components/AppInstaller/assets/sign-in-divider.svg +0 -19
- package/components/AppInstaller/index.d.ts +0 -2
- package/components/AppInstaller/index.js +0 -17
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -19
- package/components/AppInstaller/styled.js +0 -75
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -25
- package/components/AppInstaller/useInstaller.js +0 -169
- package/components/AppInstaller/useInstaller.js.map +0 -1
- package/components/Dialogs/CustomDialog.d.ts +0 -17
- package/components/Dialogs/CustomDialog.js +0 -48
- package/components/Dialogs/CustomDialog.js.map +0 -1
- package/components/RichTextEditor/RichTextEditor.d.ts +0 -3
- package/components/RichTextEditor/RichTextEditor.js +0 -16
- package/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/components/RichTextEditor/index.d.ts +0 -2
- package/components/RichTextEditor/index.js +0 -4
- package/components/RichTextEditor/index.js.map +0 -1
- package/components/RichTextEditor/styles.scss +0 -96
- package/components/RichTextEditor/tools/header/index.d.ts +0 -228
- package/components/RichTextEditor/tools/header/index.js +0 -615
- package/components/RichTextEditor/tools/header/index.js.map +0 -1
- package/components/RichTextEditor/tools/header/styles.scss +0 -48
- package/components/RichTextEditor/tools/image/index.d.ts +0 -122
- package/components/RichTextEditor/tools/image/index.js +0 -202
- package/components/RichTextEditor/tools/image/index.js.map +0 -1
- package/components/RichTextEditor/tools/image/styles.scss +0 -90
- package/components/RichTextEditor/tools/image/svgs.d.ts +0 -6
- package/components/RichTextEditor/tools/image/svgs.js +0 -7
- package/components/RichTextEditor/tools/image/svgs.js.map +0 -1
- package/components/RichTextEditor/tools/image/tunes.d.ts +0 -55
- package/components/RichTextEditor/tools/image/tunes.js +0 -103
- package/components/RichTextEditor/tools/image/tunes.js.map +0 -1
- package/components/RichTextEditor/tools/image/types.d.ts +0 -29
- package/components/RichTextEditor/tools/image/types.js.map +0 -1
- package/components/RichTextEditor/tools/image/ui.d.ts +0 -120
- package/components/RichTextEditor/tools/image/ui.js +0 -245
- package/components/RichTextEditor/tools/image/ui.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -208
- package/components/RichTextEditor/tools/paragraph/index.js +0 -435
- package/components/RichTextEditor/tools/paragraph/index.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/styles.scss +0 -29
- package/components/RichTextEditor/tools/textColor/index.d.ts +0 -61
- package/components/RichTextEditor/tools/textColor/index.js +0 -197
- package/components/RichTextEditor/tools/textColor/index.js.map +0 -1
- package/components/RichTextEditor/tools/textColor/styles.scss +0 -21
- package/components/RichTextEditor/tools/utils.d.ts +0 -19
- package/components/RichTextEditor/tools/utils.js +0 -24
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -34
- package/components/Routes.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -19
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -53
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/ui/UIElement.d.ts +0 -2
- package/ui/UIElement.js +0 -3
- package/ui/UIElement.js.map +0 -1
- package/ui/UILayout.d.ts +0 -1
- package/ui/UILayout.js +0 -3
- package/ui/UILayout.js.map +0 -1
- package/ui/UIRenderer.d.ts +0 -2
- package/ui/UIRenderer.js +0 -3
- package/ui/UIRenderer.js.map +0 -1
- package/ui/UIView.d.ts +0 -2
- package/ui/UIView.js +0 -3
- package/ui/UIView.js.map +0 -1
- package/ui/elements/AccordionElement.d.ts +0 -28
- package/ui/elements/AccordionElement.js +0 -48
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -25
- package/ui/elements/ButtonElement.js +0 -52
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -7
- package/ui/elements/ButtonGroupElement.js +0 -29
- package/ui/elements/ButtonGroupElement.js.map +0 -1
- package/ui/elements/GenericElement.d.ts +0 -1
- package/ui/elements/GenericElement.js +0 -3
- package/ui/elements/GenericElement.js.map +0 -1
- package/ui/elements/LabelElement.d.ts +0 -17
- package/ui/elements/LabelElement.js +0 -23
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -34
- package/ui/elements/NavigationMenuElement.js +0 -88
- package/ui/elements/NavigationMenuElement.js.map +0 -1
- package/ui/elements/PanelElement.d.ts +0 -3
- package/ui/elements/PanelElement.js +0 -4
- package/ui/elements/PanelElement.js.map +0 -1
- package/ui/elements/PlaceholderElement.d.ts +0 -6
- package/ui/elements/PlaceholderElement.js +0 -11
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -8
- package/ui/elements/SmallButtonElement.js +0 -24
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -14
- package/ui/elements/TypographyElement.js +0 -23
- package/ui/elements/TypographyElement.js.map +0 -1
- package/ui/elements/ViewElement.d.ts +0 -1
- package/ui/elements/ViewElement.js +0 -3
- package/ui/elements/ViewElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +0 -7
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -26
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement.d.ts +0 -44
- package/ui/elements/form/DynamicFieldsetElement.js +0 -97
- package/ui/elements/form/DynamicFieldsetElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.d.ts +0 -4
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +0 -10
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +0 -8
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +0 -47
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +0 -14
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +0 -73
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +0 -23
- package/ui/elements/form/FileManagerElement/styled.js +0 -108
- package/ui/elements/form/FileManagerElement/styled.js.map +0 -1
- package/ui/elements/form/FileManagerElement.d.ts +0 -25
- package/ui/elements/form/FileManagerElement.js +0 -46
- package/ui/elements/form/FileManagerElement.js.map +0 -1
- package/ui/elements/form/FormElement.d.ts +0 -22
- package/ui/elements/form/FormElement.js +0 -20
- package/ui/elements/form/FormElement.js.map +0 -1
- package/ui/elements/form/FormFieldElement.d.ts +0 -57
- package/ui/elements/form/FormFieldElement.js +0 -113
- package/ui/elements/form/FormFieldElement.js.map +0 -1
- package/ui/elements/form/HiddenElement.d.ts +0 -7
- package/ui/elements/form/HiddenElement.js +0 -25
- package/ui/elements/form/HiddenElement.js.map +0 -1
- package/ui/elements/form/InputElement.d.ts +0 -8
- package/ui/elements/form/InputElement.js +0 -32
- package/ui/elements/form/InputElement.js.map +0 -1
- package/ui/elements/form/PasswordElement.d.ts +0 -6
- package/ui/elements/form/PasswordElement.js +0 -29
- package/ui/elements/form/PasswordElement.js.map +0 -1
- package/ui/elements/form/README.md +0 -2
- package/ui/elements/form/SelectElement.d.ts +0 -16
- package/ui/elements/form/SelectElement.js +0 -42
- package/ui/elements/form/SelectElement.js.map +0 -1
- package/ui/elements/form/TextareaElement.d.ts +0 -16
- package/ui/elements/form/TextareaElement.js +0 -34
- package/ui/elements/form/TextareaElement.js.map +0 -1
- package/ui/views/AdminView/ContentElement.d.ts +0 -4
- package/ui/views/AdminView/ContentElement.js +0 -37
- package/ui/views/AdminView/ContentElement.js.map +0 -1
- package/ui/views/AdminView/HeaderElement.d.ts +0 -13
- package/ui/views/AdminView/HeaderElement.js +0 -68
- package/ui/views/AdminView/HeaderElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionRightElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +0 -1
- package/ui/views/AdminView/components/Dialog.d.ts +0 -2
- package/ui/views/AdminView/components/Dialog.js +0 -41
- package/ui/views/AdminView/components/Dialog.js.map +0 -1
- package/ui/views/AdminView/components/Hamburger.d.ts +0 -3
- package/ui/views/AdminView/components/Hamburger.js +0 -23
- package/ui/views/AdminView/components/Hamburger.js.map +0 -1
- package/ui/views/FormView/FormContainerElement.d.ts +0 -13
- package/ui/views/FormView/FormContainerElement.js +0 -19
- package/ui/views/FormView/FormContainerElement.js.map +0 -1
- package/ui/views/FormView/FormContentElement.d.ts +0 -6
- package/ui/views/FormView/FormContentElement.js +0 -10
- package/ui/views/FormView/FormContentElement.js.map +0 -1
- package/ui/views/FormView/FormFooterElement.d.ts +0 -7
- package/ui/views/FormView/FormFooterElement.js +0 -14
- package/ui/views/FormView/FormFooterElement.js.map +0 -1
- package/ui/views/FormView/FormHeaderElement.d.ts +0 -15
- package/ui/views/FormView/FormHeaderElement.js +0 -30
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -121
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -7
- package/ui/views/OverlayView/ContentElement.js +0 -29
- package/ui/views/OverlayView/ContentElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderElement.d.ts +0 -25
- package/ui/views/OverlayView/HeaderElement.js +0 -72
- package/ui/views/OverlayView/HeaderElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +0 -15
- package/ui/views/OverlayView/HeaderTitleElement.js +0 -25
- package/ui/views/OverlayView/HeaderTitleElement.js.map +0 -1
- package/ui/views/OverlayView/useOverlayView.d.ts +0 -5
- package/ui/views/OverlayView/useOverlayView.js +0 -34
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -30
- package/ui/views/OverlayView.js +0 -109
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -12
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -32
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -86
- package/ui/views/SplitView.js.map +0 -1
- /package/base/Base/Tenant/{wby-logo.svg → wby-square.svg} +0 -0
- /package/{components/RichTextEditor/tools/image → features/security/AuthenticationContext}/types.js +0 -0
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import type { PasteEvent } from "@editorjs/editorjs";
|
|
2
|
-
import type { Alignment } from "../utils";
|
|
3
|
-
import { TextAlign } from "../utils";
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {object} ParagraphConfig
|
|
6
|
-
* @property {string} placeholder - placeholder for the empty paragraph
|
|
7
|
-
* @property {boolean} preserveBlank - Whether or not to keep blank paragraphs when saving editor data`
|
|
8
|
-
*/
|
|
9
|
-
interface ParagraphConfig {
|
|
10
|
-
placeholder: string;
|
|
11
|
-
preserveBlank: boolean;
|
|
12
|
-
typography?: Typography;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @typedef {Object} ParagraphData
|
|
16
|
-
* @description Tool's input and output data format
|
|
17
|
-
* @property {String} text — Paragraph's content. Can include HTML tags: <a><b><i>
|
|
18
|
-
*/
|
|
19
|
-
interface ParagraphData {
|
|
20
|
-
text: string;
|
|
21
|
-
textAlign: TextAlign;
|
|
22
|
-
className?: string;
|
|
23
|
-
}
|
|
24
|
-
interface Typography {
|
|
25
|
-
[key: string]: {
|
|
26
|
-
label: string;
|
|
27
|
-
component: string;
|
|
28
|
-
className: string;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
interface ParagraphArgs {
|
|
32
|
-
data: ParagraphData;
|
|
33
|
-
config: ParagraphConfig;
|
|
34
|
-
api: any;
|
|
35
|
-
readOnly: boolean;
|
|
36
|
-
}
|
|
37
|
-
declare class Paragraph {
|
|
38
|
-
private readonly api;
|
|
39
|
-
private readonly readOnly;
|
|
40
|
-
private readonly _CSS;
|
|
41
|
-
private _data;
|
|
42
|
-
private readonly _element;
|
|
43
|
-
private readonly _placeholder;
|
|
44
|
-
private readonly _preserveBlank;
|
|
45
|
-
private readonly alignments;
|
|
46
|
-
private readonly settingsButtons;
|
|
47
|
-
private readonly typography;
|
|
48
|
-
/**
|
|
49
|
-
* Render plugin`s main Element and fill it with saved data
|
|
50
|
-
*
|
|
51
|
-
* @param {object} params - constructor params
|
|
52
|
-
* @param {ParagraphData} params.data - previously saved data
|
|
53
|
-
* @param {ParagraphConfig} params.config - user config for Tool
|
|
54
|
-
* @param {object} params.api - editor.js api
|
|
55
|
-
* @param {boolean} readOnly - read only mode flag
|
|
56
|
-
*/
|
|
57
|
-
constructor({ data, config, api, readOnly }: ParagraphArgs);
|
|
58
|
-
/**
|
|
59
|
-
* Default placeholder for Paragraph Tool
|
|
60
|
-
*
|
|
61
|
-
* @return {string}
|
|
62
|
-
* @constructor
|
|
63
|
-
*/
|
|
64
|
-
static get DEFAULT_PLACEHOLDER(): string;
|
|
65
|
-
/**
|
|
66
|
-
* Enable Conversion Toolbar. Paragraph can be converted to/from other tools
|
|
67
|
-
*/
|
|
68
|
-
static get conversionConfig(): {
|
|
69
|
-
export: string;
|
|
70
|
-
import: string;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Sanitizer rules
|
|
74
|
-
*/
|
|
75
|
-
static get sanitize(): {
|
|
76
|
-
text: {
|
|
77
|
-
br: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Returns true to notify the core that read-only mode is supported
|
|
82
|
-
*
|
|
83
|
-
* @return {boolean}
|
|
84
|
-
*/
|
|
85
|
-
static get isReadOnlySupported(): boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Get current Tools`s data
|
|
88
|
-
* @returns {ParagraphData} Current data
|
|
89
|
-
* @private
|
|
90
|
-
*/
|
|
91
|
-
get data(): ParagraphData;
|
|
92
|
-
/**
|
|
93
|
-
* Store data in plugin:
|
|
94
|
-
* - at the this._data property
|
|
95
|
-
* - at the HTML
|
|
96
|
-
*
|
|
97
|
-
* @param {ParagraphData} data — data to set
|
|
98
|
-
* @private
|
|
99
|
-
*/
|
|
100
|
-
set data(data: ParagraphData);
|
|
101
|
-
/**
|
|
102
|
-
* Used by Editor paste handling API.
|
|
103
|
-
* Provides configuration to handle P tags.
|
|
104
|
-
*
|
|
105
|
-
* @returns {{tags: string[]}}
|
|
106
|
-
*/
|
|
107
|
-
static get pasteConfig(): {
|
|
108
|
-
tags: string[];
|
|
109
|
-
};
|
|
110
|
-
/**
|
|
111
|
-
* Icon and title for displaying at the Toolbox
|
|
112
|
-
*
|
|
113
|
-
* @return {{icon: string, title: string}}
|
|
114
|
-
*/
|
|
115
|
-
static get toolbox(): {
|
|
116
|
-
icon: string;
|
|
117
|
-
title: string;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* Get current alignment
|
|
121
|
-
*
|
|
122
|
-
* @returns {alignment}
|
|
123
|
-
*/
|
|
124
|
-
get currentAlignment(): Alignment;
|
|
125
|
-
/**
|
|
126
|
-
* Check if text content is empty and set empty string to inner html.
|
|
127
|
-
* We need this because some browsers (e.g. Safari) insert <br> into empty contentEditable elements
|
|
128
|
-
*
|
|
129
|
-
* @param {KeyboardEvent} e - key up event
|
|
130
|
-
*/
|
|
131
|
-
onKeyUp(e: KeyboardEvent): void;
|
|
132
|
-
/**
|
|
133
|
-
* Create Tool's view
|
|
134
|
-
* @return {HTMLElement}
|
|
135
|
-
* @private
|
|
136
|
-
*/
|
|
137
|
-
drawView(): HTMLElement;
|
|
138
|
-
/**
|
|
139
|
-
* Return Tool's view
|
|
140
|
-
*/
|
|
141
|
-
render(): HTMLDivElement;
|
|
142
|
-
/**
|
|
143
|
-
* Create Block's settings block
|
|
144
|
-
*/
|
|
145
|
-
renderSettings(): HTMLElement;
|
|
146
|
-
/**
|
|
147
|
-
* Method that specified how to merge two Text blocks.
|
|
148
|
-
* Called by Editor.js by backspace at the beginning of the Block
|
|
149
|
-
* @param {ParagraphData} data
|
|
150
|
-
* @public
|
|
151
|
-
*/
|
|
152
|
-
merge(data: ParagraphData): void;
|
|
153
|
-
/**
|
|
154
|
-
* Validate Paragraph block data:
|
|
155
|
-
* - check for emptiness
|
|
156
|
-
*
|
|
157
|
-
* @param {ParagraphData} savedData — data received after saving
|
|
158
|
-
* @returns {boolean} false if saved data is not correct, otherwise true
|
|
159
|
-
* @public
|
|
160
|
-
*/
|
|
161
|
-
validate(savedData: ParagraphData): boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Extract Tool's data from the view
|
|
164
|
-
* @param {HTMLDivElement} toolsContent - Paragraph tools rendered view
|
|
165
|
-
* @returns {ParagraphData} - saved data
|
|
166
|
-
* @public
|
|
167
|
-
*/
|
|
168
|
-
save(toolsContent: HTMLElement): {
|
|
169
|
-
text: string;
|
|
170
|
-
textAlign: TextAlign;
|
|
171
|
-
className: string | undefined;
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* Extract textAlign from className
|
|
175
|
-
*
|
|
176
|
-
* @param {string} className - heading element className
|
|
177
|
-
* @returns {TextAlign} textAlign
|
|
178
|
-
*/
|
|
179
|
-
getTextAlign(className: string): TextAlign;
|
|
180
|
-
/**
|
|
181
|
-
* On paste callback fired from Editor.
|
|
182
|
-
*
|
|
183
|
-
* @param {PasteEvent} event - event with pasted data
|
|
184
|
-
*/
|
|
185
|
-
onPaste(event: PasteEvent): void;
|
|
186
|
-
/**
|
|
187
|
-
* Callback for Block's settings buttons
|
|
188
|
-
*
|
|
189
|
-
* @param {number} alignment - level to set
|
|
190
|
-
*/
|
|
191
|
-
setAlignment(alignment: Alignment): void;
|
|
192
|
-
/**
|
|
193
|
-
* Callback for Block's settings buttons
|
|
194
|
-
*
|
|
195
|
-
* @param {string} className - name of typography class
|
|
196
|
-
*/
|
|
197
|
-
setTypographyClass(className: string): void;
|
|
198
|
-
/**
|
|
199
|
-
* Normalize input data
|
|
200
|
-
*
|
|
201
|
-
* @param {HeaderData} data - saved data to process
|
|
202
|
-
*
|
|
203
|
-
* @returns {HeaderData}
|
|
204
|
-
* @private
|
|
205
|
-
*/
|
|
206
|
-
normalizeData(data?: Partial<ParagraphData>): ParagraphData;
|
|
207
|
-
}
|
|
208
|
-
export default Paragraph;
|
|
@@ -1,435 +0,0 @@
|
|
|
1
|
-
import { ALIGNMENTS, TextAlign, ALIGNMENT_ICONS } from "../utils";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {object} ParagraphConfig
|
|
5
|
-
* @property {string} placeholder - placeholder for the empty paragraph
|
|
6
|
-
* @property {boolean} preserveBlank - Whether or not to keep blank paragraphs when saving editor data`
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @typedef {Object} ParagraphData
|
|
11
|
-
* @description Tool's input and output data format
|
|
12
|
-
* @property {String} text — Paragraph's content. Can include HTML tags: <a><b><i>
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
class Paragraph {
|
|
16
|
-
// private readonly _settings: any;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Render plugin`s main Element and fill it with saved data
|
|
20
|
-
*
|
|
21
|
-
* @param {object} params - constructor params
|
|
22
|
-
* @param {ParagraphData} params.data - previously saved data
|
|
23
|
-
* @param {ParagraphConfig} params.config - user config for Tool
|
|
24
|
-
* @param {object} params.api - editor.js api
|
|
25
|
-
* @param {boolean} readOnly - read only mode flag
|
|
26
|
-
*/
|
|
27
|
-
constructor({
|
|
28
|
-
data,
|
|
29
|
-
config,
|
|
30
|
-
api,
|
|
31
|
-
readOnly
|
|
32
|
-
}) {
|
|
33
|
-
this.api = api;
|
|
34
|
-
this.readOnly = readOnly;
|
|
35
|
-
this.typography = config.typography || null;
|
|
36
|
-
this._CSS = {
|
|
37
|
-
block: this.api.styles.block,
|
|
38
|
-
settingsButton: this.api.styles.settingsButton,
|
|
39
|
-
settingsButtonActive: this.api.styles.settingsButtonActive,
|
|
40
|
-
wrapper: "ce-paragraph"
|
|
41
|
-
};
|
|
42
|
-
if (!this.readOnly) {
|
|
43
|
-
this.onKeyUp = this.onKeyUp.bind(this);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Placeholder for paragraph if it is first Block
|
|
48
|
-
* @type {string}
|
|
49
|
-
*/
|
|
50
|
-
this._placeholder = config.placeholder ? config.placeholder : Paragraph.DEFAULT_PLACEHOLDER;
|
|
51
|
-
this._data = this.normalizeData(data);
|
|
52
|
-
this._element = this.drawView();
|
|
53
|
-
this._preserveBlank = config.preserveBlank !== undefined ? config.preserveBlank : false;
|
|
54
|
-
this.settingsButtons = [];
|
|
55
|
-
this.alignments = ALIGNMENTS;
|
|
56
|
-
|
|
57
|
-
// Call the `data` setter, to properly render the view element.
|
|
58
|
-
this.data = this._data;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Default placeholder for Paragraph Tool
|
|
63
|
-
*
|
|
64
|
-
* @return {string}
|
|
65
|
-
* @constructor
|
|
66
|
-
*/
|
|
67
|
-
static get DEFAULT_PLACEHOLDER() {
|
|
68
|
-
return "";
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Enable Conversion Toolbar. Paragraph can be converted to/from other tools
|
|
73
|
-
*/
|
|
74
|
-
static get conversionConfig() {
|
|
75
|
-
return {
|
|
76
|
-
export: "text",
|
|
77
|
-
// to convert Paragraph to other block, use 'text' property of saved data
|
|
78
|
-
import: "text" // to covert other block's exported string to Paragraph, fill 'text' property of tool data
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Sanitizer rules
|
|
84
|
-
*/
|
|
85
|
-
static get sanitize() {
|
|
86
|
-
return {
|
|
87
|
-
text: {
|
|
88
|
-
br: true
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Returns true to notify the core that read-only mode is supported
|
|
95
|
-
*
|
|
96
|
-
* @return {boolean}
|
|
97
|
-
*/
|
|
98
|
-
static get isReadOnlySupported() {
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Get current Tools`s data
|
|
104
|
-
* @returns {ParagraphData} Current data
|
|
105
|
-
* @private
|
|
106
|
-
*/
|
|
107
|
-
get data() {
|
|
108
|
-
const text = this._element.innerHTML;
|
|
109
|
-
|
|
110
|
-
// this._data.text = text;
|
|
111
|
-
|
|
112
|
-
return {
|
|
113
|
-
...this._data,
|
|
114
|
-
text
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Store data in plugin:
|
|
120
|
-
* - at the this._data property
|
|
121
|
-
* - at the HTML
|
|
122
|
-
*
|
|
123
|
-
* @param {ParagraphData} data — data to set
|
|
124
|
-
* @private
|
|
125
|
-
*/
|
|
126
|
-
set data(data) {
|
|
127
|
-
this._data = data || {};
|
|
128
|
-
this._element.innerHTML = this._data.text || "";
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Add Alignment class
|
|
132
|
-
*/
|
|
133
|
-
this.alignments.forEach(alignment => {
|
|
134
|
-
if (alignment.name === this._data.textAlign) {
|
|
135
|
-
this._element.classList.add(`ce-header-text--${alignment.name}`);
|
|
136
|
-
} else {
|
|
137
|
-
this._element.classList.remove(`ce-header-text--${alignment.name}`);
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Add Typography class
|
|
143
|
-
*/
|
|
144
|
-
if (this._data.className) {
|
|
145
|
-
this._element.classList.add(...this._data.className.split(" "));
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Used by Editor paste handling API.
|
|
151
|
-
* Provides configuration to handle P tags.
|
|
152
|
-
*
|
|
153
|
-
* @returns {{tags: string[]}}
|
|
154
|
-
*/
|
|
155
|
-
static get pasteConfig() {
|
|
156
|
-
return {
|
|
157
|
-
tags: ["P"]
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Icon and title for displaying at the Toolbox
|
|
163
|
-
*
|
|
164
|
-
* @return {{icon: string, title: string}}
|
|
165
|
-
*/
|
|
166
|
-
static get toolbox() {
|
|
167
|
-
return {
|
|
168
|
-
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0.2 -0.3 9 11.4" width="12" height="14">\n' + ' <path d="M0 2.77V.92A1 1 0 01.2.28C.35.1.56 0 .83 0h7.66c.28.01.48.1.63.28.14.17.21.38.21.64v1.85c0 .26-.08.48-.23.66-.15.17-.37.26-.66.26-.28 0-.5-.09-.64-.26a1 1 0 01-.21-.66V1.69H5.6v7.58h.5c.25 0 .45.08.6.23.17.16.25.35.25.6s-.08.45-.24.6a.87.87 0 01-.62.22H3.21a.87.87 0 01-.61-.22.78.78 0 01-.24-.6c0-.25.08-.44.24-.6a.85.85 0 01.61-.23h.5V1.7H1.73v1.08c0 .26-.08.48-.23.66-.15.17-.37.26-.66.26-.28 0-.5-.09-.64-.26A1 1 0 010 2.77z"/>\n' + "</svg>",
|
|
169
|
-
title: "Text"
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Get current alignment
|
|
175
|
-
*
|
|
176
|
-
* @returns {alignment}
|
|
177
|
-
*/
|
|
178
|
-
get currentAlignment() {
|
|
179
|
-
let alignment = this.alignments.find(alignment => alignment.name === this._data.textAlign);
|
|
180
|
-
if (!alignment) {
|
|
181
|
-
alignment = {
|
|
182
|
-
name: TextAlign.START,
|
|
183
|
-
svg: ALIGNMENT_ICONS.start
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
return alignment;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Check if text content is empty and set empty string to inner html.
|
|
191
|
-
* We need this because some browsers (e.g. Safari) insert <br> into empty contentEditable elements
|
|
192
|
-
*
|
|
193
|
-
* @param {KeyboardEvent} e - key up event
|
|
194
|
-
*/
|
|
195
|
-
onKeyUp(e) {
|
|
196
|
-
if (e.code !== "Backspace" && e.code !== "Delete") {
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
const {
|
|
200
|
-
textContent
|
|
201
|
-
} = this._element;
|
|
202
|
-
if (textContent === "") {
|
|
203
|
-
this._element.innerHTML = "";
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Create Tool's view
|
|
209
|
-
* @return {HTMLElement}
|
|
210
|
-
* @private
|
|
211
|
-
*/
|
|
212
|
-
drawView() {
|
|
213
|
-
const div = document.createElement("div");
|
|
214
|
-
div.classList.add(this._CSS.wrapper, this._CSS.block);
|
|
215
|
-
// Add custom className to view.
|
|
216
|
-
if (this._data.className) {
|
|
217
|
-
div.classList.add(this._data.className);
|
|
218
|
-
}
|
|
219
|
-
div.contentEditable = "false";
|
|
220
|
-
div.dataset["placeholder"] = this.api.i18n.t(this._placeholder);
|
|
221
|
-
if (!this.readOnly) {
|
|
222
|
-
div.contentEditable = "true";
|
|
223
|
-
div.addEventListener("keyup", this.onKeyUp);
|
|
224
|
-
}
|
|
225
|
-
return div;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Return Tool's view
|
|
230
|
-
*/
|
|
231
|
-
render() {
|
|
232
|
-
return this._element;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Create Block's settings block
|
|
237
|
-
*/
|
|
238
|
-
renderSettings() {
|
|
239
|
-
const holder = document.createElement("div");
|
|
240
|
-
|
|
241
|
-
// Add alignment selectors
|
|
242
|
-
this.alignments.forEach(alignment => {
|
|
243
|
-
const selectTypeButton = document.createElement("span");
|
|
244
|
-
selectTypeButton.classList.add(this._CSS.settingsButton);
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Highlight current level button
|
|
248
|
-
*/
|
|
249
|
-
if (this.currentAlignment.name === alignment.name) {
|
|
250
|
-
selectTypeButton.classList.add(this._CSS.settingsButtonActive);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Add SVG icon
|
|
255
|
-
*/
|
|
256
|
-
selectTypeButton.innerHTML = alignment.svg;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Save alignment to its button
|
|
260
|
-
*/
|
|
261
|
-
selectTypeButton.dataset["textAlign"] = alignment.name;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Set up click handler
|
|
265
|
-
*/
|
|
266
|
-
selectTypeButton.addEventListener("click", () => {
|
|
267
|
-
this.setAlignment(alignment);
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Append settings button to holder
|
|
272
|
-
*/
|
|
273
|
-
holder.appendChild(selectTypeButton);
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Save settings buttons
|
|
277
|
-
*/
|
|
278
|
-
this.settingsButtons.push(selectTypeButton);
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
// Add `Typography` selector
|
|
282
|
-
if (this.typography) {
|
|
283
|
-
const typographyForParagraph = Object.values(this.typography).filter(item => item.component === "p");
|
|
284
|
-
const selectTypeButton = document.createElement("SELECT");
|
|
285
|
-
// Add editor's default input style
|
|
286
|
-
selectTypeButton.classList.add(this.api.styles.input);
|
|
287
|
-
// Add typography options
|
|
288
|
-
typographyForParagraph.forEach(item => {
|
|
289
|
-
const option = new Option(item.label, item.className);
|
|
290
|
-
selectTypeButton.appendChild(option);
|
|
291
|
-
});
|
|
292
|
-
// Add "onclick" handler
|
|
293
|
-
selectTypeButton.onclick = event => {
|
|
294
|
-
const {
|
|
295
|
-
value
|
|
296
|
-
} = event.target;
|
|
297
|
-
this.setTypographyClass(value);
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Append settings button to holder
|
|
302
|
-
*/
|
|
303
|
-
holder.appendChild(selectTypeButton);
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Save settings buttons
|
|
307
|
-
*/
|
|
308
|
-
this.settingsButtons.push(selectTypeButton);
|
|
309
|
-
}
|
|
310
|
-
return holder;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Method that specified how to merge two Text blocks.
|
|
315
|
-
* Called by Editor.js by backspace at the beginning of the Block
|
|
316
|
-
* @param {ParagraphData} data
|
|
317
|
-
* @public
|
|
318
|
-
*/
|
|
319
|
-
merge(data) {
|
|
320
|
-
this.data = {
|
|
321
|
-
...this.data,
|
|
322
|
-
text: this.data.text + data.text
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* Validate Paragraph block data:
|
|
328
|
-
* - check for emptiness
|
|
329
|
-
*
|
|
330
|
-
* @param {ParagraphData} savedData — data received after saving
|
|
331
|
-
* @returns {boolean} false if saved data is not correct, otherwise true
|
|
332
|
-
* @public
|
|
333
|
-
*/
|
|
334
|
-
validate(savedData) {
|
|
335
|
-
return !(savedData.text.trim() === "" && !this._preserveBlank);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Extract Tool's data from the view
|
|
340
|
-
* @param {HTMLDivElement} toolsContent - Paragraph tools rendered view
|
|
341
|
-
* @returns {ParagraphData} - saved data
|
|
342
|
-
* @public
|
|
343
|
-
*/
|
|
344
|
-
save(toolsContent) {
|
|
345
|
-
return {
|
|
346
|
-
text: toolsContent.innerHTML,
|
|
347
|
-
textAlign: this.getTextAlign(toolsContent.className),
|
|
348
|
-
className: this.data.className
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Extract textAlign from className
|
|
354
|
-
*
|
|
355
|
-
* @param {string} className - heading element className
|
|
356
|
-
* @returns {TextAlign} textAlign
|
|
357
|
-
*/
|
|
358
|
-
getTextAlign(className) {
|
|
359
|
-
let textAlign = TextAlign.START;
|
|
360
|
-
// Match className with alignment
|
|
361
|
-
this.alignments.forEach(alignment => {
|
|
362
|
-
if (className.includes(`ce-header-text--${alignment.name}`)) {
|
|
363
|
-
textAlign = alignment.name;
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
return textAlign;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* On paste callback fired from Editor.
|
|
371
|
-
*
|
|
372
|
-
* @param {PasteEvent} event - event with pasted data
|
|
373
|
-
*/
|
|
374
|
-
onPaste(event) {
|
|
375
|
-
const detail = event.detail;
|
|
376
|
-
this.data = {
|
|
377
|
-
...this.data,
|
|
378
|
-
text: detail.data.innerHTML
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Callback for Block's settings buttons
|
|
384
|
-
*
|
|
385
|
-
* @param {number} alignment - level to set
|
|
386
|
-
*/
|
|
387
|
-
setAlignment(alignment) {
|
|
388
|
-
this.data = {
|
|
389
|
-
textAlign: alignment.name,
|
|
390
|
-
text: this.data.text
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
/**
|
|
394
|
-
* Highlight button by selected level
|
|
395
|
-
*/
|
|
396
|
-
this.settingsButtons.forEach(button => {
|
|
397
|
-
button.classList.toggle(this._CSS.settingsButtonActive, button.dataset["textAlign"] === alignment.name);
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Callback for Block's settings buttons
|
|
403
|
-
*
|
|
404
|
-
* @param {string} className - name of typography class
|
|
405
|
-
*/
|
|
406
|
-
setTypographyClass(className) {
|
|
407
|
-
this.data = {
|
|
408
|
-
textAlign: this.data.textAlign,
|
|
409
|
-
text: this.data.text,
|
|
410
|
-
className: className
|
|
411
|
-
};
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Normalize input data
|
|
416
|
-
*
|
|
417
|
-
* @param {HeaderData} data - saved data to process
|
|
418
|
-
*
|
|
419
|
-
* @returns {HeaderData}
|
|
420
|
-
* @private
|
|
421
|
-
*/
|
|
422
|
-
normalizeData(data) {
|
|
423
|
-
const newData = {};
|
|
424
|
-
if (typeof data !== "object") {
|
|
425
|
-
data = {};
|
|
426
|
-
}
|
|
427
|
-
newData.text = data.text || "";
|
|
428
|
-
newData.textAlign = data.textAlign || TextAlign.START;
|
|
429
|
-
newData.className = data.className || "";
|
|
430
|
-
return newData;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
export default Paragraph;
|
|
434
|
-
|
|
435
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ALIGNMENTS","TextAlign","ALIGNMENT_ICONS","Paragraph","constructor","data","config","api","readOnly","typography","_CSS","block","styles","settingsButton","settingsButtonActive","wrapper","onKeyUp","bind","_placeholder","placeholder","DEFAULT_PLACEHOLDER","_data","normalizeData","_element","drawView","_preserveBlank","preserveBlank","undefined","settingsButtons","alignments","conversionConfig","export","import","sanitize","text","br","isReadOnlySupported","innerHTML","forEach","alignment","name","textAlign","classList","add","remove","className","split","pasteConfig","tags","toolbox","icon","title","currentAlignment","find","START","svg","start","e","code","textContent","div","document","createElement","contentEditable","dataset","i18n","t","addEventListener","render","renderSettings","holder","selectTypeButton","setAlignment","appendChild","push","typographyForParagraph","Object","values","filter","item","component","input","option","Option","label","onclick","event","value","target","setTypographyClass","merge","validate","savedData","trim","save","toolsContent","getTextAlign","includes","onPaste","detail","button","toggle","newData"],"sources":["index.ts"],"sourcesContent":["import type { API, PasteEvent } from \"@editorjs/editorjs\";\nimport type { Alignment } from \"../utils\";\nimport { ALIGNMENTS, TextAlign, ALIGNMENT_ICONS } from \"../utils\";\nimport type { HTMLPasteEventDetail } from \"@editorjs/editorjs/types/tools/paste-events\";\n\n/**\n * @typedef {object} ParagraphConfig\n * @property {string} placeholder - placeholder for the empty paragraph\n * @property {boolean} preserveBlank - Whether or not to keep blank paragraphs when saving editor data`\n */\ninterface ParagraphConfig {\n placeholder: string;\n preserveBlank: boolean;\n typography?: Typography;\n}\n/**\n * @typedef {Object} ParagraphData\n * @description Tool's input and output data format\n * @property {String} text — Paragraph's content. Can include HTML tags: <a><b><i>\n */\ninterface ParagraphData {\n text: string;\n textAlign: TextAlign;\n className?: string;\n}\n\ninterface Typography {\n [key: string]: {\n label: string;\n component: string;\n className: string;\n };\n}\n\ninterface ParagraphArgs {\n data: ParagraphData;\n config: ParagraphConfig;\n api: any;\n readOnly: boolean;\n}\nclass Paragraph {\n private readonly api: API;\n private readonly readOnly: boolean;\n private readonly _CSS: any;\n // private readonly _settings: any;\n private _data: ParagraphData;\n private readonly _element: any;\n private readonly _placeholder: string;\n private readonly _preserveBlank: boolean;\n private readonly alignments: Alignment[];\n private readonly settingsButtons: HTMLElement[];\n private readonly typography: Typography | null;\n\n /**\n * Render plugin`s main Element and fill it with saved data\n *\n * @param {object} params - constructor params\n * @param {ParagraphData} params.data - previously saved data\n * @param {ParagraphConfig} params.config - user config for Tool\n * @param {object} params.api - editor.js api\n * @param {boolean} readOnly - read only mode flag\n */\n public constructor({ data, config, api, readOnly }: ParagraphArgs) {\n this.api = api;\n this.readOnly = readOnly;\n this.typography = config.typography || null;\n this._CSS = {\n block: this.api.styles.block,\n settingsButton: this.api.styles.settingsButton,\n settingsButtonActive: this.api.styles.settingsButtonActive,\n wrapper: \"ce-paragraph\"\n };\n\n if (!this.readOnly) {\n this.onKeyUp = this.onKeyUp.bind(this);\n }\n\n /**\n * Placeholder for paragraph if it is first Block\n * @type {string}\n */\n this._placeholder = config.placeholder ? config.placeholder : Paragraph.DEFAULT_PLACEHOLDER;\n this._data = this.normalizeData(data);\n this._element = this.drawView();\n this._preserveBlank = config.preserveBlank !== undefined ? config.preserveBlank : false;\n this.settingsButtons = [];\n this.alignments = ALIGNMENTS;\n\n // Call the `data` setter, to properly render the view element.\n this.data = this._data;\n }\n\n /**\n * Default placeholder for Paragraph Tool\n *\n * @return {string}\n * @constructor\n */\n public static get DEFAULT_PLACEHOLDER(): string {\n return \"\";\n }\n\n /**\n * Enable Conversion Toolbar. Paragraph can be converted to/from other tools\n */\n public static get conversionConfig() {\n return {\n export: \"text\", // to convert Paragraph to other block, use 'text' property of saved data\n import: \"text\" // to covert other block's exported string to Paragraph, fill 'text' property of tool data\n };\n }\n\n /**\n * Sanitizer rules\n */\n public static get sanitize() {\n return {\n text: {\n br: true\n }\n };\n }\n\n /**\n * Returns true to notify the core that read-only mode is supported\n *\n * @return {boolean}\n */\n public static get isReadOnlySupported(): boolean {\n return true;\n }\n\n /**\n * Get current Tools`s data\n * @returns {ParagraphData} Current data\n * @private\n */\n public get data(): ParagraphData {\n const text = this._element.innerHTML;\n\n // this._data.text = text;\n\n return {\n ...this._data,\n text\n };\n }\n\n /**\n * Store data in plugin:\n * - at the this._data property\n * - at the HTML\n *\n * @param {ParagraphData} data — data to set\n * @private\n */\n public set data(data: ParagraphData) {\n this._data = data || ({} as ParagraphData);\n\n this._element.innerHTML = this._data.text || \"\";\n\n /**\n * Add Alignment class\n */\n this.alignments.forEach(alignment => {\n if (alignment.name === this._data.textAlign) {\n this._element.classList.add(`ce-header-text--${alignment.name}`);\n } else {\n this._element.classList.remove(`ce-header-text--${alignment.name}`);\n }\n });\n\n /**\n * Add Typography class\n */\n if (this._data.className) {\n this._element.classList.add(...this._data.className.split(\" \"));\n }\n }\n\n /**\n * Used by Editor paste handling API.\n * Provides configuration to handle P tags.\n *\n * @returns {{tags: string[]}}\n */\n public static get pasteConfig() {\n return {\n tags: [\"P\"]\n };\n }\n\n /**\n * Icon and title for displaying at the Toolbox\n *\n * @return {{icon: string, title: string}}\n */\n public static get toolbox() {\n return {\n icon:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0.2 -0.3 9 11.4\" width=\"12\" height=\"14\">\\n' +\n ' <path d=\"M0 2.77V.92A1 1 0 01.2.28C.35.1.56 0 .83 0h7.66c.28.01.48.1.63.28.14.17.21.38.21.64v1.85c0 .26-.08.48-.23.66-.15.17-.37.26-.66.26-.28 0-.5-.09-.64-.26a1 1 0 01-.21-.66V1.69H5.6v7.58h.5c.25 0 .45.08.6.23.17.16.25.35.25.6s-.08.45-.24.6a.87.87 0 01-.62.22H3.21a.87.87 0 01-.61-.22.78.78 0 01-.24-.6c0-.25.08-.44.24-.6a.85.85 0 01.61-.23h.5V1.7H1.73v1.08c0 .26-.08.48-.23.66-.15.17-.37.26-.66.26-.28 0-.5-.09-.64-.26A1 1 0 010 2.77z\"/>\\n' +\n \"</svg>\",\n title: \"Text\"\n };\n }\n\n /**\n * Get current alignment\n *\n * @returns {alignment}\n */\n public get currentAlignment(): Alignment {\n let alignment = this.alignments.find(alignment => alignment.name === this._data.textAlign);\n\n if (!alignment) {\n alignment = { name: TextAlign.START, svg: ALIGNMENT_ICONS.start };\n }\n\n return alignment;\n }\n\n /**\n * Check if text content is empty and set empty string to inner html.\n * We need this because some browsers (e.g. Safari) insert <br> into empty contentEditable elements\n *\n * @param {KeyboardEvent} e - key up event\n */\n public onKeyUp(e: KeyboardEvent): void {\n if (e.code !== \"Backspace\" && e.code !== \"Delete\") {\n return;\n }\n\n const { textContent } = this._element;\n\n if (textContent === \"\") {\n this._element.innerHTML = \"\";\n }\n }\n\n /**\n * Create Tool's view\n * @return {HTMLElement}\n * @private\n */\n public drawView(): HTMLElement {\n const div: HTMLDivElement = document.createElement(\"div\");\n div.classList.add(this._CSS.wrapper, this._CSS.block);\n // Add custom className to view.\n if (this._data.className) {\n div.classList.add(this._data.className);\n }\n div.contentEditable = \"false\";\n div.dataset[\"placeholder\"] = this.api.i18n.t(this._placeholder);\n\n if (!this.readOnly) {\n div.contentEditable = \"true\";\n div.addEventListener(\"keyup\", this.onKeyUp);\n }\n\n return div;\n }\n\n /**\n * Return Tool's view\n */\n public render(): HTMLDivElement {\n return this._element;\n }\n\n /**\n * Create Block's settings block\n */\n public renderSettings(): HTMLElement {\n const holder: HTMLDivElement = document.createElement(\"div\");\n\n // Add alignment selectors\n this.alignments.forEach(alignment => {\n const selectTypeButton: HTMLSpanElement = document.createElement(\"span\");\n\n selectTypeButton.classList.add(this._CSS.settingsButton);\n\n /**\n * Highlight current level button\n */\n if (this.currentAlignment.name === alignment.name) {\n selectTypeButton.classList.add(this._CSS.settingsButtonActive);\n }\n\n /**\n * Add SVG icon\n */\n selectTypeButton.innerHTML = alignment.svg;\n\n /**\n * Save alignment to its button\n */\n selectTypeButton.dataset[\"textAlign\"] = alignment.name;\n\n /**\n * Set up click handler\n */\n selectTypeButton.addEventListener(\"click\", () => {\n this.setAlignment(alignment);\n });\n\n /**\n * Append settings button to holder\n */\n holder.appendChild(selectTypeButton);\n\n /**\n * Save settings buttons\n */\n this.settingsButtons.push(selectTypeButton);\n });\n\n // Add `Typography` selector\n if (this.typography) {\n const typographyForParagraph = Object.values(this.typography).filter(\n item => item.component === \"p\"\n );\n\n const selectTypeButton = document.createElement(\"SELECT\") as HTMLSelectElement;\n // Add editor's default input style\n selectTypeButton.classList.add(this.api.styles.input);\n // Add typography options\n typographyForParagraph.forEach(item => {\n const option = new Option(item.label, item.className);\n\n selectTypeButton.appendChild(option);\n });\n // Add \"onclick\" handler\n selectTypeButton.onclick = event => {\n const { value } = event.target as HTMLSelectElement;\n this.setTypographyClass(value);\n };\n\n /**\n * Append settings button to holder\n */\n holder.appendChild(selectTypeButton);\n\n /**\n * Save settings buttons\n */\n this.settingsButtons.push(selectTypeButton);\n }\n\n return holder;\n }\n\n /**\n * Method that specified how to merge two Text blocks.\n * Called by Editor.js by backspace at the beginning of the Block\n * @param {ParagraphData} data\n * @public\n */\n public merge(data: ParagraphData): void {\n this.data = {\n ...this.data,\n text: this.data.text + data.text\n };\n }\n\n /**\n * Validate Paragraph block data:\n * - check for emptiness\n *\n * @param {ParagraphData} savedData — data received after saving\n * @returns {boolean} false if saved data is not correct, otherwise true\n * @public\n */\n public validate(savedData: ParagraphData): boolean {\n return !(savedData.text.trim() === \"\" && !this._preserveBlank);\n }\n\n /**\n * Extract Tool's data from the view\n * @param {HTMLDivElement} toolsContent - Paragraph tools rendered view\n * @returns {ParagraphData} - saved data\n * @public\n */\n public save(toolsContent: HTMLElement) {\n return {\n text: toolsContent.innerHTML,\n textAlign: this.getTextAlign(toolsContent.className),\n className: this.data.className\n };\n }\n\n /**\n * Extract textAlign from className\n *\n * @param {string} className - heading element className\n * @returns {TextAlign} textAlign\n */\n public getTextAlign(className: string): TextAlign {\n let textAlign = TextAlign.START;\n // Match className with alignment\n this.alignments.forEach(alignment => {\n if (className.includes(`ce-header-text--${alignment.name}`)) {\n textAlign = alignment.name;\n }\n });\n return textAlign;\n }\n\n /**\n * On paste callback fired from Editor.\n *\n * @param {PasteEvent} event - event with pasted data\n */\n public onPaste(event: PasteEvent): void {\n const detail = event.detail as HTMLPasteEventDetail;\n this.data = {\n ...this.data,\n text: detail.data.innerHTML\n };\n }\n\n /**\n * Callback for Block's settings buttons\n *\n * @param {number} alignment - level to set\n */\n public setAlignment(alignment: Alignment): void {\n this.data = {\n textAlign: alignment.name,\n text: this.data.text\n };\n\n /**\n * Highlight button by selected level\n */\n this.settingsButtons.forEach(button => {\n button.classList.toggle(\n this._CSS.settingsButtonActive,\n button.dataset[\"textAlign\"] === alignment.name\n );\n });\n }\n\n /**\n * Callback for Block's settings buttons\n *\n * @param {string} className - name of typography class\n */\n public setTypographyClass(className: string): void {\n this.data = {\n textAlign: this.data.textAlign,\n text: this.data.text,\n className: className\n };\n }\n\n /**\n * Normalize input data\n *\n * @param {HeaderData} data - saved data to process\n *\n * @returns {HeaderData}\n * @private\n */\n public normalizeData(data?: Partial<ParagraphData>): ParagraphData {\n const newData: Partial<ParagraphData> = {};\n\n if (typeof data !== \"object\") {\n data = {};\n }\n\n newData.text = data.text || \"\";\n newData.textAlign = data.textAlign || TextAlign.START;\n newData.className = data.className || \"\";\n\n return newData as ParagraphData;\n }\n}\n\nexport default Paragraph;\n"],"mappings":"AAEA,SAASA,UAAU,EAAEC,SAAS,EAAEC,eAAe;;AAG/C;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;;AAqBA,MAAMC,SAAS,CAAC;EAIZ;;EASA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACWC,WAAWA,CAAC;IAAEC,IAAI;IAAEC,MAAM;IAAEC,GAAG;IAAEC;EAAwB,CAAC,EAAE;IAC/D,IAAI,CAACD,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,UAAU,GAAGH,MAAM,CAACG,UAAU,IAAI,IAAI;IAC3C,IAAI,CAACC,IAAI,GAAG;MACRC,KAAK,EAAE,IAAI,CAACJ,GAAG,CAACK,MAAM,CAACD,KAAK;MAC5BE,cAAc,EAAE,IAAI,CAACN,GAAG,CAACK,MAAM,CAACC,cAAc;MAC9CC,oBAAoB,EAAE,IAAI,CAACP,GAAG,CAACK,MAAM,CAACE,oBAAoB;MAC1DC,OAAO,EAAE;IACb,CAAC;IAED,IAAI,CAAC,IAAI,CAACP,QAAQ,EAAE;MAChB,IAAI,CAACQ,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAC,IAAI,CAAC;IAC1C;;IAEA;AACR;AACA;AACA;IACQ,IAAI,CAACC,YAAY,GAAGZ,MAAM,CAACa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