@webiny/app-admin 6.0.0-beta.0 → 6.0.0-rc.1
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/base/Admin.d.ts +5 -2
- package/base/Admin.js +41 -44
- 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 +114 -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.js +10 -79
- 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 +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +11 -21
- 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 +2 -2
- package/base/providers/ApolloProvider.js +8 -17
- 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 -7
- package/base/providers/UiStateProvider.js +10 -15
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.d.ts +30 -6
- package/base/ui/Brand.js +5 -12
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +15 -3
- package/base/ui/CenteredView.js +12 -43
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.d.ts +30 -6
- package/base/ui/Dashboard.js +5 -12
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.d.ts +28 -28
- package/base/ui/FileManager.js +52 -60
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/Layout.d.ts +32 -6
- package/base/ui/Layout.js +8 -16
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.d.ts +35 -3
- package/base/ui/LoginScreen.js +20 -15
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.d.ts +30 -11
- package/base/ui/Logo.js +5 -26
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.d.ts +25 -37
- package/base/ui/Navigation.js +12 -142
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.d.ts +30 -6
- package/base/ui/NotFound.js +5 -12
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.d.ts +1 -1
- package/base/ui/Tags.js +14 -19
- 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 +54 -52
- package/base/ui/UserMenu.js +14 -101
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +7 -13
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.d.ts +1 -1
- package/components/BulkActions/Worker.js +99 -141
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.d.ts +2 -2
- package/components/BulkActions/index.js +2 -27
- package/components/BulkActions/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +2 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +20 -29
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/index.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/index.js +1 -16
- package/components/BulkActions/useDialogWithReport/index.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +1 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +40 -75
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.d.ts +9 -8
- package/components/Buttons/Buttons.js +61 -57
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.d.ts +2 -3
- package/components/Buttons/Buttons.styles.js +3 -11
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.d.ts +2 -2
- package/components/Buttons/index.js +2 -25
- package/components/Buttons/index.js.map +1 -1
- package/components/Buttons/useButtons.d.ts +1 -1
- package/components/Buttons/useButtons.js +13 -19
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/Dialogs/Dialog.d.ts +11 -5
- package/components/Dialogs/Dialog.js +57 -40
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogsContext.d.ts +16 -21
- package/components/Dialogs/DialogsContext.js +106 -95
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.d.ts +1 -2
- package/components/Dialogs/useDialogs.js +4 -17
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.d.ts +4 -4
- package/components/EmptyView.js +30 -41
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.d.ts +6 -6
- package/components/Filters/Filters.js +12 -20
- package/components/Filters/Filters.js.map +1 -1
- 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 -1
- package/components/Filters/index.js +2 -16
- package/components/Filters/index.js.map +1 -1
- package/components/FloatingActionButton.js +7 -13
- 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 +9 -5
- package/components/LexicalEditor/LexicalEditor.js +34 -23
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
- package/components/LexicalEditor/LexicalLinkForm.js +83 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
- package/components/LexicalEditor/index.d.ts +3 -1
- package/components/LexicalEditor/index.js +3 -12
- package/components/LexicalEditor/index.js.map +1 -1
- 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 +8 -31
- 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 +1 -0
- package/components/OptionsMenu/OptionsMenu.js +17 -23
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuItem.d.ts +1 -0
- package/components/OptionsMenu/OptionsMenuItem.js +12 -17
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuLink.d.ts +3 -1
- package/components/OptionsMenu/OptionsMenuLink.js +13 -36
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -1
- package/components/OptionsMenu/index.d.ts +4 -4
- package/components/OptionsMenu/index.js +4 -51
- package/components/OptionsMenu/index.js.map +1 -1
- package/components/OptionsMenu/useOptionsMenuItem.d.ts +2 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +12 -18
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.d.ts +6 -16
- package/components/OverlayLayout/OverlayLayout.js +41 -148
- 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 +19 -0
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
- package/components/OverlayLayout/components/index.d.ts +4 -0
- package/components/OverlayLayout/components/index.js +6 -0
- package/components/OverlayLayout/components/index.js.map +1 -0
- package/components/OverlayLayout/index.d.ts +1 -1
- package/components/OverlayLayout/index.js +1 -16
- package/components/OverlayLayout/index.js.map +1 -1
- package/components/Permissions/CannotUseAaclAlert.js +5 -12
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -1
- package/components/Permissions/Permissions.d.ts +2 -4
- package/components/Permissions/Permissions.js +44 -49
- 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 +1 -2
- package/components/Permissions/StyledComponents.js +12 -25
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.d.ts +4 -3
- package/components/Permissions/index.js +4 -35
- 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 +21 -48
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +14 -7
- package/components/SimpleForm/SimpleForm.js +72 -77
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.d.ts +1 -1
- package/components/SimpleForm/index.js +1 -30
- package/components/SimpleForm/index.js.map +1 -1
- package/components/SimpleUI/InputField.d.ts +1 -1
- package/components/SimpleUI/InputField.js +39 -47
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +20 -7
- package/components/SingleImageUpload.js +39 -73
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +11 -9
- package/components/SplitView/SplitView.js +59 -75
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.d.ts +1 -1
- package/components/SplitView/index.js +1 -24
- 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 +8 -2
- package/components/Wcp.js +30 -15
- package/components/Wcp.js.map +1 -1
- package/components/index.d.ts +29 -1
- package/components/index.js +28 -12
- 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 +485 -0
- package/config/AdminConfig.js +71 -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/buildParams.d.ts +1 -0
- package/exports/admin/buildParams.js +3 -0
- package/exports/admin/buildParams.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 +3 -0
- package/exports/admin/ui.js +5 -0
- package/exports/admin/ui.js.map +1 -0
- package/exports/admin.d.ts +6 -0
- package/exports/admin.js +8 -0
- package/exports/admin.js.map +1 -0
- package/extensions/AdminBuildParam.d.ts +11 -0
- package/extensions/AdminBuildParam.js +184 -0
- package/extensions/AdminBuildParam.js.map +1 -0
- package/extensions/AdminExtension.d.ts +11 -0
- package/extensions/AdminExtension.js +99 -0
- package/extensions/AdminExtension.js.map +1 -0
- package/extensions/index.d.ts +23 -0
- package/extensions/index.js +7 -0
- package/extensions/index.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 +18 -0
- package/features/wcp/ReactLicense.js +43 -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 -11
- package/hooks/index.js +11 -126
- package/hooks/index.js.map +1 -1
- package/hooks/useConfirmationDialog.d.ts +1 -1
- package/hooks/useConfirmationDialog.js +26 -39
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.d.ts +1 -1
- package/hooks/useDialog.js +16 -21
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useIsMounted.js +6 -14
- package/hooks/useIsMounted.js.map +1 -1
- package/hooks/useKeyHandler.d.ts +3 -3
- package/hooks/useKeyHandler.js +28 -46
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +9 -21
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useShiftKey.js +13 -26
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useSnackbar.d.ts +1 -0
- package/hooks/useSnackbar.js +23 -25
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.d.ts +0 -1
- package/hooks/useStateIfMounted.js +8 -18
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useStateWithCallback.d.ts +3 -3
- package/hooks/useStateWithCallback.js +7 -20
- package/hooks/useStateWithCallback.js.map +1 -1
- 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 -40
- package/index.js +43 -395
- package/index.js.map +1 -1
- package/lexical.css +2 -0
- package/package.json +61 -50
- package/permissions/PermissionRenderer.d.ts +6 -0
- package/permissions/PermissionRenderer.js +211 -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 +224 -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 +216 -0
- package/permissions/usePermissionForm.js.map +1 -0
- package/permissions/usePermissions.d.ts +3 -0
- package/permissions/usePermissions.js +179 -0
- package/permissions/usePermissions.js.map +1 -0
- package/plugins/MenuPlugin.d.ts +1 -1
- package/plugins/MenuPlugin.js +15 -36
- 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 -3
- package/types.d.ts +4 -110
- package/types.js +1 -5
- package/types.js.map +1 -1
- package/base/Version.d.ts +0 -3
- package/base/Version.js +0 -56
- package/base/Version.js.map +0 -1
- package/base/providers/TelemetryProvider.d.ts +0 -7
- package/base/providers/TelemetryProvider.js +0 -27
- package/base/providers/TelemetryProvider.js.map +0 -1
- package/base/providers/ViewCompositionProvider.d.ts +0 -21
- package/base/providers/ViewCompositionProvider.js +0 -58
- package/base/providers/ViewCompositionProvider.js.map +0 -1
- package/base/ui/LocaleSelector.d.ts +0 -15
- package/base/ui/LocaleSelector.js +0 -15
- package/base/ui/LocaleSelector.js.map +0 -1
- package/base/ui/Menu.d.ts +0 -39
- package/base/ui/Menu.js +0 -133
- package/base/ui/Menu.js.map +0 -1
- package/base/ui/Search.d.ts +0 -37
- package/base/ui/Search.js +0 -61
- package/base/ui/Search.js.map +0 -1
- package/components/AppInstaller/AppInstaller.d.ts +0 -11
- package/components/AppInstaller/AppInstaller.js +0 -123
- package/components/AppInstaller/AppInstaller.js.map +0 -1
- package/components/AppInstaller/Sidebar.d.ts +0 -9
- package/components/AppInstaller/Sidebar.js +0 -128
- 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 -23
- package/components/AppInstaller/index.js.map +0 -1
- package/components/AppInstaller/styled.d.ts +0 -19
- package/components/AppInstaller/styled.js +0 -82
- package/components/AppInstaller/styled.js.map +0 -1
- package/components/AppInstaller/useInstaller.d.ts +0 -25
- package/components/AppInstaller/useInstaller.js +0 -179
- package/components/AppInstaller/useInstaller.js.map +0 -1
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.d.ts +0 -20
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.js +0 -48
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.styled.js.map +0 -1
- package/components/Dialogs/CustomDialog.d.ts +0 -17
- package/components/Dialogs/CustomDialog.js +0 -55
- package/components/Dialogs/CustomDialog.js.map +0 -1
- package/components/Dialogs/styled.d.ts +0 -10
- package/components/Dialogs/styled.js +0 -40
- package/components/Dialogs/styled.js.map +0 -1
- package/components/Filters/Filters.styled.d.ts +0 -13
- package/components/Filters/Filters.styled.js +0 -53
- package/components/Filters/Filters.styled.js.map +0 -1
- package/components/OptionsMenu/OptionsMenu.styled.d.ts +0 -3
- package/components/OptionsMenu/OptionsMenu.styled.js +0 -26
- package/components/OptionsMenu/OptionsMenu.styled.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 -24
- package/components/RichTextEditor/RichTextEditor.js.map +0 -1
- package/components/RichTextEditor/index.d.ts +0 -2
- package/components/RichTextEditor/index.js +0 -21
- package/components/RichTextEditor/index.js.map +0 -1
- package/components/RichTextEditor/styles.scss +0 -96
- package/components/RichTextEditor/tools/header/index.d.ts +0 -227
- package/components/RichTextEditor/tools/header/index.js +0 -681
- 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 -122
- package/components/RichTextEditor/tools/image/index.js +0 -237
- 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 -13
- package/components/RichTextEditor/tools/image/svgs.js.map +0 -1
- package/components/RichTextEditor/tools/image/tunes.d.ts +0 -55
- package/components/RichTextEditor/tools/image/tunes.js +0 -124
- 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 -7
- package/components/RichTextEditor/tools/image/types.js.map +0 -1
- package/components/RichTextEditor/tools/image/ui.d.ts +0 -120
- package/components/RichTextEditor/tools/image/ui.js +0 -276
- package/components/RichTextEditor/tools/image/ui.js.map +0 -1
- package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -207
- package/components/RichTextEditor/tools/paragraph/index.js +0 -487
- 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 -61
- package/components/RichTextEditor/tools/textColor/index.js +0 -235
- 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 -30
- package/components/RichTextEditor/tools/utils.js.map +0 -1
- package/components/Routes.d.ts +0 -6
- package/components/Routes.js +0 -43
- package/components/Routes.js.map +0 -1
- package/hooks/createGenericContext.d.ts +0 -13
- package/hooks/createGenericContext.js +0 -34
- package/hooks/createGenericContext.js.map +0 -1
- package/plugins/PermissionRendererPlugin.d.ts +0 -22
- package/plugins/PermissionRendererPlugin.js +0 -40
- package/plugins/PermissionRendererPlugin.js.map +0 -1
- package/plugins/globalSearch/SearchBar.d.ts +0 -22
- 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 -82
- 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 -6
- package/plugins/globalSearch/index.js +0 -17
- package/plugins/globalSearch/index.js.map +0 -1
- package/plugins/globalSearch/styled.d.ts +0 -18
- package/plugins/globalSearch/styled.js +0 -133
- package/plugins/globalSearch/styled.js.map +0 -1
- package/plugins/uiLayoutRenderer/index.d.ts +0 -2
- package/plugins/uiLayoutRenderer/index.js +0 -62
- package/plugins/uiLayoutRenderer/index.js.map +0 -1
- package/styles/material-theme-assignments.scss +0 -369
- package/styles/material.scss +0 -42
- package/styles/reset.scss +0 -1
- package/styles/theme.scss +0 -76
- package/ui/UIElement.d.ts +0 -2
- package/ui/UIElement.js +0 -20
- package/ui/UIElement.js.map +0 -1
- package/ui/UILayout.d.ts +0 -1
- package/ui/UILayout.js +0 -20
- package/ui/UILayout.js.map +0 -1
- package/ui/UIRenderer.d.ts +0 -2
- package/ui/UIRenderer.js +0 -14
- package/ui/UIRenderer.js.map +0 -1
- package/ui/UIView.d.ts +0 -2
- package/ui/UIView.js +0 -26
- package/ui/UIView.js.map +0 -1
- package/ui/elements/AccordionElement.d.ts +0 -27
- package/ui/elements/AccordionElement.js +0 -80
- package/ui/elements/AccordionElement.js.map +0 -1
- package/ui/elements/ButtonElement.d.ts +0 -24
- package/ui/elements/ButtonElement.js +0 -85
- package/ui/elements/ButtonElement.js.map +0 -1
- package/ui/elements/ButtonGroupElement.d.ts +0 -6
- package/ui/elements/ButtonGroupElement.js +0 -49
- package/ui/elements/ButtonGroupElement.js.map +0 -1
- package/ui/elements/GenericElement.d.ts +0 -1
- package/ui/elements/GenericElement.js +0 -18
- package/ui/elements/GenericElement.js.map +0 -1
- package/ui/elements/LabelElement.d.ts +0 -16
- package/ui/elements/LabelElement.js +0 -45
- package/ui/elements/LabelElement.js.map +0 -1
- package/ui/elements/NavigationMenuElement.d.ts +0 -33
- package/ui/elements/NavigationMenuElement.js +0 -141
- 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 -32
- package/ui/elements/PlaceholderElement.js.map +0 -1
- package/ui/elements/SmallButtonElement.d.ts +0 -6
- package/ui/elements/SmallButtonElement.js +0 -44
- package/ui/elements/SmallButtonElement.js.map +0 -1
- package/ui/elements/TypographyElement.d.ts +0 -13
- package/ui/elements/TypographyElement.js +0 -47
- package/ui/elements/TypographyElement.js.map +0 -1
- package/ui/elements/ViewElement.d.ts +0 -1
- package/ui/elements/ViewElement.js +0 -18
- 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 -43
- 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 -134
- 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 -72
- 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 -99
- package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
- package/ui/elements/form/FileManagerElement/styled.d.ts +0 -23
- package/ui/elements/form/FileManagerElement/styled.js +0 -106
- 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 -84
- 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 -44
- 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 -171
- 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 -46
- 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 -53
- 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 -50
- 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 -68
- 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 -54
- 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 -60
- 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 -101
- 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 -41
- 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 -41
- 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 -41
- 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 -47
- 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 -32
- 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 -33
- 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 -57
- 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 -80
- package/ui/views/FormView/FormHeaderElement.js.map +0 -1
- package/ui/views/FormView.d.ts +0 -40
- package/ui/views/FormView.js +0 -166
- package/ui/views/FormView.js.map +0 -1
- package/ui/views/OverlayView/ContentElement.d.ts +0 -6
- package/ui/views/OverlayView/ContentElement.js +0 -49
- 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 -109
- 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 -48
- 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 -45
- package/ui/views/OverlayView/useOverlayView.js.map +0 -1
- package/ui/views/OverlayView.d.ts +0 -29
- package/ui/views/OverlayView.js +0 -161
- package/ui/views/OverlayView.js.map +0 -1
- package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -11
- package/ui/views/SplitView/SplitViewPanelElement.js +0 -69
- package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
- package/ui/views/SplitView.d.ts +0 -21
- package/ui/views/SplitView.js +0 -118
- package/ui/views/SplitView.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","minimatch","anonymousData","id","displayName","type","roles","teams","permissions","profile","external","currentTenant","name","defaultTenant","Identity","constructor","data","identityType","createAuthenticated","createAnonymous","isAuthenticated","getPermission","exact","perms","exactMatch","find","p","getPermissions","filter","current","update","updates"],"sources":["Identity.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { minimatch } from \"minimatch\";\nimport type { Tenant } from \"~/features/tenancy/abstractions.js\";\n\nexport interface IPermission {\n name: string;\n [key: string]: any;\n}\n\nexport interface IRole {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface ITeam {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IProfile {\n external: boolean;\n email?: string;\n firstName?: string;\n lastName?: string;\n avatar?: {\n src?: string;\n };\n}\n\nexport interface IdentityData {\n id: string;\n type: string;\n displayName: string;\n roles: IRole[];\n teams: ITeam[];\n permissions: Identity.Permission[];\n profile: Identity.Profile;\n currentTenant: Tenant;\n defaultTenant: Tenant;\n}\n\nconst anonymousData: IdentityData = {\n id: \"anonymous\",\n displayName: \"Anonymous\",\n type: \"admin\",\n roles: [],\n teams: [],\n permissions: [],\n profile: {\n external: false\n },\n currentTenant: {\n id: \"root\",\n name: \"Root\"\n },\n defaultTenant: {\n id: \"root\",\n name: \"Root\"\n }\n};\n\nexport class Identity {\n private constructor(\n private data: Identity.Data,\n private identityType: \"anonymous\" | \"authenticated\"\n ) {\n makeAutoObservable(this);\n }\n\n static createAuthenticated(data: Identity.Data) {\n return new Identity(data, \"authenticated\");\n }\n\n static createAnonymous() {\n return new Identity(anonymousData, \"anonymous\");\n }\n\n get isAuthenticated(): boolean {\n return this.identityType === \"authenticated\";\n }\n\n get id() {\n return this.data.id;\n }\n\n get type() {\n return this.data.type;\n }\n\n get displayName() {\n return this.data.displayName;\n }\n\n get roles() {\n return this.data.roles ?? [];\n }\n\n get teams() {\n return this.data.teams ?? [];\n }\n\n get profile() {\n return this.data.profile;\n }\n\n get currentTenant() {\n return this.data.currentTenant;\n }\n\n get defaultTenant() {\n return this.data.defaultTenant;\n }\n\n getPermission<T extends Identity.Permission = Identity.Permission>(\n name: string,\n exact?: boolean\n ): T | null {\n const perms = (this.data.permissions || []) as T[];\n const exactMatch = perms.find(p => p.name === name);\n if (exactMatch) {\n return exactMatch as T;\n } else if (exact) {\n return null;\n }\n\n // Try matching using patterns\n return perms.find(p => minimatch(name, p.name)) || null;\n }\n\n getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T> {\n const permissions = this.data.permissions || [];\n if (!name) {\n return permissions as T[];\n }\n\n return permissions.filter(current => {\n const exactMatch = current.name === name;\n if (exactMatch) {\n return true;\n }\n\n // Try matching using patterns.\n return minimatch(name, current.name);\n }) as T[];\n }\n\n update(updates: Partial<Pick<Identity.Data, \"displayName\" | \"profile\">>) {\n runInAction(() => {\n this.data.displayName = updates.displayName || this.data.displayName;\n this.data.profile = updates.profile || this.data.profile;\n });\n }\n}\n\nexport namespace Identity {\n export type Data = IdentityData;\n export type Permission = IPermission;\n export type Profile = IProfile;\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,SAASC,SAAS,QAAQ,WAAW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ACZ,WAAW,GAAG2B,OAAO,CAAC3B,WAAW,IAAI,IAAI,CAACY,IAAI,CAACZ,WAAW;MACpE,IAAI,CAACY,IAAI,CAACP,OAAO,GAAGsB,OAAO,CAACtB,OAAO,IAAI,IAAI,CAACO,IAAI,CAACP,OAAO;IAC5D,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EnvConfig } from "@webiny/app/features/envConfig/index.js";
|
|
2
|
+
import { NetworkErrorEvent, NetworkErrorEventHandler } from "@webiny/app/errors/index.js";
|
|
3
|
+
declare class ErrorOverlayNetworkErrorHandlerImpl implements NetworkErrorEventHandler.Interface {
|
|
4
|
+
private readonly debug;
|
|
5
|
+
constructor(envConfig: EnvConfig.Interface);
|
|
6
|
+
handle(event: NetworkErrorEvent): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ErrorOverlayNetworkErrorHandler: typeof ErrorOverlayNetworkErrorHandlerImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/app/features/eventPublisher").IEventHandler<NetworkErrorEvent>>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import createErrorOverlay from "@webiny/app/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js";
|
|
3
|
+
import { ErrorOverlay } from "@webiny/app/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js";
|
|
4
|
+
import { LocalAwsLambdaTimeoutMessage } from "@webiny/app/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js";
|
|
5
|
+
import { GqlErrorOverlay } from "@webiny/app/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js";
|
|
6
|
+
import { EnvConfig } from "@webiny/app/features/envConfig/index.js";
|
|
7
|
+
import { NetworkErrorEventHandler } from "@webiny/app/errors/index.js";
|
|
8
|
+
import { TenantIsDisabled } from "./TenantIsDisabled.js";
|
|
9
|
+
class ErrorOverlayNetworkErrorHandlerImpl {
|
|
10
|
+
constructor(envConfig) {
|
|
11
|
+
this.debug = envConfig.get("debug");
|
|
12
|
+
}
|
|
13
|
+
async handle(event) {
|
|
14
|
+
if (!this.debug) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const {
|
|
18
|
+
errorType,
|
|
19
|
+
query,
|
|
20
|
+
message,
|
|
21
|
+
code,
|
|
22
|
+
result
|
|
23
|
+
} = event.payload;
|
|
24
|
+
if (errorType === "timeout" && result?.code === "LOCAL_AWS_LAMBDA_TIMEOUT") {
|
|
25
|
+
createErrorOverlay({
|
|
26
|
+
element: /*#__PURE__*/React.createElement(ErrorOverlay, {
|
|
27
|
+
message: /*#__PURE__*/React.createElement(LocalAwsLambdaTimeoutMessage, null),
|
|
28
|
+
closeable: false
|
|
29
|
+
}),
|
|
30
|
+
closeable: false
|
|
31
|
+
});
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (code === "Tenancy/TenantDisabled") {
|
|
35
|
+
createErrorOverlay({
|
|
36
|
+
element: /*#__PURE__*/React.createElement(TenantIsDisabled, null),
|
|
37
|
+
closeable: false
|
|
38
|
+
});
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (query) {
|
|
42
|
+
createErrorOverlay({
|
|
43
|
+
element: /*#__PURE__*/React.createElement(GqlErrorOverlay, {
|
|
44
|
+
query: query,
|
|
45
|
+
networkError: {
|
|
46
|
+
message,
|
|
47
|
+
statusCode: event.payload.statusCode
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
createErrorOverlay({
|
|
53
|
+
element: /*#__PURE__*/React.createElement(ErrorOverlay, {
|
|
54
|
+
message: message,
|
|
55
|
+
closeable: true
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export const ErrorOverlayNetworkErrorHandler = NetworkErrorEventHandler.createImplementation({
|
|
62
|
+
implementation: ErrorOverlayNetworkErrorHandlerImpl,
|
|
63
|
+
dependencies: [EnvConfig]
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=ErrorOverlayNetworkErrorHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","createErrorOverlay","ErrorOverlay","LocalAwsLambdaTimeoutMessage","GqlErrorOverlay","EnvConfig","NetworkErrorEventHandler","TenantIsDisabled","ErrorOverlayNetworkErrorHandlerImpl","constructor","envConfig","debug","get","handle","event","errorType","query","message","code","result","payload","element","createElement","closeable","networkError","statusCode","ErrorOverlayNetworkErrorHandler","createImplementation","implementation","dependencies"],"sources":["ErrorOverlayNetworkErrorHandler.tsx"],"sourcesContent":["import React from \"react\";\nimport createErrorOverlay from \"@webiny/app/plugins/NetworkErrorLinkPlugin/createErrorOverlay.js\";\nimport { ErrorOverlay } from \"@webiny/app/plugins/NetworkErrorLinkPlugin/ErrorOverlay.js\";\nimport { LocalAwsLambdaTimeoutMessage } from \"@webiny/app/plugins/NetworkErrorLinkPlugin/LocalAwsLambdaTimeoutMessage.js\";\nimport { GqlErrorOverlay } from \"@webiny/app/plugins/NetworkErrorLinkPlugin/GqlErrorOverlay.js\";\nimport { EnvConfig } from \"@webiny/app/features/envConfig/index.js\";\nimport { NetworkErrorEvent, NetworkErrorEventHandler } from \"@webiny/app/errors/index.js\";\nimport { TenantIsDisabled } from \"~/errors/TenantIsDisabled.js\";\n\nclass ErrorOverlayNetworkErrorHandlerImpl implements NetworkErrorEventHandler.Interface {\n private readonly debug: boolean;\n\n constructor(envConfig: EnvConfig.Interface) {\n this.debug = envConfig.get(\"debug\");\n }\n\n async handle(event: NetworkErrorEvent): Promise<void> {\n if (!this.debug) {\n return;\n }\n\n const { errorType, query, message, code, result } = event.payload;\n\n if (errorType === \"timeout\" && result?.code === \"LOCAL_AWS_LAMBDA_TIMEOUT\") {\n createErrorOverlay({\n element: (\n <ErrorOverlay message={<LocalAwsLambdaTimeoutMessage />} closeable={false} />\n ),\n closeable: false\n });\n return;\n }\n\n if (code === \"Tenancy/TenantDisabled\") {\n createErrorOverlay({\n element: <TenantIsDisabled />,\n closeable: false\n });\n return;\n }\n\n if (query) {\n createErrorOverlay({\n element: (\n <GqlErrorOverlay\n query={query}\n networkError={{ message, statusCode: event.payload.statusCode } as any}\n />\n )\n });\n } else {\n createErrorOverlay({\n element: <ErrorOverlay message={message} closeable={true} />\n });\n }\n }\n}\n\nexport const ErrorOverlayNetworkErrorHandler = NetworkErrorEventHandler.createImplementation({\n implementation: ErrorOverlayNetworkErrorHandlerImpl,\n dependencies: [EnvConfig]\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,kBAAkB,MAAM,kEAAkE;AACjG,SAASC,YAAY,QAAQ,4DAA4D;AACzF,SAASC,4BAA4B,QAAQ,4EAA4E;AACzH,SAASC,eAAe,QAAQ,+DAA+D;AAC/F,SAASC,SAAS,QAAQ,yCAAyC;AACnE,SAA4BC,wBAAwB,QAAQ,6BAA6B;AACzF,SAASC,gBAAgB;AAEzB,MAAMC,mCAAmC,CAA+C;EAGpFC,WAAWA,CAACC,SAA8B,EAAE;IACxC,IAAI,CAACC,KAAK,GAAGD,SAAS,CAACE,GAAG,CAAC,OAAO,CAAC;EACvC;EAEA,MAAMC,MAAMA,CAACC,KAAwB,EAAiB;IAClD,IAAI,CAAC,IAAI,CAACH,KAAK,EAAE;MACb;IACJ;IAEA,MAAM;MAAEI,SAAS;MAAEC,KAAK;MAAEC,OAAO;MAAEC,IAAI;MAAEC;IAAO,CAAC,GAAGL,KAAK,CAACM,OAAO;IAEjE,IAAIL,SAAS,KAAK,SAAS,IAAII,MAAM,EAAED,IAAI,KAAK,0BAA0B,EAAE;MACxEjB,kBAAkB,CAAC;QACfoB,OAAO,eACHrB,KAAA,CAAAsB,aAAA,CAACpB,YAAY;UAACe,OAAO,eAAEjB,KAAA,CAAAsB,aAAA,CAACnB,4BAA4B,MAAE,CAAE;UAACoB,SAAS,EAAE;QAAM,CAAE,CAC/E;QACDA,SAAS,EAAE;MACf,CAAC,CAAC;MACF;IACJ;IAEA,IAAIL,IAAI,KAAK,wBAAwB,EAAE;MACnCjB,kBAAkB,CAAC;QACfoB,OAAO,eAAErB,KAAA,CAAAsB,aAAA,CAACf,gBAAgB,MAAE,CAAC;QAC7BgB,SAAS,EAAE;MACf,CAAC,CAAC;MACF;IACJ;IAEA,IAAIP,KAAK,EAAE;MACPf,kBAAkB,CAAC;QACfoB,OAAO,eACHrB,KAAA,CAAAsB,aAAA,CAAClB,eAAe;UACZY,KAAK,EAAEA,KAAM;UACbQ,YAAY,EAAE;YAAEP,OAAO;YAAEQ,UAAU,EAAEX,KAAK,CAACM,OAAO,CAACK;UAAW;QAAS,CAC1E;MAET,CAAC,CAAC;IACN,CAAC,MAAM;MACHxB,kBAAkB,CAAC;QACfoB,OAAO,eAAErB,KAAA,CAAAsB,aAAA,CAACpB,YAAY;UAACe,OAAO,EAAEA,OAAQ;UAACM,SAAS,EAAE;QAAK,CAAE;MAC/D,CAAC,CAAC;IACN;EACJ;AACJ;AAEA,OAAO,MAAMG,+BAA+B,GAAGpB,wBAAwB,CAACqB,oBAAoB,CAAC;EACzFC,cAAc,EAAEpB,mCAAmC;EACnDqB,YAAY,EAAE,CAACxB,SAAS;AAC5B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Card, Text } from "@webiny/admin-ui";
|
|
3
|
+
export const TenantIsDisabled = () => {
|
|
4
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5
|
+
className: "absolute flex w-full h-screen bg-neutral-light",
|
|
6
|
+
style: {
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0
|
|
9
|
+
}
|
|
10
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
className: "m-auto max-w-1/2"
|
|
12
|
+
}, /*#__PURE__*/React.createElement(Card, {
|
|
13
|
+
title: "Your account is currently unavailable",
|
|
14
|
+
padding: "md",
|
|
15
|
+
elevation: "medium",
|
|
16
|
+
cornerSize: "md",
|
|
17
|
+
variant: "accent"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
19
|
+
as: "div"
|
|
20
|
+
}, "Access to this workspace has been paused. If you believe this is a mistake, please reach out to your organization's administrator for help."))));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=TenantIsDisabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Card","Text","TenantIsDisabled","createElement","className","style","top","left","title","padding","elevation","cornerSize","variant","as"],"sources":["TenantIsDisabled.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Card, Text } from \"@webiny/admin-ui\";\n\nexport const TenantIsDisabled = () => {\n return (\n <div className=\"absolute flex w-full h-screen bg-neutral-light\" style={{ top: 0, left: 0 }}>\n <div className=\"m-auto max-w-1/2\">\n <Card\n title=\"Your account is currently unavailable\"\n padding=\"md\"\n elevation=\"medium\"\n cornerSize={\"md\"}\n variant={\"accent\"}\n >\n <Text as={\"div\"}>\n Access to this workspace has been paused. If you believe this is a mistake,\n please reach out to your organization's administrator for help.\n </Text>\n </Card>\n </div>\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,kBAAkB;AAE7C,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EAClC,oBACIH,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAC,gDAAgD;IAACC,KAAK,EAAE;MAAEC,GAAG,EAAE,CAAC;MAAEC,IAAI,EAAE;IAAE;EAAE,gBACvFR,KAAA,CAAAI,aAAA;IAAKC,SAAS,EAAC;EAAkB,gBAC7BL,KAAA,CAAAI,aAAA,CAACH,IAAI;IACDQ,KAAK,EAAC,uCAAuC;IAC7CC,OAAO,EAAC,IAAI;IACZC,SAAS,EAAC,QAAQ;IAClBC,UAAU,EAAE,IAAK;IACjBC,OAAO,EAAE;EAAS,gBAElBb,KAAA,CAAAI,aAAA,CAACF,IAAI;IAACY,EAAE,EAAE;EAAM,GAAC,6IAGX,CACJ,CACL,CACJ,CAAC;AAEd,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BuildParam, BuildParams } from "../../features/buildParams/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BuildParam","BuildParams"],"sources":["buildParams.ts"],"sourcesContent":["export { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AdminConfig } from "../../config/AdminConfig.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AdminConfig"],"sources":["configs.ts"],"sourcesContent":["export { AdminConfig } from \"~/config/AdminConfig.js\";\n"],"mappings":"AAAA,SAASA,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { Bind } from "@webiny/form";
|
|
2
|
+
export { Form } from "@webiny/form";
|
|
3
|
+
export { UnsetOnUnmount } from "@webiny/form";
|
|
4
|
+
export { useBind } from "@webiny/form";
|
|
5
|
+
export { useBindPrefix } from "@webiny/form";
|
|
6
|
+
export { useGenerateSlug } from "@webiny/form";
|
|
7
|
+
export { useForm } from "@webiny/form";
|
|
8
|
+
export type { FormAPI as FormApi, FormOnSubmit, GenericFormData } from "@webiny/form";
|
|
9
|
+
export { validation } from "@webiny/validation";
|
|
10
|
+
export { Validation } from "@webiny/validation";
|
|
11
|
+
export { ValidationError } from "@webiny/validation";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Bind } from "@webiny/form";
|
|
2
|
+
export { Form } from "@webiny/form";
|
|
3
|
+
export { UnsetOnUnmount } from "@webiny/form";
|
|
4
|
+
export { useBind } from "@webiny/form";
|
|
5
|
+
export { useBindPrefix } from "@webiny/form";
|
|
6
|
+
export { useGenerateSlug } from "@webiny/form";
|
|
7
|
+
export { useForm } from "@webiny/form";
|
|
8
|
+
export { validation } from "@webiny/validation";
|
|
9
|
+
export { Validation } from "@webiny/validation";
|
|
10
|
+
export { ValidationError } from "@webiny/validation";
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Bind","Form","UnsetOnUnmount","useBind","useBindPrefix","useGenerateSlug","useForm","validation","Validation","ValidationError"],"sources":["form.ts"],"sourcesContent":["export { Bind } from \"@webiny/form\";\nexport { Form } from \"@webiny/form\";\nexport { UnsetOnUnmount } from \"@webiny/form\";\nexport { useBind } from \"@webiny/form\";\nexport { useBindPrefix } from \"@webiny/form\";\nexport { useGenerateSlug } from \"@webiny/form\";\nexport { useForm } from \"@webiny/form\";\nexport type { FormAPI as FormApi, FormOnSubmit, GenericFormData } from \"@webiny/form\";\nexport { validation } from \"@webiny/validation\";\nexport { Validation } from \"@webiny/validation\";\nexport { ValidationError } from \"@webiny/validation\";\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,cAAc,QAAQ,cAAc;AAC7C,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,eAAe,QAAQ,cAAc;AAC9C,SAASC,OAAO,QAAQ,cAAc;AAEtC,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,eAAe,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { LogInUseCase } from "../../features/security/LogIn/index.js";
|
|
2
|
+
export { LogOutUseCase } from "../../features/security/LogOut/index.js";
|
|
3
|
+
export { AuthenticationContext } from "../../features/security/AuthenticationContext/index.js";
|
|
4
|
+
export { IdentityContext } from "../../features/security/IdentityContext/index.js";
|
|
5
|
+
export { useAuthentication } from "../../presentation/security/hooks/useAuthentication.js";
|
|
6
|
+
export { useIdentity } from "../../presentation/security/hooks/useIdentity.js";
|
|
7
|
+
export { HasPermissionComponent } from "../../presentation/security/components/HasPermission.js";
|
|
8
|
+
export { LoginScreenComponent } from "../../base/ui/LoginScreen.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { LogInUseCase } from "../../features/security/LogIn/index.js";
|
|
2
|
+
export { LogOutUseCase } from "../../features/security/LogOut/index.js";
|
|
3
|
+
export { AuthenticationContext } from "../../features/security/AuthenticationContext/index.js";
|
|
4
|
+
export { IdentityContext } from "../../features/security/IdentityContext/index.js";
|
|
5
|
+
export { useAuthentication } from "../../presentation/security/hooks/useAuthentication.js";
|
|
6
|
+
export { useIdentity } from "../../presentation/security/hooks/useIdentity.js";
|
|
7
|
+
export { HasPermissionComponent } from "../../presentation/security/components/HasPermission.js";
|
|
8
|
+
export { LoginScreenComponent } from "../../base/ui/LoginScreen.js";
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LogInUseCase","LogOutUseCase","AuthenticationContext","IdentityContext","useAuthentication","useIdentity","HasPermissionComponent","LoginScreenComponent"],"sources":["security.ts"],"sourcesContent":["export { LogInUseCase } from \"~/features/security/LogIn/index.js\";\nexport { LogOutUseCase } from \"~/features/security/LogOut/index.js\";\nexport { AuthenticationContext } from \"~/features/security/AuthenticationContext/index.js\";\nexport { IdentityContext } from \"~/features/security/IdentityContext/index.js\";\nexport { useAuthentication } from \"~/presentation/security/hooks/useAuthentication.js\";\nexport { useIdentity } from \"~/presentation/security/hooks/useIdentity.js\";\nexport { HasPermissionComponent } from \"~/presentation/security/components/HasPermission.js\";\nexport { LoginScreenComponent } from \"~/base/ui/LoginScreen.js\";\n"],"mappings":"AAAA,SAASA,YAAY;AACrB,SAASC,aAAa;AACtB,SAASC,qBAAqB;AAC9B,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,WAAW;AACpB,SAASC,sBAAsB;AAC/B,SAASC,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TenantContext","useTenantContext"],"sources":["tenancy.ts"],"sourcesContent":["export { TenantContext } from \"~/features/tenancy/abstractions.js\";\nexport { useTenantContext } from \"~/presentation/tenancy/useTenantContext.js\";\n"],"mappings":"AAAA,SAASA,aAAa;AACtB,SAASC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Logo","TenantSelector","LexicalEditor"],"sources":["ui.ts"],"sourcesContent":["export { Logo } from \"~/base/ui/Logo.js\";\nexport { TenantSelector } from \"~/base/ui/TenantSelector.js\";\nexport { LexicalEditor } from \"~/components/LexicalEditor/LexicalEditor.js\";\n"],"mappings":"AAAA,SAASA,IAAI;AACb,SAASC,cAAc;AACvB,SAASC,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { createPermissionSchema } from "../permissions/index.js";
|
|
2
|
+
export { createHasPermission } from "../permissions/index.js";
|
|
3
|
+
export { createUsePermissions } from "../permissions/index.js";
|
|
4
|
+
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
5
|
+
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
6
|
+
export { AdminConfig } from "../config/AdminConfig.js";
|
package/exports/admin.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { createPermissionSchema } from "../permissions/index.js";
|
|
2
|
+
export { createHasPermission } from "../permissions/index.js";
|
|
3
|
+
export { createUsePermissions } from "../permissions/index.js";
|
|
4
|
+
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
5
|
+
export { BuildParam, BuildParams } from "../features/buildParams/index.js";
|
|
6
|
+
export { AdminConfig } from "../config/AdminConfig.js";
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createPermissionSchema","createHasPermission","createUsePermissions","RegisterFeature","BuildParam","BuildParams","AdminConfig"],"sources":["admin.ts"],"sourcesContent":["export { createPermissionSchema } from \"~/permissions/index.js\";\nexport { createHasPermission } from \"~/permissions/index.js\";\nexport { createUsePermissions } from \"~/permissions/index.js\";\nexport { RegisterFeature } from \"~/components/RegisterFeature.js\";\nexport { BuildParam, BuildParams } from \"~/features/buildParams/index.js\";\nexport { AdminConfig } from \"~/config/AdminConfig.js\";\n"],"mappings":"AAAA,SAASA,sBAAsB;AAC/B,SAASC,mBAAmB;AAC5B,SAASC,oBAAoB;AAC7B,SAASC,eAAe;AACxB,SAASC,UAAU,EAAEC,WAAW;AAChC,SAASC,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AdminBuildParam: import("@webiny/project/defineExtension").ExtensionComponent<z.ZodObject<{
|
|
3
|
+
paramName: z.ZodString;
|
|
4
|
+
value: z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodArray<z.ZodAny, "many">, z.ZodNumber, z.ZodBoolean]>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
value: string | number | boolean | any[] | Record<string, any>;
|
|
7
|
+
paramName: string;
|
|
8
|
+
}, {
|
|
9
|
+
value: string | number | boolean | any[] | Record<string, any>;
|
|
10
|
+
paramName: string;
|
|
11
|
+
}>>;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineExtension } from "@webiny/project/defineExtension";
|
|
3
|
+
import crypto from "crypto";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import { Node, Project } from "ts-morph";
|
|
7
|
+
async function generateBuildParamsFeature(buildParamsDir, ctx) {
|
|
8
|
+
const featureFilePath = path.join(buildParamsDir, "feature.ts");
|
|
9
|
+
|
|
10
|
+
// Get all BuildParam_*.ts files.
|
|
11
|
+
const files = fs.readdirSync(buildParamsDir).filter(f => f.startsWith("BuildParam_") && f.endsWith(".ts") && f !== "feature.ts");
|
|
12
|
+
|
|
13
|
+
// Generate imports and registrations.
|
|
14
|
+
const imports = files.map(file => {
|
|
15
|
+
const className = path.parse(file).name;
|
|
16
|
+
return `import ${className} from "./${className}.js";`;
|
|
17
|
+
}).join("\n");
|
|
18
|
+
const registrations = files.map(file => {
|
|
19
|
+
const className = path.parse(file).name;
|
|
20
|
+
return ` container.register(${className});`;
|
|
21
|
+
}).join("\n");
|
|
22
|
+
const featureContent = `import { createFeature } from "@webiny/feature/admin";
|
|
23
|
+
import { Container } from "@webiny/di";
|
|
24
|
+
${imports}
|
|
25
|
+
|
|
26
|
+
export const BuildParamsInternalFeature = createFeature({
|
|
27
|
+
name: "BuildParamsInternal",
|
|
28
|
+
register(container: Container) {
|
|
29
|
+
${registrations}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
`;
|
|
33
|
+
fs.writeFileSync(featureFilePath, featureContent, "utf8");
|
|
34
|
+
|
|
35
|
+
// Now we need to update Extensions.tsx to use RegisterFeature with this feature.
|
|
36
|
+
await updateExtensionsTsx(ctx);
|
|
37
|
+
}
|
|
38
|
+
async function updateExtensionsTsx(ctx) {
|
|
39
|
+
const extensionsTsxFilePath = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "Extensions.tsx").toString();
|
|
40
|
+
const project = new Project();
|
|
41
|
+
project.addSourceFileAtPath(extensionsTsxFilePath);
|
|
42
|
+
const source = project.getSourceFileOrThrow(extensionsTsxFilePath);
|
|
43
|
+
|
|
44
|
+
// Check if we already have the imports.
|
|
45
|
+
const buildParamsFeatureImport = "./buildParams/feature.js";
|
|
46
|
+
const existingFeatureImport = source.getImportDeclaration(buildParamsFeatureImport);
|
|
47
|
+
if (!existingFeatureImport) {
|
|
48
|
+
let index = 1;
|
|
49
|
+
const importDeclarations = source.getImportDeclarations();
|
|
50
|
+
if (importDeclarations.length) {
|
|
51
|
+
const last = importDeclarations[importDeclarations.length - 1];
|
|
52
|
+
index = last.getChildIndex() + 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Add import for BuildParamsInternalFeature.
|
|
56
|
+
source.insertImportDeclaration(index, {
|
|
57
|
+
namedImports: ["BuildParamsInternalFeature"],
|
|
58
|
+
moduleSpecifier: buildParamsFeatureImport
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Add import for BuildParamsFeature.
|
|
62
|
+
const buildParamsFeatureImportPath = "@webiny/app-admin";
|
|
63
|
+
const existingBuildParamsImport = source.getImportDeclaration(buildParamsFeatureImportPath);
|
|
64
|
+
if (!existingBuildParamsImport) {
|
|
65
|
+
source.insertImportDeclaration(index, {
|
|
66
|
+
namedImports: ["BuildParamsFeature"],
|
|
67
|
+
moduleSpecifier: buildParamsFeatureImportPath
|
|
68
|
+
});
|
|
69
|
+
} else {
|
|
70
|
+
// Add to existing import if BuildParamsFeature not already there.
|
|
71
|
+
const namedImports = existingBuildParamsImport.getNamedImports();
|
|
72
|
+
const hasBuildParamsFeature = namedImports.some(ni => ni.getName() === "BuildParamsFeature");
|
|
73
|
+
if (!hasBuildParamsFeature) {
|
|
74
|
+
existingBuildParamsImport.addNamedImport("BuildParamsFeature");
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Add import for RegisterFeature if not present.
|
|
79
|
+
const registerFeatureImportPath = "@webiny/app-admin";
|
|
80
|
+
const existingRegisterFeatureImport = source.getImportDeclaration(registerFeatureImportPath);
|
|
81
|
+
if (existingRegisterFeatureImport) {
|
|
82
|
+
const namedImports = existingRegisterFeatureImport.getNamedImports();
|
|
83
|
+
const hasRegisterFeature = namedImports.some(ni => ni.getName() === "RegisterFeature");
|
|
84
|
+
if (!hasRegisterFeature) {
|
|
85
|
+
existingRegisterFeatureImport.addNamedImport("RegisterFeature");
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
source.insertImportDeclaration(index, {
|
|
89
|
+
namedImports: ["RegisterFeature"],
|
|
90
|
+
moduleSpecifier: registerFeatureImportPath
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Now add <RegisterFeature> components to the Extensions component.
|
|
96
|
+
const extensionsIdentifier = source.getFirstDescendant(node => {
|
|
97
|
+
if (!Node.isIdentifier(node)) {
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
return node.getText() === "Extensions";
|
|
101
|
+
});
|
|
102
|
+
if (!extensionsIdentifier) {
|
|
103
|
+
throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}".`);
|
|
104
|
+
}
|
|
105
|
+
const extensionsArrowFn = extensionsIdentifier.getNextSibling(node => Node.isArrowFunction(node));
|
|
106
|
+
if (!extensionsArrowFn) {
|
|
107
|
+
throw new Error(`Could not find the "Extensions" React component arrow function.`);
|
|
108
|
+
}
|
|
109
|
+
const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {
|
|
110
|
+
return Node.isJsxFragment(node);
|
|
111
|
+
});
|
|
112
|
+
if (!extensionsArrowFnFragment) {
|
|
113
|
+
throw new Error(`Could not find JSX fragment in Extensions component.`);
|
|
114
|
+
}
|
|
115
|
+
const currentContent = extensionsArrowFnFragment.getFullText().replace("<>", "").replace("</>", "").trim();
|
|
116
|
+
|
|
117
|
+
// Check if we already have the RegisterFeature components.
|
|
118
|
+
if (!currentContent.includes("BuildParamsFeature")) {
|
|
119
|
+
const newContent = `<><RegisterFeature feature={BuildParamsFeature} /><RegisterFeature feature={BuildParamsInternalFeature} />${currentContent}</>`;
|
|
120
|
+
extensionsArrowFnFragment.replaceWithText(newContent);
|
|
121
|
+
}
|
|
122
|
+
await source.save();
|
|
123
|
+
}
|
|
124
|
+
export const AdminBuildParam = defineExtension({
|
|
125
|
+
type: "Admin/BuildParam",
|
|
126
|
+
tags: {
|
|
127
|
+
runtimeContext: "app-build",
|
|
128
|
+
appName: "admin"
|
|
129
|
+
},
|
|
130
|
+
description: "Add build-time parameter to Admin app.",
|
|
131
|
+
multiple: true,
|
|
132
|
+
paramsSchema: () => {
|
|
133
|
+
return z.object({
|
|
134
|
+
paramName: z.string(),
|
|
135
|
+
value: z.union([z.string(), z.record(z.any()), z.array(z.any()), z.number(), z.boolean()])
|
|
136
|
+
});
|
|
137
|
+
},
|
|
138
|
+
async build(params, ctx) {
|
|
139
|
+
const buildParamsDir = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "buildParams").toString();
|
|
140
|
+
const {
|
|
141
|
+
paramName,
|
|
142
|
+
value
|
|
143
|
+
} = params;
|
|
144
|
+
|
|
145
|
+
// Serialize value to a TypeScript literal.
|
|
146
|
+
const valueStr = JSON.stringify(value, null, 4);
|
|
147
|
+
|
|
148
|
+
// Generate a unique class name based on the paramName.
|
|
149
|
+
const hash = crypto.createHash("sha256").update(paramName).digest("hex");
|
|
150
|
+
const className = `BuildParam_${hash.slice(-10)}`;
|
|
151
|
+
const fileName = `${className}.ts`;
|
|
152
|
+
const filePath = path.join(buildParamsDir, fileName);
|
|
153
|
+
|
|
154
|
+
// Ensure buildParams directory exists.
|
|
155
|
+
if (!fs.existsSync(buildParamsDir)) {
|
|
156
|
+
fs.mkdirSync(buildParamsDir, {
|
|
157
|
+
recursive: true
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Check if file already exists.
|
|
162
|
+
if (!fs.existsSync(filePath)) {
|
|
163
|
+
// Create the BuildParam implementation file.
|
|
164
|
+
const fileContent = `import { BuildParam } from "webiny/admin/buildParams";
|
|
165
|
+
|
|
166
|
+
class ${className} implements BuildParam.Interface {
|
|
167
|
+
key = "${paramName}";
|
|
168
|
+
value = ${valueStr};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export default BuildParam.createImplementation({
|
|
172
|
+
implementation: ${className},
|
|
173
|
+
dependencies: []
|
|
174
|
+
});
|
|
175
|
+
`;
|
|
176
|
+
fs.writeFileSync(filePath, fileContent, "utf8");
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Now we need to generate/update the feature file that imports all BuildParams.
|
|
180
|
+
await generateBuildParamsFeature(buildParamsDir, ctx);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
//# sourceMappingURL=AdminBuildParam.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["z","defineExtension","crypto","path","fs","Node","Project","generateBuildParamsFeature","buildParamsDir","ctx","featureFilePath","join","files","readdirSync","filter","f","startsWith","endsWith","imports","map","file","className","parse","name","registrations","featureContent","writeFileSync","updateExtensionsTsx","extensionsTsxFilePath","project","paths","workspaceFolder","toString","addSourceFileAtPath","source","getSourceFileOrThrow","buildParamsFeatureImport","existingFeatureImport","getImportDeclaration","index","importDeclarations","getImportDeclarations","length","last","getChildIndex","insertImportDeclaration","namedImports","moduleSpecifier","buildParamsFeatureImportPath","existingBuildParamsImport","getNamedImports","hasBuildParamsFeature","some","ni","getName","addNamedImport","registerFeatureImportPath","existingRegisterFeatureImport","hasRegisterFeature","extensionsIdentifier","getFirstDescendant","node","isIdentifier","getText","Error","extensionsArrowFn","getNextSibling","isArrowFunction","extensionsArrowFnFragment","isJsxFragment","currentContent","getFullText","replace","trim","includes","newContent","replaceWithText","save","AdminBuildParam","type","tags","runtimeContext","appName","description","multiple","paramsSchema","object","paramName","string","value","union","record","any","array","number","boolean","build","params","valueStr","JSON","stringify","hash","createHash","update","digest","slice","fileName","filePath","existsSync","mkdirSync","recursive","fileContent"],"sources":["AdminBuildParam.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineExtension } from \"@webiny/project/defineExtension\";\nimport crypto from \"crypto\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport { Node, Project } from \"ts-morph\";\n\nasync function generateBuildParamsFeature(buildParamsDir: string, ctx: any) {\n const featureFilePath = path.join(buildParamsDir, \"feature.ts\");\n\n // Get all BuildParam_*.ts files.\n const files = fs\n .readdirSync(buildParamsDir)\n .filter(f => f.startsWith(\"BuildParam_\") && f.endsWith(\".ts\") && f !== \"feature.ts\");\n\n // Generate imports and registrations.\n const imports = files\n .map(file => {\n const className = path.parse(file).name;\n return `import ${className} from \"./${className}.js\";`;\n })\n .join(\"\\n\");\n\n const registrations = files\n .map(file => {\n const className = path.parse(file).name;\n return ` container.register(${className});`;\n })\n .join(\"\\n\");\n\n const featureContent = `import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\n${imports}\n\nexport const BuildParamsInternalFeature = createFeature({\n name: \"BuildParamsInternal\",\n register(container: Container) {\n${registrations}\n }\n});\n`;\n\n fs.writeFileSync(featureFilePath, featureContent, \"utf8\");\n\n // Now we need to update Extensions.tsx to use RegisterFeature with this feature.\n await updateExtensionsTsx(ctx);\n}\n\nasync function updateExtensionsTsx(ctx: any) {\n const extensionsTsxFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"admin\", \"src\", \"Extensions.tsx\")\n .toString();\n\n const project = new Project();\n project.addSourceFileAtPath(extensionsTsxFilePath);\n\n const source = project.getSourceFileOrThrow(extensionsTsxFilePath);\n\n // Check if we already have the imports.\n const buildParamsFeatureImport = \"./buildParams/feature.js\";\n const existingFeatureImport = source.getImportDeclaration(buildParamsFeatureImport);\n\n if (!existingFeatureImport) {\n let index = 1;\n const importDeclarations = source.getImportDeclarations();\n if (importDeclarations.length) {\n const last = importDeclarations[importDeclarations.length - 1];\n index = last.getChildIndex() + 1;\n }\n\n // Add import for BuildParamsInternalFeature.\n source.insertImportDeclaration(index, {\n namedImports: [\"BuildParamsInternalFeature\"],\n moduleSpecifier: buildParamsFeatureImport\n });\n\n // Add import for BuildParamsFeature.\n const buildParamsFeatureImportPath = \"@webiny/app-admin\";\n const existingBuildParamsImport = source.getImportDeclaration(buildParamsFeatureImportPath);\n\n if (!existingBuildParamsImport) {\n source.insertImportDeclaration(index, {\n namedImports: [\"BuildParamsFeature\"],\n moduleSpecifier: buildParamsFeatureImportPath\n });\n } else {\n // Add to existing import if BuildParamsFeature not already there.\n const namedImports = existingBuildParamsImport.getNamedImports();\n const hasBuildParamsFeature = namedImports.some(\n ni => ni.getName() === \"BuildParamsFeature\"\n );\n if (!hasBuildParamsFeature) {\n existingBuildParamsImport.addNamedImport(\"BuildParamsFeature\");\n }\n }\n\n // Add import for RegisterFeature if not present.\n const registerFeatureImportPath = \"@webiny/app-admin\";\n const existingRegisterFeatureImport =\n source.getImportDeclaration(registerFeatureImportPath);\n\n if (existingRegisterFeatureImport) {\n const namedImports = existingRegisterFeatureImport.getNamedImports();\n const hasRegisterFeature = namedImports.some(ni => ni.getName() === \"RegisterFeature\");\n if (!hasRegisterFeature) {\n existingRegisterFeatureImport.addNamedImport(\"RegisterFeature\");\n }\n } else {\n source.insertImportDeclaration(index, {\n namedImports: [\"RegisterFeature\"],\n moduleSpecifier: registerFeatureImportPath\n });\n }\n }\n\n // Now add <RegisterFeature> components to the Extensions component.\n const extensionsIdentifier = source.getFirstDescendant(node => {\n if (!Node.isIdentifier(node)) {\n return false;\n }\n return node.getText() === \"Extensions\";\n });\n\n if (!extensionsIdentifier) {\n throw new Error(\n `Could not find the \"Extensions\" React component in \"${extensionsTsxFilePath}\".`\n );\n }\n\n const extensionsArrowFn = extensionsIdentifier.getNextSibling(node =>\n Node.isArrowFunction(node)\n );\n\n if (!extensionsArrowFn) {\n throw new Error(`Could not find the \"Extensions\" React component arrow function.`);\n }\n\n const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {\n return Node.isJsxFragment(node);\n });\n\n if (!extensionsArrowFnFragment) {\n throw new Error(`Could not find JSX fragment in Extensions component.`);\n }\n\n const currentContent = extensionsArrowFnFragment\n .getFullText()\n .replace(\"<>\", \"\")\n .replace(\"</>\", \"\")\n .trim();\n\n // Check if we already have the RegisterFeature components.\n if (!currentContent.includes(\"BuildParamsFeature\")) {\n const newContent = `<><RegisterFeature feature={BuildParamsFeature} /><RegisterFeature feature={BuildParamsInternalFeature} />${currentContent}</>`;\n extensionsArrowFnFragment.replaceWithText(newContent);\n }\n\n await source.save();\n}\n\nexport const AdminBuildParam = defineExtension({\n type: \"Admin/BuildParam\",\n tags: { runtimeContext: \"app-build\", appName: \"admin\" },\n description: \"Add build-time parameter to Admin app.\",\n multiple: true,\n paramsSchema: () => {\n return z.object({\n paramName: z.string(),\n value: z.union([\n z.string(),\n z.record(z.any()),\n z.array(z.any()),\n z.number(),\n z.boolean()\n ])\n });\n },\n async build(params, ctx) {\n const buildParamsDir = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"admin\", \"src\", \"buildParams\")\n .toString();\n\n const { paramName, value } = params;\n\n // Serialize value to a TypeScript literal.\n const valueStr = JSON.stringify(value, null, 4);\n\n // Generate a unique class name based on the paramName.\n const hash = crypto.createHash(\"sha256\").update(paramName).digest(\"hex\");\n const className = `BuildParam_${hash.slice(-10)}`;\n const fileName = `${className}.ts`;\n const filePath = path.join(buildParamsDir, fileName);\n\n // Ensure buildParams directory exists.\n if (!fs.existsSync(buildParamsDir)) {\n fs.mkdirSync(buildParamsDir, { recursive: true });\n }\n\n // Check if file already exists.\n if (!fs.existsSync(filePath)) {\n // Create the BuildParam implementation file.\n const fileContent = `import { BuildParam } from \"webiny/admin/buildParams\";\n\nclass ${className} implements BuildParam.Interface {\n key = \"${paramName}\";\n value = ${valueStr};\n}\n\nexport default BuildParam.createImplementation({\n implementation: ${className},\n dependencies: []\n});\n`;\n fs.writeFileSync(filePath, fileContent, \"utf8\");\n }\n\n // Now we need to generate/update the feature file that imports all BuildParams.\n await generateBuildParamsFeature(buildParamsDir, ctx);\n }\n});\n"],"mappings":"AAAA,SAASA,CAAC,QAAQ,KAAK;AACvB,SAASC,eAAe,QAAQ,iCAAiC;AACj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;AACA,sBAAsB7E,SAAS;AAC/B;AACA;AACA,CAAC;MACWjB,EAAE,CAACsB,aAAa,CAACiF,QAAQ,EAAEI,WAAW,EAAE,MAAM,CAAC;IACnD;;IAEA;IACA,MAAMxG,0BAA0B,CAACC,cAAc,EAAEC,GAAG,CAAC;EACzD;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AdminExtension: import("@webiny/project/defineExtension/defineExtension").ExtensionComponent<z.ZodObject<{
|
|
3
|
+
src: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
4
|
+
exportName: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
src: string;
|
|
7
|
+
exportName?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
src: string;
|
|
10
|
+
exportName?: string | undefined;
|
|
11
|
+
}>>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { defineExtension, zodSrcPath } from "@webiny/project/extensions/index.js";
|
|
2
|
+
import { ExtensionSrcResolver } from "@webiny/project";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { Node, Project } from "ts-morph";
|
|
6
|
+
import crypto from "crypto";
|
|
7
|
+
export const AdminExtension = defineExtension({
|
|
8
|
+
type: "Admin/Extension",
|
|
9
|
+
tags: {
|
|
10
|
+
runtimeContext: "app-build",
|
|
11
|
+
appName: "admin"
|
|
12
|
+
},
|
|
13
|
+
description: "Extend the Admin application with custom functionality.",
|
|
14
|
+
multiple: true,
|
|
15
|
+
paramsSchema: ({
|
|
16
|
+
project
|
|
17
|
+
}) => {
|
|
18
|
+
return z.object({
|
|
19
|
+
src: zodSrcPath({
|
|
20
|
+
project
|
|
21
|
+
}),
|
|
22
|
+
exportName: z.string().optional()
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
async build(params, ctx) {
|
|
26
|
+
const extensionsTsxFilePath = ctx.project.paths.workspaceFolder.join("apps", "admin", "src", "Extensions.tsx").toString();
|
|
27
|
+
const {
|
|
28
|
+
src: extensionFilePath
|
|
29
|
+
} = params;
|
|
30
|
+
|
|
31
|
+
// Resolve to absolute path for file operations.
|
|
32
|
+
const absoluteExtensionFilePath = ExtensionSrcResolver.resolvePath(extensionFilePath, ctx.project);
|
|
33
|
+
const extensionFileName = path.basename(absoluteExtensionFilePath);
|
|
34
|
+
|
|
35
|
+
// Export name can be customized or defaults to the file name without extension.
|
|
36
|
+
const exportName = params.exportName ?? path.parse(extensionFileName).name;
|
|
37
|
+
|
|
38
|
+
// Generate a constant hash-based component name to avoid using timestamps.
|
|
39
|
+
const hash = crypto.createHash("sha256").update(extensionFilePath).digest("hex");
|
|
40
|
+
const componentName = `AdminExtension_${hash.slice(-10)}`;
|
|
41
|
+
const project = new Project();
|
|
42
|
+
const importPath = path.relative(path.dirname(extensionsTsxFilePath), absoluteExtensionFilePath).replace(/\.tsx?$/, ".js");
|
|
43
|
+
project.addSourceFileAtPath(extensionsTsxFilePath);
|
|
44
|
+
const source = project.getSourceFileOrThrow(extensionsTsxFilePath);
|
|
45
|
+
const existingImportDeclaration = source.getImportDeclaration(importPath);
|
|
46
|
+
if (existingImportDeclaration) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Check if the extension file has a default export or named export
|
|
51
|
+
const extensionProject = new Project();
|
|
52
|
+
extensionProject.addSourceFileAtPath(absoluteExtensionFilePath);
|
|
53
|
+
const extensionSource = extensionProject.getSourceFileOrThrow(absoluteExtensionFilePath);
|
|
54
|
+
const hasDefaultExport = extensionSource.getDefaultExportSymbol() !== undefined;
|
|
55
|
+
let index = 1;
|
|
56
|
+
const importDeclarations = source.getImportDeclarations();
|
|
57
|
+
if (importDeclarations.length) {
|
|
58
|
+
const last = importDeclarations[importDeclarations.length - 1];
|
|
59
|
+
index = last.getChildIndex() + 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Import as default export if available, otherwise import named export
|
|
63
|
+
if (hasDefaultExport) {
|
|
64
|
+
source.insertImportDeclaration(index, {
|
|
65
|
+
defaultImport: componentName,
|
|
66
|
+
moduleSpecifier: importPath
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
source.insertImportDeclaration(index, {
|
|
70
|
+
namedImports: [{
|
|
71
|
+
name: exportName,
|
|
72
|
+
alias: componentName
|
|
73
|
+
}],
|
|
74
|
+
moduleSpecifier: importPath
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const extensionsIdentifier = source.getFirstDescendant(node => {
|
|
78
|
+
if (!Node.isIdentifier(node)) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
return node.getText() === "Extensions";
|
|
82
|
+
});
|
|
83
|
+
if (!extensionsIdentifier) {
|
|
84
|
+
throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}". Did you maybe change the name of the component?`);
|
|
85
|
+
}
|
|
86
|
+
const extensionsArrowFn = extensionsIdentifier.getNextSibling(node => Node.isArrowFunction(node));
|
|
87
|
+
if (!extensionsArrowFn) {
|
|
88
|
+
throw new Error(`Could not find the "Extensions" React component in "${extensionsTsxFilePath}". Did you maybe change its definition? It should be an arrow function.`);
|
|
89
|
+
}
|
|
90
|
+
const extensionsArrowFnFragment = extensionsArrowFn.getFirstDescendant(node => {
|
|
91
|
+
return Node.isJsxFragment(node);
|
|
92
|
+
});
|
|
93
|
+
const extensionsArrowFnFragmentChildrenText = extensionsArrowFnFragment.getFullText().replace("<>", "").replace("</>", "").trim();
|
|
94
|
+
extensionsArrowFnFragment.replaceWithText(`<><${componentName}/>${extensionsArrowFnFragmentChildrenText}</>`);
|
|
95
|
+
await source.save();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=AdminExtension.js.map
|