@webiny/app-admin 0.0.0-unstable.6f45466a1d → 0.0.0-unstable.7be00a75a9
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.js +20 -0
- package/assets/icons/add-18px.js.map +1 -0
- package/assets/icons/arrow_drop_down-24px.js +20 -0
- package/assets/icons/arrow_drop_down-24px.js.map +1 -0
- package/assets/icons/attach_file_black_24dp.js +20 -0
- package/assets/icons/attach_file_black_24dp.js.map +1 -0
- package/assets/icons/baseline-menu-24px.js +20 -0
- package/assets/icons/baseline-menu-24px.js.map +1 -0
- package/assets/icons/baseline-notification_important-24px.js +19 -0
- package/assets/icons/baseline-notification_important-24px.js.map +1 -0
- package/assets/icons/baseline-security-24px.js +19 -0
- package/assets/icons/baseline-security-24px.js.map +1 -0
- package/assets/icons/file_download.js +19 -0
- package/assets/icons/file_download.js.map +1 -0
- package/assets/icons/file_upload.js +19 -0
- package/assets/icons/file_upload.js.map +1 -0
- package/assets/icons/filter-24px.js +23 -0
- package/assets/icons/filter-24px.js.map +1 -0
- package/assets/icons/github-brands.js +19 -0
- package/assets/icons/github-brands.js.map +1 -0
- package/assets/icons/highlight-24px.js +19 -0
- package/assets/icons/highlight-24px.js.map +1 -0
- package/assets/icons/icon-community.js +18 -0
- package/assets/icons/icon-community.js.map +1 -0
- package/assets/icons/icon-documentation.js +18 -0
- package/assets/icons/icon-documentation.js.map +1 -0
- package/assets/icons/info.js +19 -0
- package/assets/icons/info.js.map +1 -0
- package/assets/icons/insert_drive_file-24px.js +19 -0
- package/assets/icons/insert_drive_file-24px.js.map +1 -0
- package/assets/icons/insert_photo-24px.js +19 -0
- package/assets/icons/insert_photo-24px.js.map +1 -0
- package/assets/icons/label-24px.js +19 -0
- package/assets/icons/label-24px.js.map +1 -0
- package/assets/icons/round-account_circle-24px.js +19 -0
- package/assets/icons/round-account_circle-24px.js.map +1 -0
- package/assets/icons/round-add-24px.js +20 -0
- package/assets/icons/round-add-24px.js.map +1 -0
- package/assets/icons/round-arrow_drop_down-24px.js +19 -0
- package/assets/icons/round-arrow_drop_down-24px.js.map +1 -0
- package/assets/icons/round-chevron_right-24px.js +20 -0
- package/assets/icons/round-chevron_right-24px.js.map +1 -0
- package/assets/icons/round-feedback-24px.js +20 -0
- package/assets/icons/round-feedback-24px.js.map +1 -0
- package/assets/icons/round-help-24px.js +19 -0
- package/assets/icons/round-help-24px.js.map +1 -0
- package/assets/icons/round-invert_colors-24px.js +20 -0
- package/assets/icons/round-invert_colors-24px.js.map +1 -0
- package/assets/icons/round-keyboard_arrow_down-24px.js +17 -0
- package/assets/icons/round-keyboard_arrow_down-24px.js.map +1 -0
- package/assets/icons/round-keyboard_arrow_up-24px.js +17 -0
- package/assets/icons/round-keyboard_arrow_up-24px.js.map +1 -0
- package/assets/icons/round-lock_open-24px.js +22 -0
- package/assets/icons/round-lock_open-24px.js.map +1 -0
- package/assets/icons/round-more_vert-24px.js +20 -0
- package/assets/icons/round-more_vert-24px.js.map +1 -0
- package/assets/icons/round-open_in_new-24px.js +20 -0
- package/assets/icons/round-open_in_new-24px.js.map +1 -0
- package/assets/icons/round-settings-24px.js +20 -0
- package/assets/icons/round-settings-24px.js.map +1 -0
- package/assets/icons/search-24px.js +21 -0
- package/assets/icons/search-24px.js.map +1 -0
- package/assets/icons/slack-logo.js +14 -0
- package/assets/icons/slack-logo.js.map +1 -0
- package/assets/icons/today-24px.js +19 -0
- package/assets/icons/today-24px.js.map +1 -0
- package/assets/icons/touch_app.js +20 -0
- package/assets/icons/touch_app.js.map +1 -0
- package/assets/images/webiny-logo.js +34 -0
- package/assets/images/webiny-logo.js.map +1 -0
- package/assets/images/webiny-orange-logo.js +34 -0
- package/assets/images/webiny-orange-logo.js.map +1 -0
- package/base/Admin.js +40 -25
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.d.ts +2 -0
- package/base/Base/DefaultFieldRenderers.js +102 -0
- package/base/Base/DefaultFieldRenderers.js.map +1 -0
- package/base/Base/DefaultLayoutRenderers.d.ts +2 -0
- package/base/Base/DefaultLayoutRenderers.js +14 -0
- package/base/Base/DefaultLayoutRenderers.js.map +1 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js +27 -0
- package/base/Base/FieldRenderers/CheckboxesRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.d.ts +15 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.js +14 -0
- package/base/Base/FieldRenderers/CodeEditorRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.d.ts +17 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js +66 -0
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.d.ts +21 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.js +45 -0
- package/base/Base/FieldRenderers/DateTimeRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.js +44 -0
- package/base/Base/FieldRenderers/FilePickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js +20 -0
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/HiddenRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/HiddenRenderer.js +5 -0
- package/base/Base/FieldRenderers/HiddenRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.d.ts +5 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js +26 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/InputRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/InputRenderer.js +19 -0
- package/base/Base/FieldRenderers/InputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/LexicalRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/LexicalRenderer.js +48 -0
- package/base/Base/FieldRenderers/LexicalRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js +70 -0
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js +20 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.js +50 -0
- package/base/Base/FieldRenderers/NumberInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +17 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js +59 -0
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js +97 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +17 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +48 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +28 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +69 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +17 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +58 -0
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +68 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +4 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +19 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -0
- package/base/Base/FieldRenderers/PassthroughRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/PassthroughRenderer.js +12 -0
- package/base/Base/FieldRenderers/PassthroughRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +26 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/SelectRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/SelectRenderer.js +28 -0
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/SwitchRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/SwitchRenderer.js +16 -0
- package/base/Base/FieldRenderers/SwitchRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TagsRenderer.d.ts +12 -0
- package/base/Base/FieldRenderers/TagsRenderer.js +20 -0
- package/base/Base/FieldRenderers/TagsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.js +49 -0
- package/base/Base/FieldRenderers/TextInputsRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TextareaRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/TextareaRenderer.js +20 -0
- package/base/Base/FieldRenderers/TextareaRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/TextareasRenderer.d.ts +14 -0
- package/base/Base/FieldRenderers/TextareasRenderer.js +52 -0
- package/base/Base/FieldRenderers/TextareasRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/VerticalTabsRenderer.d.ts +5 -0
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js +40 -0
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js.map +1 -0
- package/base/Base/LexicalPreset.js +59 -64
- package/base/Base/LexicalPreset.js.map +1 -1
- package/base/Base/Menus/SupportMenuItems.js +9 -13
- package/base/Base/Menus/SupportMenuItems.js.map +1 -1
- package/base/Base/Menus/WebinyVersion.js +19 -20
- package/base/Base/Menus/WebinyVersion.js.map +1 -1
- package/base/Base/Menus.js +51 -107
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.js +22 -24
- package/base/Base/RoutesConfig.js.map +1 -1
- package/base/Base/Tenant/wby-horizontal.js +33 -0
- package/base/Base/Tenant/wby-horizontal.js.map +1 -0
- package/base/Base/Tenant/wby-square.js +20 -0
- package/base/Base/Tenant/wby-square.js.map +1 -0
- package/base/Base/Tenant.js +17 -19
- package/base/Base/Tenant.js.map +1 -1
- package/base/Base/UserMenu/ExitTenant.js +18 -29
- package/base/Base/UserMenu/ExitTenant.js.map +1 -1
- package/base/Base/UserMenu/SignOut.js +13 -14
- package/base/Base/UserMenu/SignOut.js.map +1 -1
- package/base/Base/UserMenu/UserInfo.js +23 -36
- package/base/Base/UserMenu/UserInfo.js.map +1 -1
- package/base/Base/UserMenu.js +12 -13
- package/base/Base/UserMenu.js.map +1 -1
- package/base/Base.js +7 -6
- package/base/Base.js.map +1 -1
- package/base/TelemetryAdminAppStart.js +9 -12
- package/base/TelemetryAdminAppStart.js.map +1 -1
- package/base/WebinyVersion.js +19 -20
- package/base/WebinyVersion.js.map +1 -1
- package/base/createRootContainer.js +45 -37
- package/base/createRootContainer.js.map +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +12 -11
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.js +5 -10
- package/base/providers/AdminUiStateProvider.js.map +1 -1
- package/base/providers/ApolloProvider.js +8 -11
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.js +25 -12
- package/base/providers/UiProviders.js.map +1 -1
- package/base/providers/UiStateProvider.js +5 -10
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +6 -6
- package/base/ui/Brand.js +4 -5
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +1 -1
- package/base/ui/CenteredView.js +9 -13
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +6 -6
- package/base/ui/Dashboard.js +4 -5
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +16 -15
- package/base/ui/FileManager.js +41 -60
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/Layout.d.ts +6 -6
- package/base/ui/Layout.js +4 -8
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +12 -12
- package/base/ui/LoginScreen.js +16 -21
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +6 -6
- package/base/ui/Logo.js +4 -5
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +6 -6
- package/base/ui/Navigation.js +11 -14
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +6 -6
- package/base/ui/NotFound.js +4 -5
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.js +12 -16
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.d.ts +6 -6
- package/base/ui/TenantSelector.js +4 -5
- package/base/ui/TenantSelector.js.map +1 -1
- package/base/ui/UserMenu/UserMenu.d.ts +6 -6
- package/base/ui/UserMenu/UserMenu.js +4 -5
- package/base/ui/UserMenu/UserMenu.js.map +1 -1
- package/base/ui/UserMenu/UserMenuHandle.d.ts +6 -6
- package/base/ui/UserMenu/UserMenuHandle.js +4 -5
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -1
- package/base/ui/UserMenu/UserMenuItem.d.ts +14 -14
- package/base/ui/UserMenu/UserMenuItem.js +5 -15
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -1
- package/base/ui/UserMenu/UserMenuLink.d.ts +14 -14
- package/base/ui/UserMenu/UserMenuLink.js +5 -15
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +7 -7
- package/base/ui/UserMenu/UserMenuSeparator.js +3 -5
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -1
- package/base/ui/UserMenu.d.ts +12 -12
- package/base/ui/UserMenu.js +6 -13
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +6 -10
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.js +57 -120
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.js +0 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +17 -21
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/index.js +0 -2
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +33 -44
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.js +44 -71
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.js +9 -15
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.js +1 -3
- package/components/Buttons/useButtons.js +15 -20
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
- package/components/DeveloperMode/DeveloperMode.js +8 -0
- package/components/DeveloperMode/DeveloperMode.js.map +1 -0
- package/components/DeveloperMode/index.d.ts +2 -0
- package/components/DeveloperMode/index.js +1 -0
- package/components/Dialogs/Dialog.d.ts +3 -2
- package/components/Dialogs/Dialog.js +46 -58
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogParamsContext.d.ts +6 -0
- package/components/Dialogs/DialogParamsContext.js +10 -0
- package/components/Dialogs/DialogParamsContext.js.map +1 -0
- package/components/Dialogs/DialogsContext.d.ts +8 -5
- package/components/Dialogs/DialogsContext.js +133 -123
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.js +5 -6
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.js +26 -31
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.js +15 -16
- package/components/Filters/Filters.js.map +1 -1
- package/components/Filters/FiltersToggle.js +18 -23
- package/components/Filters/FiltersToggle.js.map +1 -1
- package/components/Filters/index.js +0 -2
- package/components/FloatingActionButton.js +13 -15
- package/components/FloatingActionButton.js.map +1 -1
- package/components/IconPicker/IconPicker.js +24 -26
- package/components/IconPicker/IconPicker.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.js +56 -72
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.js +64 -70
- package/components/IconPicker/IconPickerPresenter.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.test.js +79 -105
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.js +10 -16
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -1
- package/components/IconPicker/IconPickerTab.js +97 -140
- package/components/IconPicker/IconPickerTab.js.map +1 -1
- package/components/IconPicker/IconRenderer.d.ts +6 -6
- package/components/IconPicker/IconRenderer.js +15 -23
- package/components/IconPicker/IconRenderer.js.map +1 -1
- package/components/IconPicker/IconRepository.js +41 -40
- package/components/IconPicker/IconRepository.js.map +1 -1
- package/components/IconPicker/IconRepository.test.js +56 -63
- package/components/IconPicker/IconRepository.test.js.map +1 -1
- package/components/IconPicker/IconRepositoryFactory.js +15 -11
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -1
- package/components/IconPicker/Loading.js +47 -46
- package/components/IconPicker/Loading.js.map +1 -1
- package/components/IconPicker/components/IconPickerCell.d.ts +1 -1
- package/components/IconPicker/components/IconPickerCell.js +18 -20
- package/components/IconPicker/components/IconPickerCell.js.map +1 -1
- package/components/IconPicker/components/IconPickerContent.js +27 -35
- package/components/IconPicker/components/IconPickerContent.js.map +1 -1
- package/components/IconPicker/components/IconPickerRow.js +5 -10
- package/components/IconPicker/components/IconPickerRow.js.map +1 -1
- package/components/IconPicker/components/IconPickerTrigger.d.ts +1 -1
- package/components/IconPicker/components/IconPickerTrigger.js +42 -44
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -1
- package/components/IconPicker/components/index.js +0 -2
- package/components/IconPicker/config/Emojis.js +19 -21
- package/components/IconPicker/config/Emojis.js.map +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js +54 -58
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -1
- package/components/IconPicker/config/IconPackProvider.js +17 -19
- package/components/IconPicker/config/IconPackProvider.js.map +1 -1
- package/components/IconPicker/config/IconType.js +48 -80
- package/components/IconPicker/config/IconType.js.map +1 -1
- package/components/IconPicker/config/index.js +28 -31
- package/components/IconPicker/config/index.js.map +1 -1
- package/components/IconPicker/defaultIcon.js +6 -5
- package/components/IconPicker/defaultIcon.js.map +1 -1
- package/components/IconPicker/index.js +0 -2
- package/components/IconPicker/plugins/customPlugin.js +87 -110
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/IconPicker/plugins/emojisPlugin.js +90 -115
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -1
- package/components/IconPicker/plugins/graphql.js +3 -8
- package/components/IconPicker/plugins/graphql.js.map +1 -1
- package/components/IconPicker/plugins/iconsPlugin.js +73 -104
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -1
- package/components/IconPicker/types.js +4 -7
- package/components/IconPicker/types.js.map +1 -1
- package/components/LexicalEditor/DefaultLexicalEditorConfig.d.ts +2 -0
- package/components/LexicalEditor/DefaultLexicalEditorConfig.js +81 -0
- package/components/LexicalEditor/DefaultLexicalEditorConfig.js.map +1 -0
- package/components/LexicalEditor/LexicalEditor.js +41 -33
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +88 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/TypographyDropDown.d.ts +8 -0
- package/components/LexicalEditor/TypographyDropDown.js +60 -0
- package/components/LexicalEditor/TypographyDropDown.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +1 -2
- package/components/LexicalEditor/lexicalValueFromHtml.d.ts +7 -0
- package/components/LexicalEditor/lexicalValueFromHtml.js +28 -0
- package/components/LexicalEditor/lexicalValueFromHtml.js.map +1 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js +24 -30
- package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -1
- package/components/MultiImageUpload.js +4 -13
- package/components/MultiImageUpload.js.map +1 -1
- package/components/NotAuthorizedError/NotAuthorizedError.js +16 -17
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -1
- package/components/NotAuthorizedError/SecureRouteError.js +297 -0
- package/components/NotAuthorizedError/SecureRouteError.js.map +1 -0
- package/components/NotAuthorizedError/index.js +0 -2
- package/components/OptionsMenu/OptionsMenu.d.ts +6 -0
- package/components/OptionsMenu/OptionsMenu.js +20 -19
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuItem.js +15 -14
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuLink.js +13 -14
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -1
- package/components/OptionsMenu/index.js +0 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +13 -18
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.js +35 -38
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js +6 -11
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +18 -17
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/OverlayLayout/components/OverlayHeader.d.ts +1 -1
- package/components/OverlayLayout/components/OverlayHeader.js +30 -37
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js +13 -14
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -1
- package/components/OverlayLayout/components/index.js +0 -2
- package/components/OverlayLayout/index.js +0 -2
- package/components/Permissions/CannotUseAaclAlert.js +10 -11
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +1 -3
- package/components/Permissions/Permissions.js +36 -39
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.js +9 -15
- package/components/Permissions/PermissionsGroup.js.map +1 -1
- package/components/Permissions/StyledComponents.js +10 -11
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.js +1 -3
- package/components/RegisterFeature.js +16 -23
- package/components/RegisterFeature.js.map +1 -1
- package/components/ResizablePanels/index.d.ts +1 -1
- package/components/ResizablePanels/index.js +1 -3
- package/components/RoleAutocomplete/graphql.js +3 -2
- package/components/RoleAutocomplete/graphql.js.map +1 -1
- package/components/RoleAutocomplete/index.d.ts +5 -3
- package/components/RoleAutocomplete/index.js +21 -13
- package/components/RoleAutocomplete/index.js.map +1 -1
- package/components/RolesMultiAutocomplete/graphql.js +3 -2
- package/components/RolesMultiAutocomplete/graphql.js.map +1 -1
- package/components/RolesMultiAutocomplete/index.d.ts +5 -3
- package/components/RolesMultiAutocomplete/index.js +21 -14
- package/components/RolesMultiAutocomplete/index.js.map +1 -1
- package/components/SearchUI.js +18 -25
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +3 -3
- package/components/SimpleForm/SimpleForm.js +54 -73
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.js +1 -3
- package/components/SimpleUI/InputField.js +70 -86
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +2 -2
- package/components/SingleImageUpload.js +37 -58
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +6 -6
- package/components/SplitView/SplitView.js +48 -50
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.js +1 -3
- package/components/TeamAutocomplete/graphql.js +3 -2
- package/components/TeamAutocomplete/graphql.js.map +1 -1
- package/components/TeamAutocomplete/index.d.ts +5 -3
- package/components/TeamAutocomplete/index.js +21 -13
- package/components/TeamAutocomplete/index.js.map +1 -1
- package/components/TeamsMultiAutocomplete/graphql.js +3 -2
- package/components/TeamsMultiAutocomplete/graphql.js.map +1 -1
- package/components/TeamsMultiAutocomplete/index.d.ts +5 -3
- package/components/TeamsMultiAutocomplete/index.js +21 -14
- package/components/TeamsMultiAutocomplete/index.js.map +1 -1
- package/components/Wcp.d.ts +4 -0
- package/components/Wcp.js +29 -26
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +5 -6
- package/components/index.js +11 -16
- package/config/AdminConfig/Dashboard.js +3 -2
- package/config/AdminConfig/Dashboard.js.map +1 -1
- package/config/AdminConfig/Dialog.d.ts +10 -0
- package/config/AdminConfig/Dialog.js +19 -0
- package/config/AdminConfig/Dialog.js.map +1 -0
- package/config/AdminConfig/FieldRenderer.d.ts +11 -0
- package/config/AdminConfig/FieldRenderer.js +19 -0
- package/config/AdminConfig/FieldRenderer.js.map +1 -0
- package/config/AdminConfig/Form.d.ts +4 -0
- package/config/AdminConfig/Form.js +9 -0
- package/config/AdminConfig/Form.js.map +1 -0
- package/config/AdminConfig/LayoutRenderer.d.ts +10 -0
- package/config/AdminConfig/LayoutRenderer.js +19 -0
- package/config/AdminConfig/LayoutRenderer.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Color.js +34 -41
- package/config/AdminConfig/LexicalTheme/Color.js.map +1 -1
- package/config/AdminConfig/LexicalTheme/Typography.js +61 -74
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -1
- package/config/AdminConfig/LexicalTheme.js +4 -3
- package/config/AdminConfig/LexicalTheme.js.map +1 -1
- package/config/AdminConfig/Logo.d.ts +1 -1
- package/config/AdminConfig/Logo.js +15 -17
- package/config/AdminConfig/Logo.js.map +1 -1
- package/config/AdminConfig/Menu/MenuGroup.d.ts +3 -3
- package/config/AdminConfig/Menu/MenuGroup.js +7 -9
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -1
- package/config/AdminConfig/Menu/MenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/MenuItem.js +5 -7
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/MenuLink.d.ts +2 -2
- package/config/AdminConfig/Menu/MenuLink.js +12 -15
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +6 -8
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +4 -6
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu.d.ts +3 -3
- package/config/AdminConfig/Menu/SupportMenu.js +30 -41
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +4 -4
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +4 -4
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +0 -2
- package/config/AdminConfig/Menu/UserMenu/types.js +0 -3
- package/config/AdminConfig/Menu/UserMenu.d.ts +31 -31
- package/config/AdminConfig/Menu/UserMenu.js +39 -52
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -1
- package/config/AdminConfig/Menu/types.js +0 -3
- package/config/AdminConfig/Menu.d.ts +42 -42
- package/config/AdminConfig/Menu.js +57 -73
- package/config/AdminConfig/Menu.js.map +1 -1
- package/config/AdminConfig/Route.js +4 -5
- package/config/AdminConfig/Route.js.map +1 -1
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +7 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +24 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantLogo.js +18 -20
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantName.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantName.js +14 -15
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -1
- package/config/AdminConfig/Tenant.js +6 -9
- package/config/AdminConfig/Tenant.js.map +1 -1
- package/config/AdminConfig/Theme/assignColor.js +51 -18
- package/config/AdminConfig/Theme/assignColor.js.map +1 -1
- package/config/AdminConfig/Theme/consts.js +20 -2
- package/config/AdminConfig/Theme/consts.js.map +1 -1
- package/config/AdminConfig/Theme/types.js +0 -3
- package/config/AdminConfig/Theme.js +8 -15
- package/config/AdminConfig/Theme.js.map +1 -1
- package/config/AdminConfig/Title.d.ts +1 -1
- package/config/AdminConfig/Title.js +11 -12
- package/config/AdminConfig/Title.js.map +1 -1
- package/config/AdminConfig/Widget.js +24 -31
- package/config/AdminConfig/Widget.js.map +1 -1
- package/config/AdminConfig.d.ts +22 -1
- package/config/AdminConfig.js +52 -51
- package/config/AdminConfig.js.map +1 -1
- package/config/createAdminConfig.js +55 -86
- package/config/createAdminConfig.js.map +1 -1
- package/domain/Identity.js +79 -89
- package/domain/Identity.js.map +1 -1
- package/errors/ErrorOverlayNetworkErrorHandler.js +37 -52
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -1
- package/errors/TenantIsDisabled.js +19 -20
- package/errors/TenantIsDisabled.js.map +1 -1
- package/exports/admin/build-params.d.ts +4 -0
- package/exports/admin/build-params.js +2 -0
- package/exports/admin/configs.js +0 -2
- package/exports/admin/form.d.ts +16 -0
- package/exports/admin/form.js +5 -0
- package/exports/admin/security.d.ts +6 -0
- package/exports/admin/security.js +1 -2
- package/exports/admin/tenancy.js +0 -2
- package/exports/admin/ui/file-manager.d.ts +3 -0
- package/exports/admin/ui/file-manager.js +2 -0
- package/exports/admin/ui/lexical.d.ts +1 -0
- package/exports/admin/ui/lexical.js +1 -0
- package/exports/admin/ui.d.ts +5 -1
- package/exports/admin/ui.js +4 -3
- package/exports/admin.d.ts +6 -0
- package/exports/admin.js +5 -2
- package/features/apolloClient/abstraction.js +2 -1
- package/features/apolloClient/abstraction.js.map +1 -1
- package/features/apolloClient/feature.js +22 -30
- package/features/apolloClient/feature.js.map +1 -1
- package/features/buildParams/BuildParams.js +20 -14
- package/features/buildParams/BuildParams.js.map +1 -1
- package/features/buildParams/abstractions.js +3 -2
- package/features/buildParams/abstractions.js.map +1 -1
- package/features/buildParams/feature.d.ts +1 -1
- package/features/buildParams/feature.js +11 -6
- package/features/buildParams/feature.js.map +1 -1
- package/features/buildParams/index.js +0 -2
- package/features/fileUrlFormatter/abstractions.d.ts +6 -0
- package/features/fileUrlFormatter/abstractions.js +5 -0
- package/features/fileUrlFormatter/abstractions.js.map +1 -0
- package/features/formModel/ConditionRuleEvaluator.d.ts +9 -0
- package/features/formModel/ConditionRuleEvaluator.js +49 -0
- package/features/formModel/ConditionRuleEvaluator.js.map +1 -0
- package/features/formModel/Field.d.ts +99 -0
- package/features/formModel/Field.js +347 -0
- package/features/formModel/Field.js.map +1 -0
- package/features/formModel/FieldBuilder.d.ts +44 -0
- package/features/formModel/FieldBuilder.js +152 -0
- package/features/formModel/FieldBuilder.js.map +1 -0
- package/features/formModel/FieldBuilder.test.d.ts +1 -0
- package/features/formModel/FieldBuilder.test.js +236 -0
- package/features/formModel/FieldBuilder.test.js.map +1 -0
- package/features/formModel/FieldBuilderRegistry.d.ts +4 -0
- package/features/formModel/FieldBuilderRegistry.js +29 -0
- package/features/formModel/FieldBuilderRegistry.js.map +1 -0
- package/features/formModel/FocusManager.d.ts +14 -0
- package/features/formModel/FocusManager.js +83 -0
- package/features/formModel/FocusManager.js.map +1 -0
- package/features/formModel/FormErrors.d.ts +9 -0
- package/features/formModel/FormErrors.js +35 -0
- package/features/formModel/FormErrors.js.map +1 -0
- package/features/formModel/FormModel.d.ts +59 -0
- package/features/formModel/FormModel.js +410 -0
- package/features/formModel/FormModel.js.map +1 -0
- package/features/formModel/FormModel.test.d.ts +1 -0
- package/features/formModel/FormModel.test.js +3811 -0
- package/features/formModel/FormModel.test.js.map +1 -0
- package/features/formModel/FormModelFactory.d.ts +11 -0
- package/features/formModel/FormModelFactory.js +33 -0
- package/features/formModel/FormModelFactory.js.map +1 -0
- package/features/formModel/FormView.d.ts +46 -0
- package/features/formModel/FormView.js +187 -0
- package/features/formModel/FormView.js.map +1 -0
- package/features/formModel/LayoutBuilderFactory.d.ts +61 -0
- package/features/formModel/LayoutBuilderFactory.js +316 -0
- package/features/formModel/LayoutBuilderFactory.js.map +1 -0
- package/features/formModel/LayoutMutator.d.ts +11 -0
- package/features/formModel/LayoutMutator.js +129 -0
- package/features/formModel/LayoutMutator.js.map +1 -0
- package/features/formModel/LayoutResolver.d.ts +26 -0
- package/features/formModel/LayoutResolver.js +199 -0
- package/features/formModel/LayoutResolver.js.map +1 -0
- package/features/formModel/ObjectField.d.ts +97 -0
- package/features/formModel/ObjectField.js +563 -0
- package/features/formModel/ObjectField.js.map +1 -0
- package/features/formModel/PresenterErrors.d.ts +9 -0
- package/features/formModel/PresenterErrors.js +32 -0
- package/features/formModel/PresenterErrors.js.map +1 -0
- package/features/formModel/Rules.test.d.ts +1 -0
- package/features/formModel/Rules.test.js +324 -0
- package/features/formModel/Rules.test.js.map +1 -0
- package/features/formModel/abstractions.d.ts +715 -0
- package/features/formModel/abstractions.js +8 -0
- package/features/formModel/abstractions.js.map +1 -0
- package/features/formModel/createFieldRenderer.d.ts +20 -0
- package/features/formModel/createFieldRenderer.js +38 -0
- package/features/formModel/createFieldRenderer.js.map +1 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.d.ts +18 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.js +299 -0
- package/features/formModel/demo/FieldRenderersDemoPresenter.js.map +1 -0
- package/features/formModel/demo/FormModelDemo.d.ts +4 -0
- package/features/formModel/demo/FormModelDemo.js +206 -0
- package/features/formModel/demo/FormModelDemo.js.map +1 -0
- package/features/formModel/demo/FormModelDemoPresenter.d.ts +22 -0
- package/features/formModel/demo/FormModelDemoPresenter.js +140 -0
- package/features/formModel/demo/FormModelDemoPresenter.js.map +1 -0
- package/features/formModel/demo/FormModelPhase11Presenter.d.ts +25 -0
- package/features/formModel/demo/FormModelPhase11Presenter.js +107 -0
- package/features/formModel/demo/FormModelPhase11Presenter.js.map +1 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.d.ts +23 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.js +69 -0
- package/features/formModel/demo/FormModelPhase8c1Presenter.js.map +1 -0
- package/features/formModel/feature.d.ts +3 -0
- package/features/formModel/feature.js +30 -0
- package/features/formModel/feature.js.map +1 -0
- package/features/formModel/fieldTypes/BooleanFieldType.d.ts +19 -0
- package/features/formModel/fieldTypes/BooleanFieldType.js +26 -0
- package/features/formModel/fieldTypes/BooleanFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +173 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.js +246 -0
- package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/FileFieldType.d.ts +29 -0
- package/features/formModel/fieldTypes/FileFieldType.js +56 -0
- package/features/formModel/fieldTypes/FileFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.js +23 -0
- package/features/formModel/fieldTypes/FileUrlFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/LexicalFieldType.d.ts +19 -0
- package/features/formModel/fieldTypes/LexicalFieldType.js +23 -0
- package/features/formModel/fieldTypes/LexicalFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/NumberFieldType.d.ts +19 -0
- package/features/formModel/fieldTypes/NumberFieldType.js +28 -0
- package/features/formModel/fieldTypes/NumberFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/ObjectFieldType.d.ts +34 -0
- package/features/formModel/fieldTypes/ObjectFieldType.js +95 -0
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/TextFieldType.d.ts +18 -0
- package/features/formModel/fieldTypes/TextFieldType.js +23 -0
- package/features/formModel/fieldTypes/TextFieldType.js.map +1 -0
- package/features/formModel/fieldTypes/index.d.ts +8 -0
- package/features/formModel/fieldTypes/index.js +8 -0
- package/features/formModel/index.d.ts +24 -0
- package/features/formModel/index.js +22 -0
- package/features/formModel/renderers.d.ts +21 -0
- package/features/formModel/renderers.js +21 -0
- package/features/formModel/useFieldRenderers.d.ts +2 -0
- package/features/formModel/useFieldRenderers.js +15 -0
- package/features/formModel/useFieldRenderers.js.map +1 -0
- package/features/formModel/useLayoutRenderers.d.ts +2 -0
- package/features/formModel/useLayoutRenderers.js +15 -0
- package/features/formModel/useLayoutRenderers.js.map +1 -0
- package/features/listCache/ListCache.d.ts +28 -0
- package/features/listCache/ListCache.js +48 -0
- package/features/listCache/ListCache.js.map +1 -0
- package/features/listCache/index.d.ts +2 -0
- package/features/listCache/index.js +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +27 -26
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -1
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +23 -22
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -1
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +15 -12
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -1
- package/features/security/AuthenticationContext/abstractions.js +3 -2
- package/features/security/AuthenticationContext/abstractions.js.map +1 -1
- package/features/security/AuthenticationContext/feature.js +15 -14
- package/features/security/AuthenticationContext/feature.js.map +1 -1
- package/features/security/AuthenticationContext/index.js +0 -2
- package/features/security/AuthenticationContext/types.js +0 -3
- package/features/security/IdentityContext/IdentityContext.js +18 -17
- package/features/security/IdentityContext/IdentityContext.js.map +1 -1
- package/features/security/IdentityContext/abstractions.js +2 -1
- package/features/security/IdentityContext/abstractions.js.map +1 -1
- package/features/security/IdentityContext/feature.js +13 -12
- package/features/security/IdentityContext/feature.js.map +1 -1
- package/features/security/IdentityContext/index.js +0 -2
- package/features/security/LogIn/IdentityMapper.js +8 -7
- package/features/security/LogIn/IdentityMapper.js.map +1 -1
- package/features/security/LogIn/LogInGateway.d.ts +2 -2
- package/features/security/LogIn/LogInGateway.js +18 -20
- package/features/security/LogIn/LogInGateway.js.map +1 -1
- package/features/security/LogIn/LogInRepository.js +16 -14
- package/features/security/LogIn/LogInRepository.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.js +23 -31
- package/features/security/LogIn/LogInUseCase.js.map +1 -1
- package/features/security/LogIn/abstractions.js +5 -16
- package/features/security/LogIn/abstractions.js.map +1 -1
- package/features/security/LogIn/createLoginMutation.js +2 -3
- package/features/security/LogIn/createLoginMutation.js.map +1 -1
- package/features/security/LogIn/feature.js +16 -15
- package/features/security/LogIn/feature.js.map +1 -1
- package/features/security/LogIn/index.js +0 -2
- package/features/security/LogOut/LogOutUseCase.js +18 -16
- package/features/security/LogOut/LogOutUseCase.js.map +1 -1
- package/features/security/LogOut/abstractions.js +2 -1
- package/features/security/LogOut/abstractions.js.map +1 -1
- package/features/security/LogOut/feature.js +12 -11
- package/features/security/LogOut/feature.js.map +1 -1
- package/features/security/LogOut/index.js +0 -2
- package/features/security/SecurityFeature.js +9 -8
- package/features/security/SecurityFeature.js.map +1 -1
- package/features/telemetry/TelemetryService.js +11 -12
- package/features/telemetry/TelemetryService.js.map +1 -1
- package/features/telemetry/abstractions.js +2 -1
- package/features/telemetry/abstractions.js.map +1 -1
- package/features/telemetry/feature.js +13 -12
- package/features/telemetry/feature.js.map +1 -1
- package/features/telemetry/index.js +0 -2
- package/features/tenancy/GraphQLClientDecorator.js +23 -20
- package/features/tenancy/GraphQLClientDecorator.js.map +1 -1
- package/features/tenancy/TenantContext.js +46 -50
- package/features/tenancy/TenantContext.js.map +1 -1
- package/features/tenancy/abstractions.js +2 -1
- package/features/tenancy/abstractions.js.map +1 -1
- package/features/tenancy/feature.js +25 -35
- package/features/tenancy/feature.js.map +1 -1
- package/features/tenancy/types.js +0 -3
- package/features/tools/LexicalContext/LexicalContext.d.ts +14 -0
- package/features/tools/LexicalContext/LexicalContext.js +25 -0
- package/features/tools/LexicalContext/LexicalContext.js.map +1 -0
- package/features/tools/LexicalContext/abstractions.d.ts +11 -0
- package/features/tools/LexicalContext/abstractions.js +5 -0
- package/features/tools/LexicalContext/abstractions.js.map +1 -0
- package/features/tools/LexicalContext/index.d.ts +2 -0
- package/features/tools/LexicalContext/index.js +1 -0
- package/features/tools/ToolPipelineRunner.d.ts +10 -0
- package/features/tools/ToolPipelineRunner.js +35 -0
- package/features/tools/ToolPipelineRunner.js.map +1 -0
- package/features/tools/ToolRegistry.d.ts +12 -0
- package/features/tools/ToolRegistry.js +38 -0
- package/features/tools/ToolRegistry.js.map +1 -0
- package/features/tools/abstractions.d.ts +28 -0
- package/features/tools/abstractions.js +7 -0
- package/features/tools/abstractions.js.map +1 -0
- package/features/tools/feature.d.ts +4 -0
- package/features/tools/feature.js +22 -0
- package/features/tools/feature.js.map +1 -0
- package/features/tools/index.d.ts +3 -0
- package/features/tools/index.js +3 -0
- package/features/wcp/ReactLicense.d.ts +4 -0
- package/features/wcp/ReactLicense.js +53 -40
- package/features/wcp/ReactLicense.js.map +1 -1
- package/features/wcp/WcpGateway.d.ts +2 -2
- package/features/wcp/WcpGateway.js +26 -21
- package/features/wcp/WcpGateway.js.map +1 -1
- package/features/wcp/WcpService.js +57 -67
- package/features/wcp/WcpService.js.map +1 -1
- package/features/wcp/abstractions.js +3 -2
- package/features/wcp/abstractions.js.map +1 -1
- package/features/wcp/feature.js +14 -13
- package/features/wcp/feature.js.map +1 -1
- package/features/wcp/types.js +0 -3
- package/features/webinySdk/WebinySdk.d.ts +11 -0
- package/features/webinySdk/WebinySdk.js +28 -0
- package/features/webinySdk/WebinySdk.js.map +1 -0
- package/features/webinySdk/abstractions.d.ts +6 -0
- package/features/webinySdk/abstractions.js +5 -0
- package/features/webinySdk/abstractions.js.map +1 -0
- package/features/webinySdk/feature.d.ts +3 -0
- package/features/webinySdk/feature.js +17 -0
- package/features/webinySdk/feature.js.map +1 -0
- package/features/webinySdk/index.d.ts +2 -0
- package/features/webinySdk/index.js +2 -0
- package/hooks/index.d.ts +2 -0
- package/hooks/index.js +2 -2
- package/hooks/useConfirmationDialog.d.ts +1 -1
- package/hooks/useConfirmationDialog.js +31 -38
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +9 -29
- package/hooks/useDialog.js +16 -25
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useHotkeys.d.ts +9 -0
- package/hooks/useHotkeys.js +66 -0
- package/hooks/useHotkeys.js.map +1 -0
- package/hooks/useIsMounted.js +12 -11
- package/hooks/useIsMounted.js.map +1 -1
- package/hooks/useKeyHandler.js +46 -54
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +21 -26
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useOpenDialog.d.ts +7 -0
- package/hooks/useOpenDialog.js +18 -0
- package/hooks/useOpenDialog.js.map +1 -0
- package/hooks/useShiftKey.d.ts +5 -1
- package/hooks/useShiftKey.js +38 -29
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useSnackbar.d.ts +3 -0
- package/hooks/useSnackbar.js +26 -28
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.js +14 -12
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useStateWithCallback.js +18 -14
- package/hooks/useStateWithCallback.js.map +1 -1
- package/hooks/useToggler.js +12 -11
- package/hooks/useToggler.js.map +1 -1
- package/index.d.ts +25 -2
- package/index.js +23 -20
- package/package.json +57 -52
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +205 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +16 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +4 -0
- package/permissions/createHasPermission.js +39 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +9 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/createPermissions.d.ts +6 -0
- package/permissions/createPermissions.js +141 -0
- package/permissions/createPermissions.js.map +1 -0
- package/permissions/createPermissions.test.d.ts +1 -0
- package/permissions/createPermissions.test.js +209 -0
- package/permissions/createPermissions.test.js.map +1 -0
- package/permissions/index.d.ts +9 -0
- package/permissions/index.js +7 -0
- package/permissions/types.d.ts +267 -0
- package/permissions/types.js +0 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +157 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +4 -0
- package/permissions/usePermissions.js +10 -0
- package/permissions/usePermissions.js.map +1 -0
- package/plugins/MenuPlugin.js +15 -14
- package/plugins/MenuPlugin.js.map +1 -1
- package/presentation/browserFilePicker/BrowserFilePicker.d.ts +3 -0
- package/presentation/browserFilePicker/BrowserFilePicker.js +88 -0
- package/presentation/browserFilePicker/BrowserFilePicker.js.map +1 -0
- package/presentation/browserFilePicker/BrowserFilePickerPresenter.d.ts +10 -0
- package/presentation/browserFilePicker/BrowserFilePickerPresenter.js +84 -0
- package/presentation/browserFilePicker/BrowserFilePickerPresenter.js.map +1 -0
- package/presentation/browserFilePicker/index.d.ts +3 -0
- package/presentation/browserFilePicker/index.js +2 -0
- package/presentation/browserFilePicker/types.d.ts +53 -0
- package/presentation/browserFilePicker/types.js +0 -0
- package/presentation/browserFilePicker/utils.d.ts +2 -0
- package/presentation/browserFilePicker/utils.js +16 -0
- package/presentation/browserFilePicker/utils.js.map +1 -0
- package/presentation/buildParams/useBuildParams.d.ts +1 -0
- package/presentation/buildParams/useBuildParams.js +6 -0
- package/presentation/buildParams/useBuildParams.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +46 -53
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +9 -14
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/index.js +0 -2
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +14 -29
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +11 -10
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +60 -60
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +75 -85
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/Center.js +5 -8
- package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/Container.js +18 -24
- package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +48 -53
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +13 -16
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/introduction.js +723 -0
- package/presentation/installation/components/SystemInstaller/steps/introduction.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js +14 -1
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +2 -2
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +28 -29
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +117 -124
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +23 -21
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/abstractions.js +4 -3
- package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/feature.js +15 -14
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/index.js +0 -2
- package/presentation/lexicalContext/useLexicalContext.d.ts +3 -0
- package/presentation/lexicalContext/useLexicalContext.js +17 -0
- package/presentation/lexicalContext/useLexicalContext.js.map +1 -0
- package/presentation/listPresenter/ListPresenter.d.ts +30 -0
- package/presentation/listPresenter/ListPresenter.js +216 -0
- package/presentation/listPresenter/ListPresenter.js.map +1 -0
- package/presentation/listPresenter/ListPresenter.test.d.ts +1 -0
- package/presentation/listPresenter/ListPresenter.test.js +816 -0
- package/presentation/listPresenter/ListPresenter.test.js.map +1 -0
- package/presentation/listPresenter/SelectionController.d.ts +21 -0
- package/presentation/listPresenter/SelectionController.js +74 -0
- package/presentation/listPresenter/SelectionController.js.map +1 -0
- package/presentation/listPresenter/abstractions.d.ts +107 -0
- package/presentation/listPresenter/abstractions.js +5 -0
- package/presentation/listPresenter/abstractions.js.map +1 -0
- package/presentation/listPresenter/feature.d.ts +3 -0
- package/presentation/listPresenter/feature.js +17 -0
- package/presentation/listPresenter/feature.js.map +1 -0
- package/presentation/listPresenter/index.d.ts +3 -0
- package/presentation/listPresenter/index.js +2 -0
- package/presentation/security/components/HasPermission.js +15 -25
- package/presentation/security/components/HasPermission.js.map +1 -1
- package/presentation/security/components/SecureRoute.js +6 -12
- package/presentation/security/components/SecureRoute.js.map +1 -1
- package/presentation/security/hooks/useAuthentication.js +11 -17
- package/presentation/security/hooks/useAuthentication.js.map +1 -1
- package/presentation/security/hooks/useIdentity.js +19 -18
- package/presentation/security/hooks/useIdentity.js.map +1 -1
- package/presentation/security/hooks/useSecurity.js +14 -24
- package/presentation/security/hooks/useSecurity.js.map +1 -1
- package/presentation/tenancy/TenancyProvider.js +23 -36
- package/presentation/tenancy/TenancyProvider.js.map +1 -1
- package/presentation/tenancy/createTenancyProvider.js +6 -11
- package/presentation/tenancy/createTenancyProvider.js.map +1 -1
- package/presentation/tenancy/useTenantContext.js +17 -18
- package/presentation/tenancy/useTenantContext.js.map +1 -1
- package/presentation/textToLexicalTool/TextToLexicalTool.d.ts +30 -0
- package/presentation/textToLexicalTool/TextToLexicalTool.js +31 -0
- package/presentation/textToLexicalTool/TextToLexicalTool.js.map +1 -0
- package/presentation/textToLexicalTool/feature.d.ts +1 -0
- package/presentation/textToLexicalTool/feature.js +11 -0
- package/presentation/textToLexicalTool/feature.js.map +1 -0
- package/presentation/textToLexicalTool/textToLexicalState.d.ts +6 -0
- package/presentation/textToLexicalTool/textToLexicalState.js +31 -0
- package/presentation/textToLexicalTool/textToLexicalState.js.map +1 -0
- package/presentation/wcp/WcpProvider.js +17 -20
- package/presentation/wcp/WcpProvider.js.map +1 -1
- package/presentation/wcp/useWcp.js +11 -12
- package/presentation/wcp/useWcp.js.map +1 -1
- package/routes.d.ts +1 -1
- package/routes.js +14 -13
- package/routes.js.map +1 -1
- package/static/svg/SecureRouteError.e8b15981.svg +1 -0
- package/static/svg/add-18px.b3062af6.svg +3 -0
- package/static/svg/arrow_drop_down-24px.da74d713.svg +4 -0
- package/static/svg/attach_file_black_24dp.7fb13a7e.svg +1 -0
- package/static/svg/baseline-menu-24px.071b179d.svg +4 -0
- package/static/svg/baseline-notification_important-24px.29277e73.svg +4 -0
- package/static/svg/baseline-security-24px.12e519cc.svg +4 -0
- package/static/svg/file_download.afe3fbec.svg +1 -0
- package/static/svg/file_upload.6865d820.svg +1 -0
- package/static/svg/filter-24px.886d9ff0.svg +8 -0
- package/static/svg/github-brands.6311f0fa.svg +1 -0
- package/static/svg/highlight-24px.959a97f7.svg +1 -0
- package/static/svg/icon-community.cd087355.svg +16 -0
- package/static/svg/icon-documentation.a189d24c.svg +16 -0
- package/static/svg/info.fe810b72.svg +1 -0
- package/static/svg/insert_drive_file-24px.39d490eb.svg +1 -0
- package/static/svg/insert_photo-24px.81a5f945.svg +1 -0
- package/static/svg/introduction.108720aa.svg +154 -0
- package/static/svg/label-24px.9deafa4f.svg +1 -0
- package/static/svg/round-account_circle-24px.f0b48cb7.svg +1 -0
- package/static/svg/round-add-24px.4a5219b4.svg +16 -0
- package/static/svg/round-arrow_drop_down-24px.5fdf92d1.svg +1 -0
- package/static/svg/round-chevron_right-24px.34936511.svg +12 -0
- package/static/svg/round-feedback-24px.4dae7231.svg +54 -0
- package/static/svg/round-help-24px.a61b1d66.svg +1 -0
- package/static/svg/round-invert_colors-24px.a229a1dd.svg +52 -0
- package/static/svg/round-keyboard_arrow_down-24px.6febe804.svg +16 -0
- package/static/svg/round-keyboard_arrow_up-24px.b1f7db34.svg +16 -0
- package/static/svg/round-lock_open-24px.d527f6a5.svg +60 -0
- package/static/svg/round-more_vert-24px.68d41b07.svg +12 -0
- package/static/svg/round-open_in_new-24px.be5b4ddd.svg +44 -0
- package/static/svg/round-settings-24px.c0b3056f.svg +4 -0
- package/static/svg/search-24px.3c0f88dd.svg +20 -0
- package/static/svg/slack-logo.7ee35e7f.svg +1 -0
- package/static/svg/today-24px.df206362.svg +1 -0
- package/static/svg/touch_app.debf3744.svg +1 -0
- package/static/svg/wby-horizontal.03327bf6.svg +23 -0
- package/static/svg/wby-square.ff8f47c3.svg +3 -0
- package/static/svg/webiny-logo.ef56725c.svg +20 -0
- package/static/svg/webiny-orange-logo.4eccf0f2.svg +20 -0
- package/types.d.ts +0 -7
- package/types.js +0 -3
- package/base/Base/LexicalPreset/LinkEditForm.d.ts +0 -6
- package/base/Base/LexicalPreset/LinkEditForm.js +0 -63
- package/base/Base/LexicalPreset/LinkEditForm.js.map +0 -1
- package/components/BulkActions/index.js.map +0 -1
- package/components/BulkActions/useDialogWithReport/index.js.map +0 -1
- package/components/Buttons/index.js.map +0 -1
- package/components/Filters/index.js.map +0 -1
- package/components/FloatingPanel.d.ts +0 -13
- package/components/FloatingPanel.js +0 -94
- package/components/FloatingPanel.js.map +0 -1
- package/components/IconPicker/components/index.js.map +0 -1
- package/components/IconPicker/index.js.map +0 -1
- package/components/LexicalEditor/index.js.map +0 -1
- package/components/NavigationPrompt.d.ts +0 -27
- package/components/NavigationPrompt.js +0 -39
- package/components/NavigationPrompt.js.map +0 -1
- package/components/NotAuthorizedError/index.js.map +0 -1
- package/components/OptionsMenu/index.js.map +0 -1
- package/components/OverlayLayout/components/index.js.map +0 -1
- package/components/OverlayLayout/index.js.map +0 -1
- package/components/Permissions/index.js.map +0 -1
- package/components/ResizablePanels/index.js.map +0 -1
- package/components/SimpleForm/index.js.map +0 -1
- package/components/SplitView/index.js.map +0 -1
- package/components/StateInspector.d.ts +0 -8
- package/components/StateInspector.js +0 -36
- package/components/StateInspector.js.map +0 -1
- package/components/index.js.map +0 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +0 -1
- package/config/AdminConfig/Menu/UserMenu/types.js.map +0 -1
- package/config/AdminConfig/Menu/types.js.map +0 -1
- package/config/AdminConfig/Theme/types.js.map +0 -1
- package/exports/admin/buildParams.d.ts +0 -1
- package/exports/admin/buildParams.js +0 -3
- package/exports/admin/buildParams.js.map +0 -1
- package/exports/admin/configs.js.map +0 -1
- package/exports/admin/security.js.map +0 -1
- package/exports/admin/tenancy.js.map +0 -1
- package/exports/admin/ui.js.map +0 -1
- package/exports/admin.js.map +0 -1
- package/extensions/AdminBuildParam.d.ts +0 -11
- package/extensions/AdminBuildParam.js +0 -184
- package/extensions/AdminBuildParam.js.map +0 -1
- package/extensions/AdminExtension.d.ts +0 -11
- package/extensions/AdminExtension.js +0 -105
- package/extensions/AdminExtension.js.map +0 -1
- package/extensions/index.d.ts +0 -23
- package/extensions/index.js +0 -7
- package/extensions/index.js.map +0 -1
- package/features/buildParams/index.js.map +0 -1
- package/features/security/AuthenticationContext/index.js.map +0 -1
- package/features/security/AuthenticationContext/types.js.map +0 -1
- package/features/security/IdentityContext/index.js.map +0 -1
- package/features/security/LogIn/index.js.map +0 -1
- package/features/security/LogOut/index.js.map +0 -1
- package/features/telemetry/index.js.map +0 -1
- package/features/tenancy/types.js.map +0 -1
- package/features/wcp/types.js.map +0 -1
- package/hooks/index.js.map +0 -1
- package/index.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -19
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/presentation/installation/components/SystemInstaller/index.js.map +0 -1
- package/presentation/installation/presenters/SystemInstaller/index.js.map +0 -1
- package/types.js.map +0 -1
|
@@ -1,159 +1,116 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactComponent
|
|
1
|
+
import react, { Fragment } from "react";
|
|
2
|
+
import { ReactComponent } from "@webiny/icons/search.svg";
|
|
3
3
|
import { List } from "react-virtualized";
|
|
4
4
|
import groupBy from "lodash/groupBy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { DelayedOnChange, Icon, Input, Tabs, Text } from "@webiny/admin-ui";
|
|
6
6
|
import { makeDecoratable } from "@webiny/react-composition";
|
|
7
7
|
import { useIconPicker } from "./IconPickerPresenterProvider.js";
|
|
8
8
|
import { useIconType } from "./config/IconType.js";
|
|
9
9
|
import { IconPickerCell, IconPickerRow } from "./components/index.js";
|
|
10
10
|
import { ICON_PICKER_SIZE } from "./types.js";
|
|
11
11
|
const COLUMN_COUNT = 8;
|
|
12
|
-
|
|
13
|
-
const getRows = (icons, size)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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) {
|
|
12
|
+
const IconPickerTabRenderer = makeDecoratable("IconPickerTabRenderer", ()=>null);
|
|
13
|
+
const getRows = (icons, size)=>{
|
|
14
|
+
const groupedObjects = groupBy(icons, "category");
|
|
15
|
+
const rows = [];
|
|
16
|
+
for(const key in groupedObjects)if ("undefined" !== key) {
|
|
17
|
+
const rowIcons = groupedObjects[key];
|
|
32
18
|
rows.push({
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
type: "category-name",
|
|
20
|
+
name: key
|
|
21
|
+
});
|
|
22
|
+
while(rowIcons.length)rows.push({
|
|
23
|
+
type: "icons",
|
|
24
|
+
icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)
|
|
35
25
|
});
|
|
36
|
-
}
|
|
37
26
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
});
|
|
27
|
+
if (groupedObjects.undefined) {
|
|
28
|
+
const rowIcons = groupedObjects.undefined;
|
|
29
|
+
rows.push({
|
|
30
|
+
type: "category-name",
|
|
31
|
+
name: "Uncategorized"
|
|
32
|
+
});
|
|
33
|
+
while(rowIcons.length)rows.push({
|
|
34
|
+
type: "icons",
|
|
35
|
+
icons: rowIcons.splice(0, size === ICON_PICKER_SIZE.SMALL ? 6 : COLUMN_COUNT)
|
|
36
|
+
});
|
|
56
37
|
}
|
|
57
|
-
|
|
58
|
-
return rows;
|
|
38
|
+
return rows;
|
|
59
39
|
};
|
|
60
|
-
const useIconTypeRows = type
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
40
|
+
const useIconTypeRows = (type)=>{
|
|
41
|
+
const presenter = useIconPicker();
|
|
42
|
+
const icons = presenter.vm.icons.filter((icon)=>icon.type === type);
|
|
43
|
+
const rows = getRows(icons, presenter.vm.size);
|
|
44
|
+
return {
|
|
45
|
+
isEmpty: 0 === rows.length,
|
|
46
|
+
rows,
|
|
47
|
+
rowCount: rows.length
|
|
48
|
+
};
|
|
69
49
|
};
|
|
70
|
-
const RowRenderer = ({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
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"
|
|
50
|
+
const RowRenderer = ({ row, style, cellDecorator, onIconClick })=>{
|
|
51
|
+
const presenter = useIconPicker();
|
|
52
|
+
const value = presenter.vm.selectedIcon;
|
|
53
|
+
if ("category-name" === row.type) return /*#__PURE__*/ react.createElement(IconPickerRow, {
|
|
54
|
+
style: style
|
|
55
|
+
}, /*#__PURE__*/ react.createElement(Text, {
|
|
56
|
+
size: "sm",
|
|
57
|
+
className: "uppercase self-end text-neutral-muted mb-sm"
|
|
84
58
|
}, row.name));
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
})))));
|
|
59
|
+
return /*#__PURE__*/ react.createElement(IconPickerRow, {
|
|
60
|
+
style: style
|
|
61
|
+
}, row.icons.map((item, itemKey)=>/*#__PURE__*/ react.createElement(Fragment, {
|
|
62
|
+
key: itemKey
|
|
63
|
+
}, cellDecorator(/*#__PURE__*/ react.createElement(IconPickerCell, {
|
|
64
|
+
key: itemKey,
|
|
65
|
+
icon: item,
|
|
66
|
+
isActive: item.name === value?.name,
|
|
67
|
+
onIconClick: ()=>onIconClick(item)
|
|
68
|
+
})))));
|
|
96
69
|
};
|
|
97
|
-
const noopDecorator = cell
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
});
|
|
70
|
+
const noopDecorator = (cell)=>cell;
|
|
71
|
+
const IconPickerTab = ({ label, value, actions, onChange, cellDecorator = noopDecorator })=>{
|
|
72
|
+
const { type } = useIconType();
|
|
73
|
+
const { isEmpty, rowCount, rows } = useIconTypeRows(type);
|
|
74
|
+
const presenter = useIconPicker();
|
|
75
|
+
const size = presenter.vm.size;
|
|
76
|
+
return /*#__PURE__*/ react.createElement(Tabs.Tab, {
|
|
77
|
+
value: value,
|
|
78
|
+
trigger: label,
|
|
79
|
+
content: /*#__PURE__*/ react.createElement("div", null, /*#__PURE__*/ react.createElement("div", {
|
|
80
|
+
className: "flex items-center justify-center gap-sm"
|
|
81
|
+
}, /*#__PURE__*/ react.createElement(DelayedOnChange, {
|
|
82
|
+
value: presenter.vm.filter,
|
|
83
|
+
onChange: (value)=>presenter.setFilter(value)
|
|
84
|
+
}, ({ value, onChange })=>/*#__PURE__*/ react.createElement(Input, {
|
|
85
|
+
value: value,
|
|
86
|
+
onChange: (value)=>onChange(value),
|
|
87
|
+
placeholder: "Search icons...",
|
|
88
|
+
variant: "secondary",
|
|
89
|
+
size: "md",
|
|
90
|
+
startIcon: /*#__PURE__*/ react.createElement(Icon, {
|
|
91
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
92
|
+
label: "Search icons"
|
|
93
|
+
})
|
|
94
|
+
})), actions ? /*#__PURE__*/ react.createElement("div", null, actions) : null), /*#__PURE__*/ react.createElement("div", {
|
|
95
|
+
className: "relative"
|
|
96
|
+
}, isEmpty ? /*#__PURE__*/ react.createElement("div", {
|
|
97
|
+
className: "pt-md text-neutral-strong"
|
|
98
|
+
}, /*#__PURE__*/ react.createElement(Text, null, "No results found.")) : /*#__PURE__*/ react.createElement(List, {
|
|
99
|
+
className: "outline-none",
|
|
100
|
+
rowRenderer: ({ key, ...props })=>/*#__PURE__*/ react.createElement(RowRenderer, {
|
|
101
|
+
key: key,
|
|
102
|
+
row: rows[props.index],
|
|
103
|
+
cellDecorator: cellDecorator,
|
|
104
|
+
onIconClick: onChange,
|
|
105
|
+
...props
|
|
106
|
+
}),
|
|
107
|
+
width: size === ICON_PICKER_SIZE.SMALL ? 232 : 312,
|
|
108
|
+
height: size === ICON_PICKER_SIZE.SMALL ? 240 : 350,
|
|
109
|
+
rowCount: rowCount,
|
|
110
|
+
rowHeight: 40
|
|
111
|
+
})))
|
|
112
|
+
});
|
|
157
113
|
};
|
|
114
|
+
export { IconPickerTab, IconPickerTabRenderer };
|
|
158
115
|
|
|
159
116
|
//# sourceMappingURL=IconPickerTab.js.map
|
|
@@ -1 +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":"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","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"components/IconPicker/IconPickerTab.js","sources":["../../../src/components/IconPicker/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"],"names":["COLUMN_COUNT","IconPickerTabRenderer","makeDecoratable","getRows","icons","size","groupedObjects","groupBy","rows","key","rowIcons","ICON_PICKER_SIZE","useIconTypeRows","type","presenter","useIconPicker","icon","RowRenderer","row","style","cellDecorator","onIconClick","value","IconPickerRow","Text","item","itemKey","Fragment","IconPickerCell","noopDecorator","cell","IconPickerTab","label","actions","onChange","useIconType","isEmpty","rowCount","Tabs","DelayedOnChange","Input","IconComponent","SearchIcon","List","props"],"mappings":"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"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { Icon } from "./types.js";
|
|
3
|
-
export declare const IconRenderer: ((props: unknown) => JSX.Element | null) & {
|
|
4
|
-
original: (props: unknown) => JSX.Element | null;
|
|
3
|
+
export declare const IconRenderer: ((props: unknown) => React.JSX.Element | null) & {
|
|
4
|
+
original: (props: unknown) => React.JSX.Element | null;
|
|
5
5
|
originalName: string;
|
|
6
6
|
displayName: string;
|
|
7
7
|
} & {
|
|
8
|
-
original: ((props: unknown) => JSX.Element | null) & {
|
|
9
|
-
original: (props: unknown) => JSX.Element | null;
|
|
8
|
+
original: ((props: unknown) => React.JSX.Element | null) & {
|
|
9
|
+
original: (props: unknown) => React.JSX.Element | null;
|
|
10
10
|
originalName: string;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
originalName: string;
|
|
14
14
|
displayName: string;
|
|
15
15
|
} & {
|
|
16
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: unknown) => JSX.Element | null) & {
|
|
17
|
-
original: (props: unknown) => JSX.Element | null;
|
|
16
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: unknown) => React.JSX.Element | null) & {
|
|
17
|
+
original: (props: unknown) => React.JSX.Element | null;
|
|
18
18
|
originalName: string;
|
|
19
19
|
displayName: string;
|
|
20
20
|
}>) => (props: unknown) => React.JSX.Element;
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import react from "react";
|
|
2
2
|
import { toJS } from "mobx";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const IconContext = /*#__PURE__*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
3
|
+
import { createVoidComponent, makeDecoratable } from "@webiny/react-composition";
|
|
4
|
+
const IconRenderer = makeDecoratable("IconPickerIcon", createVoidComponent());
|
|
5
|
+
const IconContext = /*#__PURE__*/ react.createContext(void 0);
|
|
6
|
+
const IconProvider = ({ icon, size = 32, children })=>/*#__PURE__*/ react.createElement(IconContext.Provider, {
|
|
7
|
+
value: {
|
|
8
|
+
icon: toJS(icon),
|
|
9
|
+
size
|
|
10
|
+
}
|
|
11
|
+
}, children);
|
|
12
|
+
function useIcon() {
|
|
13
|
+
const context = react.useContext(IconContext);
|
|
14
|
+
if (!context) throw Error("Missing <IconProvider> in the component tree!");
|
|
15
|
+
return context;
|
|
25
16
|
}
|
|
17
|
+
export { IconProvider, IconRenderer, useIcon };
|
|
26
18
|
|
|
27
19
|
//# sourceMappingURL=IconRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"components/IconPicker/IconRenderer.js","sources":["../../../src/components/IconPicker/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.js\";\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"],"names":["IconRenderer","makeDecoratable","createVoidComponent","IconContext","React","undefined","IconProvider","icon","size","children","toJS","useIcon","context","Error"],"mappings":";;;AAOO,MAAMA,eAAeC,gBAAgB,kBAAkBC;AAO9D,MAAMC,cAAc,WAAHA,GAAGC,MAAAA,aAAmB,CAA0BC;AAQ1D,MAAMC,eAAe,CAAC,EAAEC,IAAI,EAAEC,OAAO,EAAE,EAAEC,QAAQ,EAAqB,GAElE,WAAP,GACI,oBAACN,YAAY,QAAQ;QAAC,OAAO;YAAE,MAAMO,KAAKH;YAAOC;QAAK;OAAIC;AAI3D,SAASE;IACZ,MAAMC,UAAUR,MAAAA,UAAgB,CAACD;IACjC,IAAI,CAACS,SACD,MAAMC,MAAM;IAEhB,OAAOD;AACX"}
|
|
@@ -1,47 +1,48 @@
|
|
|
1
1
|
import cloneDeep from "lodash/cloneDeep.js";
|
|
2
2
|
import { makeAutoObservable, runInAction } from "mobx";
|
|
3
3
|
import { Loading } from "./Loading.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
class IconRepository {
|
|
5
|
+
constructor(iconTypes, iconPackProviders){
|
|
6
|
+
this.icons = [];
|
|
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) return;
|
|
14
|
+
const icons = await this.runWithLoading(async ()=>{
|
|
15
|
+
const icons = await Promise.all(this.iconPackProviders.map((provider)=>provider.getIcons()));
|
|
16
|
+
return icons.flat();
|
|
17
|
+
});
|
|
18
|
+
const iconTypes = this.iconTypes.map((iconType)=>iconType.name);
|
|
19
|
+
runInAction(()=>{
|
|
20
|
+
this.icons = icons.filter((icon)=>iconTypes.includes(icon.type));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getIcons() {
|
|
24
|
+
return cloneDeep(this.icons);
|
|
25
|
+
}
|
|
26
|
+
addIcon(icon) {
|
|
27
|
+
this.icons = [
|
|
28
|
+
...this.icons,
|
|
29
|
+
icon
|
|
30
|
+
];
|
|
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);
|
|
15
44
|
}
|
|
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
45
|
}
|
|
46
|
+
export { IconRepository };
|
|
46
47
|
|
|
47
48
|
//# sourceMappingURL=IconRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"components/IconPicker/IconRepository.js","sources":["../../../src/components/IconPicker/IconRepository.ts"],"sourcesContent":["import cloneDeep from \"lodash/cloneDeep.js\";\nimport { makeAutoObservable, runInAction } from \"mobx\";\n\nimport { Loading } from \"./Loading.js\";\nimport type { IconPackProviderInterface as IconPackProvider, IconType } from \"./config/index.js\";\nimport type { Icon } from \"./types.js\";\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"],"names":["IconRepository","iconTypes","iconPackProviders","Loading","makeAutoObservable","icons","Promise","provider","iconType","runInAction","icon","cloneDeep","action","loadingLabel","successMessage","failureMessage"],"mappings":";;;AAOO,MAAMA;IAMT,YAAYC,SAAqB,EAAEC,iBAAqC,CAAE;aAFlE,KAAK,GAAW,EAAE;QAGtB,IAAI,CAAC,SAAS,GAAGD;QACjB,IAAI,CAAC,OAAO,GAAG,IAAIE,QAAQ;QAC3B,IAAI,CAAC,iBAAiB,GAAGD;QACzBE,mBAAmB,IAAI;IAC3B;IAEA,MAAM,YAAY;QACd,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GACpB;QAGJ,MAAMC,QAAQ,MAAM,IAAI,CAAC,cAAc,CAAC;YACpC,MAAMA,QAAQ,MAAMC,QAAQ,GAAG,CAC3B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAACC,CAAAA,WAAYA,SAAS,QAAQ;YAE5D,OAAOF,MAAM,IAAI;QACrB;QAEA,MAAMJ,YAAY,IAAI,CAAC,SAAS,CAAC,GAAG,CAACO,CAAAA,WAAYA,SAAS,IAAI;QAE9DC,YAAY;YAER,IAAI,CAAC,KAAK,GAAGJ,MAAM,MAAM,CAACK,CAAAA,OAAQT,UAAU,QAAQ,CAACS,KAAK,IAAI;QAClE;IACJ;IAEA,WAAW;QACP,OAAOC,UAAU,IAAI,CAAC,KAAK;IAC/B;IAEA,QAAQD,IAAU,EAAE;QAChB,IAAI,CAAC,KAAK,GAAG;eAAI,IAAI,CAAC,KAAK;YAAEA;SAAK;IACtC;IAEA,eAAe;QACX,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,aAAa;QACT,OAAO;YACH,WAAW,IAAI,CAAC,OAAO,CAAC,SAAS;YACjC,cAAc,IAAI,CAAC,OAAO,CAAC,YAAY;YACvC,SAAS,IAAI,CAAC,OAAO,CAAC,QAAQ;QAClC;IACJ;IAEA,MAAc,eACVE,MAAwB,EACxBC,YAAqB,EACrBC,cAAuB,EACvBC,cAAuB,EACzB;QACE,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAC5CH,QACAC,cACAC,gBACAC;IAER;AACJ"}
|