@webiny/app-admin 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/add-18px.svg +1 -1
- package/assets/icons/arrow_drop_down-24px.svg +1 -1
- package/assets/icons/file_download.svg +1 -0
- package/assets/icons/file_upload.svg +1 -0
- package/assets/icons/filter-24px.svg +1 -1
- package/assets/icons/highlight-24px.svg +1 -1
- package/assets/icons/info.svg +1 -1
- package/assets/icons/insert_drive_file-24px.svg +1 -1
- package/assets/icons/insert_photo-24px.svg +1 -1
- package/assets/icons/label-24px.svg +1 -1
- package/assets/icons/round-account_circle-24px.svg +1 -1
- package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
- package/assets/icons/round-help-24px.svg +1 -1
- package/assets/icons/round-settings-24px.svg +1 -1
- package/assets/icons/slack-logo.svg +1 -1
- package/assets/icons/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.d.ts +7 -0
- package/base/Admin.js +28 -0
- package/base/Admin.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
- package/base/Base/Menus/SupportMenuItems.js +20 -0
- package/base/Base/Menus/SupportMenuItems.js.map +1 -0
- package/base/Base/Menus/WebinyVersion.d.ts +2 -0
- package/base/Base/Menus/WebinyVersion.js +24 -0
- package/base/Base/Menus/WebinyVersion.js.map +1 -0
- package/base/Base/Menus.d.ts +2 -0
- package/base/Base/Menus.js +129 -0
- package/base/Base/Menus.js.map +1 -0
- package/base/Base/Routes.d.ts +2 -0
- package/base/Base/Routes.js +24 -0
- package/base/Base/Routes.js.map +1 -0
- package/base/Base/Tenant/wby-logo.svg +3 -0
- package/base/Base/Tenant.d.ts +2 -0
- package/base/Base/Tenant.js +19 -0
- package/base/Base/Tenant.js.map +1 -0
- package/base/Base.d.ts +2 -0
- package/base/Base.js +14 -0
- package/base/Base.js.map +1 -0
- package/base/WebinyVersion.d.ts +2 -0
- package/base/WebinyVersion.js +24 -0
- package/base/WebinyVersion.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +8 -0
- package/base/plugins/AddGraphQLQuerySelection.js +18 -0
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -0
- package/base/providers/AdminUiStateProvider.d.ts +1 -0
- package/base/providers/AdminUiStateProvider.js +14 -0
- package/base/providers/AdminUiStateProvider.js.map +1 -0
- package/base/providers/ApolloProvider.d.ts +13 -0
- package/base/providers/ApolloProvider.js +16 -0
- package/base/providers/ApolloProvider.js.map +1 -0
- package/base/providers/TelemetryProvider.d.ts +1 -0
- package/base/providers/TelemetryProvider.js +22 -0
- package/base/providers/TelemetryProvider.js.map +1 -0
- package/base/providers/UiProviders.d.ts +1 -0
- package/base/providers/UiProviders.js +14 -0
- package/base/providers/UiProviders.js.map +1 -0
- package/base/providers/UiStateProvider.d.ts +1 -0
- package/base/providers/UiStateProvider.js +14 -0
- package/base/providers/UiStateProvider.js.map +1 -0
- package/base/providers/ViewCompositionProvider.d.ts +21 -0
- package/base/providers/ViewCompositionProvider.js +47 -0
- package/base/providers/ViewCompositionProvider.js.map +1 -0
- package/base/ui/Brand.d.ts +39 -0
- package/base/ui/Brand.js +8 -0
- package/base/ui/Brand.js.map +1 -0
- package/base/ui/CenteredView.d.ts +24 -0
- package/base/ui/CenteredView.js +15 -0
- package/base/ui/CenteredView.js.map +1 -0
- package/base/ui/Dashboard.d.ts +39 -0
- package/base/ui/Dashboard.js +8 -0
- package/base/ui/Dashboard.js.map +1 -0
- package/base/ui/FileManager.d.ts +86 -0
- package/base/ui/FileManager.js +60 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +45 -0
- package/base/ui/Layout.js +11 -0
- package/base/ui/Layout.js.map +1 -0
- package/base/ui/LocaleSelector.d.ts +39 -0
- package/base/ui/LocaleSelector.js +8 -0
- package/base/ui/LocaleSelector.js.map +1 -0
- package/base/ui/LoginScreen.d.ts +25 -0
- package/base/ui/LoginScreen.js +25 -0
- package/base/ui/LoginScreen.js.map +1 -0
- package/base/ui/Logo.d.ts +39 -0
- package/base/ui/Logo.js +8 -0
- package/base/ui/Logo.js.map +1 -0
- package/base/ui/Navigation.d.ts +40 -0
- package/base/ui/Navigation.js +19 -0
- package/base/ui/Navigation.js.map +1 -0
- package/base/ui/NotFound.d.ts +39 -0
- package/base/ui/NotFound.js +8 -0
- package/base/ui/NotFound.js.map +1 -0
- package/base/ui/Tags.d.ts +10 -0
- package/base/ui/Tags.js +20 -0
- package/base/ui/Tags.js.map +1 -0
- package/base/ui/TenantSelector.d.ts +39 -0
- package/base/ui/TenantSelector.js +8 -0
- package/base/ui/TenantSelector.js.map +1 -0
- package/base/ui/UserMenu/UserMenu.d.ts +39 -0
- package/base/ui/UserMenu/UserMenu.js +8 -0
- package/base/ui/UserMenu/UserMenu.js.map +1 -0
- package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
- package/base/ui/UserMenu/UserMenuHandle.js +8 -0
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
- package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuItem.js +19 -0
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
- package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuLink.js +19 -0
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
- package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
- package/base/ui/UserMenu.d.ts +80 -0
- package/base/ui/UserMenu.js +19 -0
- package/base/ui/UserMenu.js.map +1 -0
- package/components/AdminLayout.d.ts +2 -2
- package/components/AdminLayout.js +12 -35
- package/components/AdminLayout.js.map +1 -0
- package/components/AppInstaller/AppInstaller.d.ts +11 -0
- package/components/AppInstaller/AppInstaller.js +113 -0
- package/components/AppInstaller/AppInstaller.js.map +1 -0
- package/components/AppInstaller/Sidebar.d.ts +8 -6
- package/components/AppInstaller/Sidebar.js +65 -115
- package/components/AppInstaller/Sidebar.js.map +1 -0
- package/components/AppInstaller/index.d.ts +2 -5
- package/components/AppInstaller/index.js +16 -133
- package/components/AppInstaller/index.js.map +1 -0
- package/components/AppInstaller/styled.d.ts +16 -4
- package/components/AppInstaller/styled.js +61 -59
- package/components/AppInstaller/styled.js.map +1 -0
- package/components/AppInstaller/useInstaller.d.ts +23 -9
- package/components/AppInstaller/useInstaller.js +105 -215
- package/components/AppInstaller/useInstaller.js.map +1 -0
- package/components/BulkActions/Worker.d.ts +83 -0
- package/components/BulkActions/Worker.js +126 -0
- package/components/BulkActions/Worker.js.map +1 -0
- package/components/BulkActions/index.d.ts +2 -0
- package/components/BulkActions/index.js +4 -0
- package/components/BulkActions/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +5 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +23 -0
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -0
- package/components/BulkActions/useDialogWithReport/index.js +3 -0
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +19 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +51 -0
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -0
- package/components/Buttons/Buttons.d.ts +24 -0
- package/components/Buttons/Buttons.js +77 -0
- package/components/Buttons/Buttons.js.map +1 -0
- package/components/Buttons/Buttons.styles.d.ts +5 -0
- package/components/Buttons/Buttons.styles.js +18 -0
- package/components/Buttons/Buttons.styles.js.map +1 -0
- package/components/Buttons/index.d.ts +2 -0
- package/components/Buttons/index.js +4 -0
- package/components/Buttons/index.js.map +1 -0
- package/components/Buttons/useButtons.d.ts +14 -0
- package/components/Buttons/useButtons.js +24 -0
- package/components/Buttons/useButtons.js.map +1 -0
- package/components/Dialogs/CustomDialog.d.ts +17 -0
- package/components/Dialogs/CustomDialog.js +48 -0
- package/components/Dialogs/CustomDialog.js.map +1 -0
- package/components/Dialogs/Dialog.d.ts +21 -0
- package/components/Dialogs/Dialog.js +62 -0
- package/components/Dialogs/Dialog.js.map +1 -0
- package/components/Dialogs/DialogsContext.d.ts +43 -0
- package/components/Dialogs/DialogsContext.js +141 -0
- package/components/Dialogs/DialogsContext.js.map +1 -0
- package/components/Dialogs/useDialogs.d.ts +3 -0
- package/components/Dialogs/useDialogs.js +12 -0
- package/components/Dialogs/useDialogs.js.map +1 -0
- package/components/EmptyView.d.ts +6 -5
- package/components/EmptyView.js +29 -50
- package/components/EmptyView.js.map +1 -0
- package/components/Filters/Filters.d.ts +16 -0
- package/components/Filters/Filters.js +21 -0
- package/components/Filters/Filters.js.map +1 -0
- package/components/Filters/FiltersToggle.d.ts +7 -0
- package/components/Filters/FiltersToggle.js +26 -0
- package/components/Filters/FiltersToggle.js.map +1 -0
- package/components/Filters/index.d.ts +2 -0
- package/components/Filters/index.js +4 -0
- package/components/Filters/index.js.map +1 -0
- package/components/FloatingActionButton.d.ts +5 -2
- package/components/FloatingActionButton.js +5 -4
- package/components/FloatingActionButton.js.map +1 -0
- package/components/FloatingPanel.d.ts +13 -0
- package/components/FloatingPanel.js +96 -0
- package/components/FloatingPanel.js.map +1 -0
- package/components/IconPicker/IconPicker.d.ts +13 -0
- package/components/IconPicker/IconPicker.js +39 -0
- package/components/IconPicker/IconPicker.js.map +1 -0
- package/components/IconPicker/IconPickerComponent.d.ts +17 -0
- package/components/IconPicker/IconPickerComponent.js +81 -0
- package/components/IconPicker/IconPickerComponent.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.d.ts +53 -0
- package/components/IconPicker/IconPickerPresenter.js +77 -0
- package/components/IconPicker/IconPickerPresenter.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.test.d.ts +1 -0
- package/components/IconPicker/IconPickerPresenter.test.js +109 -0
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -0
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +9 -0
- package/components/IconPicker/IconPickerPresenterProvider.js +19 -0
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -0
- package/components/IconPicker/IconPickerTab.d.ts +33 -0
- package/components/IconPicker/IconPickerTab.js +159 -0
- package/components/IconPicker/IconPickerTab.js.map +1 -0
- package/components/IconPicker/IconRenderer.d.ts +34 -0
- package/components/IconPicker/IconRenderer.js +27 -0
- package/components/IconPicker/IconRenderer.js.map +1 -0
- package/components/IconPicker/IconRepository.d.ts +19 -0
- package/components/IconPicker/IconRepository.js +47 -0
- package/components/IconPicker/IconRepository.js.map +1 -0
- package/components/IconPicker/IconRepository.test.d.ts +1 -0
- package/components/IconPicker/IconRepository.test.js +66 -0
- package/components/IconPicker/IconRepository.test.js.map +1 -0
- package/components/IconPicker/IconRepositoryFactory.d.ts +9 -0
- package/components/IconPicker/IconRepositoryFactory.js +17 -0
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -0
- package/components/IconPicker/Loading.d.ts +14 -0
- package/components/IconPicker/Loading.js +50 -0
- package/components/IconPicker/Loading.js.map +1 -0
- package/components/IconPicker/components/IconPickerCell.d.ts +12 -0
- package/components/IconPicker/components/IconPickerCell.js +27 -0
- package/components/IconPicker/components/IconPickerCell.js.map +1 -0
- package/components/IconPicker/components/IconPickerContent.d.ts +11 -0
- package/components/IconPicker/components/IconPickerContent.js +41 -0
- package/components/IconPicker/components/IconPickerContent.js.map +1 -0
- package/components/IconPicker/components/IconPickerRow.d.ts +4 -0
- package/components/IconPicker/components/IconPickerRow.js +14 -0
- package/components/IconPicker/components/IconPickerRow.js.map +1 -0
- package/components/IconPicker/components/IconPickerTrigger.d.ts +13 -0
- package/components/IconPicker/components/IconPickerTrigger.js +52 -0
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -0
- package/components/IconPicker/components/index.d.ts +4 -0
- package/components/IconPicker/components/index.js +6 -0
- package/components/IconPicker/components/index.js.map +1 -0
- package/components/IconPicker/config/Emojis.d.ts +2 -0
- package/components/IconPicker/config/Emojis.js +24 -0
- package/components/IconPicker/config/Emojis.js.map +1 -0
- package/components/IconPicker/config/FontAwesomeIcons.d.ts +2 -0
- package/components/IconPicker/config/FontAwesomeIcons.js +61 -0
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -0
- package/components/IconPicker/config/IconPackProvider.d.ts +7 -0
- package/components/IconPicker/config/IconPackProvider.js +23 -0
- package/components/IconPicker/config/IconPackProvider.js.map +1 -0
- package/components/IconPicker/config/IconType.d.ts +32 -0
- package/components/IconPicker/config/IconType.js +89 -0
- package/components/IconPicker/config/IconType.js.map +1 -0
- package/components/IconPicker/config/index.d.ts +31 -0
- package/components/IconPicker/config/index.js +45 -0
- package/components/IconPicker/config/index.js.map +1 -0
- package/components/IconPicker/defaultIcon.d.ts +6 -0
- package/components/IconPicker/defaultIcon.js +8 -0
- package/components/IconPicker/defaultIcon.js.map +1 -0
- package/components/IconPicker/index.d.ts +7 -0
- package/components/IconPicker/index.js +8 -0
- package/components/IconPicker/index.js.map +1 -0
- package/components/IconPicker/plugins/customPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/customPlugin.js +132 -0
- package/components/IconPicker/plugins/customPlugin.js.map +1 -0
- package/components/IconPicker/plugins/emojisPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/emojisPlugin.js +127 -0
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -0
- package/components/IconPicker/plugins/graphql.d.ts +20 -0
- package/components/IconPicker/plugins/graphql.js +27 -0
- package/components/IconPicker/plugins/graphql.js.map +1 -0
- package/components/IconPicker/plugins/iconsPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/iconsPlugin.js +115 -0
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -0
- package/components/IconPicker/types.d.ts +22 -0
- package/components/IconPicker/types.js +10 -0
- package/components/IconPicker/types.js.map +1 -0
- package/components/LexicalEditor/LexicalEditor.d.ts +8 -0
- package/components/LexicalEditor/LexicalEditor.js +29 -0
- package/components/LexicalEditor/LexicalEditor.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +1 -0
- package/components/LexicalEditor/index.js +3 -0
- package/components/LexicalEditor/index.js.map +1 -0
- package/components/MultiImageUpload.d.ts +13 -4
- package/components/MultiImageUpload.js +13 -17
- package/components/MultiImageUpload.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenu.js +23 -0
- package/components/OptionsMenu/OptionsMenu.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuItem.d.ts +10 -0
- package/components/OptionsMenu/OptionsMenuItem.js +17 -0
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -0
- package/components/OptionsMenu/OptionsMenuLink.d.ts +12 -0
- package/components/OptionsMenu/OptionsMenuLink.js +17 -0
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -0
- package/components/OptionsMenu/index.d.ts +4 -0
- package/components/OptionsMenu/index.js +6 -0
- package/components/OptionsMenu/index.js.map +1 -0
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +13 -0
- package/components/OptionsMenu/useOptionsMenuItem.js +23 -0
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -0
- package/components/OverlayLayout/OverlayLayout.d.ts +7 -20
- package/components/OverlayLayout/OverlayLayout.js +41 -153
- package/components/OverlayLayout/OverlayLayout.js.map +1 -0
- package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
- package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
- package/components/OverlayLayout/components/OverlayContent.js +21 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
- package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
- package/components/OverlayLayout/components/OverlayHeader.js +44 -0
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
- package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
- package/components/OverlayLayout/components/OverlayRoot.js +19 -0
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
- package/components/OverlayLayout/components/index.d.ts +4 -0
- package/components/OverlayLayout/components/index.js +6 -0
- package/components/OverlayLayout/components/index.js.map +1 -0
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +3 -1
- package/components/OverlayLayout/index.js.map +1 -0
- package/components/Permissions/CannotUseAaclAlert.d.ts +2 -0
- package/components/Permissions/CannotUseAaclAlert.js +14 -0
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -0
- package/components/Permissions/Permissions.d.ts +7 -5
- package/components/Permissions/Permissions.js +27 -22
- package/components/Permissions/Permissions.js.map +1 -0
- package/components/Permissions/PermissionsGroup.d.ts +6 -0
- package/components/Permissions/PermissionsGroup.js +18 -0
- package/components/Permissions/PermissionsGroup.js.map +1 -0
- package/components/Permissions/StyledComponents.d.ts +7 -6
- package/components/Permissions/StyledComponents.js +13 -17
- package/components/Permissions/StyledComponents.js.map +1 -0
- package/components/Permissions/index.d.ts +2 -0
- package/components/Permissions/index.js +5 -1
- package/components/Permissions/index.js.map +1 -0
- package/components/ResizablePanels/index.d.ts +1 -0
- package/components/ResizablePanels/index.js +3 -0
- package/components/ResizablePanels/index.js.map +1 -0
- package/components/RichTextEditor/RichTextEditor.d.ts +3 -3
- package/components/RichTextEditor/RichTextEditor.js +14 -13
- package/components/RichTextEditor/RichTextEditor.js.map +1 -0
- package/components/RichTextEditor/index.js +3 -1
- package/components/RichTextEditor/index.js.map +1 -0
- package/components/RichTextEditor/styles.scss +39 -7
- package/components/RichTextEditor/tools/header/index.d.ts +35 -35
- package/components/RichTextEditor/tools/header/index.js +454 -570
- package/components/RichTextEditor/tools/header/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/index.d.ts +38 -13
- package/components/RichTextEditor/tools/image/index.js +145 -200
- package/components/RichTextEditor/tools/image/index.js.map +1 -0
- package/components/RichTextEditor/tools/image/svgs.js +6 -4
- package/components/RichTextEditor/tools/image/svgs.js.map +1 -0
- package/components/RichTextEditor/tools/image/tunes.d.ts +12 -15
- package/components/RichTextEditor/tools/image/tunes.js +74 -105
- package/components/RichTextEditor/tools/image/tunes.js.map +1 -0
- package/components/RichTextEditor/tools/image/types.d.ts +29 -0
- package/components/RichTextEditor/tools/image/types.js +3 -0
- package/components/RichTextEditor/tools/image/types.js.map +1 -0
- package/components/RichTextEditor/tools/image/ui.d.ts +36 -27
- package/components/RichTextEditor/tools/image/ui.js +164 -200
- package/components/RichTextEditor/tools/image/ui.js.map +1 -0
- package/components/RichTextEditor/tools/paragraph/index.d.ts +34 -37
- package/components/RichTextEditor/tools/paragraph/index.js +340 -425
- package/components/RichTextEditor/tools/paragraph/index.js.map +1 -0
- package/components/RichTextEditor/tools/textColor/index.d.ts +31 -28
- package/components/RichTextEditor/tools/textColor/index.js +164 -199
- package/components/RichTextEditor/tools/textColor/index.js.map +1 -0
- package/components/RichTextEditor/tools/utils.d.ts +1 -1
- package/components/RichTextEditor/tools/utils.js +8 -8
- package/components/RichTextEditor/tools/utils.js.map +1 -0
- package/components/Routes.d.ts +6 -0
- package/components/Routes.js +34 -0
- package/components/Routes.js.map +1 -0
- package/components/SearchUI.d.ts +6 -4
- package/components/SearchUI.js +23 -53
- package/components/SearchUI.js.map +1 -0
- package/components/SimpleForm/SimpleForm.d.ts +23 -12
- package/components/SimpleForm/SimpleForm.js +74 -68
- package/components/SimpleForm/SimpleForm.js.map +1 -0
- package/components/SimpleForm/index.js +3 -1
- package/components/SimpleForm/index.js.map +1 -0
- package/components/SimpleUI/InputField.d.ts +6 -3
- package/components/SimpleUI/InputField.js +34 -36
- package/components/SimpleUI/InputField.js.map +1 -0
- package/components/SingleImageUpload.d.ts +63 -15
- package/components/SingleImageUpload.js +61 -101
- package/components/SingleImageUpload.js.map +1 -0
- package/components/SplitView/SplitView.d.ts +11 -8
- package/components/SplitView/SplitView.js +51 -70
- package/components/SplitView/SplitView.js.map +1 -0
- package/components/SplitView/index.js +3 -1
- package/components/SplitView/index.js.map +1 -0
- package/components/StateInspector.d.ts +8 -0
- package/components/StateInspector.js +36 -0
- package/components/StateInspector.js.map +1 -0
- package/components/Wcp.d.ts +13 -0
- package/components/Wcp.js +27 -0
- package/components/Wcp.js.map +1 -0
- package/components/index.d.ts +3 -1
- package/components/index.js +5 -1
- package/components/index.js.map +1 -0
- package/config/AdminConfig/Menu/MenuGroup.d.ts +62 -0
- package/config/AdminConfig/Menu/MenuGroup.js +14 -0
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -0
- package/config/AdminConfig/Menu/MenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuItem.js +14 -0
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/MenuLink.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuLink.js +18 -0
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +24 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu.d.ts +72 -0
- package/config/AdminConfig/Menu/SupportMenu.js +49 -0
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +41 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/UserMenu/types.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/types.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu.d.ts +129 -0
- package/config/AdminConfig/Menu/UserMenu.js +61 -0
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -0
- package/config/AdminConfig/Menu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/types.js +3 -0
- package/config/AdminConfig/Menu/types.js.map +1 -0
- package/config/AdminConfig/Menu.d.ts +350 -0
- package/config/AdminConfig/Menu.js +75 -0
- package/config/AdminConfig/Menu.js.map +1 -0
- package/config/AdminConfig/Route.d.ts +3 -0
- package/config/AdminConfig/Route.js +8 -0
- package/config/AdminConfig/Route.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantLogo.js +16 -0
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantName.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantName.js +16 -0
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
- package/config/AdminConfig/Tenant.d.ts +66 -0
- package/config/AdminConfig/Tenant.js +23 -0
- package/config/AdminConfig/Tenant.js.map +1 -0
- package/config/AdminConfig/Theme/assignColor.d.ts +2 -0
- package/config/AdminConfig/Theme/assignColor.js +22 -0
- package/config/AdminConfig/Theme/assignColor.js.map +1 -0
- package/config/AdminConfig/Theme/consts.d.ts +2 -0
- package/config/AdminConfig/Theme/consts.js +4 -0
- package/config/AdminConfig/Theme/consts.js.map +1 -0
- package/config/AdminConfig/Theme/types.d.ts +3 -0
- package/config/AdminConfig/Theme/types.js +3 -0
- package/config/AdminConfig/Theme/types.js.map +1 -0
- package/config/AdminConfig/Theme.d.ts +16 -0
- package/config/AdminConfig/Theme.js +22 -0
- package/config/AdminConfig/Theme.js.map +1 -0
- package/config/AdminConfig.d.ts +434 -0
- package/config/AdminConfig.js +47 -0
- package/config/AdminConfig.js.map +1 -0
- package/config/createAdminConfig.d.ts +57 -0
- package/config/createAdminConfig.js +94 -0
- package/config/createAdminConfig.js.map +1 -0
- package/hooks/index.d.ts +10 -0
- package/hooks/index.js +12 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useConfirmationDialog.d.ts +10 -5
- package/hooks/useConfirmationDialog.js +27 -29
- package/hooks/useConfirmationDialog.js.map +1 -0
- package/hooks/useDialog.d.ts +27 -3
- package/hooks/useDialog.js +16 -15
- package/hooks/useDialog.js.map +1 -0
- package/hooks/useIsMounted.d.ts +3 -0
- package/hooks/useIsMounted.js +15 -0
- package/hooks/useIsMounted.js.map +1 -0
- package/hooks/useKeyHandler.d.ts +8 -0
- package/hooks/useKeyHandler.js +64 -0
- package/hooks/useKeyHandler.js.map +1 -0
- package/hooks/useModKey.d.ts +1 -0
- package/hooks/useModKey.js +30 -0
- package/hooks/useModKey.js.map +1 -0
- package/hooks/useShiftKey.d.ts +1 -0
- package/hooks/useShiftKey.js +33 -0
- package/hooks/useShiftKey.js.map +1 -0
- package/hooks/useSnackbar.d.ts +7 -3
- package/hooks/useSnackbar.js +26 -19
- package/hooks/useSnackbar.js.map +1 -0
- package/hooks/useStateIfMounted.d.ts +2 -0
- package/hooks/useStateIfMounted.js +16 -0
- package/hooks/useStateIfMounted.js.map +1 -0
- package/hooks/useStateWithCallback.d.ts +5 -0
- package/hooks/useStateWithCallback.js +18 -0
- package/hooks/useStateWithCallback.js.map +1 -0
- package/index.d.ts +47 -0
- package/index.js +53 -0
- package/index.js.map +1 -0
- package/package.json +70 -60
- package/plugins/MenuPlugin.d.ts +23 -6
- package/plugins/MenuPlugin.js +15 -37
- package/plugins/MenuPlugin.js.map +1 -0
- package/plugins/PermissionRendererPlugin.d.ts +4 -4
- package/plugins/PermissionRendererPlugin.js +15 -37
- package/plugins/PermissionRendererPlugin.js.map +1 -0
- package/plugins/uiLayoutRenderer/index.d.ts +1 -2
- package/plugins/uiLayoutRenderer/index.js +39 -49
- package/plugins/uiLayoutRenderer/index.js.map +1 -0
- package/styles.scss +7 -2
- package/types.d.ts +67 -85
- package/types.js +7 -1
- package/types.js.map +1 -0
- package/ui/UIElement.d.ts +1 -1
- package/ui/UIElement.js +3 -1
- package/ui/UIElement.js.map +1 -0
- package/ui/UILayout.js +3 -1
- package/ui/UILayout.js.map +1 -0
- package/ui/UIRenderer.js +3 -1
- package/ui/UIRenderer.js.map +1 -0
- package/ui/UIView.d.ts +1 -1
- package/ui/UIView.js +3 -1
- package/ui/UIView.js.map +1 -0
- package/ui/elements/AccordionElement.d.ts +6 -5
- package/ui/elements/AccordionElement.js +41 -79
- package/ui/elements/AccordionElement.js.map +1 -0
- package/ui/elements/ButtonElement.d.ts +7 -6
- package/ui/elements/ButtonElement.js +41 -67
- package/ui/elements/ButtonElement.js.map +1 -0
- package/ui/elements/ButtonGroupElement.d.ts +2 -1
- package/ui/elements/ButtonGroupElement.js +22 -41
- package/ui/elements/ButtonGroupElement.js.map +1 -0
- package/ui/elements/GenericElement.js +3 -1
- package/ui/elements/GenericElement.js.map +1 -0
- package/ui/elements/LabelElement.d.ts +3 -2
- package/ui/elements/LabelElement.js +15 -39
- package/ui/elements/LabelElement.js.map +1 -0
- package/ui/elements/NavigationMenuElement.d.ts +6 -4
- package/ui/elements/NavigationMenuElement.js +70 -140
- package/ui/elements/NavigationMenuElement.js.map +1 -0
- package/ui/elements/PanelElement.js +2 -15
- package/ui/elements/PanelElement.js.map +1 -0
- package/ui/elements/PlaceholderElement.d.ts +2 -1
- package/ui/elements/PlaceholderElement.js +8 -27
- package/ui/elements/PlaceholderElement.js.map +1 -0
- package/ui/elements/SmallButtonElement.d.ts +5 -3
- package/ui/elements/SmallButtonElement.js +15 -38
- package/ui/elements/SmallButtonElement.js.map +1 -0
- package/ui/elements/TypographyElement.d.ts +4 -3
- package/ui/elements/TypographyElement.js +18 -44
- package/ui/elements/TypographyElement.js.map +1 -0
- package/ui/elements/ViewElement.js +3 -1
- package/ui/elements/ViewElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +3 -2
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +20 -38
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +1 -0
- package/ui/elements/form/DynamicFieldsetElement.d.ts +22 -20
- package/ui/elements/form/DynamicFieldsetElement.js +86 -116
- package/ui/elements/form/DynamicFieldsetElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +6 -20
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +1 -0
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +34 -59
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +4 -3
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +65 -87
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +1 -0
- package/ui/elements/form/FileManagerElement/styled.d.ts +22 -13
- package/ui/elements/form/FileManagerElement/styled.js +86 -84
- package/ui/elements/form/FileManagerElement/styled.js.map +1 -0
- package/ui/elements/form/FileManagerElement.d.ts +9 -8
- package/ui/elements/form/FileManagerElement.js +41 -86
- package/ui/elements/form/FileManagerElement.js.map +1 -0
- package/ui/elements/form/FormElement.d.ts +7 -6
- package/ui/elements/form/FormElement.js +15 -40
- package/ui/elements/form/FormElement.js.map +1 -0
- package/ui/elements/form/FormFieldElement.d.ts +14 -12
- package/ui/elements/form/FormFieldElement.js +99 -169
- package/ui/elements/form/FormFieldElement.js.map +1 -0
- package/ui/elements/form/HiddenElement.d.ts +2 -1
- package/ui/elements/form/HiddenElement.js +20 -44
- package/ui/elements/form/HiddenElement.js.map +1 -0
- package/ui/elements/form/InputElement.d.ts +3 -1
- package/ui/elements/form/InputElement.js +26 -49
- package/ui/elements/form/InputElement.js.map +1 -0
- package/ui/elements/form/PasswordElement.d.ts +1 -1
- package/ui/elements/form/PasswordElement.js +24 -45
- package/ui/elements/form/PasswordElement.js.map +1 -0
- package/ui/elements/form/SelectElement.d.ts +3 -2
- package/ui/elements/form/SelectElement.js +36 -65
- package/ui/elements/form/SelectElement.js.map +1 -0
- package/ui/elements/form/TextareaElement.d.ts +3 -2
- package/ui/elements/form/TextareaElement.js +28 -50
- package/ui/elements/form/TextareaElement.js.map +1 -0
- package/ui/views/AdminView/ContentElement.js +28 -53
- package/ui/views/AdminView/ContentElement.js.map +1 -0
- package/ui/views/AdminView/HeaderElement.js +49 -92
- package/ui/views/AdminView/HeaderElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +1 -0
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +2 -1
- package/ui/views/AdminView/HeaderSectionRightElement.js +14 -35
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +1 -0
- package/ui/views/AdminView/components/Dialog.d.ts +1 -1
- package/ui/views/AdminView/components/Dialog.js +34 -33
- package/ui/views/AdminView/components/Dialog.js.map +1 -0
- package/ui/views/AdminView/components/Hamburger.d.ts +2 -2
- package/ui/views/AdminView/components/Hamburger.js +7 -9
- package/ui/views/AdminView/components/Hamburger.js.map +1 -0
- package/ui/views/FormView/FormContainerElement.d.ts +4 -3
- package/ui/views/FormView/FormContainerElement.js +14 -46
- package/ui/views/FormView/FormContainerElement.js.map +1 -0
- package/ui/views/FormView/FormContentElement.d.ts +3 -0
- package/ui/views/FormView/FormContentElement.js +7 -14
- package/ui/views/FormView/FormContentElement.js.map +1 -0
- package/ui/views/FormView/FormFooterElement.d.ts +4 -3
- package/ui/views/FormView/FormFooterElement.js +9 -44
- package/ui/views/FormView/FormFooterElement.js.map +1 -0
- package/ui/views/FormView/FormHeaderElement.d.ts +5 -4
- package/ui/views/FormView/FormHeaderElement.js +25 -76
- package/ui/views/FormView/FormHeaderElement.js.map +1 -0
- package/ui/views/FormView.d.ts +4 -4
- package/ui/views/FormView.js +99 -138
- package/ui/views/FormView.js.map +1 -0
- package/ui/views/OverlayView/ContentElement.d.ts +2 -1
- package/ui/views/OverlayView/ContentElement.js +22 -35
- package/ui/views/OverlayView/ContentElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderElement.d.ts +6 -5
- package/ui/views/OverlayView/HeaderElement.js +58 -101
- package/ui/views/OverlayView/HeaderElement.js.map +1 -0
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +5 -3
- package/ui/views/OverlayView/HeaderTitleElement.js +18 -47
- package/ui/views/OverlayView/HeaderTitleElement.js.map +1 -0
- package/ui/views/OverlayView/useOverlayView.d.ts +4 -5
- package/ui/views/OverlayView/useOverlayView.js +12 -16
- package/ui/views/OverlayView/useOverlayView.js.map +1 -0
- package/ui/views/OverlayView.d.ts +4 -5
- package/ui/views/OverlayView.js +76 -143
- package/ui/views/OverlayView.js.map +1 -0
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +3 -2
- package/ui/views/SplitView/SplitViewPanelElement.js +25 -65
- package/ui/views/SplitView/SplitViewPanelElement.js.map +1 -0
- package/ui/views/SplitView.d.ts +4 -4
- package/ui/views/SplitView.js +51 -107
- package/ui/views/SplitView.js.map +1 -0
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -35
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -5
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -47
- package/components/FileManager/BottomInfoBar.d.ts +0 -3
- package/components/FileManager/BottomInfoBar.js +0 -42
- package/components/FileManager/DropFilesHere.d.ts +0 -8
- package/components/FileManager/DropFilesHere.js +0 -58
- package/components/FileManager/File.d.ts +0 -18
- package/components/FileManager/File.js +0 -129
- package/components/FileManager/FileDetails/Name.d.ts +0 -6
- package/components/FileManager/FileDetails/Name.js +0 -113
- package/components/FileManager/FileDetails/Tags.d.ts +0 -6
- package/components/FileManager/FileDetails/Tags.js +0 -241
- package/components/FileManager/FileDetails.d.ts +0 -23
- package/components/FileManager/FileDetails.js +0 -392
- package/components/FileManager/FileManagerContext.d.ts +0 -23
- package/components/FileManager/FileManagerContext.js +0 -174
- package/components/FileManager/FileManagerView.d.ts +0 -23
- package/components/FileManager/FileManagerView.js +0 -632
- package/components/FileManager/LeftSidebar.d.ts +0 -8
- package/components/FileManager/LeftSidebar.js +0 -95
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -70
- package/components/FileManager/NoResults.d.ts +0 -2
- package/components/FileManager/NoResults.js +0 -13
- package/components/FileManager/getFileTypePlugin.d.ts +0 -1
- package/components/FileManager/getFileTypePlugin.js +0 -27
- package/components/FileManager/getFileUploader.d.ts +0 -2
- package/components/FileManager/getFileUploader.js +0 -10
- package/components/FileManager/graphql.d.ts +0 -6
- package/components/FileManager/graphql.js +0 -17
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -2
- package/components/FileManager/outputFileSelectionError.js +0 -39
- package/components/FileManager.d.ts +0 -18
- package/components/FileManager.js +0 -133
- package/components/OverlayLayout/icons/close.svg +0 -13
- package/components/OverlayLayout/icons/navigate_before.svg +0 -16
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -46
- package/plugins/fileManager/fileDefault.d.ts +0 -3
- package/plugins/fileManager/fileDefault.js +0 -20
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -3
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -62
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -9
- package/plugins/fileManager/fileImage/EditAction.js +0 -143
- package/plugins/fileManager/fileImage/index.d.ts +0 -3
- package/plugins/fileManager/fileImage/index.js +0 -29
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -3
- package/plugins/globalSearch/SearchBar.d.ts +0 -3
- package/plugins/globalSearch/SearchBar.js +0 -241
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -5
- package/plugins/globalSearch/SearchBarDropdown.js +0 -82
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -8
- package/plugins/globalSearch/index.js +0 -30
- package/plugins/globalSearch/styled.d.ts +0 -9
- package/plugins/globalSearch/styled.js +0 -115
- package/plugins/index.d.ts +0 -6
- package/plugins/index.js +0 -8
- package/plugins/logo/Logo.d.ts +0 -22
- package/plugins/logo/Logo.js +0 -108
- package/plugins/logo/index.d.ts +0 -5
- package/plugins/logo/index.js +0 -32
- package/plugins/menu/documentation.d.ts +0 -4
- package/plugins/menu/documentation.js +0 -16
- package/plugins/menu/fileManager.d.ts +0 -4
- package/plugins/menu/fileManager.js +0 -64
- package/plugins/menu/index.d.ts +0 -6
- package/plugins/menu/index.js +0 -24
- package/plugins/menu/renderers/MenuGroupRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuGroupRenderer.js +0 -126
- package/plugins/menu/renderers/MenuLinkRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuLinkRenderer.js +0 -52
- package/plugins/menu/renderers/MenuSectionItemRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionItemRenderer.js +0 -77
- package/plugins/menu/renderers/MenuSectionRenderer.d.ts +0 -7
- package/plugins/menu/renderers/MenuSectionRenderer.js +0 -51
- package/plugins/menu/slack.d.ts +0 -4
- package/plugins/menu/slack.js +0 -16
- package/plugins/menu/source.d.ts +0 -4
- package/plugins/menu/source.js +0 -16
- package/plugins/userMenu/UserMenuElement.d.ts +0 -7
- package/plugins/userMenu/UserMenuElement.js +0 -43
- package/plugins/userMenu/UserMenuRenderer.d.ts +0 -6
- package/plugins/userMenu/UserMenuRenderer.js +0 -47
- package/plugins/userMenu/index.d.ts +0 -4
- package/plugins/userMenu/index.js +0 -16
- package/styles/material-theme-assignments.scss +0 -333
- package/styles/material.scss +0 -74
- package/styles/theme.scss +0 -43
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -28
- package/ui/views/AdminView.d.ts +0 -12
- package/ui/views/AdminView.js +0 -90
- package/ui/views/NavigationView/ContentElement.d.ts +0 -10
- package/ui/views/NavigationView/ContentElement.js +0 -86
- package/ui/views/NavigationView/FooterElement.d.ts +0 -13
- package/ui/views/NavigationView/FooterElement.js +0 -57
- package/ui/views/NavigationView/HeaderElement.d.ts +0 -16
- package/ui/views/NavigationView/HeaderElement.js +0 -66
- package/ui/views/NavigationView/NavigationViewRenderer.d.ts +0 -6
- package/ui/views/NavigationView/NavigationViewRenderer.js +0 -38
- package/ui/views/NavigationView/Styled.d.ts +0 -7
- package/ui/views/NavigationView/Styled.js +0 -47
- package/ui/views/NavigationView/legacyMenu.d.ts +0 -22
- package/ui/views/NavigationView/legacyMenu.js +0 -1
- package/ui/views/NavigationView/useNavigation.d.ts +0 -6
- package/ui/views/NavigationView/useNavigation.js +0 -22
- package/ui/views/NavigationView.d.ts +0 -26
- package/ui/views/NavigationView.js +0 -204
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CallbackParams<T> {
|
|
3
|
+
item: T;
|
|
4
|
+
allItems: T[];
|
|
5
|
+
report: Report;
|
|
6
|
+
}
|
|
7
|
+
export interface Result {
|
|
8
|
+
title: string;
|
|
9
|
+
status: "success" | "failure";
|
|
10
|
+
message?: string | React.ReactElement;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Class for collecting processing results
|
|
14
|
+
*/
|
|
15
|
+
export declare class Report {
|
|
16
|
+
private _results;
|
|
17
|
+
/**
|
|
18
|
+
* Record a successful result in the report
|
|
19
|
+
* @param {Omit<Result, "status">} result - The successful result to be recorded
|
|
20
|
+
*/
|
|
21
|
+
success(result: Omit<Result, "status">): void;
|
|
22
|
+
/**
|
|
23
|
+
* Record an error result in the report.
|
|
24
|
+
* @param {Omit<Result, "status">} result - The error result to be recorded.
|
|
25
|
+
*/
|
|
26
|
+
error(result: Omit<Result, "status">): void;
|
|
27
|
+
/**
|
|
28
|
+
* Get the array of recorded results.
|
|
29
|
+
* @returns {Result[]} - An array of recorded results.
|
|
30
|
+
*/
|
|
31
|
+
get results(): Result[];
|
|
32
|
+
/**
|
|
33
|
+
* Internal method to add a result to the report.
|
|
34
|
+
* @private
|
|
35
|
+
* @param {Result} result - The result to be added to the report.
|
|
36
|
+
*/
|
|
37
|
+
private addResult;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A generic worker class for processing items.
|
|
41
|
+
* @template T - The type of items being processed.
|
|
42
|
+
*/
|
|
43
|
+
export declare class Worker<T> {
|
|
44
|
+
private _items;
|
|
45
|
+
private _report;
|
|
46
|
+
constructor();
|
|
47
|
+
/**
|
|
48
|
+
* Process the items using the provided callback function.
|
|
49
|
+
* @param callback - The callback function to process the items.
|
|
50
|
+
*/
|
|
51
|
+
process(callback: (items: T[]) => void): void;
|
|
52
|
+
/**
|
|
53
|
+
* Process the items in series with the given chunk size.
|
|
54
|
+
* @param callback - The callback function to process each item.
|
|
55
|
+
* @param {number} [chunkSize=10] - The size of each chunk for processing in series.
|
|
56
|
+
* @returns {Promise<void>}
|
|
57
|
+
*/
|
|
58
|
+
processInSeries(callback: ({ item, allItems, report }: CallbackParams<T>) => Promise<void>, chunkSize?: number): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the array of results collected by the worker.
|
|
61
|
+
* @returns {Result[]} - An array of collected results.
|
|
62
|
+
*/
|
|
63
|
+
get results(): Result[];
|
|
64
|
+
/**
|
|
65
|
+
* Get the current items in the worker.
|
|
66
|
+
* @returns {T[]} - An array of items in the worker.
|
|
67
|
+
*/
|
|
68
|
+
get items(): T[];
|
|
69
|
+
/**
|
|
70
|
+
* Set the items in the worker.
|
|
71
|
+
* @param {T[]} items - The items to be set in the worker.
|
|
72
|
+
*/
|
|
73
|
+
set items(items: T[]);
|
|
74
|
+
resetResults(): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* Internal method to process a chunk of items using the provided callback.
|
|
77
|
+
* @private
|
|
78
|
+
* @param callback - The callback function to process each item.
|
|
79
|
+
* @param {T[]} chunk - The chunk of items to be processed.
|
|
80
|
+
* @returns {Promise<void>}
|
|
81
|
+
*/
|
|
82
|
+
private processChunk;
|
|
83
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import chunk from "lodash/chunk";
|
|
2
|
+
import { makeAutoObservable } from "mobx";
|
|
3
|
+
/**
|
|
4
|
+
* Class for collecting processing results
|
|
5
|
+
*/
|
|
6
|
+
export class Report {
|
|
7
|
+
_results = [];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Record a successful result in the report
|
|
11
|
+
* @param {Omit<Result, "status">} result - The successful result to be recorded
|
|
12
|
+
*/
|
|
13
|
+
success(result) {
|
|
14
|
+
this.addResult({
|
|
15
|
+
...result,
|
|
16
|
+
status: "success"
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Record an error result in the report.
|
|
22
|
+
* @param {Omit<Result, "status">} result - The error result to be recorded.
|
|
23
|
+
*/
|
|
24
|
+
error(result) {
|
|
25
|
+
this.addResult({
|
|
26
|
+
...result,
|
|
27
|
+
status: "failure"
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the array of recorded results.
|
|
33
|
+
* @returns {Result[]} - An array of recorded results.
|
|
34
|
+
*/
|
|
35
|
+
get results() {
|
|
36
|
+
return this._results;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Internal method to add a result to the report.
|
|
41
|
+
* @private
|
|
42
|
+
* @param {Result} result - The result to be added to the report.
|
|
43
|
+
*/
|
|
44
|
+
addResult(result) {
|
|
45
|
+
this._results.push(result);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* A generic worker class for processing items.
|
|
51
|
+
* @template T - The type of items being processed.
|
|
52
|
+
*/
|
|
53
|
+
export class Worker {
|
|
54
|
+
constructor() {
|
|
55
|
+
this._items = [];
|
|
56
|
+
this._report = new Report();
|
|
57
|
+
makeAutoObservable(this);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Process the items using the provided callback function.
|
|
62
|
+
* @param callback - The callback function to process the items.
|
|
63
|
+
*/
|
|
64
|
+
process(callback) {
|
|
65
|
+
callback(this._items);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Process the items in series with the given chunk size.
|
|
70
|
+
* @param callback - The callback function to process each item.
|
|
71
|
+
* @param {number} [chunkSize=10] - The size of each chunk for processing in series.
|
|
72
|
+
* @returns {Promise<void>}
|
|
73
|
+
*/
|
|
74
|
+
async processInSeries(callback, chunkSize = 10) {
|
|
75
|
+
const chunks = chunk(this._items, chunkSize);
|
|
76
|
+
const promises = chunks.map(chunk => this.processChunk(callback, chunk));
|
|
77
|
+
await Promise.all(promises);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get the array of results collected by the worker.
|
|
82
|
+
* @returns {Result[]} - An array of collected results.
|
|
83
|
+
*/
|
|
84
|
+
get results() {
|
|
85
|
+
return this._report.results;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Get the current items in the worker.
|
|
90
|
+
* @returns {T[]} - An array of items in the worker.
|
|
91
|
+
*/
|
|
92
|
+
get items() {
|
|
93
|
+
return this._items;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Set the items in the worker.
|
|
98
|
+
* @param {T[]} items - The items to be set in the worker.
|
|
99
|
+
*/
|
|
100
|
+
set items(items) {
|
|
101
|
+
this._items = items;
|
|
102
|
+
}
|
|
103
|
+
async resetResults() {
|
|
104
|
+
this._items = [];
|
|
105
|
+
this._report = new Report();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Internal method to process a chunk of items using the provided callback.
|
|
110
|
+
* @private
|
|
111
|
+
* @param callback - The callback function to process each item.
|
|
112
|
+
* @param {T[]} chunk - The chunk of items to be processed.
|
|
113
|
+
* @returns {Promise<void>}
|
|
114
|
+
*/
|
|
115
|
+
async processChunk(callback, chunk) {
|
|
116
|
+
for (const item of chunk) {
|
|
117
|
+
await callback({
|
|
118
|
+
item,
|
|
119
|
+
allItems: this._items,
|
|
120
|
+
report: this._report
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=Worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["chunk","makeAutoObservable","Report","_results","success","result","addResult","status","error","results","push","Worker","constructor","_items","_report","process","callback","processInSeries","chunkSize","chunks","promises","map","processChunk","Promise","all","items","resetResults","item","allItems","report"],"sources":["Worker.ts"],"sourcesContent":["import chunk from \"lodash/chunk\";\nimport { makeAutoObservable } from \"mobx\";\n\nexport interface CallbackParams<T> {\n item: T;\n allItems: T[];\n report: Report;\n}\n\nexport interface Result {\n title: string;\n status: \"success\" | \"failure\";\n message?: string | React.ReactElement;\n}\n\n/**\n * Class for collecting processing results\n */\nexport class Report {\n private _results: Result[] = [];\n\n /**\n * Record a successful result in the report\n * @param {Omit<Result, \"status\">} result - The successful result to be recorded\n */\n public success(result: Omit<Result, \"status\">): void {\n this.addResult({\n ...result,\n status: \"success\"\n });\n }\n\n /**\n * Record an error result in the report.\n * @param {Omit<Result, \"status\">} result - The error result to be recorded.\n */\n public error(result: Omit<Result, \"status\">): void {\n this.addResult({\n ...result,\n status: \"failure\"\n });\n }\n\n /**\n * Get the array of recorded results.\n * @returns {Result[]} - An array of recorded results.\n */\n get results(): Result[] {\n return this._results;\n }\n\n /**\n * Internal method to add a result to the report.\n * @private\n * @param {Result} result - The result to be added to the report.\n */\n private addResult(result: Result): void {\n this._results.push(result);\n }\n}\n\n/**\n * A generic worker class for processing items.\n * @template T - The type of items being processed.\n */\nexport class Worker<T> {\n private _items: T[];\n private _report: Report;\n\n constructor() {\n this._items = [];\n this._report = new Report();\n makeAutoObservable(this);\n }\n\n /**\n * Process the items using the provided callback function.\n * @param callback - The callback function to process the items.\n */\n public process(callback: (items: T[]) => void): void {\n callback(this._items);\n }\n\n /**\n * Process the items in series with the given chunk size.\n * @param callback - The callback function to process each item.\n * @param {number} [chunkSize=10] - The size of each chunk for processing in series.\n * @returns {Promise<void>}\n */\n public async processInSeries(\n callback: ({ item, allItems, report }: CallbackParams<T>) => Promise<void>,\n chunkSize = 10\n ): Promise<void> {\n const chunks = chunk(this._items, chunkSize);\n const promises = chunks.map(chunk => this.processChunk(callback, chunk));\n await Promise.all(promises);\n }\n\n /**\n * Get the array of results collected by the worker.\n * @returns {Result[]} - An array of collected results.\n */\n get results(): Result[] {\n return this._report.results;\n }\n\n /**\n * Get the current items in the worker.\n * @returns {T[]} - An array of items in the worker.\n */\n get items(): T[] {\n return this._items;\n }\n\n /**\n * Set the items in the worker.\n * @param {T[]} items - The items to be set in the worker.\n */\n set items(items: T[]) {\n this._items = items;\n }\n\n public async resetResults(): Promise<void> {\n this._items = [];\n this._report = new Report();\n }\n\n /**\n * Internal method to process a chunk of items using the provided callback.\n * @private\n * @param callback - The callback function to process each item.\n * @param {T[]} chunk - The chunk of items to be processed.\n * @returns {Promise<void>}\n */\n private async processChunk(\n callback: ({ item, allItems, report }: CallbackParams<T>) => void | Promise<void>,\n chunk: T[]\n ): Promise<void> {\n for (const item of chunk) {\n await callback({ item, allItems: this._items, report: this._report });\n }\n }\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,cAAc;AAChC,SAASC,kBAAkB,QAAQ,MAAM;AAczC;AACA;AACA;AACA,OAAO,MAAMC,MAAM,CAAC;EACRC,QAAQ,GAAa,EAAE;;EAE/B;AACJ;AACA;AACA;EACWC,OAAOA,CAACC,MAA8B,EAAQ;IACjD,IAAI,CAACC,SAAS,CAAC;MACX,GAAGD,MAAM;MACTE,MAAM,EAAE;IACZ,CAAC,CAAC;EACN;;EAEA;AACJ;AACA;AACA;EACWC,KAAKA,CAACH,MAA8B,EAAQ;IAC/C,IAAI,CAACC,SAAS,CAAC;MACX,GAAGD,MAAM;MACTE,MAAM,EAAE;IACZ,CAAC,CAAC;EACN;;EAEA;AACJ;AACA;AACA;EACI,IAAIE,OAAOA,CAAA,EAAa;IACpB,OAAO,IAAI,CAACN,QAAQ;EACxB;;EAEA;AACJ;AACA;AACA;AACA;EACYG,SAASA,CAACD,MAAc,EAAQ;IACpC,IAAI,CAACF,QAAQ,CAACO,IAAI,CAACL,MAAM,CAAC;EAC9B;AACJ;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMM,MAAM,CAAI;EAInBC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,OAAO,GAAG,IAAIZ,MAAM,CAAC,CAAC;IAC3BD,kBAAkB,CAAC,IAAI,CAAC;EAC5B;;EAEA;AACJ;AACA;AACA;EACWc,OAAOA,CAACC,QAA8B,EAAQ;IACjDA,QAAQ,CAAC,IAAI,CAACH,MAAM,CAAC;EACzB;;EAEA;AACJ;AACA;AACA;AACA;AACA;EACI,MAAaI,eAAeA,CACxBD,QAA0E,EAC1EE,SAAS,GAAG,EAAE,EACD;IACb,MAAMC,MAAM,GAAGnB,KAAK,CAAC,IAAI,CAACa,MAAM,EAAEK,SAAS,CAAC;IAC5C,MAAME,QAAQ,GAAGD,MAAM,CAACE,GAAG,CAACrB,KAAK,IAAI,IAAI,CAACsB,YAAY,CAACN,QAAQ,EAAEhB,KAAK,CAAC,CAAC;IACxE,MAAMuB,OAAO,CAACC,GAAG,CAACJ,QAAQ,CAAC;EAC/B;;EAEA;AACJ;AACA;AACA;EACI,IAAIX,OAAOA,CAAA,EAAa;IACpB,OAAO,IAAI,CAACK,OAAO,CAACL,OAAO;EAC/B;;EAEA;AACJ;AACA;AACA;EACI,IAAIgB,KAAKA,CAAA,EAAQ;IACb,OAAO,IAAI,CAACZ,MAAM;EACtB;;EAEA;AACJ;AACA;AACA;EACI,IAAIY,KAAKA,CAACA,KAAU,EAAE;IAClB,IAAI,CAACZ,MAAM,GAAGY,KAAK;EACvB;EAEA,MAAaC,YAAYA,CAAA,EAAkB;IACvC,IAAI,CAACb,MAAM,GAAG,EAAE;IAChB,IAAI,CAACC,OAAO,GAAG,IAAIZ,MAAM,CAAC,CAAC;EAC/B;;EAEA;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,MAAcoB,YAAYA,CACtBN,QAAiF,EACjFhB,KAAU,EACG;IACb,KAAK,MAAM2B,IAAI,IAAI3B,KAAK,EAAE;MACtB,MAAMgB,QAAQ,CAAC;QAAEW,IAAI;QAAEC,QAAQ,EAAE,IAAI,CAACf,MAAM;QAAEgB,MAAM,EAAE,IAAI,CAACf;MAAQ,CAAC,CAAC;IACzE;EACJ;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useDialogWithReport\";\nexport * from \"./Worker\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ShowResultsDialogParams } from "./index";
|
|
3
|
+
type ResultDialogMessageProps = Pick<ShowResultsDialogParams, "results" | "message">;
|
|
4
|
+
export declare const ResultDialogMessage: ({ results, message }: ResultDialogMessageProps) => React.JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactComponent as ErrorIcon } from "@webiny/icons/error_outline.svg";
|
|
3
|
+
import { ReactComponent as SuccessIcon } from "@webiny/icons/check_circle_outline.svg";
|
|
4
|
+
import { List, Icon, cn } from "@webiny/admin-ui";
|
|
5
|
+
export const ResultDialogMessage = ({
|
|
6
|
+
results,
|
|
7
|
+
message
|
|
8
|
+
}) => {
|
|
9
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, message && /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "wby-mb-md"
|
|
11
|
+
}, message), /*#__PURE__*/React.createElement(List, null, results.map((result, index) => /*#__PURE__*/React.createElement(List.Item, {
|
|
12
|
+
key: `item-${index}`,
|
|
13
|
+
title: result.title,
|
|
14
|
+
description: result.message,
|
|
15
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
16
|
+
icon: result.status === "success" ? /*#__PURE__*/React.createElement(SuccessIcon, null) : /*#__PURE__*/React.createElement(ErrorIcon, null),
|
|
17
|
+
label: result.status,
|
|
18
|
+
className: cn(result.status === "success" ? "wby-fill-success" : "wby-fill-destructive")
|
|
19
|
+
})
|
|
20
|
+
}))));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=DialogMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","ErrorIcon","SuccessIcon","List","Icon","cn","ResultDialogMessage","results","message","createElement","Fragment","className","map","result","index","Item","key","title","description","icon","status","label"],"sources":["DialogMessage.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as ErrorIcon } from \"@webiny/icons/error_outline.svg\";\nimport { ReactComponent as SuccessIcon } from \"@webiny/icons/check_circle_outline.svg\";\nimport { List, Icon, cn } from \"@webiny/admin-ui\";\nimport type { ShowResultsDialogParams } from \"./index\";\n\ntype ResultDialogMessageProps = Pick<ShowResultsDialogParams, \"results\" | \"message\">;\n\nexport const ResultDialogMessage = ({ results, message }: ResultDialogMessageProps) => {\n return (\n <>\n {message && <div className={\"wby-mb-md\"}>{message}</div>}\n <List>\n {results.map((result, index) => (\n <List.Item\n key={`item-${index}`}\n title={result.title}\n description={result.message}\n icon={\n <Icon\n icon={result.status === \"success\" ? <SuccessIcon /> : <ErrorIcon />}\n label={result.status}\n className={cn(\n result.status === \"success\"\n ? \"wby-fill-success\"\n : \"wby-fill-destructive\"\n )}\n />\n }\n />\n ))}\n </List>\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,SAAS,QAAQ,iCAAiC;AAC7E,SAASD,cAAc,IAAIE,WAAW,QAAQ,wCAAwC;AACtF,SAASC,IAAI,EAAEC,IAAI,EAAEC,EAAE,QAAQ,kBAAkB;AAKjD,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAkC,CAAC,KAAK;EACnF,oBACIT,KAAA,CAAAU,aAAA,CAAAV,KAAA,CAAAW,QAAA,QACKF,OAAO,iBAAIT,KAAA,CAAAU,aAAA;IAAKE,SAAS,EAAE;EAAY,GAAEH,OAAa,CAAC,eACxDT,KAAA,CAAAU,aAAA,CAACN,IAAI,QACAI,OAAO,CAACK,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,kBACvBf,KAAA,CAAAU,aAAA,CAACN,IAAI,CAACY,IAAI;IACNC,GAAG,EAAE,QAAQF,KAAK,EAAG;IACrBG,KAAK,EAAEJ,MAAM,CAACI,KAAM;IACpBC,WAAW,EAAEL,MAAM,CAACL,OAAQ;IAC5BW,IAAI,eACApB,KAAA,CAAAU,aAAA,CAACL,IAAI;MACDe,IAAI,EAAEN,MAAM,CAACO,MAAM,KAAK,SAAS,gBAAGrB,KAAA,CAAAU,aAAA,CAACP,WAAW,MAAE,CAAC,gBAAGH,KAAA,CAAAU,aAAA,CAACR,SAAS,MAAE,CAAE;MACpEoB,KAAK,EAAER,MAAM,CAACO,MAAO;MACrBT,SAAS,EAAEN,EAAE,CACTQ,MAAM,CAACO,MAAM,KAAK,SAAS,GACrB,kBAAkB,GAClB,sBACV;IAAE,CACL;EACJ,CACJ,CACJ,CACC,CACR,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useDialogWithReport";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./useDialogWithReport\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Result } from "../Worker";
|
|
2
|
+
export interface ShowConfirmationDialogParams {
|
|
3
|
+
execute: (() => void) | (() => Promise<void>);
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
loadingLabel?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ShowResultsDialogParams {
|
|
9
|
+
results: Result[];
|
|
10
|
+
title?: string;
|
|
11
|
+
message?: string;
|
|
12
|
+
onCancel?: () => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface UseDialogWithReportResponse {
|
|
15
|
+
showConfirmationDialog: (params: ShowConfirmationDialogParams) => void;
|
|
16
|
+
showResultsDialog: (results: ShowResultsDialogParams) => void;
|
|
17
|
+
hideResultsDialog: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const useDialogWithReport: () => UseDialogWithReportResponse;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { i18n } from "@webiny/app/i18n";
|
|
3
|
+
import { ResultDialogMessage } from "./DialogMessage";
|
|
4
|
+
import { useDialogs } from "../../Dialogs/useDialogs.js";
|
|
5
|
+
const t = i18n.ns("app-admin/hooks/use-dialog-with-report");
|
|
6
|
+
export const useDialogWithReport = () => {
|
|
7
|
+
const {
|
|
8
|
+
showDialog,
|
|
9
|
+
closeAllDialogs
|
|
10
|
+
} = useDialogs();
|
|
11
|
+
const showConfirmationDialog = ({
|
|
12
|
+
execute,
|
|
13
|
+
title,
|
|
14
|
+
message,
|
|
15
|
+
loadingLabel
|
|
16
|
+
}) => {
|
|
17
|
+
showDialog({
|
|
18
|
+
title: title || t`Confirm`,
|
|
19
|
+
content: message || t`Are you sure you want to continue?`,
|
|
20
|
+
loadingLabel: loadingLabel || t`Processing...`,
|
|
21
|
+
acceptLabel: t`Confirm`,
|
|
22
|
+
onAccept: execute,
|
|
23
|
+
cancelLabel: t`Cancel`
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
const showResultsDialog = ({
|
|
27
|
+
title,
|
|
28
|
+
onCancel,
|
|
29
|
+
...params
|
|
30
|
+
}) => {
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
showDialog({
|
|
33
|
+
title: title || t`Results`,
|
|
34
|
+
content: /*#__PURE__*/React.createElement(ResultDialogMessage, params),
|
|
35
|
+
cancelLabel: t`Close`,
|
|
36
|
+
onClose: onCancel,
|
|
37
|
+
acceptLabel: null
|
|
38
|
+
});
|
|
39
|
+
}, 10);
|
|
40
|
+
};
|
|
41
|
+
const hideResultsDialog = () => {
|
|
42
|
+
closeAllDialogs();
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
showConfirmationDialog,
|
|
46
|
+
showResultsDialog,
|
|
47
|
+
hideResultsDialog
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=useDialogWithReport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","i18n","ResultDialogMessage","useDialogs","t","ns","useDialogWithReport","showDialog","closeAllDialogs","showConfirmationDialog","execute","title","message","loadingLabel","content","acceptLabel","onAccept","cancelLabel","showResultsDialog","onCancel","params","setTimeout","createElement","onClose","hideResultsDialog"],"sources":["useDialogWithReport.tsx"],"sourcesContent":["import React from \"react\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { ResultDialogMessage } from \"./DialogMessage\";\nimport type { Result } from \"../Worker\";\nimport { useDialogs } from \"~/components/Dialogs/useDialogs.js\";\n\nconst t = i18n.ns(\"app-admin/hooks/use-dialog-with-report\");\n\nexport interface ShowConfirmationDialogParams {\n execute: (() => void) | (() => Promise<void>);\n title?: string;\n message?: string;\n loadingLabel?: string;\n}\n\nexport interface ShowResultsDialogParams {\n results: Result[];\n title?: string;\n message?: string;\n onCancel?: () => Promise<void>;\n}\n\nexport interface UseDialogWithReportResponse {\n showConfirmationDialog: (params: ShowConfirmationDialogParams) => void;\n showResultsDialog: (results: ShowResultsDialogParams) => void;\n hideResultsDialog: () => void;\n}\n\nexport const useDialogWithReport = (): UseDialogWithReportResponse => {\n const { showDialog, closeAllDialogs } = useDialogs();\n\n const showConfirmationDialog = ({\n execute,\n title,\n message,\n loadingLabel\n }: ShowConfirmationDialogParams) => {\n showDialog({\n title: title || t`Confirm`,\n content: message || t`Are you sure you want to continue?`,\n loadingLabel: loadingLabel || t`Processing...`,\n acceptLabel: t`Confirm`,\n onAccept: execute,\n cancelLabel: t`Cancel`\n });\n };\n\n const showResultsDialog = ({ title, onCancel, ...params }: ShowResultsDialogParams) => {\n setTimeout(() => {\n showDialog({\n title: title || t`Results`,\n content: <ResultDialogMessage {...params} />,\n cancelLabel: t`Close`,\n onClose: onCancel,\n acceptLabel: null\n });\n }, 10);\n };\n\n const hideResultsDialog = () => {\n closeAllDialogs();\n };\n\n return {\n showConfirmationDialog,\n showResultsDialog,\n hideResultsDialog\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,mBAAmB;AAE5B,SAASC,UAAU;AAEnB,MAAMC,CAAC,GAAGH,IAAI,CAACI,EAAE,CAAC,wCAAwC,CAAC;AAsB3D,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAmC;EAClE,MAAM;IAAEC,UAAU;IAAEC;EAAgB,CAAC,GAAGL,UAAU,CAAC,CAAC;EAEpD,MAAMM,sBAAsB,GAAGA,CAAC;IAC5BC,OAAO;IACPC,KAAK;IACLC,OAAO;IACPC;EAC0B,CAAC,KAAK;IAChCN,UAAU,CAAC;MACPI,KAAK,EAAEA,KAAK,IAAIP,CAAC,SAAS;MAC1BU,OAAO,EAAEF,OAAO,IAAIR,CAAC,oCAAoC;MACzDS,YAAY,EAAEA,YAAY,IAAIT,CAAC,eAAe;MAC9CW,WAAW,EAAEX,CAAC,SAAS;MACvBY,QAAQ,EAAEN,OAAO;MACjBO,WAAW,EAAEb,CAAC;IAClB,CAAC,CAAC;EACN,CAAC;EAED,MAAMc,iBAAiB,GAAGA,CAAC;IAAEP,KAAK;IAAEQ,QAAQ;IAAE,GAAGC;EAAgC,CAAC,KAAK;IACnFC,UAAU,CAAC,MAAM;MACbd,UAAU,CAAC;QACPI,KAAK,EAAEA,KAAK,IAAIP,CAAC,SAAS;QAC1BU,OAAO,eAAEd,KAAA,CAAAsB,aAAA,CAACpB,mBAAmB,EAAKkB,MAAS,CAAC;QAC5CH,WAAW,EAAEb,CAAC,OAAO;QACrBmB,OAAO,EAAEJ,QAAQ;QACjBJ,WAAW,EAAE;MACjB,CAAC,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;EACV,CAAC;EAED,MAAMS,iBAAiB,GAAGA,CAAA,KAAM;IAC5BhB,eAAe,CAAC,CAAC;EACrB,CAAC;EAED,OAAO;IACHC,sBAAsB;IACtBS,iBAAiB;IACjBM;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonContainer } from "./Buttons.styles";
|
|
3
|
+
import { type ButtonProps as BaseButtonProps, type IconButtonProps as BaseIconButtonProps, type TooltipProps } from "@webiny/admin-ui";
|
|
4
|
+
interface ButtonProps extends Omit<BaseButtonProps, "onClick"> {
|
|
5
|
+
onAction: (ev?: any) => void;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface IconButtonProps extends Omit<BaseIconButtonProps, "onClick"> {
|
|
9
|
+
label: string;
|
|
10
|
+
onAction: (ev?: any) => void;
|
|
11
|
+
tooltipPlacement?: TooltipProps["side"];
|
|
12
|
+
}
|
|
13
|
+
export interface ButtonsProps {
|
|
14
|
+
actions: {
|
|
15
|
+
name: string;
|
|
16
|
+
element: React.ReactElement;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export declare const Buttons: (props: ButtonsProps) => React.JSX.Element | null;
|
|
20
|
+
export { ButtonContainer };
|
|
21
|
+
export declare const ButtonDefault: ({ onAction, children, ...other }: ButtonProps) => React.JSX.Element;
|
|
22
|
+
export declare const ButtonPrimary: ({ onAction, children, ...other }: ButtonProps) => React.JSX.Element;
|
|
23
|
+
export declare const ButtonSecondary: ({ onAction, children, ...other }: ButtonProps) => React.JSX.Element;
|
|
24
|
+
export declare const IconButton: ({ label, onAction, tooltipPlacement, disabled, ...other }: IconButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonsProvider } from "./useButtons";
|
|
3
|
+
import { ButtonContainer } from "./Buttons.styles";
|
|
4
|
+
import { Button, IconButton as BaseIconButton, Tooltip } from "@webiny/admin-ui";
|
|
5
|
+
export const Buttons = props => {
|
|
6
|
+
if (!props.actions.length) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
className: "wby-flex wby-items-center wby-gap-sm"
|
|
11
|
+
}, props.actions.map(action => /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "empty:wby-hidden wby-leading-none wby-text-0",
|
|
13
|
+
key: action.name
|
|
14
|
+
}, /*#__PURE__*/React.createElement(ButtonsProvider, null, action.element))));
|
|
15
|
+
};
|
|
16
|
+
export { ButtonContainer };
|
|
17
|
+
export const ButtonDefault = ({
|
|
18
|
+
onAction,
|
|
19
|
+
children,
|
|
20
|
+
...other
|
|
21
|
+
}) => {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
23
|
+
variant: "ghost"
|
|
24
|
+
}, other, {
|
|
25
|
+
onClick: onAction,
|
|
26
|
+
text: children
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
export const ButtonPrimary = ({
|
|
30
|
+
onAction,
|
|
31
|
+
children,
|
|
32
|
+
...other
|
|
33
|
+
}) => {
|
|
34
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
35
|
+
variant: "primary"
|
|
36
|
+
}, other, {
|
|
37
|
+
onClick: onAction,
|
|
38
|
+
text: children
|
|
39
|
+
}));
|
|
40
|
+
};
|
|
41
|
+
export const ButtonSecondary = ({
|
|
42
|
+
onAction,
|
|
43
|
+
children,
|
|
44
|
+
...other
|
|
45
|
+
}) => {
|
|
46
|
+
return /*#__PURE__*/React.createElement(Button, Object.assign({
|
|
47
|
+
variant: "secondary"
|
|
48
|
+
}, other, {
|
|
49
|
+
onClick: onAction,
|
|
50
|
+
text: children
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
export const IconButton = ({
|
|
54
|
+
label,
|
|
55
|
+
onAction,
|
|
56
|
+
tooltipPlacement,
|
|
57
|
+
disabled,
|
|
58
|
+
...other
|
|
59
|
+
}) => {
|
|
60
|
+
if (label && !disabled) {
|
|
61
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
62
|
+
content: label,
|
|
63
|
+
side: tooltipPlacement,
|
|
64
|
+
trigger: /*#__PURE__*/React.createElement(BaseIconButton, Object.assign({
|
|
65
|
+
variant: "ghost"
|
|
66
|
+
}, other, {
|
|
67
|
+
onClick: onAction
|
|
68
|
+
}))
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return /*#__PURE__*/React.createElement(BaseIconButton, Object.assign({}, other, {
|
|
72
|
+
onClick: onAction,
|
|
73
|
+
disabled: disabled
|
|
74
|
+
}));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=Buttons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ButtonsProvider","ButtonContainer","Button","IconButton","BaseIconButton","Tooltip","Buttons","props","actions","length","createElement","className","map","action","key","name","element","ButtonDefault","onAction","children","other","Object","assign","variant","onClick","text","ButtonPrimary","ButtonSecondary","label","tooltipPlacement","disabled","content","side","trigger"],"sources":["Buttons.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { ButtonsProvider } from \"./useButtons\";\nimport { ButtonContainer } from \"./Buttons.styles\";\nimport {\n Button,\n type ButtonProps as BaseButtonProps,\n IconButton as BaseIconButton,\n type IconButtonProps as BaseIconButtonProps,\n Tooltip,\n type TooltipProps\n} from \"@webiny/admin-ui\";\n\ninterface ButtonProps extends Omit<BaseButtonProps, \"onClick\"> {\n onAction: (ev?: any) => void;\n children: React.ReactNode;\n}\n\ninterface IconButtonProps extends Omit<BaseIconButtonProps, \"onClick\"> {\n label: string;\n onAction: (ev?: any) => void;\n tooltipPlacement?: TooltipProps[\"side\"];\n}\n\nexport interface ButtonsProps {\n actions: {\n name: string;\n element: React.ReactElement;\n }[];\n}\n\nexport const Buttons = (props: ButtonsProps) => {\n if (!props.actions.length) {\n return null;\n }\n\n return (\n <div className={\"wby-flex wby-items-center wby-gap-sm\"}>\n {props.actions.map(action => (\n <div className={\"empty:wby-hidden wby-leading-none wby-text-0\"} key={action.name}>\n <ButtonsProvider>{action.element}</ButtonsProvider>\n </div>\n ))}\n </div>\n );\n};\n\nexport { ButtonContainer };\n\nexport const ButtonDefault = ({ onAction, children, ...other }: ButtonProps) => {\n return <Button variant={\"ghost\"} {...other} onClick={onAction} text={children} />;\n};\n\nexport const ButtonPrimary = ({ onAction, children, ...other }: ButtonProps) => {\n return <Button variant={\"primary\"} {...other} onClick={onAction} text={children} />;\n};\n\nexport const ButtonSecondary = ({ onAction, children, ...other }: ButtonProps) => {\n return <Button variant={\"secondary\"} {...other} onClick={onAction} text={children} />;\n};\n\nexport const IconButton = ({\n label,\n onAction,\n tooltipPlacement,\n disabled,\n ...other\n}: IconButtonProps) => {\n if (label && !disabled) {\n return (\n <Tooltip\n content={label}\n side={tooltipPlacement}\n trigger={<BaseIconButton variant={\"ghost\"} {...other} onClick={onAction} />}\n />\n );\n }\n\n return <BaseIconButton {...other} onClick={onAction} disabled={disabled} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,eAAe;AACxB,SAASC,eAAe;AACxB,SACIC,MAAM,EAENC,UAAU,IAAIC,cAAc,EAE5BC,OAAO,QAEJ,kBAAkB;AAoBzB,OAAO,MAAMC,OAAO,GAAIC,KAAmB,IAAK;EAC5C,IAAI,CAACA,KAAK,CAACC,OAAO,CAACC,MAAM,EAAE;IACvB,OAAO,IAAI;EACf;EAEA,oBACIV,KAAA,CAAAW,aAAA;IAAKC,SAAS,EAAE;EAAuC,GAClDJ,KAAK,CAACC,OAAO,CAACI,GAAG,CAACC,MAAM,iBACrBd,KAAA,CAAAW,aAAA;IAAKC,SAAS,EAAE,8CAA+C;IAACG,GAAG,EAAED,MAAM,CAACE;EAAK,gBAC7EhB,KAAA,CAAAW,aAAA,CAACV,eAAe,QAAEa,MAAM,CAACG,OAAyB,CACjD,CACR,CACA,CAAC;AAEd,CAAC;AAED,SAASf,eAAe;AAExB,OAAO,MAAMgB,aAAa,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAE,GAAGC;AAAmB,CAAC,KAAK;EAC5E,oBAAOrB,KAAA,CAAAW,aAAA,CAACR,MAAM,EAAAmB,MAAA,CAAAC,MAAA;IAACC,OAAO,EAAE;EAAQ,GAAKH,KAAK;IAAEI,OAAO,EAAEN,QAAS;IAACO,IAAI,EAAEN;EAAS,EAAE,CAAC;AACrF,CAAC;AAED,OAAO,MAAMO,aAAa,GAAGA,CAAC;EAAER,QAAQ;EAAEC,QAAQ;EAAE,GAAGC;AAAmB,CAAC,KAAK;EAC5E,oBAAOrB,KAAA,CAAAW,aAAA,CAACR,MAAM,EAAAmB,MAAA,CAAAC,MAAA;IAACC,OAAO,EAAE;EAAU,GAAKH,KAAK;IAAEI,OAAO,EAAEN,QAAS;IAACO,IAAI,EAAEN;EAAS,EAAE,CAAC;AACvF,CAAC;AAED,OAAO,MAAMQ,eAAe,GAAGA,CAAC;EAAET,QAAQ;EAAEC,QAAQ;EAAE,GAAGC;AAAmB,CAAC,KAAK;EAC9E,oBAAOrB,KAAA,CAAAW,aAAA,CAACR,MAAM,EAAAmB,MAAA,CAAAC,MAAA;IAACC,OAAO,EAAE;EAAY,GAAKH,KAAK;IAAEI,OAAO,EAAEN,QAAS;IAACO,IAAI,EAAEN;EAAS,EAAE,CAAC;AACzF,CAAC;AAED,OAAO,MAAMhB,UAAU,GAAGA,CAAC;EACvByB,KAAK;EACLV,QAAQ;EACRW,gBAAgB;EAChBC,QAAQ;EACR,GAAGV;AACU,CAAC,KAAK;EACnB,IAAIQ,KAAK,IAAI,CAACE,QAAQ,EAAE;IACpB,oBACI/B,KAAA,CAAAW,aAAA,CAACL,OAAO;MACJ0B,OAAO,EAAEH,KAAM;MACfI,IAAI,EAAEH,gBAAiB;MACvBI,OAAO,eAAElC,KAAA,CAAAW,aAAA,CAACN,cAAc,EAAAiB,MAAA,CAAAC,MAAA;QAACC,OAAO,EAAE;MAAQ,GAAKH,KAAK;QAAEI,OAAO,EAAEN;MAAS,EAAE;IAAE,CAC/E,CAAC;EAEV;EAEA,oBAAOnB,KAAA,CAAAW,aAAA,CAACN,cAAc,EAAAiB,MAAA,CAAAC,MAAA,KAAKF,KAAK;IAAEI,OAAO,EAAEN,QAAS;IAACY,QAAQ,EAAEA;EAAS,EAAE,CAAC;AAC/E,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
export const ButtonContainer = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
4
|
+
target: "e1ubuzv90"
|
|
5
|
+
} : {
|
|
6
|
+
target: "e1ubuzv90",
|
|
7
|
+
label: "ButtonContainer"
|
|
8
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
9
|
+
name: "at3lo0",
|
|
10
|
+
styles: "margin-left:16px;text-wrap:nowrap;&:empty{display:none;}"
|
|
11
|
+
} : {
|
|
12
|
+
name: "at3lo0",
|
|
13
|
+
styles: "margin-left:16px;text-wrap:nowrap;&:empty{display:none;}",
|
|
14
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJ1dHRvbnMuc3R5bGVzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFNEMiLCJmaWxlIjoiQnV0dG9ucy5zdHlsZXMudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tIFwiQGVtb3Rpb24vc3R5bGVkXCI7XG5cbmV4cG9ydCBjb25zdCBCdXR0b25Db250YWluZXIgPSBzdHlsZWQoXCJkaXZcIilgXG4gICAgbWFyZ2luLWxlZnQ6IDE2cHg7XG4gICAgdGV4dC13cmFwOiBub3dyYXA7XG4gICAgJjplbXB0eSB7XG4gICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgfVxuYDtcbiJdfQ== */",
|
|
15
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Buttons.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ButtonContainer","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Buttons.styles.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\n\nexport const ButtonContainer = styled(\"div\")`\n margin-left: 16px;\n text-wrap: nowrap;\n &:empty {\n display: none;\n }\n`;\n"],"mappings":";;AAEA,OAAO,MAAMA,eAAe,gBAAGC,OAAA,CAAO,KAAK,EAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAM3C","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Buttons","ButtonContainer","useButtons"],"sources":["index.ts"],"sourcesContent":["export { Buttons, ButtonContainer } from \"./Buttons\";\nexport { useButtons } from \"./useButtons\";\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,eAAe;AACjC,SAASC,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonDefault, ButtonPrimary, ButtonSecondary, IconButton } from "./Buttons";
|
|
3
|
+
export interface ButtonsProviderContext {
|
|
4
|
+
ButtonDefault: typeof ButtonDefault;
|
|
5
|
+
ButtonPrimary: typeof ButtonPrimary;
|
|
6
|
+
ButtonSecondary: typeof ButtonSecondary;
|
|
7
|
+
IconButton: typeof IconButton;
|
|
8
|
+
}
|
|
9
|
+
interface ButtonsProviderProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const ButtonsProvider: ({ children }: ButtonsProviderProps) => React.JSX.Element;
|
|
13
|
+
export declare const useButtons: () => ButtonsProviderContext;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonDefault, ButtonPrimary, ButtonSecondary, IconButton } from "./Buttons";
|
|
3
|
+
const ButtonsContext = /*#__PURE__*/React.createContext(undefined);
|
|
4
|
+
export const ButtonsProvider = ({
|
|
5
|
+
children
|
|
6
|
+
}) => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(ButtonsContext.Provider, {
|
|
8
|
+
value: {
|
|
9
|
+
ButtonDefault,
|
|
10
|
+
ButtonPrimary,
|
|
11
|
+
ButtonSecondary,
|
|
12
|
+
IconButton
|
|
13
|
+
}
|
|
14
|
+
}, children);
|
|
15
|
+
};
|
|
16
|
+
export const useButtons = () => {
|
|
17
|
+
const context = React.useContext(ButtonsContext);
|
|
18
|
+
if (!context) {
|
|
19
|
+
throw new Error("useButtons must be used within a ButtonsContext");
|
|
20
|
+
}
|
|
21
|
+
return context;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=useButtons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ButtonDefault","ButtonPrimary","ButtonSecondary","IconButton","ButtonsContext","createContext","undefined","ButtonsProvider","children","createElement","Provider","value","useButtons","context","useContext","Error"],"sources":["useButtons.tsx"],"sourcesContent":["import React from \"react\";\nimport { ButtonDefault, ButtonPrimary, ButtonSecondary, IconButton } from \"./Buttons\";\n\nexport interface ButtonsProviderContext {\n ButtonDefault: typeof ButtonDefault;\n ButtonPrimary: typeof ButtonPrimary;\n ButtonSecondary: typeof ButtonSecondary;\n IconButton: typeof IconButton;\n}\n\nconst ButtonsContext = React.createContext<ButtonsProviderContext | undefined>(undefined);\n\ninterface ButtonsProviderProps {\n children: React.ReactNode;\n}\n\nexport const ButtonsProvider = ({ children }: ButtonsProviderProps) => {\n return (\n <ButtonsContext.Provider\n value={{ ButtonDefault, ButtonPrimary, ButtonSecondary, IconButton }}\n >\n {children}\n </ButtonsContext.Provider>\n );\n};\n\nexport const useButtons = (): ButtonsProviderContext => {\n const context = React.useContext(ButtonsContext);\n\n if (!context) {\n throw new Error(\"useButtons must be used within a ButtonsContext\");\n }\n\n return context;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,aAAa,EAAEC,aAAa,EAAEC,eAAe,EAAEC,UAAU;AASlE,MAAMC,cAAc,gBAAGL,KAAK,CAACM,aAAa,CAAqCC,SAAS,CAAC;AAMzF,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAA+B,CAAC,KAAK;EACnE,oBACIT,KAAA,CAAAU,aAAA,CAACL,cAAc,CAACM,QAAQ;IACpBC,KAAK,EAAE;MAAEX,aAAa;MAAEC,aAAa;MAAEC,eAAe;MAAEC;IAAW;EAAE,GAEpEK,QACoB,CAAC;AAElC,CAAC;AAED,OAAO,MAAMI,UAAU,GAAGA,CAAA,KAA8B;EACpD,MAAMC,OAAO,GAAGd,KAAK,CAACe,UAAU,CAACV,cAAc,CAAC;EAEhD,IAAI,CAACS,OAAO,EAAE;IACV,MAAM,IAAIE,KAAK,CAAC,iDAAiD,CAAC;EACtE;EAEA,OAAOF,OAAO;AAClB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { GenericFormData } from "@webiny/form";
|
|
3
|
+
interface DialogProps {
|
|
4
|
+
onSubmit: (data: GenericFormData) => void;
|
|
5
|
+
closeDialog: () => void;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
open: boolean;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export declare const CustomDialog: ({ open, loading, closeDialog, onSubmit, children }: DialogProps) => React.JSX.Element;
|
|
11
|
+
export interface CustomDialogContext {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
closeDialog: () => void;
|
|
14
|
+
submit: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const useCustomDialog: () => CustomDialogContext;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { Form, useForm } from "@webiny/form";
|
|
3
|
+
import { Dialog } from "@webiny/admin-ui";
|
|
4
|
+
export const CustomDialog = ({
|
|
5
|
+
open,
|
|
6
|
+
loading,
|
|
7
|
+
closeDialog,
|
|
8
|
+
onSubmit,
|
|
9
|
+
children
|
|
10
|
+
}) => {
|
|
11
|
+
const handleSubmit = data => {
|
|
12
|
+
onSubmit(data);
|
|
13
|
+
};
|
|
14
|
+
return /*#__PURE__*/React.createElement(Dialog, {
|
|
15
|
+
open: open,
|
|
16
|
+
onClose: closeDialog
|
|
17
|
+
}, open ? /*#__PURE__*/React.createElement(Form, {
|
|
18
|
+
onSubmit: handleSubmit
|
|
19
|
+
}, () => /*#__PURE__*/React.createElement(CustomDialogProvider, {
|
|
20
|
+
loading: loading,
|
|
21
|
+
closeDialog: closeDialog
|
|
22
|
+
}, children)) : null);
|
|
23
|
+
};
|
|
24
|
+
const CustomDialogContext = /*#__PURE__*/React.createContext(undefined);
|
|
25
|
+
const CustomDialogProvider = ({
|
|
26
|
+
loading,
|
|
27
|
+
closeDialog,
|
|
28
|
+
children
|
|
29
|
+
}) => {
|
|
30
|
+
const form = useForm();
|
|
31
|
+
const context = {
|
|
32
|
+
submit: form.submit,
|
|
33
|
+
loading,
|
|
34
|
+
closeDialog
|
|
35
|
+
};
|
|
36
|
+
return /*#__PURE__*/React.createElement(CustomDialogContext.Provider, {
|
|
37
|
+
value: context
|
|
38
|
+
}, children);
|
|
39
|
+
};
|
|
40
|
+
export const useCustomDialog = () => {
|
|
41
|
+
const context = useContext(CustomDialogContext);
|
|
42
|
+
if (!context) {
|
|
43
|
+
throw new Error("useCustomDialog must be used within the CustomDialogProvider.");
|
|
44
|
+
}
|
|
45
|
+
return context;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=CustomDialog.js.map
|