@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,27 @@
|
|
|
1
|
+
import { GraphQLClient } from "@webiny/app/features/graphqlClient/index.js";
|
|
2
|
+
import { TenantContext } from "./abstractions.js";
|
|
3
|
+
class GraphQLClientWithTenantId {
|
|
4
|
+
constructor(context, decoratee) {
|
|
5
|
+
this.context = context;
|
|
6
|
+
this.decoratee = decoratee;
|
|
7
|
+
}
|
|
8
|
+
async execute(params) {
|
|
9
|
+
const tenant = this.context.getCurrentTenant();
|
|
10
|
+
const tenantHeaders = tenant ? {
|
|
11
|
+
"x-tenant": tenant
|
|
12
|
+
} : {};
|
|
13
|
+
return this.decoratee.execute({
|
|
14
|
+
...params,
|
|
15
|
+
headers: {
|
|
16
|
+
...params.headers,
|
|
17
|
+
...tenantHeaders
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export const GraphQLClientDecorator = GraphQLClient.createDecorator({
|
|
23
|
+
decorator: GraphQLClientWithTenantId,
|
|
24
|
+
dependencies: [TenantContext]
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=GraphQLClientDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["GraphQLClient","TenantContext","GraphQLClientWithTenantId","constructor","context","decoratee","execute","params","tenant","getCurrentTenant","tenantHeaders","headers","GraphQLClientDecorator","createDecorator","decorator","dependencies"],"sources":["GraphQLClientDecorator.ts"],"sourcesContent":["import { GraphQLClient } from \"@webiny/app/features/graphqlClient/index.js\";\nimport { TenantContext } from \"~/features/tenancy/abstractions.js\";\n\nclass GraphQLClientWithTenantId implements GraphQLClient.Interface {\n constructor(\n private context: TenantContext.Interface,\n private decoratee: GraphQLClient.Interface\n ) {}\n\n async execute<TVariables = any, TResult = any>(\n params: GraphQLClient.Request<TVariables>\n ): Promise<TResult> {\n const tenant = this.context.getCurrentTenant();\n\n const tenantHeaders = tenant ? { \"x-tenant\": tenant } : {};\n\n return this.decoratee.execute({\n ...params,\n headers: { ...params.headers, ...tenantHeaders }\n });\n }\n}\n\nexport const GraphQLClientDecorator = GraphQLClient.createDecorator({\n decorator: GraphQLClientWithTenantId,\n dependencies: [TenantContext]\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,6CAA6C;AAC3E,SAASC,aAAa;AAEtB,MAAMC,yBAAyB,CAAoC;EAC/DC,WAAWA,CACCC,OAAgC,EAChCC,SAAkC,EAC5C;IAAA,KAFUD,OAAgC,GAAhCA,OAAgC;IAAA,KAChCC,SAAkC,GAAlCA,SAAkC;EAC3C;EAEH,MAAMC,OAAOA,CACTC,MAAyC,EACzB;IAChB,MAAMC,MAAM,GAAG,IAAI,CAACJ,OAAO,CAACK,gBAAgB,CAAC,CAAC;IAE9C,MAAMC,aAAa,GAAGF,MAAM,GAAG;MAAE,UAAU,EAAEA;IAAO,CAAC,GAAG,CAAC,CAAC;IAE1D,OAAO,IAAI,CAACH,SAAS,CAACC,OAAO,CAAC;MAC1B,GAAGC,MAAM;MACTI,OAAO,EAAE;QAAE,GAAGJ,MAAM,CAACI,OAAO;QAAE,GAAGD;MAAc;IACnD,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAME,sBAAsB,GAAGZ,aAAa,CAACa,eAAe,CAAC;EAChEC,SAAS,EAAEZ,yBAAyB;EACpCa,YAAY,EAAE,CAACd,aAAa;AAChC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TenantContext as Abstraction } from "./abstractions.js";
|
|
2
|
+
import { LocalStorage } from "@webiny/app/features/localStorage";
|
|
3
|
+
declare class TenantContextImpl implements Abstraction.Interface {
|
|
4
|
+
private localStorage;
|
|
5
|
+
private currentTenant;
|
|
6
|
+
private changeCallbacks;
|
|
7
|
+
constructor(localStorage: LocalStorage.Interface);
|
|
8
|
+
private initialize;
|
|
9
|
+
getCurrentTenant(): string | null;
|
|
10
|
+
setTenant(tenantId: string | null): void;
|
|
11
|
+
onTenantChange(callback: (tenantId: string | null) => void): () => void;
|
|
12
|
+
private notifyListeners;
|
|
13
|
+
}
|
|
14
|
+
export declare const TenantContext: typeof TenantContextImpl & {
|
|
15
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ITenantContext>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
import { TenantContext as Abstraction } from "./abstractions.js";
|
|
3
|
+
import { LocalStorage } from "@webiny/app/features/localStorage";
|
|
4
|
+
const LOCAL_STORAGE_KEY = "tenantId";
|
|
5
|
+
const DEFAULT_TENANT = "root";
|
|
6
|
+
class TenantContextImpl {
|
|
7
|
+
currentTenant = null;
|
|
8
|
+
changeCallbacks = new Set();
|
|
9
|
+
constructor(localStorage) {
|
|
10
|
+
this.localStorage = localStorage;
|
|
11
|
+
makeAutoObservable(this, {}, {
|
|
12
|
+
autoBind: true
|
|
13
|
+
});
|
|
14
|
+
this.initialize();
|
|
15
|
+
}
|
|
16
|
+
initialize() {
|
|
17
|
+
const storedTenant = this.localStorage.get(LOCAL_STORAGE_KEY) || DEFAULT_TENANT;
|
|
18
|
+
this.currentTenant = storedTenant;
|
|
19
|
+
this.localStorage.set(LOCAL_STORAGE_KEY, storedTenant);
|
|
20
|
+
}
|
|
21
|
+
getCurrentTenant() {
|
|
22
|
+
return this.currentTenant;
|
|
23
|
+
}
|
|
24
|
+
setTenant(tenantId) {
|
|
25
|
+
const previousTenant = this.currentTenant;
|
|
26
|
+
runInAction(() => {
|
|
27
|
+
this.currentTenant = tenantId;
|
|
28
|
+
});
|
|
29
|
+
if (tenantId) {
|
|
30
|
+
this.localStorage.set(LOCAL_STORAGE_KEY, tenantId);
|
|
31
|
+
} else {
|
|
32
|
+
this.localStorage.remove(LOCAL_STORAGE_KEY);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Only notify if tenant actually changed
|
|
36
|
+
if (previousTenant !== tenantId) {
|
|
37
|
+
this.notifyListeners(tenantId);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
onTenantChange(callback) {
|
|
41
|
+
this.changeCallbacks.add(callback);
|
|
42
|
+
return () => {
|
|
43
|
+
this.changeCallbacks.delete(callback);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
notifyListeners(tenantId) {
|
|
47
|
+
this.changeCallbacks.forEach(callback => {
|
|
48
|
+
try {
|
|
49
|
+
callback(tenantId);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.error("Tenant change callback error:", error);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export const TenantContext = Abstraction.createImplementation({
|
|
57
|
+
implementation: TenantContextImpl,
|
|
58
|
+
dependencies: [LocalStorage]
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
//# sourceMappingURL=TenantContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","TenantContext","Abstraction","LocalStorage","LOCAL_STORAGE_KEY","DEFAULT_TENANT","TenantContextImpl","currentTenant","changeCallbacks","Set","constructor","localStorage","autoBind","initialize","storedTenant","get","set","getCurrentTenant","setTenant","tenantId","previousTenant","remove","notifyListeners","onTenantChange","callback","add","delete","forEach","error","console","createImplementation","implementation","dependencies"],"sources":["TenantContext.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { TenantContext as Abstraction } from \"./abstractions.js\";\nimport { LocalStorage } from \"@webiny/app/features/localStorage\";\n\nconst LOCAL_STORAGE_KEY = \"tenantId\";\nconst DEFAULT_TENANT = \"root\";\n\nclass TenantContextImpl implements Abstraction.Interface {\n private currentTenant: string | null = null;\n private changeCallbacks = new Set<(tenantId: string | null) => void>();\n\n constructor(private localStorage: LocalStorage.Interface) {\n makeAutoObservable(this, {}, { autoBind: true });\n this.initialize();\n }\n\n private initialize(): void {\n const storedTenant = this.localStorage.get<string>(LOCAL_STORAGE_KEY) || DEFAULT_TENANT;\n this.currentTenant = storedTenant;\n this.localStorage.set(LOCAL_STORAGE_KEY, storedTenant);\n }\n\n getCurrentTenant(): string | null {\n return this.currentTenant;\n }\n\n setTenant(tenantId: string | null): void {\n const previousTenant = this.currentTenant;\n\n runInAction(() => {\n this.currentTenant = tenantId;\n });\n\n if (tenantId) {\n this.localStorage.set(LOCAL_STORAGE_KEY, tenantId);\n } else {\n this.localStorage.remove(LOCAL_STORAGE_KEY);\n }\n\n // Only notify if tenant actually changed\n if (previousTenant !== tenantId) {\n this.notifyListeners(tenantId);\n }\n }\n\n onTenantChange(callback: (tenantId: string | null) => void): () => void {\n this.changeCallbacks.add(callback);\n return () => {\n this.changeCallbacks.delete(callback);\n };\n }\n\n private notifyListeners(tenantId: string | null): void {\n this.changeCallbacks.forEach(callback => {\n try {\n callback(tenantId);\n } catch (error) {\n console.error(\"Tenant change callback error:\", error);\n }\n });\n }\n}\n\nexport const TenantContext = Abstraction.createImplementation({\n implementation: TenantContextImpl,\n dependencies: [LocalStorage]\n});\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,SAASC,aAAa,IAAIC,WAAW;AACrC,SAASC,YAAY,QAAQ,mCAAmC;AAEhE,MAAMC,iBAAiB,GAAG,UAAU;AACpC,MAAMC,cAAc,GAAG,MAAM;AAE7B,MAAMC,iBAAiB,CAAkC;EAC7CC,aAAa,GAAkB,IAAI;EACnCC,eAAe,GAAG,IAAIC,GAAG,CAAoC,CAAC;EAEtEC,WAAWA,CAASC,YAAoC,EAAE;IAAA,KAAtCA,YAAoC,GAApCA,YAAoC;IACpDZ,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;MAAEa,QAAQ,EAAE;IAAK,CAAC,CAAC;IAChD,IAAI,CAACC,UAAU,CAAC,CAAC;EACrB;EAEQA,UAAUA,CAAA,EAAS;IACvB,MAAMC,YAAY,GAAG,IAAI,CAACH,YAAY,CAACI,GAAG,CAASX,iBAAiB,CAAC,IAAIC,cAAc;IACvF,IAAI,CAACE,aAAa,GAAGO,YAAY;IACjC,IAAI,CAACH,YAAY,CAACK,GAAG,CAACZ,iBAAiB,EAAEU,YAAY,CAAC;EAC1D;EAEAG,gBAAgBA,CAAA,EAAkB;IAC9B,OAAO,IAAI,CAACV,aAAa;EAC7B;EAEAW,SAASA,CAACC,QAAuB,EAAQ;IACrC,MAAMC,cAAc,GAAG,IAAI,CAACb,aAAa;IAEzCP,WAAW,CAAC,MAAM;MACd,IAAI,CAACO,aAAa,GAAGY,QAAQ;IACjC,CAAC,CAAC;IAEF,IAAIA,QAAQ,EAAE;MACV,IAAI,CAACR,YAAY,CAACK,GAAG,CAACZ,iBAAiB,EAAEe,QAAQ,CAAC;IACtD,CAAC,MAAM;MACH,IAAI,CAACR,YAAY,CAACU,MAAM,CAACjB,iBAAiB,CAAC;IAC/C;;IAEA;IACA,IAAIgB,cAAc,KAAKD,QAAQ,EAAE;MAC7B,IAAI,CAACG,eAAe,CAACH,QAAQ,CAAC;IAClC;EACJ;EAEAI,cAAcA,CAACC,QAA2C,EAAc;IACpE,IAAI,CAAChB,eAAe,CAACiB,GAAG,CAACD,QAAQ,CAAC;IAClC,OAAO,MAAM;MACT,IAAI,CAAChB,eAAe,CAACkB,MAAM,CAACF,QAAQ,CAAC;IACzC,CAAC;EACL;EAEQF,eAAeA,CAACH,QAAuB,EAAQ;IACnD,IAAI,CAACX,eAAe,CAACmB,OAAO,CAACH,QAAQ,IAAI;MACrC,IAAI;QACAA,QAAQ,CAACL,QAAQ,CAAC;MACtB,CAAC,CAAC,OAAOS,KAAK,EAAE;QACZC,OAAO,CAACD,KAAK,CAAC,+BAA+B,EAAEA,KAAK,CAAC;MACzD;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAM3B,aAAa,GAAGC,WAAW,CAAC4B,oBAAoB,CAAC;EAC1DC,cAAc,EAAEzB,iBAAiB;EACjC0B,YAAY,EAAE,CAAC7B,YAAY;AAC/B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Abstraction } from "@webiny/di";
|
|
2
|
+
export interface Tenant {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ITenantContext {
|
|
7
|
+
getCurrentTenant(): string | null;
|
|
8
|
+
setTenant(tenantId: string | null): void;
|
|
9
|
+
onTenantChange(callback: (tenantId: string | null) => void): () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TenantContext: Abstraction<ITenantContext>;
|
|
12
|
+
export declare namespace TenantContext {
|
|
13
|
+
type Interface = ITenantContext;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Abstraction","TenantContext"],"sources":["abstractions.ts"],"sourcesContent":["import { Abstraction } from \"@webiny/di\";\n\nexport interface Tenant {\n id: string;\n name: string;\n}\n\nexport interface ITenantContext {\n getCurrentTenant(): string | null;\n setTenant(tenantId: string | null): void;\n onTenantChange(callback: (tenantId: string | null) => void): () => void;\n}\n\nexport const TenantContext = new Abstraction<ITenantContext>(\"TenantContext\");\n\nexport namespace TenantContext {\n export type Interface = ITenantContext;\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,YAAY;AAaxC,OAAO,MAAMC,aAAa,GAAG,IAAID,WAAW,CAAiB,eAAe,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { LocalStorageFeature } from "@webiny/app/features/localStorage/feature.js";
|
|
3
|
+
import { TenantContext as TenantContextAbstraction } from "./abstractions.js";
|
|
4
|
+
import { TenantContext } from "./TenantContext.js";
|
|
5
|
+
import { GraphQLClientDecorator } from "./GraphQLClientDecorator.js";
|
|
6
|
+
export const TenancyFeature = createFeature({
|
|
7
|
+
name: "Tenancy",
|
|
8
|
+
register(container) {
|
|
9
|
+
container.register(TenantContext).inSingletonScope();
|
|
10
|
+
container.registerDecorator(GraphQLClientDecorator);
|
|
11
|
+
},
|
|
12
|
+
resolve(container) {
|
|
13
|
+
const service = container.resolve(TenantContextAbstraction);
|
|
14
|
+
return {
|
|
15
|
+
service,
|
|
16
|
+
// Helper to create tenant-scoped container
|
|
17
|
+
createTenantContainer: () => {
|
|
18
|
+
const currentTenant = service.getCurrentTenant();
|
|
19
|
+
if (!currentTenant) {
|
|
20
|
+
return container;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Get current localStorage config
|
|
24
|
+
const {
|
|
25
|
+
localStorageConfig
|
|
26
|
+
} = LocalStorageFeature.resolve(container);
|
|
27
|
+
|
|
28
|
+
// Create tenant-scoped child container
|
|
29
|
+
const tenantContainer = container.createChildContainer();
|
|
30
|
+
|
|
31
|
+
// Re-register localStorage with tenant-specific prefix
|
|
32
|
+
LocalStorageFeature.register(tenantContainer, {
|
|
33
|
+
prefix: `${localStorageConfig.prefix}/${currentTenant}`
|
|
34
|
+
});
|
|
35
|
+
return tenantContainer;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createFeature","LocalStorageFeature","TenantContext","TenantContextAbstraction","GraphQLClientDecorator","TenancyFeature","name","register","container","inSingletonScope","registerDecorator","resolve","service","createTenantContainer","currentTenant","getCurrentTenant","localStorageConfig","tenantContainer","createChildContainer","prefix"],"sources":["feature.ts"],"sourcesContent":["import { Container } from \"@webiny/di\";\nimport { createFeature } from \"@webiny/feature/admin\";\nimport { LocalStorageFeature } from \"@webiny/app/features/localStorage/feature.js\";\nimport { TenantContext as TenantContextAbstraction } from \"./abstractions.js\";\nimport { TenantContext } from \"./TenantContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\n\nexport const TenancyFeature = createFeature({\n name: \"Tenancy\",\n register(container: Container) {\n container.register(TenantContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n },\n resolve(container: Container) {\n const service = container.resolve(TenantContextAbstraction);\n\n return {\n service,\n\n // Helper to create tenant-scoped container\n createTenantContainer: () => {\n const currentTenant = service.getCurrentTenant();\n\n if (!currentTenant) {\n return container;\n }\n\n // Get current localStorage config\n const { localStorageConfig } = LocalStorageFeature.resolve(container);\n\n // Create tenant-scoped child container\n const tenantContainer = container.createChildContainer();\n\n // Re-register localStorage with tenant-specific prefix\n LocalStorageFeature.register(tenantContainer, {\n prefix: `${localStorageConfig.prefix}/${currentTenant}`\n });\n\n return tenantContainer;\n }\n };\n }\n});\n"],"mappings":"AACA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,mBAAmB,QAAQ,8CAA8C;AAClF,SAASC,aAAa,IAAIC,wBAAwB;AAClD,SAASD,aAAa;AACtB,SAASE,sBAAsB;AAE/B,OAAO,MAAMC,cAAc,GAAGL,aAAa,CAAC;EACxCM,IAAI,EAAE,SAAS;EACfC,QAAQA,CAACC,SAAoB,EAAE;IAC3BA,SAAS,CAACD,QAAQ,CAACL,aAAa,CAAC,CAACO,gBAAgB,CAAC,CAAC;IACpDD,SAAS,CAACE,iBAAiB,CAACN,sBAAsB,CAAC;EACvD,CAAC;EACDO,OAAOA,CAACH,SAAoB,EAAE;IAC1B,MAAMI,OAAO,GAAGJ,SAAS,CAACG,OAAO,CAACR,wBAAwB,CAAC;IAE3D,OAAO;MACHS,OAAO;MAEP;MACAC,qBAAqB,EAAEA,CAAA,KAAM;QACzB,MAAMC,aAAa,GAAGF,OAAO,CAACG,gBAAgB,CAAC,CAAC;QAEhD,IAAI,CAACD,aAAa,EAAE;UAChB,OAAON,SAAS;QACpB;;QAEA;QACA,MAAM;UAAEQ;QAAmB,CAAC,GAAGf,mBAAmB,CAACU,OAAO,CAACH,SAAS,CAAC;;QAErE;QACA,MAAMS,eAAe,GAAGT,SAAS,CAACU,oBAAoB,CAAC,CAAC;;QAExD;QACAjB,mBAAmB,CAACM,QAAQ,CAACU,eAAe,EAAE;UAC1CE,MAAM,EAAE,GAAGH,kBAAkB,CAACG,MAAM,IAAIL,aAAa;QACzD,CAAC,CAAC;QAEF,OAAOG,eAAe;MAC1B;IACJ,CAAC;EACL;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["export interface Tenant {\n id: string;\n name: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from "@webiny/wcp/types.js";
|
|
2
|
+
import type { WCP_FEATURE_LABEL } from "@webiny/wcp";
|
|
3
|
+
export declare class ReactLicense implements ILicense {
|
|
4
|
+
private readonly license;
|
|
5
|
+
constructor(license: ILicense);
|
|
6
|
+
getProject(): WcpProject | null;
|
|
7
|
+
canUseAacl(): boolean;
|
|
8
|
+
canUseAuditLogs(): boolean;
|
|
9
|
+
canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean;
|
|
10
|
+
canUseFileManagerThreatDetection(): boolean;
|
|
11
|
+
canUseFolderLevelPermissions(): boolean;
|
|
12
|
+
canUsePrivateFiles(): boolean;
|
|
13
|
+
canUseRecordLocking(): boolean;
|
|
14
|
+
canUseTeams(): boolean;
|
|
15
|
+
getRawLicense(): DecryptedWcpProjectLicense | null;
|
|
16
|
+
canUseWorkflows(): boolean;
|
|
17
|
+
toDto(): DecryptedWcpProjectLicense | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export class ReactLicense {
|
|
2
|
+
constructor(license) {
|
|
3
|
+
this.license = license;
|
|
4
|
+
}
|
|
5
|
+
getProject() {
|
|
6
|
+
return this.license.getProject();
|
|
7
|
+
}
|
|
8
|
+
canUseAacl() {
|
|
9
|
+
return this.license.canUseAacl();
|
|
10
|
+
}
|
|
11
|
+
canUseAuditLogs() {
|
|
12
|
+
return this.license.canUseAuditLogs();
|
|
13
|
+
}
|
|
14
|
+
canUseFeature(featureId) {
|
|
15
|
+
return this.license.canUseFeature(featureId);
|
|
16
|
+
}
|
|
17
|
+
canUseFileManagerThreatDetection() {
|
|
18
|
+
return this.license.canUseFileManagerThreatDetection();
|
|
19
|
+
}
|
|
20
|
+
canUseFolderLevelPermissions() {
|
|
21
|
+
return this.license.canUseFolderLevelPermissions();
|
|
22
|
+
}
|
|
23
|
+
canUsePrivateFiles() {
|
|
24
|
+
return this.license.canUsePrivateFiles();
|
|
25
|
+
}
|
|
26
|
+
canUseRecordLocking() {
|
|
27
|
+
return this.license.canUseRecordLocking();
|
|
28
|
+
}
|
|
29
|
+
canUseTeams() {
|
|
30
|
+
return this.license.canUseTeams();
|
|
31
|
+
}
|
|
32
|
+
getRawLicense() {
|
|
33
|
+
return this.license.getRawLicense();
|
|
34
|
+
}
|
|
35
|
+
canUseWorkflows() {
|
|
36
|
+
return this.license.canUseWorkflows();
|
|
37
|
+
}
|
|
38
|
+
toDto() {
|
|
39
|
+
return this.license.toDto();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=ReactLicense.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ReactLicense","constructor","license","getProject","canUseAacl","canUseAuditLogs","canUseFeature","featureId","canUseFileManagerThreatDetection","canUseFolderLevelPermissions","canUsePrivateFiles","canUseRecordLocking","canUseTeams","getRawLicense","canUseWorkflows","toDto"],"sources":["ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"mappings":"AAGA,OAAO,MAAMA,YAAY,CAAqB;EAG1CC,WAAWA,CAACC,OAAiB,EAAE;IAC3B,IAAI,CAACA,OAAO,GAAGA,OAAO;EAC1B;EAEAC,UAAUA,CAAA,EAAsB;IAC5B,OAAO,IAAI,CAACD,OAAO,CAACC,UAAU,CAAC,CAAC;EACpC;EAEAC,UAAUA,CAAA,EAAY;IAClB,OAAO,IAAI,CAACF,OAAO,CAACE,UAAU,CAAC,CAAC;EACpC;EAEAC,eAAeA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACH,OAAO,CAACG,eAAe,CAAC,CAAC;EACzC;EAEAC,aAAaA,CAACC,SAAyC,EAAW;IAC9D,OAAO,IAAI,CAACL,OAAO,CAACI,aAAa,CAACC,SAAS,CAAC;EAChD;EAEAC,gCAAgCA,CAAA,EAAY;IACxC,OAAO,IAAI,CAACN,OAAO,CAACM,gCAAgC,CAAC,CAAC;EAC1D;EAEAC,4BAA4BA,CAAA,EAAY;IACpC,OAAO,IAAI,CAACP,OAAO,CAACO,4BAA4B,CAAC,CAAC;EACtD;EAEAC,kBAAkBA,CAAA,EAAY;IAC1B,OAAO,IAAI,CAACR,OAAO,CAACQ,kBAAkB,CAAC,CAAC;EAC5C;EAEAC,mBAAmBA,CAAA,EAAY;IAC3B,OAAO,IAAI,CAACT,OAAO,CAACS,mBAAmB,CAAC,CAAC;EAC7C;EAEAC,WAAWA,CAAA,EAAY;IACnB,OAAO,IAAI,CAACV,OAAO,CAACU,WAAW,CAAC,CAAC;EACrC;EAEAC,aAAaA,CAAA,EAAsC;IAC/C,OAAO,IAAI,CAACX,OAAO,CAACW,aAAa,CAAC,CAAC;EACvC;EAEOC,eAAeA,CAAA,EAAY;IAC9B,OAAO,IAAI,CAACZ,OAAO,CAACY,eAAe,CAAC,CAAC;EACzC;EAEAC,KAAKA,CAAA,EAAsC;IACvC,OAAO,IAAI,CAACb,OAAO,CAACa,KAAK,CAAC,CAAC;EAC/B;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WcpGateway as WcpGatewayAbstraction } from "./abstractions.js";
|
|
2
|
+
import { GraphQLClient } from "@webiny/app/features/graphqlClient";
|
|
3
|
+
import type { WcpProjectData } from "./types.js";
|
|
4
|
+
declare class WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {
|
|
5
|
+
private client;
|
|
6
|
+
constructor(client: GraphQLClient.Interface);
|
|
7
|
+
fetchProject(): Promise<WcpProjectData | null>;
|
|
8
|
+
}
|
|
9
|
+
export declare const WcpGateway: import("@webiny/di").Implementation<typeof WcpGraphQLGateway>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createImplementation } from "@webiny/di";
|
|
2
|
+
import { WcpGateway as WcpGatewayAbstraction } from "./abstractions.js";
|
|
3
|
+
import { GraphQLClient } from "@webiny/app/features/graphqlClient";
|
|
4
|
+
const GET_WCP_PROJECT = /* GraphQL */`
|
|
5
|
+
query GetWcpProject {
|
|
6
|
+
wcp {
|
|
7
|
+
getProject {
|
|
8
|
+
data {
|
|
9
|
+
orgId
|
|
10
|
+
projectId
|
|
11
|
+
package {
|
|
12
|
+
features {
|
|
13
|
+
seats {
|
|
14
|
+
enabled
|
|
15
|
+
options
|
|
16
|
+
}
|
|
17
|
+
multiTenancy {
|
|
18
|
+
enabled
|
|
19
|
+
options
|
|
20
|
+
}
|
|
21
|
+
advancedPublishingWorkflow {
|
|
22
|
+
enabled
|
|
23
|
+
}
|
|
24
|
+
advancedAccessControlLayer {
|
|
25
|
+
enabled
|
|
26
|
+
options
|
|
27
|
+
}
|
|
28
|
+
auditLogs {
|
|
29
|
+
enabled
|
|
30
|
+
}
|
|
31
|
+
recordLocking {
|
|
32
|
+
enabled
|
|
33
|
+
}
|
|
34
|
+
fileManager {
|
|
35
|
+
enabled
|
|
36
|
+
options
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
error {
|
|
42
|
+
message
|
|
43
|
+
code
|
|
44
|
+
data
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
class WcpGraphQLGateway {
|
|
51
|
+
constructor(client) {
|
|
52
|
+
this.client = client;
|
|
53
|
+
}
|
|
54
|
+
async fetchProject() {
|
|
55
|
+
const response = await this.client.execute({
|
|
56
|
+
query: GET_WCP_PROJECT,
|
|
57
|
+
headers: {
|
|
58
|
+
"x-tenant": "root"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
if (response.wcp.getProject.error) {
|
|
62
|
+
throw new Error(response.wcp.getProject.error.message);
|
|
63
|
+
}
|
|
64
|
+
return response.wcp.getProject.data;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export const WcpGateway = createImplementation({
|
|
68
|
+
abstraction: WcpGatewayAbstraction,
|
|
69
|
+
implementation: WcpGraphQLGateway,
|
|
70
|
+
dependencies: [GraphQLClient]
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=WcpGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createImplementation","WcpGateway","WcpGatewayAbstraction","GraphQLClient","GET_WCP_PROJECT","WcpGraphQLGateway","constructor","client","fetchProject","response","execute","query","headers","wcp","getProject","error","Error","message","data","abstraction","implementation","dependencies"],"sources":["WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { GraphQLClient } from \"@webiny/app/features/graphqlClient\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: GraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [GraphQLClient]\n});\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,YAAY;AACjD,SAASC,UAAU,IAAIC,qBAAqB;AAC5C,SAASC,aAAa,QAAQ,oCAAoC;AAGlE,MAAMC,eAAe,GAAG,aAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,iBAAiB,CAA4C;EAC/DC,WAAWA,CAASC,MAA+B,EAAE;IAAA,KAAjCA,MAA+B,GAA/BA,MAA+B;EAAG;EAEtD,MAAMC,YAAYA,CAAA,EAAmC;IACjD,MAAMC,QAAQ,GAAG,MAAM,IAAI,CAACF,MAAM,CAACG,OAAO,CAAwB;MAC9DC,KAAK,EAAEP,eAAe;MACtBQ,OAAO,EAAE;QACL,UAAU,EAAE;MAChB;IACJ,CAAC,CAAC;IAEF,IAAIH,QAAQ,CAACI,GAAG,CAACC,UAAU,CAACC,KAAK,EAAE;MAC/B,MAAM,IAAIC,KAAK,CAACP,QAAQ,CAACI,GAAG,CAACC,UAAU,CAACC,KAAK,CAACE,OAAO,CAAC;IAC1D;IAEA,OAAOR,QAAQ,CAACI,GAAG,CAACC,UAAU,CAACI,IAAI;EACvC;AACJ;AAEA,OAAO,MAAMjB,UAAU,GAAGD,oBAAoB,CAAC;EAC3CmB,WAAW,EAAEjB,qBAAqB;EAClCkB,cAAc,EAAEf,iBAAiB;EACjCgB,YAAY,EAAE,CAAClB,aAAa;AAChC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LocalStorage } from "@webiny/app/features/localStorage";
|
|
2
|
+
import { EnvConfig } from "@webiny/app/features/envConfig";
|
|
3
|
+
import type { ILicense } from "@webiny/wcp/types.js";
|
|
4
|
+
import { WcpService as Abstraction, WcpGateway } from "./abstractions.js";
|
|
5
|
+
import type { WcpFeatureName } from "../../features/wcp/types.js";
|
|
6
|
+
declare class WcpServiceImpl implements Abstraction.Interface {
|
|
7
|
+
private gateway;
|
|
8
|
+
private localStorage;
|
|
9
|
+
private envConfig;
|
|
10
|
+
private project;
|
|
11
|
+
private loaded;
|
|
12
|
+
constructor(gateway: WcpGateway.Interface, localStorage: LocalStorage.Interface, envConfig: EnvConfig.Interface);
|
|
13
|
+
private initializeFromLocalStorage;
|
|
14
|
+
getProject(): ILicense;
|
|
15
|
+
isLoaded(): boolean;
|
|
16
|
+
canUseFeature(featureName: WcpFeatureName): boolean;
|
|
17
|
+
loadProject(): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export declare const WcpService: import("@webiny/di").Implementation<typeof WcpServiceImpl>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
import { createImplementation } from "@webiny/di";
|
|
3
|
+
import { LocalStorage } from "@webiny/app/features/localStorage";
|
|
4
|
+
import { EnvConfig } from "@webiny/app/features/envConfig";
|
|
5
|
+
import { License, NullLicense } from "@webiny/wcp";
|
|
6
|
+
import { WcpService as Abstraction, WcpGateway } from "./abstractions.js";
|
|
7
|
+
import { ReactLicense } from "./ReactLicense.js";
|
|
8
|
+
const LOCAL_STORAGE_KEY = "wcp/project";
|
|
9
|
+
class WcpServiceImpl {
|
|
10
|
+
project = new ReactLicense(new NullLicense());
|
|
11
|
+
loaded = false;
|
|
12
|
+
constructor(gateway, localStorage, envConfig) {
|
|
13
|
+
this.gateway = gateway;
|
|
14
|
+
this.localStorage = localStorage;
|
|
15
|
+
this.envConfig = envConfig;
|
|
16
|
+
makeAutoObservable(this, {}, {
|
|
17
|
+
autoBind: true
|
|
18
|
+
});
|
|
19
|
+
this.initializeFromLocalStorage();
|
|
20
|
+
}
|
|
21
|
+
initializeFromLocalStorage() {
|
|
22
|
+
// If WCP is not configured, use NullLicense
|
|
23
|
+
if (!this.envConfig.get("wcpProjectId")) {
|
|
24
|
+
this.loaded = true;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Try to load from localStorage
|
|
29
|
+
try {
|
|
30
|
+
const cachedData = this.localStorage.get(LOCAL_STORAGE_KEY);
|
|
31
|
+
if (cachedData) {
|
|
32
|
+
// If cache exists, we use that until the project is revalidated in the background.
|
|
33
|
+
this.project = new ReactLicense(License.fromLicenseDto(cachedData));
|
|
34
|
+
this.loaded = true;
|
|
35
|
+
}
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.warn("Failed to load WCP project from localStorage:", error);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Load/Revalidate WCP project in the background. */
|
|
41
|
+
this.loadProject();
|
|
42
|
+
}
|
|
43
|
+
getProject() {
|
|
44
|
+
return this.project;
|
|
45
|
+
}
|
|
46
|
+
isLoaded() {
|
|
47
|
+
return this.loaded;
|
|
48
|
+
}
|
|
49
|
+
canUseFeature(featureName) {
|
|
50
|
+
if (!this.project) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
return this.project.canUseFeature(featureName);
|
|
54
|
+
}
|
|
55
|
+
async loadProject() {
|
|
56
|
+
// If WCP is not configured, nothing to load
|
|
57
|
+
if (!this.envConfig.get("wcpProjectId")) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const data = await this.gateway.fetchProject();
|
|
62
|
+
if (!data) {
|
|
63
|
+
throw new Error("No WCP project data received.");
|
|
64
|
+
}
|
|
65
|
+
const license = new ReactLicense(License.fromLicenseDto(data));
|
|
66
|
+
runInAction(() => {
|
|
67
|
+
this.project = license;
|
|
68
|
+
this.loaded = true;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Cache in localStorage
|
|
72
|
+
this.localStorage.set(LOCAL_STORAGE_KEY, data);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error("Failed to load WCP project:", error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export const WcpService = createImplementation({
|
|
79
|
+
abstraction: Abstraction,
|
|
80
|
+
implementation: WcpServiceImpl,
|
|
81
|
+
dependencies: [WcpGateway, LocalStorage, EnvConfig]
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=WcpService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","createImplementation","LocalStorage","EnvConfig","License","NullLicense","WcpService","Abstraction","WcpGateway","ReactLicense","LOCAL_STORAGE_KEY","WcpServiceImpl","project","loaded","constructor","gateway","localStorage","envConfig","autoBind","initializeFromLocalStorage","get","cachedData","fromLicenseDto","error","console","warn","loadProject","getProject","isLoaded","canUseFeature","featureName","data","fetchProject","Error","license","set","abstraction","implementation","dependencies"],"sources":["WcpService.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { createImplementation } from \"@webiny/di\";\nimport { LocalStorage } from \"@webiny/app/features/localStorage\";\nimport { EnvConfig } from \"@webiny/app/features/envConfig\";\nimport { License, NullLicense } from \"@webiny/wcp\";\nimport type { ILicense, DecryptedWcpProjectLicense } from \"@webiny/wcp/types.js\";\nimport { WcpService as Abstraction, WcpGateway } from \"./abstractions.js\";\nimport { ReactLicense } from \"./ReactLicense.js\";\nimport type { WcpFeatureName } from \"~/features/wcp/types.js\";\n\nconst LOCAL_STORAGE_KEY = \"wcp/project\";\n\nclass WcpServiceImpl implements Abstraction.Interface {\n private project: ILicense = new ReactLicense(new NullLicense());\n private loaded = false;\n\n constructor(\n private gateway: WcpGateway.Interface,\n private localStorage: LocalStorage.Interface,\n private envConfig: EnvConfig.Interface\n ) {\n makeAutoObservable(this, {}, { autoBind: true });\n this.initializeFromLocalStorage();\n }\n\n private initializeFromLocalStorage(): void {\n // If WCP is not configured, use NullLicense\n if (!this.envConfig.get(\"wcpProjectId\")) {\n this.loaded = true;\n return;\n }\n\n // Try to load from localStorage\n try {\n const cachedData = this.localStorage.get<DecryptedWcpProjectLicense>(LOCAL_STORAGE_KEY);\n if (cachedData) {\n // If cache exists, we use that until the project is revalidated in the background.\n this.project = new ReactLicense(License.fromLicenseDto(cachedData));\n this.loaded = true;\n }\n } catch (error) {\n console.warn(\"Failed to load WCP project from localStorage:\", error);\n }\n\n /* Load/Revalidate WCP project in the background. */\n this.loadProject();\n }\n\n getProject(): ILicense {\n return this.project;\n }\n\n isLoaded(): boolean {\n return this.loaded;\n }\n\n canUseFeature(featureName: WcpFeatureName): boolean {\n if (!this.project) {\n return false;\n }\n return this.project.canUseFeature(featureName);\n }\n\n async loadProject(): Promise<void> {\n // If WCP is not configured, nothing to load\n if (!this.envConfig.get(\"wcpProjectId\")) {\n return;\n }\n\n try {\n const data = await this.gateway.fetchProject();\n\n if (!data) {\n throw new Error(\"No WCP project data received.\");\n }\n\n const license = new ReactLicense(License.fromLicenseDto(data));\n\n runInAction(() => {\n this.project = license;\n this.loaded = true;\n });\n\n // Cache in localStorage\n this.localStorage.set(LOCAL_STORAGE_KEY, data);\n } catch (error) {\n console.error(\"Failed to load WCP project:\", error);\n }\n }\n}\n\nexport const WcpService = createImplementation({\n abstraction: Abstraction,\n implementation: WcpServiceImpl,\n dependencies: [WcpGateway, LocalStorage, EnvConfig]\n});\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,SAASC,oBAAoB,QAAQ,YAAY;AACjD,SAASC,YAAY,QAAQ,mCAAmC;AAChE,SAASC,SAAS,QAAQ,gCAAgC;AAC1D,SAASC,OAAO,EAAEC,WAAW,QAAQ,aAAa;AAElD,SAASC,UAAU,IAAIC,WAAW,EAAEC,UAAU;AAC9C,SAASC,YAAY;AAGrB,MAAMC,iBAAiB,GAAG,aAAa;AAEvC,MAAMC,cAAc,CAAkC;EAC1CC,OAAO,GAAa,IAAIH,YAAY,CAAC,IAAIJ,WAAW,CAAC,CAAC,CAAC;EACvDQ,MAAM,GAAG,KAAK;EAEtBC,WAAWA,CACCC,OAA6B,EAC7BC,YAAoC,EACpCC,SAA8B,EACxC;IAAA,KAHUF,OAA6B,GAA7BA,OAA6B;IAAA,KAC7BC,YAAoC,GAApCA,YAAoC;IAAA,KACpCC,SAA8B,GAA9BA,SAA8B;IAEtClB,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;MAAEmB,QAAQ,EAAE;IAAK,CAAC,CAAC;IAChD,IAAI,CAACC,0BAA0B,CAAC,CAAC;EACrC;EAEQA,0BAA0BA,CAAA,EAAS;IACvC;IACA,IAAI,CAAC,IAAI,CAACF,SAAS,CAACG,GAAG,CAAC,cAAc,CAAC,EAAE;MACrC,IAAI,CAACP,MAAM,GAAG,IAAI;MAClB;IACJ;;IAEA;IACA,IAAI;MACA,MAAMQ,UAAU,GAAG,IAAI,CAACL,YAAY,CAACI,GAAG,CAA6BV,iBAAiB,CAAC;MACvF,IAAIW,UAAU,EAAE;QACZ;QACA,IAAI,CAACT,OAAO,GAAG,IAAIH,YAAY,CAACL,OAAO,CAACkB,cAAc,CAACD,UAAU,CAAC,CAAC;QACnE,IAAI,CAACR,MAAM,GAAG,IAAI;MACtB;IACJ,CAAC,CAAC,OAAOU,KAAK,EAAE;MACZC,OAAO,CAACC,IAAI,CAAC,+CAA+C,EAAEF,KAAK,CAAC;IACxE;;IAEA;IACA,IAAI,CAACG,WAAW,CAAC,CAAC;EACtB;EAEAC,UAAUA,CAAA,EAAa;IACnB,OAAO,IAAI,CAACf,OAAO;EACvB;EAEAgB,QAAQA,CAAA,EAAY;IAChB,OAAO,IAAI,CAACf,MAAM;EACtB;EAEAgB,aAAaA,CAACC,WAA2B,EAAW;IAChD,IAAI,CAAC,IAAI,CAAClB,OAAO,EAAE;MACf,OAAO,KAAK;IAChB;IACA,OAAO,IAAI,CAACA,OAAO,CAACiB,aAAa,CAACC,WAAW,CAAC;EAClD;EAEA,MAAMJ,WAAWA,CAAA,EAAkB;IAC/B;IACA,IAAI,CAAC,IAAI,CAACT,SAAS,CAACG,GAAG,CAAC,cAAc,CAAC,EAAE;MACrC;IACJ;IAEA,IAAI;MACA,MAAMW,IAAI,GAAG,MAAM,IAAI,CAAChB,OAAO,CAACiB,YAAY,CAAC,CAAC;MAE9C,IAAI,CAACD,IAAI,EAAE;QACP,MAAM,IAAIE,KAAK,CAAC,+BAA+B,CAAC;MACpD;MAEA,MAAMC,OAAO,GAAG,IAAIzB,YAAY,CAACL,OAAO,CAACkB,cAAc,CAACS,IAAI,CAAC,CAAC;MAE9D/B,WAAW,CAAC,MAAM;QACd,IAAI,CAACY,OAAO,GAAGsB,OAAO;QACtB,IAAI,CAACrB,MAAM,GAAG,IAAI;MACtB,CAAC,CAAC;;MAEF;MACA,IAAI,CAACG,YAAY,CAACmB,GAAG,CAACzB,iBAAiB,EAAEqB,IAAI,CAAC;IAClD,CAAC,CAAC,OAAOR,KAAK,EAAE;MACZC,OAAO,CAACD,KAAK,CAAC,6BAA6B,EAAEA,KAAK,CAAC;IACvD;EACJ;AACJ;AAEA,OAAO,MAAMjB,UAAU,GAAGL,oBAAoB,CAAC;EAC3CmC,WAAW,EAAE7B,WAAW;EACxB8B,cAAc,EAAE1B,cAAc;EAC9B2B,YAAY,EAAE,CAAC9B,UAAU,EAAEN,YAAY,EAAEC,SAAS;AACtD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Abstraction } from "@webiny/di";
|
|
2
|
+
import type { DecryptedWcpProjectLicense, ILicense } from "@webiny/wcp/types.js";
|
|
3
|
+
export interface IWcpGateway {
|
|
4
|
+
fetchProject(): Promise<DecryptedWcpProjectLicense | null>;
|
|
5
|
+
}
|
|
6
|
+
export declare const WcpGateway: Abstraction<IWcpGateway>;
|
|
7
|
+
export declare namespace WcpGateway {
|
|
8
|
+
type Interface = IWcpGateway;
|
|
9
|
+
}
|
|
10
|
+
export interface IWcpService {
|
|
11
|
+
getProject(): ILicense;
|
|
12
|
+
isLoaded(): boolean;
|
|
13
|
+
canUseFeature(featureName: string): boolean;
|
|
14
|
+
loadProject(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export declare const WcpService: Abstraction<IWcpService>;
|
|
17
|
+
export declare namespace WcpService {
|
|
18
|
+
type Interface = IWcpService;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Abstraction","WcpGateway","WcpService"],"sources":["abstractions.ts"],"sourcesContent":["import { Abstraction } from \"@webiny/di\";\nimport type { DecryptedWcpProjectLicense, ILicense } from \"@webiny/wcp/types.js\";\n\nexport interface IWcpGateway {\n fetchProject(): Promise<DecryptedWcpProjectLicense | null>;\n}\n\nexport const WcpGateway = new Abstraction<IWcpGateway>(\"WcpGateway\");\n\nexport namespace WcpGateway {\n export type Interface = IWcpGateway;\n}\n\nexport interface IWcpService {\n getProject(): ILicense;\n isLoaded(): boolean;\n canUseFeature(featureName: string): boolean;\n loadProject(): Promise<void>;\n}\n\nexport const WcpService = new Abstraction<IWcpService>(\"WcpService\");\n\nexport namespace WcpService {\n export type Interface = IWcpService;\n}\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,YAAY;AAOxC,OAAO,MAAMC,UAAU,GAAG,IAAID,WAAW,CAAc,YAAY,CAAC;AAapE,OAAO,MAAME,UAAU,GAAG,IAAIF,WAAW,CAAc,YAAY,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { WcpService as WcpServiceAbstraction } from "./abstractions.js";
|
|
3
|
+
import { WcpService } from "./WcpService.js";
|
|
4
|
+
import { WcpGateway } from "./WcpGateway.js";
|
|
5
|
+
export const WcpFeature = createFeature({
|
|
6
|
+
name: "Wcp",
|
|
7
|
+
register(container) {
|
|
8
|
+
container.register(WcpGateway).inSingletonScope();
|
|
9
|
+
container.register(WcpService).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve(container) {
|
|
12
|
+
return {
|
|
13
|
+
service: container.resolve(WcpServiceAbstraction)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createFeature","WcpService","WcpServiceAbstraction","WcpGateway","WcpFeature","name","register","container","inSingletonScope","resolve","service"],"sources":["feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\nimport { WcpService as WcpServiceAbstraction } from \"./abstractions.js\";\nimport { WcpService } from \"./WcpService.js\";\nimport { WcpGateway } from \"./WcpGateway.js\";\n\nexport const WcpFeature = createFeature({\n name: \"Wcp\",\n register(container: Container) {\n container.register(WcpGateway).inSingletonScope();\n container.register(WcpService).inSingletonScope();\n },\n resolve(container: Container) {\n return {\n service: container.resolve(WcpServiceAbstraction)\n };\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,uBAAuB;AAErD,SAASC,UAAU,IAAIC,qBAAqB;AAC5C,SAASD,UAAU;AACnB,SAASE,UAAU;AAEnB,OAAO,MAAMC,UAAU,GAAGJ,aAAa,CAAC;EACpCK,IAAI,EAAE,KAAK;EACXC,QAAQA,CAACC,SAAoB,EAAE;IAC3BA,SAAS,CAACD,QAAQ,CAACH,UAAU,CAAC,CAACK,gBAAgB,CAAC,CAAC;IACjDD,SAAS,CAACD,QAAQ,CAACL,UAAU,CAAC,CAACO,gBAAgB,CAAC,CAAC;EACrD,CAAC;EACDC,OAAOA,CAACF,SAAoB,EAAE;IAC1B,OAAO;MACHG,OAAO,EAAEH,SAAS,CAACE,OAAO,CAACP,qBAAqB;IACpD,CAAC;EACL;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WCP_FEATURE_LABEL } from "@webiny/wcp";
|
|
2
|
+
import type { DecryptedWcpProjectLicense } from "@webiny/wcp/types.js";
|
|
3
|
+
export type WcpProjectData = DecryptedWcpProjectLicense;
|
|
4
|
+
export type WcpFeatureName = keyof typeof WCP_FEATURE_LABEL;
|
|
5
|
+
export interface GetWcpProjectResponse {
|
|
6
|
+
wcp: {
|
|
7
|
+
getProject: {
|
|
8
|
+
data: WcpProjectData | null;
|
|
9
|
+
error: {
|
|
10
|
+
message: string;
|
|
11
|
+
code: string;
|
|
12
|
+
data: any;
|
|
13
|
+
} | null;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface AaclPermission {
|
|
18
|
+
name: "aacl";
|
|
19
|
+
legacy: boolean;
|
|
20
|
+
teams: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\nimport type { DecryptedWcpProjectLicense } from \"@webiny/wcp/types.js\";\n\n// features/Wcp/types.ts\nexport type WcpProjectData = DecryptedWcpProjectLicense;\n\nexport type WcpFeatureName = keyof typeof WCP_FEATURE_LABEL;\n\nexport interface GetWcpProjectResponse {\n wcp: {\n getProject: {\n data: WcpProjectData | null;\n error: {\n message: string;\n code: string;\n data: any;\n } | null;\n };\n };\n}\n\nexport interface AaclPermission {\n name: \"aacl\";\n legacy: boolean;\n teams: boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
package/hooks/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./useConfirmationDialog";
|
|
2
|
-
export * from "./useDialog";
|
|
3
|
-
export * from "../components/Dialogs/useDialogs";
|
|
4
|
-
export * from "./useSnackbar";
|
|
5
|
-
export * from "./useKeyHandler";
|
|
6
|
-
export * from "./useShiftKey";
|
|
7
|
-
export * from "./useStateWithCallback";
|
|
8
|
-
export * from "./useModKey";
|
|
9
|
-
export * from "./useIsMounted";
|
|
10
|
-
export * from "./useStateIfMounted";
|
|
11
|
-
export * from "./
|
|
1
|
+
export * from "./useConfirmationDialog.js";
|
|
2
|
+
export * from "./useDialog.js";
|
|
3
|
+
export * from "../components/Dialogs/useDialogs.js";
|
|
4
|
+
export * from "./useSnackbar.js";
|
|
5
|
+
export * from "./useKeyHandler.js";
|
|
6
|
+
export * from "./useShiftKey.js";
|
|
7
|
+
export * from "./useStateWithCallback.js";
|
|
8
|
+
export * from "./useModKey.js";
|
|
9
|
+
export * from "./useIsMounted.js";
|
|
10
|
+
export * from "./useStateIfMounted.js";
|
|
11
|
+
export * from "./useToggler.js";
|