@webiny/app-admin 0.0.0-mt-3 → 0.0.0-unstable.06b2ede40f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/add-18px.svg +1 -1
- package/assets/icons/arrow_drop_down-24px.svg +1 -1
- package/assets/icons/file_download.svg +1 -0
- package/assets/icons/file_upload.svg +1 -0
- package/assets/icons/filter-24px.svg +1 -1
- package/assets/icons/highlight-24px.svg +1 -1
- package/assets/icons/info.svg +1 -1
- package/assets/icons/insert_drive_file-24px.svg +1 -1
- package/assets/icons/insert_photo-24px.svg +1 -1
- package/assets/icons/label-24px.svg +1 -1
- package/assets/icons/round-account_circle-24px.svg +1 -1
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
- package/assets/icons/round-help-24px.svg +1 -1
- package/assets/icons/round-settings-24px.svg +1 -1
- package/assets/icons/slack-logo.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.d.ts +7 -0
- package/base/Admin.js +28 -0
- package/base/Admin.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
- package/base/Base/Menus/SupportMenuItems.js +20 -0
- package/base/Base/Menus/SupportMenuItems.js.map +1 -0
- package/base/Base/Menus/WebinyVersion.d.ts +2 -0
- package/base/Base/Menus/WebinyVersion.js +24 -0
- package/base/Base/Menus/WebinyVersion.js.map +1 -0
- package/base/Base/Menus.d.ts +2 -0
- package/base/Base/Menus.js +129 -0
- package/base/Base/Menus.js.map +1 -0
- package/base/Base/Routes.d.ts +2 -0
- package/base/Base/Routes.js +24 -0
- package/base/Base/Routes.js.map +1 -0
- package/base/Base/Tenant/wby-logo.svg +3 -0
- package/base/Base/Tenant.d.ts +2 -0
- package/base/Base/Tenant.js +19 -0
- package/base/Base/Tenant.js.map +1 -0
- package/base/Base.d.ts +2 -0
- package/base/Base.js +14 -0
- package/base/Base.js.map +1 -0
- package/base/WebinyVersion.d.ts +2 -0
- package/base/WebinyVersion.js +24 -0
- package/base/WebinyVersion.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +8 -0
- package/base/plugins/AddGraphQLQuerySelection.js +18 -0
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -0
- package/base/providers/AdminUiStateProvider.d.ts +1 -0
- package/base/providers/AdminUiStateProvider.js +14 -0
- package/base/providers/AdminUiStateProvider.js.map +1 -0
- package/base/providers/ApolloProvider.d.ts +13 -0
- package/base/providers/ApolloProvider.js +16 -0
- package/base/providers/ApolloProvider.js.map +1 -0
- package/base/providers/TelemetryProvider.d.ts +1 -0
- package/base/providers/TelemetryProvider.js +22 -0
- package/base/providers/TelemetryProvider.js.map +1 -0
- package/base/providers/UiProviders.d.ts +1 -0
- package/base/providers/UiProviders.js +14 -0
- package/base/providers/UiProviders.js.map +1 -0
- package/base/providers/UiStateProvider.d.ts +1 -0
- package/base/providers/UiStateProvider.js +14 -0
- package/base/providers/UiStateProvider.js.map +1 -0
- package/base/providers/ViewCompositionProvider.d.ts +21 -0
- package/base/providers/ViewCompositionProvider.js +47 -0
- package/base/providers/ViewCompositionProvider.js.map +1 -0
- package/base/ui/Brand.d.ts +39 -0
- package/base/ui/Brand.js +8 -0
- package/base/ui/Brand.js.map +1 -0
- package/base/ui/CenteredView.d.ts +24 -0
- package/base/ui/CenteredView.js +15 -0
- package/base/ui/CenteredView.js.map +1 -0
- package/base/ui/Dashboard.d.ts +39 -0
- package/base/ui/Dashboard.js +8 -0
- package/base/ui/Dashboard.js.map +1 -0
- package/base/ui/FileManager.d.ts +86 -0
- package/base/ui/FileManager.js +60 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +45 -0
- package/base/ui/Layout.js +11 -0
- package/base/ui/Layout.js.map +1 -0
- package/base/ui/LocaleSelector.d.ts +39 -0
- package/base/ui/LocaleSelector.js +8 -0
- package/base/ui/LocaleSelector.js.map +1 -0
- package/base/ui/LoginScreen.d.ts +25 -0
- package/base/ui/LoginScreen.js +25 -0
- package/base/ui/LoginScreen.js.map +1 -0
- package/base/ui/Logo.d.ts +39 -0
- package/base/ui/Logo.js +8 -0
- package/base/ui/Logo.js.map +1 -0
- package/base/ui/Navigation.d.ts +40 -0
- package/base/ui/Navigation.js +19 -0
- package/base/ui/Navigation.js.map +1 -0
- package/base/ui/NotFound.d.ts +39 -0
- package/base/ui/NotFound.js +8 -0
- package/base/ui/NotFound.js.map +1 -0
- package/base/ui/Tags.d.ts +10 -0
- package/base/ui/Tags.js +20 -0
- package/base/ui/Tags.js.map +1 -0
- package/base/ui/TenantSelector.d.ts +39 -0
- package/base/ui/TenantSelector.js +8 -0
- package/base/ui/TenantSelector.js.map +1 -0
- package/base/ui/UserMenu/UserMenu.d.ts +39 -0
- package/base/ui/UserMenu/UserMenu.js +8 -0
- package/base/ui/UserMenu/UserMenu.js.map +1 -0
- package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
- package/base/ui/UserMenu/UserMenuHandle.js +8 -0
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
- package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuItem.js +19 -0
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
- package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuLink.js +19 -0
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
- package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
- package/base/ui/UserMenu.d.ts +80 -0
- package/base/ui/UserMenu.js +19 -0
- package/base/ui/UserMenu.js.map +1 -0
- package/components/AdminLayout.d.ts +2 -2
- package/components/AdminLayout.js +12 -35
- package/components/AdminLayout.js.map +1 -0
- package/components/AppInstaller/AppInstaller.d.ts +11 -0
- package/components/AppInstaller/AppInstaller.js +113 -0
- package/components/AppInstaller/AppInstaller.js.map +1 -0
- package/components/AppInstaller/Sidebar.d.ts +8 -6
- package/components/AppInstaller/Sidebar.js +65 -115
- package/components/AppInstaller/Sidebar.js.map +1 -0
- package/components/AppInstaller/index.d.ts +2 -5
- package/components/AppInstaller/index.js +16 -133
- package/components/AppInstaller/index.js.map +1 -0
- package/components/AppInstaller/styled.d.ts +16 -4
- package/components/AppInstaller/styled.js +61 -59
- package/components/AppInstaller/styled.js.map +1 -0
- package/components/AppInstaller/useInstaller.d.ts +23 -9
- package/components/AppInstaller/useInstaller.js +105 -215
- package/components/AppInstaller/useInstaller.js.map +1 -0
- package/components/BulkActions/Worker.d.ts +83 -0
- package/components/BulkActions/Worker.js +126 -0
- package/components/BulkActions/Worker.js.map +1 -0
- package/components/BulkActions/index.d.ts +2 -0
- package/components/BulkActions/index.js +4 -0
- package/components/BulkActions/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +5 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +23 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -0
- package/components/BulkActions/useDialogWithReport/index.js +3 -0
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +19 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +51 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -0
- package/components/Buttons/Buttons.d.ts +24 -0
- package/components/Buttons/Buttons.js +77 -0
- package/components/Buttons/Buttons.js.map +1 -0
- package/components/Buttons/Buttons.styles.d.ts +5 -0
- package/components/Buttons/Buttons.styles.js +18 -0
- package/components/Buttons/Buttons.styles.js.map +1 -0
- package/components/Buttons/index.d.ts +2 -0
- package/components/Buttons/index.js +4 -0
- package/components/Buttons/index.js.map +1 -0
- package/components/Buttons/useButtons.d.ts +14 -0
- package/components/Buttons/useButtons.js +24 -0
- package/components/Buttons/useButtons.js.map +1 -0
- package/components/Dialogs/CustomDialog.d.ts +17 -0
- package/components/Dialogs/CustomDialog.js +48 -0
- package/components/Dialogs/CustomDialog.js.map +1 -0
- package/components/Dialogs/Dialog.d.ts +21 -0
- package/components/Dialogs/Dialog.js +62 -0
- package/components/Dialogs/Dialog.js.map +1 -0
- package/components/Dialogs/DialogsContext.d.ts +43 -0
- package/components/Dialogs/DialogsContext.js +141 -0
- package/components/Dialogs/DialogsContext.js.map +1 -0
- package/components/Dialogs/useDialogs.d.ts +3 -0
- package/components/Dialogs/useDialogs.js +12 -0
- package/components/Dialogs/useDialogs.js.map +1 -0
- package/components/EmptyView.d.ts +6 -5
- package/components/EmptyView.js +29 -50
- package/components/EmptyView.js.map +1 -0
- package/components/Filters/Filters.d.ts +16 -0
- package/components/Filters/Filters.js +21 -0
- package/components/Filters/Filters.js.map +1 -0
- package/components/Filters/FiltersToggle.d.ts +7 -0
- package/components/Filters/FiltersToggle.js +26 -0
- package/components/Filters/FiltersToggle.js.map +1 -0
- package/components/Filters/index.d.ts +2 -0
- package/components/Filters/index.js +4 -0
- package/components/Filters/index.js.map +1 -0
- package/components/FloatingActionButton.d.ts +5 -2
- package/components/FloatingActionButton.js +5 -4
- package/components/FloatingActionButton.js.map +1 -0
- package/components/FloatingPanel.d.ts +13 -0
- package/components/FloatingPanel.js +96 -0
- package/components/FloatingPanel.js.map +1 -0
- package/components/IconPicker/IconPicker.d.ts +13 -0
- package/components/IconPicker/IconPicker.js +39 -0
- package/components/IconPicker/IconPicker.js.map +1 -0
- package/components/IconPicker/IconPickerComponent.d.ts +17 -0
- package/components/IconPicker/IconPickerComponent.js +81 -0
- package/components/IconPicker/IconPickerComponent.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.d.ts +53 -0
- package/components/IconPicker/IconPickerPresenter.js +77 -0
- package/components/IconPicker/IconPickerPresenter.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.test.d.ts +1 -0
- package/components/IconPicker/IconPickerPresenter.test.js +109 -0
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -0
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +9 -0
- package/components/IconPicker/IconPickerPresenterProvider.js +19 -0
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -0
- package/components/IconPicker/IconPickerTab.d.ts +33 -0
- package/components/IconPicker/IconPickerTab.js +159 -0
- package/components/IconPicker/IconPickerTab.js.map +1 -0
- package/components/IconPicker/IconRenderer.d.ts +34 -0
- package/components/IconPicker/IconRenderer.js +27 -0
- package/components/IconPicker/IconRenderer.js.map +1 -0
- package/components/IconPicker/IconRepository.d.ts +19 -0
- package/components/IconPicker/IconRepository.js +47 -0
- package/components/IconPicker/IconRepository.js.map +1 -0
- package/components/IconPicker/IconRepository.test.d.ts +1 -0
- package/components/IconPicker/IconRepository.test.js +66 -0
- package/components/IconPicker/IconRepository.test.js.map +1 -0
- package/components/IconPicker/IconRepositoryFactory.d.ts +9 -0
- package/components/IconPicker/IconRepositoryFactory.js +17 -0
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -0
- package/components/IconPicker/Loading.d.ts +14 -0
- package/components/IconPicker/Loading.js +50 -0
- package/components/IconPicker/Loading.js.map +1 -0
- package/components/IconPicker/components/IconPickerCell.d.ts +12 -0
- package/components/IconPicker/components/IconPickerCell.js +27 -0
- package/components/IconPicker/components/IconPickerCell.js.map +1 -0
- package/components/IconPicker/components/IconPickerContent.d.ts +11 -0
- package/components/IconPicker/components/IconPickerContent.js +41 -0
- package/components/IconPicker/components/IconPickerContent.js.map +1 -0
- package/components/IconPicker/components/IconPickerRow.d.ts +4 -0
- package/components/IconPicker/components/IconPickerRow.js +14 -0
- package/components/IconPicker/components/IconPickerRow.js.map +1 -0
- package/components/IconPicker/components/IconPickerTrigger.d.ts +13 -0
- package/components/IconPicker/components/IconPickerTrigger.js +52 -0
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -0
- package/components/IconPicker/components/index.d.ts +4 -0
- package/components/IconPicker/components/index.js +6 -0
- package/components/IconPicker/components/index.js.map +1 -0
- package/components/IconPicker/config/Emojis.d.ts +2 -0
- package/components/IconPicker/config/Emojis.js +24 -0
- package/components/IconPicker/config/Emojis.js.map +1 -0
- package/components/IconPicker/config/FontAwesomeIcons.d.ts +2 -0
- package/components/IconPicker/config/FontAwesomeIcons.js +61 -0
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -0
- package/components/IconPicker/config/IconPackProvider.d.ts +7 -0
- package/components/IconPicker/config/IconPackProvider.js +23 -0
- package/components/IconPicker/config/IconPackProvider.js.map +1 -0
- package/components/IconPicker/config/IconType.d.ts +32 -0
- package/components/IconPicker/config/IconType.js +89 -0
- package/components/IconPicker/config/IconType.js.map +1 -0
- package/components/IconPicker/config/index.d.ts +31 -0
- package/components/IconPicker/config/index.js +45 -0
- package/components/IconPicker/config/index.js.map +1 -0
- package/components/IconPicker/defaultIcon.d.ts +6 -0
- package/components/IconPicker/defaultIcon.js +8 -0
- package/components/IconPicker/defaultIcon.js.map +1 -0
- package/components/IconPicker/index.d.ts +7 -0
- package/components/IconPicker/index.js +8 -0
- package/components/IconPicker/index.js.map +1 -0
- package/components/IconPicker/plugins/customPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/customPlugin.js +132 -0
- package/components/IconPicker/plugins/customPlugin.js.map +1 -0
- package/components/IconPicker/plugins/emojisPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/emojisPlugin.js +127 -0
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -0
- package/components/IconPicker/plugins/graphql.d.ts +20 -0
- package/components/IconPicker/plugins/graphql.js +27 -0
- package/components/IconPicker/plugins/graphql.js.map +1 -0
- package/components/IconPicker/plugins/iconsPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/iconsPlugin.js +115 -0
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -0
- package/components/IconPicker/types.d.ts +22 -0
- package/components/IconPicker/types.js +10 -0
- package/components/IconPicker/types.js.map +1 -0
- package/components/LexicalEditor/LexicalEditor.d.ts +8 -0
- package/components/LexicalEditor/LexicalEditor.js +29 -0
- package/components/LexicalEditor/LexicalEditor.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +3 -0
- package/components/LexicalEditor/index.js.map +1 -0
- package/components/MultiImageUpload.d.ts +13 -4
- package/components/MultiImageUpload.js +13 -17
- package/components/MultiImageUpload.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenu.js +23 -0
- package/components/OptionsMenu/OptionsMenu.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuItem.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenuItem.js +17 -0
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuLink.d.ts +12 -0
- package/components/OptionsMenu/OptionsMenuLink.js +17 -0
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -0
- package/components/OptionsMenu/index.d.ts +4 -0
- package/components/OptionsMenu/index.js +6 -0
- package/components/OptionsMenu/index.js.map +1 -0
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +13 -0
- package/components/OptionsMenu/useOptionsMenuItem.js +23 -0
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -0
- package/components/OverlayLayout/OverlayLayout.d.ts +7 -20
- package/components/OverlayLayout/OverlayLayout.js +41 -153
- package/components/OverlayLayout/OverlayLayout.js.map +1 -0
- package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
- package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
- package/components/OverlayLayout/components/OverlayContent.js +21 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
- package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
- package/components/OverlayLayout/components/OverlayHeader.js +44 -0
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
- package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
- package/components/OverlayLayout/components/OverlayRoot.js +19 -0
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
- package/components/OverlayLayout/components/index.d.ts +4 -0
- package/components/OverlayLayout/components/index.js +6 -0
- package/components/OverlayLayout/components/index.js.map +1 -0
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +3 -1
- package/components/OverlayLayout/index.js.map +1 -0
- package/components/Permissions/CannotUseAaclAlert.d.ts +2 -0
- package/components/Permissions/CannotUseAaclAlert.js +14 -0
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -0
- package/components/Permissions/Permissions.d.ts +7 -5
- package/components/Permissions/Permissions.js +27 -22
- package/components/Permissions/Permissions.js.map +1 -0
- package/components/Permissions/PermissionsGroup.d.ts +6 -0
- package/components/Permissions/PermissionsGroup.js +18 -0
- package/components/Permissions/PermissionsGroup.js.map +1 -0
- package/components/Permissions/StyledComponents.d.ts +7 -6
- package/components/Permissions/StyledComponents.js +13 -17
- package/components/Permissions/StyledComponents.js.map +1 -0
- package/components/Permissions/index.d.ts +2 -0
- package/components/Permissions/index.js +5 -1
- package/components/Permissions/index.js.map +1 -0
- package/components/ResizablePanels/index.d.ts +1 -0
- package/components/ResizablePanels/index.js +3 -0
- package/components/ResizablePanels/index.js.map +1 -0
- package/components/RichTextEditor/RichTextEditor.d.ts +3 -3
- package/components/RichTextEditor/RichTextEditor.js +14 -13
- package/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/components/RichTextEditor/index.js +3 -1
- package/components/RichTextEditor/index.js.map +1 -0
- package/components/RichTextEditor/styles.scss +39 -7
- package/components/RichTextEditor/tools/header/index.d.ts +35 -35
- package/components/RichTextEditor/tools/header/index.js +454 -570
- package/components/RichTextEditor/tools/header/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/index.d.ts +38 -13
- package/components/RichTextEditor/tools/image/index.js +145 -200
- package/components/RichTextEditor/tools/image/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/svgs.js +6 -4
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -0
- package/components/RichTextEditor/tools/image/tunes.d.ts +12 -15
- package/components/RichTextEditor/tools/image/tunes.js +74 -105
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -0
- package/components/RichTextEditor/tools/image/types.d.ts +29 -0
- package/components/RichTextEditor/tools/image/types.js +3 -0
- package/components/RichTextEditor/tools/image/types.js.map +1 -0
- package/components/RichTextEditor/tools/image/ui.d.ts +36 -27
- package/components/RichTextEditor/tools/image/ui.js +164 -200
- package/components/RichTextEditor/tools/image/ui.js.map +1 -0
- package/components/RichTextEditor/tools/paragraph/index.d.ts +34 -37
- package/components/RichTextEditor/tools/paragraph/index.js +340 -425
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -0
- package/components/RichTextEditor/tools/textColor/index.d.ts +31 -28
- package/components/RichTextEditor/tools/textColor/index.js +164 -199
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -0
- package/components/RichTextEditor/tools/utils.d.ts +1 -1
- package/components/RichTextEditor/tools/utils.js +8 -8
- package/components/RichTextEditor/tools/utils.js.map +1 -0
- package/components/Routes.d.ts +6 -0
- package/components/Routes.js +34 -0
- package/components/Routes.js.map +1 -0
- package/components/SearchUI.d.ts +6 -4
- package/components/SearchUI.js +23 -53
- package/components/SearchUI.js.map +1 -0
- package/components/SimpleForm/SimpleForm.d.ts +23 -12
- package/components/SimpleForm/SimpleForm.js +74 -68
- package/components/SimpleForm/SimpleForm.js.map +1 -0
- package/components/SimpleForm/index.js +3 -1
- package/components/SimpleForm/index.js.map +1 -0
- package/components/SimpleUI/InputField.d.ts +6 -3
- package/components/SimpleUI/InputField.js +34 -36
- package/components/SimpleUI/InputField.js.map +1 -0
- package/components/SingleImageUpload.d.ts +63 -15
- package/components/SingleImageUpload.js +61 -101
- package/components/SingleImageUpload.js.map +1 -0
- package/components/SplitView/SplitView.d.ts +11 -8
- package/components/SplitView/SplitView.js +51 -70
- package/components/SplitView/SplitView.js.map +1 -0
- package/components/SplitView/index.js +3 -1
- package/components/SplitView/index.js.map +1 -0
- package/components/StateInspector.d.ts +8 -0
- package/components/StateInspector.js +36 -0
- package/components/StateInspector.js.map +1 -0
- package/components/Wcp.d.ts +13 -0
- package/components/Wcp.js +27 -0
- package/components/Wcp.js.map +1 -0
- package/components/index.d.ts +3 -1
- package/components/index.js +5 -1
- package/components/index.js.map +1 -0
- package/config/AdminConfig/Menu/MenuGroup.d.ts +62 -0
- package/config/AdminConfig/Menu/MenuGroup.js +14 -0
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -0
- package/config/AdminConfig/Menu/MenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuItem.js +14 -0
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/MenuLink.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuLink.js +18 -0
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +24 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu.d.ts +72 -0
- package/config/AdminConfig/Menu/SupportMenu.js +49 -0
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/UserMenu/types.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/types.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu.d.ts +129 -0
- package/config/AdminConfig/Menu/UserMenu.js +61 -0
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -0
- package/config/AdminConfig/Menu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/types.js +3 -0
- package/config/AdminConfig/Menu/types.js.map +1 -0
- package/config/AdminConfig/Menu.d.ts +350 -0
- package/config/AdminConfig/Menu.js +75 -0
- package/config/AdminConfig/Menu.js.map +1 -0
- package/config/AdminConfig/Route.d.ts +3 -0
- package/config/AdminConfig/Route.js +8 -0
- package/config/AdminConfig/Route.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantLogo.js +16 -0
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantName.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantName.js +16 -0
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
- package/config/AdminConfig/Tenant.d.ts +66 -0
- package/config/AdminConfig/Tenant.js +23 -0
- package/config/AdminConfig/Tenant.js.map +1 -0
- package/config/AdminConfig/Theme/assignColor.d.ts +2 -0
- package/config/AdminConfig/Theme/assignColor.js +22 -0
- package/config/AdminConfig/Theme/assignColor.js.map +1 -0
- package/config/AdminConfig/Theme/consts.d.ts +2 -0
- package/config/AdminConfig/Theme/consts.js +4 -0
- package/config/AdminConfig/Theme/consts.js.map +1 -0
- package/config/AdminConfig/Theme/types.d.ts +3 -0
- package/config/AdminConfig/Theme/types.js +3 -0
- package/config/AdminConfig/Theme/types.js.map +1 -0
- package/config/AdminConfig/Theme.d.ts +16 -0
- package/config/AdminConfig/Theme.js +22 -0
- package/config/AdminConfig/Theme.js.map +1 -0
- package/config/AdminConfig.d.ts +434 -0
- package/config/AdminConfig.js +47 -0
- package/config/AdminConfig.js.map +1 -0
- package/config/createAdminConfig.d.ts +57 -0
- package/config/createAdminConfig.js +94 -0
- package/config/createAdminConfig.js.map +1 -0
- package/hooks/index.d.ts +10 -0
- package/hooks/index.js +12 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useConfirmationDialog.d.ts +10 -5
- package/hooks/useConfirmationDialog.js +27 -29
- package/hooks/useConfirmationDialog.js.map +1 -0
- package/hooks/useDialog.d.ts +27 -3
- package/hooks/useDialog.js +16 -15
- package/hooks/useDialog.js.map +1 -0
- package/hooks/useIsMounted.d.ts +3 -0
- package/hooks/useIsMounted.js +15 -0
- package/hooks/useIsMounted.js.map +1 -0
- package/hooks/useKeyHandler.d.ts +8 -0
- package/hooks/useKeyHandler.js +64 -0
- package/hooks/useKeyHandler.js.map +1 -0
- package/hooks/useModKey.d.ts +1 -0
- package/hooks/useModKey.js +30 -0
- package/hooks/useModKey.js.map +1 -0
- package/hooks/useShiftKey.d.ts +1 -0
- package/hooks/useShiftKey.js +33 -0
- package/hooks/useShiftKey.js.map +1 -0
- package/hooks/useSnackbar.d.ts +7 -3
- package/hooks/useSnackbar.js +26 -19
- package/hooks/useSnackbar.js.map +1 -0
- package/hooks/useStateIfMounted.d.ts +2 -0
- package/hooks/useStateIfMounted.js +16 -0
- package/hooks/useStateIfMounted.js.map +1 -0
- package/hooks/useStateWithCallback.d.ts +5 -0
- package/hooks/useStateWithCallback.js +18 -0
- package/hooks/useStateWithCallback.js.map +1 -0
- package/index.d.ts +47 -0
- package/index.js +53 -0
- package/index.js.map +1 -0
- package/package.json +70 -60
- package/plugins/MenuPlugin.d.ts +23 -6
- package/plugins/MenuPlugin.js +15 -37
- package/plugins/MenuPlugin.js.map +1 -0
- package/plugins/PermissionRendererPlugin.d.ts +4 -4
- package/plugins/PermissionRendererPlugin.js +15 -37
- package/plugins/PermissionRendererPlugin.js.map +1 -0
- package/plugins/uiLayoutRenderer/index.d.ts +1 -2
- package/plugins/uiLayoutRenderer/index.js +39 -49
- package/plugins/uiLayoutRenderer/index.js.map +1 -0
- package/styles.scss +7 -2
- package/types.d.ts +67 -85
- package/types.js +7 -1
- package/types.js.map +1 -0
- package/ui/UIElement.d.ts +1 -1
- package/ui/UIElement.js +3 -1
- package/ui/UIElement.js.map +1 -0
- package/ui/UILayout.js +3 -1
- package/ui/UILayout.js.map +1 -0
- package/ui/UIRenderer.js +3 -1
- package/ui/UIRenderer.js.map +1 -0
- package/ui/UIView.d.ts +1 -1
- package/ui/UIView.js +3 -1
- package/ui/UIView.js.map +1 -0
- package/ui/elements/AccordionElement.d.ts +6 -5
- package/ui/elements/AccordionElement.js +41 -79
- package/ui/elements/AccordionElement.js.map +1 -0
- package/ui/elements/ButtonElement.d.ts +7 -6
- package/ui/elements/ButtonElement.js +41 -67
- package/ui/elements/ButtonElement.js.map +1 -0
- package/ui/elements/ButtonGroupElement.d.ts +2 -1
- package/ui/elements/ButtonGroupElement.js +22 -41
- package/ui/elements/ButtonGroupElement.js.map +1 -0
- package/ui/elements/GenericElement.js +3 -1
- package/ui/elements/GenericElement.js.map +1 -0
- package/ui/elements/LabelElement.d.ts +3 -2
- package/ui/elements/LabelElement.js +15 -39
- package/ui/elements/LabelElement.js.map +1 -0
- package/ui/elements/NavigationMenuElement.d.ts +6 -4
- package/ui/elements/NavigationMenuElement.js +70 -140
- package/ui/elements/NavigationMenuElement.js.map +1 -0
- package/ui/elements/PanelElement.js +2 -15
- package/ui/elements/PanelElement.js.map +1 -0
- package/ui/elements/PlaceholderElement.d.ts +2 -1
- package/ui/elements/PlaceholderElement.js +8 -27
- package/ui/elements/PlaceholderElement.js.map +1 -0
- package/ui/elements/SmallButtonElement.d.ts +5 -3
- package/ui/elements/SmallButtonElement.js +15 -38
- package/ui/elements/SmallButtonElement.js.map +1 -0
- package/ui/elements/TypographyElement.d.ts +4 -3
- package/ui/elements/TypographyElement.js +18 -44
- package/ui/elements/TypographyElement.js.map +1 -0
- package/ui/elements/ViewElement.js +3 -1
- package/ui/elements/ViewElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +3 -2
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +20 -38
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement.d.ts +22 -20
- package/ui/elements/form/DynamicFieldsetElement.js +86 -116
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +6 -20
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +34 -59
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +65 -87
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/styled.d.ts +22 -13
- package/ui/elements/form/FileManagerElement/styled.js +86 -84
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -0
- package/ui/elements/form/FileManagerElement.d.ts +9 -8
- package/ui/elements/form/FileManagerElement.js +41 -86
- package/ui/elements/form/FileManagerElement.js.map +1 -0
- package/ui/elements/form/FormElement.d.ts +7 -6
- package/ui/elements/form/FormElement.js +15 -40
- package/ui/elements/form/FormElement.js.map +1 -0
- package/ui/elements/form/FormFieldElement.d.ts +14 -12
- package/ui/elements/form/FormFieldElement.js +99 -169
- package/ui/elements/form/FormFieldElement.js.map +1 -0
- package/ui/elements/form/HiddenElement.d.ts +2 -1
- package/ui/elements/form/HiddenElement.js +20 -44
- package/ui/elements/form/HiddenElement.js.map +1 -0
- package/ui/elements/form/InputElement.d.ts +3 -1
- package/ui/elements/form/InputElement.js +26 -49
- package/ui/elements/form/InputElement.js.map +1 -0
- package/ui/elements/form/PasswordElement.d.ts +1 -1
- package/ui/elements/form/PasswordElement.js +24 -45
- package/ui/elements/form/PasswordElement.js.map +1 -0
- package/ui/elements/form/SelectElement.d.ts +3 -2
- package/ui/elements/form/SelectElement.js +36 -65
- package/ui/elements/form/SelectElement.js.map +1 -0
- package/ui/elements/form/TextareaElement.d.ts +3 -2
- package/ui/elements/form/TextareaElement.js +28 -50
- package/ui/elements/form/TextareaElement.js.map +1 -0
- package/ui/views/AdminView/ContentElement.js +28 -53
- package/ui/views/AdminView/ContentElement.js.map +1 -0
- package/ui/views/AdminView/HeaderElement.js +49 -92
- package/ui/views/AdminView/HeaderElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -0
- package/ui/views/AdminView/components/Dialog.d.ts +1 -1
- package/ui/views/AdminView/components/Dialog.js +34 -33
- package/ui/views/AdminView/components/Dialog.js.map +1 -0
- package/ui/views/AdminView/components/Hamburger.d.ts +2 -2
- package/ui/views/AdminView/components/Hamburger.js +7 -9
- package/ui/views/AdminView/components/Hamburger.js.map +1 -0
- package/ui/views/FormView/FormContainerElement.d.ts +4 -3
- package/ui/views/FormView/FormContainerElement.js +14 -46
- package/ui/views/FormView/FormContainerElement.js.map +1 -0
- package/ui/views/FormView/FormContentElement.d.ts +3 -0
- package/ui/views/FormView/FormContentElement.js +7 -14
- package/ui/views/FormView/FormContentElement.js.map +1 -0
- package/ui/views/FormView/FormFooterElement.d.ts +4 -3
- package/ui/views/FormView/FormFooterElement.js +9 -44
- package/ui/views/FormView/FormFooterElement.js.map +1 -0
- package/ui/views/FormView/FormHeaderElement.d.ts +5 -4
- package/ui/views/FormView/FormHeaderElement.js +25 -76
- package/ui/views/FormView/FormHeaderElement.js.map +1 -0
- package/ui/views/FormView.d.ts +4 -4
- package/ui/views/FormView.js +99 -138
- package/ui/views/FormView.js.map +1 -0
- package/ui/views/OverlayView/ContentElement.d.ts +2 -1
- package/ui/views/OverlayView/ContentElement.js +22 -35
- package/ui/views/OverlayView/ContentElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderElement.d.ts +6 -5
- package/ui/views/OverlayView/HeaderElement.js +58 -101
- package/ui/views/OverlayView/HeaderElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +5 -3
- package/ui/views/OverlayView/HeaderTitleElement.js +18 -47
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -0
- package/ui/views/OverlayView/useOverlayView.d.ts +4 -5
- package/ui/views/OverlayView/useOverlayView.js +12 -16
- package/ui/views/OverlayView/useOverlayView.js.map +1 -0
- package/ui/views/OverlayView.d.ts +4 -5
- package/ui/views/OverlayView.js +76 -143
- package/ui/views/OverlayView.js.map +1 -0
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +3 -2
- package/ui/views/SplitView/SplitViewPanelElement.js +25 -65
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -0
- package/ui/views/SplitView.d.ts +4 -4
- package/ui/views/SplitView.js +51 -107
- package/ui/views/SplitView.js.map +1 -0
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -35
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -47
- package/components/FileManager/BottomInfoBar.d.ts +0 -3
- package/components/FileManager/BottomInfoBar.js +0 -42
- package/components/FileManager/DropFilesHere.d.ts +0 -8
- package/components/FileManager/DropFilesHere.js +0 -58
- package/components/FileManager/File.d.ts +0 -18
- package/components/FileManager/File.js +0 -129
- package/components/FileManager/FileDetails/Name.d.ts +0 -6
- package/components/FileManager/FileDetails/Name.js +0 -113
- package/components/FileManager/FileDetails/Tags.d.ts +0 -6
- package/components/FileManager/FileDetails/Tags.js +0 -241
- package/components/FileManager/FileDetails.d.ts +0 -23
- package/components/FileManager/FileDetails.js +0 -392
- package/components/FileManager/FileManagerContext.d.ts +0 -23
- package/components/FileManager/FileManagerContext.js +0 -174
- package/components/FileManager/FileManagerView.d.ts +0 -23
- package/components/FileManager/FileManagerView.js +0 -632
- package/components/FileManager/LeftSidebar.d.ts +0 -8
- package/components/FileManager/LeftSidebar.js +0 -95
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -70
- package/components/FileManager/NoResults.d.ts +0 -2
- package/components/FileManager/NoResults.js +0 -13
- package/components/FileManager/getFileTypePlugin.d.ts +0 -1
- package/components/FileManager/getFileTypePlugin.js +0 -27
- package/components/FileManager/getFileUploader.d.ts +0 -2
- package/components/FileManager/getFileUploader.js +0 -10
- package/components/FileManager/graphql.d.ts +0 -6
- package/components/FileManager/graphql.js +0 -17
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -2
- package/components/FileManager/outputFileSelectionError.js +0 -39
- package/components/FileManager.d.ts +0 -18
- package/components/FileManager.js +0 -133
- package/components/OverlayLayout/icons/close.svg +0 -13
- package/components/OverlayLayout/icons/navigate_before.svg +0 -16
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -46
- package/plugins/fileManager/fileDefault.d.ts +0 -3
- package/plugins/fileManager/fileDefault.js +0 -20
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -3
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -62
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -9
- package/plugins/fileManager/fileImage/EditAction.js +0 -143
- package/plugins/fileManager/fileImage/index.d.ts +0 -3
- package/plugins/fileManager/fileImage/index.js +0 -29
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -3
- package/plugins/globalSearch/SearchBar.d.ts +0 -3
- package/plugins/globalSearch/SearchBar.js +0 -241
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -5
- package/plugins/globalSearch/SearchBarDropdown.js +0 -82
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -8
- package/plugins/globalSearch/index.js +0 -30
- package/plugins/globalSearch/styled.d.ts +0 -9
- package/plugins/globalSearch/styled.js +0 -115
- package/plugins/index.d.ts +0 -6
- package/plugins/index.js +0 -8
- package/plugins/logo/Logo.d.ts +0 -22
- package/plugins/logo/Logo.js +0 -108
- package/plugins/logo/index.d.ts +0 -5
- package/plugins/logo/index.js +0 -32
- package/plugins/menu/documentation.d.ts +0 -4
- package/plugins/menu/documentation.js +0 -16
- package/plugins/menu/fileManager.d.ts +0 -4
- package/plugins/menu/fileManager.js +0 -64
- package/plugins/menu/index.d.ts +0 -6
- package/plugins/menu/index.js +0 -24
- package/plugins/menu/renderers/MenuGroupRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuGroupRenderer.js +0 -126
- package/plugins/menu/renderers/MenuLinkRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuLinkRenderer.js +0 -52
- package/plugins/menu/renderers/MenuSectionItemRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionItemRenderer.js +0 -77
- package/plugins/menu/renderers/MenuSectionRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionRenderer.js +0 -51
- package/plugins/menu/slack.d.ts +0 -4
- package/plugins/menu/slack.js +0 -16
- package/plugins/menu/source.d.ts +0 -4
- package/plugins/menu/source.js +0 -16
- package/plugins/userMenu/UserMenuElement.d.ts +0 -7
- package/plugins/userMenu/UserMenuElement.js +0 -43
- package/plugins/userMenu/UserMenuRenderer.d.ts +0 -6
- package/plugins/userMenu/UserMenuRenderer.js +0 -47
- package/plugins/userMenu/index.d.ts +0 -4
- package/plugins/userMenu/index.js +0 -16
- package/styles/material-theme-assignments.scss +0 -333
- package/styles/material.scss +0 -74
- package/styles/theme.scss +0 -43
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -28
- package/ui/views/AdminView.d.ts +0 -12
- package/ui/views/AdminView.js +0 -90
- package/ui/views/NavigationView/ContentElement.d.ts +0 -10
- package/ui/views/NavigationView/ContentElement.js +0 -86
- package/ui/views/NavigationView/FooterElement.d.ts +0 -13
- package/ui/views/NavigationView/FooterElement.js +0 -57
- package/ui/views/NavigationView/HeaderElement.d.ts +0 -16
- package/ui/views/NavigationView/HeaderElement.js +0 -66
- package/ui/views/NavigationView/NavigationViewRenderer.d.ts +0 -6
- package/ui/views/NavigationView/NavigationViewRenderer.js +0 -38
- package/ui/views/NavigationView/Styled.d.ts +0 -7
- package/ui/views/NavigationView/Styled.js +0 -47
- package/ui/views/NavigationView/legacyMenu.d.ts +0 -22
- package/ui/views/NavigationView/legacyMenu.js +0 -1
- package/ui/views/NavigationView/useNavigation.d.ts +0 -6
- package/ui/views/NavigationView/useNavigation.js +0 -22
- package/ui/views/NavigationView.d.ts +0 -26
- package/ui/views/NavigationView.js +0 -204
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Icon } from "./types";
|
|
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";
|
|
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";
|
|
8
|
+
import { useIconType } from "./config/IconType";
|
|
9
|
+
import { IconPickerCell, IconPickerRow } from "./components";
|
|
10
|
+
import { ICON_PICKER_SIZE } from "./types";
|
|
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: "wby-uppercase wby-self-end wby-text-neutral-muted wby-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: "wby-flex wby-items-center wby-justify-center wby-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: "wby-relative"
|
|
138
|
+
}, isEmpty ? /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "wby-pt-md wby-text-neutral-strong"
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Text, null, "No results found.")) : /*#__PURE__*/React.createElement(List, {
|
|
141
|
+
className: "wby-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\";\n\nimport { Text, DelayedOnChange, Input, Tabs, Icon as IconComponent } from \"@webiny/admin-ui\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\n\nimport { useIconPicker } from \"./IconPickerPresenterProvider\";\nimport { useIconType } from \"./config/IconType\";\nimport { IconPickerCell, IconPickerRow } from \"./components\";\nimport type { Icon, IconPickerGridRow } from \"./types\";\nimport { ICON_PICKER_SIZE } from \"./types\";\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\n size={\"sm\"}\n className={\"wby-uppercase wby-self-end wby-text-neutral-muted wby-mb-sm\"}\n >\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={\"wby-flex wby-items-center wby-justify-center wby-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={\"wby-relative\"}>\n {isEmpty ? (\n <div className={\"wby-pt-md wby-text-neutral-strong\"}>\n <Text>{\"No results found.\"}</Text>\n </div>\n ) : (\n <List\n className={\"wby-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":"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","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Icon } from "./types";
|
|
3
|
+
export declare const IconRenderer: ((props: unknown) => JSX.Element | null) & {
|
|
4
|
+
original: (props: unknown) => JSX.Element | null;
|
|
5
|
+
originalName: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
} & {
|
|
8
|
+
original: ((props: unknown) => JSX.Element | null) & {
|
|
9
|
+
original: (props: unknown) => JSX.Element | null;
|
|
10
|
+
originalName: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
originalName: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
} & {
|
|
16
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: unknown) => JSX.Element | null) & {
|
|
17
|
+
original: (props: unknown) => JSX.Element | null;
|
|
18
|
+
originalName: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
21
|
+
};
|
|
22
|
+
interface IconContext<T extends Icon = Icon> {
|
|
23
|
+
icon: T;
|
|
24
|
+
size: number;
|
|
25
|
+
}
|
|
26
|
+
declare const IconContext: React.Context<IconContext<Icon> | undefined>;
|
|
27
|
+
interface IconProviderProps {
|
|
28
|
+
icon: Icon;
|
|
29
|
+
size?: number;
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare const IconProvider: ({ icon, size, children }: IconProviderProps) => React.JSX.Element;
|
|
33
|
+
export declare function useIcon<T extends Icon = Icon>(): IconContext<T>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { toJS } from "mobx";
|
|
3
|
+
import { makeDecoratable, createVoidComponent } from "@webiny/react-composition";
|
|
4
|
+
export const IconRenderer = makeDecoratable("IconPickerIcon", createVoidComponent());
|
|
5
|
+
const IconContext = /*#__PURE__*/React.createContext(undefined);
|
|
6
|
+
export const IconProvider = ({
|
|
7
|
+
icon,
|
|
8
|
+
size = 32,
|
|
9
|
+
children
|
|
10
|
+
}) => {
|
|
11
|
+
// I want to use the POJO via the context, to reduce the need of using `observer` HOC everywhere.
|
|
12
|
+
return /*#__PURE__*/React.createElement(IconContext.Provider, {
|
|
13
|
+
value: {
|
|
14
|
+
icon: toJS(icon),
|
|
15
|
+
size
|
|
16
|
+
}
|
|
17
|
+
}, children);
|
|
18
|
+
};
|
|
19
|
+
export function useIcon() {
|
|
20
|
+
const context = React.useContext(IconContext);
|
|
21
|
+
if (!context) {
|
|
22
|
+
throw Error(`Missing <IconProvider> in the component tree!`);
|
|
23
|
+
}
|
|
24
|
+
return context;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=IconRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","toJS","makeDecoratable","createVoidComponent","IconRenderer","IconContext","createContext","undefined","IconProvider","icon","size","children","createElement","Provider","value","useIcon","context","useContext","Error"],"sources":["IconRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { toJS } from \"mobx\";\n\nimport { makeDecoratable, createVoidComponent } from \"@webiny/react-composition\";\n\nimport type { Icon } from \"./types\";\n\nexport const IconRenderer = makeDecoratable(\"IconPickerIcon\", createVoidComponent());\n\ninterface IconContext<T extends Icon = Icon> {\n icon: T;\n size: number;\n}\n\nconst IconContext = React.createContext<IconContext | undefined>(undefined);\n\ninterface IconProviderProps {\n icon: Icon;\n size?: number;\n children: React.ReactNode;\n}\n\nexport const IconProvider = ({ icon, size = 32, children }: IconProviderProps) => {\n // I want to use the POJO via the context, to reduce the need of using `observer` HOC everywhere.\n return (\n <IconContext.Provider value={{ icon: toJS(icon), size }}>{children}</IconContext.Provider>\n );\n};\n\nexport function useIcon<T extends Icon = Icon>(): IconContext<T> {\n const context = React.useContext(IconContext);\n if (!context) {\n throw Error(`Missing <IconProvider> in the component tree!`);\n }\n return context as IconContext<T>;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,MAAM;AAE3B,SAASC,eAAe,EAAEC,mBAAmB,QAAQ,2BAA2B;AAIhF,OAAO,MAAMC,YAAY,GAAGF,eAAe,CAAC,gBAAgB,EAAEC,mBAAmB,CAAC,CAAC,CAAC;AAOpF,MAAME,WAAW,gBAAGL,KAAK,CAACM,aAAa,CAA0BC,SAAS,CAAC;AAQ3E,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAAEC,IAAI;EAAEC,IAAI,GAAG,EAAE;EAAEC;AAA4B,CAAC,KAAK;EAC9E;EACA,oBACIX,KAAA,CAAAY,aAAA,CAACP,WAAW,CAACQ,QAAQ;IAACC,KAAK,EAAE;MAAEL,IAAI,EAAER,IAAI,CAACQ,IAAI,CAAC;MAAEC;IAAK;EAAE,GAAEC,QAA+B,CAAC;AAElG,CAAC;AAED,OAAO,SAASI,OAAOA,CAAA,EAA0C;EAC7D,MAAMC,OAAO,GAAGhB,KAAK,CAACiB,UAAU,CAACZ,WAAW,CAAC;EAC7C,IAAI,CAACW,OAAO,EAAE;IACV,MAAME,KAAK,CAAC,+CAA+C,CAAC;EAChE;EACA,OAAOF,OAAO;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { IconPackProviderInterface as IconPackProvider, IconType } from "./config";
|
|
2
|
+
import type { Icon } from "./types";
|
|
3
|
+
export declare class IconRepository {
|
|
4
|
+
private readonly iconPackProviders;
|
|
5
|
+
private readonly iconTypes;
|
|
6
|
+
private loading;
|
|
7
|
+
private icons;
|
|
8
|
+
constructor(iconTypes: IconType[], iconPackProviders: IconPackProvider[]);
|
|
9
|
+
loadIcons(): Promise<void>;
|
|
10
|
+
getIcons(): Icon[];
|
|
11
|
+
addIcon(icon: Icon): void;
|
|
12
|
+
getIconTypes(): IconType[];
|
|
13
|
+
getLoading(): {
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
loadingLabel: string;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
private runWithLoading;
|
|
19
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
2
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
3
|
+
import { Loading } from "./Loading";
|
|
4
|
+
export class IconRepository {
|
|
5
|
+
icons = [];
|
|
6
|
+
constructor(iconTypes, iconPackProviders) {
|
|
7
|
+
this.iconTypes = iconTypes;
|
|
8
|
+
this.loading = new Loading(true);
|
|
9
|
+
this.iconPackProviders = iconPackProviders;
|
|
10
|
+
makeAutoObservable(this);
|
|
11
|
+
}
|
|
12
|
+
async loadIcons() {
|
|
13
|
+
if (this.icons.length > 0) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const icons = await this.runWithLoading(async () => {
|
|
17
|
+
const icons = await Promise.all(this.iconPackProviders.map(provider => provider.getIcons()));
|
|
18
|
+
return icons.flat();
|
|
19
|
+
});
|
|
20
|
+
const iconTypes = this.iconTypes.map(iconType => iconType.name);
|
|
21
|
+
runInAction(() => {
|
|
22
|
+
// Make sure we only work with known icon types.
|
|
23
|
+
this.icons = icons.filter(icon => iconTypes.includes(icon.type));
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getIcons() {
|
|
27
|
+
return cloneDeep(this.icons);
|
|
28
|
+
}
|
|
29
|
+
addIcon(icon) {
|
|
30
|
+
this.icons = [...this.icons, icon];
|
|
31
|
+
}
|
|
32
|
+
getIconTypes() {
|
|
33
|
+
return this.iconTypes;
|
|
34
|
+
}
|
|
35
|
+
getLoading() {
|
|
36
|
+
return {
|
|
37
|
+
isLoading: this.loading.isLoading,
|
|
38
|
+
loadingLabel: this.loading.loadingLabel,
|
|
39
|
+
message: this.loading.feedback
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
async runWithLoading(action, loadingLabel, successMessage, failureMessage) {
|
|
43
|
+
return await this.loading.runCallbackWithLoading(action, loadingLabel, successMessage, failureMessage);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=IconRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cloneDeep","makeAutoObservable","runInAction","Loading","IconRepository","icons","constructor","iconTypes","iconPackProviders","loading","loadIcons","length","runWithLoading","Promise","all","map","provider","getIcons","flat","iconType","name","filter","icon","includes","type","addIcon","getIconTypes","getLoading","isLoading","loadingLabel","message","feedback","action","successMessage","failureMessage","runCallbackWithLoading"],"sources":["IconRepository.ts"],"sourcesContent":["import cloneDeep from \"lodash/cloneDeep\";\nimport { makeAutoObservable, runInAction } from \"mobx\";\n\nimport { Loading } from \"./Loading\";\nimport type { IconPackProviderInterface as IconPackProvider, IconType } from \"./config\";\nimport type { Icon } from \"./types\";\n\nexport class IconRepository {\n private readonly iconPackProviders: IconPackProvider[];\n private readonly iconTypes: IconType[];\n private loading: Loading;\n private icons: Icon[] = [];\n\n constructor(iconTypes: IconType[], iconPackProviders: IconPackProvider[]) {\n this.iconTypes = iconTypes;\n this.loading = new Loading(true);\n this.iconPackProviders = iconPackProviders;\n makeAutoObservable(this);\n }\n\n async loadIcons() {\n if (this.icons.length > 0) {\n return;\n }\n\n const icons = await this.runWithLoading(async () => {\n const icons = await Promise.all(\n this.iconPackProviders.map(provider => provider.getIcons())\n );\n return icons.flat();\n });\n\n const iconTypes = this.iconTypes.map(iconType => iconType.name);\n\n runInAction(() => {\n // Make sure we only work with known icon types.\n this.icons = icons.filter(icon => iconTypes.includes(icon.type));\n });\n }\n\n getIcons() {\n return cloneDeep(this.icons);\n }\n\n addIcon(icon: Icon) {\n this.icons = [...this.icons, icon];\n }\n\n getIconTypes() {\n return this.iconTypes;\n }\n\n getLoading() {\n return {\n isLoading: this.loading.isLoading,\n loadingLabel: this.loading.loadingLabel,\n message: this.loading.feedback\n };\n }\n\n private async runWithLoading<T>(\n action: () => Promise<T>,\n loadingLabel?: string,\n successMessage?: string,\n failureMessage?: string\n ) {\n return await this.loading.runCallbackWithLoading(\n action,\n loadingLabel,\n successMessage,\n failureMessage\n );\n }\n}\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,kBAAkB;AACxC,SAASC,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AAEtD,SAASC,OAAO;AAIhB,OAAO,MAAMC,cAAc,CAAC;EAIhBC,KAAK,GAAW,EAAE;EAE1BC,WAAWA,CAACC,SAAqB,EAAEC,iBAAqC,EAAE;IACtE,IAAI,CAACD,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACE,OAAO,GAAG,IAAIN,OAAO,CAAC,IAAI,CAAC;IAChC,IAAI,CAACK,iBAAiB,GAAGA,iBAAiB;IAC1CP,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEA,MAAMS,SAASA,CAAA,EAAG;IACd,IAAI,IAAI,CAACL,KAAK,CAACM,MAAM,GAAG,CAAC,EAAE;MACvB;IACJ;IAEA,MAAMN,KAAK,GAAG,MAAM,IAAI,CAACO,cAAc,CAAC,YAAY;MAChD,MAAMP,KAAK,GAAG,MAAMQ,OAAO,CAACC,GAAG,CAC3B,IAAI,CAACN,iBAAiB,CAACO,GAAG,CAACC,QAAQ,IAAIA,QAAQ,CAACC,QAAQ,CAAC,CAAC,CAC9D,CAAC;MACD,OAAOZ,KAAK,CAACa,IAAI,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,MAAMX,SAAS,GAAG,IAAI,CAACA,SAAS,CAACQ,GAAG,CAACI,QAAQ,IAAIA,QAAQ,CAACC,IAAI,CAAC;IAE/DlB,WAAW,CAAC,MAAM;MACd;MACA,IAAI,CAACG,KAAK,GAAGA,KAAK,CAACgB,MAAM,CAACC,IAAI,IAAIf,SAAS,CAACgB,QAAQ,CAACD,IAAI,CAACE,IAAI,CAAC,CAAC;IACpE,CAAC,CAAC;EACN;EAEAP,QAAQA,CAAA,EAAG;IACP,OAAOjB,SAAS,CAAC,IAAI,CAACK,KAAK,CAAC;EAChC;EAEAoB,OAAOA,CAACH,IAAU,EAAE;IAChB,IAAI,CAACjB,KAAK,GAAG,CAAC,GAAG,IAAI,CAACA,KAAK,EAAEiB,IAAI,CAAC;EACtC;EAEAI,YAAYA,CAAA,EAAG;IACX,OAAO,IAAI,CAACnB,SAAS;EACzB;EAEAoB,UAAUA,CAAA,EAAG;IACT,OAAO;MACHC,SAAS,EAAE,IAAI,CAACnB,OAAO,CAACmB,SAAS;MACjCC,YAAY,EAAE,IAAI,CAACpB,OAAO,CAACoB,YAAY;MACvCC,OAAO,EAAE,IAAI,CAACrB,OAAO,CAACsB;IAC1B,CAAC;EACL;EAEA,MAAcnB,cAAcA,CACxBoB,MAAwB,EACxBH,YAAqB,EACrBI,cAAuB,EACvBC,cAAuB,EACzB;IACE,OAAO,MAAM,IAAI,CAACzB,OAAO,CAAC0B,sBAAsB,CAC5CH,MAAM,EACNH,YAAY,EACZI,cAAc,EACdC,cACJ,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IconRepository } from "./IconRepository";
|
|
2
|
+
const mockIconTypes = [{
|
|
3
|
+
name: "icon"
|
|
4
|
+
}, {
|
|
5
|
+
name: "emoji"
|
|
6
|
+
}, {
|
|
7
|
+
name: "custom"
|
|
8
|
+
}];
|
|
9
|
+
const mockIcons = [{
|
|
10
|
+
type: "emoji",
|
|
11
|
+
name: "thumbs_up",
|
|
12
|
+
value: "👍",
|
|
13
|
+
category: "People & Body",
|
|
14
|
+
skinToneSupport: true
|
|
15
|
+
}, {
|
|
16
|
+
type: "icon",
|
|
17
|
+
name: "regular_address-book",
|
|
18
|
+
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"/>',
|
|
19
|
+
category: "Business"
|
|
20
|
+
}];
|
|
21
|
+
const mockIconPackProviders = [{
|
|
22
|
+
name: "mock_icons",
|
|
23
|
+
getIcons: async () => {
|
|
24
|
+
return mockIcons;
|
|
25
|
+
}
|
|
26
|
+
}];
|
|
27
|
+
describe("IconRepository", () => {
|
|
28
|
+
const icon = {
|
|
29
|
+
type: "icon",
|
|
30
|
+
name: "solid_bullseye",
|
|
31
|
+
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"/>',
|
|
32
|
+
category: "Business",
|
|
33
|
+
color: "#282fe6"
|
|
34
|
+
};
|
|
35
|
+
it("should create an IconRepository and load icons and iconTypes", async () => {
|
|
36
|
+
// create repository
|
|
37
|
+
const repository = new IconRepository(mockIconTypes, mockIconPackProviders);
|
|
38
|
+
|
|
39
|
+
// repository should get the expected iconTypes array
|
|
40
|
+
expect(repository.getIconTypes()).toEqual(mockIconTypes);
|
|
41
|
+
|
|
42
|
+
// getIcons should return empty array
|
|
43
|
+
expect(repository.getIcons()).toEqual([]);
|
|
44
|
+
|
|
45
|
+
// load icons
|
|
46
|
+
await repository.loadIcons();
|
|
47
|
+
|
|
48
|
+
// getIcons should return the expected icons array
|
|
49
|
+
expect(repository.getIcons()).toEqual(mockIcons);
|
|
50
|
+
});
|
|
51
|
+
it("should create an IconRepository and add icon", () => {
|
|
52
|
+
// create repository
|
|
53
|
+
const repository = new IconRepository(mockIconTypes, mockIconPackProviders);
|
|
54
|
+
|
|
55
|
+
// getIcons should return empty array
|
|
56
|
+
expect(repository.getIcons()).toEqual([]);
|
|
57
|
+
|
|
58
|
+
// add icon
|
|
59
|
+
repository.addIcon(icon);
|
|
60
|
+
|
|
61
|
+
// getIcons should return the expected icons array
|
|
62
|
+
expect(repository.getIcons()).toEqual([icon]);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=IconRepository.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IconRepository","mockIconTypes","name","mockIcons","type","value","category","skinToneSupport","mockIconPackProviders","getIcons","describe","icon","color","it","repository","expect","getIconTypes","toEqual","loadIcons","addIcon"],"sources":["IconRepository.test.ts"],"sourcesContent":["import { IconRepository } from \"./IconRepository\";\nimport type { Icon } from \"./types\";\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(\"IconRepository\", () => {\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 it(\"should create an IconRepository and load icons and iconTypes\", async () => {\n // create repository\n const repository = new IconRepository(mockIconTypes, mockIconPackProviders);\n\n // repository should get the expected iconTypes array\n expect(repository.getIconTypes()).toEqual(mockIconTypes);\n\n // getIcons should return empty array\n expect(repository.getIcons()).toEqual([]);\n\n // load icons\n await repository.loadIcons();\n\n // getIcons should return the expected icons array\n expect(repository.getIcons()).toEqual(mockIcons);\n });\n\n it(\"should create an IconRepository and add icon\", () => {\n // create repository\n const repository = new IconRepository(mockIconTypes, mockIconPackProviders);\n\n // getIcons should return empty array\n expect(repository.getIcons()).toEqual([]);\n\n // add icon\n repository.addIcon(icon);\n\n // getIcons should return the expected icons array\n expect(repository.getIcons()).toEqual([icon]);\n });\n});\n"],"mappings":"AAAA,SAASA,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;AAEDO,QAAQ,CAAC,gBAAgB,EAAE,MAAM;EAC7B,MAAMC,IAAU,GAAG;IACfP,IAAI,EAAE,MAAM;IACZF,IAAI,EAAE,gBAAgB;IACtBG,KAAK,EAAE,wQAAwQ;IAC/QC,QAAQ,EAAE,UAAU;IACpBM,KAAK,EAAE;EACX,CAAC;EAEDC,EAAE,CAAC,8DAA8D,EAAE,YAAY;IAC3E;IACA,MAAMC,UAAU,GAAG,IAAId,cAAc,CAACC,aAAa,EAAEO,qBAAqB,CAAC;;IAE3E;IACAO,MAAM,CAACD,UAAU,CAACE,YAAY,CAAC,CAAC,CAAC,CAACC,OAAO,CAAChB,aAAa,CAAC;;IAExD;IACAc,MAAM,CAACD,UAAU,CAACL,QAAQ,CAAC,CAAC,CAAC,CAACQ,OAAO,CAAC,EAAE,CAAC;;IAEzC;IACA,MAAMH,UAAU,CAACI,SAAS,CAAC,CAAC;;IAE5B;IACAH,MAAM,CAACD,UAAU,CAACL,QAAQ,CAAC,CAAC,CAAC,CAACQ,OAAO,CAACd,SAAS,CAAC;EACpD,CAAC,CAAC;EAEFU,EAAE,CAAC,8CAA8C,EAAE,MAAM;IACrD;IACA,MAAMC,UAAU,GAAG,IAAId,cAAc,CAACC,aAAa,EAAEO,qBAAqB,CAAC;;IAE3E;IACAO,MAAM,CAACD,UAAU,CAACL,QAAQ,CAAC,CAAC,CAAC,CAACQ,OAAO,CAAC,EAAE,CAAC;;IAEzC;IACAH,UAAU,CAACK,OAAO,CAACR,IAAI,CAAC;;IAExB;IACAI,MAAM,CAACD,UAAU,CAACL,QAAQ,CAAC,CAAC,CAAC,CAACQ,OAAO,CAAC,CAACN,IAAI,CAAC,CAAC;EACjD,CAAC,CAAC;AACN,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconRepository } from "./IconRepository";
|
|
2
|
+
import type { IconPackProviderInterface as IconPackProvider, IconType } from "./config";
|
|
3
|
+
declare class IconRepositoryFactory {
|
|
4
|
+
private cache;
|
|
5
|
+
getRepository(iconTypes: IconType[], iconPackProviders: IconPackProvider[]): IconRepository;
|
|
6
|
+
private getCacheKey;
|
|
7
|
+
}
|
|
8
|
+
export declare const iconRepositoryFactory: IconRepositoryFactory;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconRepository } from "./IconRepository";
|
|
2
|
+
class IconRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository(iconTypes, iconPackProviders) {
|
|
5
|
+
const cacheKey = this.getCacheKey(iconTypes, iconPackProviders);
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new IconRepository(iconTypes, iconPackProviders));
|
|
8
|
+
}
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey(iconTypes, iconPackProviders) {
|
|
12
|
+
return [...iconTypes.map(iconType => iconType.name).sort(), ...iconPackProviders.map(provider => provider.name).sort()].join("#");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const iconRepositoryFactory = new IconRepositoryFactory();
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=IconRepositoryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["IconRepository","IconRepositoryFactory","cache","Map","getRepository","iconTypes","iconPackProviders","cacheKey","getCacheKey","has","set","get","map","iconType","name","sort","provider","join","iconRepositoryFactory"],"sources":["IconRepositoryFactory.ts"],"sourcesContent":["import { IconRepository } from \"./IconRepository\";\nimport type { IconPackProviderInterface as IconPackProvider, IconType } from \"./config\";\n\nclass IconRepositoryFactory {\n private cache: Map<string, IconRepository> = new Map();\n\n getRepository(iconTypes: IconType[], iconPackProviders: IconPackProvider[]) {\n const cacheKey = this.getCacheKey(iconTypes, iconPackProviders);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new IconRepository(iconTypes, iconPackProviders));\n }\n\n return this.cache.get(cacheKey) as IconRepository;\n }\n\n private getCacheKey(iconTypes: IconType[], iconPackProviders: IconPackProvider[]) {\n return [\n ...iconTypes.map(iconType => iconType.name).sort(),\n ...iconPackProviders.map(provider => provider.name).sort()\n ].join(\"#\");\n }\n}\n\nexport const iconRepositoryFactory = new IconRepositoryFactory();\n"],"mappings":"AAAA,SAASA,cAAc;AAGvB,MAAMC,qBAAqB,CAAC;EAChBC,KAAK,GAAgC,IAAIC,GAAG,CAAC,CAAC;EAEtDC,aAAaA,CAACC,SAAqB,EAAEC,iBAAqC,EAAE;IACxE,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAACH,SAAS,EAAEC,iBAAiB,CAAC;IAE/D,IAAI,CAAC,IAAI,CAACJ,KAAK,CAACO,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACL,KAAK,CAACQ,GAAG,CAACH,QAAQ,EAAE,IAAIP,cAAc,CAACK,SAAS,EAAEC,iBAAiB,CAAC,CAAC;IAC9E;IAEA,OAAO,IAAI,CAACJ,KAAK,CAACS,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAACH,SAAqB,EAAEC,iBAAqC,EAAE;IAC9E,OAAO,CACH,GAAGD,SAAS,CAACO,GAAG,CAACC,QAAQ,IAAIA,QAAQ,CAACC,IAAI,CAAC,CAACC,IAAI,CAAC,CAAC,EAClD,GAAGT,iBAAiB,CAACM,GAAG,CAACI,QAAQ,IAAIA,QAAQ,CAACF,IAAI,CAAC,CAACC,IAAI,CAAC,CAAC,CAC7D,CAACE,IAAI,CAAC,GAAG,CAAC;EACf;AACJ;AAEA,OAAO,MAAMC,qBAAqB,GAAG,IAAIjB,qBAAqB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class Loading {
|
|
2
|
+
private _isLoading;
|
|
3
|
+
private _loadingLabel;
|
|
4
|
+
private _feedback;
|
|
5
|
+
private _success;
|
|
6
|
+
constructor(isLoading?: boolean);
|
|
7
|
+
startLoading(label?: string): void;
|
|
8
|
+
stopLoadingWithSuccess(message?: string): void;
|
|
9
|
+
stopLoadingWithError(message?: string): void;
|
|
10
|
+
get isLoading(): boolean;
|
|
11
|
+
get loadingLabel(): string;
|
|
12
|
+
get feedback(): string;
|
|
13
|
+
runCallbackWithLoading<T>(callback: () => Promise<T>, loadingLabel?: string, successMessage?: string, failureMessage?: string): Promise<T>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
export class Loading {
|
|
3
|
+
constructor(isLoading = false) {
|
|
4
|
+
this._isLoading = isLoading;
|
|
5
|
+
this._loadingLabel = "";
|
|
6
|
+
this._feedback = "";
|
|
7
|
+
this._success = false;
|
|
8
|
+
makeAutoObservable(this);
|
|
9
|
+
}
|
|
10
|
+
startLoading(label) {
|
|
11
|
+
this._isLoading = true;
|
|
12
|
+
this._loadingLabel = label || "";
|
|
13
|
+
this._feedback = "";
|
|
14
|
+
this._success = false;
|
|
15
|
+
}
|
|
16
|
+
stopLoadingWithSuccess(message) {
|
|
17
|
+
this._isLoading = false;
|
|
18
|
+
this._loadingLabel = "";
|
|
19
|
+
this._feedback = message || "";
|
|
20
|
+
this._success = true;
|
|
21
|
+
}
|
|
22
|
+
stopLoadingWithError(message) {
|
|
23
|
+
this._isLoading = false;
|
|
24
|
+
this._loadingLabel = "";
|
|
25
|
+
this._feedback = message || "";
|
|
26
|
+
this._success = false;
|
|
27
|
+
}
|
|
28
|
+
get isLoading() {
|
|
29
|
+
return this._isLoading;
|
|
30
|
+
}
|
|
31
|
+
get loadingLabel() {
|
|
32
|
+
return this._loadingLabel;
|
|
33
|
+
}
|
|
34
|
+
get feedback() {
|
|
35
|
+
return this._feedback;
|
|
36
|
+
}
|
|
37
|
+
async runCallbackWithLoading(callback, loadingLabel, successMessage, failureMessage) {
|
|
38
|
+
try {
|
|
39
|
+
this.startLoading(loadingLabel);
|
|
40
|
+
const result = await callback();
|
|
41
|
+
this.stopLoadingWithSuccess(successMessage);
|
|
42
|
+
return result;
|
|
43
|
+
} catch (e) {
|
|
44
|
+
this.stopLoadingWithError(e.message || failureMessage);
|
|
45
|
+
throw e;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=Loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","Loading","constructor","isLoading","_isLoading","_loadingLabel","_feedback","_success","startLoading","label","stopLoadingWithSuccess","message","stopLoadingWithError","loadingLabel","feedback","runCallbackWithLoading","callback","successMessage","failureMessage","result","e"],"sources":["Loading.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\n\nexport class Loading {\n private _isLoading: boolean;\n private _loadingLabel: string;\n private _feedback: string;\n private _success: boolean;\n\n constructor(isLoading = false) {\n this._isLoading = isLoading;\n this._loadingLabel = \"\";\n this._feedback = \"\";\n this._success = false;\n makeAutoObservable(this);\n }\n\n startLoading(label?: string) {\n this._isLoading = true;\n this._loadingLabel = label || \"\";\n this._feedback = \"\";\n this._success = false;\n }\n\n stopLoadingWithSuccess(message?: string) {\n this._isLoading = false;\n this._loadingLabel = \"\";\n this._feedback = message || \"\";\n this._success = true;\n }\n\n stopLoadingWithError(message?: string) {\n this._isLoading = false;\n this._loadingLabel = \"\";\n this._feedback = message || \"\";\n this._success = false;\n }\n\n get isLoading() {\n return this._isLoading;\n }\n\n get loadingLabel() {\n return this._loadingLabel;\n }\n\n get feedback() {\n return this._feedback;\n }\n\n async runCallbackWithLoading<T>(\n callback: () => Promise<T>,\n loadingLabel?: string,\n successMessage?: string,\n failureMessage?: string\n ): Promise<T> {\n try {\n this.startLoading(loadingLabel);\n const result = await callback();\n this.stopLoadingWithSuccess(successMessage);\n return result;\n } catch (e) {\n this.stopLoadingWithError(e.message || failureMessage);\n throw e;\n }\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAEzC,OAAO,MAAMC,OAAO,CAAC;EAMjBC,WAAWA,CAACC,SAAS,GAAG,KAAK,EAAE;IAC3B,IAAI,CAACC,UAAU,GAAGD,SAAS;IAC3B,IAAI,CAACE,aAAa,GAAG,EAAE;IACvB,IAAI,CAACC,SAAS,GAAG,EAAE;IACnB,IAAI,CAACC,QAAQ,GAAG,KAAK;IACrBP,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAQ,YAAYA,CAACC,KAAc,EAAE;IACzB,IAAI,CAACL,UAAU,GAAG,IAAI;IACtB,IAAI,CAACC,aAAa,GAAGI,KAAK,IAAI,EAAE;IAChC,IAAI,CAACH,SAAS,GAAG,EAAE;IACnB,IAAI,CAACC,QAAQ,GAAG,KAAK;EACzB;EAEAG,sBAAsBA,CAACC,OAAgB,EAAE;IACrC,IAAI,CAACP,UAAU,GAAG,KAAK;IACvB,IAAI,CAACC,aAAa,GAAG,EAAE;IACvB,IAAI,CAACC,SAAS,GAAGK,OAAO,IAAI,EAAE;IAC9B,IAAI,CAACJ,QAAQ,GAAG,IAAI;EACxB;EAEAK,oBAAoBA,CAACD,OAAgB,EAAE;IACnC,IAAI,CAACP,UAAU,GAAG,KAAK;IACvB,IAAI,CAACC,aAAa,GAAG,EAAE;IACvB,IAAI,CAACC,SAAS,GAAGK,OAAO,IAAI,EAAE;IAC9B,IAAI,CAACJ,QAAQ,GAAG,KAAK;EACzB;EAEA,IAAIJ,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACC,UAAU;EAC1B;EAEA,IAAIS,YAAYA,CAAA,EAAG;IACf,OAAO,IAAI,CAACR,aAAa;EAC7B;EAEA,IAAIS,QAAQA,CAAA,EAAG;IACX,OAAO,IAAI,CAACR,SAAS;EACzB;EAEA,MAAMS,sBAAsBA,CACxBC,QAA0B,EAC1BH,YAAqB,EACrBI,cAAuB,EACvBC,cAAuB,EACb;IACV,IAAI;MACA,IAAI,CAACV,YAAY,CAACK,YAAY,CAAC;MAC/B,MAAMM,MAAM,GAAG,MAAMH,QAAQ,CAAC,CAAC;MAC/B,IAAI,CAACN,sBAAsB,CAACO,cAAc,CAAC;MAC3C,OAAOE,MAAM;IACjB,CAAC,CAAC,OAAOC,CAAC,EAAE;MACR,IAAI,CAACR,oBAAoB,CAACQ,CAAC,CAACT,OAAO,IAAIO,cAAc,CAAC;MACtD,MAAME,CAAC;IACX;EACJ;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type VariantProps } from "@webiny/admin-ui";
|
|
3
|
+
import type { Icon } from "..";
|
|
4
|
+
declare const iconPickerCellVariants: (props?: ({
|
|
5
|
+
isActive?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
interface IconPickerCellProps extends VariantProps<typeof iconPickerCellVariants> {
|
|
8
|
+
icon: Icon;
|
|
9
|
+
onIconClick: (icon: Icon) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const IconPickerCell: ({ isActive, icon, onIconClick }: IconPickerCellProps) => React.JSX.Element;
|
|
12
|
+
export { IconPickerCell, IconPickerCellProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn, cva } from "@webiny/admin-ui";
|
|
3
|
+
import { IconProvider, IconRenderer } from "../IconRenderer";
|
|
4
|
+
const iconPickerCellVariants = cva(["wby-flex wby-justify-center wby-items-center", "wby-rounded-md wby-cursor-pointer wby-size-xl wby-p-xs", "hover:wby-bg-neutral-dimmed wby-transition-all wby-duration-500 wby-ease-out"], {
|
|
5
|
+
variants: {
|
|
6
|
+
isActive: {
|
|
7
|
+
true: "wby-bg-neutral-dimmed"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const IconPickerCell = ({
|
|
12
|
+
isActive,
|
|
13
|
+
icon,
|
|
14
|
+
onIconClick
|
|
15
|
+
}) => {
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: cn(iconPickerCellVariants({
|
|
18
|
+
isActive
|
|
19
|
+
})),
|
|
20
|
+
onClick: () => onIconClick(icon)
|
|
21
|
+
}, /*#__PURE__*/React.createElement(IconProvider, {
|
|
22
|
+
icon: icon
|
|
23
|
+
}, /*#__PURE__*/React.createElement(IconRenderer, null)));
|
|
24
|
+
};
|
|
25
|
+
export { IconPickerCell };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=IconPickerCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","cn","cva","IconProvider","IconRenderer","iconPickerCellVariants","variants","isActive","true","IconPickerCell","icon","onIconClick","createElement","className","onClick"],"sources":["IconPickerCell.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn, cva, type VariantProps } from \"@webiny/admin-ui\";\nimport type { Icon } from \"~/components/IconPicker\";\nimport { IconProvider, IconRenderer } from \"~/components/IconPicker/IconRenderer\";\n\nconst iconPickerCellVariants = cva(\n [\n \"wby-flex wby-justify-center wby-items-center\",\n \"wby-rounded-md wby-cursor-pointer wby-size-xl wby-p-xs\",\n \"hover:wby-bg-neutral-dimmed wby-transition-all wby-duration-500 wby-ease-out\"\n ],\n {\n variants: {\n isActive: {\n true: \"wby-bg-neutral-dimmed\"\n }\n }\n }\n);\n\ninterface IconPickerCellProps extends VariantProps<typeof iconPickerCellVariants> {\n icon: Icon;\n onIconClick: (icon: Icon) => void;\n}\n\nconst IconPickerCell = ({ isActive, icon, onIconClick }: IconPickerCellProps) => {\n return (\n <div className={cn(iconPickerCellVariants({ isActive }))} onClick={() => onIconClick(icon)}>\n <IconProvider icon={icon}>\n <IconRenderer />\n </IconProvider>\n </div>\n );\n};\n\nexport { IconPickerCell, IconPickerCellProps };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,EAAE,EAAEC,GAAG,QAA2B,kBAAkB;AAE7D,SAASC,YAAY,EAAEC,YAAY;AAEnC,MAAMC,sBAAsB,GAAGH,GAAG,CAC9B,CACI,8CAA8C,EAC9C,wDAAwD,EACxD,8EAA8E,CACjF,EACD;EACII,QAAQ,EAAE;IACNC,QAAQ,EAAE;MACNC,IAAI,EAAE;IACV;EACJ;AACJ,CACJ,CAAC;AAOD,MAAMC,cAAc,GAAGA,CAAC;EAAEF,QAAQ;EAAEG,IAAI;EAAEC;AAAiC,CAAC,KAAK;EAC7E,oBACIX,KAAA,CAAAY,aAAA;IAAKC,SAAS,EAAEZ,EAAE,CAACI,sBAAsB,CAAC;MAAEE;IAAS,CAAC,CAAC,CAAE;IAACO,OAAO,EAAEA,CAAA,KAAMH,WAAW,CAACD,IAAI;EAAE,gBACvFV,KAAA,CAAAY,aAAA,CAACT,YAAY;IAACO,IAAI,EAAEA;EAAK,gBACrBV,KAAA,CAAAY,aAAA,CAACR,YAAY,MAAE,CACL,CACb,CAAC;AAEd,CAAC;AAED,SAASK,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IconType } from "../config";
|
|
3
|
+
interface IconPickerContentProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
iconTypes: IconType[];
|
|
6
|
+
activeTab?: string;
|
|
7
|
+
removeIcon: () => void;
|
|
8
|
+
removable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const IconPickerContent: ({ activeTab, iconTypes, loading, removeIcon, removable }: IconPickerContentProps) => React.JSX.Element;
|
|
11
|
+
export { IconPickerContent, type IconPickerContentProps };
|