@webiny/app-admin 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.f6dc066313
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 +34 -16
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset.d.ts +2 -0
- package/base/Base/LexicalPreset.js +67 -0
- package/base/Base/LexicalPreset.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -2
- package/base/Base/Menus/SupportMenuItems.js +2 -4
- package/base/Base/Menus/SupportMenuItems.js.map +1 -1
- package/base/Base/Menus/WebinyVersion.js +4 -4
- package/base/Base/Menus/WebinyVersion.js.map +1 -1
- package/base/Base/Menus.js +37 -42
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.d.ts +2 -0
- package/base/Base/RoutesConfig.js +30 -0
- package/base/Base/RoutesConfig.js.map +1 -0
- package/base/Base/Tenant/wby-horizontal.svg +23 -0
- package/base/Base/Tenant.js +14 -9
- package/base/Base/Tenant.js.map +1 -1
- package/base/Base/UserMenu/ExitTenant.d.ts +20 -0
- package/base/Base/UserMenu/ExitTenant.js +37 -0
- package/base/Base/UserMenu/ExitTenant.js.map +1 -0
- package/base/Base/UserMenu/SignOut.d.ts +2 -0
- package/base/Base/UserMenu/SignOut.js +19 -0
- package/base/Base/UserMenu/SignOut.js.map +1 -0
- package/base/Base/UserMenu/UserInfo.d.ts +6 -0
- package/base/Base/UserMenu/UserInfo.js +43 -0
- package/base/Base/UserMenu/UserInfo.js.map +1 -0
- package/base/Base/UserMenu.d.ts +2 -0
- package/base/Base/UserMenu.js +21 -0
- package/base/Base/UserMenu.js.map +1 -0
- package/base/Base.js +6 -8
- package/base/Base.js.map +1 -1
- package/base/TelemetryAdminAppStart.d.ts +1 -0
- package/base/TelemetryAdminAppStart.js +19 -0
- package/base/TelemetryAdminAppStart.js.map +1 -0
- package/base/WebinyVersion.js +4 -4
- package/base/WebinyVersion.js.map +1 -1
- package/base/createRootContainer.d.ts +2 -0
- package/base/createRootContainer.js +55 -0
- package/base/createRootContainer.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.js +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.js +1 -1
- package/base/providers/AdminUiStateProvider.js.map +1 -1
- package/base/providers/ApolloProvider.d.ts +1 -1
- package/base/providers/ApolloProvider.js +2 -5
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.js +24 -3
- package/base/providers/UiProviders.js.map +1 -1
- package/base/providers/UiStateProvider.js +1 -1
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/CenteredView.d.ts +1 -1
- package/base/ui/CenteredView.js +2 -2
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/FileManager.d.ts +9 -21
- package/base/ui/FileManager.js +18 -12
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +19 -0
- package/base/ui/LoginScreen.js +2 -1
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Navigation.js +1 -1
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/UserMenu/UserMenuItem.d.ts +5 -5
- package/base/ui/UserMenu/UserMenuItem.js +1 -1
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -1
- package/base/ui/UserMenu/UserMenuLink.d.ts +5 -5
- package/base/ui/UserMenu/UserMenuLink.js +1 -1
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +8 -8
- package/base/ui/UserMenu/UserMenuSeparator.js +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -1
- package/base/ui/UserMenu.d.ts +3 -3
- package/base/ui/UserMenu.js +3 -3
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +1 -1
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +0 -1
- package/components/BulkActions/Worker.js +1 -1
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.d.ts +2 -2
- package/components/BulkActions/index.js +2 -2
- package/components/BulkActions/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +2 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/index.js +1 -1
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +2 -2
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +1 -1
- package/components/Buttons/Buttons.js +4 -4
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.d.ts +2 -3
- package/components/Buttons/Buttons.styles.js +1 -2
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.d.ts +2 -2
- package/components/Buttons/index.js +2 -2
- package/components/Buttons/index.js.map +1 -1
- package/components/Buttons/useButtons.d.ts +1 -1
- package/components/Buttons/useButtons.js +1 -1
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
- package/components/DeveloperMode/DeveloperMode.js +17 -0
- package/components/DeveloperMode/DeveloperMode.js.map +1 -0
- package/components/DeveloperMode/index.d.ts +2 -0
- package/components/DeveloperMode/index.js +3 -0
- package/components/DeveloperMode/index.js.map +1 -0
- package/components/Dialogs/Dialog.js +2 -2
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogsContext.d.ts +1 -6
- package/components/Dialogs/DialogsContext.js +14 -23
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.d.ts +1 -2
- package/components/Dialogs/useDialogs.js +1 -2
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.d.ts +1 -2
- package/components/EmptyView.js +6 -7
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +1 -1
- package/components/Filters/Filters.js +2 -2
- package/components/Filters/Filters.js.map +1 -1
- package/components/Filters/index.d.ts +2 -2
- package/components/Filters/index.js +2 -2
- package/components/Filters/index.js.map +1 -1
- package/components/FloatingActionButton.js +1 -1
- package/components/FloatingActionButton.js.map +1 -1
- package/components/FloatingPanel.js +4 -6
- package/components/FloatingPanel.js.map +1 -1
- package/components/IconPicker/IconPicker.d.ts +3 -3
- package/components/IconPicker/IconPicker.js +6 -6
- package/components/IconPicker/IconPicker.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.d.ts +3 -3
- package/components/IconPicker/IconPickerComponent.js +4 -4
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.d.ts +3 -3
- package/components/IconPicker/IconPickerPresenter.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.test.js +3 -2
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -1
- package/components/IconPicker/IconPickerTab.d.ts +1 -1
- package/components/IconPicker/IconPickerTab.js +10 -10
- package/components/IconPicker/IconPickerTab.js.map +1 -1
- package/components/IconPicker/IconRenderer.d.ts +1 -1
- package/components/IconPicker/IconRenderer.js.map +1 -1
- package/components/IconPicker/IconRepository.d.ts +2 -2
- package/components/IconPicker/IconRepository.js +2 -2
- package/components/IconPicker/IconRepository.js.map +1 -1
- package/components/IconPicker/IconRepository.test.js +2 -1
- package/components/IconPicker/IconRepository.test.js.map +1 -1
- package/components/IconPicker/IconRepositoryFactory.d.ts +2 -2
- package/components/IconPicker/IconRepositoryFactory.js +1 -1
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -1
- package/components/IconPicker/components/IconPickerCell.d.ts +2 -2
- package/components/IconPicker/components/IconPickerCell.js +3 -3
- package/components/IconPicker/components/IconPickerCell.js.map +1 -1
- package/components/IconPicker/components/IconPickerContent.d.ts +1 -1
- package/components/IconPicker/components/IconPickerContent.js +4 -4
- package/components/IconPicker/components/IconPickerContent.js.map +1 -1
- package/components/IconPicker/components/IconPickerRow.js +1 -1
- package/components/IconPicker/components/IconPickerRow.js.map +1 -1
- package/components/IconPicker/components/IconPickerTrigger.d.ts +1 -1
- package/components/IconPicker/components/IconPickerTrigger.js +7 -7
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -1
- package/components/IconPicker/components/index.d.ts +4 -4
- package/components/IconPicker/components/index.js +4 -4
- package/components/IconPicker/components/index.js.map +1 -1
- package/components/IconPicker/config/Emojis.js +1 -1
- package/components/IconPicker/config/Emojis.js.map +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -1
- package/components/IconPicker/config/IconPackProvider.d.ts +1 -1
- package/components/IconPicker/config/IconPackProvider.js.map +1 -1
- package/components/IconPicker/config/IconType.js +2 -2
- package/components/IconPicker/config/IconType.js.map +1 -1
- package/components/IconPicker/config/index.d.ts +3 -3
- package/components/IconPicker/config/index.js +7 -7
- package/components/IconPicker/config/index.js.map +1 -1
- package/components/IconPicker/index.d.ts +7 -7
- package/components/IconPicker/index.js +6 -6
- package/components/IconPicker/index.js.map +1 -1
- package/components/IconPicker/plugins/customPlugin.js +19 -24
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/IconPicker/plugins/emojisPlugin.js +9 -9
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -1
- package/components/IconPicker/plugins/iconsPlugin.js +4 -4
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -1
- package/components/IconPicker/types.js.map +1 -1
- package/components/LexicalEditor/LexicalEditor.d.ts +9 -5
- package/components/LexicalEditor/LexicalEditor.js +32 -21
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +92 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +3 -1
- package/components/LexicalEditor/index.js +3 -1
- package/components/LexicalEditor/index.js.map +1 -1
- package/components/LexicalEditor/lexicalValueWithHtml.d.ts +7 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js +36 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -0
- package/components/NavigationPrompt.d.ts +27 -0
- package/components/NavigationPrompt.js +39 -0
- package/components/NavigationPrompt.js.map +1 -0
- package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js +20 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
- package/components/NotAuthorizedError/SecureRouteError.svg +1 -0
- package/components/NotAuthorizedError/index.d.ts +1 -0
- package/components/NotAuthorizedError/index.js +3 -0
- package/components/NotAuthorizedError/index.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.js +1 -1
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/index.d.ts +4 -4
- package/components/OptionsMenu/index.js +4 -4
- package/components/OptionsMenu/index.js.map +1 -1
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.d.ts +1 -1
- package/components/OverlayLayout/OverlayLayout.js +8 -11
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +1 -1
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/OverlayLayout/components/OverlayHeader.js +3 -3
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -1
- package/components/OverlayLayout/components/index.d.ts +4 -4
- package/components/OverlayLayout/components/index.js +4 -4
- package/components/OverlayLayout/components/index.js.map +1 -1
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +1 -1
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +1 -3
- package/components/Permissions/Permissions.js +37 -31
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.js +2 -2
- package/components/Permissions/PermissionsGroup.js.map +1 -1
- package/components/Permissions/StyledComponents.js +1 -1
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +4 -4
- package/components/Permissions/index.js +4 -4
- package/components/Permissions/index.js.map +1 -1
- package/components/RegisterFeature.d.ts +11 -0
- package/components/RegisterFeature.js +26 -0
- package/components/RegisterFeature.js.map +1 -0
- package/components/ResizablePanels/index.d.ts +1 -1
- package/components/ResizablePanels/index.js +1 -1
- package/components/ResizablePanels/index.js.map +1 -1
- package/components/RoleAutocomplete/graphql.d.ts +1 -0
- package/components/RoleAutocomplete/graphql.js +18 -0
- package/components/RoleAutocomplete/graphql.js.map +1 -0
- package/components/RoleAutocomplete/index.d.ts +5 -0
- package/components/RoleAutocomplete/index.js +18 -0
- package/components/RoleAutocomplete/index.js.map +1 -0
- package/components/RolesMultiAutocomplete/graphql.d.ts +1 -0
- package/components/RolesMultiAutocomplete/graphql.js +23 -0
- package/components/RolesMultiAutocomplete/graphql.js.map +1 -0
- package/components/RolesMultiAutocomplete/index.d.ts +5 -0
- package/components/RolesMultiAutocomplete/index.js +19 -0
- package/components/RolesMultiAutocomplete/index.js.map +1 -0
- package/components/SearchUI.d.ts +1 -2
- package/components/SearchUI.js +1 -2
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/SimpleForm/SimpleForm.js +10 -10
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.d.ts +1 -1
- package/components/SimpleForm/index.js +1 -1
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.js +3 -3
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +3 -8
- package/components/SingleImageUpload.js +1 -1
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +7 -7
- package/components/SplitView/SplitView.js +20 -12
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.d.ts +1 -1
- package/components/SplitView/index.js +1 -1
- package/components/SplitView/index.js.map +1 -1
- package/components/StateInspector.js +1 -1
- package/components/StateInspector.js.map +1 -1
- package/components/TeamAutocomplete/graphql.d.ts +1 -0
- package/components/TeamAutocomplete/graphql.js +18 -0
- package/components/TeamAutocomplete/graphql.js.map +1 -0
- package/components/TeamAutocomplete/index.d.ts +5 -0
- package/components/TeamAutocomplete/index.js +18 -0
- package/components/TeamAutocomplete/index.js.map +1 -0
- package/components/TeamsMultiAutocomplete/graphql.d.ts +1 -0
- package/components/TeamsMultiAutocomplete/graphql.js +23 -0
- package/components/TeamsMultiAutocomplete/graphql.js.map +1 -0
- package/components/TeamsMultiAutocomplete/index.d.ts +5 -0
- package/components/TeamsMultiAutocomplete/index.js +19 -0
- package/components/TeamsMultiAutocomplete/index.js.map +1 -0
- package/components/Wcp.d.ts +4 -0
- package/components/Wcp.js +16 -2
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +30 -3
- package/components/index.js +29 -3
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Dashboard.d.ts +3 -0
- package/config/AdminConfig/Dashboard.js +6 -0
- package/config/AdminConfig/Dashboard.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Color.d.ts +11 -0
- package/config/AdminConfig/LexicalTheme/Color.js +45 -0
- package/config/AdminConfig/LexicalTheme/Color.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Typography.d.ts +30 -0
- package/config/AdminConfig/LexicalTheme/Typography.js +79 -0
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -0
- package/config/AdminConfig/LexicalTheme.d.ts +9 -0
- package/config/AdminConfig/LexicalTheme.js +8 -0
- package/config/AdminConfig/LexicalTheme.js.map +1 -0
- package/config/AdminConfig/Logo.d.ts +24 -0
- package/config/AdminConfig/Logo.js +21 -0
- package/config/AdminConfig/Logo.js.map +1 -0
- package/config/AdminConfig/Menu/MenuGroup.d.ts +10 -10
- package/config/AdminConfig/Menu/MenuGroup.js +1 -1
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -1
- package/config/AdminConfig/Menu/MenuItem.d.ts +9 -9
- package/config/AdminConfig/Menu/MenuItem.js +1 -1
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/MenuLink.d.ts +14 -14
- package/config/AdminConfig/Menu/MenuLink.js +10 -4
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu.d.ts +15 -15
- package/config/AdminConfig/Menu/SupportMenu.js +3 -3
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +14 -15
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +14 -15
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu.d.ts +31 -31
- package/config/AdminConfig/Menu/UserMenu.js +4 -4
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -1
- package/config/AdminConfig/Menu.d.ts +105 -103
- package/config/AdminConfig/Menu.js +17 -7
- package/config/AdminConfig/Menu.js.map +1 -1
- package/config/AdminConfig/Route.d.ts +1 -1
- package/config/AdminConfig/Route.js +2 -2
- package/config/AdminConfig/Route.js.map +1 -1
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +6 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +31 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +8 -7
- package/config/AdminConfig/Tenant/TenantLogo.js +14 -6
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantName.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantName.js +5 -2
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -1
- package/config/AdminConfig/Tenant.d.ts +14 -31
- package/config/AdminConfig/Tenant.js +4 -13
- package/config/AdminConfig/Tenant.js.map +1 -1
- package/config/AdminConfig/Theme/assignColor.d.ts +1 -1
- package/config/AdminConfig/Theme/assignColor.js +1 -1
- package/config/AdminConfig/Theme/assignColor.js.map +1 -1
- package/config/AdminConfig/Theme/types.d.ts +1 -1
- package/config/AdminConfig/Theme/types.js.map +1 -1
- package/config/AdminConfig/Theme.d.ts +1 -1
- package/config/AdminConfig/Theme.js +1 -1
- package/config/AdminConfig/Theme.js.map +1 -1
- package/config/AdminConfig/Title.d.ts +23 -0
- package/config/AdminConfig/Title.js +16 -0
- package/config/AdminConfig/Title.js.map +1 -0
- package/config/AdminConfig/Widget.d.ts +15 -0
- package/config/AdminConfig/Widget.js +36 -0
- package/config/AdminConfig/Widget.js.map +1 -0
- package/config/AdminConfig.d.ts +202 -150
- package/config/AdminConfig.js +35 -9
- package/config/AdminConfig.js.map +1 -1
- package/config/createAdminConfig.js.map +1 -1
- package/css/tokens.css +379 -0
- package/css/typography.css +70 -0
- package/domain/Identity.d.ts +59 -0
- package/domain/Identity.js +96 -0
- package/domain/Identity.js.map +1 -0
- package/errors/ErrorOverlayNetworkErrorHandler.d.ts +11 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js +66 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -0
- package/errors/TenantIsDisabled.d.ts +2 -0
- package/errors/TenantIsDisabled.js +23 -0
- package/errors/TenantIsDisabled.js.map +1 -0
- package/exports/admin/build-params.d.ts +1 -0
- package/exports/admin/build-params.js +3 -0
- package/exports/admin/build-params.js.map +1 -0
- package/exports/admin/configs.d.ts +1 -0
- package/exports/admin/configs.js +3 -0
- package/exports/admin/configs.js.map +1 -0
- package/exports/admin/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/security.d.ts +8 -0
- package/exports/admin/security.js +10 -0
- package/exports/admin/security.js.map +1 -0
- package/exports/admin/tenancy.d.ts +2 -0
- package/exports/admin/tenancy.js +4 -0
- package/exports/admin/tenancy.js.map +1 -0
- package/exports/admin/ui.d.ts +4 -0
- package/exports/admin/ui.js +6 -0
- package/exports/admin/ui.js.map +1 -0
- package/exports/admin.d.ts +7 -0
- package/exports/admin.js +9 -0
- package/exports/admin.js.map +1 -0
- package/features/apolloClient/abstraction.d.ts +5 -0
- package/features/apolloClient/abstraction.js +4 -0
- package/features/apolloClient/abstraction.js.map +1 -0
- package/features/apolloClient/feature.d.ts +2 -0
- package/features/apolloClient/feature.js +39 -0
- package/features/apolloClient/feature.js.map +1 -0
- package/features/buildParams/BuildParams.d.ts +9 -0
- package/features/buildParams/BuildParams.js +18 -0
- package/features/buildParams/BuildParams.js.map +1 -0
- package/features/buildParams/abstractions.d.ts +15 -0
- package/features/buildParams/abstractions.js +5 -0
- package/features/buildParams/abstractions.js.map +1 -0
- package/features/buildParams/feature.d.ts +1 -0
- package/features/buildParams/feature.js +10 -0
- package/features/buildParams/feature.js.map +1 -0
- package/features/buildParams/index.d.ts +2 -0
- package/features/buildParams/index.js +4 -0
- package/features/buildParams/index.js.map +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.d.ts +15 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +31 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.d.ts +12 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +30 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.d.ts +10 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +17 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -0
- package/features/security/AuthenticationContext/abstractions.d.ts +26 -0
- package/features/security/AuthenticationContext/abstractions.js +5 -0
- package/features/security/AuthenticationContext/abstractions.js.map +1 -0
- package/features/security/AuthenticationContext/feature.d.ts +3 -0
- package/features/security/AuthenticationContext/feature.js +20 -0
- package/features/security/AuthenticationContext/feature.js.map +1 -0
- package/features/security/AuthenticationContext/index.d.ts +1 -0
- package/features/security/AuthenticationContext/index.js +3 -0
- package/features/security/AuthenticationContext/index.js.map +1 -0
- package/features/security/AuthenticationContext/types.d.ts +11 -0
- package/features/security/AuthenticationContext/types.js.map +1 -0
- package/features/security/IdentityContext/IdentityContext.d.ts +13 -0
- package/features/security/IdentityContext/IdentityContext.js +24 -0
- package/features/security/IdentityContext/IdentityContext.js.map +1 -0
- package/features/security/IdentityContext/abstractions.d.ts +10 -0
- package/features/security/IdentityContext/abstractions.js +4 -0
- package/features/security/IdentityContext/abstractions.js.map +1 -0
- package/features/security/IdentityContext/feature.d.ts +3 -0
- package/features/security/IdentityContext/feature.js +16 -0
- package/features/security/IdentityContext/feature.js.map +1 -0
- package/features/security/IdentityContext/index.d.ts +2 -0
- package/features/security/IdentityContext/index.js +4 -0
- package/features/security/IdentityContext/index.js.map +1 -0
- package/features/security/LogIn/IdentityMapper.d.ts +9 -0
- package/features/security/LogIn/IdentityMapper.js +13 -0
- package/features/security/LogIn/IdentityMapper.js.map +1 -0
- package/features/security/LogIn/LogInGateway.d.ts +11 -0
- package/features/security/LogIn/LogInGateway.js +27 -0
- package/features/security/LogIn/LogInGateway.js.map +1 -0
- package/features/security/LogIn/LogInRepository.d.ts +14 -0
- package/features/security/LogIn/LogInRepository.js +19 -0
- package/features/security/LogIn/LogInRepository.js.map +1 -0
- package/features/security/LogIn/LogInUseCase.d.ts +15 -0
- package/features/security/LogIn/LogInUseCase.js +40 -0
- package/features/security/LogIn/LogInUseCase.js.map +1 -0
- package/features/security/LogIn/abstractions.d.ts +48 -0
- package/features/security/LogIn/abstractions.js +19 -0
- package/features/security/LogIn/abstractions.js.map +1 -0
- package/features/security/LogIn/createLoginMutation.d.ts +1 -0
- package/features/security/LogIn/createLoginMutation.js +49 -0
- package/features/security/LogIn/createLoginMutation.js.map +1 -0
- package/features/security/LogIn/feature.d.ts +3 -0
- package/features/security/LogIn/feature.js +22 -0
- package/features/security/LogIn/feature.js.map +1 -0
- package/features/security/LogIn/index.d.ts +1 -0
- package/features/security/LogIn/index.js +3 -0
- package/features/security/LogIn/index.js.map +1 -0
- package/features/security/LogOut/LogOutUseCase.d.ts +13 -0
- package/features/security/LogOut/LogOutUseCase.js +23 -0
- package/features/security/LogOut/LogOutUseCase.js.map +1 -0
- package/features/security/LogOut/abstractions.d.ts +7 -0
- package/features/security/LogOut/abstractions.js +4 -0
- package/features/security/LogOut/abstractions.js.map +1 -0
- package/features/security/LogOut/feature.d.ts +3 -0
- package/features/security/LogOut/feature.js +16 -0
- package/features/security/LogOut/feature.js.map +1 -0
- package/features/security/LogOut/index.d.ts +2 -0
- package/features/security/LogOut/index.js +4 -0
- package/features/security/LogOut/index.js.map +1 -0
- package/features/security/SecurityFeature.d.ts +1 -0
- package/features/security/SecurityFeature.js +16 -0
- package/features/security/SecurityFeature.js.map +1 -0
- package/features/telemetry/TelemetryService.d.ts +6 -0
- package/features/telemetry/TelemetryService.js +20 -0
- package/features/telemetry/TelemetryService.js.map +1 -0
- package/features/telemetry/abstractions.d.ts +7 -0
- package/features/telemetry/abstractions.js +4 -0
- package/features/telemetry/abstractions.js.map +1 -0
- package/features/telemetry/feature.d.ts +3 -0
- package/features/telemetry/feature.js +16 -0
- package/features/telemetry/feature.js.map +1 -0
- package/features/telemetry/index.d.ts +2 -0
- package/features/telemetry/index.js +4 -0
- package/features/telemetry/index.js.map +1 -0
- package/features/tenancy/GraphQLClientDecorator.d.ts +12 -0
- package/features/tenancy/GraphQLClientDecorator.js +27 -0
- package/features/tenancy/GraphQLClientDecorator.js.map +1 -0
- package/features/tenancy/TenantContext.d.ts +17 -0
- package/features/tenancy/TenantContext.js +61 -0
- package/features/tenancy/TenantContext.js.map +1 -0
- package/features/tenancy/abstractions.d.ts +14 -0
- package/features/tenancy/abstractions.js +4 -0
- package/features/tenancy/abstractions.js.map +1 -0
- package/features/tenancy/feature.d.ts +5 -0
- package/features/tenancy/feature.js +41 -0
- package/features/tenancy/feature.js.map +1 -0
- package/features/tenancy/types.d.ts +4 -0
- package/features/tenancy/types.js +3 -0
- package/features/tenancy/types.js.map +1 -0
- package/features/wcp/ReactLicense.d.ts +19 -0
- package/features/wcp/ReactLicense.js +46 -0
- package/features/wcp/ReactLicense.js.map +1 -0
- package/features/wcp/WcpGateway.d.ts +10 -0
- package/features/wcp/WcpGateway.js +73 -0
- package/features/wcp/WcpGateway.js.map +1 -0
- package/features/wcp/WcpService.d.ts +20 -0
- package/features/wcp/WcpService.js +84 -0
- package/features/wcp/WcpService.js.map +1 -0
- package/features/wcp/abstractions.d.ts +19 -0
- package/features/wcp/abstractions.js +5 -0
- package/features/wcp/abstractions.js.map +1 -0
- package/features/wcp/feature.d.ts +3 -0
- package/features/wcp/feature.js +18 -0
- package/features/wcp/feature.js.map +1 -0
- package/features/wcp/types.d.ts +21 -0
- package/features/wcp/types.js +3 -0
- package/features/wcp/types.js.map +1 -0
- package/hooks/index.d.ts +11 -10
- package/hooks/index.js +11 -10
- package/hooks/index.js.map +1 -1
- package/hooks/useConfirmationDialog.js +3 -3
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.js +1 -1
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useKeyHandler.js +1 -1
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +1 -2
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useShiftKey.js +1 -1
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +0 -1
- package/hooks/useStateIfMounted.js +1 -1
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useToggler.d.ts +7 -0
- package/hooks/useToggler.js +15 -0
- package/hooks/useToggler.js.map +1 -0
- package/index.d.ts +34 -45
- package/index.js +36 -43
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +42 -47
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +219 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +242 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +256 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +180 -0
- package/permissions/usePermissions.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +70 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.d.ts +2 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +17 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/index.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/index.js +3 -0
- package/presentation/installation/components/SystemInstaller/index.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +32 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +15 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +69 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +95 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.d.ts +4 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js +10 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js +28 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.d.ts +11 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +58 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +21 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/introduction.svg +154 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js +3 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +10 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +63 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.d.ts +24 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +138 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.d.ts +11 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +30 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.d.ts +59 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js +6 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/feature.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js +20 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/index.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/index.js +4 -0
- package/presentation/installation/presenters/SystemInstaller/index.js.map +1 -0
- package/presentation/security/components/HasPermission.d.ts +10 -0
- package/presentation/security/components/HasPermission.js +31 -0
- package/presentation/security/components/HasPermission.js.map +1 -0
- package/presentation/security/components/SecureRoute.d.ts +7 -0
- package/presentation/security/components/SecureRoute.js +16 -0
- package/presentation/security/components/SecureRoute.js.map +1 -0
- package/presentation/security/hooks/useAuthentication.d.ts +9 -0
- package/presentation/security/hooks/useAuthentication.js +24 -0
- package/presentation/security/hooks/useAuthentication.js.map +1 -0
- package/presentation/security/hooks/useIdentity.d.ts +6 -0
- package/presentation/security/hooks/useIdentity.js +25 -0
- package/presentation/security/hooks/useIdentity.js.map +1 -0
- package/presentation/security/hooks/useSecurity.d.ts +10 -0
- package/presentation/security/hooks/useSecurity.js +28 -0
- package/presentation/security/hooks/useSecurity.js.map +1 -0
- package/presentation/tenancy/TenancyProvider.d.ts +6 -0
- package/presentation/tenancy/TenancyProvider.js +43 -0
- package/presentation/tenancy/TenancyProvider.js.map +1 -0
- package/presentation/tenancy/createTenancyProvider.d.ts +1 -0
- package/presentation/tenancy/createTenancyProvider.js +14 -0
- package/presentation/tenancy/createTenancyProvider.js.map +1 -0
- package/presentation/tenancy/useTenantContext.d.ts +5 -0
- package/presentation/tenancy/useTenantContext.js +24 -0
- package/presentation/tenancy/useTenantContext.js.map +1 -0
- package/presentation/wcp/WcpProvider.d.ts +7 -0
- package/presentation/wcp/WcpProvider.js +26 -0
- package/presentation/wcp/WcpProvider.js.map +1 -0
- package/presentation/wcp/useWcp.d.ts +2 -0
- package/presentation/wcp/useWcp.js +18 -0
- package/presentation/wcp/useWcp.js.map +1 -0
- package/routes.d.ts +6 -0
- package/routes.js +17 -0
- package/routes.js.map +1 -0
- package/types.d.ts +3 -76
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/base/Base/Routes.d.ts +0 -2
- package/base/Base/Routes.js +0 -24
- package/base/Base/Routes.js.map +0 -1
- package/base/providers/TelemetryProvider.d.ts +0 -1
- package/base/providers/TelemetryProvider.js +0 -22
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -21
- package/base/providers/ViewCompositionProvider.js +0 -47
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -39
- package/base/ui/LocaleSelector.js +0 -8
- package/base/ui/LocaleSelector.js.map +0 -1
- package/components/AppInstaller/AppInstaller.d.ts +0 -11
- package/components/AppInstaller/AppInstaller.js +0 -113
- package/components/AppInstaller/AppInstaller.js.map +0 -1
- package/components/AppInstaller/Sidebar.d.ts +0 -9
- package/components/AppInstaller/Sidebar.js +0 -108
- package/components/AppInstaller/Sidebar.js.map +0 -1
- package/components/AppInstaller/assets/sign-in-divider.svg +0 -19
- package/components/AppInstaller/index.d.ts +0 -2
- package/components/AppInstaller/index.js +0 -17
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -19
- package/components/AppInstaller/styled.js +0 -75
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -25
- package/components/AppInstaller/useInstaller.js +0 -169
- package/components/AppInstaller/useInstaller.js.map +0 -1
- package/components/Dialogs/CustomDialog.d.ts +0 -17
- package/components/Dialogs/CustomDialog.js +0 -48
- package/components/Dialogs/CustomDialog.js.map +0 -1
- package/components/RichTextEditor/RichTextEditor.d.ts +0 -3
- package/components/RichTextEditor/RichTextEditor.js +0 -16
- package/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/components/RichTextEditor/index.d.ts +0 -2
- package/components/RichTextEditor/index.js +0 -4
- package/components/RichTextEditor/index.js.map +0 -1
- package/components/RichTextEditor/styles.scss +0 -96
- package/components/RichTextEditor/tools/header/index.d.ts +0 -228
- package/components/RichTextEditor/tools/header/index.js +0 -615
- package/components/RichTextEditor/tools/header/index.js.map +0 -1
- package/components/RichTextEditor/tools/header/styles.scss +0 -48
- package/components/RichTextEditor/tools/image/index.d.ts +0 -122
- package/components/RichTextEditor/tools/image/index.js +0 -202
- package/components/RichTextEditor/tools/image/index.js.map +0 -1
- package/components/RichTextEditor/tools/image/styles.scss +0 -90
- package/components/RichTextEditor/tools/image/svgs.d.ts +0 -6
- package/components/RichTextEditor/tools/image/svgs.js +0 -7
- package/components/RichTextEditor/tools/image/svgs.js.map +0 -1
- package/components/RichTextEditor/tools/image/tunes.d.ts +0 -55
- package/components/RichTextEditor/tools/image/tunes.js +0 -103
- package/components/RichTextEditor/tools/image/tunes.js.map +0 -1
- package/components/RichTextEditor/tools/image/types.d.ts +0 -29
- package/components/RichTextEditor/tools/image/types.js.map +0 -1
- package/components/RichTextEditor/tools/image/ui.d.ts +0 -120
- package/components/RichTextEditor/tools/image/ui.js +0 -245
- package/components/RichTextEditor/tools/image/ui.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -208
- package/components/RichTextEditor/tools/paragraph/index.js +0 -435
- package/components/RichTextEditor/tools/paragraph/index.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/styles.scss +0 -29
- package/components/RichTextEditor/tools/textColor/index.d.ts +0 -61
- package/components/RichTextEditor/tools/textColor/index.js +0 -197
- package/components/RichTextEditor/tools/textColor/index.js.map +0 -1
- package/components/RichTextEditor/tools/textColor/styles.scss +0 -21
- package/components/RichTextEditor/tools/utils.d.ts +0 -19
- package/components/RichTextEditor/tools/utils.js +0 -24
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -34
- package/components/Routes.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -19
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -53
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/ui/UIElement.d.ts +0 -2
- package/ui/UIElement.js +0 -3
- package/ui/UIElement.js.map +0 -1
- package/ui/UILayout.d.ts +0 -1
- package/ui/UILayout.js +0 -3
- package/ui/UILayout.js.map +0 -1
- package/ui/UIRenderer.d.ts +0 -2
- package/ui/UIRenderer.js +0 -3
- package/ui/UIRenderer.js.map +0 -1
- package/ui/UIView.d.ts +0 -2
- package/ui/UIView.js +0 -3
- package/ui/UIView.js.map +0 -1
- package/ui/elements/AccordionElement.d.ts +0 -28
- package/ui/elements/AccordionElement.js +0 -48
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -25
- package/ui/elements/ButtonElement.js +0 -52
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -7
- package/ui/elements/ButtonGroupElement.js +0 -29
- package/ui/elements/ButtonGroupElement.js.map +0 -1
- package/ui/elements/GenericElement.d.ts +0 -1
- package/ui/elements/GenericElement.js +0 -3
- package/ui/elements/GenericElement.js.map +0 -1
- package/ui/elements/LabelElement.d.ts +0 -17
- package/ui/elements/LabelElement.js +0 -23
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -34
- package/ui/elements/NavigationMenuElement.js +0 -88
- package/ui/elements/NavigationMenuElement.js.map +0 -1
- package/ui/elements/PanelElement.d.ts +0 -3
- package/ui/elements/PanelElement.js +0 -4
- package/ui/elements/PanelElement.js.map +0 -1
- package/ui/elements/PlaceholderElement.d.ts +0 -6
- package/ui/elements/PlaceholderElement.js +0 -11
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -8
- package/ui/elements/SmallButtonElement.js +0 -24
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -14
- package/ui/elements/TypographyElement.js +0 -23
- package/ui/elements/TypographyElement.js.map +0 -1
- package/ui/elements/ViewElement.d.ts +0 -1
- package/ui/elements/ViewElement.js +0 -3
- package/ui/elements/ViewElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +0 -7
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -26
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement.d.ts +0 -44
- package/ui/elements/form/DynamicFieldsetElement.js +0 -97
- package/ui/elements/form/DynamicFieldsetElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.d.ts +0 -4
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +0 -10
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +0 -8
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +0 -47
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +0 -14
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +0 -73
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +0 -23
- package/ui/elements/form/FileManagerElement/styled.js +0 -108
- package/ui/elements/form/FileManagerElement/styled.js.map +0 -1
- package/ui/elements/form/FileManagerElement.d.ts +0 -25
- package/ui/elements/form/FileManagerElement.js +0 -46
- package/ui/elements/form/FileManagerElement.js.map +0 -1
- package/ui/elements/form/FormElement.d.ts +0 -22
- package/ui/elements/form/FormElement.js +0 -20
- package/ui/elements/form/FormElement.js.map +0 -1
- package/ui/elements/form/FormFieldElement.d.ts +0 -57
- package/ui/elements/form/FormFieldElement.js +0 -113
- package/ui/elements/form/FormFieldElement.js.map +0 -1
- package/ui/elements/form/HiddenElement.d.ts +0 -7
- package/ui/elements/form/HiddenElement.js +0 -25
- package/ui/elements/form/HiddenElement.js.map +0 -1
- package/ui/elements/form/InputElement.d.ts +0 -8
- package/ui/elements/form/InputElement.js +0 -32
- package/ui/elements/form/InputElement.js.map +0 -1
- package/ui/elements/form/PasswordElement.d.ts +0 -6
- package/ui/elements/form/PasswordElement.js +0 -29
- package/ui/elements/form/PasswordElement.js.map +0 -1
- package/ui/elements/form/README.md +0 -2
- package/ui/elements/form/SelectElement.d.ts +0 -16
- package/ui/elements/form/SelectElement.js +0 -42
- package/ui/elements/form/SelectElement.js.map +0 -1
- package/ui/elements/form/TextareaElement.d.ts +0 -16
- package/ui/elements/form/TextareaElement.js +0 -34
- package/ui/elements/form/TextareaElement.js.map +0 -1
- package/ui/views/AdminView/ContentElement.d.ts +0 -4
- package/ui/views/AdminView/ContentElement.js +0 -37
- package/ui/views/AdminView/ContentElement.js.map +0 -1
- package/ui/views/AdminView/HeaderElement.d.ts +0 -13
- package/ui/views/AdminView/HeaderElement.js +0 -68
- package/ui/views/AdminView/HeaderElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +0 -7
- package/ui/views/AdminView/HeaderSectionRightElement.js +0 -21
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +0 -1
- package/ui/views/AdminView/components/Dialog.d.ts +0 -2
- package/ui/views/AdminView/components/Dialog.js +0 -41
- package/ui/views/AdminView/components/Dialog.js.map +0 -1
- package/ui/views/AdminView/components/Hamburger.d.ts +0 -3
- package/ui/views/AdminView/components/Hamburger.js +0 -23
- package/ui/views/AdminView/components/Hamburger.js.map +0 -1
- package/ui/views/FormView/FormContainerElement.d.ts +0 -13
- package/ui/views/FormView/FormContainerElement.js +0 -19
- package/ui/views/FormView/FormContainerElement.js.map +0 -1
- package/ui/views/FormView/FormContentElement.d.ts +0 -6
- package/ui/views/FormView/FormContentElement.js +0 -10
- package/ui/views/FormView/FormContentElement.js.map +0 -1
- package/ui/views/FormView/FormFooterElement.d.ts +0 -7
- package/ui/views/FormView/FormFooterElement.js +0 -14
- package/ui/views/FormView/FormFooterElement.js.map +0 -1
- package/ui/views/FormView/FormHeaderElement.d.ts +0 -15
- package/ui/views/FormView/FormHeaderElement.js +0 -30
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -121
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -7
- package/ui/views/OverlayView/ContentElement.js +0 -29
- package/ui/views/OverlayView/ContentElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderElement.d.ts +0 -25
- package/ui/views/OverlayView/HeaderElement.js +0 -72
- package/ui/views/OverlayView/HeaderElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +0 -15
- package/ui/views/OverlayView/HeaderTitleElement.js +0 -25
- package/ui/views/OverlayView/HeaderTitleElement.js.map +0 -1
- package/ui/views/OverlayView/useOverlayView.d.ts +0 -5
- package/ui/views/OverlayView/useOverlayView.js +0 -34
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -30
- package/ui/views/OverlayView.js +0 -109
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -12
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -32
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -86
- package/ui/views/SplitView.js.map +0 -1
- /package/base/Base/Tenant/{wby-logo.svg → wby-square.svg} +0 -0
- /package/{components/RichTextEditor/tools/image → features/security/AuthenticationContext}/types.js +0 -0
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { make } from "./ui";
|
|
2
|
-
import svgs from "./svgs";
|
|
3
|
-
/**
|
|
4
|
-
* Working with Block Tunes
|
|
5
|
-
*/
|
|
6
|
-
export default class Tunes {
|
|
7
|
-
/**
|
|
8
|
-
* @param {object} tune - image tool Tunes managers
|
|
9
|
-
* @param {object} tune.api - Editor API
|
|
10
|
-
* @param {object} tune.actions - list of user defined tunes
|
|
11
|
-
* @param {Function} tune.onChange - tune toggling callback
|
|
12
|
-
*/
|
|
13
|
-
constructor({
|
|
14
|
-
api,
|
|
15
|
-
actions,
|
|
16
|
-
onChange
|
|
17
|
-
}) {
|
|
18
|
-
this.api = api;
|
|
19
|
-
this.actions = actions;
|
|
20
|
-
this.onChange = onChange;
|
|
21
|
-
this.buttons = [];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Available Image tunes
|
|
26
|
-
*
|
|
27
|
-
* @returns {{name: string, icon: string, title: string}[]}
|
|
28
|
-
*/
|
|
29
|
-
static get tunes() {
|
|
30
|
-
return [{
|
|
31
|
-
name: "stretched",
|
|
32
|
-
icon: svgs.stretched,
|
|
33
|
-
title: "Stretch image"
|
|
34
|
-
}];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Styles
|
|
39
|
-
*
|
|
40
|
-
* @returns {{wrapper: string, buttonBase: *, button: string, buttonActive: *}}
|
|
41
|
-
*/
|
|
42
|
-
get CSS() {
|
|
43
|
-
return {
|
|
44
|
-
wrapper: "",
|
|
45
|
-
buttonBase: this.api.styles.settingsButton,
|
|
46
|
-
button: "image-tool__tune",
|
|
47
|
-
buttonActive: this.api.styles.settingsButtonActive
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Makes buttons with tunes: stretch image
|
|
53
|
-
*
|
|
54
|
-
* @param {ImageToolData} toolData - generate Elements of tunes
|
|
55
|
-
* @returns {Element}
|
|
56
|
-
*/
|
|
57
|
-
render(toolData) {
|
|
58
|
-
const wrapper = make("div", this.CSS.wrapper);
|
|
59
|
-
this.buttons = [];
|
|
60
|
-
const tunes = Tunes.tunes.concat(this.actions);
|
|
61
|
-
tunes.forEach(tune => {
|
|
62
|
-
const title = this.api.i18n.t(tune.title);
|
|
63
|
-
const el = make("div", [this.CSS.buttonBase, this.CSS.button], {
|
|
64
|
-
innerHTML: tune.icon,
|
|
65
|
-
title
|
|
66
|
-
});
|
|
67
|
-
el.addEventListener("click", () => {
|
|
68
|
-
this.tuneClicked(tune.name, tune.action);
|
|
69
|
-
});
|
|
70
|
-
el.dataset["tune"] = tune.name;
|
|
71
|
-
const name = tune.name;
|
|
72
|
-
el.classList.toggle(this.CSS.buttonActive, !!toolData[name]);
|
|
73
|
-
this.buttons.push(el);
|
|
74
|
-
this.api.tooltip.onHover(el, title, {
|
|
75
|
-
placement: "top"
|
|
76
|
-
});
|
|
77
|
-
wrapper.appendChild(el);
|
|
78
|
-
});
|
|
79
|
-
return wrapper;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Clicks to one of the tunes
|
|
84
|
-
*
|
|
85
|
-
* @param {string} tuneName - clicked tune name
|
|
86
|
-
* @param {Function} customFunction - function to execute on click
|
|
87
|
-
*/
|
|
88
|
-
tuneClicked(tuneName, customFunction) {
|
|
89
|
-
if (typeof customFunction === "function") {
|
|
90
|
-
if (!customFunction(tuneName)) {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const button = this.buttons.find(el => el.dataset["tune"] === tuneName);
|
|
95
|
-
if (button) {
|
|
96
|
-
button.classList.toggle(this.CSS.buttonActive, !button.classList.contains(this.CSS.buttonActive));
|
|
97
|
-
}
|
|
98
|
-
this.onChange(tuneName);
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
//# sourceMappingURL=tunes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["make","svgs","Tunes","constructor","api","actions","onChange","buttons","tunes","name","icon","stretched","title","CSS","wrapper","buttonBase","styles","settingsButton","button","buttonActive","settingsButtonActive","render","toolData","concat","forEach","tune","i18n","t","el","innerHTML","addEventListener","tuneClicked","action","dataset","classList","toggle","push","tooltip","onHover","placement","appendChild","tuneName","customFunction","find","contains"],"sources":["tunes.ts"],"sourcesContent":["import type { API } from \"@editorjs/editorjs\";\nimport { make } from \"./ui\";\nimport svgs from \"./svgs\";\nimport type { ImageToolData, Tune, TuneOnChangeCallable } from \"./types\";\n\ninterface TunesParams {\n api: API;\n actions: Tune[];\n onChange: TuneOnChangeCallable;\n}\n/**\n * Working with Block Tunes\n */\nexport default class Tunes {\n private api: API;\n private readonly actions: Tune[];\n private readonly onChange: TuneOnChangeCallable;\n private buttons: Array<HTMLElement>;\n /**\n * @param {object} tune - image tool Tunes managers\n * @param {object} tune.api - Editor API\n * @param {object} tune.actions - list of user defined tunes\n * @param {Function} tune.onChange - tune toggling callback\n */\n constructor({ api, actions, onChange }: TunesParams) {\n this.api = api;\n this.actions = actions;\n this.onChange = onChange;\n this.buttons = [];\n }\n\n /**\n * Available Image tunes\n *\n * @returns {{name: string, icon: string, title: string}[]}\n */\n static get tunes(): Tune[] {\n return [\n {\n name: \"stretched\",\n icon: svgs.stretched,\n title: \"Stretch image\"\n }\n ];\n }\n\n /**\n * Styles\n *\n * @returns {{wrapper: string, buttonBase: *, button: string, buttonActive: *}}\n */\n get CSS() {\n return {\n wrapper: \"\",\n buttonBase: this.api.styles.settingsButton,\n button: \"image-tool__tune\",\n buttonActive: this.api.styles.settingsButtonActive\n };\n }\n\n /**\n * Makes buttons with tunes: stretch image\n *\n * @param {ImageToolData} toolData - generate Elements of tunes\n * @returns {Element}\n */\n render(toolData: ImageToolData): HTMLElement {\n const wrapper = make(\"div\", this.CSS.wrapper);\n\n this.buttons = [];\n\n const tunes = Tunes.tunes.concat(this.actions);\n\n tunes.forEach(tune => {\n const title = this.api.i18n.t(tune.title);\n const el = make(\"div\", [this.CSS.buttonBase, this.CSS.button], {\n innerHTML: tune.icon,\n title\n });\n\n el.addEventListener(\"click\", () => {\n this.tuneClicked(tune.name, tune.action);\n });\n\n el.dataset[\"tune\"] = tune.name;\n const name = tune.name as keyof ImageToolData;\n el.classList.toggle(this.CSS.buttonActive, !!toolData[name]);\n\n this.buttons.push(el);\n\n this.api.tooltip.onHover(el, title, {\n placement: \"top\"\n });\n\n wrapper.appendChild(el);\n });\n\n return wrapper;\n }\n\n /**\n * Clicks to one of the tunes\n *\n * @param {string} tuneName - clicked tune name\n * @param {Function} customFunction - function to execute on click\n */\n tuneClicked(tuneName: string, customFunction?: TuneOnChangeCallable): boolean {\n if (typeof customFunction === \"function\") {\n if (!customFunction(tuneName)) {\n return false;\n }\n }\n\n const button = this.buttons.find(el => el.dataset[\"tune\"] === tuneName);\n\n if (button) {\n button.classList.toggle(\n this.CSS.buttonActive,\n !button.classList.contains(this.CSS.buttonActive)\n );\n }\n\n this.onChange(tuneName);\n return true;\n }\n}\n"],"mappings":"AACA,SAASA,IAAI;AACb,OAAOC,IAAI;AAQX;AACA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,YAAY,EACrB,CAACD,MAAM,CAACgB,SAAS,CAACU,QAAQ,CAAC,IAAI,CAAC/B,GAAG,CAACM,YAAY,CACpD,CAAC;IACL;IAEA,IAAI,CAACb,QAAQ,CAACmC,QAAQ,CAAC;IACvB,OAAO,IAAI;EACf;AACJ","ignoreList":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface TuneOnChangeCallable {
|
|
2
|
-
(tune: string): boolean | void;
|
|
3
|
-
}
|
|
4
|
-
export interface Tune {
|
|
5
|
-
name: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
title: string;
|
|
8
|
-
action?: TuneOnChangeCallable;
|
|
9
|
-
}
|
|
10
|
-
export interface ImageToolData {
|
|
11
|
-
caption: string;
|
|
12
|
-
file: string;
|
|
13
|
-
}
|
|
14
|
-
export interface ImageToolFile {
|
|
15
|
-
src: string;
|
|
16
|
-
}
|
|
17
|
-
export interface GetFileSourceCallable {
|
|
18
|
-
(file: ImageToolFile | string): string;
|
|
19
|
-
}
|
|
20
|
-
export interface OnSelectFileCallable {
|
|
21
|
-
(file: ImageToolFile): string;
|
|
22
|
-
}
|
|
23
|
-
export interface ImageToolConfig {
|
|
24
|
-
getFileSrc: GetFileSourceCallable;
|
|
25
|
-
onSelectFile: OnSelectFileCallable;
|
|
26
|
-
captionPlaceholder?: string;
|
|
27
|
-
actions: Tune[];
|
|
28
|
-
context: Record<string, any>;
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface TuneOnChangeCallable {\n (tune: string): boolean | void;\n}\nexport interface Tune {\n name: string;\n icon: string;\n title: string;\n action?: TuneOnChangeCallable;\n}\n\nexport interface ImageToolData {\n caption: string;\n file: string;\n}\nexport interface ImageToolFile {\n src: string;\n}\nexport interface GetFileSourceCallable {\n (file: ImageToolFile | string): string;\n}\nexport interface OnSelectFileCallable {\n (file: ImageToolFile): string;\n}\nexport interface ImageToolConfig {\n getFileSrc: GetFileSourceCallable;\n onSelectFile: OnSelectFileCallable;\n captionPlaceholder?: string;\n actions: Tune[];\n context: Record<string, any>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { API } from "@editorjs/editorjs";
|
|
2
|
-
import type { ImageToolConfig, ImageToolData } from "./types";
|
|
3
|
-
interface OnSelectFileCallable {
|
|
4
|
-
(): void;
|
|
5
|
-
}
|
|
6
|
-
interface UiStatus {
|
|
7
|
-
EMPTY: "empty";
|
|
8
|
-
FILLED: "filled";
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
}
|
|
11
|
-
interface UiParams {
|
|
12
|
-
api: API;
|
|
13
|
-
config: ImageToolConfig;
|
|
14
|
-
onSelectFile: OnSelectFileCallable;
|
|
15
|
-
readOnly: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Class for working with UI:
|
|
19
|
-
* - rendering base structure
|
|
20
|
-
* - show/hide preview
|
|
21
|
-
* - apply tune view
|
|
22
|
-
*/
|
|
23
|
-
export default class Ui {
|
|
24
|
-
private api;
|
|
25
|
-
private config;
|
|
26
|
-
private readonly readOnly;
|
|
27
|
-
private readonly onSelectFile;
|
|
28
|
-
readonly nodes: {
|
|
29
|
-
wrapper: HTMLElement;
|
|
30
|
-
imageContainer: HTMLElement;
|
|
31
|
-
fileButton: HTMLElement;
|
|
32
|
-
imageEl?: HTMLElement;
|
|
33
|
-
caption: HTMLElement;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* @param ui - image tool Ui module
|
|
37
|
-
* @param ui.api - Editor.js API
|
|
38
|
-
* @param ui.config - user config
|
|
39
|
-
* @param ui.onSelectFile - callback for clicks on Select file button
|
|
40
|
-
* @param ui.readOnly - read-only mode flag
|
|
41
|
-
*/
|
|
42
|
-
constructor({ api, config, onSelectFile, readOnly }: UiParams);
|
|
43
|
-
/**
|
|
44
|
-
* CSS classes
|
|
45
|
-
*
|
|
46
|
-
* @returns {object}
|
|
47
|
-
*/
|
|
48
|
-
get CSS(): {
|
|
49
|
-
baseClass: string;
|
|
50
|
-
input: string;
|
|
51
|
-
button: string;
|
|
52
|
-
/**
|
|
53
|
-
* Tool's classes
|
|
54
|
-
*/
|
|
55
|
-
wrapper: string;
|
|
56
|
-
imageContainer: string;
|
|
57
|
-
imageEl: string;
|
|
58
|
-
caption: string;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Ui statuses:
|
|
62
|
-
* - empty
|
|
63
|
-
* - filled
|
|
64
|
-
*
|
|
65
|
-
* @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}
|
|
66
|
-
*/
|
|
67
|
-
static get status(): UiStatus;
|
|
68
|
-
/**
|
|
69
|
-
* Renders tool UI
|
|
70
|
-
*
|
|
71
|
-
* @param {ImageToolData} toolData - saved tool data
|
|
72
|
-
* @returns {Element}
|
|
73
|
-
*/
|
|
74
|
-
render(toolData: ImageToolData): HTMLElement;
|
|
75
|
-
/**
|
|
76
|
-
* Creates upload-file button
|
|
77
|
-
*
|
|
78
|
-
* @returns {Element}
|
|
79
|
-
*/
|
|
80
|
-
createFileButton(): HTMLElement;
|
|
81
|
-
/**
|
|
82
|
-
* Shows an image
|
|
83
|
-
*
|
|
84
|
-
* @param {string} url - image source
|
|
85
|
-
* @returns {void}
|
|
86
|
-
*/
|
|
87
|
-
fillImage(url: string): void;
|
|
88
|
-
/**
|
|
89
|
-
* Shows caption input
|
|
90
|
-
*
|
|
91
|
-
* @param {string} text - caption text
|
|
92
|
-
* @returns {void}
|
|
93
|
-
*/
|
|
94
|
-
fillCaption(text: string): void;
|
|
95
|
-
/**
|
|
96
|
-
* Changes UI status
|
|
97
|
-
*
|
|
98
|
-
* @param {string} status - see {@link Ui.status} constants
|
|
99
|
-
* @returns {void}
|
|
100
|
-
*/
|
|
101
|
-
toggleStatus(status: string): void;
|
|
102
|
-
/**
|
|
103
|
-
* Apply visual representation of activated tune
|
|
104
|
-
*
|
|
105
|
-
* @param {string} tuneName - one of available tunes {@link Tunes.tunes}
|
|
106
|
-
* @param {boolean} status - true for enable, false for disable
|
|
107
|
-
* @returns {void}
|
|
108
|
-
*/
|
|
109
|
-
applyTune(tuneName: string, status: boolean): void;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Helper for making Elements with attributes
|
|
113
|
-
*
|
|
114
|
-
* @param {string} tagName - new Element tag name
|
|
115
|
-
* @param {Array|string} classNames - list or name of CSS class
|
|
116
|
-
* @param {object} attributes - any attributes
|
|
117
|
-
* @returns {HTMLElement}
|
|
118
|
-
*/
|
|
119
|
-
export declare const make: (tagName: string, classNames?: string[] | string | null, attributes?: Record<string, string | number | boolean>) => HTMLElement;
|
|
120
|
-
export {};
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Class for working with UI:
|
|
3
|
-
* - rendering base structure
|
|
4
|
-
* - show/hide preview
|
|
5
|
-
* - apply tune view
|
|
6
|
-
*/
|
|
7
|
-
export default class Ui {
|
|
8
|
-
/**
|
|
9
|
-
* @param ui - image tool Ui module
|
|
10
|
-
* @param ui.api - Editor.js API
|
|
11
|
-
* @param ui.config - user config
|
|
12
|
-
* @param ui.onSelectFile - callback for clicks on Select file button
|
|
13
|
-
* @param ui.readOnly - read-only mode flag
|
|
14
|
-
*/
|
|
15
|
-
constructor({
|
|
16
|
-
api,
|
|
17
|
-
config,
|
|
18
|
-
onSelectFile,
|
|
19
|
-
readOnly
|
|
20
|
-
}) {
|
|
21
|
-
this.api = api;
|
|
22
|
-
this.config = config;
|
|
23
|
-
this.onSelectFile = onSelectFile;
|
|
24
|
-
this.readOnly = readOnly;
|
|
25
|
-
this.nodes = {
|
|
26
|
-
wrapper: make("div", [this.CSS.baseClass, this.CSS.wrapper]),
|
|
27
|
-
imageContainer: make("div", [this.CSS.imageContainer]),
|
|
28
|
-
fileButton: this.createFileButton(),
|
|
29
|
-
imageEl: undefined,
|
|
30
|
-
caption: make("div", [this.CSS.input, this.CSS.caption], {
|
|
31
|
-
contentEditable: !this.readOnly
|
|
32
|
-
})
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Create base structure
|
|
37
|
-
* <wrapper>
|
|
38
|
-
* <image-container/>
|
|
39
|
-
* <caption />
|
|
40
|
-
* </wrapper>
|
|
41
|
-
*/
|
|
42
|
-
this.nodes.caption.dataset["placeholder"] = this.config.captionPlaceholder;
|
|
43
|
-
this.nodes.wrapper.appendChild(this.nodes.imageContainer);
|
|
44
|
-
this.nodes.wrapper.appendChild(this.nodes.caption);
|
|
45
|
-
this.nodes.wrapper.appendChild(this.nodes.fileButton);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* CSS classes
|
|
50
|
-
*
|
|
51
|
-
* @returns {object}
|
|
52
|
-
*/
|
|
53
|
-
get CSS() {
|
|
54
|
-
return {
|
|
55
|
-
baseClass: this.api.styles.block,
|
|
56
|
-
input: this.api.styles.input,
|
|
57
|
-
button: this.api.styles.button,
|
|
58
|
-
/**
|
|
59
|
-
* Tool's classes
|
|
60
|
-
*/
|
|
61
|
-
wrapper: "image-tool",
|
|
62
|
-
imageContainer: "image-tool__image",
|
|
63
|
-
imageEl: "image-tool__image-picture",
|
|
64
|
-
caption: "image-tool__caption"
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Ui statuses:
|
|
70
|
-
* - empty
|
|
71
|
-
* - filled
|
|
72
|
-
*
|
|
73
|
-
* @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}
|
|
74
|
-
*/
|
|
75
|
-
static get status() {
|
|
76
|
-
return {
|
|
77
|
-
EMPTY: "empty",
|
|
78
|
-
FILLED: "filled"
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Renders tool UI
|
|
84
|
-
*
|
|
85
|
-
* @param {ImageToolData} toolData - saved tool data
|
|
86
|
-
* @returns {Element}
|
|
87
|
-
*/
|
|
88
|
-
render(toolData) {
|
|
89
|
-
if (!toolData.file || Object.keys(toolData.file).length === 0) {
|
|
90
|
-
this.toggleStatus(Ui.status.EMPTY);
|
|
91
|
-
}
|
|
92
|
-
return this.nodes.wrapper;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Creates upload-file button
|
|
97
|
-
*
|
|
98
|
-
* @returns {Element}
|
|
99
|
-
*/
|
|
100
|
-
createFileButton() {
|
|
101
|
-
const button = make("div", [this.CSS.button]);
|
|
102
|
-
button.innerHTML = this.api.i18n.t("Select an Image");
|
|
103
|
-
button.addEventListener("click", () => {
|
|
104
|
-
this.onSelectFile();
|
|
105
|
-
});
|
|
106
|
-
return button;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Shows an image
|
|
111
|
-
*
|
|
112
|
-
* @param {string} url - image source
|
|
113
|
-
* @returns {void}
|
|
114
|
-
*/
|
|
115
|
-
fillImage(url) {
|
|
116
|
-
/**
|
|
117
|
-
* Check for a source extension to compose element correctly: video tag for mp4, img — for others
|
|
118
|
-
*/
|
|
119
|
-
const tag = /\.mp4$/.test(url) ? "VIDEO" : "IMG";
|
|
120
|
-
const attributes = {
|
|
121
|
-
src: url
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* We use eventName variable because IMG and VIDEO tags have different event to be called on source load
|
|
126
|
-
* - IMG: load
|
|
127
|
-
* - VIDEO: loadeddata
|
|
128
|
-
*
|
|
129
|
-
* @type {string}
|
|
130
|
-
*/
|
|
131
|
-
let eventName = "load";
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Update attributes and eventName if source is a mp4 video
|
|
135
|
-
*/
|
|
136
|
-
if (tag === "VIDEO") {
|
|
137
|
-
/**
|
|
138
|
-
* Add attributes for playing muted mp4 as a gif
|
|
139
|
-
*
|
|
140
|
-
* @type {boolean}
|
|
141
|
-
*/
|
|
142
|
-
attributes.autoplay = true;
|
|
143
|
-
attributes.loop = true;
|
|
144
|
-
attributes.muted = true;
|
|
145
|
-
attributes.playsinline = true;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Change event to be listened
|
|
149
|
-
*
|
|
150
|
-
* @type {string}
|
|
151
|
-
*/
|
|
152
|
-
eventName = "loadeddata";
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Compose tag with defined attributes
|
|
157
|
-
*
|
|
158
|
-
* @type {Element}
|
|
159
|
-
*/
|
|
160
|
-
this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Add load event listener
|
|
164
|
-
*/
|
|
165
|
-
this.nodes.imageEl.addEventListener(eventName, () => {
|
|
166
|
-
this.toggleStatus(Ui.status.FILLED);
|
|
167
|
-
});
|
|
168
|
-
this.nodes.imageContainer.appendChild(this.nodes.imageEl);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Shows caption input
|
|
173
|
-
*
|
|
174
|
-
* @param {string} text - caption text
|
|
175
|
-
* @returns {void}
|
|
176
|
-
*/
|
|
177
|
-
fillCaption(text) {
|
|
178
|
-
if (!this.nodes.caption) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this.nodes.caption.innerHTML = text;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Changes UI status
|
|
186
|
-
*
|
|
187
|
-
* @param {string} status - see {@link Ui.status} constants
|
|
188
|
-
* @returns {void}
|
|
189
|
-
*/
|
|
190
|
-
toggleStatus(status) {
|
|
191
|
-
for (const statusType in Ui.status) {
|
|
192
|
-
if (Object.prototype.hasOwnProperty.call(Ui.status, statusType) === false) {
|
|
193
|
-
continue;
|
|
194
|
-
}
|
|
195
|
-
const newStatus = Ui.status[statusType];
|
|
196
|
-
this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${newStatus}`, status === newStatus);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Apply visual representation of activated tune
|
|
202
|
-
*
|
|
203
|
-
* @param {string} tuneName - one of available tunes {@link Tunes.tunes}
|
|
204
|
-
* @param {boolean} status - true for enable, false for disable
|
|
205
|
-
* @returns {void}
|
|
206
|
-
*/
|
|
207
|
-
applyTune(tuneName, status) {
|
|
208
|
-
this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Helper for making Elements with attributes
|
|
214
|
-
*
|
|
215
|
-
* @param {string} tagName - new Element tag name
|
|
216
|
-
* @param {Array|string} classNames - list or name of CSS class
|
|
217
|
-
* @param {object} attributes - any attributes
|
|
218
|
-
* @returns {HTMLElement}
|
|
219
|
-
*/
|
|
220
|
-
export const make = function make(tagName, classNames = null, attributes) {
|
|
221
|
-
const element = document.createElement(tagName);
|
|
222
|
-
if (Array.isArray(classNames)) {
|
|
223
|
-
element.classList.add(...classNames);
|
|
224
|
-
} else if (classNames) {
|
|
225
|
-
element.classList.add(classNames);
|
|
226
|
-
}
|
|
227
|
-
if (!attributes) {
|
|
228
|
-
return element;
|
|
229
|
-
}
|
|
230
|
-
for (const attrName in attributes) {
|
|
231
|
-
/**
|
|
232
|
-
* Unfortunately it is a problem to map attributes to element because element is complaining
|
|
233
|
-
* that attrName is a string, which cannot index the HTMLElement
|
|
234
|
-
*/
|
|
235
|
-
const key = attrName;
|
|
236
|
-
/**
|
|
237
|
-
* Error says that each key is a read-only property.
|
|
238
|
-
*/
|
|
239
|
-
// @ts-expect-error
|
|
240
|
-
element[key] = attributes[attrName];
|
|
241
|
-
}
|
|
242
|
-
return element;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
//# sourceMappingURL=ui.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Ui","constructor","api","config","onSelectFile","readOnly","nodes","wrapper","make","CSS","baseClass","imageContainer","fileButton","createFileButton","imageEl","undefined","caption","input","contentEditable","dataset","captionPlaceholder","appendChild","styles","block","button","status","EMPTY","FILLED","render","toolData","file","Object","keys","length","toggleStatus","innerHTML","i18n","t","addEventListener","fillImage","url","tag","test","attributes","src","eventName","autoplay","loop","muted","playsinline","fillCaption","text","statusType","prototype","hasOwnProperty","call","newStatus","classList","toggle","applyTune","tuneName","tagName","classNames","element","document","createElement","Array","isArray","add","attrName","key"],"sources":["ui.ts"],"sourcesContent":["import type { API } from \"@editorjs/editorjs\";\nimport type { ImageToolConfig, ImageToolData } from \"./types\";\n\ninterface OnSelectFileCallable {\n (): void;\n}\ninterface UiStatus {\n EMPTY: \"empty\";\n FILLED: \"filled\";\n [key: string]: string;\n}\ninterface UiParams {\n api: API;\n config: ImageToolConfig;\n onSelectFile: OnSelectFileCallable;\n readOnly: boolean;\n}\n/**\n * Class for working with UI:\n * - rendering base structure\n * - show/hide preview\n * - apply tune view\n */\nexport default class Ui {\n private api: API;\n private config: ImageToolConfig;\n private readonly readOnly: boolean;\n private readonly onSelectFile: OnSelectFileCallable;\n\n public readonly nodes: {\n wrapper: HTMLElement;\n imageContainer: HTMLElement;\n fileButton: HTMLElement;\n imageEl?: HTMLElement;\n caption: HTMLElement;\n };\n\n /**\n * @param ui - image tool Ui module\n * @param ui.api - Editor.js API\n * @param ui.config - user config\n * @param ui.onSelectFile - callback for clicks on Select file button\n * @param ui.readOnly - read-only mode flag\n */\n constructor({ api, config, onSelectFile, readOnly }: UiParams) {\n this.api = api;\n this.config = config;\n this.onSelectFile = onSelectFile;\n this.readOnly = readOnly;\n this.nodes = {\n wrapper: make(\"div\", [this.CSS.baseClass, this.CSS.wrapper]),\n imageContainer: make(\"div\", [this.CSS.imageContainer]),\n fileButton: this.createFileButton(),\n imageEl: undefined,\n caption: make(\"div\", [this.CSS.input, this.CSS.caption], {\n contentEditable: !this.readOnly\n })\n };\n\n /**\n * Create base structure\n * <wrapper>\n * <image-container/>\n * <caption />\n * </wrapper>\n */\n this.nodes.caption.dataset[\"placeholder\"] = this.config.captionPlaceholder;\n this.nodes.wrapper.appendChild(this.nodes.imageContainer);\n this.nodes.wrapper.appendChild(this.nodes.caption);\n this.nodes.wrapper.appendChild(this.nodes.fileButton);\n }\n\n /**\n * CSS classes\n *\n * @returns {object}\n */\n get CSS() {\n return {\n baseClass: this.api.styles.block,\n input: this.api.styles.input,\n button: this.api.styles.button,\n\n /**\n * Tool's classes\n */\n wrapper: \"image-tool\",\n imageContainer: \"image-tool__image\",\n imageEl: \"image-tool__image-picture\",\n caption: \"image-tool__caption\"\n };\n }\n\n /**\n * Ui statuses:\n * - empty\n * - filled\n *\n * @returns {{EMPTY: string, UPLOADING: string, FILLED: string}}\n */\n static get status(): UiStatus {\n return {\n EMPTY: \"empty\",\n FILLED: \"filled\"\n };\n }\n\n /**\n * Renders tool UI\n *\n * @param {ImageToolData} toolData - saved tool data\n * @returns {Element}\n */\n render(toolData: ImageToolData) {\n if (!toolData.file || Object.keys(toolData.file).length === 0) {\n this.toggleStatus(Ui.status.EMPTY);\n }\n\n return this.nodes.wrapper;\n }\n\n /**\n * Creates upload-file button\n *\n * @returns {Element}\n */\n createFileButton() {\n const button = make(\"div\", [this.CSS.button]);\n\n button.innerHTML = this.api.i18n.t(\"Select an Image\");\n\n button.addEventListener(\"click\", () => {\n this.onSelectFile();\n });\n\n return button;\n }\n\n /**\n * Shows an image\n *\n * @param {string} url - image source\n * @returns {void}\n */\n public fillImage(url: string): void {\n /**\n * Check for a source extension to compose element correctly: video tag for mp4, img — for others\n */\n const tag = /\\.mp4$/.test(url) ? \"VIDEO\" : \"IMG\";\n\n const attributes: any = {\n src: url\n };\n\n /**\n * We use eventName variable because IMG and VIDEO tags have different event to be called on source load\n * - IMG: load\n * - VIDEO: loadeddata\n *\n * @type {string}\n */\n let eventName = \"load\";\n\n /**\n * Update attributes and eventName if source is a mp4 video\n */\n if (tag === \"VIDEO\") {\n /**\n * Add attributes for playing muted mp4 as a gif\n *\n * @type {boolean}\n */\n attributes.autoplay = true;\n attributes.loop = true;\n attributes.muted = true;\n attributes.playsinline = true;\n\n /**\n * Change event to be listened\n *\n * @type {string}\n */\n eventName = \"loadeddata\";\n }\n\n /**\n * Compose tag with defined attributes\n *\n * @type {Element}\n */\n this.nodes.imageEl = make(tag, this.CSS.imageEl, attributes);\n\n /**\n * Add load event listener\n */\n this.nodes.imageEl.addEventListener(eventName, () => {\n this.toggleStatus(Ui.status.FILLED);\n });\n\n this.nodes.imageContainer.appendChild(this.nodes.imageEl);\n }\n\n /**\n * Shows caption input\n *\n * @param {string} text - caption text\n * @returns {void}\n */\n public fillCaption(text: string): void {\n if (!this.nodes.caption) {\n return;\n }\n this.nodes.caption.innerHTML = text;\n }\n\n /**\n * Changes UI status\n *\n * @param {string} status - see {@link Ui.status} constants\n * @returns {void}\n */\n public toggleStatus(status: string): void {\n for (const statusType in Ui.status) {\n if (Object.prototype.hasOwnProperty.call(Ui.status, statusType) === false) {\n continue;\n }\n const newStatus = Ui.status[statusType];\n this.nodes.wrapper.classList.toggle(\n `${this.CSS.wrapper}--${newStatus}`,\n status === newStatus\n );\n }\n }\n\n /**\n * Apply visual representation of activated tune\n *\n * @param {string} tuneName - one of available tunes {@link Tunes.tunes}\n * @param {boolean} status - true for enable, false for disable\n * @returns {void}\n */\n public applyTune(tuneName: string, status: boolean) {\n this.nodes.wrapper.classList.toggle(`${this.CSS.wrapper}--${tuneName}`, status);\n }\n}\n\n/**\n * Helper for making Elements with attributes\n *\n * @param {string} tagName - new Element tag name\n * @param {Array|string} classNames - list or name of CSS class\n * @param {object} attributes - any attributes\n * @returns {HTMLElement}\n */\nexport const make = function make(\n tagName: string,\n classNames: string[] | string | null = null,\n attributes?: Record<string, string | number | boolean>\n): HTMLElement {\n const element: HTMLElement = document.createElement(tagName);\n\n if (Array.isArray(classNames)) {\n element.classList.add(...classNames);\n } else if (classNames) {\n element.classList.add(classNames);\n }\n\n if (!attributes) {\n return element;\n }\n for (const attrName in attributes) {\n /**\n * Unfortunately it is a problem to map attributes to element because element is complaining\n * that attrName is a string, which cannot index the HTMLElement\n */\n const key = attrName as keyof HTMLElement;\n /**\n * Error says that each key is a read-only property.\n */\n // @ts-expect-error\n element[key] = attributes[attrName];\n }\n\n return element;\n};\n"],"mappings":"AAiBA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMA,EAAE,CAAC;EAcpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAAC;IAAEC,GAAG;IAAEC,MAAM;IAAEC,YAAY;IAAEC;EAAmB,CAAC,EAAE;IAC3D,IAAI,CAACH,GAAG,GAAGA,GAAG;IACd,IAAI,CAACC,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,YAAY,GAAGA,YAAY;IAChC,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,KAAK,GAAG;MACTC,OAAO,EAAEC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACC,SAAS,EAAE,IAAI,CAACD,GAAG,CAACF,OAAO,CAAC,CAAC;MAC5DI,cAAc,EAAEH,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACE,cAAc,CAAC,CAAC;MACtDC,UAAU,EAAE,IAAI,CAACC,gBAAgB,CAAC,CAAC;MACnCC,OAAO,EAAEC,SAAS;MAClBC,OAAO,EAAER,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,CAACC,GAAG,CAACQ,KAAK,EAAE,IAAI,CAACR,GAAG,CAACO,OAAO,CAAC,EAAE;QACrDE,eAAe,EAAE,CAAC,IAAI,CAACb;MAC3B,CAAC;IACL,CAAC;;IAED;AACR;AACA;AACA;AACA;AACA;AACA;IACQ,IAAI,CAACC,KAAK,CAACU,OAAO,CAACG,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,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