@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 @@
|
|
|
1
|
+
{"version":3,"names":["React","useContext","useEffect","useMemo","useState","Compose","makeDecoratable","Properties","toObject","useDebugConfig","createHOC","newChildren","BaseComponent","ConfigHOC","children","createElement","name","createAdminConfig","ApplyPublicConfig","Fragment","ApplyProtectedConfig","PublicConfig","component","with","ProtectedConfig","defaultContext","properties","ViewContext","createContext","WithConfig","onProperties","setProperties","context","stateUpdater","Provider","value","onChange","useConfig","PrivateConfig"],"sources":["createAdminConfig.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from \"react\";\nimport type { Decorator } from \"@webiny/react-composition\";\nimport { Compose, makeDecoratable } from \"@webiny/react-composition\";\nimport type { GenericComponent } from \"@webiny/react-composition/types\";\nimport type { Property } from \"@webiny/react-properties\";\nimport { Properties, toObject, useDebugConfig } from \"@webiny/react-properties\";\n\nconst createHOC = (\n newChildren: React.ReactNode\n): Decorator<GenericComponent<{ children?: React.ReactNode }>> => {\n return BaseComponent => {\n return function ConfigHOC({ children }) {\n return (\n <BaseComponent>\n {newChildren}\n {children}\n </BaseComponent>\n );\n };\n };\n};\n\nexport interface WithConfigProps {\n children: React.ReactNode;\n onProperties?(properties: Property[]): void;\n}\n\ninterface ConfigApplyProps {\n children?: React.ReactNode;\n}\n\nexport interface ConfigProps {\n children: React.ReactNode;\n}\n\nconst name = \"AdminConfig\";\n\nexport function createAdminConfig<TConfig>() {\n /**\n * This component is used when we want to mount all composed configs.\n */\n const ApplyPublicConfig = makeDecoratable(\n `${name}Apply<Public>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n const ApplyProtectedConfig = makeDecoratable(\n `${name}Apply<Protected>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n /**\n * This component is used to configure the component (it can be mounted many times).\n */\n const PublicConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyPublicConfig} with={createHOC(children)} />;\n };\n\n const ProtectedConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyProtectedConfig} with={createHOC(children)} />;\n };\n\n interface ViewContext {\n name: string;\n properties: Property[];\n }\n\n const defaultContext = { name, properties: [] };\n\n const ViewContext = React.createContext<ViewContext>(defaultContext);\n\n const WithConfig = ({ onProperties, children }: WithConfigProps) => {\n const [properties, setProperties] = useState<Property[]>([]);\n useDebugConfig(name, properties);\n const context = { name, properties };\n\n useEffect(() => {\n if (typeof onProperties === \"function\") {\n onProperties(properties);\n }\n }, [properties]);\n\n const stateUpdater = (properties: Property[]) => {\n setProperties(properties);\n };\n\n return (\n <ViewContext.Provider value={context}>\n <Properties onChange={stateUpdater} name={name}>\n {children}\n </Properties>\n </ViewContext.Provider>\n );\n };\n\n function useConfig<TExtra extends object>(): TConfig & TExtra {\n const { properties } = useContext(ViewContext);\n return useMemo(() => toObject<TConfig & TExtra>(properties), [properties]);\n }\n\n return {\n WithConfig,\n PrivateConfig: ProtectedConfig,\n PublicConfig,\n ApplyPublicConfig,\n ApplyProtectedConfig,\n useConfig\n };\n}\n"],"mappings":"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","ignoreList":[]}
|
package/hooks/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./useConfirmationDialog";
|
|
2
|
+
export * from "./useDialog";
|
|
3
|
+
export * from "../components/Dialogs/useDialogs";
|
|
4
|
+
export * from "./useSnackbar";
|
|
5
|
+
export * from "./useKeyHandler";
|
|
6
|
+
export * from "./useShiftKey";
|
|
7
|
+
export * from "./useStateWithCallback";
|
|
8
|
+
export * from "./useModKey";
|
|
9
|
+
export * from "./useIsMounted";
|
|
10
|
+
export * from "./useStateIfMounted";
|
package/hooks/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./useConfirmationDialog";
|
|
2
|
+
export * from "./useDialog";
|
|
3
|
+
export * from "../components/Dialogs/useDialogs";
|
|
4
|
+
export * from "./useSnackbar";
|
|
5
|
+
export * from "./useKeyHandler";
|
|
6
|
+
export * from "./useShiftKey";
|
|
7
|
+
export * from "./useStateWithCallback";
|
|
8
|
+
export * from "./useModKey";
|
|
9
|
+
export * from "./useIsMounted";
|
|
10
|
+
export * from "./useStateIfMounted";
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useConfirmationDialog\";\nexport * from \"./useDialog\";\nexport * from \"../components/Dialogs/useDialogs\";\nexport * from \"./useSnackbar\";\nexport * from \"./useKeyHandler\";\nexport * from \"./useShiftKey\";\nexport * from \"./useStateWithCallback\";\nexport * from \"./useModKey\";\nexport * from \"./useIsMounted\";\nexport * from \"./useStateIfMounted\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
interface Params {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
message?: React.ReactNode;
|
|
5
|
+
acceptLabel?: React.ReactNode;
|
|
6
|
+
cancelLabel?: React.ReactNode;
|
|
7
|
+
loading?: React.ReactNode;
|
|
5
8
|
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
}
|
|
10
|
+
export type ShowConfirmationOnAccept = (() => void) | (() => Promise<void>);
|
|
11
|
+
export interface UseConfirmationDialogResponse {
|
|
12
|
+
showConfirmation: (onAccept: ShowConfirmationOnAccept, onCancel?: () => void) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const useConfirmationDialog: ({ title, message, acceptLabel, cancelLabel, loading, ...options }?: Params) => UseConfirmationDialogResponse;
|
|
10
15
|
export { useConfirmationDialog };
|
|
@@ -1,47 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
|
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
6
|
-
|
|
7
|
-
var _excluded = ["title", "message"];
|
|
1
|
+
import React from "react";
|
|
8
2
|
import { useUi } from "@webiny/app/hooks/useUi";
|
|
9
3
|
import { i18n } from "@webiny/app/i18n";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
import { CircularProgress } from "@webiny/ui/Progress";
|
|
5
|
+
const t = i18n.ns("app-admin/hooks/use-confirmation-dialog");
|
|
6
|
+
const useConfirmationDialog = ({
|
|
7
|
+
title = t`Confirmation`,
|
|
8
|
+
message,
|
|
9
|
+
acceptLabel = t`Confirm`,
|
|
10
|
+
cancelLabel = t`Cancel`,
|
|
11
|
+
loading = /*#__PURE__*/React.createElement(CircularProgress, null),
|
|
12
|
+
...options
|
|
13
|
+
} = {}) => {
|
|
14
|
+
const ui = useUi();
|
|
20
15
|
return {
|
|
21
|
-
showConfirmation:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
showConfirmation: (onAccept, onCancel) => {
|
|
17
|
+
ui.setState(ui => {
|
|
18
|
+
return {
|
|
19
|
+
...ui,
|
|
25
20
|
dialog: {
|
|
26
|
-
message: message || t
|
|
27
|
-
options:
|
|
28
|
-
|
|
21
|
+
message: message || t`Are you sure you want to continue?`,
|
|
22
|
+
options: {
|
|
23
|
+
...options,
|
|
24
|
+
title,
|
|
25
|
+
loading,
|
|
29
26
|
actions: {
|
|
30
27
|
accept: {
|
|
31
|
-
label:
|
|
28
|
+
label: acceptLabel,
|
|
32
29
|
onClick: onAccept
|
|
33
30
|
},
|
|
34
31
|
cancel: {
|
|
35
|
-
label:
|
|
32
|
+
label: cancelLabel,
|
|
36
33
|
onClick: onCancel
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
|
-
}
|
|
36
|
+
}
|
|
40
37
|
}
|
|
41
|
-
}
|
|
38
|
+
};
|
|
42
39
|
});
|
|
43
40
|
}
|
|
44
41
|
};
|
|
45
42
|
};
|
|
43
|
+
export { useConfirmationDialog };
|
|
46
44
|
|
|
47
|
-
|
|
45
|
+
//# sourceMappingURL=useConfirmationDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useUi","i18n","CircularProgress","t","ns","useConfirmationDialog","title","message","acceptLabel","cancelLabel","loading","createElement","options","ui","showConfirmation","onAccept","onCancel","setState","dialog","actions","accept","label","onClick","cancel"],"sources":["useConfirmationDialog.tsx"],"sourcesContent":["import React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\nimport { i18n } from \"@webiny/app/i18n\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\n\nconst t = i18n.ns(\"app-admin/hooks/use-confirmation-dialog\");\n\ninterface Params {\n title?: React.ReactNode;\n message?: React.ReactNode;\n acceptLabel?: React.ReactNode;\n cancelLabel?: React.ReactNode;\n loading?: React.ReactNode;\n [key: string]: any;\n}\n\nexport type ShowConfirmationOnAccept = (() => void) | (() => Promise<void>);\n\nexport interface UseConfirmationDialogResponse {\n showConfirmation: (onAccept: ShowConfirmationOnAccept, onCancel?: () => void) => void;\n}\n\nconst useConfirmationDialog = ({\n title = t`Confirmation`,\n message,\n acceptLabel = t`Confirm`,\n cancelLabel = t`Cancel`,\n loading = <CircularProgress />,\n ...options\n}: Params = {}): UseConfirmationDialogResponse => {\n const ui = useUi();\n\n return {\n showConfirmation: (onAccept, onCancel) => {\n ui.setState(ui => {\n return {\n ...ui,\n dialog: {\n message: message || t`Are you sure you want to continue?`,\n options: {\n ...options,\n title,\n loading,\n actions: {\n accept: {\n label: acceptLabel,\n onClick: onAccept\n },\n cancel: {\n label: cancelLabel,\n onClick: onCancel\n }\n }\n }\n }\n };\n });\n }\n };\n};\n\nexport { useConfirmationDialog };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,IAAI,QAAQ,kBAAkB;AACvC,SAASC,gBAAgB,QAAQ,qBAAqB;AAEtD,MAAMC,CAAC,GAAGF,IAAI,CAACG,EAAE,CAAC,yCAAyC,CAAC;AAiB5D,MAAMC,qBAAqB,GAAGA,CAAC;EAC3BC,KAAK,GAAGH,CAAC,cAAc;EACvBI,OAAO;EACPC,WAAW,GAAGL,CAAC,SAAS;EACxBM,WAAW,GAAGN,CAAC,QAAQ;EACvBO,OAAO,gBAAGX,KAAA,CAAAY,aAAA,CAACT,gBAAgB,MAAE,CAAC;EAC9B,GAAGU;AACC,CAAC,GAAG,CAAC,CAAC,KAAoC;EAC9C,MAAMC,EAAE,GAAGb,KAAK,CAAC,CAAC;EAElB,OAAO;IACHc,gBAAgB,EAAEA,CAACC,QAAQ,EAAEC,QAAQ,KAAK;MACtCH,EAAE,CAACI,QAAQ,CAACJ,EAAE,IAAI;QACd,OAAO;UACH,GAAGA,EAAE;UACLK,MAAM,EAAE;YACJX,OAAO,EAAEA,OAAO,IAAIJ,CAAC,oCAAoC;YACzDS,OAAO,EAAE;cACL,GAAGA,OAAO;cACVN,KAAK;cACLI,OAAO;cACPS,OAAO,EAAE;gBACLC,MAAM,EAAE;kBACJC,KAAK,EAAEb,WAAW;kBAClBc,OAAO,EAAEP;gBACb,CAAC;gBACDQ,MAAM,EAAE;kBACJF,KAAK,EAAEZ,WAAW;kBAClBa,OAAO,EAAEN;gBACb;cACJ;YACJ;UACJ;QACJ,CAAC;MACL,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAED,SAASX,qBAAqB","ignoreList":[]}
|
package/hooks/useDialog.d.ts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type React from "react";
|
|
2
|
+
interface AcceptAction {
|
|
3
|
+
label: string;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
}
|
|
6
|
+
interface CancelAction {
|
|
7
|
+
label: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export interface UseDialogResponseShowDialogOptions {
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
actions?: {
|
|
15
|
+
accept?: AcceptAction;
|
|
16
|
+
cancel?: CancelAction;
|
|
17
|
+
};
|
|
18
|
+
style?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
interface UseDialogResponse {
|
|
25
|
+
showDialog: (message: React.ReactNode, options?: UseDialogResponseShowDialogOptions) => void;
|
|
3
26
|
hideDialog: () => void;
|
|
4
|
-
}
|
|
27
|
+
}
|
|
28
|
+
declare const useDialog: () => UseDialogResponse;
|
|
5
29
|
export { useDialog };
|
package/hooks/useDialog.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
1
|
import { useUi } from "@webiny/app/hooks/useUi";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var ui = useUi();
|
|
2
|
+
const useDialog = () => {
|
|
3
|
+
const ui = useUi();
|
|
6
4
|
return {
|
|
7
|
-
showDialog:
|
|
8
|
-
ui.setState(
|
|
9
|
-
return
|
|
5
|
+
showDialog: (message, options) => {
|
|
6
|
+
ui.setState(ui => {
|
|
7
|
+
return {
|
|
8
|
+
...ui,
|
|
10
9
|
dialog: {
|
|
11
|
-
message
|
|
12
|
-
options
|
|
10
|
+
message,
|
|
11
|
+
options
|
|
13
12
|
}
|
|
14
|
-
}
|
|
13
|
+
};
|
|
15
14
|
});
|
|
16
15
|
},
|
|
17
|
-
hideDialog:
|
|
18
|
-
ui.setState(
|
|
19
|
-
return
|
|
16
|
+
hideDialog: () => {
|
|
17
|
+
ui.setState(ui => {
|
|
18
|
+
return {
|
|
19
|
+
...ui,
|
|
20
20
|
dialog: null
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
+
export { useDialog };
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
//# sourceMappingURL=useDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useUi","useDialog","ui","showDialog","message","options","setState","dialog","hideDialog"],"sources":["useDialog.ts"],"sourcesContent":["import type React from \"react\";\nimport { useUi } from \"@webiny/app/hooks/useUi\";\n\ninterface AcceptAction {\n label: string;\n onClick?: () => void;\n}\ninterface CancelAction {\n label: string;\n onClick?: () => void;\n}\n\nexport interface UseDialogResponseShowDialogOptions {\n dataTestId?: string;\n title: string;\n loading?: boolean;\n actions?: {\n accept?: AcceptAction;\n cancel?: CancelAction;\n };\n style?: {\n [key: string]: any;\n };\n onClose?: () => void;\n [key: string]: any;\n}\ninterface UseDialogResponse {\n showDialog: (message: React.ReactNode, options?: UseDialogResponseShowDialogOptions) => void;\n hideDialog: () => void;\n}\nconst useDialog = (): UseDialogResponse => {\n const ui = useUi();\n return {\n showDialog: (message, options) => {\n ui.setState(ui => {\n return { ...ui, dialog: { message, options } };\n });\n },\n hideDialog: () => {\n ui.setState(ui => {\n return { ...ui, dialog: null };\n });\n }\n };\n};\n\nexport { useDialog };\n"],"mappings":"AACA,SAASA,KAAK,QAAQ,yBAAyB;AA6B/C,MAAMC,SAAS,GAAGA,CAAA,KAAyB;EACvC,MAAMC,EAAE,GAAGF,KAAK,CAAC,CAAC;EAClB,OAAO;IACHG,UAAU,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;MAC9BH,EAAE,CAACI,QAAQ,CAACJ,EAAE,IAAI;QACd,OAAO;UAAE,GAAGA,EAAE;UAAEK,MAAM,EAAE;YAAEH,OAAO;YAAEC;UAAQ;QAAE,CAAC;MAClD,CAAC,CAAC;IACN,CAAC;IACDG,UAAU,EAAEA,CAAA,KAAM;MACdN,EAAE,CAACI,QAAQ,CAACJ,EAAE,IAAI;QACd,OAAO;UAAE,GAAGA,EAAE;UAAEK,MAAM,EAAE;QAAK,CAAC;MAClC,CAAC,CAAC;IACN;EACJ,CAAC;AACL,CAAC;AAED,SAASN,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useRef, useEffect } from "react";
|
|
2
|
+
export const useIsMounted = () => {
|
|
3
|
+
const isMountedRef = useRef(false);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
isMountedRef.current = true;
|
|
6
|
+
return () => {
|
|
7
|
+
isMountedRef.current = false;
|
|
8
|
+
};
|
|
9
|
+
}, []);
|
|
10
|
+
return {
|
|
11
|
+
isMounted: () => isMountedRef.current
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=useIsMounted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","useEffect","useIsMounted","isMountedRef","current","isMounted"],"sources":["useIsMounted.ts"],"sourcesContent":["import { useRef, useEffect } from \"react\";\n\nexport const useIsMounted = () => {\n const isMountedRef = useRef(false);\n\n useEffect(() => {\n isMountedRef.current = true;\n\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n return {\n isMounted: () => isMountedRef.current\n };\n};\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAEzC,OAAO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAC9B,MAAMC,YAAY,GAAGH,MAAM,CAAC,KAAK,CAAC;EAElCC,SAAS,CAAC,MAAM;IACZE,YAAY,CAACC,OAAO,GAAG,IAAI;IAE3B,OAAO,MAAM;MACTD,YAAY,CAACC,OAAO,GAAG,KAAK;IAChC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACHC,SAAS,EAAEA,CAAA,KAAMF,YAAY,CAACC;EAClC,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SyntheticEvent } from "react";
|
|
2
|
+
type AddKeyHandlerType = (key: string, handler: (e: SyntheticEvent<HTMLElement>) => void) => void;
|
|
3
|
+
type RemoveKeyHandlerType = (key: string) => void;
|
|
4
|
+
export declare function useKeyHandler(): {
|
|
5
|
+
addKeyHandler: AddKeyHandlerType;
|
|
6
|
+
removeKeyHandler: RemoveKeyHandlerType;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import isHotkey from "is-hotkey";
|
|
3
|
+
import { generateId } from "@webiny/utils";
|
|
4
|
+
const keyStack = {};
|
|
5
|
+
let listener = false;
|
|
6
|
+
const filter = ["TEXTAREA", "INPUT"];
|
|
7
|
+
const isContentEditable = value => {
|
|
8
|
+
return ["true", true].includes(value);
|
|
9
|
+
};
|
|
10
|
+
const setupListener = () => {
|
|
11
|
+
if (listener || !document.body) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const eventListener = ev => {
|
|
15
|
+
if (!ev.target) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const target = ev.target;
|
|
19
|
+
// We ignore all keyboard events coming from within contentEditable element and inputs.
|
|
20
|
+
if (filter.includes(target.nodeName) || isContentEditable(target.contentEditable)) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const matchedKey = Object.keys(keyStack).find(key => isHotkey(key, ev));
|
|
24
|
+
if (matchedKey && keyStack[matchedKey].length > 0) {
|
|
25
|
+
const item = keyStack[matchedKey][0];
|
|
26
|
+
item.handler(ev);
|
|
27
|
+
ev.stopPropagation();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
document.body.addEventListener("keydown", eventListener);
|
|
31
|
+
listener = true;
|
|
32
|
+
};
|
|
33
|
+
const addKeyHandler = (id, key, handler) => {
|
|
34
|
+
setupListener();
|
|
35
|
+
keyStack[key] = keyStack[key] || [];
|
|
36
|
+
if (!keyStack[key].find(item => item.id === id)) {
|
|
37
|
+
keyStack[key].unshift({
|
|
38
|
+
id,
|
|
39
|
+
handler
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const removeKeyHandler = (id, key) => {
|
|
44
|
+
if (!keyStack[key]) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const index = keyStack[key].findIndex(item => item.id === id);
|
|
48
|
+
if (index >= 0) {
|
|
49
|
+
keyStack[key].splice(index, 1);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
export function useKeyHandler() {
|
|
53
|
+
const [id] = React.useState(generateId());
|
|
54
|
+
return React.useMemo(() => ({
|
|
55
|
+
addKeyHandler(key, handler) {
|
|
56
|
+
addKeyHandler(id, key, handler);
|
|
57
|
+
},
|
|
58
|
+
removeKeyHandler(key) {
|
|
59
|
+
removeKeyHandler(id, key);
|
|
60
|
+
}
|
|
61
|
+
}), []);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=useKeyHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","isHotkey","generateId","keyStack","listener","filter","isContentEditable","value","includes","setupListener","document","body","eventListener","ev","target","nodeName","contentEditable","matchedKey","Object","keys","find","key","length","item","handler","stopPropagation","addEventListener","addKeyHandler","id","unshift","removeKeyHandler","index","findIndex","splice","useKeyHandler","useState","useMemo"],"sources":["useKeyHandler.ts"],"sourcesContent":["import type { SyntheticEvent } from \"react\";\nimport React from \"react\";\nimport isHotkey from \"is-hotkey\";\nimport { generateId } from \"@webiny/utils\";\n\ninterface KeyHandler {\n id: string;\n handler: any;\n}\nconst keyStack: Record<string, KeyHandler[]> = {};\n\nlet listener = false;\nconst filter = [\"TEXTAREA\", \"INPUT\"];\n\nconst isContentEditable = (value: any) => {\n return [\"true\", true].includes(value);\n};\n\nconst setupListener = (): void => {\n if (listener || !document.body) {\n return;\n }\n\n const eventListener = (ev: KeyboardEvent) => {\n if (!ev.target) {\n return;\n }\n const target = ev.target as HTMLElement;\n // We ignore all keyboard events coming from within contentEditable element and inputs.\n if (filter.includes(target.nodeName) || isContentEditable(target.contentEditable)) {\n return;\n }\n\n const matchedKey = Object.keys(keyStack).find(key => isHotkey(key, ev));\n\n if (matchedKey && keyStack[matchedKey].length > 0) {\n const item = keyStack[matchedKey][0];\n item.handler(ev);\n ev.stopPropagation();\n }\n };\n\n document.body.addEventListener(\"keydown\", eventListener);\n\n listener = true;\n};\n\nconst addKeyHandler = (\n id: string,\n key: string,\n handler: (e: SyntheticEvent<HTMLElement>) => void\n) => {\n setupListener();\n keyStack[key] = keyStack[key] || [];\n if (!keyStack[key].find(item => item.id === id)) {\n keyStack[key].unshift({ id, handler });\n }\n};\n\nconst removeKeyHandler = (id: string, key: string): void => {\n if (!keyStack[key]) {\n return;\n }\n\n const index = keyStack[key].findIndex(item => item.id === id);\n if (index >= 0) {\n keyStack[key].splice(index, 1);\n }\n};\n\ntype AddKeyHandlerType = (key: string, handler: (e: SyntheticEvent<HTMLElement>) => void) => void;\n\ntype RemoveKeyHandlerType = (key: string) => void;\n\nexport function useKeyHandler(): {\n addKeyHandler: AddKeyHandlerType;\n removeKeyHandler: RemoveKeyHandlerType;\n} {\n const [id] = React.useState(generateId());\n\n return React.useMemo(\n () => ({\n addKeyHandler(key, handler) {\n addKeyHandler(id, key, handler);\n },\n removeKeyHandler(key) {\n removeKeyHandler(id, key);\n }\n }),\n []\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useModKey(): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback } from "react";
|
|
2
|
+
import isHotkey from "is-hotkey";
|
|
3
|
+
export function useModKey() {
|
|
4
|
+
const [pressed, setPressed] = useState(false);
|
|
5
|
+
const onKeyDown = useCallback(event => {
|
|
6
|
+
if (isHotkey("Control", event) || isHotkey("Meta", event)) {
|
|
7
|
+
setPressed(true);
|
|
8
|
+
}
|
|
9
|
+
}, []);
|
|
10
|
+
const onKeyUp = useCallback(event => {
|
|
11
|
+
if (event.key === "Control" && event.ctrlKey === false) {
|
|
12
|
+
setPressed(false);
|
|
13
|
+
}
|
|
14
|
+
if (event.key === "Meta" && event.metaKey === false) {
|
|
15
|
+
setPressed(false);
|
|
16
|
+
}
|
|
17
|
+
}, []);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
document.addEventListener("keydown", onKeyDown);
|
|
20
|
+
document.addEventListener("keyup", onKeyUp);
|
|
21
|
+
return () => {
|
|
22
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
23
|
+
document.removeEventListener("keyup", onKeyUp);
|
|
24
|
+
};
|
|
25
|
+
}, []);
|
|
26
|
+
console.log("pressed", pressed);
|
|
27
|
+
return pressed;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=useModKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","useEffect","useCallback","isHotkey","useModKey","pressed","setPressed","onKeyDown","event","onKeyUp","key","ctrlKey","metaKey","document","addEventListener","removeEventListener","console","log"],"sources":["useModKey.ts"],"sourcesContent":["import { useState, useEffect, useCallback } from \"react\";\nimport isHotkey from \"is-hotkey\";\n\nexport function useModKey() {\n const [pressed, setPressed] = useState(false);\n\n const onKeyDown = useCallback((event: KeyboardEvent) => {\n if (isHotkey(\"Control\", event) || isHotkey(\"Meta\", event)) {\n setPressed(true);\n }\n }, []);\n\n const onKeyUp = useCallback((event: KeyboardEvent) => {\n if (event.key === \"Control\" && event.ctrlKey === false) {\n setPressed(false);\n }\n\n if (event.key === \"Meta\" && event.metaKey === false) {\n setPressed(false);\n }\n }, []);\n\n useEffect(() => {\n document.addEventListener(\"keydown\", onKeyDown);\n document.addEventListener(\"keyup\", onKeyUp);\n\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n document.removeEventListener(\"keyup\", onKeyUp);\n };\n }, []);\n\n console.log(\"pressed\", pressed);\n\n return pressed;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,QAAQ,OAAO;AACxD,OAAOC,QAAQ,MAAM,WAAW;AAEhC,OAAO,SAASC,SAASA,CAAA,EAAG;EACxB,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGN,QAAQ,CAAC,KAAK,CAAC;EAE7C,MAAMO,SAAS,GAAGL,WAAW,CAAEM,KAAoB,IAAK;IACpD,IAAIL,QAAQ,CAAC,SAAS,EAAEK,KAAK,CAAC,IAAIL,QAAQ,CAAC,MAAM,EAAEK,KAAK,CAAC,EAAE;MACvDF,UAAU,CAAC,IAAI,CAAC;IACpB;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,OAAO,GAAGP,WAAW,CAAEM,KAAoB,IAAK;IAClD,IAAIA,KAAK,CAACE,GAAG,KAAK,SAAS,IAAIF,KAAK,CAACG,OAAO,KAAK,KAAK,EAAE;MACpDL,UAAU,CAAC,KAAK,CAAC;IACrB;IAEA,IAAIE,KAAK,CAACE,GAAG,KAAK,MAAM,IAAIF,KAAK,CAACI,OAAO,KAAK,KAAK,EAAE;MACjDN,UAAU,CAAC,KAAK,CAAC;IACrB;EACJ,CAAC,EAAE,EAAE,CAAC;EAENL,SAAS,CAAC,MAAM;IACZY,QAAQ,CAACC,gBAAgB,CAAC,SAAS,EAAEP,SAAS,CAAC;IAC/CM,QAAQ,CAACC,gBAAgB,CAAC,OAAO,EAAEL,OAAO,CAAC;IAE3C,OAAO,MAAM;MACTI,QAAQ,CAACE,mBAAmB,CAAC,SAAS,EAAER,SAAS,CAAC;MAClDM,QAAQ,CAACE,mBAAmB,CAAC,OAAO,EAAEN,OAAO,CAAC;IAClD,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAENO,OAAO,CAACC,GAAG,CAAC,SAAS,EAAEZ,OAAO,CAAC;EAE/B,OAAOA,OAAO;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useShiftKey(): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback, useRef } from "react";
|
|
2
|
+
import isHotkey from "is-hotkey";
|
|
3
|
+
export function useShiftKey() {
|
|
4
|
+
const [pressed, setPressed] = useState(false);
|
|
5
|
+
const onselectstartRef = useRef(document.onselectstart);
|
|
6
|
+
const onKeyDown = useCallback(event => {
|
|
7
|
+
if (isHotkey("shift", event)) {
|
|
8
|
+
setPressed(true);
|
|
9
|
+
}
|
|
10
|
+
}, []);
|
|
11
|
+
const onKeyUp = useCallback(event => {
|
|
12
|
+
if (event.key === "Shift" && event.shiftKey === false) {
|
|
13
|
+
setPressed(false);
|
|
14
|
+
}
|
|
15
|
+
}, []);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
document.onselectstart = () => !pressed;
|
|
18
|
+
return () => {
|
|
19
|
+
document.onselectstart = onselectstartRef.current;
|
|
20
|
+
};
|
|
21
|
+
}, [pressed]);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
document.addEventListener("keydown", onKeyDown);
|
|
24
|
+
document.addEventListener("keyup", onKeyUp);
|
|
25
|
+
return () => {
|
|
26
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
27
|
+
document.removeEventListener("keyup", onKeyUp);
|
|
28
|
+
};
|
|
29
|
+
}, []);
|
|
30
|
+
return pressed;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=useShiftKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","useEffect","useCallback","useRef","isHotkey","useShiftKey","pressed","setPressed","onselectstartRef","document","onselectstart","onKeyDown","event","onKeyUp","key","shiftKey","current","addEventListener","removeEventListener"],"sources":["useShiftKey.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef } from \"react\";\nimport isHotkey from \"is-hotkey\";\n\nexport function useShiftKey() {\n const [pressed, setPressed] = useState(false);\n const onselectstartRef = useRef(document.onselectstart);\n\n const onKeyDown = useCallback((event: KeyboardEvent) => {\n if (isHotkey(\"shift\", event)) {\n setPressed(true);\n }\n }, []);\n\n const onKeyUp = useCallback((event: KeyboardEvent) => {\n if (event.key === \"Shift\" && event.shiftKey === false) {\n setPressed(false);\n }\n }, []);\n\n useEffect(() => {\n document.onselectstart = () => !pressed;\n\n return () => {\n document.onselectstart = onselectstartRef.current;\n };\n }, [pressed]);\n\n useEffect(() => {\n document.addEventListener(\"keydown\", onKeyDown);\n document.addEventListener(\"keyup\", onKeyUp);\n\n return () => {\n document.removeEventListener(\"keydown\", onKeyDown);\n document.removeEventListener(\"keyup\", onKeyUp);\n };\n }, []);\n\n return pressed;\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,SAAS,EAAEC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAChE,OAAOC,QAAQ,MAAM,WAAW;AAEhC,OAAO,SAASC,WAAWA,CAAA,EAAG;EAC1B,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGP,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAMQ,gBAAgB,GAAGL,MAAM,CAACM,QAAQ,CAACC,aAAa,CAAC;EAEvD,MAAMC,SAAS,GAAGT,WAAW,CAAEU,KAAoB,IAAK;IACpD,IAAIR,QAAQ,CAAC,OAAO,EAAEQ,KAAK,CAAC,EAAE;MAC1BL,UAAU,CAAC,IAAI,CAAC;IACpB;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMM,OAAO,GAAGX,WAAW,CAAEU,KAAoB,IAAK;IAClD,IAAIA,KAAK,CAACE,GAAG,KAAK,OAAO,IAAIF,KAAK,CAACG,QAAQ,KAAK,KAAK,EAAE;MACnDR,UAAU,CAAC,KAAK,CAAC;IACrB;EACJ,CAAC,EAAE,EAAE,CAAC;EAENN,SAAS,CAAC,MAAM;IACZQ,QAAQ,CAACC,aAAa,GAAG,MAAM,CAACJ,OAAO;IAEvC,OAAO,MAAM;MACTG,QAAQ,CAACC,aAAa,GAAGF,gBAAgB,CAACQ,OAAO;IACrD,CAAC;EACL,CAAC,EAAE,CAACV,OAAO,CAAC,CAAC;EAEbL,SAAS,CAAC,MAAM;IACZQ,QAAQ,CAACQ,gBAAgB,CAAC,SAAS,EAAEN,SAAS,CAAC;IAC/CF,QAAQ,CAACQ,gBAAgB,CAAC,OAAO,EAAEJ,OAAO,CAAC;IAE3C,OAAO,MAAM;MACTJ,QAAQ,CAACS,mBAAmB,CAAC,SAAS,EAAEP,SAAS,CAAC;MAClDF,QAAQ,CAACS,mBAAmB,CAAC,OAAO,EAAEL,OAAO,CAAC;IAClD,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOP,OAAO;AAClB","ignoreList":[]}
|
package/hooks/useSnackbar.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface UseSnackbarResponse {
|
|
3
|
+
showSnackbar: (message: React.ReactNode, options?: Record<string, React.ReactNode>) => void;
|
|
4
|
+
showErrorSnackbar: (message: React.ReactNode, options?: Record<string, React.ReactNode>) => void;
|
|
3
5
|
hideSnackbar: () => void;
|
|
4
|
-
}
|
|
6
|
+
}
|
|
7
|
+
export declare const useSnackbar: () => UseSnackbarResponse;
|
|
8
|
+
export {};
|
package/hooks/useSnackbar.js
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Toast, useToast } from "@webiny/admin-ui";
|
|
3
|
+
export const useSnackbar = () => {
|
|
4
|
+
const {
|
|
5
|
+
showToast,
|
|
6
|
+
hideAllToasts
|
|
7
|
+
} = useToast();
|
|
5
8
|
return {
|
|
6
|
-
showSnackbar:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
options: options
|
|
13
|
-
}
|
|
14
|
-
});
|
|
9
|
+
showSnackbar: (message, options = {}) => {
|
|
10
|
+
showToast({
|
|
11
|
+
title: /*#__PURE__*/React.createElement(Toast.Title, {
|
|
12
|
+
text: message
|
|
13
|
+
}),
|
|
14
|
+
...options
|
|
15
15
|
});
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
17
|
+
showErrorSnackbar: (message, options = {}) => {
|
|
18
|
+
showToast({
|
|
19
|
+
title: /*#__PURE__*/React.createElement(Toast.Title, {
|
|
20
|
+
text: message
|
|
21
|
+
}),
|
|
22
|
+
duration: Infinity,
|
|
23
|
+
...options
|
|
22
24
|
});
|
|
25
|
+
},
|
|
26
|
+
hideSnackbar: () => {
|
|
27
|
+
hideAllToasts();
|
|
23
28
|
}
|
|
24
29
|
};
|
|
25
|
-
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=useSnackbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Toast","useToast","useSnackbar","showToast","hideAllToasts","showSnackbar","message","options","title","createElement","Title","text","showErrorSnackbar","duration","Infinity","hideSnackbar"],"sources":["useSnackbar.tsx"],"sourcesContent":["import React from \"react\";\nimport { Toast, useToast } from \"@webiny/admin-ui\";\n\ninterface UseSnackbarResponse {\n showSnackbar: (message: React.ReactNode, options?: Record<string, React.ReactNode>) => void;\n showErrorSnackbar: (\n message: React.ReactNode,\n options?: Record<string, React.ReactNode>\n ) => void;\n hideSnackbar: () => void;\n}\n\nexport const useSnackbar = (): UseSnackbarResponse => {\n const { showToast, hideAllToasts } = useToast();\n\n return {\n showSnackbar: (message, options = {}) => {\n showToast({\n title: <Toast.Title text={message} />,\n ...options\n });\n },\n showErrorSnackbar: (message, options = {}) => {\n showToast({\n title: <Toast.Title text={message} />,\n duration: Infinity,\n ...options\n });\n },\n hideSnackbar: () => {\n hideAllToasts();\n }\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,QAAQ,QAAQ,kBAAkB;AAWlD,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAA2B;EAClD,MAAM;IAAEC,SAAS;IAAEC;EAAc,CAAC,GAAGH,QAAQ,CAAC,CAAC;EAE/C,OAAO;IACHI,YAAY,EAAEA,CAACC,OAAO,EAAEC,OAAO,GAAG,CAAC,CAAC,KAAK;MACrCJ,SAAS,CAAC;QACNK,KAAK,eAAET,KAAA,CAAAU,aAAA,CAACT,KAAK,CAACU,KAAK;UAACC,IAAI,EAAEL;QAAQ,CAAE,CAAC;QACrC,GAAGC;MACP,CAAC,CAAC;IACN,CAAC;IACDK,iBAAiB,EAAEA,CAACN,OAAO,EAAEC,OAAO,GAAG,CAAC,CAAC,KAAK;MAC1CJ,SAAS,CAAC;QACNK,KAAK,eAAET,KAAA,CAAAU,aAAA,CAACT,KAAK,CAACU,KAAK;UAACC,IAAI,EAAEL;QAAQ,CAAE,CAAC;QACrCO,QAAQ,EAAEC,QAAQ;QAClB,GAAGP;MACP,CAAC,CAAC;IACN,CAAC;IACDQ,YAAY,EAAEA,CAAA,KAAM;MAChBX,aAAa,CAAC,CAAC;IACnB;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState, useCallback } from "react";
|
|
2
|
+
import { useIsMounted } from "./useIsMounted";
|
|
3
|
+
export function useStateIfMounted(defaultState) {
|
|
4
|
+
const [state, setState] = useState(defaultState);
|
|
5
|
+
const {
|
|
6
|
+
isMounted
|
|
7
|
+
} = useIsMounted();
|
|
8
|
+
const setStateIfMounted = useCallback(state => {
|
|
9
|
+
if (isMounted()) {
|
|
10
|
+
setState(state);
|
|
11
|
+
}
|
|
12
|
+
}, [isMounted]);
|
|
13
|
+
return [state, setStateIfMounted];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=useStateIfMounted.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useState","useCallback","useIsMounted","useStateIfMounted","defaultState","state","setState","isMounted","setStateIfMounted"],"sources":["useStateIfMounted.ts"],"sourcesContent":["import { useState, useCallback } from \"react\";\nimport { useIsMounted } from \"./useIsMounted\";\n\nexport function useStateIfMounted<T>(\n defaultState: T\n): [T, React.Dispatch<React.SetStateAction<T>>] {\n const [state, setState] = useState<T>(defaultState);\n const { isMounted } = useIsMounted();\n\n const setStateIfMounted = useCallback(\n (state: React.SetStateAction<T>) => {\n if (isMounted()) {\n setState(state);\n }\n },\n [isMounted]\n );\n\n return [state, setStateIfMounted];\n}\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC7C,SAASC,YAAY;AAErB,OAAO,SAASC,iBAAiBA,CAC7BC,YAAe,EAC6B;EAC5C,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGN,QAAQ,CAAII,YAAY,CAAC;EACnD,MAAM;IAAEG;EAAU,CAAC,GAAGL,YAAY,CAAC,CAAC;EAEpC,MAAMM,iBAAiB,GAAGP,WAAW,CAChCI,KAA8B,IAAK;IAChC,IAAIE,SAAS,CAAC,CAAC,EAAE;MACbD,QAAQ,CAACD,KAAK,CAAC;IACnB;EACJ,CAAC,EACD,CAACE,SAAS,CACd,CAAC;EAED,OAAO,CAACF,KAAK,EAAEG,iBAAiB,CAAC;AACrC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type CallBackType<T> = (updatedValue: T) => void;
|
|
2
|
+
type SetStateType<T> = T | ((prev: T) => T);
|
|
3
|
+
type RetType = <T>(initialValue: T | (() => T)) => [T, (newValue: SetStateType<T>, callback?: CallBackType<T>) => void];
|
|
4
|
+
export declare const useStateWithCallback: RetType;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
export const useStateWithCallback = initialValue => {
|
|
3
|
+
const [state, _setState] = useState(initialValue);
|
|
4
|
+
const callbackQueue = useRef([]);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
callbackQueue.current.forEach(cb => cb(state));
|
|
7
|
+
callbackQueue.current = [];
|
|
8
|
+
}, [state]);
|
|
9
|
+
const setState = (value, callback) => {
|
|
10
|
+
_setState(value);
|
|
11
|
+
if (callback && typeof callback === "function") {
|
|
12
|
+
callbackQueue.current.push(callback);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
return [state, setState];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=useStateWithCallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","useState","useStateWithCallback","initialValue","state","_setState","callbackQueue","current","forEach","cb","setState","value","callback","push"],"sources":["useStateWithCallback.ts"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\ntype CallBackType<T> = (updatedValue: T) => void;\n\ntype SetStateType<T> = T | ((prev: T) => T);\n\ntype RetType = <T>(\n initialValue: T | (() => T)\n) => [T, (newValue: SetStateType<T>, callback?: CallBackType<T>) => void];\n\nexport const useStateWithCallback: RetType = <T>(initialValue: T | (() => T)) => {\n const [state, _setState] = useState<T>(initialValue);\n const callbackQueue = useRef<CallBackType<T>[]>([]);\n\n useEffect(() => {\n callbackQueue.current.forEach(cb => cb(state));\n callbackQueue.current = [];\n }, [state]);\n\n const setState = (value: SetStateType<T>, callback?: CallBackType<T>) => {\n _setState(value);\n if (callback && typeof callback === \"function\") {\n callbackQueue.current.push(callback);\n }\n };\n return [state, setState];\n};\n"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAUnD,OAAO,MAAMC,oBAA6B,GAAOC,YAA2B,IAAK;EAC7E,MAAM,CAACC,KAAK,EAAEC,SAAS,CAAC,GAAGJ,QAAQ,CAAIE,YAAY,CAAC;EACpD,MAAMG,aAAa,GAAGN,MAAM,CAAoB,EAAE,CAAC;EAEnDD,SAAS,CAAC,MAAM;IACZO,aAAa,CAACC,OAAO,CAACC,OAAO,CAACC,EAAE,IAAIA,EAAE,CAACL,KAAK,CAAC,CAAC;IAC9CE,aAAa,CAACC,OAAO,GAAG,EAAE;EAC9B,CAAC,EAAE,CAACH,KAAK,CAAC,CAAC;EAEX,MAAMM,QAAQ,GAAGA,CAACC,KAAsB,EAAEC,QAA0B,KAAK;IACrEP,SAAS,CAACM,KAAK,CAAC;IAChB,IAAIC,QAAQ,IAAI,OAAOA,QAAQ,KAAK,UAAU,EAAE;MAC5CN,aAAa,CAACC,OAAO,CAACM,IAAI,CAACD,QAAQ,CAAC;IACxC;EACJ,CAAC;EACD,OAAO,CAACR,KAAK,EAAEM,QAAQ,CAAC;AAC5B,CAAC","ignoreList":[]}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export * from "@webiny/app";
|
|
2
|
+
export type { HigherOrderComponent, ProviderProps, ComposeProps } from "@webiny/app";
|
|
3
|
+
export * from "./base/ui/Tags";
|
|
4
|
+
export * from "./base/ui/Layout";
|
|
5
|
+
export * from "./base/ui/LocaleSelector";
|
|
6
|
+
export * from "./base/ui/TenantSelector";
|
|
7
|
+
export type { LayoutProps } from "./base/ui/Layout";
|
|
8
|
+
export * from "./base/ui/Navigation";
|
|
9
|
+
export * from "./base/ui/Brand";
|
|
10
|
+
export * from "./base/ui/Logo";
|
|
11
|
+
export * from "./base/ui/UserMenu";
|
|
12
|
+
export * from "./base/ui/LoginScreen";
|
|
13
|
+
export * from "./base/ui/CenteredView";
|
|
14
|
+
export * from "./base/ui/Dashboard";
|
|
15
|
+
export * from "./base/ui/NotFound";
|
|
16
|
+
export { Admin } from "./base/Admin";
|
|
17
|
+
export * from "./config/AdminConfig";
|
|
18
|
+
export type { AdminProps } from "./base/Admin";
|
|
19
|
+
export { useViewComposition } from "./base/providers/ViewCompositionProvider";
|
|
20
|
+
export type { ViewCompositionContext, ViewElement } from "./base/providers/ViewCompositionProvider";
|
|
21
|
+
export * from "./base/plugins/AddGraphQLQuerySelection";
|
|
22
|
+
export * from "./plugins/PermissionRendererPlugin";
|
|
23
|
+
export { AppInstaller } from "./components/AppInstaller";
|
|
24
|
+
export * from "./components/Buttons";
|
|
25
|
+
export { DialogsProvider } from "./components/Dialogs/DialogsContext";
|
|
26
|
+
export * from "./components/OptionsMenu";
|
|
27
|
+
export * from "./components/Filters";
|
|
28
|
+
export * from "./components/BulkActions";
|
|
29
|
+
export * from "./components/ResizablePanels";
|
|
30
|
+
export { OverlayLayout, type OverlayLayoutProps } from "./components/OverlayLayout";
|
|
31
|
+
export { default as SingleImageUpload, type SingleImageUploadProps } from "./components/SingleImageUpload";
|
|
32
|
+
export { LexicalEditor } from "./components/LexicalEditor/LexicalEditor";
|
|
33
|
+
export { Wcp } from "./components/Wcp";
|
|
34
|
+
export * from "./components/IconPicker";
|
|
35
|
+
export { FileManager, FileManagerRenderer } from "./base/ui/FileManager";
|
|
36
|
+
export type { FileManagerProps, FileManagerRendererProps, FileManagerFileItem, FileManagerOnChange } from "./base/ui/FileManager";
|
|
37
|
+
export * from "./hooks";
|
|
38
|
+
export { useWcp } from "@webiny/app-wcp";
|
|
39
|
+
export type { AaclPermission } from "@webiny/app-wcp/types";
|
|
40
|
+
export { useTheme, ThemeProvider } from "@webiny/app-theme";
|
|
41
|
+
export * from "@webiny/app/renderApp";
|
|
42
|
+
export * from "@webiny/app/utils/getApiUrl";
|
|
43
|
+
export * from "@webiny/app/utils/getGqlApiUrl";
|
|
44
|
+
export * from "@webiny/app/utils/getHeadlessCmsGqlApiUrl";
|
|
45
|
+
export * from "@webiny/app/utils/getLocaleCode";
|
|
46
|
+
export * from "@webiny/app/utils/getTenantId";
|
|
47
|
+
export * from "@webiny/app/utils/isLocalhost";
|