@webiny/app-admin 0.0.0-unstable.de38392959 → 0.0.0-unstable.df7a8bb475
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 +41 -41
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset/LinkEditForm.d.ts +6 -0
- package/base/Base/LexicalPreset/LinkEditForm.js +63 -0
- package/base/Base/LexicalPreset/LinkEditForm.js.map +1 -0
- package/base/Base/LexicalPreset.d.ts +2 -0
- package/base/Base/LexicalPreset.js +68 -0
- package/base/Base/LexicalPreset.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
- package/base/Base/Menus/SupportMenuItems.js +18 -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 +114 -0
- package/base/Base/Menus.js.map +1 -0
- 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/wby-square.svg +3 -0
- package/base/Base/Tenant.d.ts +2 -0
- package/base/Base/Tenant.js +24 -0
- package/base/Base/Tenant.js.map +1 -0
- 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.d.ts +1 -1
- package/base/Base.js +10 -74
- 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.d.ts +2 -0
- package/base/WebinyVersion.js +24 -0
- package/base/WebinyVersion.js.map +1 -0
- package/base/createRootContainer.d.ts +2 -0
- package/base/createRootContainer.js +55 -0
- package/base/createRootContainer.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +11 -22
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.d.ts +1 -0
- package/base/providers/AdminUiStateProvider.js +14 -0
- package/base/providers/AdminUiStateProvider.js.map +1 -0
- package/base/providers/ApolloProvider.d.ts +2 -2
- package/base/providers/ApolloProvider.js +8 -18
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.d.ts +1 -0
- package/base/providers/UiProviders.js +35 -0
- package/base/providers/UiProviders.js.map +1 -0
- package/base/providers/UiStateProvider.d.ts +1 -6
- package/base/providers/UiStateProvider.js +10 -16
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +34 -4
- package/base/ui/Brand.js +5 -14
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +18 -2
- package/base/ui/CenteredView.js +12 -34
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +34 -4
- package/base/ui/Dashboard.js +5 -14
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +30 -27
- package/base/ui/FileManager.js +52 -63
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/Layout.d.ts +36 -4
- package/base/ui/Layout.js +8 -18
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +38 -3
- package/base/ui/LoginScreen.js +20 -17
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +34 -9
- package/base/ui/Logo.js +5 -29
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +34 -30
- package/base/ui/Navigation.js +12 -148
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +34 -4
- package/base/ui/NotFound.js +5 -14
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.d.ts +2 -2
- package/base/ui/Tags.js +14 -21
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.d.ts +39 -0
- package/base/ui/TenantSelector.js +8 -0
- package/base/ui/TenantSelector.js.map +1 -0
- package/base/ui/UserMenu/UserMenu.d.ts +39 -0
- package/base/ui/UserMenu/UserMenu.js +8 -0
- package/base/ui/UserMenu/UserMenu.js.map +1 -0
- package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
- package/base/ui/UserMenu/UserMenuHandle.js +8 -0
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
- package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuItem.js +19 -0
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
- package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuLink.js +19 -0
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
- package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
- package/base/ui/UserMenu.d.ts +68 -44
- package/base/ui/UserMenu.js +14 -110
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.d.ts +1 -1
- package/components/AdminLayout.js +7 -14
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +2 -1
- package/components/BulkActions/Worker.js +99 -145
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.d.ts +2 -2
- package/components/BulkActions/index.js +2 -27
- package/components/BulkActions/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +4 -4
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +20 -28
- 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 -16
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +3 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +41 -69
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +10 -9
- package/components/Buttons/Buttons.js +61 -62
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.d.ts +2 -3
- package/components/Buttons/Buttons.styles.js +14 -12
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.d.ts +2 -2
- package/components/Buttons/index.js +2 -25
- package/components/Buttons/index.js.map +1 -1
- package/components/Buttons/useButtons.d.ts +2 -2
- package/components/Buttons/useButtons.js +13 -21
- package/components/Buttons/useButtons.js.map +1 -1
- 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 +38 -0
- package/components/Dialogs/DialogsContext.js +132 -0
- package/components/Dialogs/DialogsContext.js.map +1 -0
- package/components/Dialogs/useDialogs.d.ts +2 -0
- package/components/Dialogs/useDialogs.js +11 -0
- package/components/Dialogs/useDialogs.js.map +1 -0
- package/components/EmptyView.d.ts +4 -4
- package/components/EmptyView.js +28 -58
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +6 -6
- package/components/Filters/Filters.js +12 -21
- package/components/Filters/Filters.js.map +1 -1
- 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 -1
- package/components/Filters/index.js +2 -16
- package/components/Filters/index.js.map +1 -1
- package/components/FloatingActionButton.d.ts +1 -1
- package/components/FloatingActionButton.js +7 -14
- package/components/FloatingActionButton.js.map +1 -1
- package/components/FloatingPanel.d.ts +13 -0
- package/components/FloatingPanel.js +94 -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 +110 -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 +67 -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 +127 -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 +11 -7
- package/components/LexicalEditor/LexicalEditor.js +34 -24
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/index.d.ts +2 -1
- package/components/LexicalEditor/index.js +2 -12
- 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/MultiImageUpload.d.ts +2 -2
- package/components/MultiImageUpload.js +8 -32
- package/components/MultiImageUpload.js.map +1 -1
- 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.d.ts +2 -1
- package/components/OptionsMenu/OptionsMenu.js +17 -24
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuItem.d.ts +2 -1
- package/components/OptionsMenu/OptionsMenuItem.js +12 -18
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuLink.d.ts +4 -2
- package/components/OptionsMenu/OptionsMenuLink.js +13 -37
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -1
- package/components/OptionsMenu/index.d.ts +4 -4
- package/components/OptionsMenu/index.js +4 -51
- package/components/OptionsMenu/index.js.map +1 -1
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +3 -3
- package/components/OptionsMenu/useOptionsMenuItem.js +12 -20
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.d.ts +6 -16
- package/components/OverlayLayout/OverlayLayout.js +41 -154
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
- package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
- package/components/OverlayLayout/components/OverlayContent.js +21 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
- package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
- package/components/OverlayLayout/components/OverlayHeader.js +44 -0
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
- package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
- package/components/OverlayLayout/components/OverlayRoot.js +19 -0
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
- package/components/OverlayLayout/components/index.d.ts +4 -0
- package/components/OverlayLayout/components/index.js +6 -0
- package/components/OverlayLayout/components/index.js.map +1 -0
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +1 -16
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/CannotUseAaclAlert.d.ts +2 -2
- package/components/Permissions/CannotUseAaclAlert.js +5 -13
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +4 -4
- package/components/Permissions/Permissions.js +37 -49
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.d.ts +6 -0
- package/components/Permissions/PermissionsGroup.js +18 -0
- package/components/Permissions/PermissionsGroup.js.map +1 -0
- package/components/Permissions/StyledComponents.d.ts +3 -4
- package/components/Permissions/StyledComponents.js +12 -28
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +4 -3
- package/components/Permissions/index.js +4 -35
- 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 -0
- package/components/ResizablePanels/index.js +3 -0
- package/components/ResizablePanels/index.js.map +1 -0
- 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 +3 -3
- package/components/SearchUI.js +22 -69
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +14 -7
- package/components/SimpleForm/SimpleForm.js +72 -71
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.d.ts +1 -1
- package/components/SimpleForm/index.js +1 -30
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +3 -2
- package/components/SimpleUI/InputField.js +41 -50
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +21 -8
- package/components/SingleImageUpload.js +39 -77
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +11 -9
- package/components/SplitView/SplitView.js +59 -72
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.d.ts +1 -1
- package/components/SplitView/index.js +1 -24
- package/components/SplitView/index.js.map +1 -1
- package/components/StateInspector.d.ts +8 -0
- package/components/StateInspector.js +36 -0
- package/components/StateInspector.js.map +1 -0
- package/components/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 +8 -2
- package/components/Wcp.js +30 -16
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +27 -1
- package/components/index.js +27 -12
- 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 +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 +24 -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 +40 -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 +40 -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 +352 -0
- package/config/AdminConfig/Menu.js +85 -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 +24 -0
- package/config/AdminConfig/Tenant/TenantLogo.js +24 -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 +19 -0
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
- package/config/AdminConfig/Tenant.d.ts +49 -0
- package/config/AdminConfig/Tenant.js +14 -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/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 +479 -0
- package/config/AdminConfig.js +68 -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/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/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 +3 -0
- package/exports/admin.js +5 -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 +105 -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 +3 -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 -7
- package/hooks/index.js +11 -82
- package/hooks/index.js.map +1 -1
- package/hooks/useConfirmationDialog.d.ts +1 -1
- package/hooks/useConfirmationDialog.js +26 -40
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +21 -2
- package/hooks/useDialog.js +16 -24
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useIsMounted.js +6 -15
- package/hooks/useIsMounted.js.map +1 -1
- package/hooks/useKeyHandler.d.ts +3 -3
- package/hooks/useKeyHandler.js +28 -46
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +9 -21
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useShiftKey.js +13 -26
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useSnackbar.d.ts +1 -0
- package/hooks/useSnackbar.js +23 -26
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +1 -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/hooks/useToggler.d.ts +7 -0
- package/hooks/useToggler.js +15 -0
- package/hooks/useToggler.js.map +1 -0
- package/index.d.ts +33 -38
- package/index.js +41 -375
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +66 -53
- package/plugins/MenuPlugin.d.ts +1 -1
- package/plugins/MenuPlugin.js +15 -39
- package/plugins/MenuPlugin.js.map +1 -1
- package/plugins/PermissionRendererPlugin.d.ts +1 -1
- package/plugins/PermissionRendererPlugin.js +15 -39
- package/plugins/PermissionRendererPlugin.js.map +1 -1
- 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/styles.scss +7 -2
- package/types.d.ts +9 -105
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/base/providers/TelemetryProvider.d.ts +0 -6
- package/base/providers/TelemetryProvider.js +0 -28
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -20
- package/base/providers/ViewCompositionProvider.js +0 -59
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -9
- package/base/ui/LocaleSelector.js +0 -17
- package/base/ui/LocaleSelector.js.map +0 -1
- package/base/ui/Menu.d.ts +0 -36
- package/base/ui/Menu.js +0 -138
- package/base/ui/Menu.js.map +0 -1
- package/base/ui/Search.d.ts +0 -30
- package/base/ui/Search.js +0 -65
- package/base/ui/Search.js.map +0 -1
- package/components/AppInstaller/AppInstaller.d.ts +0 -11
- package/components/AppInstaller/AppInstaller.js +0 -123
- package/components/AppInstaller/AppInstaller.js.map +0 -1
- package/components/AppInstaller/Sidebar.d.ts +0 -9
- package/components/AppInstaller/Sidebar.js +0 -147
- 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 -24
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -19
- package/components/AppInstaller/styled.js +0 -89
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -25
- package/components/AppInstaller/useInstaller.js +0 -180
- package/components/AppInstaller/useInstaller.js.map +0 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.d.ts +0 -20
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.js +0 -28
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.js.map +0 -1
- package/components/Filters/Filters.styled.d.ts +0 -13
- package/components/Filters/Filters.styled.js +0 -25
- package/components/Filters/Filters.styled.js.map +0 -1
- package/components/OptionsMenu/OptionsMenu.styled.d.ts +0 -34
- package/components/OptionsMenu/OptionsMenu.styled.js +0 -16
- package/components/OptionsMenu/OptionsMenu.styled.js.map +0 -1
- package/components/OverlayLayout/icons/close.svg +0 -13
- package/components/OverlayLayout/icons/navigate_before.svg +0 -16
- package/components/RichTextEditor/RichTextEditor.d.ts +0 -3
- package/components/RichTextEditor/RichTextEditor.js +0 -25
- package/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/components/RichTextEditor/index.d.ts +0 -2
- package/components/RichTextEditor/index.js +0 -21
- package/components/RichTextEditor/index.js.map +0 -1
- package/components/RichTextEditor/styles.scss +0 -96
- package/components/RichTextEditor/tools/header/index.d.ts +0 -227
- package/components/RichTextEditor/tools/header/index.js +0 -683
- 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 -239
- 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 -14
- 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 -126
- 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 +0 -7
- 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 -279
- package/components/RichTextEditor/tools/image/ui.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -207
- package/components/RichTextEditor/tools/paragraph/index.js +0 -489
- 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 -237
- 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 -33
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -44
- package/components/Routes.js.map +0 -1
- package/plugins/globalSearch/SearchBar.d.ts +0 -19
- package/plugins/globalSearch/SearchBar.js +0 -229
- package/plugins/globalSearch/SearchBar.js.map +0 -1
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -23
- package/plugins/globalSearch/SearchBarDropdown.js +0 -85
- package/plugins/globalSearch/SearchBarDropdown.js.map +0 -1
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -6
- package/plugins/globalSearch/index.js +0 -18
- package/plugins/globalSearch/index.js.map +0 -1
- package/plugins/globalSearch/styled.d.ts +0 -18
- package/plugins/globalSearch/styled.js +0 -130
- package/plugins/globalSearch/styled.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -63
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/styles/material-theme-assignments.scss +0 -350
- package/styles/material.scss +0 -43
- package/styles/theme.scss +0 -76
- package/ui/UIElement.d.ts +0 -2
- package/ui/UIElement.js +0 -20
- package/ui/UIElement.js.map +0 -1
- package/ui/UILayout.d.ts +0 -1
- package/ui/UILayout.js +0 -20
- package/ui/UILayout.js.map +0 -1
- package/ui/UIRenderer.d.ts +0 -2
- package/ui/UIRenderer.js +0 -14
- package/ui/UIRenderer.js.map +0 -1
- package/ui/UIView.d.ts +0 -2
- package/ui/UIView.js +0 -26
- package/ui/UIView.js.map +0 -1
- package/ui/elements/AccordionElement.d.ts +0 -27
- package/ui/elements/AccordionElement.js +0 -86
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -24
- package/ui/elements/ButtonElement.js +0 -88
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -6
- package/ui/elements/ButtonGroupElement.js +0 -50
- package/ui/elements/ButtonGroupElement.js.map +0 -1
- package/ui/elements/GenericElement.d.ts +0 -1
- package/ui/elements/GenericElement.js +0 -18
- package/ui/elements/GenericElement.js.map +0 -1
- package/ui/elements/LabelElement.d.ts +0 -16
- package/ui/elements/LabelElement.js +0 -48
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -33
- package/ui/elements/NavigationMenuElement.js +0 -146
- package/ui/elements/NavigationMenuElement.js.map +0 -1
- package/ui/elements/PanelElement.d.ts +0 -3
- package/ui/elements/PanelElement.js +0 -24
- package/ui/elements/PanelElement.js.map +0 -1
- package/ui/elements/PlaceholderElement.d.ts +0 -6
- package/ui/elements/PlaceholderElement.js +0 -35
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -6
- package/ui/elements/SmallButtonElement.js +0 -47
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -13
- package/ui/elements/TypographyElement.js +0 -50
- package/ui/elements/TypographyElement.js.map +0 -1
- package/ui/elements/ViewElement.d.ts +0 -1
- package/ui/elements/ViewElement.js +0 -18
- package/ui/elements/ViewElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +0 -6
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -46
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement.d.ts +0 -43
- package/ui/elements/form/DynamicFieldsetElement.js +0 -137
- 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 -28
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +0 -7
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +0 -75
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +0 -13
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +0 -106
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +0 -25
- package/ui/elements/form/FileManagerElement/styled.js +0 -117
- package/ui/elements/form/FileManagerElement/styled.js.map +0 -1
- package/ui/elements/form/FileManagerElement.d.ts +0 -24
- package/ui/elements/form/FileManagerElement.js +0 -87
- package/ui/elements/form/FileManagerElement.js.map +0 -1
- package/ui/elements/form/FormElement.d.ts +0 -21
- package/ui/elements/form/FormElement.js +0 -47
- package/ui/elements/form/FormElement.js.map +0 -1
- package/ui/elements/form/FormFieldElement.d.ts +0 -56
- package/ui/elements/form/FormFieldElement.js +0 -175
- package/ui/elements/form/FormFieldElement.js.map +0 -1
- package/ui/elements/form/HiddenElement.d.ts +0 -6
- package/ui/elements/form/HiddenElement.js +0 -49
- package/ui/elements/form/HiddenElement.js.map +0 -1
- package/ui/elements/form/InputElement.d.ts +0 -7
- package/ui/elements/form/InputElement.js +0 -56
- 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 -53
- 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 -15
- package/ui/elements/form/SelectElement.js +0 -71
- package/ui/elements/form/SelectElement.js.map +0 -1
- package/ui/elements/form/TextareaElement.d.ts +0 -15
- package/ui/elements/form/TextareaElement.js +0 -57
- 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 -56
- 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 -106
- package/ui/views/AdminView/HeaderElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -44
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -44
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionRightElement.js +0 -44
- 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 -48
- 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 -33
- package/ui/views/AdminView/components/Hamburger.js.map +0 -1
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -34
- package/ui/views/AdminView/components/Snackbar.js.map +0 -1
- package/ui/views/FormView/FormContainerElement.d.ts +0 -12
- package/ui/views/FormView/FormContainerElement.js +0 -52
- package/ui/views/FormView/FormContainerElement.js.map +0 -1
- package/ui/views/FormView/FormContentElement.d.ts +0 -3
- package/ui/views/FormView/FormContentElement.js +0 -24
- package/ui/views/FormView/FormContentElement.js.map +0 -1
- package/ui/views/FormView/FormFooterElement.d.ts +0 -6
- package/ui/views/FormView/FormFooterElement.js +0 -51
- package/ui/views/FormView/FormFooterElement.js.map +0 -1
- package/ui/views/FormView/FormHeaderElement.d.ts +0 -14
- package/ui/views/FormView/FormHeaderElement.js +0 -83
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -169
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -6
- package/ui/views/OverlayView/ContentElement.js +0 -44
- package/ui/views/OverlayView/ContentElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderElement.d.ts +0 -24
- package/ui/views/OverlayView/HeaderElement.js +0 -113
- package/ui/views/OverlayView/HeaderElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +0 -13
- package/ui/views/OverlayView/HeaderTitleElement.js +0 -53
- 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 -46
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -29
- package/ui/views/OverlayView.js +0 -165
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -11
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -73
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -122
- package/ui/views/SplitView.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","Paragraph","_ref","data","config","api","readOnly","_classCallCheck2","default","typography","_CSS","block","styles","settingsButton","settingsButtonActive","wrapper","onKeyUp","bind","_placeholder","placeholder","DEFAULT_PLACEHOLDER","_data","normalizeData","_element","drawView","_preserveBlank","preserveBlank","undefined","settingsButtons","alignments","ALIGNMENTS","_createClass2","key","get","text","innerHTML","_objectSpread2","set","_this","forEach","alignment","name","textAlign","classList","add","concat","remove","className","_this$_element$classL","apply","_toConsumableArray2","split","_this2","find","TextAlign","START","svg","ALIGNMENT_ICONS","start","value","e","code","textContent","div","document","createElement","contentEditable","dataset","i18n","t","addEventListener","render","renderSettings","_this3","holder","selectTypeButton","currentAlignment","setAlignment","appendChild","push","typographyForParagraph","Object","values","filter","item","component","input","option","Option","label","onclick","event","_ref2","target","setTypographyClass","merge","validate","savedData","trim","save","toolsContent","getTextAlign","includes","onPaste","detail","_this4","button","toggle","newData","export","import","br","tags","icon","title","_default","exports"],"sources":["index.ts"],"sourcesContent":["import { API, PasteEvent } from \"@editorjs/editorjs\";\nimport { Alignment, ALIGNMENTS, TextAlign, ALIGNMENT_ICONS } from \"../utils\";\nimport { 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":";;;;;;;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAJA,IAyBMC,SAAS;EAIX;;EASA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACI,SAAAA,UAAAC,IAAA,EAAmE;IAAA,IAA9CC,IAAI,GAAAD,IAAA,CAAJC,IAAI;MAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;MAAEC,GAAG,GAAAH,IAAA,CAAHG,GAAG;MAAEC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAP,SAAA;IAC5C,IAAI,CAACI,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACG,UAAU,GAAGL,MAAM,CAACK,UAAU,IAAI,IAAI;IAC3C,IAAI,CAACC,IAAI,GAAG;MACRC,KAAK,EAAE,IAAI,CAACN,GAAG,CAACO,MAAM,CAACD,KAAK;MAC5BE,cAAc,EAAE,IAAI,CAACR,GAAG,CAACO,MAAM,CAACC,cAAc;MAC9CC,oBAAoB,EAAE,IAAI,CAACT,GAAG,CAACO,MAAM,CAACE,oBAAoB;MAC1DC,OAAO,EAAE;IACb,CAAC;IAED,IAAI,CAAC,IAAI,CAACT,QAAQ,EAAE;MAChB,IAAI,CAACU,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAC,IAAI,CAAC;IAC1C;;IAEA;AACR;AACA;AACA;IACQ,IAAI,CAACC,YAAY,GAAGd,MAAM,CAACe,WAAW,GAAGf,MAAM,CAACe,WAAW,GAAGlB,SAAS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EAA6B;MACzB,OAAO;QACHC,IAAI,EAAE;UACF6E,EAAE,EAAE;QACR;MACJ,CAAC;IACL;;IAEA;AACJ;AACA;AACA;AACA;EAJI;IAAA/E,GAAA;IAAAC,GAAA,EAKA,SAAAA,IAAA,EAAiD;MAC7C,OAAO,IAAI;IACf;EAAC;IAAAD,GAAA;IAAAC,GAAA,EAwDD,SAAAA,IAAA,EAAgC;MAC5B,OAAO;QACH+E,IAAI,EAAE,CAAC,GAAG;MACd,CAAC;IACL;;IAEA;AACJ;AACA;AACA;AACA;EAJI;IAAAhF,GAAA;IAAAC,GAAA,EAKA,SAAAA,IAAA,EAA4B;MACxB,OAAO;QACHgF,IAAI,EACA,6FAA6F,GAC7F,8bAA8b,GAC9b,QAAQ;QACZC,KAAK,EAAE;MACX,CAAC;IACL;EAAC;EAAA,OAAAjH,SAAA;AAAA;AAAA,IAAAkH,QAAA,GAkRUlH,SAAS;AAAAmH,OAAA,CAAA5G,OAAA,GAAA2G,QAAA"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.ce-paragraph {
|
|
2
|
-
line-height: 1.6em;
|
|
3
|
-
outline: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.ce-paragraph[data-placeholder]:empty::before {
|
|
7
|
-
content: attr(data-placeholder);
|
|
8
|
-
color: #707684;
|
|
9
|
-
font-weight: normal;
|
|
10
|
-
opacity: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/** Show placeholder at the first paragraph if Editor is empty */
|
|
14
|
-
.codex-editor--empty .ce-block:first-of-type .ce-paragraph[data-placeholder]:empty::before {
|
|
15
|
-
opacity: 1;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.codex-editor--toolbox-opened .ce-block:first-of-type .ce-paragraph[data-placeholder]:empty::before,
|
|
19
|
-
.codex-editor--empty .ce-block:first-of-type .ce-paragraph[data-placeholder]:empty:focus::before {
|
|
20
|
-
opacity: 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ce-paragraph p:first-of-type {
|
|
24
|
-
margin-top: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.ce-paragraph p:last-of-type {
|
|
28
|
-
margin-bottom: 0;
|
|
29
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { API } from "@editorjs/editorjs";
|
|
2
|
-
interface Config {
|
|
3
|
-
themeColors: string[];
|
|
4
|
-
}
|
|
5
|
-
interface TextColorToolParams {
|
|
6
|
-
api: API;
|
|
7
|
-
config: Config;
|
|
8
|
-
}
|
|
9
|
-
interface SanitizeResultSpanResult {
|
|
10
|
-
class?: string;
|
|
11
|
-
style?: CSSStyleDeclaration;
|
|
12
|
-
}
|
|
13
|
-
interface SanitizeResult {
|
|
14
|
-
span: (element: HTMLElement) => SanitizeResultSpanResult;
|
|
15
|
-
}
|
|
16
|
-
declare class TextColorTool {
|
|
17
|
-
private _state;
|
|
18
|
-
private color;
|
|
19
|
-
private readonly api;
|
|
20
|
-
private readonly tag;
|
|
21
|
-
private readonly class;
|
|
22
|
-
private colorPicker;
|
|
23
|
-
private button;
|
|
24
|
-
private readonly config;
|
|
25
|
-
private readonly _CSS;
|
|
26
|
-
constructor({ api, config }: TextColorToolParams);
|
|
27
|
-
static get isInline(): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Sanitize method returns rules to let Editor know which HTML tags it should respect.
|
|
30
|
-
* @returns {object} sanitizer configuration.
|
|
31
|
-
* https://editorjs.io/sanitizer
|
|
32
|
-
*/
|
|
33
|
-
static get sanitize(): SanitizeResult;
|
|
34
|
-
get state(): boolean;
|
|
35
|
-
set state(state: boolean);
|
|
36
|
-
/**
|
|
37
|
-
* Render method must return HTML element of the button for Inline Toolbar.
|
|
38
|
-
*/
|
|
39
|
-
render(): HTMLButtonElement;
|
|
40
|
-
/**
|
|
41
|
-
* Input for the link
|
|
42
|
-
*/
|
|
43
|
-
renderActions(): HTMLElement;
|
|
44
|
-
/**
|
|
45
|
-
* Finally, when button is pressed Editor calls
|
|
46
|
-
* surround method of the tool with Range object as an argument.
|
|
47
|
-
*/
|
|
48
|
-
surround(range: Range): void;
|
|
49
|
-
wrap(range: Range): void;
|
|
50
|
-
unwrap(range: Range): void;
|
|
51
|
-
showActions(mark: HTMLElement): void;
|
|
52
|
-
hideActions(): void;
|
|
53
|
-
/**
|
|
54
|
-
* CheckState method of each Inline Tool is called by Editor with current `Selection`
|
|
55
|
-
* when user selects some text
|
|
56
|
-
*/
|
|
57
|
-
checkState(): void;
|
|
58
|
-
convertToHex(color: string): string;
|
|
59
|
-
clear(): void;
|
|
60
|
-
}
|
|
61
|
-
export default TextColorTool;
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var COLOR_TOOL_CLASS = "cdx-text-color";
|
|
11
|
-
var TextColorTool = /*#__PURE__*/function () {
|
|
12
|
-
function TextColorTool(_ref) {
|
|
13
|
-
var api = _ref.api,
|
|
14
|
-
config = _ref.config;
|
|
15
|
-
(0, _classCallCheck2.default)(this, TextColorTool);
|
|
16
|
-
this.api = api;
|
|
17
|
-
this.button = null;
|
|
18
|
-
this.colorPicker = null;
|
|
19
|
-
this._state = false;
|
|
20
|
-
this.tag = "SPAN";
|
|
21
|
-
this.color = "red";
|
|
22
|
-
this.class = COLOR_TOOL_CLASS;
|
|
23
|
-
this.config = config || {
|
|
24
|
-
themeColors: ["#44bd32"]
|
|
25
|
-
};
|
|
26
|
-
this._CSS = {
|
|
27
|
-
colorPicker: "ce-text-color-tool",
|
|
28
|
-
colorBox: "ce-text-color-tool__color-box",
|
|
29
|
-
colorBoxActive: "ce-text-color-tool__color-box--active"
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
(0, _createClass2.default)(TextColorTool, [{
|
|
33
|
-
key: "state",
|
|
34
|
-
get: function get() {
|
|
35
|
-
return this._state;
|
|
36
|
-
},
|
|
37
|
-
set: function set(state) {
|
|
38
|
-
this._state = state;
|
|
39
|
-
if (!this.button) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
this.button.classList.toggle(this.api.styles.inlineToolButtonActive, state);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Render method must return HTML element of the button for Inline Toolbar.
|
|
46
|
-
*/
|
|
47
|
-
}, {
|
|
48
|
-
key: "render",
|
|
49
|
-
value: function render() {
|
|
50
|
-
this.button = document.createElement("button");
|
|
51
|
-
this.button.type = "button";
|
|
52
|
-
this.button.innerHTML = '<svg width="20" height="18"><path d="M10.458 12.04l2.919 1.686-.781 1.417-.984-.03-.974 1.687H8.674l1.49-2.583-.508-.775.802-1.401zm.546-.952l3.624-6.327a1.597 1.597 0 0 1 2.182-.59 1.632 1.632 0 0 1 .615 2.201l-3.519 6.391-2.902-1.675zm-7.73 3.467h3.465a1.123 1.123 0 1 1 0 2.247H3.273a1.123 1.123 0 1 1 0-2.247z"/></svg>';
|
|
53
|
-
this.button.classList.add(this.api.styles.inlineToolButton);
|
|
54
|
-
return this.button;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Input for the link
|
|
59
|
-
*/
|
|
60
|
-
}, {
|
|
61
|
-
key: "renderActions",
|
|
62
|
-
value: function renderActions() {
|
|
63
|
-
var _this = this;
|
|
64
|
-
// Create action element
|
|
65
|
-
this.colorPicker = document.createElement("div");
|
|
66
|
-
// Add element properties
|
|
67
|
-
this.colorPicker.classList.add(this._CSS.colorPicker);
|
|
68
|
-
this.config.themeColors.forEach(function (color) {
|
|
69
|
-
// create element
|
|
70
|
-
var colorBox = document.createElement("button");
|
|
71
|
-
// add properties
|
|
72
|
-
colorBox.style.backgroundColor = color;
|
|
73
|
-
colorBox.classList.add(_this._CSS.colorBox);
|
|
74
|
-
colorBox.addEventListener("click", function () {
|
|
75
|
-
if (_this.color === color) {
|
|
76
|
-
// reset the color
|
|
77
|
-
_this.color = "unset";
|
|
78
|
-
} else {
|
|
79
|
-
// set color
|
|
80
|
-
_this.color = color;
|
|
81
|
-
}
|
|
82
|
-
if (_this.colorPicker) {
|
|
83
|
-
/**
|
|
84
|
-
* TODO @ts-refactor
|
|
85
|
-
* TS Complains there is no classList on child node.
|
|
86
|
-
*/
|
|
87
|
-
_this.colorPicker.childNodes.forEach(function (node) {
|
|
88
|
-
if (node.classList.contains(_this._CSS.colorBoxActive)) {
|
|
89
|
-
// remove active class
|
|
90
|
-
node.classList.remove(_this._CSS.colorBoxActive);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
// add active class
|
|
95
|
-
colorBox.classList.add(_this._CSS.colorBoxActive);
|
|
96
|
-
});
|
|
97
|
-
if (!_this.colorPicker) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
// save element
|
|
101
|
-
_this.colorPicker.appendChild(colorBox);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// Return element
|
|
105
|
-
return this.colorPicker;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Finally, when button is pressed Editor calls
|
|
110
|
-
* surround method of the tool with Range object as an argument.
|
|
111
|
-
*/
|
|
112
|
-
}, {
|
|
113
|
-
key: "surround",
|
|
114
|
-
value: function surround(range) {
|
|
115
|
-
if (this.state) {
|
|
116
|
-
this.unwrap(range);
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
this.wrap(range);
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "wrap",
|
|
123
|
-
value: function wrap(range) {
|
|
124
|
-
var selectedText = range.extractContents();
|
|
125
|
-
var mark = document.createElement(this.tag);
|
|
126
|
-
mark.classList.add(this.class);
|
|
127
|
-
mark.appendChild(selectedText);
|
|
128
|
-
range.insertNode(mark);
|
|
129
|
-
this.api.selection.expandToTag(mark);
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
key: "unwrap",
|
|
133
|
-
value: function unwrap(range) {
|
|
134
|
-
var mark = this.api.selection.findParentTag(this.tag, this.class);
|
|
135
|
-
var text = range.extractContents();
|
|
136
|
-
if (mark) {
|
|
137
|
-
mark.remove();
|
|
138
|
-
}
|
|
139
|
-
range.insertNode(text);
|
|
140
|
-
}
|
|
141
|
-
}, {
|
|
142
|
-
key: "showActions",
|
|
143
|
-
value: function showActions(mark) {
|
|
144
|
-
var _this2 = this;
|
|
145
|
-
if (!this.colorPicker) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
this.colorPicker.onclick = function () {
|
|
149
|
-
mark.style.color = _this2.color;
|
|
150
|
-
};
|
|
151
|
-
this.colorPicker.hidden = false;
|
|
152
|
-
}
|
|
153
|
-
}, {
|
|
154
|
-
key: "hideActions",
|
|
155
|
-
value: function hideActions() {
|
|
156
|
-
if (!this.colorPicker) {
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
this.colorPicker.onchange = null;
|
|
160
|
-
this.colorPicker.hidden = true;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* CheckState method of each Inline Tool is called by Editor with current `Selection`
|
|
165
|
-
* when user selects some text
|
|
166
|
-
*/
|
|
167
|
-
}, {
|
|
168
|
-
key: "checkState",
|
|
169
|
-
value: function checkState() {
|
|
170
|
-
var mark = this.api.selection.findParentTag(this.tag);
|
|
171
|
-
this.state = !!mark;
|
|
172
|
-
if (!!mark) {
|
|
173
|
-
this.showActions(mark);
|
|
174
|
-
} else {
|
|
175
|
-
this.hideActions();
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
key: "convertToHex",
|
|
180
|
-
value: function convertToHex(color) {
|
|
181
|
-
var rgb = color.match(/(\d+)/g);
|
|
182
|
-
if (!rgb) {
|
|
183
|
-
return "";
|
|
184
|
-
}
|
|
185
|
-
var hexR = parseInt(rgb[0]).toString(16);
|
|
186
|
-
var hexG = parseInt(rgb[1]).toString(16);
|
|
187
|
-
var hexB = parseInt(rgb[2]).toString(16);
|
|
188
|
-
hexR = hexR.length === 1 ? "0" + hexR : hexR;
|
|
189
|
-
hexG = hexG.length === 1 ? "0" + hexG : hexG;
|
|
190
|
-
hexB = hexB.length === 1 ? "0" + hexB : hexB;
|
|
191
|
-
return "#" + hexR + hexG + hexB;
|
|
192
|
-
}
|
|
193
|
-
}, {
|
|
194
|
-
key: "clear",
|
|
195
|
-
value: function clear() {
|
|
196
|
-
this.hideActions();
|
|
197
|
-
}
|
|
198
|
-
}], [{
|
|
199
|
-
key: "isInline",
|
|
200
|
-
get: function get() {
|
|
201
|
-
return true;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Sanitize method returns rules to let Editor know which HTML tags it should respect.
|
|
206
|
-
* @returns {object} sanitizer configuration.
|
|
207
|
-
* https://editorjs.io/sanitizer
|
|
208
|
-
*/
|
|
209
|
-
}, {
|
|
210
|
-
key: "sanitize",
|
|
211
|
-
get: function get() {
|
|
212
|
-
// Block Tools are not connected with Inline ones,
|
|
213
|
-
// so markup added by Inline Tool will be removed on pasting or on saving.
|
|
214
|
-
// We need this config so that `class` & `style` attributes will remain intact for "span".
|
|
215
|
-
return {
|
|
216
|
-
/**
|
|
217
|
-
* TODO: figure out the element type
|
|
218
|
-
*/
|
|
219
|
-
span: function span(el) {
|
|
220
|
-
// Respect `class` and `style` attributes if this condition is meet.
|
|
221
|
-
if (el.classList.contains(COLOR_TOOL_CLASS)) {
|
|
222
|
-
return {
|
|
223
|
-
class: COLOR_TOOL_CLASS,
|
|
224
|
-
style: el.style
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
return {};
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
}]);
|
|
232
|
-
return TextColorTool;
|
|
233
|
-
}();
|
|
234
|
-
var _default = TextColorTool;
|
|
235
|
-
exports.default = _default;
|
|
236
|
-
|
|
237
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["COLOR_TOOL_CLASS","TextColorTool","_ref","api","config","_classCallCheck2","default","button","colorPicker","_state","tag","color","class","themeColors","_CSS","colorBox","colorBoxActive","_createClass2","key","get","set","state","classList","toggle","styles","inlineToolButtonActive","value","render","document","createElement","type","innerHTML","add","inlineToolButton","renderActions","_this","forEach","style","backgroundColor","addEventListener","childNodes","node","contains","remove","appendChild","surround","range","unwrap","wrap","selectedText","extractContents","mark","insertNode","selection","expandToTag","findParentTag","text","showActions","_this2","onclick","hidden","hideActions","onchange","checkState","convertToHex","rgb","match","hexR","parseInt","toString","hexG","hexB","length","clear","span","el","_default","exports"],"sources":["index.ts"],"sourcesContent":["import { API } from \"@editorjs/editorjs\";\n\nconst COLOR_TOOL_CLASS = \"cdx-text-color\";\n\ninterface Config {\n themeColors: string[];\n}\n\ninterface TextColorToolParams {\n api: API;\n config: Config;\n}\n\ninterface SanitizeResultSpanResult {\n class?: string;\n style?: CSSStyleDeclaration;\n}\ninterface SanitizeResult {\n span: (element: HTMLElement) => SanitizeResultSpanResult;\n}\n\nclass TextColorTool {\n private _state: boolean;\n private color: string;\n private readonly api: API;\n private readonly tag: string;\n private readonly class: string;\n private colorPicker: HTMLDivElement | null;\n private button: HTMLButtonElement | null;\n private readonly config: Config;\n private readonly _CSS: any;\n\n constructor({ api, config }: TextColorToolParams) {\n this.api = api;\n this.button = null;\n this.colorPicker = null;\n this._state = false;\n this.tag = \"SPAN\";\n this.color = \"red\";\n this.class = COLOR_TOOL_CLASS;\n this.config = config || { themeColors: [\"#44bd32\"] };\n this._CSS = {\n colorPicker: \"ce-text-color-tool\",\n colorBox: \"ce-text-color-tool__color-box\",\n colorBoxActive: \"ce-text-color-tool__color-box--active\"\n };\n }\n\n static get isInline(): boolean {\n return true;\n }\n\n /**\n * Sanitize method returns rules to let Editor know which HTML tags it should respect.\n * @returns {object} sanitizer configuration.\n * https://editorjs.io/sanitizer\n */\n static get sanitize(): SanitizeResult {\n // Block Tools are not connected with Inline ones,\n // so markup added by Inline Tool will be removed on pasting or on saving.\n // We need this config so that `class` & `style` attributes will remain intact for \"span\".\n return {\n /**\n * TODO: figure out the element type\n */\n span: (el: HTMLElement) => {\n // Respect `class` and `style` attributes if this condition is meet.\n if (el.classList.contains(COLOR_TOOL_CLASS)) {\n return {\n class: COLOR_TOOL_CLASS,\n style: el.style\n };\n }\n return {};\n }\n };\n }\n\n get state(): boolean {\n return this._state;\n }\n\n set state(state) {\n this._state = state;\n if (!this.button) {\n return;\n }\n this.button.classList.toggle(this.api.styles.inlineToolButtonActive, state);\n }\n /**\n * Render method must return HTML element of the button for Inline Toolbar.\n */\n public render(): HTMLButtonElement {\n this.button = document.createElement(\"button\");\n this.button.type = \"button\";\n this.button.innerHTML =\n '<svg width=\"20\" height=\"18\"><path d=\"M10.458 12.04l2.919 1.686-.781 1.417-.984-.03-.974 1.687H8.674l1.49-2.583-.508-.775.802-1.401zm.546-.952l3.624-6.327a1.597 1.597 0 0 1 2.182-.59 1.632 1.632 0 0 1 .615 2.201l-3.519 6.391-2.902-1.675zm-7.73 3.467h3.465a1.123 1.123 0 1 1 0 2.247H3.273a1.123 1.123 0 1 1 0-2.247z\"/></svg>';\n this.button.classList.add(this.api.styles.inlineToolButton);\n\n return this.button;\n }\n\n /**\n * Input for the link\n */\n public renderActions(): HTMLElement {\n // Create action element\n this.colorPicker = document.createElement(\"div\");\n // Add element properties\n this.colorPicker.classList.add(this._CSS.colorPicker);\n\n this.config.themeColors.forEach(color => {\n // create element\n const colorBox = document.createElement(\"button\");\n // add properties\n colorBox.style.backgroundColor = color;\n colorBox.classList.add(this._CSS.colorBox);\n\n colorBox.addEventListener(\"click\", () => {\n if (this.color === color) {\n // reset the color\n this.color = \"unset\";\n } else {\n // set color\n this.color = color;\n }\n\n if (this.colorPicker) {\n /**\n * TODO @ts-refactor\n * TS Complains there is no classList on child node.\n */\n this.colorPicker.childNodes.forEach((node: any) => {\n if (node.classList.contains(this._CSS.colorBoxActive)) {\n // remove active class\n node.classList.remove(this._CSS.colorBoxActive);\n }\n });\n }\n // add active class\n colorBox.classList.add(this._CSS.colorBoxActive);\n });\n if (!this.colorPicker) {\n return;\n }\n // save element\n this.colorPicker.appendChild(colorBox);\n });\n\n // Return element\n return this.colorPicker;\n }\n\n /**\n * Finally, when button is pressed Editor calls\n * surround method of the tool with Range object as an argument.\n */\n public surround(range: Range): void {\n if (this.state) {\n this.unwrap(range);\n return;\n }\n\n this.wrap(range);\n }\n\n public wrap(range: Range): void {\n const selectedText = range.extractContents();\n const mark = document.createElement(this.tag);\n\n mark.classList.add(this.class);\n\n mark.appendChild(selectedText);\n range.insertNode(mark);\n\n this.api.selection.expandToTag(mark);\n }\n\n public unwrap(range: Range): void {\n const mark = this.api.selection.findParentTag(this.tag, this.class);\n const text = range.extractContents();\n\n if (mark) {\n mark.remove();\n }\n\n range.insertNode(text);\n }\n\n public showActions(mark: HTMLElement): void {\n if (!this.colorPicker) {\n return;\n }\n this.colorPicker.onclick = () => {\n mark.style.color = this.color;\n };\n this.colorPicker.hidden = false;\n }\n\n public hideActions(): void {\n if (!this.colorPicker) {\n return;\n }\n this.colorPicker.onchange = null;\n this.colorPicker.hidden = true;\n }\n\n /**\n * CheckState method of each Inline Tool is called by Editor with current `Selection`\n * when user selects some text\n */\n public checkState(): void {\n const mark = this.api.selection.findParentTag(this.tag);\n\n this.state = !!mark;\n\n if (!!mark) {\n this.showActions(mark);\n } else {\n this.hideActions();\n }\n }\n\n public convertToHex(color: string): string {\n const rgb = color.match(/(\\d+)/g);\n if (!rgb) {\n return \"\";\n }\n\n let hexR = parseInt(rgb[0]).toString(16);\n let hexG = parseInt(rgb[1]).toString(16);\n let hexB = parseInt(rgb[2]).toString(16);\n\n hexR = hexR.length === 1 ? \"0\" + hexR : hexR;\n hexG = hexG.length === 1 ? \"0\" + hexG : hexG;\n hexB = hexB.length === 1 ? \"0\" + hexB : hexB;\n\n return \"#\" + hexR + hexG + hexB;\n }\n\n public clear(): void {\n this.hideActions();\n }\n}\n\nexport default TextColorTool;\n"],"mappings":";;;;;;;;;AAEA,IAAMA,gBAAgB,GAAG,gBAAgB;AAAC,IAmBpCC,aAAa;EAWf,SAAAA,cAAAC,IAAA,EAAkD;IAAA,IAApCC,GAAG,GAAAD,IAAA,CAAHC,GAAG;MAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAL,aAAA;IACrB,IAAI,CAACE,GAAG,GAAGA,GAAG;IACd,IAAI,CAACI,MAAM,GAAG,IAAI;IAClB,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB,IAAI,CAACC,MAAM,GAAG,KAAK;IACnB,IAAI,CAACC,GAAG,GAAG,MAAM;IACjB,IAAI,CAACC,KAAK,GAAG,KAAK;IAClB,IAAI,CAACC,KAAK,GAAGZ,gBAAgB;IAC7B,IAAI,CAACI,MAAM,GAAGA,MAAM,IAAI;MAAES,WAAW,EAAE,CAAC,SAAS;IAAE,CAAC;IACpD,IAAI,CAACC,IAAI,GAAG;MACRN,WAAW,EAAE,oBAAoB;MACjCO,QAAQ,EAAE,+BAA+B;MACzCC,cAAc,EAAE;IACpB,CAAC;EACL;EAAC,IAAAC,aAAA,CAAAX,OAAA,EAAAL,aAAA;IAAAiB,GAAA;IAAAC,GAAA,EAgCD,SAAAA,IAAA,EAAqB;MACjB,OAAO,IAAI,CAACV,MAAM;IACtB,CAAC;IAAAW,GAAA,EAED,SAAAA,IAAUC,KAAK,EAAE;MACb,IAAI,CAACZ,MAAM,GAAGY,KAAK;MACnB,IAAI,CAAC,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;IAAA3C,GAAA;IAAAC,GAAA,EAlMD,SAAAA,IAAA,EAA+B;MAC3B,OAAO,IAAI;IACf;;IAEA;AACJ;AACA;AACA;AACA;EAJI;IAAAD,GAAA;IAAAC,GAAA,EAKA,SAAAA,IAAA,EAAsC;MAClC;MACA;MACA;MACA,OAAO;QACH;AACZ;AACA;QACYuD,IAAI,EAAE,SAAAA,KAACC,EAAe,EAAK;UACvB;UACA,IAAIA,EAAE,CAACrD,SAAS,CAACoB,QAAQ,CAAC1C,gBAAgB,CAAC,EAAE;YACzC,OAAO;cACHY,KAAK,EAAEZ,gBAAgB;cACvBqC,KAAK,EAAEsC,EAAE,CAACtC;YACd,CAAC;UACL;UACA,OAAO,CAAC,CAAC;QACb;MACJ,CAAC;IACL;EAAC;EAAA,OAAApC,aAAA;AAAA;AAAA,IAAA2E,QAAA,GAyKU3E,aAAa;AAAA4E,OAAA,CAAAvE,OAAA,GAAAsE,QAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.ce-text-color-tool {
|
|
2
|
-
display: grid;
|
|
3
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
4
|
-
grid-template-rows: 1fr 1fr 1fr;
|
|
5
|
-
gap: 16px 16px;
|
|
6
|
-
padding: 16px;
|
|
7
|
-
border-top: 1px solid #eee;
|
|
8
|
-
}
|
|
9
|
-
.ce-text-color-tool__color-box {
|
|
10
|
-
width: 42px;
|
|
11
|
-
height: 30px;
|
|
12
|
-
padding: 8px 12px;
|
|
13
|
-
margin: 0;
|
|
14
|
-
border: none;
|
|
15
|
-
box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
|
|
16
|
-
border-radius: 2px;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
}
|
|
19
|
-
.ce-text-color-tool__color-box--active {
|
|
20
|
-
border: 1px solid #616161;
|
|
21
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare enum TextAlign {
|
|
2
|
-
START = "start",
|
|
3
|
-
END = "end",
|
|
4
|
-
CENTER = "center"
|
|
5
|
-
}
|
|
6
|
-
export declare type Alignment = {
|
|
7
|
-
name: TextAlign;
|
|
8
|
-
svg: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const ALIGNMENT_ICONS: {
|
|
11
|
-
start: string;
|
|
12
|
-
end: string;
|
|
13
|
-
center: string;
|
|
14
|
-
justify: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const ALIGNMENTS: {
|
|
17
|
-
name: TextAlign;
|
|
18
|
-
svg: string;
|
|
19
|
-
}[];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TextAlign = exports.ALIGNMENT_ICONS = exports.ALIGNMENTS = void 0;
|
|
7
|
-
var TextAlign = /*#__PURE__*/function (TextAlign) {
|
|
8
|
-
TextAlign["START"] = "start";
|
|
9
|
-
TextAlign["END"] = "end";
|
|
10
|
-
TextAlign["CENTER"] = "center";
|
|
11
|
-
return TextAlign;
|
|
12
|
-
}({});
|
|
13
|
-
exports.TextAlign = TextAlign;
|
|
14
|
-
var ALIGNMENT_ICONS = {
|
|
15
|
-
start: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">\n' + ' <path fill="none" d="M0 0h24v24H0V0z"/>\n' + " <g>\n" + ' <path fill="currentColor" d="M14 15H4c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zm0-8H4c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zM4 13h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0 8h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"/>\n' + " </g>\n" + "</svg>",
|
|
16
|
-
end: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">\n' + ' <path fill="none" d="M0 0h24v24H0V0z"/>\n' + " <g>\n" + ' <path fill="currentColor" d="M4 21h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm6-4h10c.55 0 1-.45 1-1s-.45-1-1-1H10c-.55 0-1 .45-1 1s.45 1 1 1zm-6-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm6-4h10c.55 0 1-.45 1-1s-.45-1-1-1H10c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"/>\n' + " </g>\n" + "</svg>",
|
|
17
|
-
center: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">\n' + ' <path fill="none" d="M0 0h24v24H0V0z"/>\n' + " <g>\n" + ' <path fill="currentColor" d="M7 16c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1zm-3 5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-8h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm3-5c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"/>\n' + " </g>\n" + "</svg>",
|
|
18
|
-
justify: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">\n' + ' <path fill="none" d="M0 0h24v24H0V0z"/>\n' + " <g>\n" + ' <path fill="currentColor" d="M4 21h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z"/>\n' + " </g>\n" + "</svg>"
|
|
19
|
-
};
|
|
20
|
-
exports.ALIGNMENT_ICONS = ALIGNMENT_ICONS;
|
|
21
|
-
var ALIGNMENTS = [{
|
|
22
|
-
name: TextAlign.START,
|
|
23
|
-
svg: ALIGNMENT_ICONS.start
|
|
24
|
-
}, {
|
|
25
|
-
name: TextAlign.CENTER,
|
|
26
|
-
svg: ALIGNMENT_ICONS.center
|
|
27
|
-
}, {
|
|
28
|
-
name: TextAlign.END,
|
|
29
|
-
svg: ALIGNMENT_ICONS.end
|
|
30
|
-
}];
|
|
31
|
-
exports.ALIGNMENTS = ALIGNMENTS;
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TextAlign","exports","ALIGNMENT_ICONS","start","end","center","justify","ALIGNMENTS","name","START","svg","CENTER","END"],"sources":["utils.ts"],"sourcesContent":["export enum TextAlign {\n START = \"start\",\n END = \"end\",\n CENTER = \"center\"\n}\n\nexport type Alignment = {\n name: TextAlign;\n svg: string;\n};\n\nexport const ALIGNMENT_ICONS = {\n start:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\\n' +\n ' <path fill=\"none\" d=\"M0 0h24v24H0V0z\"/>\\n' +\n \" <g>\\n\" +\n ' <path fill=\"currentColor\" d=\"M14 15H4c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zm0-8H4c-.55 0-1 .45-1 1s.45 1 1 1h10c.55 0 1-.45 1-1s-.45-1-1-1zM4 13h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0 8h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z\"/>\\n' +\n \" </g>\\n\" +\n \"</svg>\",\n end:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\\n' +\n ' <path fill=\"none\" d=\"M0 0h24v24H0V0z\"/>\\n' +\n \" <g>\\n\" +\n ' <path fill=\"currentColor\" d=\"M4 21h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm6-4h10c.55 0 1-.45 1-1s-.45-1-1-1H10c-.55 0-1 .45-1 1s.45 1 1 1zm-6-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm6-4h10c.55 0 1-.45 1-1s-.45-1-1-1H10c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z\"/>\\n' +\n \" </g>\\n\" +\n \"</svg>\",\n center:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\\n' +\n ' <path fill=\"none\" d=\"M0 0h24v24H0V0z\"/>\\n' +\n \" <g>\\n\" +\n ' <path fill=\"currentColor\" d=\"M7 16c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1zm-3 5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-8h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm3-5c0 .55.45 1 1 1h8c.55 0 1-.45 1-1s-.45-1-1-1H8c-.55 0-1 .45-1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z\"/>\\n' +\n \" </g>\\n\" +\n \"</svg>\",\n justify:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\">\\n' +\n ' <path fill=\"none\" d=\"M0 0h24v24H0V0z\"/>\\n' +\n \" <g>\\n\" +\n ' <path fill=\"currentColor\" d=\"M4 21h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zm0-4h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1zM3 4c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1z\"/>\\n' +\n \" </g>\\n\" +\n \"</svg>\"\n};\n\nexport const ALIGNMENTS = [\n {\n name: TextAlign.START,\n svg: ALIGNMENT_ICONS.start\n },\n {\n name: TextAlign.CENTER,\n svg: ALIGNMENT_ICONS.center\n },\n {\n name: TextAlign.END,\n svg: ALIGNMENT_ICONS.end\n }\n];\n"],"mappings":";;;;;;IAAYA,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAAAC,OAAA,CAAAD,SAAA,GAAAA,SAAA;AAWd,IAAME,eAAe,GAAG;EAC3BC,KAAK,EACD,mEAAmE,GACnE,6CAA6C,GAC7C,SAAS,GACT,gXAAgX,GAChX,UAAU,GACV,QAAQ;EACZC,GAAG,EACC,mEAAmE,GACnE,6CAA6C,GAC7C,SAAS,GACT,iXAAiX,GACjX,UAAU,GACV,QAAQ;EACZC,MAAM,EACF,mEAAmE,GACnE,6CAA6C,GAC7C,SAAS,GACT,uXAAuX,GACvX,UAAU,GACV,QAAQ;EACZC,OAAO,EACH,mEAAmE,GACnE,6CAA6C,GAC7C,SAAS,GACT,8WAA8W,GAC9W,UAAU,GACV;AACR,CAAC;AAACL,OAAA,CAAAC,eAAA,GAAAA,eAAA;AAEK,IAAMK,UAAU,GAAG,CACtB;EACIC,IAAI,EAAER,SAAS,CAACS,KAAK;EACrBC,GAAG,EAAER,eAAe,CAACC;AACzB,CAAC,EACD;EACIK,IAAI,EAAER,SAAS,CAACW,MAAM;EACtBD,GAAG,EAAER,eAAe,CAACG;AACzB,CAAC,EACD;EACIG,IAAI,EAAER,SAAS,CAACY,GAAG;EACnBF,GAAG,EAAER,eAAe,CAACE;AACzB,CAAC,CACJ;AAACH,OAAA,CAAAM,UAAA,GAAAA,UAAA"}
|
package/components/Routes.d.ts
DELETED
package/components/Routes.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Routes = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _plugins = require("@webiny/plugins");
|
|
11
|
-
var _reactRouter = require("@webiny/react-router");
|
|
12
|
-
var Routes = function Routes(props) {
|
|
13
|
-
var routes = [].concat((0, _toConsumableArray2.default)(props.routes), (0, _toConsumableArray2.default)(_plugins.plugins.byType("route").map(function (_ref) {
|
|
14
|
-
var route = _ref.route;
|
|
15
|
-
return route;
|
|
16
|
-
}))).sort(function (a, b) {
|
|
17
|
-
var pathA = a.props.path || "*";
|
|
18
|
-
var pathB = b.props.path || "*";
|
|
19
|
-
|
|
20
|
-
// This will sort paths at the very bottom of the list
|
|
21
|
-
if (pathA === "/" && pathB === "*") {
|
|
22
|
-
return -1;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// This will push * and / to the bottom of the list
|
|
26
|
-
if (pathA === "*" || pathA === "/") {
|
|
27
|
-
return 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
// This will push * and / to the bottom of the list
|
|
31
|
-
if (["*", "/"].includes(pathB)) {
|
|
32
|
-
return -1;
|
|
33
|
-
}
|
|
34
|
-
return 0;
|
|
35
|
-
});
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(_reactRouter.Routes, null, routes.map(function (route, index) {
|
|
37
|
-
return /*#__PURE__*/_react.default.cloneElement(route, {
|
|
38
|
-
key: "".concat(route.props.path, ":").concat(index)
|
|
39
|
-
});
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
exports.Routes = Routes;
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=Routes.js.map
|
package/components/Routes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_plugins","_reactRouter","Routes","props","routes","concat","_toConsumableArray2","default","plugins","byType","map","_ref","route","sort","a","b","pathA","path","pathB","includes","createElement","index","React","cloneElement","key","exports"],"sources":["Routes.tsx"],"sourcesContent":["import React from \"react\";\nimport { plugins } from \"@webiny/plugins\";\nimport { Routes as ReactRouterRoutes } from \"@webiny/react-router\";\nimport { RoutePlugin } from \"@webiny/app/types\";\n\ninterface RoutesProps {\n routes: JSX.Element[];\n}\n\nexport const Routes = (props: RoutesProps) => {\n const routes = [\n ...props.routes,\n // For backwards compatibility, we need to support the RoutePlugin routes as well.\n ...plugins.byType<RoutePlugin>(\"route\").map(({ route }) => route)\n ].sort((a, b) => {\n const pathA = a.props.path || \"*\";\n const pathB = b.props.path || \"*\";\n\n // This will sort paths at the very bottom of the list\n if (pathA === \"/\" && pathB === \"*\") {\n return -1;\n }\n\n // This will push * and / to the bottom of the list\n if (pathA === \"*\" || pathA === \"/\") {\n return 1;\n }\n\n // This will push * and / to the bottom of the list\n if ([\"*\", \"/\"].includes(pathB)) {\n return -1;\n }\n\n return 0;\n });\n\n return (\n <ReactRouterRoutes>\n {routes.map((route, index) =>\n React.cloneElement(route, { key: `${route.props.path}:${index}` })\n )}\n </ReactRouterRoutes>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAOO,IAAMG,MAAM,GAAG,SAATA,MAAMA,CAAIC,KAAkB,EAAK;EAC1C,IAAMC,MAAM,GAAG,GAAAC,MAAA,KAAAC,mBAAA,CAAAC,OAAA,EACRJ,KAAK,CAACC,MAAM,OAAAE,mBAAA,CAAAC,OAAA,EAEZC,gBAAO,CAACC,MAAM,CAAc,OAAO,CAAC,CAACC,GAAG,CAAC,UAAAC,IAAA;IAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAA,OAAOA,KAAK;EAAA,EAAC,GACnEC,IAAI,CAAC,UAACC,CAAC,EAAEC,CAAC,EAAK;IACb,IAAMC,KAAK,GAAGF,CAAC,CAACX,KAAK,CAACc,IAAI,IAAI,GAAG;IACjC,IAAMC,KAAK,GAAGH,CAAC,CAACZ,KAAK,CAACc,IAAI,IAAI,GAAG;;IAEjC;IACA,IAAID,KAAK,KAAK,GAAG,IAAIE,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC,CAAC;IACb;;IAEA;IACA,IAAIF,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,GAAG,EAAE;MAChC,OAAO,CAAC;IACZ;;IAEA;IACA,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACG,QAAQ,CAACD,KAAK,CAAC,EAAE;MAC5B,OAAO,CAAC,CAAC;IACb;IAEA,OAAO,CAAC;EACZ,CAAC,CAAC;EAEF,oBACIrB,MAAA,CAAAU,OAAA,CAAAa,aAAA,CAACnB,YAAA,CAAAC,MAAiB,QACbE,MAAM,CAACM,GAAG,CAAC,UAACE,KAAK,EAAES,KAAK;IAAA,oBACrBC,cAAK,CAACC,YAAY,CAACX,KAAK,EAAE;MAAEY,GAAG,KAAAnB,MAAA,CAAKO,KAAK,CAACT,KAAK,CAACc,IAAI,OAAAZ,MAAA,CAAIgB,KAAK;IAAG,CAAC,CAAC;EAAA,CACtE,CACe,CAAC;AAE5B,CAAC;AAACI,OAAA,CAAAvB,MAAA,GAAAA,MAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { AdminGlobalSearchPlugin, AdminGlobalSearchPreventHotkeyPlugin } from "../../types";
|
|
3
|
-
export interface SearchBarState {
|
|
4
|
-
active: boolean;
|
|
5
|
-
searchTerm: {
|
|
6
|
-
previous: string;
|
|
7
|
-
current: string;
|
|
8
|
-
};
|
|
9
|
-
plugins: {
|
|
10
|
-
list: ReadonlyArray<AdminGlobalSearchPlugin>;
|
|
11
|
-
hotKeys: ReadonlyArray<AdminGlobalSearchPreventHotkeyPlugin>;
|
|
12
|
-
current?: AdminGlobalSearchPlugin;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
declare const _default: React.FunctionComponent<unknown> & {
|
|
16
|
-
original: React.ComponentType<unknown>;
|
|
17
|
-
originalName: string;
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|