@webiny/app-admin 0.0.0-unstable.bca7b3e350 → 0.0.0-unstable.c27f4d8a31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -17
- package/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/today-24px.svg +1 -1
- package/assets/icons/touch_app.svg +1 -1
- package/base/Admin.d.ts +5 -2
- package/base/Admin.js +45 -40
- package/base/Admin.js.map +1 -1
- package/base/Base/LexicalPreset.d.ts +2 -0
- package/base/Base/LexicalPreset.js +67 -0
- package/base/Base/LexicalPreset.js.map +1 -0
- package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
- package/base/Base/Menus/SupportMenuItems.js +18 -0
- package/base/Base/Menus/SupportMenuItems.js.map +1 -0
- package/base/Base/Menus/WebinyVersion.d.ts +2 -0
- package/base/Base/Menus/WebinyVersion.js +24 -0
- package/base/Base/Menus/WebinyVersion.js.map +1 -0
- package/base/Base/Menus.d.ts +2 -0
- package/base/Base/Menus.js +124 -0
- package/base/Base/Menus.js.map +1 -0
- package/base/Base/RoutesConfig.d.ts +2 -0
- package/base/Base/RoutesConfig.js +30 -0
- package/base/Base/RoutesConfig.js.map +1 -0
- package/base/Base/Tenant/wby-horizontal.svg +23 -0
- package/base/Base/Tenant/wby-square.svg +3 -0
- package/base/Base/Tenant.d.ts +2 -0
- package/base/Base/Tenant.js +24 -0
- package/base/Base/Tenant.js.map +1 -0
- package/base/Base/UserMenu/ExitTenant.d.ts +20 -0
- package/base/Base/UserMenu/ExitTenant.js +37 -0
- package/base/Base/UserMenu/ExitTenant.js.map +1 -0
- package/base/Base/UserMenu/SignOut.d.ts +2 -0
- package/base/Base/UserMenu/SignOut.js +19 -0
- package/base/Base/UserMenu/SignOut.js.map +1 -0
- package/base/Base/UserMenu/UserInfo.d.ts +6 -0
- package/base/Base/UserMenu/UserInfo.js +43 -0
- package/base/Base/UserMenu/UserInfo.js.map +1 -0
- package/base/Base/UserMenu.d.ts +2 -0
- package/base/Base/UserMenu.js +21 -0
- package/base/Base/UserMenu.js.map +1 -0
- package/base/Base.d.ts +1 -1
- package/base/Base.js +11 -90
- package/base/Base.js.map +1 -1
- package/base/TelemetryAdminAppStart.d.ts +1 -0
- package/base/TelemetryAdminAppStart.js +19 -0
- package/base/TelemetryAdminAppStart.js.map +1 -0
- package/base/WebinyVersion.d.ts +2 -0
- package/base/WebinyVersion.js +24 -0
- package/base/WebinyVersion.js.map +1 -0
- package/base/createRootContainer.d.ts +2 -0
- package/base/createRootContainer.js +55 -0
- package/base/createRootContainer.js.map +1 -0
- package/base/plugins/AddGraphQLQuerySelection.d.ts +2 -3
- package/base/plugins/AddGraphQLQuerySelection.js +13 -18
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.d.ts +1 -0
- package/base/providers/AdminUiStateProvider.js +14 -0
- package/base/providers/AdminUiStateProvider.js.map +1 -0
- package/base/providers/ApolloProvider.d.ts +5 -2
- package/base/providers/ApolloProvider.js +10 -18
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.d.ts +1 -0
- package/base/providers/UiProviders.js +35 -0
- package/base/providers/UiProviders.js.map +1 -0
- package/base/providers/UiStateProvider.d.ts +1 -2
- package/base/providers/UiStateProvider.js +12 -16
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +39 -2
- package/base/ui/Brand.js +7 -14
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +21 -1
- package/base/ui/CenteredView.js +14 -34
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +39 -2
- package/base/ui/Dashboard.js +7 -14
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +74 -0
- package/base/ui/FileManager.js +66 -0
- package/base/ui/FileManager.js.map +1 -0
- package/base/ui/Layout.d.ts +40 -2
- package/base/ui/Layout.js +10 -18
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +40 -2
- package/base/ui/LoginScreen.js +22 -17
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +38 -7
- package/base/ui/Logo.js +7 -29
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +39 -23
- package/base/ui/Navigation.js +14 -146
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +39 -2
- package/base/ui/NotFound.js +7 -14
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.d.ts +2 -2
- package/base/ui/Tags.js +16 -18
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.d.ts +39 -0
- package/base/ui/TenantSelector.js +8 -0
- package/base/ui/TenantSelector.js.map +1 -0
- package/base/ui/UserMenu/UserMenu.d.ts +39 -0
- package/base/ui/UserMenu/UserMenu.js +8 -0
- package/base/ui/UserMenu/UserMenu.js.map +1 -0
- package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
- package/base/ui/UserMenu/UserMenuHandle.js +8 -0
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
- package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuItem.js +19 -0
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
- package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
- package/base/ui/UserMenu/UserMenuLink.js +19 -0
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
- package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
- package/base/ui/UserMenu.d.ts +79 -29
- package/base/ui/UserMenu.js +16 -110
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.d.ts +2 -1
- package/components/AdminLayout.js +9 -14
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +82 -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 +4 -0
- package/components/Buttons/Buttons.styles.js +17 -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/DeveloperMode/DeveloperMode.d.ts +11 -0
- package/components/DeveloperMode/DeveloperMode.js +17 -0
- package/components/DeveloperMode/DeveloperMode.js.map +1 -0
- package/components/DeveloperMode/index.d.ts +2 -0
- package/components/DeveloperMode/index.js +3 -0
- package/components/DeveloperMode/index.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 +38 -0
- package/components/Dialogs/DialogsContext.js +132 -0
- package/components/Dialogs/DialogsContext.js.map +1 -0
- package/components/Dialogs/useDialogs.d.ts +2 -0
- package/components/Dialogs/useDialogs.js +11 -0
- package/components/Dialogs/useDialogs.js.map +1 -0
- package/components/EmptyView.d.ts +4 -4
- package/components/EmptyView.js +30 -58
- package/components/EmptyView.js.map +1 -1
- 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 +4 -1
- package/components/FloatingActionButton.js +9 -14
- package/components/FloatingActionButton.js.map +1 -1
- package/components/FloatingPanel.d.ts +13 -0
- package/components/FloatingPanel.js +94 -0
- package/components/FloatingPanel.js.map +1 -0
- package/components/IconPicker/IconPicker.d.ts +13 -0
- package/components/IconPicker/IconPicker.js +39 -0
- package/components/IconPicker/IconPicker.js.map +1 -0
- package/components/IconPicker/IconPickerComponent.d.ts +17 -0
- package/components/IconPicker/IconPickerComponent.js +81 -0
- package/components/IconPicker/IconPickerComponent.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.d.ts +53 -0
- package/components/IconPicker/IconPickerPresenter.js +77 -0
- package/components/IconPicker/IconPickerPresenter.js.map +1 -0
- package/components/IconPicker/IconPickerPresenter.test.d.ts +1 -0
- package/components/IconPicker/IconPickerPresenter.test.js +110 -0
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -0
- package/components/IconPicker/IconPickerPresenterProvider.d.ts +9 -0
- package/components/IconPicker/IconPickerPresenterProvider.js +19 -0
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -0
- package/components/IconPicker/IconPickerTab.d.ts +33 -0
- package/components/IconPicker/IconPickerTab.js +159 -0
- package/components/IconPicker/IconPickerTab.js.map +1 -0
- package/components/IconPicker/IconRenderer.d.ts +34 -0
- package/components/IconPicker/IconRenderer.js +27 -0
- package/components/IconPicker/IconRenderer.js.map +1 -0
- package/components/IconPicker/IconRepository.d.ts +19 -0
- package/components/IconPicker/IconRepository.js +47 -0
- package/components/IconPicker/IconRepository.js.map +1 -0
- package/components/IconPicker/IconRepository.test.d.ts +1 -0
- package/components/IconPicker/IconRepository.test.js +67 -0
- package/components/IconPicker/IconRepository.test.js.map +1 -0
- package/components/IconPicker/IconRepositoryFactory.d.ts +9 -0
- package/components/IconPicker/IconRepositoryFactory.js +17 -0
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -0
- package/components/IconPicker/Loading.d.ts +14 -0
- package/components/IconPicker/Loading.js +50 -0
- package/components/IconPicker/Loading.js.map +1 -0
- package/components/IconPicker/components/IconPickerCell.d.ts +12 -0
- package/components/IconPicker/components/IconPickerCell.js +27 -0
- package/components/IconPicker/components/IconPickerCell.js.map +1 -0
- package/components/IconPicker/components/IconPickerContent.d.ts +11 -0
- package/components/IconPicker/components/IconPickerContent.js +41 -0
- package/components/IconPicker/components/IconPickerContent.js.map +1 -0
- package/components/IconPicker/components/IconPickerRow.d.ts +4 -0
- package/components/IconPicker/components/IconPickerRow.js +14 -0
- package/components/IconPicker/components/IconPickerRow.js.map +1 -0
- package/components/IconPicker/components/IconPickerTrigger.d.ts +13 -0
- package/components/IconPicker/components/IconPickerTrigger.js +52 -0
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -0
- package/components/IconPicker/components/index.d.ts +4 -0
- package/components/IconPicker/components/index.js +6 -0
- package/components/IconPicker/components/index.js.map +1 -0
- package/components/IconPicker/config/Emojis.d.ts +2 -0
- package/components/IconPicker/config/Emojis.js +24 -0
- package/components/IconPicker/config/Emojis.js.map +1 -0
- package/components/IconPicker/config/FontAwesomeIcons.d.ts +2 -0
- package/components/IconPicker/config/FontAwesomeIcons.js +61 -0
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -0
- package/components/IconPicker/config/IconPackProvider.d.ts +7 -0
- package/components/IconPicker/config/IconPackProvider.js +23 -0
- package/components/IconPicker/config/IconPackProvider.js.map +1 -0
- package/components/IconPicker/config/IconType.d.ts +32 -0
- package/components/IconPicker/config/IconType.js +89 -0
- package/components/IconPicker/config/IconType.js.map +1 -0
- package/components/IconPicker/config/index.d.ts +31 -0
- package/components/IconPicker/config/index.js +45 -0
- package/components/IconPicker/config/index.js.map +1 -0
- package/components/IconPicker/defaultIcon.d.ts +6 -0
- package/components/IconPicker/defaultIcon.js +8 -0
- package/components/IconPicker/defaultIcon.js.map +1 -0
- package/components/IconPicker/index.d.ts +7 -0
- package/components/IconPicker/index.js +8 -0
- package/components/IconPicker/index.js.map +1 -0
- package/components/IconPicker/plugins/customPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/customPlugin.js +127 -0
- package/components/IconPicker/plugins/customPlugin.js.map +1 -0
- package/components/IconPicker/plugins/emojisPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/emojisPlugin.js +127 -0
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -0
- package/components/IconPicker/plugins/graphql.d.ts +20 -0
- package/components/IconPicker/plugins/graphql.js +27 -0
- package/components/IconPicker/plugins/graphql.js.map +1 -0
- package/components/IconPicker/plugins/iconsPlugin.d.ts +2 -0
- package/components/IconPicker/plugins/iconsPlugin.js +115 -0
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -0
- package/components/IconPicker/types.d.ts +22 -0
- package/components/IconPicker/types.js +10 -0
- package/components/IconPicker/types.js.map +1 -0
- package/components/LexicalEditor/LexicalEditor.d.ts +12 -0
- package/components/LexicalEditor/LexicalEditor.js +40 -0
- package/components/LexicalEditor/LexicalEditor.js.map +1 -0
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +94 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +3 -0
- package/components/LexicalEditor/index.js +5 -0
- package/components/LexicalEditor/index.js.map +1 -0
- package/components/LexicalEditor/lexicalValueWithHtml.d.ts +7 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js +36 -0
- package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -0
- package/components/MultiImageUpload.d.ts +1 -1
- package/components/MultiImageUpload.js +14 -32
- package/components/MultiImageUpload.js.map +1 -1
- package/components/NavigationPrompt.d.ts +27 -0
- package/components/NavigationPrompt.js +39 -0
- package/components/NavigationPrompt.js.map +1 -0
- package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js +20 -0
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
- package/components/NotAuthorizedError/SecureRouteError.svg +1 -0
- package/components/NotAuthorizedError/index.d.ts +1 -0
- package/components/NotAuthorizedError/index.js +3 -0
- package/components/NotAuthorizedError/index.js.map +1 -0
- package/components/OptionsMenu/OptionsMenu.d.ts +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 +6 -17
- package/components/OverlayLayout/OverlayLayout.js +43 -154
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
- package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
- package/components/OverlayLayout/components/OverlayContent.js +21 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
- package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
- package/components/OverlayLayout/components/OverlayHeader.js +44 -0
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
- package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
- package/components/OverlayLayout/components/OverlayRoot.js +22 -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 +2 -15
- package/components/OverlayLayout/index.js.map +1 -1
- 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 +2 -4
- package/components/Permissions/Permissions.js +46 -50
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.d.ts +6 -0
- package/components/Permissions/PermissionsGroup.js +18 -0
- package/components/Permissions/PermissionsGroup.js.map +1 -0
- package/components/Permissions/StyledComponents.d.ts +2 -3
- package/components/Permissions/StyledComponents.js +20 -28
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +4 -2
- package/components/Permissions/index.js +5 -26
- package/components/Permissions/index.js.map +1 -1
- package/components/RegisterFeature.d.ts +11 -0
- package/components/RegisterFeature.js +26 -0
- package/components/RegisterFeature.js.map +1 -0
- package/components/ResizablePanels/index.d.ts +1 -0
- package/components/ResizablePanels/index.js +3 -0
- package/components/ResizablePanels/index.js.map +1 -0
- package/components/RoleAutocomplete/graphql.d.ts +1 -0
- package/components/RoleAutocomplete/graphql.js +18 -0
- package/components/RoleAutocomplete/graphql.js.map +1 -0
- package/components/RoleAutocomplete/index.d.ts +5 -0
- package/components/RoleAutocomplete/index.js +18 -0
- package/components/RoleAutocomplete/index.js.map +1 -0
- package/components/RolesMultiAutocomplete/graphql.d.ts +1 -0
- package/components/RolesMultiAutocomplete/graphql.js +23 -0
- package/components/RolesMultiAutocomplete/graphql.js.map +1 -0
- package/components/RolesMultiAutocomplete/index.d.ts +5 -0
- package/components/RolesMultiAutocomplete/index.js +19 -0
- package/components/RolesMultiAutocomplete/index.js.map +1 -0
- package/components/SearchUI.d.ts +2 -2
- package/components/SearchUI.js +24 -69
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +19 -8
- package/components/SimpleForm/SimpleForm.js +74 -70
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.d.ts +1 -1
- package/components/SimpleForm/index.js +2 -29
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +3 -3
- package/components/SimpleUI/InputField.js +55 -85
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +21 -8
- package/components/SingleImageUpload.js +41 -77
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +11 -9
- package/components/SplitView/SplitView.js +61 -71
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.d.ts +1 -1
- package/components/SplitView/index.js +2 -23
- package/components/SplitView/index.js.map +1 -1
- package/components/StateInspector.d.ts +8 -0
- package/components/StateInspector.js +36 -0
- package/components/StateInspector.js.map +1 -0
- package/components/TeamAutocomplete/graphql.d.ts +1 -0
- package/components/TeamAutocomplete/graphql.js +18 -0
- package/components/TeamAutocomplete/graphql.js.map +1 -0
- package/components/TeamAutocomplete/index.d.ts +5 -0
- package/components/TeamAutocomplete/index.js +18 -0
- package/components/TeamAutocomplete/index.js.map +1 -0
- package/components/TeamsMultiAutocomplete/graphql.d.ts +1 -0
- package/components/TeamsMultiAutocomplete/graphql.js +23 -0
- package/components/TeamsMultiAutocomplete/graphql.js.map +1 -0
- package/components/TeamsMultiAutocomplete/index.d.ts +5 -0
- package/components/TeamsMultiAutocomplete/index.js +19 -0
- package/components/TeamsMultiAutocomplete/index.js.map +1 -0
- package/components/Wcp.d.ts +17 -0
- package/components/Wcp.js +41 -0
- package/components/Wcp.js.map +1 -0
- package/components/index.d.ts +30 -1
- package/components/index.js +30 -11
- package/components/index.js.map +1 -1
- package/config/AdminConfig/Dashboard.d.ts +3 -0
- package/config/AdminConfig/Dashboard.js +6 -0
- package/config/AdminConfig/Dashboard.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Color.d.ts +11 -0
- package/config/AdminConfig/LexicalTheme/Color.js +45 -0
- package/config/AdminConfig/LexicalTheme/Color.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/Typography.d.ts +30 -0
- package/config/AdminConfig/LexicalTheme/Typography.js +79 -0
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -0
- package/config/AdminConfig/LexicalTheme.d.ts +9 -0
- package/config/AdminConfig/LexicalTheme.js +8 -0
- package/config/AdminConfig/LexicalTheme.js.map +1 -0
- package/config/AdminConfig/Logo.d.ts +24 -0
- package/config/AdminConfig/Logo.js +21 -0
- package/config/AdminConfig/Logo.js.map +1 -0
- package/config/AdminConfig/Menu/MenuGroup.d.ts +62 -0
- package/config/AdminConfig/Menu/MenuGroup.js +14 -0
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -0
- package/config/AdminConfig/Menu/MenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuItem.js +14 -0
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/MenuLink.d.ts +43 -0
- package/config/AdminConfig/Menu/MenuLink.js +24 -0
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +43 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +24 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +13 -0
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/SupportMenu.d.ts +72 -0
- package/config/AdminConfig/Menu/SupportMenu.js +49 -0
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +40 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +40 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +7 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/UserMenu/types.js +3 -0
- package/config/AdminConfig/Menu/UserMenu/types.js.map +1 -0
- package/config/AdminConfig/Menu/UserMenu.d.ts +129 -0
- package/config/AdminConfig/Menu/UserMenu.js +61 -0
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -0
- package/config/AdminConfig/Menu/types.d.ts +7 -0
- package/config/AdminConfig/Menu/types.js +3 -0
- package/config/AdminConfig/Menu/types.js.map +1 -0
- package/config/AdminConfig/Menu.d.ts +352 -0
- package/config/AdminConfig/Menu.js +85 -0
- package/config/AdminConfig/Menu.js.map +1 -0
- package/config/AdminConfig/Route.d.ts +3 -0
- package/config/AdminConfig/Route.js +8 -0
- package/config/AdminConfig/Route.js.map +1 -0
- package/config/AdminConfig/Security.d.ts +3 -0
- package/config/AdminConfig/Security.js +6 -0
- package/config/AdminConfig/Security.js.map +1 -0
- package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
- package/config/AdminConfig/SecurityPermissions.js +31 -0
- package/config/AdminConfig/SecurityPermissions.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +24 -0
- package/config/AdminConfig/Tenant/TenantLogo.js +24 -0
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -0
- package/config/AdminConfig/Tenant/TenantName.d.ts +23 -0
- package/config/AdminConfig/Tenant/TenantName.js +19 -0
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
- package/config/AdminConfig/Tenant.d.ts +49 -0
- package/config/AdminConfig/Tenant.js +14 -0
- package/config/AdminConfig/Tenant.js.map +1 -0
- package/config/AdminConfig/Theme/assignColor.d.ts +2 -0
- package/config/AdminConfig/Theme/assignColor.js +22 -0
- package/config/AdminConfig/Theme/assignColor.js.map +1 -0
- package/config/AdminConfig/Theme/consts.d.ts +2 -0
- package/config/AdminConfig/Theme/consts.js +4 -0
- package/config/AdminConfig/Theme/consts.js.map +1 -0
- package/config/AdminConfig/Theme/types.d.ts +3 -0
- package/config/AdminConfig/Theme/types.js +3 -0
- package/config/AdminConfig/Theme/types.js.map +1 -0
- package/config/AdminConfig/Theme.d.ts +16 -0
- package/config/AdminConfig/Theme.js +22 -0
- package/config/AdminConfig/Theme.js.map +1 -0
- package/config/AdminConfig/Title.d.ts +23 -0
- package/config/AdminConfig/Title.js +16 -0
- package/config/AdminConfig/Title.js.map +1 -0
- package/config/AdminConfig/Widget.d.ts +15 -0
- package/config/AdminConfig/Widget.js +36 -0
- package/config/AdminConfig/Widget.js.map +1 -0
- package/config/AdminConfig.d.ts +486 -0
- package/config/AdminConfig.js +73 -0
- package/config/AdminConfig.js.map +1 -0
- package/config/createAdminConfig.d.ts +57 -0
- package/config/createAdminConfig.js +94 -0
- package/config/createAdminConfig.js.map +1 -0
- package/css/tokens.css +379 -0
- package/css/typography.css +70 -0
- package/domain/Identity.d.ts +59 -0
- package/domain/Identity.js +96 -0
- package/domain/Identity.js.map +1 -0
- package/errors/ErrorOverlayNetworkErrorHandler.d.ts +11 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js +66 -0
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -0
- package/errors/TenantIsDisabled.d.ts +2 -0
- package/errors/TenantIsDisabled.js +23 -0
- package/errors/TenantIsDisabled.js.map +1 -0
- package/exports/admin/build-params.d.ts +1 -0
- package/exports/admin/build-params.js +3 -0
- package/exports/admin/build-params.js.map +1 -0
- package/exports/admin/configs.d.ts +1 -0
- package/exports/admin/configs.js +3 -0
- package/exports/admin/configs.js.map +1 -0
- package/exports/admin/form.d.ts +11 -0
- package/exports/admin/form.js +12 -0
- package/exports/admin/form.js.map +1 -0
- package/exports/admin/security.d.ts +8 -0
- package/exports/admin/security.js +10 -0
- package/exports/admin/security.js.map +1 -0
- package/exports/admin/tenancy.d.ts +2 -0
- package/exports/admin/tenancy.js +4 -0
- package/exports/admin/tenancy.js.map +1 -0
- package/exports/admin/ui.d.ts +4 -0
- package/exports/admin/ui.js +6 -0
- package/exports/admin/ui.js.map +1 -0
- package/exports/admin.d.ts +7 -0
- package/exports/admin.js +9 -0
- package/exports/admin.js.map +1 -0
- package/features/apolloClient/abstraction.d.ts +5 -0
- package/features/apolloClient/abstraction.js +4 -0
- package/features/apolloClient/abstraction.js.map +1 -0
- package/features/apolloClient/feature.d.ts +2 -0
- package/features/apolloClient/feature.js +39 -0
- package/features/apolloClient/feature.js.map +1 -0
- package/features/buildParams/BuildParams.d.ts +9 -0
- package/features/buildParams/BuildParams.js +18 -0
- package/features/buildParams/BuildParams.js.map +1 -0
- package/features/buildParams/abstractions.d.ts +15 -0
- package/features/buildParams/abstractions.js +5 -0
- package/features/buildParams/abstractions.js.map +1 -0
- package/features/buildParams/feature.d.ts +1 -0
- package/features/buildParams/feature.js +10 -0
- package/features/buildParams/feature.js.map +1 -0
- package/features/buildParams/index.d.ts +2 -0
- package/features/buildParams/index.js +4 -0
- package/features/buildParams/index.js.map +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.d.ts +15 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +31 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.d.ts +12 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +30 -0
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.d.ts +10 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +17 -0
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -0
- package/features/security/AuthenticationContext/abstractions.d.ts +26 -0
- package/features/security/AuthenticationContext/abstractions.js +5 -0
- package/features/security/AuthenticationContext/abstractions.js.map +1 -0
- package/features/security/AuthenticationContext/feature.d.ts +3 -0
- package/features/security/AuthenticationContext/feature.js +20 -0
- package/features/security/AuthenticationContext/feature.js.map +1 -0
- package/features/security/AuthenticationContext/index.d.ts +1 -0
- package/features/security/AuthenticationContext/index.js +3 -0
- package/features/security/AuthenticationContext/index.js.map +1 -0
- package/features/security/AuthenticationContext/types.d.ts +11 -0
- package/features/security/AuthenticationContext/types.js +3 -0
- package/features/security/AuthenticationContext/types.js.map +1 -0
- package/features/security/IdentityContext/IdentityContext.d.ts +13 -0
- package/features/security/IdentityContext/IdentityContext.js +24 -0
- package/features/security/IdentityContext/IdentityContext.js.map +1 -0
- package/features/security/IdentityContext/abstractions.d.ts +10 -0
- package/features/security/IdentityContext/abstractions.js +4 -0
- package/features/security/IdentityContext/abstractions.js.map +1 -0
- package/features/security/IdentityContext/feature.d.ts +3 -0
- package/features/security/IdentityContext/feature.js +16 -0
- package/features/security/IdentityContext/feature.js.map +1 -0
- package/features/security/IdentityContext/index.d.ts +2 -0
- package/features/security/IdentityContext/index.js +4 -0
- package/features/security/IdentityContext/index.js.map +1 -0
- package/features/security/LogIn/IdentityMapper.d.ts +9 -0
- package/features/security/LogIn/IdentityMapper.js +13 -0
- package/features/security/LogIn/IdentityMapper.js.map +1 -0
- package/features/security/LogIn/LogInGateway.d.ts +11 -0
- package/features/security/LogIn/LogInGateway.js +27 -0
- package/features/security/LogIn/LogInGateway.js.map +1 -0
- package/features/security/LogIn/LogInRepository.d.ts +14 -0
- package/features/security/LogIn/LogInRepository.js +19 -0
- package/features/security/LogIn/LogInRepository.js.map +1 -0
- package/features/security/LogIn/LogInUseCase.d.ts +15 -0
- package/features/security/LogIn/LogInUseCase.js +40 -0
- package/features/security/LogIn/LogInUseCase.js.map +1 -0
- package/features/security/LogIn/abstractions.d.ts +48 -0
- package/features/security/LogIn/abstractions.js +19 -0
- package/features/security/LogIn/abstractions.js.map +1 -0
- package/features/security/LogIn/createLoginMutation.d.ts +1 -0
- package/features/security/LogIn/createLoginMutation.js +49 -0
- package/features/security/LogIn/createLoginMutation.js.map +1 -0
- package/features/security/LogIn/feature.d.ts +3 -0
- package/features/security/LogIn/feature.js +22 -0
- package/features/security/LogIn/feature.js.map +1 -0
- package/features/security/LogIn/index.d.ts +1 -0
- package/features/security/LogIn/index.js +3 -0
- package/features/security/LogIn/index.js.map +1 -0
- package/features/security/LogOut/LogOutUseCase.d.ts +13 -0
- package/features/security/LogOut/LogOutUseCase.js +23 -0
- package/features/security/LogOut/LogOutUseCase.js.map +1 -0
- package/features/security/LogOut/abstractions.d.ts +7 -0
- package/features/security/LogOut/abstractions.js +4 -0
- package/features/security/LogOut/abstractions.js.map +1 -0
- package/features/security/LogOut/feature.d.ts +3 -0
- package/features/security/LogOut/feature.js +16 -0
- package/features/security/LogOut/feature.js.map +1 -0
- package/features/security/LogOut/index.d.ts +2 -0
- package/features/security/LogOut/index.js +4 -0
- package/features/security/LogOut/index.js.map +1 -0
- package/features/security/SecurityFeature.d.ts +1 -0
- package/features/security/SecurityFeature.js +16 -0
- package/features/security/SecurityFeature.js.map +1 -0
- package/features/telemetry/TelemetryService.d.ts +6 -0
- package/features/telemetry/TelemetryService.js +20 -0
- package/features/telemetry/TelemetryService.js.map +1 -0
- package/features/telemetry/abstractions.d.ts +7 -0
- package/features/telemetry/abstractions.js +4 -0
- package/features/telemetry/abstractions.js.map +1 -0
- package/features/telemetry/feature.d.ts +3 -0
- package/features/telemetry/feature.js +16 -0
- package/features/telemetry/feature.js.map +1 -0
- package/features/telemetry/index.d.ts +2 -0
- package/features/telemetry/index.js +4 -0
- package/features/telemetry/index.js.map +1 -0
- package/features/tenancy/GraphQLClientDecorator.d.ts +12 -0
- package/features/tenancy/GraphQLClientDecorator.js +27 -0
- package/features/tenancy/GraphQLClientDecorator.js.map +1 -0
- package/features/tenancy/TenantContext.d.ts +17 -0
- package/features/tenancy/TenantContext.js +61 -0
- package/features/tenancy/TenantContext.js.map +1 -0
- package/features/tenancy/abstractions.d.ts +14 -0
- package/features/tenancy/abstractions.js +4 -0
- package/features/tenancy/abstractions.js.map +1 -0
- package/features/tenancy/feature.d.ts +5 -0
- package/features/tenancy/feature.js +41 -0
- package/features/tenancy/feature.js.map +1 -0
- package/features/tenancy/types.d.ts +4 -0
- package/features/tenancy/types.js +3 -0
- package/features/tenancy/types.js.map +1 -0
- package/features/wcp/ReactLicense.d.ts +19 -0
- package/features/wcp/ReactLicense.js +46 -0
- package/features/wcp/ReactLicense.js.map +1 -0
- package/features/wcp/WcpGateway.d.ts +10 -0
- package/features/wcp/WcpGateway.js +73 -0
- package/features/wcp/WcpGateway.js.map +1 -0
- package/features/wcp/WcpService.d.ts +20 -0
- package/features/wcp/WcpService.js +84 -0
- package/features/wcp/WcpService.js.map +1 -0
- package/features/wcp/abstractions.d.ts +19 -0
- package/features/wcp/abstractions.js +5 -0
- package/features/wcp/abstractions.js.map +1 -0
- package/features/wcp/feature.d.ts +3 -0
- package/features/wcp/feature.js +18 -0
- package/features/wcp/feature.js.map +1 -0
- package/features/wcp/types.d.ts +21 -0
- package/features/wcp/types.js +3 -0
- package/features/wcp/types.js.map +1 -0
- package/hooks/index.d.ts +11 -0
- package/hooks/index.js +13 -0
- package/hooks/index.js.map +1 -0
- package/hooks/useConfirmationDialog.d.ts +5 -3
- package/hooks/useConfirmationDialog.js +28 -34
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +21 -2
- package/hooks/useDialog.js +18 -22
- package/hooks/useDialog.js.map +1 -1
- 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 +29 -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 +1 -0
- package/hooks/useSnackbar.js +25 -26
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +1 -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/hooks/useToggler.d.ts +7 -0
- package/hooks/useToggler.js +15 -0
- package/hooks/useToggler.js.map +1 -0
- package/index.d.ts +34 -33
- package/index.js +45 -324
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +66 -62
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +219 -0
- package/permissions/PermissionRenderer.js.map +1 -0
- package/permissions/PermissionValueContext.d.ts +11 -0
- package/permissions/PermissionValueContext.js +23 -0
- package/permissions/PermissionValueContext.js.map +1 -0
- package/permissions/createHasPermission.d.ts +3 -0
- package/permissions/createHasPermission.js +36 -0
- package/permissions/createHasPermission.js.map +1 -0
- package/permissions/createPermissionSchema.d.ts +2 -0
- package/permissions/createPermissionSchema.js +8 -0
- package/permissions/createPermissionSchema.js.map +1 -0
- package/permissions/index.d.ts +8 -0
- package/permissions/index.js +8 -0
- package/permissions/index.js.map +1 -0
- package/permissions/types.d.ts +242 -0
- package/permissions/types.js +3 -0
- package/permissions/types.js.map +1 -0
- package/permissions/usePermissionForm.d.ts +17 -0
- package/permissions/usePermissionForm.js +256 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +180 -0
- package/permissions/usePermissions.js.map +1 -0
- package/plugins/MenuPlugin.d.ts +1 -1
- package/plugins/MenuPlugin.js +17 -41
- package/plugins/MenuPlugin.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +70 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.d.ts +2 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +17 -0
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/index.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/index.js +3 -0
- package/presentation/installation/components/SystemInstaller/index.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +32 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +15 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +69 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +95 -0
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.d.ts +4 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js +10 -0
- package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.d.ts +8 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js +28 -0
- package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.d.ts +11 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +58 -0
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.d.ts +7 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +21 -0
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/introduction.svg +154 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.d.ts +1 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js +3 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +10 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +63 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.d.ts +24 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +138 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.d.ts +11 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +30 -0
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.d.ts +59 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js +6 -0
- package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/feature.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js +20 -0
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -0
- package/presentation/installation/presenters/SystemInstaller/index.d.ts +3 -0
- package/presentation/installation/presenters/SystemInstaller/index.js +4 -0
- package/presentation/installation/presenters/SystemInstaller/index.js.map +1 -0
- package/presentation/security/components/HasPermission.d.ts +10 -0
- package/presentation/security/components/HasPermission.js +31 -0
- package/presentation/security/components/HasPermission.js.map +1 -0
- package/presentation/security/components/SecureRoute.d.ts +7 -0
- package/presentation/security/components/SecureRoute.js +16 -0
- package/presentation/security/components/SecureRoute.js.map +1 -0
- package/presentation/security/hooks/useAuthentication.d.ts +9 -0
- package/presentation/security/hooks/useAuthentication.js +24 -0
- package/presentation/security/hooks/useAuthentication.js.map +1 -0
- package/presentation/security/hooks/useIdentity.d.ts +6 -0
- package/presentation/security/hooks/useIdentity.js +25 -0
- package/presentation/security/hooks/useIdentity.js.map +1 -0
- package/presentation/security/hooks/useSecurity.d.ts +10 -0
- package/presentation/security/hooks/useSecurity.js +28 -0
- package/presentation/security/hooks/useSecurity.js.map +1 -0
- package/presentation/tenancy/TenancyProvider.d.ts +6 -0
- package/presentation/tenancy/TenancyProvider.js +43 -0
- package/presentation/tenancy/TenancyProvider.js.map +1 -0
- package/presentation/tenancy/createTenancyProvider.d.ts +1 -0
- package/presentation/tenancy/createTenancyProvider.js +14 -0
- package/presentation/tenancy/createTenancyProvider.js.map +1 -0
- package/presentation/tenancy/useTenantContext.d.ts +5 -0
- package/presentation/tenancy/useTenantContext.js +24 -0
- package/presentation/tenancy/useTenantContext.js.map +1 -0
- package/presentation/wcp/WcpProvider.d.ts +7 -0
- package/presentation/wcp/WcpProvider.js +26 -0
- package/presentation/wcp/WcpProvider.js.map +1 -0
- package/presentation/wcp/useWcp.d.ts +2 -0
- package/presentation/wcp/useWcp.js +18 -0
- package/presentation/wcp/useWcp.js.map +1 -0
- package/routes.d.ts +6 -0
- package/routes.js +17 -0
- package/routes.js.map +1 -0
- package/styles.scss +7 -2
- package/types.d.ts +8 -92
- package/types.js +2 -4
- package/types.js.map +1 -1
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/base/providers/TelemetryProvider.d.ts +0 -2
- package/base/providers/TelemetryProvider.js +0 -31
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -17
- package/base/providers/ViewCompositionProvider.js +0 -57
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -2
- package/base/ui/LocaleSelector.js +0 -15
- package/base/ui/LocaleSelector.js.map +0 -1
- package/base/ui/Menu.d.ts +0 -31
- package/base/ui/Menu.js +0 -137
- package/base/ui/Menu.js.map +0 -1
- package/base/ui/Search.d.ts +0 -19
- package/base/ui/Search.js +0 -63
- package/base/ui/Search.js.map +0 -1
- package/components/AppInstaller/AppInstaller.d.ts +0 -7
- package/components/AppInstaller/AppInstaller.js +0 -149
- package/components/AppInstaller/AppInstaller.js.map +0 -1
- package/components/AppInstaller/Sidebar.d.ts +0 -9
- package/components/AppInstaller/Sidebar.js +0 -155
- package/components/AppInstaller/Sidebar.js.map +0 -1
- package/components/AppInstaller/assets/sign-in-divider.svg +0 -19
- package/components/AppInstaller/index.d.ts +0 -2
- package/components/AppInstaller/index.js +0 -22
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -9
- package/components/AppInstaller/styled.js +0 -87
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -31
- package/components/AppInstaller/useInstaller.js +0 -265
- package/components/AppInstaller/useInstaller.js.map +0 -1
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -41
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -51
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
- package/components/FileManager/BottomInfoBar.d.ts +0 -5
- package/components/FileManager/BottomInfoBar.js +0 -48
- package/components/FileManager/BottomInfoBar.js.map +0 -1
- package/components/FileManager/DropFilesHere.d.ts +0 -10
- package/components/FileManager/DropFilesHere.js +0 -67
- package/components/FileManager/DropFilesHere.js.map +0 -1
- package/components/FileManager/File.d.ts +0 -17
- package/components/FileManager/File.js +0 -142
- package/components/FileManager/File.js.map +0 -1
- package/components/FileManager/FileDetails/Name.d.ts +0 -8
- package/components/FileManager/FileDetails/Name.js +0 -108
- package/components/FileManager/FileDetails/Name.js.map +0 -1
- package/components/FileManager/FileDetails/Tags.d.ts +0 -10
- package/components/FileManager/FileDetails/Tags.js +0 -286
- package/components/FileManager/FileDetails/Tags.js.map +0 -1
- package/components/FileManager/FileDetails.d.ts +0 -24
- package/components/FileManager/FileDetails.js +0 -407
- package/components/FileManager/FileDetails.js.map +0 -1
- package/components/FileManager/FileManagerContext.d.ts +0 -42
- package/components/FileManager/FileManagerContext.js +0 -191
- package/components/FileManager/FileManagerContext.js.map +0 -1
- package/components/FileManager/FileManagerView.d.ts +0 -18
- package/components/FileManager/FileManagerView.js +0 -611
- package/components/FileManager/FileManagerView.js.map +0 -1
- package/components/FileManager/LeftSidebar.d.ts +0 -10
- package/components/FileManager/LeftSidebar.js +0 -108
- package/components/FileManager/LeftSidebar.js.map +0 -1
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -74
- package/components/FileManager/NoPermissionView.js.map +0 -1
- package/components/FileManager/NoResults.d.ts +0 -3
- package/components/FileManager/NoResults.js +0 -22
- package/components/FileManager/NoResults.js.map +0 -1
- package/components/FileManager/getFileTypePlugin.d.ts +0 -4
- package/components/FileManager/getFileTypePlugin.js +0 -51
- package/components/FileManager/getFileTypePlugin.js.map +0 -1
- package/components/FileManager/getFileUploader.d.ts +0 -3
- package/components/FileManager/getFileUploader.js +0 -15
- package/components/FileManager/getFileUploader.js.map +0 -1
- package/components/FileManager/graphql.d.ts +0 -96
- package/components/FileManager/graphql.js +0 -47
- package/components/FileManager/graphql.js.map +0 -1
- 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 -7
- package/components/FileManager/outputFileSelectionError.js +0 -40
- package/components/FileManager/outputFileSelectionError.js.map +0 -1
- package/components/FileManager/types.d.ts +0 -21
- package/components/FileManager/types.js +0 -5
- package/components/FileManager/types.js.map +0 -1
- package/components/FileManager.d.ts +0 -67
- package/components/FileManager.js +0 -118
- package/components/FileManager.js.map +0 -1
- package/components/OverlayLayout/icons/close.svg +0 -13
- package/components/OverlayLayout/icons/navigate_before.svg +0 -16
- package/components/RichTextEditor/RichTextEditor.d.ts +0 -3
- package/components/RichTextEditor/RichTextEditor.js +0 -23
- package/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/components/RichTextEditor/index.d.ts +0 -2
- package/components/RichTextEditor/index.js +0 -19
- package/components/RichTextEditor/index.js.map +0 -1
- package/components/RichTextEditor/styles.scss +0 -96
- package/components/RichTextEditor/tools/header/index.d.ts +0 -229
- package/components/RichTextEditor/tools/header/index.js +0 -691
- package/components/RichTextEditor/tools/header/index.js.map +0 -1
- package/components/RichTextEditor/tools/header/styles.scss +0 -48
- package/components/RichTextEditor/tools/image/index.d.ts +0 -124
- package/components/RichTextEditor/tools/image/index.js +0 -244
- package/components/RichTextEditor/tools/image/index.js.map +0 -1
- package/components/RichTextEditor/tools/image/styles.scss +0 -90
- package/components/RichTextEditor/tools/image/svgs.d.ts +0 -6
- package/components/RichTextEditor/tools/image/svgs.js +0 -12
- package/components/RichTextEditor/tools/image/svgs.js.map +0 -1
- package/components/RichTextEditor/tools/image/tunes.d.ts +0 -57
- package/components/RichTextEditor/tools/image/tunes.js +0 -129
- package/components/RichTextEditor/tools/image/tunes.js.map +0 -1
- package/components/RichTextEditor/tools/image/types.d.ts +0 -29
- package/components/RichTextEditor/tools/image/types.js +0 -5
- package/components/RichTextEditor/tools/image/types.js.map +0 -1
- package/components/RichTextEditor/tools/image/ui.d.ts +0 -122
- package/components/RichTextEditor/tools/image/ui.js +0 -278
- package/components/RichTextEditor/tools/image/ui.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -209
- package/components/RichTextEditor/tools/paragraph/index.js +0 -488
- package/components/RichTextEditor/tools/paragraph/index.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/styles.scss +0 -29
- package/components/RichTextEditor/tools/textColor/index.d.ts +0 -64
- package/components/RichTextEditor/tools/textColor/index.js +0 -245
- package/components/RichTextEditor/tools/textColor/index.js.map +0 -1
- package/components/RichTextEditor/tools/textColor/styles.scss +0 -21
- package/components/RichTextEditor/tools/utils.d.ts +0 -19
- package/components/RichTextEditor/tools/utils.js +0 -31
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -42
- package/components/Routes.js.map +0 -1
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -48
- package/plugins/FileManagerFileTypePlugin.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -43
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/plugins/fileManager/fileDefault.d.ts +0 -2
- package/plugins/fileManager/fileDefault.js +0 -28
- package/plugins/fileManager/fileDefault.js.map +0 -1
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -59
- package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
- package/plugins/fileManager/fileImage/EditAction.js +0 -143
- package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
- package/plugins/fileManager/fileImage/index.d.ts +0 -2
- package/plugins/fileManager/fileImage/index.js +0 -38
- package/plugins/fileManager/fileImage/index.js.map +0 -1
- 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 -19
- package/plugins/fileManager/index.js.map +0 -1
- package/plugins/globalSearch/SearchBar.d.ts +0 -15
- package/plugins/globalSearch/SearchBar.js +0 -225
- package/plugins/globalSearch/SearchBar.js.map +0 -1
- package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -23
- package/plugins/globalSearch/SearchBarDropdown.js +0 -83
- package/plugins/globalSearch/SearchBarDropdown.js.map +0 -1
- package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
- package/plugins/globalSearch/index.d.ts +0 -7
- package/plugins/globalSearch/index.js +0 -16
- package/plugins/globalSearch/index.js.map +0 -1
- package/plugins/globalSearch/styled.d.ts +0 -11
- package/plugins/globalSearch/styled.js +0 -131
- package/plugins/globalSearch/styled.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -61
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/styles/material-theme-assignments.scss +0 -350
- package/styles/material.scss +0 -43
- package/styles/theme.scss +0 -76
- package/ui/UIElement.d.ts +0 -2
- package/ui/UIElement.js +0 -18
- package/ui/UIElement.js.map +0 -1
- package/ui/UILayout.d.ts +0 -1
- package/ui/UILayout.js +0 -18
- package/ui/UILayout.js.map +0 -1
- package/ui/UIRenderer.d.ts +0 -2
- package/ui/UIRenderer.js +0 -12
- package/ui/UIRenderer.js.map +0 -1
- package/ui/UIView.d.ts +0 -2
- package/ui/UIView.js +0 -24
- package/ui/UIView.js.map +0 -1
- package/ui/elements/AccordionElement.d.ts +0 -27
- package/ui/elements/AccordionElement.js +0 -84
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -24
- package/ui/elements/ButtonElement.js +0 -86
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -6
- package/ui/elements/ButtonGroupElement.js +0 -48
- package/ui/elements/ButtonGroupElement.js.map +0 -1
- package/ui/elements/GenericElement.d.ts +0 -1
- package/ui/elements/GenericElement.js +0 -16
- package/ui/elements/GenericElement.js.map +0 -1
- package/ui/elements/LabelElement.d.ts +0 -16
- package/ui/elements/LabelElement.js +0 -46
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -33
- package/ui/elements/NavigationMenuElement.js +0 -144
- package/ui/elements/NavigationMenuElement.js.map +0 -1
- package/ui/elements/PanelElement.d.ts +0 -3
- package/ui/elements/PanelElement.js +0 -22
- package/ui/elements/PanelElement.js.map +0 -1
- package/ui/elements/PlaceholderElement.d.ts +0 -6
- package/ui/elements/PlaceholderElement.js +0 -33
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -6
- package/ui/elements/SmallButtonElement.js +0 -45
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -13
- package/ui/elements/TypographyElement.js +0 -48
- package/ui/elements/TypographyElement.js.map +0 -1
- package/ui/elements/ViewElement.d.ts +0 -1
- package/ui/elements/ViewElement.js +0 -16
- package/ui/elements/ViewElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +0 -6
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -44
- package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +0 -1
- package/ui/elements/form/DynamicFieldsetElement.d.ts +0 -43
- package/ui/elements/form/DynamicFieldsetElement.js +0 -135
- package/ui/elements/form/DynamicFieldsetElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElement.d.ts +0 -4
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js +0 -26
- package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +0 -1
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +0 -7
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +0 -73
- package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +0 -13
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +0 -104
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +0 -20
- package/ui/elements/form/FileManagerElement/styled.js +0 -115
- package/ui/elements/form/FileManagerElement/styled.js.map +0 -1
- package/ui/elements/form/FileManagerElement.d.ts +0 -24
- package/ui/elements/form/FileManagerElement.js +0 -88
- package/ui/elements/form/FileManagerElement.js.map +0 -1
- package/ui/elements/form/FormElement.d.ts +0 -21
- package/ui/elements/form/FormElement.js +0 -45
- package/ui/elements/form/FormElement.js.map +0 -1
- package/ui/elements/form/FormFieldElement.d.ts +0 -56
- package/ui/elements/form/FormFieldElement.js +0 -173
- package/ui/elements/form/FormFieldElement.js.map +0 -1
- package/ui/elements/form/HiddenElement.d.ts +0 -6
- package/ui/elements/form/HiddenElement.js +0 -47
- package/ui/elements/form/HiddenElement.js.map +0 -1
- package/ui/elements/form/InputElement.d.ts +0 -7
- package/ui/elements/form/InputElement.js +0 -54
- package/ui/elements/form/InputElement.js.map +0 -1
- package/ui/elements/form/PasswordElement.d.ts +0 -6
- package/ui/elements/form/PasswordElement.js +0 -51
- package/ui/elements/form/PasswordElement.js.map +0 -1
- package/ui/elements/form/README.md +0 -2
- package/ui/elements/form/SelectElement.d.ts +0 -15
- package/ui/elements/form/SelectElement.js +0 -69
- package/ui/elements/form/SelectElement.js.map +0 -1
- package/ui/elements/form/TextareaElement.d.ts +0 -15
- package/ui/elements/form/TextareaElement.js +0 -55
- package/ui/elements/form/TextareaElement.js.map +0 -1
- package/ui/views/AdminView/ContentElement.d.ts +0 -4
- package/ui/views/AdminView/ContentElement.js +0 -54
- package/ui/views/AdminView/ContentElement.js.map +0 -1
- package/ui/views/AdminView/HeaderElement.d.ts +0 -13
- package/ui/views/AdminView/HeaderElement.js +0 -104
- package/ui/views/AdminView/HeaderElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -42
- package/ui/views/AdminView/HeaderSectionCenterElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -42
- package/ui/views/AdminView/HeaderSectionLeftElement.js.map +0 -1
- package/ui/views/AdminView/HeaderSectionRightElement.d.ts +0 -6
- package/ui/views/AdminView/HeaderSectionRightElement.js +0 -42
- package/ui/views/AdminView/HeaderSectionRightElement.js.map +0 -1
- package/ui/views/AdminView/components/Dialog.d.ts +0 -2
- package/ui/views/AdminView/components/Dialog.js +0 -46
- package/ui/views/AdminView/components/Dialog.js.map +0 -1
- package/ui/views/AdminView/components/Hamburger.d.ts +0 -3
- package/ui/views/AdminView/components/Hamburger.js +0 -31
- package/ui/views/AdminView/components/Hamburger.js.map +0 -1
- package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
- package/ui/views/AdminView/components/Snackbar.js +0 -32
- package/ui/views/AdminView/components/Snackbar.js.map +0 -1
- package/ui/views/FormView/FormContainerElement.d.ts +0 -12
- package/ui/views/FormView/FormContainerElement.js +0 -50
- package/ui/views/FormView/FormContainerElement.js.map +0 -1
- package/ui/views/FormView/FormContentElement.d.ts +0 -3
- package/ui/views/FormView/FormContentElement.js +0 -22
- package/ui/views/FormView/FormContentElement.js.map +0 -1
- package/ui/views/FormView/FormFooterElement.d.ts +0 -6
- package/ui/views/FormView/FormFooterElement.js +0 -49
- package/ui/views/FormView/FormFooterElement.js.map +0 -1
- package/ui/views/FormView/FormHeaderElement.d.ts +0 -14
- package/ui/views/FormView/FormHeaderElement.js +0 -81
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -167
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -6
- package/ui/views/OverlayView/ContentElement.js +0 -42
- package/ui/views/OverlayView/ContentElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderElement.d.ts +0 -24
- package/ui/views/OverlayView/HeaderElement.js +0 -112
- package/ui/views/OverlayView/HeaderElement.js.map +0 -1
- package/ui/views/OverlayView/HeaderTitleElement.d.ts +0 -13
- package/ui/views/OverlayView/HeaderTitleElement.js +0 -51
- package/ui/views/OverlayView/HeaderTitleElement.js.map +0 -1
- package/ui/views/OverlayView/useOverlayView.d.ts +0 -5
- package/ui/views/OverlayView/useOverlayView.js +0 -44
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -29
- package/ui/views/OverlayView.js +0 -165
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -11
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -71
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -122
- package/ui/views/SplitView.js.map +0 -1
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import React, { Fragment, useCallback, useMemo } from "react";
|
|
2
|
+
import { CheckboxGroup, Grid, Select } from "@webiny/admin-ui";
|
|
3
|
+
import { Form } from "@webiny/form";
|
|
4
|
+
import { CannotUseAaclAlert, PermissionInfo, PermissionsGroup } from "../components/Permissions/index.js";
|
|
5
|
+
import { usePermissionForm } from "./usePermissionForm.js";
|
|
6
|
+
import { usePermissionValue } from "./PermissionValueContext.js";
|
|
7
|
+
import { useAuthentication } from "../exports/admin/security.js";
|
|
8
|
+
const NO_ACCESS = "no";
|
|
9
|
+
const FULL_ACCESS = "full";
|
|
10
|
+
const READ_ONLY_ACCESS = "read-only";
|
|
11
|
+
const CUSTOM_ACCESS = "custom";
|
|
12
|
+
const RWD_OPTIONS = [{
|
|
13
|
+
value: "r",
|
|
14
|
+
label: "Read"
|
|
15
|
+
}, {
|
|
16
|
+
value: "rw",
|
|
17
|
+
label: "Read, write"
|
|
18
|
+
}, {
|
|
19
|
+
value: "rwd",
|
|
20
|
+
label: "Read, write, delete"
|
|
21
|
+
}];
|
|
22
|
+
const PW_OPTIONS = [{
|
|
23
|
+
value: "p",
|
|
24
|
+
label: "Publish"
|
|
25
|
+
}, {
|
|
26
|
+
value: "u",
|
|
27
|
+
label: "Unpublish"
|
|
28
|
+
}];
|
|
29
|
+
function hasAction(entity, name) {
|
|
30
|
+
return entity.actions?.some(a => a.name === name) ?? false;
|
|
31
|
+
}
|
|
32
|
+
function buildScopeOptions(entity) {
|
|
33
|
+
const options = [{
|
|
34
|
+
value: NO_ACCESS,
|
|
35
|
+
label: "No access"
|
|
36
|
+
}];
|
|
37
|
+
if (entity.scopes.includes("full")) {
|
|
38
|
+
options.push({
|
|
39
|
+
value: FULL_ACCESS,
|
|
40
|
+
label: "Full access"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (entity.scopes.includes("own")) {
|
|
44
|
+
options.push({
|
|
45
|
+
value: "own",
|
|
46
|
+
label: "Only entries created by the user"
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return options;
|
|
50
|
+
}
|
|
51
|
+
const BUILTIN_ACTIONS = new Set(["rwd", "pw"]);
|
|
52
|
+
function getCustomActions(entity) {
|
|
53
|
+
return (entity.actions ?? []).filter(a => !BUILTIN_ACTIONS.has(a.name));
|
|
54
|
+
}
|
|
55
|
+
function EntitySection({
|
|
56
|
+
entity,
|
|
57
|
+
data,
|
|
58
|
+
cannotUseAAcl,
|
|
59
|
+
Bind,
|
|
60
|
+
setValue
|
|
61
|
+
}) {
|
|
62
|
+
const scopeField = `${entity.id}AccessScope`;
|
|
63
|
+
const currentScope = data[scopeField];
|
|
64
|
+
const scopeDisabled = cannotUseAAcl || !currentScope || currentScope === NO_ACCESS;
|
|
65
|
+
const customActions = useMemo(() => getCustomActions(entity), [entity]);
|
|
66
|
+
|
|
67
|
+
// Derive the selected values array from individual boolean form fields.
|
|
68
|
+
const customActionsValue = useMemo(() => {
|
|
69
|
+
return customActions.filter(a => data[`${entity.id}Action_${a.name}`]).map(a => a.name);
|
|
70
|
+
}, [data, customActions, entity.id]);
|
|
71
|
+
const onCustomActionsChange = useCallback(selected => {
|
|
72
|
+
const selectedSet = new Set(selected);
|
|
73
|
+
for (const action of customActions) {
|
|
74
|
+
setValue(`${entity.id}Action_${action.name}`, selectedSet.has(action.name));
|
|
75
|
+
}
|
|
76
|
+
}, [customActions, entity.id, setValue]);
|
|
77
|
+
const columns = [/*#__PURE__*/React.createElement(Grid.Column, {
|
|
78
|
+
span: 12,
|
|
79
|
+
key: "access"
|
|
80
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
81
|
+
name: scopeField,
|
|
82
|
+
beforeChange: (value, cb) => {
|
|
83
|
+
if (value === "own" && hasAction(entity, "rwd")) {
|
|
84
|
+
setValue(`${entity.id}RWD`, "rwd");
|
|
85
|
+
}
|
|
86
|
+
cb(value);
|
|
87
|
+
}
|
|
88
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
89
|
+
label: "Access Scope",
|
|
90
|
+
disabled: cannotUseAAcl,
|
|
91
|
+
options: buildScopeOptions(entity)
|
|
92
|
+
})))];
|
|
93
|
+
if (hasAction(entity, "rwd")) {
|
|
94
|
+
columns.push(/*#__PURE__*/React.createElement(Grid.Column, {
|
|
95
|
+
span: 12,
|
|
96
|
+
key: "rwd"
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
98
|
+
name: `${entity.id}RWD`
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
100
|
+
label: "Primary Actions",
|
|
101
|
+
disabled: scopeDisabled || currentScope === "own",
|
|
102
|
+
options: RWD_OPTIONS
|
|
103
|
+
}))));
|
|
104
|
+
}
|
|
105
|
+
if (hasAction(entity, "pw")) {
|
|
106
|
+
columns.push(/*#__PURE__*/React.createElement(Grid.Column, {
|
|
107
|
+
span: 12,
|
|
108
|
+
key: "pw"
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
110
|
+
name: `${entity.id}PW`
|
|
111
|
+
}, /*#__PURE__*/React.createElement(CheckboxGroup, {
|
|
112
|
+
label: "Publishing actions",
|
|
113
|
+
description: "Publishing-related actions that can be performed on entries.",
|
|
114
|
+
items: PW_OPTIONS.map(opt => ({
|
|
115
|
+
...opt,
|
|
116
|
+
disabled: scopeDisabled
|
|
117
|
+
}))
|
|
118
|
+
}))));
|
|
119
|
+
}
|
|
120
|
+
if (customActions.length > 0) {
|
|
121
|
+
columns.push(/*#__PURE__*/React.createElement(Grid.Column, {
|
|
122
|
+
span: 12,
|
|
123
|
+
key: "other"
|
|
124
|
+
}, /*#__PURE__*/React.createElement(CheckboxGroup, {
|
|
125
|
+
label: "Other Actions",
|
|
126
|
+
value: customActionsValue,
|
|
127
|
+
onChange: onCustomActionsChange,
|
|
128
|
+
items: customActions.map(action => ({
|
|
129
|
+
value: action.name,
|
|
130
|
+
label: action.label || action.name,
|
|
131
|
+
disabled: scopeDisabled
|
|
132
|
+
}))
|
|
133
|
+
})));
|
|
134
|
+
}
|
|
135
|
+
return /*#__PURE__*/React.createElement(PermissionsGroup, {
|
|
136
|
+
title: entity.title || entity.id
|
|
137
|
+
}, /*#__PURE__*/React.createElement(Grid, null, columns));
|
|
138
|
+
}
|
|
139
|
+
export const PermissionRenderer = ({
|
|
140
|
+
schema
|
|
141
|
+
}) => {
|
|
142
|
+
const {
|
|
143
|
+
value,
|
|
144
|
+
onChange
|
|
145
|
+
} = usePermissionValue();
|
|
146
|
+
const {
|
|
147
|
+
identity
|
|
148
|
+
} = useAuthentication();
|
|
149
|
+
const cannotUseAAcl = useMemo(() => {
|
|
150
|
+
return !identity.getPermission("aacl", true);
|
|
151
|
+
}, []);
|
|
152
|
+
const {
|
|
153
|
+
formData,
|
|
154
|
+
onFormChange
|
|
155
|
+
} = usePermissionForm(schema, {
|
|
156
|
+
value,
|
|
157
|
+
onChange
|
|
158
|
+
});
|
|
159
|
+
const entities = schema.entities || [];
|
|
160
|
+
const hasEntities = entities.length > 0;
|
|
161
|
+
const accessLevelOptions = useMemo(() => {
|
|
162
|
+
const options = [{
|
|
163
|
+
value: NO_ACCESS,
|
|
164
|
+
label: "No access"
|
|
165
|
+
}];
|
|
166
|
+
if (schema.readOnlyAccess) {
|
|
167
|
+
options.push({
|
|
168
|
+
value: READ_ONLY_ACCESS,
|
|
169
|
+
label: "Read-only access"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
options.push({
|
|
173
|
+
value: FULL_ACCESS,
|
|
174
|
+
label: "Full access"
|
|
175
|
+
});
|
|
176
|
+
if (hasEntities) {
|
|
177
|
+
options.push({
|
|
178
|
+
value: CUSTOM_ACCESS,
|
|
179
|
+
label: "Custom access"
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
return options;
|
|
183
|
+
}, [schema, hasEntities]);
|
|
184
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
185
|
+
data: formData,
|
|
186
|
+
onChange: onFormChange
|
|
187
|
+
}, ({
|
|
188
|
+
data,
|
|
189
|
+
Bind,
|
|
190
|
+
setValue
|
|
191
|
+
}) => /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Grid, {
|
|
192
|
+
className: "pt-md"
|
|
193
|
+
}, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
194
|
+
span: 12
|
|
195
|
+
}, data.accessLevel === CUSTOM_ACCESS && cannotUseAAcl && /*#__PURE__*/React.createElement(CannotUseAaclAlert, null))), /*#__PURE__*/React.createElement(Grid, {
|
|
196
|
+
className: "pt-md"
|
|
197
|
+
}, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
198
|
+
span: 6
|
|
199
|
+
}, /*#__PURE__*/React.createElement(PermissionInfo, {
|
|
200
|
+
title: "Access Level"
|
|
201
|
+
})), /*#__PURE__*/React.createElement(Grid.Column, {
|
|
202
|
+
span: 6
|
|
203
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
204
|
+
name: "accessLevel"
|
|
205
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
206
|
+
options: accessLevelOptions
|
|
207
|
+
})))), data.accessLevel === CUSTOM_ACCESS && hasEntities && /*#__PURE__*/React.createElement("div", {
|
|
208
|
+
className: "mt-lg"
|
|
209
|
+
}, entities.map(entity => /*#__PURE__*/React.createElement(EntitySection, {
|
|
210
|
+
key: entity.id,
|
|
211
|
+
entity: entity,
|
|
212
|
+
data: data,
|
|
213
|
+
cannotUseAAcl: cannotUseAAcl,
|
|
214
|
+
Bind: Bind,
|
|
215
|
+
setValue: setValue
|
|
216
|
+
})))));
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=PermissionRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Fragment","useCallback","useMemo","CheckboxGroup","Grid","Select","Form","CannotUseAaclAlert","PermissionInfo","PermissionsGroup","usePermissionForm","usePermissionValue","useAuthentication","NO_ACCESS","FULL_ACCESS","READ_ONLY_ACCESS","CUSTOM_ACCESS","RWD_OPTIONS","value","label","PW_OPTIONS","hasAction","entity","name","actions","some","a","buildScopeOptions","options","scopes","includes","push","BUILTIN_ACTIONS","Set","getCustomActions","filter","has","EntitySection","data","cannotUseAAcl","Bind","setValue","scopeField","id","currentScope","scopeDisabled","customActions","customActionsValue","map","onCustomActionsChange","selected","selectedSet","action","columns","createElement","Column","span","key","beforeChange","cb","disabled","description","items","opt","length","onChange","title","PermissionRenderer","schema","identity","getPermission","formData","onFormChange","entities","hasEntities","accessLevelOptions","readOnlyAccess","className","accessLevel"],"sources":["PermissionRenderer.tsx"],"sourcesContent":["import React, { Fragment, useCallback, useMemo } from \"react\";\nimport { CheckboxGroup, Grid, Select } from \"@webiny/admin-ui\";\nimport { Form } from \"@webiny/form\";\nimport type { BindComponent } from \"@webiny/form\";\nimport {\n CannotUseAaclAlert,\n PermissionInfo,\n PermissionsGroup\n} from \"../components/Permissions/index.js\";\nimport { usePermissionForm } from \"./usePermissionForm.js\";\nimport type { AaclPermission } from \"../features/wcp/types.js\";\nimport type { ActionDefinition, PermissionSchema, EntityDefinition } from \"./types.js\";\nimport { usePermissionValue } from \"./PermissionValueContext.js\";\nimport { useAuthentication } from \"~/exports/admin/security.js\";\n\nexport interface PermissionRendererProps {\n schema: PermissionSchema;\n}\n\nconst NO_ACCESS = \"no\";\nconst FULL_ACCESS = \"full\";\nconst READ_ONLY_ACCESS = \"read-only\";\nconst CUSTOM_ACCESS = \"custom\";\n\nconst RWD_OPTIONS = [\n { value: \"r\", label: \"Read\" },\n { value: \"rw\", label: \"Read, write\" },\n { value: \"rwd\", label: \"Read, write, delete\" }\n];\n\nconst PW_OPTIONS = [\n { value: \"p\", label: \"Publish\" },\n { value: \"u\", label: \"Unpublish\" }\n];\n\nfunction hasAction(entity: EntityDefinition, name: string): boolean {\n return entity.actions?.some(a => a.name === name) ?? false;\n}\n\nfunction buildScopeOptions(entity: EntityDefinition) {\n const options = [{ value: NO_ACCESS, label: \"No access\" }];\n\n if (entity.scopes.includes(\"full\")) {\n options.push({ value: FULL_ACCESS, label: \"Full access\" });\n }\n\n if (entity.scopes.includes(\"own\")) {\n options.push({ value: \"own\", label: \"Only entries created by the user\" });\n }\n\n return options;\n}\n\nconst BUILTIN_ACTIONS = new Set([\"rwd\", \"pw\"]);\n\nfunction getCustomActions(entity: EntityDefinition): ActionDefinition[] {\n return (entity.actions ?? []).filter(a => !BUILTIN_ACTIONS.has(a.name));\n}\n\ninterface EntitySectionProps {\n entity: EntityDefinition;\n data: Record<string, any>;\n cannotUseAAcl: boolean;\n Bind: BindComponent;\n setValue: (name: string, value: any) => void;\n}\n\nfunction EntitySection({ entity, data, cannotUseAAcl, Bind, setValue }: EntitySectionProps) {\n const scopeField = `${entity.id}AccessScope`;\n const currentScope = data[scopeField];\n const scopeDisabled = cannotUseAAcl || !currentScope || currentScope === NO_ACCESS;\n const customActions = useMemo(() => getCustomActions(entity), [entity]);\n\n // Derive the selected values array from individual boolean form fields.\n const customActionsValue = useMemo(() => {\n return customActions.filter(a => data[`${entity.id}Action_${a.name}`]).map(a => a.name);\n }, [data, customActions, entity.id]);\n\n const onCustomActionsChange = useCallback(\n (selected: string[]) => {\n const selectedSet = new Set(selected);\n for (const action of customActions) {\n setValue(`${entity.id}Action_${action.name}`, selectedSet.has(action.name));\n }\n },\n [customActions, entity.id, setValue]\n );\n\n const columns = [\n <Grid.Column span={12} key={\"access\"}>\n <Bind\n name={scopeField}\n beforeChange={(value: string, cb: (v: string) => void) => {\n if (value === \"own\" && hasAction(entity, \"rwd\")) {\n setValue(`${entity.id}RWD`, \"rwd\");\n }\n cb(value);\n }}\n >\n <Select\n label={\"Access Scope\"}\n disabled={cannotUseAAcl}\n options={buildScopeOptions(entity)}\n />\n </Bind>\n </Grid.Column>\n ];\n\n if (hasAction(entity, \"rwd\")) {\n columns.push(\n <Grid.Column span={12} key={\"rwd\"}>\n <Bind name={`${entity.id}RWD`}>\n <Select\n label={\"Primary Actions\"}\n disabled={scopeDisabled || currentScope === \"own\"}\n options={RWD_OPTIONS}\n />\n </Bind>\n </Grid.Column>\n );\n }\n\n if (hasAction(entity, \"pw\")) {\n columns.push(\n <Grid.Column span={12} key={\"pw\"}>\n <Bind name={`${entity.id}PW`}>\n <CheckboxGroup\n label={\"Publishing actions\"}\n description={\"Publishing-related actions that can be performed on entries.\"}\n items={PW_OPTIONS.map(opt => ({\n ...opt,\n disabled: scopeDisabled\n }))}\n />\n </Bind>\n </Grid.Column>\n );\n }\n\n if (customActions.length > 0) {\n columns.push(\n <Grid.Column span={12} key={\"other\"}>\n <CheckboxGroup\n label={\"Other Actions\"}\n value={customActionsValue}\n onChange={onCustomActionsChange}\n items={customActions.map(action => ({\n value: action.name,\n label: action.label || action.name,\n disabled: scopeDisabled\n }))}\n />\n </Grid.Column>\n );\n }\n\n return (\n <PermissionsGroup title={entity.title || entity.id}>\n <Grid>{columns}</Grid>\n </PermissionsGroup>\n );\n}\n\nexport const PermissionRenderer = ({ schema }: PermissionRendererProps) => {\n const { value, onChange } = usePermissionValue();\n const { identity } = useAuthentication();\n\n const cannotUseAAcl = useMemo(() => {\n return !identity.getPermission<AaclPermission>(\"aacl\", true);\n }, []);\n\n const { formData, onFormChange } = usePermissionForm(schema, { value, onChange });\n\n const entities = schema.entities || [];\n const hasEntities = entities.length > 0;\n\n const accessLevelOptions = useMemo(() => {\n const options = [{ value: NO_ACCESS, label: \"No access\" }];\n\n if (schema.readOnlyAccess) {\n options.push({ value: READ_ONLY_ACCESS, label: \"Read-only access\" });\n }\n\n options.push({ value: FULL_ACCESS, label: \"Full access\" });\n\n if (hasEntities) {\n options.push({ value: CUSTOM_ACCESS, label: \"Custom access\" });\n }\n\n return options;\n }, [schema, hasEntities]);\n\n return (\n <Form data={formData} onChange={onFormChange}>\n {({ data, Bind, setValue }) => (\n <Fragment>\n <Grid className={\"pt-md\"}>\n <Grid.Column span={12}>\n {data.accessLevel === CUSTOM_ACCESS && cannotUseAAcl && (\n <CannotUseAaclAlert />\n )}\n </Grid.Column>\n </Grid>\n <Grid className={\"pt-md\"}>\n <Grid.Column span={6}>\n <PermissionInfo title={\"Access Level\"} />\n </Grid.Column>\n <Grid.Column span={6}>\n <Bind name={\"accessLevel\"}>\n <Select options={accessLevelOptions} />\n </Bind>\n </Grid.Column>\n </Grid>\n {data.accessLevel === CUSTOM_ACCESS && hasEntities && (\n <div className={\"mt-lg\"}>\n {entities.map(entity => (\n <EntitySection\n key={entity.id}\n entity={entity}\n data={data}\n cannotUseAAcl={cannotUseAAcl}\n Bind={Bind}\n setValue={setValue}\n />\n ))}\n </div>\n )}\n </Fragment>\n )}\n </Form>\n );\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Permission } from "./types.js";
|
|
3
|
+
interface PermissionValueContextValue {
|
|
4
|
+
value: Permission[];
|
|
5
|
+
onChange: (value: Permission[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const PermissionValueProvider: ({ value, onChange, children }: PermissionValueContextValue & {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export declare function usePermissionValue(): PermissionValueContextValue;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
const PermissionValueContext = /*#__PURE__*/React.createContext(null);
|
|
3
|
+
export const PermissionValueProvider = ({
|
|
4
|
+
value,
|
|
5
|
+
onChange,
|
|
6
|
+
children
|
|
7
|
+
}) => {
|
|
8
|
+
return /*#__PURE__*/React.createElement(PermissionValueContext.Provider, {
|
|
9
|
+
value: {
|
|
10
|
+
value,
|
|
11
|
+
onChange
|
|
12
|
+
}
|
|
13
|
+
}, children);
|
|
14
|
+
};
|
|
15
|
+
export function usePermissionValue() {
|
|
16
|
+
const ctx = useContext(PermissionValueContext);
|
|
17
|
+
if (!ctx) {
|
|
18
|
+
throw new Error("usePermissionValue must be used within a PermissionValueProvider");
|
|
19
|
+
}
|
|
20
|
+
return ctx;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=PermissionValueContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useContext","PermissionValueContext","createContext","PermissionValueProvider","value","onChange","children","createElement","Provider","usePermissionValue","ctx","Error"],"sources":["PermissionValueContext.tsx"],"sourcesContent":["import React, { useContext } from \"react\";\nimport type { Permission } from \"./types.js\";\n\ninterface PermissionValueContextValue {\n value: Permission[];\n onChange: (value: Permission[]) => void;\n}\n\nconst PermissionValueContext = React.createContext<PermissionValueContextValue | null>(null);\n\nexport const PermissionValueProvider = ({\n value,\n onChange,\n children\n}: PermissionValueContextValue & { children: React.ReactNode }) => {\n return (\n <PermissionValueContext.Provider value={{ value, onChange }}>\n {children}\n </PermissionValueContext.Provider>\n );\n};\n\nexport function usePermissionValue(): PermissionValueContextValue {\n const ctx = useContext(PermissionValueContext);\n if (!ctx) {\n throw new Error(\"usePermissionValue must be used within a PermissionValueProvider\");\n }\n return ctx;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAQzC,MAAMC,sBAAsB,gBAAGF,KAAK,CAACG,aAAa,CAAqC,IAAI,CAAC;AAE5F,OAAO,MAAMC,uBAAuB,GAAGA,CAAC;EACpCC,KAAK;EACLC,QAAQ;EACRC;AACyD,CAAC,KAAK;EAC/D,oBACIP,KAAA,CAAAQ,aAAA,CAACN,sBAAsB,CAACO,QAAQ;IAACJ,KAAK,EAAE;MAAEA,KAAK;MAAEC;IAAS;EAAE,GACvDC,QAC4B,CAAC;AAE1C,CAAC;AAED,OAAO,SAASG,kBAAkBA,CAAA,EAAgC;EAC9D,MAAMC,GAAG,GAAGV,UAAU,CAACC,sBAAsB,CAAC;EAC9C,IAAI,CAACS,GAAG,EAAE;IACN,MAAM,IAAIC,KAAK,CAAC,kEAAkE,CAAC;EACvF;EACA,OAAOD,GAAG;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { createUsePermissions } from "./usePermissions.js";
|
|
3
|
+
const BUILT_IN_ACTIONS = {
|
|
4
|
+
read: "canRead",
|
|
5
|
+
create: "canCreate",
|
|
6
|
+
edit: "canEdit",
|
|
7
|
+
delete: "canDelete",
|
|
8
|
+
publish: "canPublish",
|
|
9
|
+
unpublish: "canUnpublish"
|
|
10
|
+
};
|
|
11
|
+
export function createHasPermission(schema) {
|
|
12
|
+
const usePermissions = createUsePermissions(schema);
|
|
13
|
+
return function HasPermission({
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const permissions = usePermissions();
|
|
18
|
+
const action = props.action;
|
|
19
|
+
const entities = props.entity ? [props.entity] : props.any ?? props.all ?? [];
|
|
20
|
+
const requireAll = !!props.all;
|
|
21
|
+
const check = entityId => {
|
|
22
|
+
if (!action) {
|
|
23
|
+
return permissions.canAccess(entityId);
|
|
24
|
+
}
|
|
25
|
+
const method = BUILT_IN_ACTIONS[action];
|
|
26
|
+
if (method) {
|
|
27
|
+
return permissions[method](entityId);
|
|
28
|
+
}
|
|
29
|
+
return permissions.canAction(action, entityId);
|
|
30
|
+
};
|
|
31
|
+
const allowed = requireAll ? entities.every(check) : entities.some(check);
|
|
32
|
+
return allowed ? /*#__PURE__*/React.createElement(React.Fragment, null, children) : null;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=createHasPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createUsePermissions","BUILT_IN_ACTIONS","read","create","edit","delete","publish","unpublish","createHasPermission","schema","usePermissions","HasPermission","children","props","permissions","action","entities","entity","any","all","requireAll","check","entityId","canAccess","method","canAction","allowed","every","some","createElement","Fragment"],"sources":["createHasPermission.tsx"],"sourcesContent":["import React from \"react\";\nimport { createUsePermissions } from \"./usePermissions.js\";\nimport type { PermissionSchemaConfig, HasPermissionProps } from \"./types.js\";\n\nconst BUILT_IN_ACTIONS: Record<string, string> = {\n read: \"canRead\",\n create: \"canCreate\",\n edit: \"canEdit\",\n delete: \"canDelete\",\n publish: \"canPublish\",\n unpublish: \"canUnpublish\"\n};\n\nexport function createHasPermission<const S extends PermissionSchemaConfig>(\n schema: S\n): React.FC<HasPermissionProps<S>> {\n const usePermissions = createUsePermissions(schema);\n\n return function HasPermission({ children, ...props }) {\n const permissions = usePermissions();\n\n const action = props.action as string | undefined;\n const entities: string[] = props.entity ? [props.entity] : (props.any ?? props.all ?? []);\n const requireAll = !!props.all;\n\n const check = (entityId: string): boolean => {\n if (!action) {\n return permissions.canAccess(entityId as any);\n }\n const method = BUILT_IN_ACTIONS[action];\n if (method) {\n return (permissions as any)[method](entityId);\n }\n return permissions.canAction(action as any, entityId as any);\n };\n\n const allowed = requireAll ? entities.every(check) : entities.some(check);\n\n return allowed ? <>{children}</> : null;\n };\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB;AAG7B,MAAMC,gBAAwC,GAAG;EAC7CC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,WAAW;EACnBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,WAAW;EACnBC,OAAO,EAAE,YAAY;EACrBC,SAAS,EAAE;AACf,CAAC;AAED,OAAO,SAASC,mBAAmBA,CAC/BC,MAAS,EACsB;EAC/B,MAAMC,cAAc,GAAGV,oBAAoB,CAACS,MAAM,CAAC;EAEnD,OAAO,SAASE,aAAaA,CAAC;IAAEC,QAAQ;IAAE,GAAGC;EAAM,CAAC,EAAE;IAClD,MAAMC,WAAW,GAAGJ,cAAc,CAAC,CAAC;IAEpC,MAAMK,MAAM,GAAGF,KAAK,CAACE,MAA4B;IACjD,MAAMC,QAAkB,GAAGH,KAAK,CAACI,MAAM,GAAG,CAACJ,KAAK,CAACI,MAAM,CAAC,GAAIJ,KAAK,CAACK,GAAG,IAAIL,KAAK,CAACM,GAAG,IAAI,EAAG;IACzF,MAAMC,UAAU,GAAG,CAAC,CAACP,KAAK,CAACM,GAAG;IAE9B,MAAME,KAAK,GAAIC,QAAgB,IAAc;MACzC,IAAI,CAACP,MAAM,EAAE;QACT,OAAOD,WAAW,CAACS,SAAS,CAACD,QAAe,CAAC;MACjD;MACA,MAAME,MAAM,GAAGvB,gBAAgB,CAACc,MAAM,CAAC;MACvC,IAAIS,MAAM,EAAE;QACR,OAAQV,WAAW,CAASU,MAAM,CAAC,CAACF,QAAQ,CAAC;MACjD;MACA,OAAOR,WAAW,CAACW,SAAS,CAACV,MAAM,EAASO,QAAe,CAAC;IAChE,CAAC;IAED,MAAMI,OAAO,GAAGN,UAAU,GAAGJ,QAAQ,CAACW,KAAK,CAACN,KAAK,CAAC,GAAGL,QAAQ,CAACY,IAAI,CAACP,KAAK,CAAC;IAEzE,OAAOK,OAAO,gBAAG3B,KAAA,CAAA8B,aAAA,CAAA9B,KAAA,CAAA+B,QAAA,QAAGlB,QAAW,CAAC,GAAG,IAAI;EAC3C,CAAC;AACL","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPermissionSchema","config","entities"],"sources":["createPermissionSchema.ts"],"sourcesContent":["import type { PermissionSchemaConfig } from \"./types.js\";\n\nexport function createPermissionSchema<const T extends PermissionSchemaConfig>(config: T): T {\n return {\n ...config,\n entities: config.entities ?? []\n };\n}\n"],"mappings":"AAEA,OAAO,SAASA,sBAAsBA,CAAyCC,MAAS,EAAK;EACzF,OAAO;IACH,GAAGA,MAAM;IACTC,QAAQ,EAAED,MAAM,CAACC,QAAQ,IAAI;EACjC,CAAC;AACL","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createPermissionSchema } from "./createPermissionSchema.js";
|
|
2
|
+
export { createUsePermissions } from "./usePermissions.js";
|
|
3
|
+
export { usePermissionForm, deserializePermissions, serializePermissions } from "./usePermissionForm.js";
|
|
4
|
+
export { PermissionRenderer } from "./PermissionRenderer.js";
|
|
5
|
+
export type { PermissionRendererProps } from "./PermissionRenderer.js";
|
|
6
|
+
export { usePermissionValue, PermissionValueProvider } from "./PermissionValueContext.js";
|
|
7
|
+
export { createHasPermission } from "./createHasPermission.js";
|
|
8
|
+
export type { Permission, ActionDefinition, EntityDefinition, OwnableItem, PermissionSchemaConfig, PermissionSchema, UsePermissionFormOptions, UsePermissionFormResult, UsePermissionsResult, PermissionRendererConfig, HasPermissionAction, HasPermissionProps } from "./types.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createPermissionSchema } from "./createPermissionSchema.js";
|
|
2
|
+
export { createUsePermissions } from "./usePermissions.js";
|
|
3
|
+
export { usePermissionForm, deserializePermissions, serializePermissions } from "./usePermissionForm.js";
|
|
4
|
+
export { PermissionRenderer } from "./PermissionRenderer.js";
|
|
5
|
+
export { usePermissionValue, PermissionValueProvider } from "./PermissionValueContext.js";
|
|
6
|
+
export { createHasPermission } from "./createHasPermission.js";
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPermissionSchema","createUsePermissions","usePermissionForm","deserializePermissions","serializePermissions","PermissionRenderer","usePermissionValue","PermissionValueProvider","createHasPermission"],"sources":["index.ts"],"sourcesContent":["export { createPermissionSchema } from \"./createPermissionSchema.js\";\nexport { createUsePermissions } from \"./usePermissions.js\";\nexport {\n usePermissionForm,\n deserializePermissions,\n serializePermissions\n} from \"./usePermissionForm.js\";\nexport { PermissionRenderer } from \"./PermissionRenderer.js\";\nexport type { PermissionRendererProps } from \"./PermissionRenderer.js\";\nexport { usePermissionValue, PermissionValueProvider } from \"./PermissionValueContext.js\";\nexport { createHasPermission } from \"./createHasPermission.js\";\nexport type {\n Permission,\n ActionDefinition,\n EntityDefinition,\n OwnableItem,\n PermissionSchemaConfig,\n PermissionSchema,\n UsePermissionFormOptions,\n UsePermissionFormResult,\n UsePermissionsResult,\n PermissionRendererConfig,\n HasPermissionAction,\n HasPermissionProps\n} from \"./types.js\";\n"],"mappings":"AAAA,SAASA,sBAAsB;AAC/B,SAASC,oBAAoB;AAC7B,SACIC,iBAAiB,EACjBC,sBAAsB,EACtBC,oBAAoB;AAExB,SAASC,kBAAkB;AAE3B,SAASC,kBAAkB,EAAEC,uBAAuB;AACpD,SAASC,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A single permission object from the API.
|
|
4
|
+
*/
|
|
5
|
+
export interface Permission {
|
|
6
|
+
name: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* An action definition on an entity.
|
|
11
|
+
*
|
|
12
|
+
* Built-in actions:
|
|
13
|
+
* - `{ name: "rwd" }` — read/write/delete single-select (serialized as joined string, e.g. "rw")
|
|
14
|
+
* - `{ name: "pw" }` — publish/unpublish multi-select (serialized as joined string, e.g. "pu")
|
|
15
|
+
*
|
|
16
|
+
* Custom actions:
|
|
17
|
+
* - `{ name: "install", label: "Install" }` — boolean flag (serialized as `install: true`)
|
|
18
|
+
*/
|
|
19
|
+
export interface ActionDefinition {
|
|
20
|
+
/** Key on the permission object (e.g. "rwd", "pw", "install") */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Display label for the UI. Required for custom actions; ignored for built-in "rwd"/"pw". */
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Defines an entity within a permission schema.
|
|
27
|
+
*/
|
|
28
|
+
export interface EntityDefinition {
|
|
29
|
+
/** Unique ID, used for form field naming: ${id}AccessScope, ${id}RWD, etc. */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Display title for the UI renderer (e.g. "Files", "Settings") */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** Permission name emitted for this entity (e.g. "fm.file") */
|
|
34
|
+
permission: string;
|
|
35
|
+
/** Available access scopes */
|
|
36
|
+
scopes: ("full" | "own")[];
|
|
37
|
+
/** Action definitions for this entity */
|
|
38
|
+
actions?: ActionDefinition[];
|
|
39
|
+
/** Dependency on another entity */
|
|
40
|
+
dependsOn?: {
|
|
41
|
+
/** ID of parent entity */
|
|
42
|
+
entity: string;
|
|
43
|
+
/** Required action character (e.g. "r") */
|
|
44
|
+
requires: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Configuration for creating a permission schema.
|
|
49
|
+
*/
|
|
50
|
+
export interface PermissionSchemaConfig {
|
|
51
|
+
/** Permission prefix — used to filter permissions from the array */
|
|
52
|
+
prefix: string;
|
|
53
|
+
/**
|
|
54
|
+
* Full access configuration.
|
|
55
|
+
* - `true` — emits `{ name: "${prefix}.*" }`.
|
|
56
|
+
* - `{ ...extras }` — emits `{ name: "${prefix}.*", ...extras }`.
|
|
57
|
+
*/
|
|
58
|
+
fullAccess: boolean | {
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Read-only access configuration. When defined, the schema supports a read-only tier.
|
|
63
|
+
* - `true` — emits `{ name: "${prefix}.*", rwd: "r" }`.
|
|
64
|
+
* - `Permission[]` — emits the array as-is.
|
|
65
|
+
*/
|
|
66
|
+
readOnlyAccess?: boolean | Permission[];
|
|
67
|
+
/** Entity definitions (optional — simple apps have none) */
|
|
68
|
+
entities?: EntityDefinition[];
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A compiled permission schema returned by `createPermissionSchema`.
|
|
72
|
+
*/
|
|
73
|
+
export interface PermissionSchema {
|
|
74
|
+
prefix: string;
|
|
75
|
+
/**
|
|
76
|
+
* Full access configuration.
|
|
77
|
+
* - `true` — emits `{ name: "${prefix}.*" }`.
|
|
78
|
+
* - `{ ...extras }` — emits `{ name: "${prefix}.*", ...extras }`.
|
|
79
|
+
*/
|
|
80
|
+
fullAccess: boolean | {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Read-only access configuration. When defined, the schema supports a read-only tier.
|
|
85
|
+
* - `true` — emits `{ name: "${prefix}.*", rwd: "r" }`.
|
|
86
|
+
* - `Permission[]` — emits the array as-is.
|
|
87
|
+
*/
|
|
88
|
+
readOnlyAccess?: boolean | Permission[];
|
|
89
|
+
entities?: EntityDefinition[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Options passed to the `usePermissionForm` hook.
|
|
93
|
+
*/
|
|
94
|
+
export interface UsePermissionFormOptions {
|
|
95
|
+
value: Permission[];
|
|
96
|
+
onChange: (value: Permission[]) => void;
|
|
97
|
+
/** Merge extra fields into deserialized form data (for CMS endpoints, resource scopes, etc.) */
|
|
98
|
+
deserialize?: (permissions: Permission[]) => Record<string, any>;
|
|
99
|
+
/** Transform or extend the core-serialized permissions (for CMS endpoints, resource scopes, etc.) */
|
|
100
|
+
serialize?: (formData: Record<string, any>, corePermissions: Permission[]) => Permission[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Return value of `usePermissionForm`.
|
|
104
|
+
*/
|
|
105
|
+
export interface UsePermissionFormResult {
|
|
106
|
+
formData: Record<string, any>;
|
|
107
|
+
onFormChange: (data: Record<string, any>) => void;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Configuration for a permission renderer registered via AdminConfig.
|
|
111
|
+
*
|
|
112
|
+
* Either `schema` or `element` must be provided:
|
|
113
|
+
* - `schema`: uses the built-in PermissionRenderer for auto-generated UI.
|
|
114
|
+
* - `element`: uses a custom React element for full control.
|
|
115
|
+
*/
|
|
116
|
+
export type PermissionRendererConfig = PermissionRendererConfigBase & ({
|
|
117
|
+
schema: PermissionSchema;
|
|
118
|
+
element?: never;
|
|
119
|
+
} | {
|
|
120
|
+
schema?: never;
|
|
121
|
+
element: React.ReactElement;
|
|
122
|
+
});
|
|
123
|
+
interface PermissionRendererConfigBase {
|
|
124
|
+
name: string;
|
|
125
|
+
title: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
icon?: React.ReactElement;
|
|
128
|
+
system?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Item that may have an owner (used for own-scope permission checks).
|
|
132
|
+
*/
|
|
133
|
+
export interface OwnableItem {
|
|
134
|
+
createdBy?: {
|
|
135
|
+
id: string;
|
|
136
|
+
} | null;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Extract the union of entity definitions from a schema config type.
|
|
140
|
+
*/
|
|
141
|
+
type EntitiesOf<S extends PermissionSchemaConfig> = S extends {
|
|
142
|
+
entities: ReadonlyArray<infer E extends EntityDefinition>;
|
|
143
|
+
} ? E : never;
|
|
144
|
+
/**
|
|
145
|
+
* Extract entity IDs whose actions array contains an action with the given name.
|
|
146
|
+
*/
|
|
147
|
+
type EntityIdWithAction<S extends PermissionSchemaConfig, A extends string> = {
|
|
148
|
+
[K in EntitiesOf<S> as K extends {
|
|
149
|
+
actions: ReadonlyArray<infer Act>;
|
|
150
|
+
} ? Act extends {
|
|
151
|
+
name: A;
|
|
152
|
+
} ? K["id"] : never : never]: never;
|
|
153
|
+
} extends infer M ? keyof M & string : never;
|
|
154
|
+
/**
|
|
155
|
+
* Entity IDs that have the "rwd" action.
|
|
156
|
+
*/
|
|
157
|
+
export type RwdEntityId<S extends PermissionSchemaConfig> = EntityIdWithAction<S, "rwd">;
|
|
158
|
+
/**
|
|
159
|
+
* Entity IDs that have the "pw" action.
|
|
160
|
+
*/
|
|
161
|
+
export type PwEntityId<S extends PermissionSchemaConfig> = EntityIdWithAction<S, "pw">;
|
|
162
|
+
/**
|
|
163
|
+
* All entity IDs in the schema.
|
|
164
|
+
*/
|
|
165
|
+
export type AllEntityIds<S extends PermissionSchemaConfig> = EntitiesOf<S>["id"];
|
|
166
|
+
/**
|
|
167
|
+
* Custom (non-builtin) action names across all entities.
|
|
168
|
+
*/
|
|
169
|
+
export type CustomActionNames<S extends PermissionSchemaConfig> = Exclude<EntitiesOf<S> extends {
|
|
170
|
+
actions: ReadonlyArray<infer Act extends ActionDefinition>;
|
|
171
|
+
} ? Act["name"] : never, "rwd" | "pw">;
|
|
172
|
+
/**
|
|
173
|
+
* The return type of `usePermissions(schema)`.
|
|
174
|
+
*
|
|
175
|
+
* When the schema has literal entity types, methods are narrowed to only accept valid entity IDs.
|
|
176
|
+
* When the schema is dynamically typed, all methods accept `string`.
|
|
177
|
+
*/
|
|
178
|
+
export type UsePermissionsResult<S extends PermissionSchemaConfig> = string extends AllEntityIds<S> ? UsePermissionsResultUntyped : UsePermissionsResultTyped<S>;
|
|
179
|
+
export interface UsePermissionsResultUntyped {
|
|
180
|
+
canAccess: (entityId: string) => boolean;
|
|
181
|
+
canRead: (entityId: string) => boolean;
|
|
182
|
+
canCreate: (entityId: string) => boolean;
|
|
183
|
+
canEdit: (entityId: string, item?: OwnableItem) => boolean;
|
|
184
|
+
canDelete: (entityId: string, item?: OwnableItem) => boolean;
|
|
185
|
+
canPublish: (entityId: string) => boolean;
|
|
186
|
+
canUnpublish: (entityId: string) => boolean;
|
|
187
|
+
canAction: (action: string, entityId: string) => boolean;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Action values accepted by `HasPermission`.
|
|
191
|
+
*
|
|
192
|
+
* Built-in actions are always available; custom action names from the schema are inferred automatically.
|
|
193
|
+
*/
|
|
194
|
+
export type HasPermissionAction<S extends PermissionSchemaConfig> = "read" | "create" | "edit" | "delete" | "publish" | "unpublish" | CustomActionNames<S>;
|
|
195
|
+
/**
|
|
196
|
+
* Props for a schema-bound `HasPermission` component created via `createHasPermission`.
|
|
197
|
+
*
|
|
198
|
+
* Exactly one of `entity`, `any`, or `all` must be provided.
|
|
199
|
+
*/
|
|
200
|
+
export type HasPermissionProps<S extends PermissionSchemaConfig> = SingleEntityProps<S> | AnyEntitiesProps<S> | AllEntitiesProps<S>;
|
|
201
|
+
interface SingleEntityProps<S extends PermissionSchemaConfig> {
|
|
202
|
+
entity: AllEntityIds<S>;
|
|
203
|
+
any?: never;
|
|
204
|
+
all?: never;
|
|
205
|
+
action?: HasPermissionAction<S>;
|
|
206
|
+
children: React.ReactNode;
|
|
207
|
+
}
|
|
208
|
+
interface AnyEntitiesProps<S extends PermissionSchemaConfig> {
|
|
209
|
+
entity?: never;
|
|
210
|
+
any: AllEntityIds<S>[];
|
|
211
|
+
all?: never;
|
|
212
|
+
action?: HasPermissionAction<S>;
|
|
213
|
+
children: React.ReactNode;
|
|
214
|
+
}
|
|
215
|
+
interface AllEntitiesProps<S extends PermissionSchemaConfig> {
|
|
216
|
+
entity?: never;
|
|
217
|
+
any?: never;
|
|
218
|
+
all: AllEntityIds<S>[];
|
|
219
|
+
action?: HasPermissionAction<S>;
|
|
220
|
+
children: React.ReactNode;
|
|
221
|
+
}
|
|
222
|
+
type UsePermissionsResultTyped<S extends PermissionSchemaConfig> = {
|
|
223
|
+
canAccess: (entityId: AllEntityIds<S>) => boolean;
|
|
224
|
+
canAction: (action: CustomActionNames<S> extends never ? string : CustomActionNames<S>, entityId: AllEntityIds<S>) => boolean;
|
|
225
|
+
} & ([RwdEntityId<S>] extends [never] ? {
|
|
226
|
+
canRead: (entityId: string) => boolean;
|
|
227
|
+
canCreate: (entityId: string) => boolean;
|
|
228
|
+
canEdit: (entityId: string, item?: OwnableItem) => boolean;
|
|
229
|
+
canDelete: (entityId: string, item?: OwnableItem) => boolean;
|
|
230
|
+
} : {
|
|
231
|
+
canRead: (entityId: RwdEntityId<S>) => boolean;
|
|
232
|
+
canCreate: (entityId: RwdEntityId<S>) => boolean;
|
|
233
|
+
canEdit: (entityId: RwdEntityId<S>, item?: OwnableItem) => boolean;
|
|
234
|
+
canDelete: (entityId: RwdEntityId<S>, item?: OwnableItem) => boolean;
|
|
235
|
+
}) & ([PwEntityId<S>] extends [never] ? {
|
|
236
|
+
canPublish: (entityId: string) => boolean;
|
|
237
|
+
canUnpublish: (entityId: string) => boolean;
|
|
238
|
+
} : {
|
|
239
|
+
canPublish: (entityId: PwEntityId<S>) => boolean;
|
|
240
|
+
canUnpublish: (entityId: PwEntityId<S>) => boolean;
|
|
241
|
+
});
|
|
242
|
+
export {};
|