@webiny/app-admin 6.0.0-beta.0 → 6.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -17
- package/base/Admin.d.ts +5 -2
- package/base/Admin.js +41 -44
- 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 -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.js +10 -79
- 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 -21
- 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 -17
- 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 -7
- package/base/providers/UiStateProvider.js +10 -15
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +30 -6
- package/base/ui/Brand.js +5 -12
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +15 -3
- package/base/ui/CenteredView.js +12 -43
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +30 -6
- package/base/ui/Dashboard.js +5 -12
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +28 -28
- package/base/ui/FileManager.js +52 -60
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/Layout.d.ts +32 -6
- package/base/ui/Layout.js +8 -16
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +35 -3
- package/base/ui/LoginScreen.js +20 -15
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +30 -11
- package/base/ui/Logo.js +5 -26
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +25 -37
- package/base/ui/Navigation.js +12 -142
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +30 -6
- package/base/ui/NotFound.js +5 -12
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.d.ts +1 -1
- package/base/ui/Tags.js +14 -19
- 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 +54 -52
- package/base/ui/UserMenu.js +14 -101
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +7 -13
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +1 -1
- package/components/BulkActions/Worker.js +99 -141
- 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 +2 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +20 -29
- 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 +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +40 -75
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +9 -8
- package/components/Buttons/Buttons.js +61 -57
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.d.ts +2 -3
- package/components/Buttons/Buttons.styles.js +3 -11
- 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 +1 -1
- package/components/Buttons/useButtons.js +13 -19
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/Dialogs/Dialog.d.ts +11 -5
- package/components/Dialogs/Dialog.js +57 -40
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogsContext.d.ts +16 -21
- package/components/Dialogs/DialogsContext.js +106 -95
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.d.ts +1 -2
- package/components/Dialogs/useDialogs.js +4 -17
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.d.ts +4 -4
- package/components/EmptyView.js +30 -41
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +6 -6
- package/components/Filters/Filters.js +12 -20
- 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.js +7 -13
- 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 +9 -5
- package/components/LexicalEditor/LexicalEditor.js +34 -23
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +83 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +3 -1
- package/components/LexicalEditor/index.js +3 -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 +1 -1
- package/components/MultiImageUpload.js +8 -31
- 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 +1 -0
- package/components/OptionsMenu/OptionsMenu.js +17 -23
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuItem.d.ts +1 -0
- package/components/OptionsMenu/OptionsMenuItem.js +12 -17
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuLink.d.ts +3 -1
- package/components/OptionsMenu/OptionsMenuLink.js +13 -36
- 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 +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +12 -18
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.d.ts +6 -16
- package/components/OverlayLayout/OverlayLayout.js +41 -148
- 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.js +5 -12
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +2 -4
- package/components/Permissions/Permissions.js +44 -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 +1 -2
- package/components/Permissions/StyledComponents.js +12 -25
- 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 +2 -2
- package/components/SearchUI.js +21 -48
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +14 -7
- package/components/SimpleForm/SimpleForm.js +72 -77
- 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 +1 -1
- package/components/SimpleUI/InputField.js +39 -47
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +20 -7
- package/components/SingleImageUpload.js +39 -73
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +11 -9
- package/components/SplitView/SplitView.js +59 -75
- 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 -15
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +29 -1
- package/components/index.js +28 -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/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 +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 +485 -0
- package/config/AdminConfig.js +71 -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/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/security.d.ts +8 -0
- package/exports/admin/security.js +10 -0
- package/exports/admin/security.js.map +1 -0
- package/exports/admin/tenancy.d.ts +2 -0
- package/exports/admin/tenancy.js +4 -0
- package/exports/admin/tenancy.js.map +1 -0
- package/exports/admin/ui.d.ts +3 -0
- package/exports/admin/ui.js +5 -0
- package/exports/admin/ui.js.map +1 -0
- package/exports/admin.d.ts +6 -0
- package/exports/admin.js +8 -0
- package/exports/admin.js.map +1 -0
- package/extensions/AdminBuildParam.d.ts +11 -0
- package/extensions/AdminBuildParam.js +184 -0
- package/extensions/AdminBuildParam.js.map +1 -0
- package/extensions/AdminExtension.d.ts +11 -0
- package/extensions/AdminExtension.js +99 -0
- package/extensions/AdminExtension.js.map +1 -0
- package/extensions/index.d.ts +23 -0
- package/extensions/index.js +7 -0
- package/extensions/index.js.map +1 -0
- package/features/apolloClient/abstraction.d.ts +5 -0
- package/features/apolloClient/abstraction.js +4 -0
- package/features/apolloClient/abstraction.js.map +1 -0
- package/features/apolloClient/feature.d.ts +2 -0
- package/features/apolloClient/feature.js +39 -0
- package/features/apolloClient/feature.js.map +1 -0
- package/features/buildParams/BuildParams.d.ts +9 -0
- package/features/buildParams/BuildParams.js +18 -0
- package/features/buildParams/BuildParams.js.map +1 -0
- package/features/buildParams/abstractions.d.ts +15 -0
- package/features/buildParams/abstractions.js +5 -0
- package/features/buildParams/abstractions.js.map +1 -0
- package/features/buildParams/feature.d.ts +1 -0
- package/features/buildParams/feature.js +10 -0
- package/features/buildParams/feature.js.map +1 -0
- package/features/buildParams/index.d.ts +2 -0
- package/features/buildParams/index.js +4 -0
- package/features/buildParams/index.js.map +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.d.ts +15 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +31 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.d.ts +12 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +30 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.d.ts +10 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +17 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -0
- package/features/security/AuthenticationContext/abstractions.d.ts +26 -0
- package/features/security/AuthenticationContext/abstractions.js +5 -0
- package/features/security/AuthenticationContext/abstractions.js.map +1 -0
- package/features/security/AuthenticationContext/feature.d.ts +3 -0
- package/features/security/AuthenticationContext/feature.js +20 -0
- package/features/security/AuthenticationContext/feature.js.map +1 -0
- package/features/security/AuthenticationContext/index.d.ts +1 -0
- package/features/security/AuthenticationContext/index.js +3 -0
- package/features/security/AuthenticationContext/index.js.map +1 -0
- package/features/security/AuthenticationContext/types.d.ts +11 -0
- package/features/security/AuthenticationContext/types.js +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 -11
- package/hooks/index.js +11 -126
- package/hooks/index.js.map +1 -1
- package/hooks/useConfirmationDialog.d.ts +1 -1
- package/hooks/useConfirmationDialog.js +26 -39
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +1 -1
- package/hooks/useDialog.js +16 -21
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useIsMounted.js +6 -14
- 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 -25
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +0 -1
- package/hooks/useStateIfMounted.js +8 -18
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useStateWithCallback.d.ts +3 -3
- package/hooks/useStateWithCallback.js +7 -20
- package/hooks/useStateWithCallback.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 -40
- package/index.js +43 -395
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +61 -50
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +211 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +224 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +216 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +179 -0
- package/permissions/usePermissions.js.map +1 -0
- package/plugins/MenuPlugin.d.ts +1 -1
- package/plugins/MenuPlugin.js +15 -36
- package/plugins/MenuPlugin.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 -3
- package/types.d.ts +4 -110
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/base/Version.d.ts +0 -3
- package/base/Version.js +0 -56
- package/base/Version.js.map +0 -1
- package/base/providers/TelemetryProvider.d.ts +0 -7
- package/base/providers/TelemetryProvider.js +0 -27
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -21
- package/base/providers/ViewCompositionProvider.js +0 -58
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -15
- package/base/ui/LocaleSelector.js +0 -15
- package/base/ui/LocaleSelector.js.map +0 -1
- package/base/ui/Menu.d.ts +0 -39
- package/base/ui/Menu.js +0 -133
- package/base/ui/Menu.js.map +0 -1
- package/base/ui/Search.d.ts +0 -37
- package/base/ui/Search.js +0 -61
- 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 -128
- 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 -23
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -19
- package/components/AppInstaller/styled.js +0 -82
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -25
- package/components/AppInstaller/useInstaller.js +0 -179
- 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 -48
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.js.map +0 -1
- package/components/Dialogs/CustomDialog.d.ts +0 -17
- package/components/Dialogs/CustomDialog.js +0 -55
- package/components/Dialogs/CustomDialog.js.map +0 -1
- package/components/Dialogs/styled.d.ts +0 -10
- package/components/Dialogs/styled.js +0 -40
- package/components/Dialogs/styled.js.map +0 -1
- package/components/Filters/Filters.styled.d.ts +0 -13
- package/components/Filters/Filters.styled.js +0 -53
- package/components/Filters/Filters.styled.js.map +0 -1
- package/components/OptionsMenu/OptionsMenu.styled.d.ts +0 -3
- package/components/OptionsMenu/OptionsMenu.styled.js +0 -26
- 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 -24
- 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 -681
- 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 -237
- 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 -13
- 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 -124
- 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 -276
- 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 -487
- 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 -235
- 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 -30
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -43
- package/components/Routes.js.map +0 -1
- package/hooks/createGenericContext.d.ts +0 -13
- package/hooks/createGenericContext.js +0 -34
- package/hooks/createGenericContext.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -40
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/plugins/globalSearch/SearchBar.d.ts +0 -22
- package/plugins/globalSearch/SearchBar.js +0 -225
- package/plugins/globalSearch/SearchBar.js.map +0 -1
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -23
- package/plugins/globalSearch/SearchBarDropdown.js +0 -82
- 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 -17
- package/plugins/globalSearch/index.js.map +0 -1
- package/plugins/globalSearch/styled.d.ts +0 -18
- package/plugins/globalSearch/styled.js +0 -133
- package/plugins/globalSearch/styled.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -62
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/styles/material-theme-assignments.scss +0 -369
- package/styles/material.scss +0 -42
- package/styles/reset.scss +0 -1
- 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 -80
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -24
- package/ui/elements/ButtonElement.js +0 -85
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -6
- package/ui/elements/ButtonGroupElement.js +0 -49
- 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 -45
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -33
- package/ui/elements/NavigationMenuElement.js +0 -141
- package/ui/elements/NavigationMenuElement.js.map +0 -1
- package/ui/elements/PanelElement.d.ts +0 -3
- package/ui/elements/PanelElement.js +0 -22
- package/ui/elements/PanelElement.js.map +0 -1
- package/ui/elements/PlaceholderElement.d.ts +0 -6
- package/ui/elements/PlaceholderElement.js +0 -32
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -6
- package/ui/elements/SmallButtonElement.js +0 -44
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -13
- package/ui/elements/TypographyElement.js +0 -47
- 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 -43
- 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 -134
- 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 -26
- 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 -72
- 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 -99
- 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 -106
- 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 -84
- 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 -44
- 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 -171
- 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 -46
- 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 -53
- 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 -50
- 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 -68
- 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 -54
- 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 -60
- 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 -101
- 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 -41
- 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 -41
- 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 -41
- 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 -47
- 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 -32
- 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 -33
- 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 -57
- 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 -22
- 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 -49
- 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 -80
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -166
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -6
- package/ui/views/OverlayView/ContentElement.js +0 -49
- 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 -109
- 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 -48
- 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 -45
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -29
- package/ui/views/OverlayView.js +0 -161
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -11
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -69
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -118
- package/ui/views/SplitView.js.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React, { useEffect, useCallback, useMemo } from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import isEqual from "lodash/isEqual.js";
|
|
4
|
+
import { FormComponentDescription, FormComponentErrorMessage, FormComponentLabel, PopoverPrimitive } from "@webiny/admin-ui";
|
|
5
|
+
import { IconPickerContent, IconPickerTrigger } from "./components/index.js";
|
|
6
|
+
import { IconPickerPresenterProvider } from "./IconPickerPresenterProvider.js";
|
|
7
|
+
import { ICON_PICKER_SIZE } from "./types.js";
|
|
8
|
+
export const IconPickerComponent = observer(({
|
|
9
|
+
presenter,
|
|
10
|
+
label,
|
|
11
|
+
description,
|
|
12
|
+
removable,
|
|
13
|
+
required,
|
|
14
|
+
disabled,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
value,
|
|
19
|
+
onChange
|
|
20
|
+
} = props;
|
|
21
|
+
const {
|
|
22
|
+
isValid: validationIsValid,
|
|
23
|
+
message: validationMessage
|
|
24
|
+
} = props.validation || {};
|
|
25
|
+
const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);
|
|
26
|
+
const {
|
|
27
|
+
activeTab,
|
|
28
|
+
isMenuOpened,
|
|
29
|
+
isLoading,
|
|
30
|
+
iconTypes,
|
|
31
|
+
selectedIcon,
|
|
32
|
+
size
|
|
33
|
+
} = presenter.vm;
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (onChange && selectedIcon && !isEqual(selectedIcon, value)) {
|
|
36
|
+
onChange(selectedIcon);
|
|
37
|
+
}
|
|
38
|
+
}, [JSON.stringify(selectedIcon)]);
|
|
39
|
+
const removeIcon = useCallback(() => {
|
|
40
|
+
if (onChange) {
|
|
41
|
+
presenter.setIcon(null);
|
|
42
|
+
onChange(undefined);
|
|
43
|
+
}
|
|
44
|
+
}, [onChange]);
|
|
45
|
+
const handleOnOpenChange = useCallback(open => {
|
|
46
|
+
if (open) {
|
|
47
|
+
return presenter.openMenu();
|
|
48
|
+
} else {
|
|
49
|
+
return presenter.closeMenu();
|
|
50
|
+
}
|
|
51
|
+
}, [presenter.openMenu, presenter.closeMenu]);
|
|
52
|
+
return /*#__PURE__*/React.createElement(IconPickerPresenterProvider, {
|
|
53
|
+
presenter: presenter
|
|
54
|
+
}, /*#__PURE__*/React.createElement(FormComponentLabel, {
|
|
55
|
+
text: label,
|
|
56
|
+
required: required,
|
|
57
|
+
disabled: disabled
|
|
58
|
+
}), /*#__PURE__*/React.createElement(FormComponentDescription, {
|
|
59
|
+
text: description
|
|
60
|
+
}), /*#__PURE__*/React.createElement(PopoverPrimitive, {
|
|
61
|
+
open: isMenuOpened,
|
|
62
|
+
onOpenChange: handleOnOpenChange
|
|
63
|
+
}, /*#__PURE__*/React.createElement(PopoverPrimitive.Trigger, null, /*#__PURE__*/React.createElement(IconPickerTrigger, {
|
|
64
|
+
icon: selectedIcon
|
|
65
|
+
})), /*#__PURE__*/React.createElement(PopoverPrimitive.Content, {
|
|
66
|
+
style: {
|
|
67
|
+
width: size === ICON_PICKER_SIZE.SMALL ? "248px" : "328px"
|
|
68
|
+
}
|
|
69
|
+
}, /*#__PURE__*/React.createElement(IconPickerContent, {
|
|
70
|
+
loading: isLoading,
|
|
71
|
+
removable: value && removable,
|
|
72
|
+
iconTypes: iconTypes,
|
|
73
|
+
activeTab: activeTab,
|
|
74
|
+
removeIcon: removeIcon
|
|
75
|
+
}))), /*#__PURE__*/React.createElement(FormComponentErrorMessage, {
|
|
76
|
+
text: validationMessage,
|
|
77
|
+
invalid: invalid
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=IconPickerComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useCallback","useMemo","observer","isEqual","FormComponentDescription","FormComponentErrorMessage","FormComponentLabel","PopoverPrimitive","IconPickerContent","IconPickerTrigger","IconPickerPresenterProvider","ICON_PICKER_SIZE","IconPickerComponent","presenter","label","description","removable","required","disabled","props","value","onChange","isValid","validationIsValid","message","validationMessage","validation","invalid","activeTab","isMenuOpened","isLoading","iconTypes","selectedIcon","size","vm","JSON","stringify","removeIcon","setIcon","undefined","handleOnOpenChange","open","openMenu","closeMenu","createElement","text","onOpenChange","Trigger","icon","Content","style","width","SMALL","loading"],"sources":["IconPickerComponent.tsx"],"sourcesContent":["import React, { useEffect, useCallback, useMemo } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport isEqual from \"lodash/isEqual.js\";\nimport type { FormComponentProps } from \"@webiny/admin-ui\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n PopoverPrimitive\n} from \"@webiny/admin-ui\";\nimport { IconPickerContent, IconPickerTrigger } from \"./components/index.js\";\nimport type { IconPickerPresenter } from \"./IconPickerPresenter.js\";\nimport { IconPickerPresenterProvider } from \"./IconPickerPresenterProvider.js\";\nimport type { Icon } from \"./types.js\";\nimport { ICON_PICKER_SIZE } from \"./types.js\";\n\nexport interface IconPickerProps extends FormComponentProps {\n size?: ICON_PICKER_SIZE;\n removable?: boolean;\n value?: Icon;\n onChange?: (value: Icon | undefined) => void;\n}\n\nexport interface IconPickerComponentProps extends IconPickerProps {\n presenter: IconPickerPresenter;\n}\n\nexport const IconPickerComponent = observer(\n ({\n presenter,\n label,\n description,\n removable,\n required,\n disabled,\n ...props\n }: IconPickerComponentProps) => {\n const { value, onChange } = props;\n const { isValid: validationIsValid, message: validationMessage } = props.validation || {};\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n const { activeTab, isMenuOpened, isLoading, iconTypes, selectedIcon, size } = presenter.vm;\n\n useEffect(() => {\n if (onChange && selectedIcon && !isEqual(selectedIcon, value)) {\n onChange(selectedIcon);\n }\n }, [JSON.stringify(selectedIcon)]);\n\n const removeIcon = useCallback(() => {\n if (onChange) {\n presenter.setIcon(null);\n onChange(undefined);\n }\n }, [onChange]);\n\n const handleOnOpenChange = useCallback(\n (open: boolean) => {\n if (open) {\n return presenter.openMenu();\n } else {\n return presenter.closeMenu();\n }\n },\n [presenter.openMenu, presenter.closeMenu]\n );\n\n return (\n <IconPickerPresenterProvider presenter={presenter}>\n <FormComponentLabel text={label} required={required} disabled={disabled} />\n <FormComponentDescription text={description} />\n <PopoverPrimitive open={isMenuOpened} onOpenChange={handleOnOpenChange}>\n <PopoverPrimitive.Trigger>\n <IconPickerTrigger icon={selectedIcon} />\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Content\n style={{ width: size === ICON_PICKER_SIZE.SMALL ? \"248px\" : \"328px\" }}\n >\n <IconPickerContent\n loading={isLoading}\n removable={value && removable}\n iconTypes={iconTypes}\n activeTab={activeTab}\n removeIcon={removeIcon}\n />\n </PopoverPrimitive.Content>\n </PopoverPrimitive>\n <FormComponentErrorMessage text={validationMessage} invalid={invalid} />\n </IconPickerPresenterProvider>\n );\n }\n);\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC9D,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,OAAOC,OAAO,MAAM,mBAAmB;AAEvC,SACIC,wBAAwB,EACxBC,yBAAyB,EACzBC,kBAAkB,EAClBC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J,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { IconRepository } from "./IconRepository.js";
|
|
2
|
+
import type { Icon } from "./types.js";
|
|
3
|
+
import type { IconType } from "./config/index.js";
|
|
4
|
+
export interface IconPickerPresenterInterface {
|
|
5
|
+
load(icon: Icon): Promise<void>;
|
|
6
|
+
setIcon(icon: Icon): void;
|
|
7
|
+
addIcon(icon: Icon): void;
|
|
8
|
+
setFilter(value: string): void;
|
|
9
|
+
setActiveTab(index: string): void;
|
|
10
|
+
openMenu(): void;
|
|
11
|
+
closeMenu(): void;
|
|
12
|
+
get vm(): {
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
activeTab?: string;
|
|
15
|
+
isMenuOpened: boolean;
|
|
16
|
+
icons: Icon[];
|
|
17
|
+
iconTypes: IconType[];
|
|
18
|
+
selectedIcon: Icon | null;
|
|
19
|
+
filter: string;
|
|
20
|
+
size?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare class IconPickerPresenter implements IconPickerPresenterInterface {
|
|
24
|
+
private repository;
|
|
25
|
+
private selectedIcon;
|
|
26
|
+
private filter;
|
|
27
|
+
private activeTab;
|
|
28
|
+
private isMenuOpened;
|
|
29
|
+
private size;
|
|
30
|
+
constructor(repository: IconRepository, size?: string);
|
|
31
|
+
load(icon?: Icon | null): Promise<void>;
|
|
32
|
+
get vm(): {
|
|
33
|
+
activeTab: string | undefined;
|
|
34
|
+
isMenuOpened: boolean;
|
|
35
|
+
isLoading: boolean;
|
|
36
|
+
icons: Icon[];
|
|
37
|
+
iconTypes: IconType[];
|
|
38
|
+
selectedIcon: Icon | null;
|
|
39
|
+
filter: string;
|
|
40
|
+
size: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
addIcon(icon: Icon): void;
|
|
43
|
+
closeMenu(): void;
|
|
44
|
+
openMenu(): void;
|
|
45
|
+
setActiveTab(value?: string): void;
|
|
46
|
+
setIcon(icon: Icon | null): void;
|
|
47
|
+
setFilter(value: string): void;
|
|
48
|
+
private getFilteredIcons;
|
|
49
|
+
private getActiveTabByType;
|
|
50
|
+
private getDefaultTab;
|
|
51
|
+
private resetActiveTab;
|
|
52
|
+
private detectSelectedIcon;
|
|
53
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { makeAutoObservable, toJS } from "mobx";
|
|
2
|
+
export class IconPickerPresenter {
|
|
3
|
+
selectedIcon = null;
|
|
4
|
+
filter = "";
|
|
5
|
+
activeTab = undefined;
|
|
6
|
+
isMenuOpened = false;
|
|
7
|
+
constructor(repository, size) {
|
|
8
|
+
this.repository = repository;
|
|
9
|
+
this.size = size;
|
|
10
|
+
makeAutoObservable(this);
|
|
11
|
+
}
|
|
12
|
+
async load(icon = null) {
|
|
13
|
+
if (icon?.value) {
|
|
14
|
+
this.selectedIcon = icon;
|
|
15
|
+
}
|
|
16
|
+
await this.repository.loadIcons();
|
|
17
|
+
if (icon && !icon?.value) {
|
|
18
|
+
this.detectSelectedIcon(icon);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
get vm() {
|
|
22
|
+
return {
|
|
23
|
+
activeTab: this.activeTab,
|
|
24
|
+
isMenuOpened: this.isMenuOpened,
|
|
25
|
+
isLoading: this.repository.getLoading().isLoading,
|
|
26
|
+
icons: this.getFilteredIcons(),
|
|
27
|
+
iconTypes: this.repository.getIconTypes(),
|
|
28
|
+
// `toJS` will unwrap an observable into a POJO. This will make it simple to use in child components.
|
|
29
|
+
selectedIcon: toJS(this.selectedIcon),
|
|
30
|
+
filter: this.filter,
|
|
31
|
+
size: this.size
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
addIcon(icon) {
|
|
35
|
+
this.repository.addIcon(icon);
|
|
36
|
+
}
|
|
37
|
+
closeMenu() {
|
|
38
|
+
this.isMenuOpened = false;
|
|
39
|
+
}
|
|
40
|
+
openMenu() {
|
|
41
|
+
this.isMenuOpened = true;
|
|
42
|
+
this.resetActiveTab();
|
|
43
|
+
}
|
|
44
|
+
setActiveTab(value) {
|
|
45
|
+
this.activeTab = value;
|
|
46
|
+
}
|
|
47
|
+
setIcon(icon) {
|
|
48
|
+
this.selectedIcon = icon;
|
|
49
|
+
}
|
|
50
|
+
setFilter(value) {
|
|
51
|
+
this.filter = value;
|
|
52
|
+
}
|
|
53
|
+
getFilteredIcons() {
|
|
54
|
+
const hyphenUnderscoreRegex = /[-_]/g;
|
|
55
|
+
const icons = this.repository.getIcons();
|
|
56
|
+
return icons.filter(icon => icon.name.replace(hyphenUnderscoreRegex, " ").toLowerCase().includes(this.filter.toLowerCase()));
|
|
57
|
+
}
|
|
58
|
+
getActiveTabByType(type) {
|
|
59
|
+
const iconTypes = this.repository.getIconTypes();
|
|
60
|
+
const iconType = iconTypes.find(iconsByType => iconsByType.name === type);
|
|
61
|
+
return iconType?.name || iconTypes[0].name;
|
|
62
|
+
}
|
|
63
|
+
getDefaultTab() {
|
|
64
|
+
return this.repository.getIconTypes()[0].name;
|
|
65
|
+
}
|
|
66
|
+
resetActiveTab() {
|
|
67
|
+
this.setActiveTab(this.selectedIcon ? this.getActiveTabByType(this.selectedIcon.type) : this.getDefaultTab());
|
|
68
|
+
}
|
|
69
|
+
detectSelectedIcon(icon) {
|
|
70
|
+
const iconByName = this.repository.getIcons().find(x => x.name === icon.name && icon.type === x.type);
|
|
71
|
+
if (iconByName) {
|
|
72
|
+
this.selectedIcon = iconByName;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=IconPickerPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","toJS","IconPickerPresenter","selectedIcon","filter","activeTab","undefined","isMenuOpened","constructor","repository","size","load","icon","value","loadIcons","detectSelectedIcon","vm","isLoading","getLoading","icons","getFilteredIcons","iconTypes","getIconTypes","addIcon","closeMenu","openMenu","resetActiveTab","setActiveTab","setIcon","setFilter","hyphenUnderscoreRegex","getIcons","name","replace","toLowerCase","includes","getActiveTabByType","type","iconType","find","iconsByType","getDefaultTab","iconByName","x"],"sources":["IconPickerPresenter.ts"],"sourcesContent":["import { makeAutoObservable, toJS } from \"mobx\";\n\nimport type { IconRepository } from \"./IconRepository.js\";\nimport type { Icon } from \"./types.js\";\nimport type { IconType } from \"./config/index.js\";\n\nexport interface IconPickerPresenterInterface {\n load(icon: Icon): Promise<void>;\n setIcon(icon: Icon): void;\n addIcon(icon: Icon): void;\n setFilter(value: string): void;\n setActiveTab(index: string): void;\n openMenu(): void;\n closeMenu(): void;\n get vm(): {\n isLoading: boolean;\n activeTab?: string;\n isMenuOpened: boolean;\n icons: Icon[];\n iconTypes: IconType[];\n selectedIcon: Icon | null;\n filter: string;\n size?: string;\n };\n}\n\nexport class IconPickerPresenter implements IconPickerPresenterInterface {\n private repository: IconRepository;\n private selectedIcon: Icon | null = null;\n private filter = \"\";\n private activeTab: string | undefined = undefined;\n private isMenuOpened = false;\n private size: string | undefined;\n\n constructor(repository: IconRepository, size?: string) {\n this.repository = repository;\n this.size = size;\n makeAutoObservable(this);\n }\n\n async load(icon: Icon | null = null) {\n if (icon?.value) {\n this.selectedIcon = icon;\n }\n\n await this.repository.loadIcons();\n\n if (icon && !icon?.value) {\n this.detectSelectedIcon(icon);\n }\n }\n\n get vm() {\n return {\n activeTab: this.activeTab,\n isMenuOpened: this.isMenuOpened,\n isLoading: this.repository.getLoading().isLoading,\n icons: this.getFilteredIcons(),\n iconTypes: this.repository.getIconTypes(),\n // `toJS` will unwrap an observable into a POJO. This will make it simple to use in child components.\n selectedIcon: toJS(this.selectedIcon),\n filter: this.filter,\n size: this.size\n };\n }\n\n addIcon(icon: Icon) {\n this.repository.addIcon(icon);\n }\n\n closeMenu(): void {\n this.isMenuOpened = false;\n }\n\n openMenu(): void {\n this.isMenuOpened = true;\n this.resetActiveTab();\n }\n\n setActiveTab(value?: string) {\n this.activeTab = value;\n }\n\n setIcon(icon: Icon | null) {\n this.selectedIcon = icon;\n }\n\n setFilter(value: string) {\n this.filter = value;\n }\n\n private getFilteredIcons() {\n const hyphenUnderscoreRegex = /[-_]/g;\n const icons = this.repository.getIcons();\n\n return icons.filter(icon =>\n icon.name\n .replace(hyphenUnderscoreRegex, \" \")\n .toLowerCase()\n .includes(this.filter.toLowerCase())\n );\n }\n\n private getActiveTabByType(type: string) {\n const iconTypes = this.repository.getIconTypes();\n const iconType = iconTypes.find(iconsByType => iconsByType.name === type);\n\n return iconType?.name || iconTypes[0].name;\n }\n\n private getDefaultTab() {\n return this.repository.getIconTypes()[0].name;\n }\n\n private resetActiveTab() {\n this.setActiveTab(\n this.selectedIcon\n ? this.getActiveTabByType(this.selectedIcon.type)\n : this.getDefaultTab()\n );\n }\n\n private detectSelectedIcon(icon: Icon) {\n const iconByName = this.repository\n .getIcons()\n .find(x => x.name === icon.name && icon.type === x.type);\n\n if (iconByName) {\n this.selectedIcon = iconByName;\n }\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,IAAI,QAAQ,MAAM;AA0B/C,OAAO,MAAMC,mBAAmB,CAAyC;EAE7DC,YAAY,GAAgB,IAAI;EAChCC,MAAM,GAAG,EAAE;EACXC,SAAS,GAAuBC,SAAS;EACzCC,YAAY,GAAG,KAAK;EAG5BC,WAAWA,CAACC,UAA0B,EAAEC,IAAa,EAAE;IACnD,IAAI,CAACD,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChBV,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,MAAMW,IAAIA,CAACC,IAAiB,GAAG,IAAI,EAAE;IACjC,IAAIA,IAAI,EAAEC,KAAK,EAAE;MACb,IAAI,CAACV,YAAY,GAAGS,IAAI;IAC5B;IAEA,MAAM,IAAI,CAACH,UAAU,CAACK,SAAS,CAAC,CAAC;IAEjC,IAAIF,IAAI,IAAI,CAACA,IAAI,EAAEC,KAAK,EAAE;MACtB,IAAI,CAACE,kBAAkB,C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,CACnCI,WAAW,CAAC,CAAC,CACbC,QAAQ,CAAC,IAAI,CAAC/B,MAAM,CAAC8B,WAAW,CAAC,CAAC,CAC3C,CAAC;EACL;EAEQE,kBAAkBA,CAACC,IAAY,EAAE;IACrC,MAAMhB,SAAS,GAAG,IAAI,CAACZ,UAAU,CAACa,YAAY,CAAC,CAAC;IAChD,MAAMgB,QAAQ,GAAGjB,SAAS,CAACkB,IAAI,CAACC,WAAW,IAAIA,WAAW,CAACR,IAAI,KAAKK,IAAI,CAAC;IAEzE,OAAOC,QAAQ,EAAEN,IAAI,IAAIX,SAAS,CAAC,CAAC,CAAC,CAACW,IAAI;EAC9C;EAEQS,aAAaA,CAAA,EAAG;IACpB,OAAO,IAAI,CAAChC,UAAU,CAACa,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAACU,IAAI;EACjD;EAEQN,cAAcA,CAAA,EAAG;IACrB,IAAI,CAACC,YAAY,CACb,IAAI,CAACxB,YAAY,GACX,IAAI,CAACiC,kBAAkB,CAAC,IAAI,CAACjC,YAAY,CAACkC,IAAI,CAAC,GAC/C,IAAI,CAACI,aAAa,CAAC,CAC7B,CAAC;EACL;EAEQ1B,kBAAkBA,CAACH,IAAU,EAAE;IACnC,MAAM8B,UAAU,GAAG,IAAI,CAACjC,UAAU,CAC7BsB,QAAQ,CAAC,CAAC,CACVQ,IAAI,CAACI,CAAC,IAAIA,CAAC,CAACX,IAAI,KAAKpB,IAAI,CAACoB,IAAI,IAAIpB,IAAI,CAACyB,IAAI,KAAKM,CAAC,CAACN,IAAI,CAAC;IAE5D,IAAIK,UAAU,EAAE;MACZ,IAAI,CAACvC,YAAY,GAAGuC,UAAU;IAClC;EACJ;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
2
|
+
import { IconPickerPresenter } from "./IconPickerPresenter.js";
|
|
3
|
+
import { IconRepository } from "./IconRepository.js";
|
|
4
|
+
const mockIconTypes = [{
|
|
5
|
+
name: "icon"
|
|
6
|
+
}, {
|
|
7
|
+
name: "emoji"
|
|
8
|
+
}, {
|
|
9
|
+
name: "custom"
|
|
10
|
+
}];
|
|
11
|
+
const mockIcons = [{
|
|
12
|
+
type: "emoji",
|
|
13
|
+
name: "thumbs_up",
|
|
14
|
+
value: "👍",
|
|
15
|
+
category: "People & Body",
|
|
16
|
+
skinToneSupport: true
|
|
17
|
+
}, {
|
|
18
|
+
type: "icon",
|
|
19
|
+
name: "regular_address-book",
|
|
20
|
+
value: '<path fill="currentColor" d="M384 48c8.8 0 16 7.2 16 16v384c0 8.8-7.2 16-16 16H96c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h288zM96 0C60.7 0 32 28.7 32 64v384c0 35.3 28.7 64 64 64h288c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H96zm144 256a64 64 0 1 0 0-128a64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80h-64zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V80zm-16 112c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16v-64c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16v-64z"/>',
|
|
21
|
+
category: "Business"
|
|
22
|
+
}];
|
|
23
|
+
const mockIconPackProviders = [{
|
|
24
|
+
name: "mock_icons",
|
|
25
|
+
getIcons: async () => {
|
|
26
|
+
return mockIcons;
|
|
27
|
+
}
|
|
28
|
+
}];
|
|
29
|
+
describe("IconPickerPresenter", () => {
|
|
30
|
+
const icon = {
|
|
31
|
+
type: "icon",
|
|
32
|
+
name: "solid_bullseye",
|
|
33
|
+
value: '<path fill="currentColor" d="M448 256a192 192 0 1 0-384 0a192 192 0 1 0 384 0zM0 256a256 256 0 1 1 512 0a256 256 0 1 1-512 0zm256 80a80 80 0 1 0 0-160a80 80 0 1 0 0 160zm0-224a144 144 0 1 1 0 288a144 144 0 1 1 0-288zm-32 144a32 32 0 1 1 64 0a32 32 0 1 1-64 0z"/>',
|
|
34
|
+
category: "Business",
|
|
35
|
+
color: "#282fe6"
|
|
36
|
+
};
|
|
37
|
+
let presenter;
|
|
38
|
+
beforeEach(() => {
|
|
39
|
+
const repository = new IconRepository(mockIconTypes, mockIconPackProviders);
|
|
40
|
+
presenter = new IconPickerPresenter(repository);
|
|
41
|
+
});
|
|
42
|
+
it("should create an IconPickerPresenter with the `vm` definition", async () => {
|
|
43
|
+
// let's load icons and set a predefined `selectedIcon`
|
|
44
|
+
await presenter.load(icon);
|
|
45
|
+
|
|
46
|
+
// `vm` should have the expected `selectedIcon` definition
|
|
47
|
+
expect(presenter.vm.selectedIcon).toEqual(icon);
|
|
48
|
+
|
|
49
|
+
// `vm` should have the expected `icons` definition
|
|
50
|
+
expect(presenter.vm.icons).toEqual(mockIcons);
|
|
51
|
+
});
|
|
52
|
+
it("should be able to select an icon", async () => {
|
|
53
|
+
// let's load icons
|
|
54
|
+
await presenter.load();
|
|
55
|
+
|
|
56
|
+
// should be able to set the icon
|
|
57
|
+
presenter.setIcon(presenter.vm.icons[0]);
|
|
58
|
+
|
|
59
|
+
// `vm` should have the expected `selectedIcon` value
|
|
60
|
+
expect(presenter.vm.selectedIcon).toEqual(presenter.vm.icons[0]);
|
|
61
|
+
});
|
|
62
|
+
it("should be able to add an icon", async () => {
|
|
63
|
+
// let's load icons
|
|
64
|
+
await presenter.load();
|
|
65
|
+
|
|
66
|
+
// should be able to set the icon
|
|
67
|
+
presenter.addIcon(icon);
|
|
68
|
+
|
|
69
|
+
// `vm` should have three icons
|
|
70
|
+
expect(presenter.vm.icons.length).toBe(3);
|
|
71
|
+
|
|
72
|
+
// `vm` should have the expected `icons` value
|
|
73
|
+
expect(presenter.vm.icons).toEqual([...mockIcons, icon]);
|
|
74
|
+
});
|
|
75
|
+
it("should be able to filter icons by name", async () => {
|
|
76
|
+
// let's load icons
|
|
77
|
+
await presenter.load();
|
|
78
|
+
|
|
79
|
+
// should be able to set the filter
|
|
80
|
+
presenter.setFilter("book");
|
|
81
|
+
|
|
82
|
+
// `vm` should have only one icon
|
|
83
|
+
expect(presenter.vm.icons.length).toBe(1);
|
|
84
|
+
|
|
85
|
+
// `vm` should have filtered icon
|
|
86
|
+
expect(presenter.vm.icons[0]).toEqual(mockIcons[1]);
|
|
87
|
+
});
|
|
88
|
+
it("should be able to set active tab on menu open", async () => {
|
|
89
|
+
// let's load icons and set a predefined `selectedIcon`
|
|
90
|
+
await presenter.load(mockIcons[0]);
|
|
91
|
+
|
|
92
|
+
// default `isMenuOpened` should be false
|
|
93
|
+
expect(presenter.vm.isMenuOpened).toBe(false);
|
|
94
|
+
|
|
95
|
+
// default `activeTab` should be handled by the component itself
|
|
96
|
+
expect(presenter.vm.activeTab).toBe(undefined);
|
|
97
|
+
|
|
98
|
+
// should be able to set `isMenuOpened`
|
|
99
|
+
// should be able to set `activeTab` based on `selectedIcon` type
|
|
100
|
+
presenter.openMenu();
|
|
101
|
+
|
|
102
|
+
// `vm` should have the expected `isMenuOpened` value
|
|
103
|
+
expect(presenter.vm.isMenuOpened).toBe(true);
|
|
104
|
+
|
|
105
|
+
// `vm` should have the expected `activeTab` value
|
|
106
|
+
expect(presenter.vm.activeTab).toBe("emoji");
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=IconPickerPresenter.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["describe","it","expect","beforeEach","IconPickerPresenter","IconRepository","mockIconTypes","name","mockIcons","type","value","category","skinToneSupport","mockIconPackProviders","getIcons","icon","color","presenter","repository","load","vm","selectedIcon","toEqual","icons","setIcon","addIcon","length","toBe","setFilter","isMenuOpened","activeTab","undefined","openMenu"],"sources":["IconPickerPresenter.test.ts"],"sourcesContent":["import { describe, it, expect, beforeEach } from \"vitest\";\nimport { IconPickerPresenter } from \"./IconPickerPresenter.js\";\nimport { IconRepository } from \"./IconRepository.js\";\nimport type { Icon } from \"./types.js\";\n\nconst mockIconTypes = [{ name: \"icon\" }, { name: \"emoji\" }, { name: \"custom\" }];\n\nconst mockIcons: Icon[] = [\n {\n type: \"emoji\",\n name: \"thumbs_up\",\n value: \"👍\",\n category: \"People & Body\",\n skinToneSupport: true\n },\n {\n type: \"icon\",\n name: \"regular_address-book\",\n value: '<path fill=\"currentColor\" d=\"M384 48c8.8 0 16 7.2 16 16v384c0 8.8-7.2 16-16 16H96c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h288zM96 0C60.7 0 32 28.7 32 64v384c0 35.3 28.7 64 64 64h288c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H96zm144 256a64 64 0 1 0 0-128a64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80h-64zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V80zm-16 112c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16v-64c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16v-64z\"/>',\n category: \"Business\"\n }\n];\n\nconst mockIconPackProviders = [\n {\n name: \"mock_icons\",\n getIcons: async () => {\n return mockIcons;\n }\n }\n];\n\ndescribe(\"IconPickerPresenter\", () => {\n const icon: Icon = {\n type: \"icon\",\n name: \"solid_bullseye\",\n value: '<path fill=\"currentColor\" d=\"M448 256a192 192 0 1 0-384 0a192 192 0 1 0 384 0zM0 256a256 256 0 1 1 512 0a256 256 0 1 1-512 0zm256 80a80 80 0 1 0 0-160a80 80 0 1 0 0 160zm0-224a144 144 0 1 1 0 288a144 144 0 1 1 0-288zm-32 144a32 32 0 1 1 64 0a32 32 0 1 1-64 0z\"/>',\n category: \"Business\",\n color: \"#282fe6\"\n };\n\n let presenter: IconPickerPresenter;\n\n beforeEach(() => {\n const repository = new IconRepository(mockIconTypes, mockIconPackProviders);\n presenter = new IconPickerPresenter(repository);\n });\n\n it(\"should create an IconPickerPresenter with the `vm` definition\", async () => {\n // let's load icons and set a predefined `selectedIcon`\n await presenter.load(icon);\n\n // `vm` should have the expected `selectedIcon` definition\n expect(presenter.vm.selectedIcon).toEqual(icon);\n\n // `vm` should have the expected `icons` definition\n expect(presenter.vm.icons).toEqual(mockIcons);\n });\n\n it(\"should be able to select an icon\", async () => {\n // let's load icons\n await presenter.load();\n\n // should be able to set the icon\n presenter.setIcon(presenter.vm.icons[0]);\n\n // `vm` should have the expected `selectedIcon` value\n expect(presenter.vm.selectedIcon).toEqual(presenter.vm.icons[0]);\n });\n\n it(\"should be able to add an icon\", async () => {\n // let's load icons\n await presenter.load();\n\n // should be able to set the icon\n presenter.addIcon(icon);\n\n // `vm` should have three icons\n expect(presenter.vm.icons.length).toBe(3);\n\n // `vm` should have the expected `icons` value\n expect(presenter.vm.icons).toEqual([...mockIcons, icon]);\n });\n\n it(\"should be able to filter icons by name\", async () => {\n // let's load icons\n await presenter.load();\n\n // should be able to set the filter\n presenter.setFilter(\"book\");\n\n // `vm` should have only one icon\n expect(presenter.vm.icons.length).toBe(1);\n\n // `vm` should have filtered icon\n expect(presenter.vm.icons[0]).toEqual(mockIcons[1]);\n });\n\n it(\"should be able to set active tab on menu open\", async () => {\n // let's load icons and set a predefined `selectedIcon`\n await presenter.load(mockIcons[0]);\n\n // default `isMenuOpened` should be false\n expect(presenter.vm.isMenuOpened).toBe(false);\n\n // default `activeTab` should be handled by the component itself\n expect(presenter.vm.activeTab).toBe(undefined);\n\n // should be able to set `isMenuOpened`\n // should be able to set `activeTab` based on `selectedIcon` type\n presenter.openMenu();\n\n // `vm` should have the expected `isMenuOpened` value\n expect(presenter.vm.isMenuOpened).toBe(true);\n\n // `vm` should have the expected `activeTab` value\n expect(presenter.vm.activeTab).toBe(\"emoji\");\n });\n});\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,EAAEC,UAAU,QAAQ,QAAQ;AACzD,SAASC,mBAAmB;AAC5B,SAASC,cAAc;AAGvB,MAAMC,aAAa,GAAG,CAAC;EAAEC,IAAI,EAAE;AAAO,CAAC,EAAE;EAAEA,IAAI,EAAE;AAAQ,CAAC,EAAE;EAAEA,IAAI,EAAE;AAAS,CAAC,CAAC;AAE/E,MAAMC,SAAiB,GAAG,CACtB;EACIC,IAAI,EAAE,OAAO;EACbF,IAAI,EAAE,WAAW;EACjBG,KAAK,EAAE,IAAI;EACXC,QAAQ,EAAE,eAAe;EACzBC,eAAe,EAAE;AACrB,CAAC,EACD;EACIH,IAAI,EAAE,MAAM;EACZF,IAAI,EAAE,sBAAsB;EAC5BG,KAAK,EAAE,inBAAinB;EACxnBC,QAAQ,EAAE;AACd,CAAC,CACJ;AAED,MAAME,qBAAqB,GAAG,CAC1B;EACIN,IAAI,EAAE,YAAY;EAClBO,QAAQ,EAAE,MAAAA,CAAA,KAAY;IAClB,OAAON,SAAS;EACpB;AACJ,CAAC,CACJ;AAEDR,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EAClC,MAAMe,IAAU,GAAG;IACfN,IAAI,EAAE,MAAM;IACZF,IAAI,EAAE,gBAAgB;IACtBG,KAAK,EAAE,wQAAwQ;IAC/QC,QAAQ,EAAE,UAAU;IACpBK,KAAK,EAAE;EACX,CAAC;EAED,IAAIC,SAA8B;EAElCd,UAAU,CAAC,MAAM;IACb,MAAMe,UAAU,GAAG,IAAIb,cAAc,CAACC,aAAa,EAAEO,qBAAqB,CAAC;IAC3EI,SAAS,GAAG,IAAIb,mBAAmB,CAACc,UAAU,C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EAAE,CAACG,KAAK,CAACG,MAAM,CAAC,CAACC,IAAI,CAAC,CAAC,CAAC;;IAEzC;IACAzB,MAAM,CAACe,SAAS,CAACG,EAAE,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAACD,OAAO,CAACd,SAAS,CAAC,CAAC,CAAC,CAAC;EACvD,CAAC,CAAC;EAEFP,EAAE,CAAC,+CAA+C,EAAE,YAAY;IAC5D;IACA,MAAMgB,SAAS,CAACE,IAAI,CAACX,SAAS,CAAC,CAAC,CAAC,CAAC;;IAElC;IACAN,MAAM,CAACe,SAAS,CAACG,EAAE,CAACS,YAAY,CAAC,CAACF,IAAI,CAAC,KAAK,CAAC;;IAE7C;IACAzB,MAAM,CAACe,SAAS,CAACG,EAAE,CAACU,SAAS,CAAC,CAACH,IAAI,CAACI,SAAS,CAAC;;IAE9C;IACA;IACAd,SAAS,CAACe,QAAQ,CAAC,CAAC;;IAEpB;IACA9B,MAAM,CAACe,SAAS,CAACG,EAAE,CAACS,YAAY,CAAC,CAACF,IAAI,CAAC,IAAI,CAAC;;IAE5C;IACAzB,MAAM,CAACe,SAAS,CAACG,EAAE,CAACU,SAAS,CAAC,CAACH,IAAI,CAAC,OAAO,CAAC;EAChD,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IconPickerPresenterInterface } from "./IconPickerPresenter.js";
|
|
3
|
+
interface IconPickerPresenterProviderProps {
|
|
4
|
+
presenter: IconPickerPresenterInterface;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const IconPickerPresenterProvider: ({ presenter, children }: IconPickerPresenterProviderProps) => React.JSX.Element;
|
|
8
|
+
export declare function useIconPicker(): IconPickerPresenterInterface;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const IconPickerPresenterContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
export const IconPickerPresenterProvider = ({
|
|
4
|
+
presenter,
|
|
5
|
+
children
|
|
6
|
+
}) => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(IconPickerPresenterContext.Provider, {
|
|
8
|
+
value: presenter
|
|
9
|
+
}, children);
|
|
10
|
+
};
|
|
11
|
+
export function useIconPicker() {
|
|
12
|
+
const context = React.useContext(IconPickerPresenterContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw Error(`Missing <IconPickerPresenterProvider> in the component tree!`);
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=IconPickerPresenterProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","IconPickerPresenterContext","createContext","undefined","IconPickerPresenterProvider","presenter","children","createElement","Provider","value","useIconPicker","context","useContext","Error"],"sources":["IconPickerPresenterProvider.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { IconPickerPresenterInterface } from \"./IconPickerPresenter.js\";\n\ninterface IconPickerPresenterProviderProps {\n presenter: IconPickerPresenterInterface;\n children: React.ReactNode;\n}\n\nconst IconPickerPresenterContext = React.createContext<IconPickerPresenterInterface | undefined>(\n undefined\n);\n\nexport const IconPickerPresenterProvider = ({\n presenter,\n children\n}: IconPickerPresenterProviderProps) => {\n return (\n <IconPickerPresenterContext.Provider value={presenter}>\n {children}\n </IconPickerPresenterContext.Provider>\n );\n};\n\nexport function useIconPicker() {\n const context = React.useContext(IconPickerPresenterContext);\n if (!context) {\n throw Error(`Missing <IconPickerPresenterProvider> in the component tree!`);\n }\n return context;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AASzB,MAAMC,0BAA0B,gBAAGD,KAAK,CAACE,aAAa,CAClDC,SACJ,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EACxCC,SAAS;EACTC;AAC8B,CAAC,KAAK;EACpC,oBACIN,KAAA,CAAAO,aAAA,CAACN,0BAA0B,CAACO,QAAQ;IAACC,KAAK,EAAEJ;EAAU,GACjDC,QACgC,CAAC;AAE9C,CAAC;AAED,OAAO,SAASI,aAAaA,CAAA,EAAG;EAC5B,MAAMC,OAAO,GAAGX,KAAK,CAACY,UAAU,CAACX,0BAA0B,CAAC;EAC5D,IAAI,CAACU,OAAO,EAAE;IACV,MAAME,KAAK,CAAC,8DAA8D,CAAC;EAC/E;EACA,OAAOF,OAAO;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Icon } from "./types.js";
|
|
3
|
+
export declare const IconPickerTabRenderer: (() => null) & {
|
|
4
|
+
original: () => null;
|
|
5
|
+
originalName: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
} & {
|
|
8
|
+
original: (() => null) & {
|
|
9
|
+
original: () => null;
|
|
10
|
+
originalName: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
originalName: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
} & {
|
|
16
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(() => null) & {
|
|
17
|
+
original: () => null;
|
|
18
|
+
originalName: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
interface CellDecorator {
|
|
23
|
+
(cell: React.ReactElement): React.ReactElement;
|
|
24
|
+
}
|
|
25
|
+
export interface IconPickerTabProps {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
onChange: (icon: Icon) => void;
|
|
29
|
+
actions?: React.ReactElement;
|
|
30
|
+
cellDecorator?: CellDecorator;
|
|
31
|
+
}
|
|
32
|
+
export declare const IconPickerTab: ({ label, value, actions, onChange, cellDecorator }: IconPickerTabProps) => React.JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import React, { Fragment } from "react";
|
|
2
|
+
import { ReactComponent as SearchIcon } from "@webiny/icons/search.svg";
|
|
3
|
+
import { List } from "react-virtualized";
|
|
4
|
+
import groupBy from "lodash/groupBy.js";
|
|
5
|
+
import { Text, DelayedOnChange, Input, Tabs, Icon as IconComponent } from "@webiny/admin-ui";
|
|
6
|
+
import { makeDecoratable } from "@webiny/react-composition";
|
|
7
|
+
import { useIconPicker } from "./IconPickerPresenterProvider.js";
|
|
8
|
+
import { useIconType } from "./config/IconType.js";
|
|
9
|
+
import { IconPickerCell, IconPickerRow } from "./components/index.js";
|
|
10
|
+
import { ICON_PICKER_SIZE } from "./types.js";
|
|
11
|
+
const COLUMN_COUNT = 8;
|
|
12
|
+
export const IconPickerTabRenderer = makeDecoratable("IconPickerTabRenderer", () => null);
|
|
13
|
+
const getRows = (icons, size) => {
|
|
14
|
+
// Group the icons by their category.
|
|
15
|
+
const groupedObjects = groupBy(icons, "category");
|
|
16
|
+
const rows = [];
|
|
17
|
+
|
|
18
|
+
// Iterate over each category in the grouped icons.
|
|
19
|
+
for (const key in groupedObjects) {
|
|
20
|
+
// Skip any group where the key is `undefined` (these icons will be handled separately).
|
|
21
|
+
if (key !== "undefined") {
|
|
22
|
+
const rowIcons = groupedObjects[key];
|
|
23
|
+
|
|
24
|
+
// Add a row for the category name.
|
|
25
|
+
rows.push({
|
|
26
|
+
type: "category-name",
|
|
27
|
+
name: key
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Split the icons in this category into groups of COLUMN_COUNT and add them as rows.
|
|
31
|
+
while (rowIcons.length) {
|
|
32
|
+
rows.push({
|
|
33
|
+
type: "icons",
|
|
34
|
+
icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Handle icons that don't have a category (key is `undefined`).
|
|
41
|
+
if (groupedObjects.undefined) {
|
|
42
|
+
const rowIcons = groupedObjects.undefined;
|
|
43
|
+
|
|
44
|
+
// Add a row for the `Uncategorized` category name.
|
|
45
|
+
rows.push({
|
|
46
|
+
type: "category-name",
|
|
47
|
+
name: "Uncategorized"
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Split these icons into groups of COLUMN_COUNT and add them as rows.
|
|
51
|
+
while (rowIcons.length) {
|
|
52
|
+
rows.push({
|
|
53
|
+
type: "icons",
|
|
54
|
+
icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return rows;
|
|
59
|
+
};
|
|
60
|
+
const useIconTypeRows = type => {
|
|
61
|
+
const presenter = useIconPicker();
|
|
62
|
+
const icons = presenter.vm.icons.filter(icon => icon.type === type);
|
|
63
|
+
const rows = getRows(icons, presenter.vm.size);
|
|
64
|
+
return {
|
|
65
|
+
isEmpty: rows.length === 0,
|
|
66
|
+
rows,
|
|
67
|
+
rowCount: rows.length
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
const RowRenderer = ({
|
|
71
|
+
row,
|
|
72
|
+
style,
|
|
73
|
+
cellDecorator,
|
|
74
|
+
onIconClick
|
|
75
|
+
}) => {
|
|
76
|
+
const presenter = useIconPicker();
|
|
77
|
+
const value = presenter.vm.selectedIcon;
|
|
78
|
+
if (row.type === "category-name") {
|
|
79
|
+
return /*#__PURE__*/React.createElement(IconPickerRow, {
|
|
80
|
+
style: style
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
82
|
+
size: "sm",
|
|
83
|
+
className: "uppercase self-end text-neutral-muted mb-sm"
|
|
84
|
+
}, row.name));
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/React.createElement(IconPickerRow, {
|
|
87
|
+
style: style
|
|
88
|
+
}, row.icons.map((item, itemKey) => /*#__PURE__*/React.createElement(Fragment, {
|
|
89
|
+
key: itemKey
|
|
90
|
+
}, cellDecorator(/*#__PURE__*/React.createElement(IconPickerCell, {
|
|
91
|
+
key: itemKey,
|
|
92
|
+
icon: item,
|
|
93
|
+
isActive: item.name === value?.name,
|
|
94
|
+
onIconClick: () => onIconClick(item)
|
|
95
|
+
})))));
|
|
96
|
+
};
|
|
97
|
+
const noopDecorator = cell => cell;
|
|
98
|
+
export const IconPickerTab = ({
|
|
99
|
+
label,
|
|
100
|
+
value,
|
|
101
|
+
actions,
|
|
102
|
+
onChange,
|
|
103
|
+
cellDecorator = noopDecorator
|
|
104
|
+
}) => {
|
|
105
|
+
const {
|
|
106
|
+
type
|
|
107
|
+
} = useIconType();
|
|
108
|
+
const {
|
|
109
|
+
isEmpty,
|
|
110
|
+
rowCount,
|
|
111
|
+
rows
|
|
112
|
+
} = useIconTypeRows(type);
|
|
113
|
+
const presenter = useIconPicker();
|
|
114
|
+
const size = presenter.vm.size;
|
|
115
|
+
return /*#__PURE__*/React.createElement(Tabs.Tab, {
|
|
116
|
+
value: value,
|
|
117
|
+
trigger: label,
|
|
118
|
+
content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: "flex items-center justify-center gap-sm"
|
|
120
|
+
}, /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
121
|
+
value: presenter.vm.filter,
|
|
122
|
+
onChange: value => presenter.setFilter(value)
|
|
123
|
+
}, ({
|
|
124
|
+
value,
|
|
125
|
+
onChange
|
|
126
|
+
}) => /*#__PURE__*/React.createElement(Input, {
|
|
127
|
+
value: value,
|
|
128
|
+
onChange: value => onChange(value),
|
|
129
|
+
placeholder: "Search icons...",
|
|
130
|
+
variant: "secondary",
|
|
131
|
+
size: "md",
|
|
132
|
+
startIcon: /*#__PURE__*/React.createElement(IconComponent, {
|
|
133
|
+
icon: /*#__PURE__*/React.createElement(SearchIcon, null),
|
|
134
|
+
label: "Search icons"
|
|
135
|
+
})
|
|
136
|
+
})), actions ? /*#__PURE__*/React.createElement("div", null, actions) : null), /*#__PURE__*/React.createElement("div", {
|
|
137
|
+
className: "relative"
|
|
138
|
+
}, isEmpty ? /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "pt-md text-neutral-strong"
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Text, null, "No results found.")) : /*#__PURE__*/React.createElement(List, {
|
|
141
|
+
className: "outline-none",
|
|
142
|
+
rowRenderer: ({
|
|
143
|
+
key,
|
|
144
|
+
...props
|
|
145
|
+
}) => /*#__PURE__*/React.createElement(RowRenderer, Object.assign({
|
|
146
|
+
key: key,
|
|
147
|
+
row: rows[props.index],
|
|
148
|
+
cellDecorator: cellDecorator,
|
|
149
|
+
onIconClick: onChange
|
|
150
|
+
}, props)),
|
|
151
|
+
width: size === ICON_PICKER_SIZE.SMALL ? 232 : 312,
|
|
152
|
+
height: size === ICON_PICKER_SIZE.SMALL ? 240 : 350,
|
|
153
|
+
rowCount: rowCount,
|
|
154
|
+
rowHeight: 40
|
|
155
|
+
})))
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
//# sourceMappingURL=IconPickerTab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Fragment","ReactComponent","SearchIcon","List","groupBy","Text","DelayedOnChange","Input","Tabs","Icon","IconComponent","makeDecoratable","useIconPicker","useIconType","IconPickerCell","IconPickerRow","ICON_PICKER_SIZE","COLUMN_COUNT","IconPickerTabRenderer","getRows","icons","size","groupedObjects","rows","key","rowIcons","push","type","name","length","splice","SMALL","undefined","useIconTypeRows","presenter","vm","filter","icon","isEmpty","rowCount","RowRenderer","row","style","cellDecorator","onIconClick","value","selectedIcon","createElement","className","map","item","itemKey","isActive","noopDecorator","cell","IconPickerTab","label","actions","onChange","Tab","trigger","content","setFilter","placeholder","variant","startIcon","rowRenderer","props","Object","assign","index","width","height","rowHeight"],"sources":["IconPickerTab.tsx"],"sourcesContent":["import React, { Fragment } from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { List } from \"react-virtualized\";\nimport groupBy from \"lodash/groupBy.js\";\n\nimport { Text, DelayedOnChange, Input, Tabs, Icon as IconComponent } from \"@webiny/admin-ui\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\n\nimport { useIconPicker } from \"./IconPickerPresenterProvider.js\";\nimport { useIconType } from \"./config/IconType.js\";\nimport { IconPickerCell, IconPickerRow } from \"./components/index.js\";\nimport type { Icon, IconPickerGridRow } from \"./types.js\";\nimport { ICON_PICKER_SIZE } from \"./types.js\";\n\nconst COLUMN_COUNT = 8;\n\nexport const IconPickerTabRenderer = makeDecoratable(\"IconPickerTabRenderer\", () => null);\n\nconst getRows = (icons: Icon[], size?: string) => {\n // Group the icons by their category.\n const groupedObjects = groupBy(icons, \"category\");\n const rows: IconPickerGridRow[] = [];\n\n // Iterate over each category in the grouped icons.\n for (const key in groupedObjects) {\n // Skip any group where the key is `undefined` (these icons will be handled separately).\n if (key !== \"undefined\") {\n const rowIcons = groupedObjects[key];\n\n // Add a row for the category name.\n rows.push({ type: \"category-name\", name: key });\n\n // Split the icons in this category into groups of COLUMN_COUNT and add them as rows.\n while (rowIcons.length) {\n rows.push({\n type: \"icons\",\n icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)\n });\n }\n }\n }\n\n // Handle icons that don't have a category (key is `undefined`).\n if (groupedObjects.undefined) {\n const rowIcons = groupedObjects.undefined;\n\n // Add a row for the `Uncategorized` category name.\n rows.push({ type: \"category-name\", name: \"Uncategorized\" });\n\n // Split these icons into groups of COLUMN_COUNT and add them as rows.\n while (rowIcons.length) {\n rows.push({\n type: \"icons\",\n icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)\n });\n }\n }\n\n return rows;\n};\n\nconst useIconTypeRows = (type: string) => {\n const presenter = useIconPicker();\n const icons = presenter.vm.icons.filter(icon => icon.type === type);\n const rows = getRows(icons, presenter.vm.size);\n\n return {\n isEmpty: rows.length === 0,\n rows,\n rowCount: rows.length\n };\n};\n\ninterface RenderRowProps {\n onIconClick: (icon: Icon) => void;\n style: Record<string, any>;\n row: IconPickerGridRow;\n cellDecorator: CellDecorator;\n}\n\nconst RowRenderer = ({ row, style, cellDecorator, onIconClick }: RenderRowProps) => {\n const presenter = useIconPicker();\n const value = presenter.vm.selectedIcon;\n\n if (row.type === \"category-name\") {\n return (\n <IconPickerRow style={style}>\n <Text size={\"sm\"} className={\"uppercase self-end text-neutral-muted mb-sm\"}>\n {row.name}\n </Text>\n </IconPickerRow>\n );\n }\n\n return (\n <IconPickerRow style={style}>\n {row.icons.map((item, itemKey) => (\n <Fragment key={itemKey}>\n {cellDecorator(\n <IconPickerCell\n key={itemKey}\n icon={item}\n isActive={item.name === value?.name}\n onIconClick={() => onIconClick(item)}\n />\n )}\n </Fragment>\n ))}\n </IconPickerRow>\n );\n};\n\ninterface CellDecorator {\n (cell: React.ReactElement): React.ReactElement;\n}\n\nconst noopDecorator: CellDecorator = cell => cell;\n\nexport interface IconPickerTabProps {\n label: string;\n value: string;\n onChange: (icon: Icon) => void;\n actions?: React.ReactElement;\n cellDecorator?: CellDecorator;\n}\n\nexport const IconPickerTab = ({\n label,\n value,\n actions,\n onChange,\n cellDecorator = noopDecorator\n}: IconPickerTabProps) => {\n const { type } = useIconType();\n const { isEmpty, rowCount, rows } = useIconTypeRows(type);\n const presenter = useIconPicker();\n const size = presenter.vm.size;\n\n return (\n <Tabs.Tab\n value={value}\n trigger={label}\n content={\n <div>\n <div className={\"flex items-center justify-center gap-sm\"}>\n <DelayedOnChange\n value={presenter.vm.filter}\n onChange={value => presenter.setFilter(value)}\n >\n {({ value, onChange }) => (\n <Input\n value={value}\n onChange={value => onChange(value as unknown as string)}\n placeholder={\"Search icons...\"}\n variant={\"secondary\"}\n size={\"md\"}\n startIcon={\n <IconComponent\n icon={<SearchIcon />}\n label={\"Search icons\"}\n />\n }\n />\n )}\n </DelayedOnChange>\n {actions ? <div>{actions}</div> : null}\n </div>\n <div className={\"relative\"}>\n {isEmpty ? (\n <div className={\"pt-md text-neutral-strong\"}>\n <Text>{\"No results found.\"}</Text>\n </div>\n ) : (\n <List\n className={\"outline-none\"}\n rowRenderer={({ key, ...props }) => (\n <RowRenderer\n key={key}\n row={rows[props.index]}\n cellDecorator={cellDecorator}\n onIconClick={onChange}\n {...props}\n />\n )}\n width={size === ICON_PICKER_SIZE.SMALL ? 232 : 312}\n height={size === ICON_PICKER_SIZE.SMALL ? 240 : 350}\n rowCount={rowCount}\n rowHeight={40}\n />\n )}\n </div>\n </div>\n }\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASC,IAAI,QAAQ,mBAAmB;AACxC,OAAOC,OAAO,MAAM,mBAAmB;AAEvC,SAASC,IAAI,EAAEC,eAAe,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,IAAIC,aAAa,QAAQ,kBAAkB;AAC5F,SAASC,eAAe,QAAQ,2BAA2B;AAE3D,SAASC,aAAa;AACtB,SAASC,WAAW;AACpB,SAASC,cAAc,EAAEC,aAAa;AAEtC,SAASC,gBAAgB;AAEzB,MAAMC,YAAY,GAAG,CAAC;AAEtB,OAAO,MAAMC,qBAAqB,GAAGP,eAAe,CAAC,uBAAuB,EAAE,MAAM,IAAI,CAAC;AAEzF,MAAMQ,OAAO,GAAGA,CAACC,KAAa,EAAEC,IAAa,KAAK;EAC9C;EACA,MAAMC,cAAc,GAAGlB,OAAO,CAACgB,KAAK,EAAE,UAAU,CAAC;EACjD,MAAMG,IAAyB,GAAG,EAAE;;EAEpC;EACA,KAAK,MAAMC,GAAG,IAAIF,cAAc,EAAE;IAC9B;IACA,IAAIE,GAAG,KAAK,WAAW,EAAE;MACrB,MAAMC,QAAQ,GAAGH,cAAc,CAACE,GAAG,CAAC;;MAEpC;MACAD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