@webiny/app-admin 6.6.0-alpha.12 → 6.6.0-alpha.13
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/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/LexicalPreset.js +1 -1
- package/base/Base/LexicalPreset.js.map +1 -1
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.js.map +1 -1
- package/base/Base/Tenant.js.map +1 -1
- package/base/Base/UserMenu/SwitchTenant.d.ts +20 -0
- package/base/Base/UserMenu/SwitchTenant.js +45 -0
- package/base/Base/UserMenu/SwitchTenant.js.map +1 -0
- package/base/Base/UserMenu.js +4 -0
- package/base/Base/UserMenu.js.map +1 -1
- package/base/Base.js.map +1 -1
- package/base/ui/AssumedPermissionsSelector.js.map +1 -1
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.js.map +1 -1
- package/base/ui/UserMenu/UserMenu.js.map +1 -1
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -1
- package/base/ui/UserMenu.js.map +1 -1
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/Dialogs/DialogParamsContext.js.map +1 -1
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Drawers/DrawerParamsContext.js.map +1 -1
- package/components/Drawers/DrawersContext.js.map +1 -1
- package/components/Filters/FiltersToggle.js.map +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -1
- package/components/IconPicker/IconPickerTab.js.map +1 -1
- package/components/IconPicker/IconRenderer.js.map +1 -1
- package/components/IconPicker/config/IconType.js.map +1 -1
- package/components/IconPicker/config/index.js.map +1 -1
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -1
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -1
- package/components/IconPicker/types.js.map +1 -1
- package/components/LexicalEditor/DefaultLexicalEditorConfig.js +1 -1
- package/components/LexicalEditor/DefaultLexicalEditorConfig.js.map +1 -1
- package/components/LexicalEditor/LexicalEditor.d.ts +3 -1
- package/components/LexicalEditor/LexicalEditor.js +3 -2
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -1
- package/components/ListView/ListViewBottomBar.js.map +1 -1
- package/components/ListView/ListViewHeader.js.map +1 -1
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/Table/useTableRow.js.map +1 -1
- package/config/AdminConfig/LexicalTheme/Typography.js +4 -4
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -1
- package/config/AdminConfig/Menu.js.map +1 -1
- package/config/AdminConfig/Theme.js +1 -1
- package/config/AdminConfig/Theme.js.map +1 -1
- package/config/AdminConfig.js +2 -2
- package/config/AdminConfig.js.map +1 -1
- package/config/createAdminConfig.js.map +1 -1
- package/domain/Identity.d.ts +8 -0
- package/domain/Identity.js +6 -0
- package/domain/Identity.js.map +1 -1
- package/exports/admin/security.d.ts +4 -1
- package/exports/admin/security.js +4 -1
- package/exports/admin.d.ts +2 -0
- package/exports/admin.js +2 -0
- package/features/accessManagement/constants.js.map +1 -1
- package/features/adminUsers/capabilities/abstractions.d.ts +18 -0
- package/features/adminUsers/capabilities/abstractions.js +5 -0
- package/features/adminUsers/capabilities/abstractions.js.map +1 -0
- package/features/adminUsers/capabilities/feature.d.ts +4 -0
- package/features/adminUsers/capabilities/feature.js +19 -0
- package/features/adminUsers/capabilities/feature.js.map +1 -0
- package/features/adminUsers/capabilities/index.d.ts +3 -0
- package/features/adminUsers/capabilities/index.js +2 -0
- package/features/adminUsers/users/checkEmail/CheckEmailGateway.d.ts +11 -0
- package/features/adminUsers/users/checkEmail/CheckEmailGateway.js +44 -0
- package/features/adminUsers/users/checkEmail/CheckEmailGateway.js.map +1 -0
- package/features/adminUsers/users/checkEmail/CheckEmailUseCase.d.ts +10 -0
- package/features/adminUsers/users/checkEmail/CheckEmailUseCase.js +18 -0
- package/features/adminUsers/users/checkEmail/CheckEmailUseCase.js.map +1 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailGateway.d.ts +14 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailGateway.js +5 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailGateway.js.map +1 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailUseCase.d.ts +9 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailUseCase.js +5 -0
- package/features/adminUsers/users/checkEmail/abstractions/CheckEmailUseCase.js.map +1 -0
- package/features/adminUsers/users/checkEmail/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/checkEmail/abstractions/index.js +2 -0
- package/features/adminUsers/users/checkEmail/feature.d.ts +3 -0
- package/features/adminUsers/users/checkEmail/feature.js +19 -0
- package/features/adminUsers/users/checkEmail/feature.js.map +1 -0
- package/features/adminUsers/users/checkEmail/index.d.ts +2 -0
- package/features/adminUsers/users/checkEmail/index.js +2 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.js +2 -1
- package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -1
- package/features/adminUsers/users/createUser/CreateUserUseCase.test.d.ts +1 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.test.js +65 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.test.js.map +1 -0
- package/features/adminUsers/users/linkUser/LinkUserGateway.d.ts +11 -0
- package/features/adminUsers/users/linkUser/LinkUserGateway.js +50 -0
- package/features/adminUsers/users/linkUser/LinkUserGateway.js.map +1 -0
- package/features/adminUsers/users/linkUser/LinkUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/linkUser/LinkUserUseCase.js +18 -0
- package/features/adminUsers/users/linkUser/LinkUserUseCase.js.map +1 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserGateway.d.ts +18 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserGateway.js +5 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserGateway.js.map +1 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserUseCase.d.ts +15 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserUseCase.js +5 -0
- package/features/adminUsers/users/linkUser/abstractions/LinkUserUseCase.js.map +1 -0
- package/features/adminUsers/users/linkUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/linkUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/linkUser/feature.d.ts +3 -0
- package/features/adminUsers/users/linkUser/feature.js +19 -0
- package/features/adminUsers/users/linkUser/feature.js.map +1 -0
- package/features/adminUsers/users/linkUser/index.d.ts +2 -0
- package/features/adminUsers/users/linkUser/index.js +2 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaGateway.d.ts +11 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaGateway.js +42 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaGateway.js.map +1 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaUseCase.d.ts +10 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaUseCase.js +18 -0
- package/features/adminUsers/users/resetUserMfa/ResetUserMfaUseCase.js.map +1 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaGateway.d.ts +11 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaGateway.js +5 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaGateway.js.map +1 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaUseCase.d.ts +12 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaUseCase.js +5 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/ResetUserMfaUseCase.js.map +1 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/resetUserMfa/abstractions/index.js +2 -0
- package/features/adminUsers/users/resetUserMfa/feature.d.ts +3 -0
- package/features/adminUsers/users/resetUserMfa/feature.js +19 -0
- package/features/adminUsers/users/resetUserMfa/feature.js.map +1 -0
- package/features/adminUsers/users/resetUserMfa/index.d.ts +2 -0
- package/features/adminUsers/users/resetUserMfa/index.js +2 -0
- package/features/adminUsers/users/shared/AdminUsersError.d.ts +13 -0
- package/features/adminUsers/users/shared/AdminUsersError.js +11 -0
- package/features/adminUsers/users/shared/AdminUsersError.js.map +1 -0
- package/features/assumePermissions/AssumePermissionsUseCase.js +2 -2
- package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -1
- package/features/assumePermissions/LogInUseCaseDecorator.d.ts +1 -1
- package/features/assumePermissions/LogInUseCaseDecorator.js +8 -6
- package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -1
- package/features/formModel/FormView.js.map +1 -1
- package/features/formModel/createFieldRenderer.js.map +1 -1
- package/features/formModel/demo/FormModelDemo.js.map +1 -1
- package/features/formModel/fieldTypes/dateLimits.js.map +1 -1
- package/features/security/LogIn/LogInError.d.ts +15 -0
- package/features/security/LogIn/LogInError.js +25 -0
- package/features/security/LogIn/LogInError.js.map +1 -0
- package/features/security/LogIn/LogInGateway.d.ts +2 -2
- package/features/security/LogIn/LogInGateway.js +22 -5
- package/features/security/LogIn/LogInGateway.js.map +1 -1
- package/features/security/LogIn/LogInRepository.d.ts +1 -2
- package/features/security/LogIn/LogInRepository.js +6 -2
- package/features/security/LogIn/LogInRepository.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.d.ts +7 -2
- package/features/security/LogIn/LogInUseCase.js +53 -3
- package/features/security/LogIn/LogInUseCase.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.test.d.ts +1 -0
- package/features/security/LogIn/LogInUseCase.test.js +321 -0
- package/features/security/LogIn/LogInUseCase.test.js.map +1 -0
- package/features/security/LogIn/abstractions.d.ts +48 -3
- package/features/security/LogIn/abstractions.js.map +1 -1
- package/features/security/LogIn/createLoginMutation.js +40 -27
- package/features/security/LogIn/createLoginMutation.js.map +1 -1
- package/features/security/LogIn/feature.js +2 -0
- package/features/security/LogIn/feature.js.map +1 -1
- package/features/security/LogIn/index.d.ts +1 -0
- package/features/security/LogIn/index.js +1 -0
- package/features/security/LoginTenantResolver/LoginTenantResolver.d.ts +14 -0
- package/features/security/LoginTenantResolver/LoginTenantResolver.js +52 -0
- package/features/security/LoginTenantResolver/LoginTenantResolver.js.map +1 -0
- package/features/security/LoginTenantResolver/abstractions.d.ts +38 -0
- package/features/security/LoginTenantResolver/abstractions.js +5 -0
- package/features/security/LoginTenantResolver/abstractions.js.map +1 -0
- package/features/security/LoginTenantResolver/feature.d.ts +3 -0
- package/features/security/LoginTenantResolver/feature.js +17 -0
- package/features/security/LoginTenantResolver/feature.js.map +1 -0
- package/features/security/LoginTenantResolver/index.d.ts +2 -0
- package/features/security/LoginTenantResolver/index.js +2 -0
- package/features/webinySdk/WebinySdk.d.ts +2 -1
- package/features/webinySdk/WebinySdk.js +14 -2
- package/features/webinySdk/WebinySdk.js.map +1 -1
- package/features/webinySdk/__tests__/WebinySdk.test.d.ts +1 -0
- package/features/webinySdk/__tests__/WebinySdk.test.js +89 -0
- package/features/webinySdk/__tests__/WebinySdk.test.js.map +1 -0
- package/modules/AccessManagementExtension.js +1 -1
- package/modules/AccessManagementExtension.js.map +1 -1
- package/modules/DebuggerExtension.js +1 -1
- package/modules/DebuggerExtension.js.map +1 -1
- package/package.json +30 -30
- package/permissions/PermissionRenderer.js.map +1 -1
- package/permissions/PermissionValueContext.js.map +1 -1
- package/presentation/accessManagement/SecurityPermissions.js +1 -1
- package/presentation/accessManagement/SecurityPermissions.js.map +1 -1
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.js.map +1 -1
- package/presentation/adminUsers/AdminUsers.d.ts +8 -1
- package/presentation/adminUsers/AdminUsers.js +22 -2
- package/presentation/adminUsers/AdminUsers.js.map +1 -1
- package/presentation/adminUsers/SecurityPermission.js +1 -1
- package/presentation/adminUsers/SecurityPermission.js.map +1 -1
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.d.ts +27 -0
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.js +67 -0
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.js.map +1 -0
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.test.d.ts +1 -0
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.test.js +150 -0
- package/presentation/adminUsers/resetMfa/ResetMfaPresenter.test.js.map +1 -0
- package/presentation/adminUsers/resetMfa/abstractions.d.ts +38 -0
- package/presentation/adminUsers/resetMfa/abstractions.js +5 -0
- package/presentation/adminUsers/resetMfa/abstractions.js.map +1 -0
- package/presentation/adminUsers/resetMfa/feature.d.ts +6 -0
- package/presentation/adminUsers/resetMfa/feature.js +17 -0
- package/presentation/adminUsers/resetMfa/feature.js.map +1 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.d.ts +32 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.js +124 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.js.map +1 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.test.d.ts +1 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.test.js +264 -0
- package/presentation/adminUsers/userForm/UserFormPresenter.test.js.map +1 -0
- package/presentation/adminUsers/userForm/abstractions.d.ts +52 -0
- package/presentation/adminUsers/userForm/abstractions.js +5 -0
- package/presentation/adminUsers/userForm/abstractions.js.map +1 -0
- package/presentation/adminUsers/userForm/feature.d.ts +7 -0
- package/presentation/adminUsers/userForm/feature.js +17 -0
- package/presentation/adminUsers/userForm/feature.js.map +1 -0
- package/presentation/adminUsers/userMenu/AccountDetails.js +1 -1
- package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -1
- package/presentation/adminUsers/views/Users/UsersForm.d.ts +3 -1
- package/presentation/adminUsers/views/Users/UsersForm.js +51 -20
- package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -1
- package/presentation/adminUsers/views/Users/components/LinkAccountAlert.d.ts +10 -0
- package/presentation/adminUsers/views/Users/components/LinkAccountAlert.js +17 -0
- package/presentation/adminUsers/views/Users/components/LinkAccountAlert.js.map +1 -0
- package/presentation/adminUsers/views/Users/components/ResetMfa.d.ts +12 -0
- package/presentation/adminUsers/views/Users/components/ResetMfa.js +63 -0
- package/presentation/adminUsers/views/Users/components/ResetMfa.js.map +1 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +1 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js +31 -18
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -1
- package/presentation/adminUsers/views/Users/hooks/useUserForm.test.js +9 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.test.js.map +1 -1
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -1
- package/presentation/debugger/components/DebuggerIndicator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -1
- package/presentation/listPresenter/ListPresenter.js +1 -1
- package/presentation/listPresenter/ListPresenter.js.map +1 -1
- package/presentation/listPresenter/ListPresenter.test.js +28 -0
- package/presentation/listPresenter/ListPresenter.test.js.map +1 -1
- package/presentation/security/components/LoginNoTenantAccess.d.ts +27 -0
- package/presentation/security/components/LoginNoTenantAccess.js +22 -0
- package/presentation/security/components/LoginNoTenantAccess.js.map +1 -0
- package/presentation/security/components/LoginTenantPicker.d.ts +30 -0
- package/presentation/security/components/LoginTenantPicker.js +32 -0
- package/presentation/security/components/LoginTenantPicker.js.map +1 -0
- package/presentation/security/hooks/useAuthentication.d.ts +2 -2
- package/presentation/security/hooks/useAuthentication.js.map +1 -1
- package/presentation/security/hooks/useSecurity.js +2 -2
- package/presentation/security/hooks/useSecurity.js.map +1 -1
- package/presentation/sortable/SortablePresenter.js +3 -2
- package/presentation/sortable/SortablePresenter.js.map +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -1
- package/presentation/trashBin/components/TrashBinConfigs.js +1 -1
- package/presentation/trashBin/components/TrashBinConfigs.js.map +1 -1
- package/presentation/trashBin/components/TrashBinOverlay.js.map +1 -1
- package/presentation/trashBin/configs/Browser/BulkAction.js +1 -1
- package/presentation/trashBin/configs/Browser/BulkAction.js.map +1 -1
- package/presentation/trashBin/hooks/useTrashBinItem.js +1 -1
- package/presentation/trashBin/hooks/useTrashBinItem.js.map +1 -1
- package/presentation/trashBin/hooks/useTrashBinPresenter.js +1 -1
- package/presentation/trashBin/hooks/useTrashBinPresenter.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Table/useTableRow.js","sources":["../../../src/components/Table/useTableRow.tsx"],"sourcesContent":["import type { Context, ReactNode } from \"react\";\nimport React, { createContext, useContext } from \"react\";\n\nexport interface TableRowContextData<T> {\n row: T;\n}\n\nexport const TableRowContext = createContext<TableRowContextData<any> | undefined>(undefined);\n\ninterface TableRowProviderProps<T> {\n row: T | undefined;\n children: ReactNode;\n}\n\nexport const TableRowProvider = <T,>({ row, children }: TableRowProviderProps<T>) => {\n if (!row) {\n return null;\n }\n\n const value: TableRowContextData<T> = { row };\n\n return <TableRowContext.Provider value={value}>{children}</TableRowContext.Provider>;\n};\n\nexport const createUseTableRow = <TBaseRow = Record<string, any>,>() => {\n function useTableRow(): TableRowContextData<TBaseRow>;\n\n // \tfunction useTableRow(): TableRowContextData<TBaseRow>;\n // ➜ Handles calls with no generic.\n\n // \tfunction useTableRow<TUserRow>(): TableRowContextData<TBaseRow & { data: TUserRow }>;\n // ➜ Handles calls with a generic.\n\n function useTableRow<TUserRow>(): TableRowContextData<TBaseRow & { data: TUserRow }>;\n\n function useTableRow<TUserRow = never>(): TableRowContextData<\n TUserRow extends never ? TBaseRow : TBaseRow & { data: TUserRow }\n > {\n type Combined = TUserRow extends never ? TBaseRow : TBaseRow & { data: TUserRow };\n\n const context = useContext<TableRowContextData<Combined>>(\n TableRowContext as unknown as Context<TableRowContextData<Combined>>\n );\n\n if (!context) {\n throw new Error(\n `TableRowContext is missing in the component tree. Are you using \"useTableRow()\" hook in the right place?`\n );\n }\n\n return context;\n }\n\n return useTableRow;\n};\n"],"names":["TableRowContext","createContext","undefined","TableRowProvider","row","children","value","createUseTableRow","useTableRow","context","useContext","Error"],"mappings":";AAOO,MAAMA,kBAAkB,
|
|
1
|
+
{"version":3,"file":"components/Table/useTableRow.js","sources":["../../../src/components/Table/useTableRow.tsx"],"sourcesContent":["import type { Context, ReactNode } from \"react\";\nimport React, { createContext, useContext } from \"react\";\n\nexport interface TableRowContextData<T> {\n row: T;\n}\n\nexport const TableRowContext = createContext<TableRowContextData<any> | undefined>(undefined);\n\ninterface TableRowProviderProps<T> {\n row: T | undefined;\n children: ReactNode;\n}\n\nexport const TableRowProvider = <T,>({ row, children }: TableRowProviderProps<T>) => {\n if (!row) {\n return null;\n }\n\n const value: TableRowContextData<T> = { row };\n\n return <TableRowContext.Provider value={value}>{children}</TableRowContext.Provider>;\n};\n\nexport const createUseTableRow = <TBaseRow = Record<string, any>,>() => {\n function useTableRow(): TableRowContextData<TBaseRow>;\n\n // \tfunction useTableRow(): TableRowContextData<TBaseRow>;\n // ➜ Handles calls with no generic.\n\n // \tfunction useTableRow<TUserRow>(): TableRowContextData<TBaseRow & { data: TUserRow }>;\n // ➜ Handles calls with a generic.\n\n function useTableRow<TUserRow>(): TableRowContextData<TBaseRow & { data: TUserRow }>;\n\n function useTableRow<TUserRow = never>(): TableRowContextData<\n TUserRow extends never ? TBaseRow : TBaseRow & { data: TUserRow }\n > {\n type Combined = TUserRow extends never ? TBaseRow : TBaseRow & { data: TUserRow };\n\n const context = useContext<TableRowContextData<Combined>>(\n TableRowContext as unknown as Context<TableRowContextData<Combined>>\n );\n\n if (!context) {\n throw new Error(\n `TableRowContext is missing in the component tree. Are you using \"useTableRow()\" hook in the right place?`\n );\n }\n\n return context;\n }\n\n return useTableRow;\n};\n"],"names":["TableRowContext","createContext","undefined","TableRowProvider","row","children","value","createUseTableRow","useTableRow","context","useContext","Error"],"mappings":";AAOO,MAAMA,kBAAkB,WAAlBA,GAAkBC,cAAoDC;AAO5E,MAAMC,mBAAmB,CAAK,EAAEC,GAAG,EAAEC,QAAQ,EAA4B;IAC5E,IAAI,CAACD,KACD,OAAO;IAGX,MAAME,QAAgC;QAAEF;IAAI;IAE5C,OAAO,WAAP,GAAO,oBAACJ,gBAAgB,QAAQ;QAAC,OAAOM;OAAQD;AACpD;AAEO,MAAME,oBAAoB;IAW7B,SAASC;QAKL,MAAMC,UAAUC,WACZV;QAGJ,IAAI,CAACS,SACD,MAAM,IAAIE,MACN;QAIR,OAAOF;IACX;IAEA,OAAOD;AACX"}
|
|
@@ -56,10 +56,10 @@ const List = (props)=>/*#__PURE__*/ react.createElement(TypographyItem, {
|
|
|
56
56
|
propertyName: "lists"
|
|
57
57
|
});
|
|
58
58
|
const Typography = {
|
|
59
|
-
Heading
|
|
60
|
-
Paragraph
|
|
61
|
-
Quote
|
|
62
|
-
List
|
|
59
|
+
Heading,
|
|
60
|
+
Paragraph,
|
|
61
|
+
Quote,
|
|
62
|
+
List
|
|
63
63
|
};
|
|
64
64
|
export { Heading, List, Paragraph, Quote, Typography };
|
|
65
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/AdminConfig/LexicalTheme/Typography.js","sources":["../../../../src/config/AdminConfig/LexicalTheme/Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport { ConnectToProperties, Property, useIdGenerator } from \"@webiny/react-properties\";\n\ninterface BaseTypographyProps {\n id: string;\n label: string;\n tag: string;\n className: string;\n remove?: boolean;\n replace?: string;\n after?: string;\n before?: string;\n}\n\ninterface TypographyItemProps extends BaseTypographyProps {\n propertyName: \"headings\" | \"paragraphs\" | \"quotes\" | \"lists\";\n}\n\nconst TypographyItem = ({\n id,\n label,\n tag,\n className,\n propertyName,\n remove,\n replace,\n after,\n before\n}: TypographyItemProps) => {\n const getId = useIdGenerator(\"lexicalTheme\");\n\n const toReplace = replace !== undefined ? getId(propertyName, replace) : undefined;\n const placeAfter = after !== undefined ? getId(propertyName, after) : undefined;\n const placeBefore = before !== undefined ? getId(propertyName, before) : undefined;\n\n return (\n <ConnectToProperties name={\"AdminConfig\"}>\n <Property id={\"lexicalTheme\"} name={\"lexicalTheme\"}>\n <Property id={getId(\"typography\")} name={\"typography\"}>\n <Property\n id={getId(propertyName, id)}\n name={propertyName}\n array={true}\n remove={remove}\n replace={toReplace}\n after={placeAfter}\n before={placeBefore}\n >\n <Property id={getId(propertyName, id, \"id\")} name={\"id\"} value={id} />\n <Property\n id={getId(propertyName, id, \"label\")}\n name={\"label\"}\n value={label}\n />\n <Property id={getId(propertyName, id, \"tag\")} name={\"tag\"} value={tag} />\n <Property\n id={getId(propertyName, id, \"className\")}\n name={\"className\"}\n value={className}\n />\n </Property>\n </Property>\n </Property>\n </ConnectToProperties>\n );\n};\n\nexport interface HeadingProps extends BaseTypographyProps {}\n\nexport const Heading = (props: HeadingProps) => {\n return <TypographyItem {...props} propertyName=\"headings\" />;\n};\n\nexport interface ParagraphProps extends BaseTypographyProps {}\n\nexport const Paragraph = (props: ParagraphProps) => {\n return <TypographyItem {...props} propertyName=\"paragraphs\" />;\n};\n\nexport interface QuoteProps extends BaseTypographyProps {}\n\nexport const Quote = (props: QuoteProps) => {\n return <TypographyItem {...props} propertyName=\"quotes\" />;\n};\n\nexport interface ListProps extends BaseTypographyProps {}\n\nexport const List = (props: ListProps) => {\n return <TypographyItem {...props} propertyName=\"lists\" />;\n};\n\nexport const Typography = {\n Heading,\n Paragraph,\n Quote,\n List\n};\n"],"names":["TypographyItem","id","label","tag","className","propertyName","remove","replace","after","before","getId","useIdGenerator","toReplace","undefined","placeAfter","placeBefore","ConnectToProperties","Property","Heading","props","Paragraph","Quote","List","Typography"],"mappings":";;AAkBA,MAAMA,iBAAiB,CAAC,EACpBC,EAAE,EACFC,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,YAAY,EACZC,MAAM,EACNC,OAAO,EACPC,KAAK,EACLC,MAAM,EACY;IAClB,MAAMC,QAAQC,eAAe;IAE7B,MAAMC,YAAYL,AAAYM,WAAZN,UAAwBG,MAAML,cAAcE,WAAWM;IACzE,MAAMC,aAAaN,AAAUK,WAAVL,QAAsBE,MAAML,cAAcG,SAASK;IACtE,MAAME,cAAcN,AAAWI,WAAXJ,SAAuBC,MAAML,cAAcI,UAAUI;IAEzE,OAAO,WAAP,GACI,oBAACG,qBAAmBA;QAAC,MAAM;qBACvB,oBAACC,UAAQA;QAAC,IAAI;QAAgB,MAAM;qBAChC,oBAACA,UAAQA;QAAC,IAAIP,MAAM;QAAe,MAAM;qBACrC,oBAACO,UAAQA;QACL,IAAIP,MAAML,cAAcJ;QACxB,MAAMI;QACN,OAAO;QACP,QAAQC;QACR,SAASM;QACT,OAAOE;QACP,QAAQC;qBAER,oBAACE,UAAQA;QAAC,IAAIP,MAAML,cAAcJ,IAAI;QAAO,MAAM;QAAM,OAAOA;sBAChE,oBAACgB,UAAQA;QACL,IAAIP,MAAML,cAAcJ,IAAI;QAC5B,MAAM;QACN,OAAOC;sBAEX,oBAACe,UAAQA;QAAC,IAAIP,MAAML,cAAcJ,IAAI;QAAQ,MAAM;QAAO,OAAOE;sBAClE,oBAACc,UAAQA;QACL,IAAIP,MAAML,cAAcJ,IAAI;QAC5B,MAAM;QACN,OAAOG;;AAOnC;AAIO,MAAMc,UAAU,CAACC,QACb,WAAP,GAAO,oBAACnB,
|
|
1
|
+
{"version":3,"file":"config/AdminConfig/LexicalTheme/Typography.js","sources":["../../../../src/config/AdminConfig/LexicalTheme/Typography.tsx"],"sourcesContent":["import React from \"react\";\nimport { ConnectToProperties, Property, useIdGenerator } from \"@webiny/react-properties\";\n\ninterface BaseTypographyProps {\n id: string;\n label: string;\n tag: string;\n className: string;\n remove?: boolean;\n replace?: string;\n after?: string;\n before?: string;\n}\n\ninterface TypographyItemProps extends BaseTypographyProps {\n propertyName: \"headings\" | \"paragraphs\" | \"quotes\" | \"lists\";\n}\n\nconst TypographyItem = ({\n id,\n label,\n tag,\n className,\n propertyName,\n remove,\n replace,\n after,\n before\n}: TypographyItemProps) => {\n const getId = useIdGenerator(\"lexicalTheme\");\n\n const toReplace = replace !== undefined ? getId(propertyName, replace) : undefined;\n const placeAfter = after !== undefined ? getId(propertyName, after) : undefined;\n const placeBefore = before !== undefined ? getId(propertyName, before) : undefined;\n\n return (\n <ConnectToProperties name={\"AdminConfig\"}>\n <Property id={\"lexicalTheme\"} name={\"lexicalTheme\"}>\n <Property id={getId(\"typography\")} name={\"typography\"}>\n <Property\n id={getId(propertyName, id)}\n name={propertyName}\n array={true}\n remove={remove}\n replace={toReplace}\n after={placeAfter}\n before={placeBefore}\n >\n <Property id={getId(propertyName, id, \"id\")} name={\"id\"} value={id} />\n <Property\n id={getId(propertyName, id, \"label\")}\n name={\"label\"}\n value={label}\n />\n <Property id={getId(propertyName, id, \"tag\")} name={\"tag\"} value={tag} />\n <Property\n id={getId(propertyName, id, \"className\")}\n name={\"className\"}\n value={className}\n />\n </Property>\n </Property>\n </Property>\n </ConnectToProperties>\n );\n};\n\nexport interface HeadingProps extends BaseTypographyProps {}\n\nexport const Heading = (props: HeadingProps) => {\n return <TypographyItem {...props} propertyName=\"headings\" />;\n};\n\nexport interface ParagraphProps extends BaseTypographyProps {}\n\nexport const Paragraph = (props: ParagraphProps) => {\n return <TypographyItem {...props} propertyName=\"paragraphs\" />;\n};\n\nexport interface QuoteProps extends BaseTypographyProps {}\n\nexport const Quote = (props: QuoteProps) => {\n return <TypographyItem {...props} propertyName=\"quotes\" />;\n};\n\nexport interface ListProps extends BaseTypographyProps {}\n\nexport const List = (props: ListProps) => {\n return <TypographyItem {...props} propertyName=\"lists\" />;\n};\n\nexport const Typography = {\n Heading,\n Paragraph,\n Quote,\n List\n};\n"],"names":["TypographyItem","id","label","tag","className","propertyName","remove","replace","after","before","getId","useIdGenerator","toReplace","undefined","placeAfter","placeBefore","ConnectToProperties","Property","Heading","props","Paragraph","Quote","List","Typography"],"mappings":";;AAkBA,MAAMA,iBAAiB,CAAC,EACpBC,EAAE,EACFC,KAAK,EACLC,GAAG,EACHC,SAAS,EACTC,YAAY,EACZC,MAAM,EACNC,OAAO,EACPC,KAAK,EACLC,MAAM,EACY;IAClB,MAAMC,QAAQC,eAAe;IAE7B,MAAMC,YAAYL,AAAYM,WAAZN,UAAwBG,MAAML,cAAcE,WAAWM;IACzE,MAAMC,aAAaN,AAAUK,WAAVL,QAAsBE,MAAML,cAAcG,SAASK;IACtE,MAAME,cAAcN,AAAWI,WAAXJ,SAAuBC,MAAML,cAAcI,UAAUI;IAEzE,OAAO,WAAP,GACI,oBAACG,qBAAmBA;QAAC,MAAM;qBACvB,oBAACC,UAAQA;QAAC,IAAI;QAAgB,MAAM;qBAChC,oBAACA,UAAQA;QAAC,IAAIP,MAAM;QAAe,MAAM;qBACrC,oBAACO,UAAQA;QACL,IAAIP,MAAML,cAAcJ;QACxB,MAAMI;QACN,OAAO;QACP,QAAQC;QACR,SAASM;QACT,OAAOE;QACP,QAAQC;qBAER,oBAACE,UAAQA;QAAC,IAAIP,MAAML,cAAcJ,IAAI;QAAO,MAAM;QAAM,OAAOA;sBAChE,oBAACgB,UAAQA;QACL,IAAIP,MAAML,cAAcJ,IAAI;QAC5B,MAAM;QACN,OAAOC;sBAEX,oBAACe,UAAQA;QAAC,IAAIP,MAAML,cAAcJ,IAAI;QAAQ,MAAM;QAAO,OAAOE;sBAClE,oBAACc,UAAQA;QACL,IAAIP,MAAML,cAAcJ,IAAI;QAC5B,MAAM;QACN,OAAOG;;AAOnC;AAIO,MAAMc,UAAU,CAACC,QACb,WAAP,GAAO,oBAACnB,gBAAAA;QAAgB,GAAGmB,KAAK;QAAE,cAAa;;AAK5C,MAAMC,YAAY,CAACD,QACf,WAAP,GAAO,oBAACnB,gBAAAA;QAAgB,GAAGmB,KAAK;QAAE,cAAa;;AAK5C,MAAME,QAAQ,CAACF,QACX,WAAP,GAAO,oBAACnB,gBAAAA;QAAgB,GAAGmB,KAAK;QAAE,cAAa;;AAK5C,MAAMG,OAAO,CAACH,QACV,WAAP,GAAO,oBAACnB,gBAAAA;QAAgB,GAAGmB,KAAK;QAAE,cAAa;;AAG5C,MAAMI,aAAa;IACtBL;IACAE;IACAC;IACAC;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/AdminConfig/Menu.js","sources":["../../../src/config/AdminConfig/Menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport { ConnectToProperties, Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { MenuItem } from \"./Menu/MenuItem.js\";\nimport { MenuLink } from \"./Menu/MenuLink.js\";\nimport { MenuGroup } from \"./Menu/MenuGroup.js\";\nimport { SupportMenu } from \"./Menu/SupportMenu.js\";\nimport { UserMenu } from \"./Menu/UserMenu.js\";\n\nexport interface MenuProps {\n name: string;\n hideIfEmpty?: boolean;\n parent?: string | null;\n tags?: string[];\n element?: React.ReactElement;\n remove?: boolean;\n pin?: \"start\" | \"end\";\n before?: string;\n after?: string;\n pinnable?: boolean;\n}\n\nexport type MenuConfig = Pick<\n MenuProps,\n \"name\" | \"parent\" | \"tags\" | \"element\" | \"pinnable\" | \"hideIfEmpty\"\n>;\n\nconst BaseMenu = ({\n name,\n parent = null,\n hideIfEmpty = false,\n tags = [],\n element,\n remove,\n pin,\n before,\n after,\n pinnable = false\n}: MenuProps) => {\n const getId = useIdGenerator(\"Menu\");\n\n let placeAfter = after !== undefined ? getId(after) : undefined;\n let placeBefore = before !== undefined ? getId(before) : undefined;\n if (pin) {\n if (pin === \"start\") {\n placeBefore = \"$first\";\n } else {\n placeAfter = \"$last\";\n }\n }\n\n return (\n <ConnectToProperties name={\"AdminConfig\"}>\n <Property\n id={getId(name)}\n name={\"menus\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property\n id={getId(name, \"hideIfEmpty\")}\n name={\"hideIfEmpty\"}\n value={hideIfEmpty}\n />\n <Property id={getId(name, \"parent\")} name={\"parent\"} value={parent} />\n <Property id={getId(name, \"tags\")} name={\"tags\"} value={tags} />\n <Property id={getId(name, \"element\")} name={\"element\"} value={element} />\n <Property id={getId(name, \"pinnable\")} name={\"pinnable\"} value={pinnable} />\n </Property>\n </ConnectToProperties>\n );\n};\n\nconst DecoratableMenu = makeDecoratable(\"Menu\", BaseMenu);\n\nconst BaseFooterMenu = ({ tags, ...props }: MenuProps) => {\n return <BaseMenu {...props} tags={[\"footer\", ...(tags || [])]} />;\n};\n\nconst DecoratableFooterMenu = makeDecoratable(\"FooterMenu\", BaseFooterMenu);\n\nexport const Menu = Object.assign(DecoratableMenu, {\n Item: MenuItem,\n Link: MenuLink,\n Group: MenuGroup,\n Footer: DecoratableFooterMenu,\n Support: SupportMenu,\n User: UserMenu\n});\n"],"names":["BaseMenu","name","parent","hideIfEmpty","tags","element","remove","pin","before","after","pinnable","getId","useIdGenerator","placeAfter","undefined","placeBefore","ConnectToProperties","Property","DecoratableMenu","makeDecoratable","BaseFooterMenu","props","DecoratableFooterMenu","Menu","Object","MenuItem","MenuLink","MenuGroup","SupportMenu","UserMenu"],"mappings":";;;;;;;;AA2BA,MAAMA,WAAW,CAAC,EACdC,IAAI,EACJC,SAAS,IAAI,EACbC,cAAc,KAAK,EACnBC,OAAO,EAAE,EACTC,OAAO,EACPC,MAAM,EACNC,GAAG,EACHC,MAAM,EACNC,KAAK,EACLC,WAAW,KAAK,EACR;IACR,MAAMC,QAAQC,eAAe;IAE7B,IAAIC,aAAaJ,AAAUK,WAAVL,QAAsBE,MAAMF,SAASK;IACtD,IAAIC,cAAcP,AAAWM,WAAXN,SAAuBG,MAAMH,UAAUM;IACzD,IAAIP,KACA,IAAIA,AAAQ,YAARA,KACAQ,cAAc;SAEdF,aAAa;IAIrB,OAAO,WAAP,GACI,oBAACG,qBAAmBA;QAAC,MAAM;qBACvB,oBAACC,UAAQA;QACL,IAAIN,MAAMV;QACV,MAAM;QACN,QAAQK;QACR,OAAO;QACP,QAAQS;QACR,OAAOF;qBAEP,oBAACI,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAS,MAAM;QAAQ,OAAOA;sBACxD,oBAACgB,UAAQA;QACL,IAAIN,MAAMV,MAAM;QAChB,MAAM;QACN,OAAOE;sBAEX,oBAACc,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAW,MAAM;QAAU,OAAOC;sBAC5D,oBAACe,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAS,MAAM;QAAQ,OAAOG;sBACxD,oBAACa,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAY,MAAM;QAAW,OAAOI;sBAC9D,oBAACY,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAa,MAAM;QAAY,OAAOS;;AAIhF;AAEA,MAAMQ,kBAAkBC,gBAAgB,QAAQnB;AAEhD,MAAMoB,iBAAiB,CAAC,EAAEhB,IAAI,EAAE,GAAGiB,OAAkB,GAC1C,WAAP,GAAO,oBAACrB,
|
|
1
|
+
{"version":3,"file":"config/AdminConfig/Menu.js","sources":["../../../src/config/AdminConfig/Menu.tsx"],"sourcesContent":["import React from \"react\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport { ConnectToProperties, Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { MenuItem } from \"./Menu/MenuItem.js\";\nimport { MenuLink } from \"./Menu/MenuLink.js\";\nimport { MenuGroup } from \"./Menu/MenuGroup.js\";\nimport { SupportMenu } from \"./Menu/SupportMenu.js\";\nimport { UserMenu } from \"./Menu/UserMenu.js\";\n\nexport interface MenuProps {\n name: string;\n hideIfEmpty?: boolean;\n parent?: string | null;\n tags?: string[];\n element?: React.ReactElement;\n remove?: boolean;\n pin?: \"start\" | \"end\";\n before?: string;\n after?: string;\n pinnable?: boolean;\n}\n\nexport type MenuConfig = Pick<\n MenuProps,\n \"name\" | \"parent\" | \"tags\" | \"element\" | \"pinnable\" | \"hideIfEmpty\"\n>;\n\nconst BaseMenu = ({\n name,\n parent = null,\n hideIfEmpty = false,\n tags = [],\n element,\n remove,\n pin,\n before,\n after,\n pinnable = false\n}: MenuProps) => {\n const getId = useIdGenerator(\"Menu\");\n\n let placeAfter = after !== undefined ? getId(after) : undefined;\n let placeBefore = before !== undefined ? getId(before) : undefined;\n if (pin) {\n if (pin === \"start\") {\n placeBefore = \"$first\";\n } else {\n placeAfter = \"$last\";\n }\n }\n\n return (\n <ConnectToProperties name={\"AdminConfig\"}>\n <Property\n id={getId(name)}\n name={\"menus\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property\n id={getId(name, \"hideIfEmpty\")}\n name={\"hideIfEmpty\"}\n value={hideIfEmpty}\n />\n <Property id={getId(name, \"parent\")} name={\"parent\"} value={parent} />\n <Property id={getId(name, \"tags\")} name={\"tags\"} value={tags} />\n <Property id={getId(name, \"element\")} name={\"element\"} value={element} />\n <Property id={getId(name, \"pinnable\")} name={\"pinnable\"} value={pinnable} />\n </Property>\n </ConnectToProperties>\n );\n};\n\nconst DecoratableMenu = makeDecoratable(\"Menu\", BaseMenu);\n\nconst BaseFooterMenu = ({ tags, ...props }: MenuProps) => {\n return <BaseMenu {...props} tags={[\"footer\", ...(tags || [])]} />;\n};\n\nconst DecoratableFooterMenu = makeDecoratable(\"FooterMenu\", BaseFooterMenu);\n\nexport const Menu = Object.assign(DecoratableMenu, {\n Item: MenuItem,\n Link: MenuLink,\n Group: MenuGroup,\n Footer: DecoratableFooterMenu,\n Support: SupportMenu,\n User: UserMenu\n});\n"],"names":["BaseMenu","name","parent","hideIfEmpty","tags","element","remove","pin","before","after","pinnable","getId","useIdGenerator","placeAfter","undefined","placeBefore","ConnectToProperties","Property","DecoratableMenu","makeDecoratable","BaseFooterMenu","props","DecoratableFooterMenu","Menu","Object","MenuItem","MenuLink","MenuGroup","SupportMenu","UserMenu"],"mappings":";;;;;;;;AA2BA,MAAMA,WAAW,CAAC,EACdC,IAAI,EACJC,SAAS,IAAI,EACbC,cAAc,KAAK,EACnBC,OAAO,EAAE,EACTC,OAAO,EACPC,MAAM,EACNC,GAAG,EACHC,MAAM,EACNC,KAAK,EACLC,WAAW,KAAK,EACR;IACR,MAAMC,QAAQC,eAAe;IAE7B,IAAIC,aAAaJ,AAAUK,WAAVL,QAAsBE,MAAMF,SAASK;IACtD,IAAIC,cAAcP,AAAWM,WAAXN,SAAuBG,MAAMH,UAAUM;IACzD,IAAIP,KACA,IAAIA,AAAQ,YAARA,KACAQ,cAAc;SAEdF,aAAa;IAIrB,OAAO,WAAP,GACI,oBAACG,qBAAmBA;QAAC,MAAM;qBACvB,oBAACC,UAAQA;QACL,IAAIN,MAAMV;QACV,MAAM;QACN,QAAQK;QACR,OAAO;QACP,QAAQS;QACR,OAAOF;qBAEP,oBAACI,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAS,MAAM;QAAQ,OAAOA;sBACxD,oBAACgB,UAAQA;QACL,IAAIN,MAAMV,MAAM;QAChB,MAAM;QACN,OAAOE;sBAEX,oBAACc,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAW,MAAM;QAAU,OAAOC;sBAC5D,oBAACe,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAS,MAAM;QAAQ,OAAOG;sBACxD,oBAACa,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAY,MAAM;QAAW,OAAOI;sBAC9D,oBAACY,UAAQA;QAAC,IAAIN,MAAMV,MAAM;QAAa,MAAM;QAAY,OAAOS;;AAIhF;AAEA,MAAMQ,kBAAkBC,gBAAgB,QAAQnB;AAEhD,MAAMoB,iBAAiB,CAAC,EAAEhB,IAAI,EAAE,GAAGiB,OAAkB,GAC1C,WAAP,GAAO,oBAACrB,UAAAA;QAAU,GAAGqB,KAAK;QAAE,MAAM;YAAC;eAAcjB,QAAQ,EAAE;SAAE;;AAGjE,MAAMkB,wBAAwBH,gBAAgB,cAAcC;AAErD,MAAMG,OAAOC,OAAO,MAAM,CAACN,iBAAiB;IAC/C,MAAMO;IACN,MAAMC;IACN,OAAOC;IACP,QAAQL;IACR,SAASM;IACT,MAAMC;AACV"}
|
|
@@ -8,7 +8,7 @@ Color.displayName = "Color";
|
|
|
8
8
|
const ThemeBase = /*#__PURE__*/ react.memo(({ children })=>/*#__PURE__*/ react.createElement(react.Fragment, null, children));
|
|
9
9
|
ThemeBase.displayName = "Theme";
|
|
10
10
|
const Theme = Object.assign(ThemeBase, {
|
|
11
|
-
Color
|
|
11
|
+
Color
|
|
12
12
|
});
|
|
13
13
|
export { Color, Theme };
|
|
14
14
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/AdminConfig/Theme.js","sources":["../../../src/config/AdminConfig/Theme.tsx"],"sourcesContent":["import React from \"react\";\nimport { assignColor } from \"./Theme/assignColor.js\";\nimport type { ColorPalette, ColorShade } from \"./Theme/types.js\";\n\nexport interface ThemeColorProps {\n palette: ColorPalette;\n color: string;\n shade?: ColorShade;\n}\n\nexport const Color = React.memo(({ palette, color, shade }: ThemeColorProps) => {\n assignColor(palette, color, shade);\n return null;\n});\n\nColor.displayName = \"Color\";\n\nexport interface ThemeProps {\n children: React.ReactNode;\n}\n\nconst ThemeBase = React.memo(({ children }: ThemeProps) => {\n return <>{children}</>;\n});\n\nThemeBase.displayName = \"Theme\";\n\nexport const Theme = Object.assign(ThemeBase, {\n Color\n});\n"],"names":["Color","React","palette","color","shade","assignColor","ThemeBase","children","Theme","Object"],"mappings":";;AAUO,MAAMA,QAAQ,
|
|
1
|
+
{"version":3,"file":"config/AdminConfig/Theme.js","sources":["../../../src/config/AdminConfig/Theme.tsx"],"sourcesContent":["import React from \"react\";\nimport { assignColor } from \"./Theme/assignColor.js\";\nimport type { ColorPalette, ColorShade } from \"./Theme/types.js\";\n\nexport interface ThemeColorProps {\n palette: ColorPalette;\n color: string;\n shade?: ColorShade;\n}\n\nexport const Color = React.memo(({ palette, color, shade }: ThemeColorProps) => {\n assignColor(palette, color, shade);\n return null;\n});\n\nColor.displayName = \"Color\";\n\nexport interface ThemeProps {\n children: React.ReactNode;\n}\n\nconst ThemeBase = React.memo(({ children }: ThemeProps) => {\n return <>{children}</>;\n});\n\nThemeBase.displayName = \"Theme\";\n\nexport const Theme = Object.assign(ThemeBase, {\n Color\n});\n"],"names":["Color","React","palette","color","shade","assignColor","ThemeBase","children","Theme","Object"],"mappings":";;AAUO,MAAMA,QAAQ,WAARA,GAAQC,MAAAA,IAAU,CAAC,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAmB;IACvEC,YAAYH,SAASC,OAAOC;IAC5B,OAAO;AACX;AAEAJ,MAAM,WAAW,GAAG;AAMpB,MAAMM,YAAY,WAAZA,GAAYL,MAAAA,IAAU,CAAC,CAAC,EAAEM,QAAQ,EAAc,GAC3C,WAAP,GAAO,0CAAGA;AAGdD,UAAU,WAAW,GAAG;AAEjB,MAAME,QAAQC,OAAO,MAAM,CAACH,WAAW;IAC1CN;AACJ"}
|
package/config/AdminConfig.js
CHANGED
|
@@ -55,7 +55,7 @@ const useAdminConfig = ()=>{
|
|
|
55
55
|
const Public = ({ children })=>/*#__PURE__*/ react.createElement(base.PublicConfig, null, children);
|
|
56
56
|
const Private = ({ children })=>/*#__PURE__*/ react.createElement(base.PrivateConfig, null, children);
|
|
57
57
|
const AdminConfig = Object.assign(Private, {
|
|
58
|
-
Public
|
|
58
|
+
Public,
|
|
59
59
|
Theme: Theme,
|
|
60
60
|
Menu: Menu,
|
|
61
61
|
Route: Route,
|
|
@@ -69,7 +69,7 @@ const AdminConfig = Object.assign(Private, {
|
|
|
69
69
|
Dialog: Dialog,
|
|
70
70
|
Drawer: Drawer,
|
|
71
71
|
Form: Form,
|
|
72
|
-
useAdminConfig
|
|
72
|
+
useAdminConfig
|
|
73
73
|
});
|
|
74
74
|
export { AdminConfig, AdminConfigPlugin, AdminConfig_AdminConfigProvider as AdminConfigProvider, AdminWithConfig, Private, Public, useAdminConfig };
|
|
75
75
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/AdminConfig.js","sources":["../../src/config/AdminConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { createProvider } from \"@webiny/app\";\nimport { Menu, type MenuConfig } from \"./AdminConfig/Menu.js\";\nimport type { TenantConfig } from \"./AdminConfig/Tenant.js\";\nimport { Tenant } from \"./AdminConfig/Tenant.js\";\nimport type { SupportMenuConfig } from \"./AdminConfig/Menu/SupportMenu.js\";\nimport type { UserMenuConfig } from \"./AdminConfig/Menu/UserMenu.js\";\nimport { Route } from \"./AdminConfig/Route.js\";\nimport { Theme } from \"./AdminConfig/Theme.js\";\nimport { Dashboard } from \"./AdminConfig/Dashboard.js\";\nimport { type WidgetConfig } from \"./AdminConfig/Widget.js\";\nimport { Breadcrumb, type BreadcrumbConfig } from \"./AdminConfig/Breadcrumbs.js\";\nimport { Security } from \"./AdminConfig/Security.js\";\nimport type { PermissionRendererConfig } from \"../permissions/types.js\";\nimport { LexicalTheme } from \"./AdminConfig/LexicalTheme.js\";\nimport { Title } from \"./AdminConfig/Title.js\";\nimport { Logo } from \"./AdminConfig/Logo.js\";\nimport { Dialog } from \"./AdminConfig/Dialog.js\";\nimport type { DialogConfig } from \"./AdminConfig/Dialog.js\";\nimport { Drawer } from \"./AdminConfig/Drawer.js\";\nimport type { DrawerConfig } from \"./AdminConfig/Drawer.js\";\nimport { Form } from \"./AdminConfig/Form.js\";\nimport type { FieldRendererConfig } from \"./AdminConfig/FieldRenderer.js\";\nimport type { LayoutRendererConfig } from \"./AdminConfig/LayoutRenderer.js\";\nimport { createAdminConfig } from \"./createAdminConfig.js\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\n\nconst base = createAdminConfig<AdminConfig>();\n\nexport const AdminWithConfig = Object.assign(base.WithConfig, {\n displayName: \"AdminWithConfig\"\n});\n\ninterface AdminConfig {\n menus: MenuConfig[];\n supportMenus: SupportMenuConfig[];\n userMenus: UserMenuConfig[];\n tenant: TenantConfig;\n title: string;\n squareLogo: React.ReactNode;\n horizontalLogo: React.ReactNode;\n widgets: WidgetConfig[];\n breadcrumbs: BreadcrumbConfig[];\n permissionRenderers: PermissionRendererConfig[];\n lexicalTheme: EditorTheme;\n dialogs: DialogConfig[];\n drawers: DrawerConfig[];\n fieldRenderers: FieldRendererConfig[];\n layoutRenderers: LayoutRendererConfig[];\n}\n\n/* Once the app fully renders (after the LoginScreen), apply protected configs. */\nexport const AdminConfigPlugin = <base.ApplyProtectedConfig />;\n\nexport const AdminConfigProvider = createProvider(Original => {\n return function AdminConfigProvider({ children }) {\n return (\n <AdminWithConfig>\n <base.ApplyPublicConfig />\n <Original>{children}</Original>\n </AdminWithConfig>\n );\n };\n});\n\nconst lexicalTokens = createLexicalTokens(\"wa-lx-\");\n\nexport const useAdminConfig = () => {\n const baseConfig = base.useConfig();\n\n const lexicalTheme: EditorTheme = {\n colors: baseConfig.lexicalTheme?.colors,\n typography: baseConfig.lexicalTheme?.typography || {},\n fontSizes: [],\n tokens: lexicalTokens,\n allowCustomColors: baseConfig.lexicalTheme?.allowCustomColors ?? false\n };\n\n return {\n menus: baseConfig.menus ?? [],\n userMenus: baseConfig.userMenus ?? [],\n supportMenus: baseConfig.supportMenus ?? [],\n title: baseConfig.title,\n logo: {\n squareLogo: baseConfig.squareLogo,\n horizontalLogo: baseConfig.horizontalLogo\n },\n widgets: baseConfig.widgets ?? [],\n breadcrumbs: baseConfig.breadcrumbs ?? [],\n permissionRenderers: baseConfig.permissionRenderers ?? [],\n lexicalTheme,\n dialogs: baseConfig.dialogs ?? [],\n drawers: baseConfig.drawers ?? [],\n fieldRenderers: baseConfig.fieldRenderers ?? [],\n layoutRenderers: baseConfig.layoutRenderers ?? []\n };\n};\n\nexport interface PublicProps {\n children: React.ReactNode;\n}\n\nexport const Public = ({ children }: PublicProps) => {\n return <base.PublicConfig>{children}</base.PublicConfig>;\n};\n\nexport interface PrivateProps {\n children: React.ReactNode;\n}\n\nexport const Private = ({ children }: PrivateProps) => {\n return <base.PrivateConfig>{children}</base.PrivateConfig>;\n};\n\nexport const AdminConfig = Object.assign(Private, {\n Public,\n Theme,\n Menu,\n Route,\n Tenant,\n Title,\n Logo,\n Dashboard,\n Breadcrumb,\n Security,\n LexicalTheme,\n Dialog,\n Drawer,\n Form,\n useAdminConfig\n});\n"],"names":["base","createAdminConfig","AdminWithConfig","Object","AdminConfigPlugin","AdminConfigProvider","createProvider","Original","children","lexicalTokens","createLexicalTokens","useAdminConfig","baseConfig","lexicalTheme","Public","Private","AdminConfig","Theme","Menu","Route","Tenant","Title","Logo","Dashboard","Breadcrumb","Security","LexicalTheme","Dialog","Drawer","Form"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAMA,OAAOC;AAEN,MAAMC,kBAAkBC,OAAO,MAAM,CAACH,KAAK,UAAU,EAAE;IAC1D,aAAa;AACjB;AAqBO,MAAMI,oBAAoB,
|
|
1
|
+
{"version":3,"file":"config/AdminConfig.js","sources":["../../src/config/AdminConfig.tsx"],"sourcesContent":["import React from \"react\";\nimport { createProvider } from \"@webiny/app\";\nimport { Menu, type MenuConfig } from \"./AdminConfig/Menu.js\";\nimport type { TenantConfig } from \"./AdminConfig/Tenant.js\";\nimport { Tenant } from \"./AdminConfig/Tenant.js\";\nimport type { SupportMenuConfig } from \"./AdminConfig/Menu/SupportMenu.js\";\nimport type { UserMenuConfig } from \"./AdminConfig/Menu/UserMenu.js\";\nimport { Route } from \"./AdminConfig/Route.js\";\nimport { Theme } from \"./AdminConfig/Theme.js\";\nimport { Dashboard } from \"./AdminConfig/Dashboard.js\";\nimport { type WidgetConfig } from \"./AdminConfig/Widget.js\";\nimport { Breadcrumb, type BreadcrumbConfig } from \"./AdminConfig/Breadcrumbs.js\";\nimport { Security } from \"./AdminConfig/Security.js\";\nimport type { PermissionRendererConfig } from \"../permissions/types.js\";\nimport { LexicalTheme } from \"./AdminConfig/LexicalTheme.js\";\nimport { Title } from \"./AdminConfig/Title.js\";\nimport { Logo } from \"./AdminConfig/Logo.js\";\nimport { Dialog } from \"./AdminConfig/Dialog.js\";\nimport type { DialogConfig } from \"./AdminConfig/Dialog.js\";\nimport { Drawer } from \"./AdminConfig/Drawer.js\";\nimport type { DrawerConfig } from \"./AdminConfig/Drawer.js\";\nimport { Form } from \"./AdminConfig/Form.js\";\nimport type { FieldRendererConfig } from \"./AdminConfig/FieldRenderer.js\";\nimport type { LayoutRendererConfig } from \"./AdminConfig/LayoutRenderer.js\";\nimport { createAdminConfig } from \"./createAdminConfig.js\";\nimport type { EditorTheme } from \"@webiny/lexical-theme\";\nimport { createLexicalTokens } from \"@webiny/lexical-theme/createLexicalEditorTokens.js\";\n\nconst base = createAdminConfig<AdminConfig>();\n\nexport const AdminWithConfig = Object.assign(base.WithConfig, {\n displayName: \"AdminWithConfig\"\n});\n\ninterface AdminConfig {\n menus: MenuConfig[];\n supportMenus: SupportMenuConfig[];\n userMenus: UserMenuConfig[];\n tenant: TenantConfig;\n title: string;\n squareLogo: React.ReactNode;\n horizontalLogo: React.ReactNode;\n widgets: WidgetConfig[];\n breadcrumbs: BreadcrumbConfig[];\n permissionRenderers: PermissionRendererConfig[];\n lexicalTheme: EditorTheme;\n dialogs: DialogConfig[];\n drawers: DrawerConfig[];\n fieldRenderers: FieldRendererConfig[];\n layoutRenderers: LayoutRendererConfig[];\n}\n\n/* Once the app fully renders (after the LoginScreen), apply protected configs. */\nexport const AdminConfigPlugin = <base.ApplyProtectedConfig />;\n\nexport const AdminConfigProvider = createProvider(Original => {\n return function AdminConfigProvider({ children }) {\n return (\n <AdminWithConfig>\n <base.ApplyPublicConfig />\n <Original>{children}</Original>\n </AdminWithConfig>\n );\n };\n});\n\nconst lexicalTokens = createLexicalTokens(\"wa-lx-\");\n\nexport const useAdminConfig = () => {\n const baseConfig = base.useConfig();\n\n const lexicalTheme: EditorTheme = {\n colors: baseConfig.lexicalTheme?.colors,\n typography: baseConfig.lexicalTheme?.typography || {},\n fontSizes: [],\n tokens: lexicalTokens,\n allowCustomColors: baseConfig.lexicalTheme?.allowCustomColors ?? false\n };\n\n return {\n menus: baseConfig.menus ?? [],\n userMenus: baseConfig.userMenus ?? [],\n supportMenus: baseConfig.supportMenus ?? [],\n title: baseConfig.title,\n logo: {\n squareLogo: baseConfig.squareLogo,\n horizontalLogo: baseConfig.horizontalLogo\n },\n widgets: baseConfig.widgets ?? [],\n breadcrumbs: baseConfig.breadcrumbs ?? [],\n permissionRenderers: baseConfig.permissionRenderers ?? [],\n lexicalTheme,\n dialogs: baseConfig.dialogs ?? [],\n drawers: baseConfig.drawers ?? [],\n fieldRenderers: baseConfig.fieldRenderers ?? [],\n layoutRenderers: baseConfig.layoutRenderers ?? []\n };\n};\n\nexport interface PublicProps {\n children: React.ReactNode;\n}\n\nexport const Public = ({ children }: PublicProps) => {\n return <base.PublicConfig>{children}</base.PublicConfig>;\n};\n\nexport interface PrivateProps {\n children: React.ReactNode;\n}\n\nexport const Private = ({ children }: PrivateProps) => {\n return <base.PrivateConfig>{children}</base.PrivateConfig>;\n};\n\nexport const AdminConfig = Object.assign(Private, {\n Public,\n Theme,\n Menu,\n Route,\n Tenant,\n Title,\n Logo,\n Dashboard,\n Breadcrumb,\n Security,\n LexicalTheme,\n Dialog,\n Drawer,\n Form,\n useAdminConfig\n});\n"],"names":["base","createAdminConfig","AdminWithConfig","Object","AdminConfigPlugin","AdminConfigProvider","createProvider","Original","children","lexicalTokens","createLexicalTokens","useAdminConfig","baseConfig","lexicalTheme","Public","Private","AdminConfig","Theme","Menu","Route","Tenant","Title","Logo","Dashboard","Breadcrumb","Security","LexicalTheme","Dialog","Drawer","Form"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAMA,OAAOC;AAEN,MAAMC,kBAAkBC,OAAO,MAAM,CAACH,KAAK,UAAU,EAAE;IAC1D,aAAa;AACjB;AAqBO,MAAMI,oBAAoB,WAApBA,GAAoB,oBAACJ,KAAK,oBAAoB;AAEpD,MAAMK,kCAAsBC,eAAeC,CAAAA,WACvC,SAA6B,EAAEC,QAAQ,EAAE;QAC5C,OAAO,WAAP,GACI,oBAACN,iBAAAA,MAAAA,WAAAA,GACG,oBAACF,KAAK,iBAAiB,uBACvB,oBAACO,UAAAA,MAAUC;IAGvB;AAGJ,MAAMC,gBAAgBC,oBAAoB;AAEnC,MAAMC,iBAAiB;IAC1B,MAAMC,aAAaZ,KAAK,SAAS;IAEjC,MAAMa,eAA4B;QAC9B,QAAQD,WAAW,YAAY,EAAE;QACjC,YAAYA,WAAW,YAAY,EAAE,cAAc,CAAC;QACpD,WAAW,EAAE;QACb,QAAQH;QACR,mBAAmBG,WAAW,YAAY,EAAE,qBAAqB;IACrE;IAEA,OAAO;QACH,OAAOA,WAAW,KAAK,IAAI,EAAE;QAC7B,WAAWA,WAAW,SAAS,IAAI,EAAE;QACrC,cAAcA,WAAW,YAAY,IAAI,EAAE;QAC3C,OAAOA,WAAW,KAAK;QACvB,MAAM;YACF,YAAYA,WAAW,UAAU;YACjC,gBAAgBA,WAAW,cAAc;QAC7C;QACA,SAASA,WAAW,OAAO,IAAI,EAAE;QACjC,aAAaA,WAAW,WAAW,IAAI,EAAE;QACzC,qBAAqBA,WAAW,mBAAmB,IAAI,EAAE;QACzDC;QACA,SAASD,WAAW,OAAO,IAAI,EAAE;QACjC,SAASA,WAAW,OAAO,IAAI,EAAE;QACjC,gBAAgBA,WAAW,cAAc,IAAI,EAAE;QAC/C,iBAAiBA,WAAW,eAAe,IAAI,EAAE;IACrD;AACJ;AAMO,MAAME,SAAS,CAAC,EAAEN,QAAQ,EAAe,GACrC,WAAP,GAAO,oBAACR,KAAK,YAAY,QAAEQ;AAOxB,MAAMO,UAAU,CAAC,EAAEP,QAAQ,EAAgB,GACvC,WAAP,GAAO,oBAACR,KAAK,aAAa,QAAEQ;AAGzB,MAAMQ,cAAcb,OAAO,MAAM,CAACY,SAAS;IAC9CD;IACAG,OAAKA;IACLC,MAAIA;IACJC,OAAKA;IACLC,QAAMA;IACNC,OAAKA;IACLC,MAAIA;IACJC,WAASA;IACTC,YAAUA;IACVC,UAAQA;IACRC,cAAYA;IACZC,QAAMA;IACNC,QAAMA;IACNC,MAAIA;IACJlB;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/createAdminConfig.js","sources":["../../src/config/createAdminConfig.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from \"react\";\nimport type { Decorator } from \"@webiny/react-composition\";\nimport { Compose, makeDecoratable } from \"@webiny/react-composition\";\nimport type { GenericComponent } from \"@webiny/react-composition/types.js\";\nimport type { Property } from \"@webiny/react-properties\";\nimport { Properties, toObject, useDebugConfig } from \"@webiny/react-properties\";\n\nconst createHOC = (\n newChildren: React.ReactNode\n): Decorator<GenericComponent<{ children?: React.ReactNode }>> => {\n return BaseComponent => {\n return function ConfigHOC({ children }) {\n return (\n <BaseComponent>\n {newChildren}\n {children}\n </BaseComponent>\n );\n };\n };\n};\n\nexport interface WithConfigProps {\n children: React.ReactNode;\n onProperties?(properties: Property[]): void;\n}\n\ninterface ConfigApplyProps {\n children?: React.ReactNode;\n}\n\nexport interface ConfigProps {\n children: React.ReactNode;\n}\n\nconst name = \"AdminConfig\";\n\nexport function createAdminConfig<TConfig>() {\n /**\n * This component is used when we want to mount all composed configs.\n */\n const ApplyPublicConfig = makeDecoratable(\n `${name}Apply<Public>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n const ApplyProtectedConfig = makeDecoratable(\n `${name}Apply<Protected>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n /**\n * This component is used to configure the component (it can be mounted many times).\n */\n const PublicConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyPublicConfig} with={createHOC(children)} />;\n };\n\n const ProtectedConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyProtectedConfig} with={createHOC(children)} />;\n };\n\n interface ViewContext {\n name: string;\n properties: Property[];\n }\n\n const defaultContext = { name, properties: [] };\n\n const ViewContext = React.createContext<ViewContext>(defaultContext);\n\n const WithConfig = ({ onProperties, children }: WithConfigProps) => {\n const [properties, setProperties] = useState<Property[]>([]);\n useDebugConfig(name, properties);\n const context = { name, properties };\n\n useEffect(() => {\n if (typeof onProperties === \"function\") {\n onProperties(properties);\n }\n }, [properties]);\n\n const stateUpdater = (properties: Property[]) => {\n setProperties(properties);\n };\n\n return (\n <ViewContext.Provider value={context}>\n <Properties onChange={stateUpdater} name={name}>\n {children}\n </Properties>\n </ViewContext.Provider>\n );\n };\n\n function useConfig<TExtra extends object>(): TConfig & TExtra {\n const { properties } = useContext(ViewContext);\n return useMemo(() => toObject<TConfig & TExtra>(properties), [properties]);\n }\n\n return {\n WithConfig,\n PrivateConfig: ProtectedConfig,\n PublicConfig,\n ApplyPublicConfig,\n ApplyProtectedConfig,\n useConfig\n };\n}\n"],"names":["createHOC","newChildren","BaseComponent","children","name","createAdminConfig","ApplyPublicConfig","makeDecoratable","ApplyProtectedConfig","PublicConfig","Compose","ProtectedConfig","defaultContext","ViewContext","React","WithConfig","onProperties","properties","setProperties","useState","useDebugConfig","context","useEffect","stateUpdater","Properties","useConfig","useContext","useMemo","toObject"],"mappings":";;;AAOA,MAAMA,YAAY,CACdC,cAEOC,CAAAA,gBACI,SAAmB,EAAEC,QAAQ,EAAE;YAClC,OAAO,WAAP,GACI,oBAACD,eAAAA,MACID,aACAE;QAGb;AAiBR,MAAMC,yBAAO;AAEN,SAASC;IAIZ,MAAMC,oBAAoBC,gBACtB,GAAGH,uBAAK,aAAa,CAAC,EACtB,CAAC,EAAED,QAAQ,EAAoB,GACpB,WAAP,GAAO,0CAAGA;IAIlB,MAAMK,uBAAuBD,gBACzB,GAAGH,uBAAK,gBAAgB,CAAC,EACzB,CAAC,EAAED,QAAQ,EAAoB,GACpB,WAAP,GAAO,0CAAGA;IAOlB,MAAMM,eAAe,CAAC,EAAEN,QAAQ,EAAe,GACpC,WAAP,GAAO,oBAACO,SAAOA;YAAC,WAAWJ;YAAmB,MAAMN,UAAUG;;IAGlE,MAAMQ,kBAAkB,CAAC,EAAER,QAAQ,EAAe,GACvC,WAAP,GAAO,oBAACO,SAAOA;YAAC,WAAWF;YAAsB,MAAMR,UAAUG;;IAQrE,MAAMS,iBAAiB;QAAER,
|
|
1
|
+
{"version":3,"file":"config/createAdminConfig.js","sources":["../../src/config/createAdminConfig.tsx"],"sourcesContent":["import React, { useContext, useEffect, useMemo, useState } from \"react\";\nimport type { Decorator } from \"@webiny/react-composition\";\nimport { Compose, makeDecoratable } from \"@webiny/react-composition\";\nimport type { GenericComponent } from \"@webiny/react-composition/types.js\";\nimport type { Property } from \"@webiny/react-properties\";\nimport { Properties, toObject, useDebugConfig } from \"@webiny/react-properties\";\n\nconst createHOC = (\n newChildren: React.ReactNode\n): Decorator<GenericComponent<{ children?: React.ReactNode }>> => {\n return BaseComponent => {\n return function ConfigHOC({ children }) {\n return (\n <BaseComponent>\n {newChildren}\n {children}\n </BaseComponent>\n );\n };\n };\n};\n\nexport interface WithConfigProps {\n children: React.ReactNode;\n onProperties?(properties: Property[]): void;\n}\n\ninterface ConfigApplyProps {\n children?: React.ReactNode;\n}\n\nexport interface ConfigProps {\n children: React.ReactNode;\n}\n\nconst name = \"AdminConfig\";\n\nexport function createAdminConfig<TConfig>() {\n /**\n * This component is used when we want to mount all composed configs.\n */\n const ApplyPublicConfig = makeDecoratable(\n `${name}Apply<Public>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n const ApplyProtectedConfig = makeDecoratable(\n `${name}Apply<Protected>`,\n ({ children }: ConfigApplyProps) => {\n return <>{children}</>;\n }\n );\n\n /**\n * This component is used to configure the component (it can be mounted many times).\n */\n const PublicConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyPublicConfig} with={createHOC(children)} />;\n };\n\n const ProtectedConfig = ({ children }: ConfigProps) => {\n return <Compose component={ApplyProtectedConfig} with={createHOC(children)} />;\n };\n\n interface ViewContext {\n name: string;\n properties: Property[];\n }\n\n const defaultContext = { name, properties: [] };\n\n const ViewContext = React.createContext<ViewContext>(defaultContext);\n\n const WithConfig = ({ onProperties, children }: WithConfigProps) => {\n const [properties, setProperties] = useState<Property[]>([]);\n useDebugConfig(name, properties);\n const context = { name, properties };\n\n useEffect(() => {\n if (typeof onProperties === \"function\") {\n onProperties(properties);\n }\n }, [properties]);\n\n const stateUpdater = (properties: Property[]) => {\n setProperties(properties);\n };\n\n return (\n <ViewContext.Provider value={context}>\n <Properties onChange={stateUpdater} name={name}>\n {children}\n </Properties>\n </ViewContext.Provider>\n );\n };\n\n function useConfig<TExtra extends object>(): TConfig & TExtra {\n const { properties } = useContext(ViewContext);\n return useMemo(() => toObject<TConfig & TExtra>(properties), [properties]);\n }\n\n return {\n WithConfig,\n PrivateConfig: ProtectedConfig,\n PublicConfig,\n ApplyPublicConfig,\n ApplyProtectedConfig,\n useConfig\n };\n}\n"],"names":["createHOC","newChildren","BaseComponent","children","name","createAdminConfig","ApplyPublicConfig","makeDecoratable","ApplyProtectedConfig","PublicConfig","Compose","ProtectedConfig","defaultContext","ViewContext","React","WithConfig","onProperties","properties","setProperties","useState","useDebugConfig","context","useEffect","stateUpdater","Properties","useConfig","useContext","useMemo","toObject"],"mappings":";;;AAOA,MAAMA,YAAY,CACdC,cAEOC,CAAAA,gBACI,SAAmB,EAAEC,QAAQ,EAAE;YAClC,OAAO,WAAP,GACI,oBAACD,eAAAA,MACID,aACAE;QAGb;AAiBR,MAAMC,yBAAO;AAEN,SAASC;IAIZ,MAAMC,oBAAoBC,gBACtB,GAAGH,uBAAK,aAAa,CAAC,EACtB,CAAC,EAAED,QAAQ,EAAoB,GACpB,WAAP,GAAO,0CAAGA;IAIlB,MAAMK,uBAAuBD,gBACzB,GAAGH,uBAAK,gBAAgB,CAAC,EACzB,CAAC,EAAED,QAAQ,EAAoB,GACpB,WAAP,GAAO,0CAAGA;IAOlB,MAAMM,eAAe,CAAC,EAAEN,QAAQ,EAAe,GACpC,WAAP,GAAO,oBAACO,SAAOA;YAAC,WAAWJ;YAAmB,MAAMN,UAAUG;;IAGlE,MAAMQ,kBAAkB,CAAC,EAAER,QAAQ,EAAe,GACvC,WAAP,GAAO,oBAACO,SAAOA;YAAC,WAAWF;YAAsB,MAAMR,UAAUG;;IAQrE,MAAMS,iBAAiB;QAAER,MAAIA;QAAE,YAAY,EAAE;IAAC;IAE9C,MAAMS,cAAc,WAAdA,GAAcC,MAAAA,aAAmB,CAAcF;IAErD,MAAMG,aAAa,CAAC,EAAEC,YAAY,EAAEb,QAAQ,EAAmB;QAC3D,MAAM,CAACc,YAAYC,cAAc,GAAGC,SAAqB,EAAE;QAC3DC,eAAehB,wBAAMa;QACrB,MAAMI,UAAU;YAAEjB,MAAIA;YAAEa;QAAW;QAEnCK,UAAU;YACN,IAAI,AAAwB,cAAxB,OAAON,cACPA,aAAaC;QAErB,GAAG;YAACA;SAAW;QAEf,MAAMM,eAAe,CAACN;YAClBC,cAAcD;QAClB;QAEA,OAAO,WAAP,GACI,oBAACJ,YAAY,QAAQ;YAAC,OAAOQ;yBACzB,oBAACG,YAAUA;YAAC,UAAUD;YAAc,MAAMnB;WACrCD;IAIjB;IAEA,SAASsB;QACL,MAAM,EAAER,UAAU,EAAE,GAAGS,WAAWb;QAClC,OAAOc,QAAQ,IAAMC,SAA2BX,aAAa;YAACA;SAAW;IAC7E;IAEA,OAAO;QACHF;QACA,eAAeJ;QACfF;QACAH;QACAE;QACAiB;IACJ;AACJ"}
|
package/domain/Identity.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ export interface IdentityData {
|
|
|
32
32
|
profile: Identity.Profile;
|
|
33
33
|
currentTenant: Tenant;
|
|
34
34
|
defaultTenant: Tenant;
|
|
35
|
+
/** The enabled tenants in which the identity has a user record, sorted by name. */
|
|
36
|
+
tenants?: Tenant[];
|
|
35
37
|
}
|
|
36
38
|
export declare class Identity {
|
|
37
39
|
private data;
|
|
@@ -48,6 +50,12 @@ export declare class Identity {
|
|
|
48
50
|
get profile(): IProfile;
|
|
49
51
|
get currentTenant(): Tenant;
|
|
50
52
|
get defaultTenant(): Tenant;
|
|
53
|
+
get tenants(): Tenant[];
|
|
54
|
+
/**
|
|
55
|
+
* Whether the identity can open another tenant than this one.
|
|
56
|
+
* Root users never can: they open tenants through Tenant Manager.
|
|
57
|
+
*/
|
|
58
|
+
get canSwitchTenant(): boolean;
|
|
51
59
|
getPermission<T extends Identity.Permission = Identity.Permission>(name: string, exact?: boolean): T | null;
|
|
52
60
|
getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T>;
|
|
53
61
|
update(updates: Partial<Pick<Identity.Data, "displayName" | "profile">>): void;
|
package/domain/Identity.js
CHANGED
|
@@ -58,6 +58,12 @@ class Identity {
|
|
|
58
58
|
get defaultTenant() {
|
|
59
59
|
return this.data.defaultTenant;
|
|
60
60
|
}
|
|
61
|
+
get tenants() {
|
|
62
|
+
return this.data.tenants ?? [];
|
|
63
|
+
}
|
|
64
|
+
get canSwitchTenant() {
|
|
65
|
+
return this.tenants.length > 1 && !this.tenants.some((tenant)=>"root" === tenant.id);
|
|
66
|
+
}
|
|
61
67
|
getPermission(name, exact) {
|
|
62
68
|
const perms = this.data.permissions || [];
|
|
63
69
|
const exactMatch = perms.find((p)=>p.name === name);
|
package/domain/Identity.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain/Identity.js","sources":["../../src/domain/Identity.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { minimatch } from \"minimatch\";\nimport type { Tenant } from \"~/features/tenancy/abstractions.js\";\n\nexport interface IPermission {\n name: string;\n [key: string]: any;\n}\n\nexport interface IRole {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface ITeam {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IProfile {\n external: boolean;\n email?: string;\n firstName?: string;\n lastName?: string;\n avatar?: {\n src?: string;\n };\n}\n\nexport interface IdentityData {\n id: string;\n type: string;\n displayName: string;\n roles: IRole[];\n teams: ITeam[];\n permissions: Identity.Permission[];\n profile: Identity.Profile;\n currentTenant: Tenant;\n defaultTenant: Tenant;\n}\n\nconst anonymousData: IdentityData = {\n id: \"anonymous\",\n displayName: \"Anonymous\",\n type: \"admin\",\n roles: [],\n teams: [],\n permissions: [],\n profile: {\n external: false\n },\n currentTenant: {\n id: \"root\",\n name: \"Root\"\n },\n defaultTenant: {\n id: \"root\",\n name: \"Root\"\n }\n};\n\nexport class Identity {\n private constructor(\n private data: Identity.Data,\n private identityType: \"anonymous\" | \"authenticated\"\n ) {\n makeAutoObservable(this);\n }\n\n static createAuthenticated(data: Identity.Data) {\n return new Identity(data, \"authenticated\");\n }\n\n static createAnonymous() {\n return new Identity(anonymousData, \"anonymous\");\n }\n\n get isAuthenticated(): boolean {\n return this.identityType === \"authenticated\";\n }\n\n get id() {\n return this.data.id;\n }\n\n get type() {\n return this.data.type;\n }\n\n get displayName() {\n return this.data.displayName;\n }\n\n get roles() {\n return this.data.roles ?? [];\n }\n\n get teams() {\n return this.data.teams ?? [];\n }\n\n get profile() {\n return this.data.profile;\n }\n\n get currentTenant() {\n return this.data.currentTenant;\n }\n\n get defaultTenant() {\n return this.data.defaultTenant;\n }\n\n getPermission<T extends Identity.Permission = Identity.Permission>(\n name: string,\n exact?: boolean\n ): T | null {\n const perms = (this.data.permissions || []) as T[];\n const exactMatch = perms.find(p => p.name === name);\n if (exactMatch) {\n return exactMatch as T;\n } else if (exact) {\n return null;\n }\n\n // Try matching using patterns\n return perms.find(p => minimatch(name, p.name)) || null;\n }\n\n getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T> {\n const permissions = this.data.permissions || [];\n if (!name) {\n return permissions as T[];\n }\n\n return permissions.filter(current => {\n const exactMatch = current.name === name;\n if (exactMatch) {\n return true;\n }\n\n // Try matching using patterns.\n return minimatch(name, current.name);\n }) as T[];\n }\n\n update(updates: Partial<Pick<Identity.Data, \"displayName\" | \"profile\">>) {\n runInAction(() => {\n this.data.displayName = updates.displayName || this.data.displayName;\n this.data.profile = updates.profile || this.data.profile;\n });\n }\n}\n\nexport namespace Identity {\n export type Data = IdentityData;\n export type Permission = IPermission;\n export type Profile = IProfile;\n}\n"],"names":["anonymousData","Identity","data","identityType","makeAutoObservable","name","exact","perms","exactMatch","p","minimatch","permissions","current","updates","runInAction"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"domain/Identity.js","sources":["../../src/domain/Identity.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport { minimatch } from \"minimatch\";\nimport type { Tenant } from \"~/features/tenancy/abstractions.js\";\n\nexport interface IPermission {\n name: string;\n [key: string]: any;\n}\n\nexport interface IRole {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface ITeam {\n id: string;\n slug: string;\n name: string;\n}\n\nexport interface IProfile {\n external: boolean;\n email?: string;\n firstName?: string;\n lastName?: string;\n avatar?: {\n src?: string;\n };\n}\n\nexport interface IdentityData {\n id: string;\n type: string;\n displayName: string;\n roles: IRole[];\n teams: ITeam[];\n permissions: Identity.Permission[];\n profile: Identity.Profile;\n currentTenant: Tenant;\n defaultTenant: Tenant;\n /** The enabled tenants in which the identity has a user record, sorted by name. */\n tenants?: Tenant[];\n}\n\nconst anonymousData: IdentityData = {\n id: \"anonymous\",\n displayName: \"Anonymous\",\n type: \"admin\",\n roles: [],\n teams: [],\n permissions: [],\n profile: {\n external: false\n },\n currentTenant: {\n id: \"root\",\n name: \"Root\"\n },\n defaultTenant: {\n id: \"root\",\n name: \"Root\"\n }\n};\n\nexport class Identity {\n private constructor(\n private data: Identity.Data,\n private identityType: \"anonymous\" | \"authenticated\"\n ) {\n makeAutoObservable(this);\n }\n\n static createAuthenticated(data: Identity.Data) {\n return new Identity(data, \"authenticated\");\n }\n\n static createAnonymous() {\n return new Identity(anonymousData, \"anonymous\");\n }\n\n get isAuthenticated(): boolean {\n return this.identityType === \"authenticated\";\n }\n\n get id() {\n return this.data.id;\n }\n\n get type() {\n return this.data.type;\n }\n\n get displayName() {\n return this.data.displayName;\n }\n\n get roles() {\n return this.data.roles ?? [];\n }\n\n get teams() {\n return this.data.teams ?? [];\n }\n\n get profile() {\n return this.data.profile;\n }\n\n get currentTenant() {\n return this.data.currentTenant;\n }\n\n get defaultTenant() {\n return this.data.defaultTenant;\n }\n\n get tenants(): Tenant[] {\n return this.data.tenants ?? [];\n }\n\n /**\n * Whether the identity can open another tenant than this one.\n * Root users never can: they open tenants through Tenant Manager.\n */\n get canSwitchTenant(): boolean {\n return this.tenants.length > 1 && !this.tenants.some(tenant => tenant.id === \"root\");\n }\n\n getPermission<T extends Identity.Permission = Identity.Permission>(\n name: string,\n exact?: boolean\n ): T | null {\n const perms = (this.data.permissions || []) as T[];\n const exactMatch = perms.find(p => p.name === name);\n if (exactMatch) {\n return exactMatch as T;\n } else if (exact) {\n return null;\n }\n\n // Try matching using patterns\n return perms.find(p => minimatch(name, p.name)) || null;\n }\n\n getPermissions<T extends Identity.Permission = Identity.Permission>(name?: string): Array<T> {\n const permissions = this.data.permissions || [];\n if (!name) {\n return permissions as T[];\n }\n\n return permissions.filter(current => {\n const exactMatch = current.name === name;\n if (exactMatch) {\n return true;\n }\n\n // Try matching using patterns.\n return minimatch(name, current.name);\n }) as T[];\n }\n\n update(updates: Partial<Pick<Identity.Data, \"displayName\" | \"profile\">>) {\n runInAction(() => {\n this.data.displayName = updates.displayName || this.data.displayName;\n this.data.profile = updates.profile || this.data.profile;\n });\n }\n}\n\nexport namespace Identity {\n export type Data = IdentityData;\n export type Permission = IPermission;\n export type Profile = IProfile;\n}\n"],"names":["anonymousData","Identity","data","identityType","makeAutoObservable","tenant","name","exact","perms","exactMatch","p","minimatch","permissions","current","updates","runInAction"],"mappings":";;AA6CA,MAAMA,gBAA8B;IAChC,IAAI;IACJ,aAAa;IACb,MAAM;IACN,OAAO,EAAE;IACT,OAAO,EAAE;IACT,aAAa,EAAE;IACf,SAAS;QACL,UAAU;IACd;IACA,eAAe;QACX,IAAI;QACJ,MAAM;IACV;IACA,eAAe;QACX,IAAI;QACJ,MAAM;IACV;AACJ;AAEO,MAAMC;IACT,YACYC,IAAmB,EACnBC,YAA2C,CACrD;aAFUD,IAAI,GAAJA;aACAC,YAAY,GAAZA;QAERC,mBAAmB,IAAI;IAC3B;IAEA,OAAO,oBAAoBF,IAAmB,EAAE;QAC5C,OAAO,IAAID,SAASC,MAAM;IAC9B;IAEA,OAAO,kBAAkB;QACrB,OAAO,IAAID,SAASD,eAAe;IACvC;IAEA,IAAI,kBAA2B;QAC3B,OAAO,AAAsB,oBAAtB,IAAI,CAAC,YAAY;IAC5B;IAEA,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE;IACvB;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI;IACzB;IAEA,IAAI,cAAc;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW;IAChC;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;IAChC;IAEA,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;IAChC;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO;IAC5B;IAEA,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,gBAAgB;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa;IAClC;IAEA,IAAI,UAAoB;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE;IAClC;IAMA,IAAI,kBAA2B;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAACK,CAAAA,SAAUA,AAAc,WAAdA,OAAO,EAAE;IAC5E;IAEA,cACIC,IAAY,EACZC,KAAe,EACP;QACR,MAAMC,QAAS,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE;QAC1C,MAAMC,aAAaD,MAAM,IAAI,CAACE,CAAAA,IAAKA,EAAE,IAAI,KAAKJ;QAC9C,IAAIG,YACA,OAAOA;aACJ,IAAIF,OACP,OAAO;QAIX,OAAOC,MAAM,IAAI,CAACE,CAAAA,IAAKC,UAAUL,MAAMI,EAAE,IAAI,MAAM;IACvD;IAEA,eAAoEJ,IAAa,EAAY;QACzF,MAAMM,cAAc,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE;QAC/C,IAAI,CAACN,MACD,OAAOM;QAGX,OAAOA,YAAY,MAAM,CAACC,CAAAA;YACtB,MAAMJ,aAAaI,QAAQ,IAAI,KAAKP;YACpC,IAAIG,YACA,OAAO;YAIX,OAAOE,UAAUL,MAAMO,QAAQ,IAAI;QACvC;IACJ;IAEA,OAAOC,OAAgE,EAAE;QACrEC,YAAY;YACR,IAAI,CAAC,IAAI,CAAC,WAAW,GAAGD,QAAQ,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW;YACpE,IAAI,CAAC,IAAI,CAAC,OAAO,GAAGA,QAAQ,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;QAC5D;IACJ;AACJ"}
|
|
@@ -4,7 +4,8 @@ export { createPermissionsFeature } from "../../permissions/index.js";
|
|
|
4
4
|
export { createHasPermission } from "../../permissions/index.js";
|
|
5
5
|
export { createUsePermissions } from "../../permissions/index.js";
|
|
6
6
|
export type { Permissions } from "../../permissions/types.js";
|
|
7
|
-
export { LogInUseCase } from "../../features/security/LogIn/index.js";
|
|
7
|
+
export { LogInUseCase, LogInError } from "../../features/security/LogIn/index.js";
|
|
8
|
+
export { LoginTenantResolver } from "../../features/security/LoginTenantResolver/index.js";
|
|
8
9
|
export { LogOutUseCase } from "../../features/security/LogOut/index.js";
|
|
9
10
|
export { AuthenticationContext } from "../../features/security/AuthenticationContext/index.js";
|
|
10
11
|
export { IdentityContext } from "../../features/security/IdentityContext/index.js";
|
|
@@ -12,3 +13,5 @@ export { useAuthentication } from "../../presentation/security/hooks/useAuthenti
|
|
|
12
13
|
export { useIdentity } from "../../presentation/security/hooks/useIdentity.js";
|
|
13
14
|
export { HasPermissionComponent } from "../../presentation/security/components/HasPermission.js";
|
|
14
15
|
export { LoginScreenComponent } from "../../base/ui/LoginScreen.js";
|
|
16
|
+
export { LoginTenantPicker } from "../../presentation/security/components/LoginTenantPicker.js";
|
|
17
|
+
export { LoginNoTenantAccess } from "../../presentation/security/components/LoginNoTenantAccess.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createHasPermission, createPermissionSchema, createPermissionsAbstraction, createPermissionsFeature, createUsePermissions } from "../../permissions/index.js";
|
|
2
|
-
export { LogInUseCase } from "../../features/security/LogIn/index.js";
|
|
2
|
+
export { LogInError, LogInUseCase } from "../../features/security/LogIn/index.js";
|
|
3
|
+
export { LoginTenantResolver } from "../../features/security/LoginTenantResolver/index.js";
|
|
3
4
|
export { LogOutUseCase } from "../../features/security/LogOut/index.js";
|
|
4
5
|
export { AuthenticationContext } from "../../features/security/AuthenticationContext/index.js";
|
|
5
6
|
export { IdentityContext } from "../../features/security/IdentityContext/index.js";
|
|
@@ -7,3 +8,5 @@ export { useAuthentication } from "../../presentation/security/hooks/useAuthenti
|
|
|
7
8
|
export { useIdentity } from "../../presentation/security/hooks/useIdentity.js";
|
|
8
9
|
export { HasPermissionComponent } from "../../presentation/security/components/HasPermission.js";
|
|
9
10
|
export { LoginScreenComponent } from "../../base/ui/LoginScreen.js";
|
|
11
|
+
export { LoginTenantPicker } from "../../presentation/security/components/LoginTenantPicker.js";
|
|
12
|
+
export { LoginNoTenantAccess } from "../../presentation/security/components/LoginNoTenantAccess.js";
|
package/exports/admin.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { FormModelFactory } from "../features/formModel/abstractions.js";
|
|
2
|
+
export { WebinySdk } from "../features/webinySdk/abstractions.js";
|
|
3
|
+
export { Result } from "@webiny/sdk";
|
|
2
4
|
export { DevToolsSection } from "../components/index.js";
|
|
3
5
|
export { createReactiveComponent } from "../index.js";
|
|
4
6
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
package/exports/admin.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { FormModelFactory } from "../features/formModel/abstractions.js";
|
|
2
|
+
export { WebinySdk } from "../features/webinySdk/abstractions.js";
|
|
3
|
+
export { Result } from "@webiny/sdk";
|
|
2
4
|
export { DevToolsSection } from "../components/index.js";
|
|
3
5
|
export { createReactiveComponent } from "../index.js";
|
|
4
6
|
export { RegisterFeature } from "../components/RegisterFeature.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/accessManagement/constants.js","sources":["../../../src/features/accessManagement/constants.ts"],"sourcesContent":["export enum Permission {\n Roles = \"security.role\",\n Teams = \"security.team\",\n ApiKeys = \"security.apiKey\"\n}\n"],"names":["Permission"],"mappings":"AAAO,IAAKA,uBAAUA,WAAAA,GAAAA,
|
|
1
|
+
{"version":3,"file":"features/accessManagement/constants.js","sources":["../../../src/features/accessManagement/constants.ts"],"sourcesContent":["export enum Permission {\n Roles = \"security.role\",\n Teams = \"security.team\",\n ApiKeys = \"security.apiKey\"\n}\n"],"names":["Permission"],"mappings":"AAAO,IAAKA,uBAAUA,WAAAA,GAAAA,SAAAA,UAAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AdminUsersCapabilitiesData {
|
|
2
|
+
/**
|
|
3
|
+
* A user's account is shared by all of their tenants, so a New User whose email has an account
|
|
4
|
+
* in another tenant is linked to this tenant instead of created. Needs the `adminUsers.checkEmail`
|
|
5
|
+
* query and the `adminUsers.linkUser` mutation.
|
|
6
|
+
*/
|
|
7
|
+
linkAccounts: boolean;
|
|
8
|
+
/** An administrator can reset another user's MFA. Needs the `adminUsers.resetUserMfa` mutation. */
|
|
9
|
+
resetMfa: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* What the identity provider behind the Users screen supports beyond creating, editing and deleting
|
|
13
|
+
* users. Set by the provider's admin extension through `<AdminUsers capabilities={...} />`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AdminUsersCapabilities: import("@webiny/di").Abstraction<AdminUsersCapabilitiesData>;
|
|
16
|
+
export declare namespace AdminUsersCapabilities {
|
|
17
|
+
type Interface = AdminUsersCapabilitiesData;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/capabilities/abstractions.js","sources":["../../../../src/features/adminUsers/capabilities/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface AdminUsersCapabilitiesData {\n /**\n * A user's account is shared by all of their tenants, so a New User whose email has an account\n * in another tenant is linked to this tenant instead of created. Needs the `adminUsers.checkEmail`\n * query and the `adminUsers.linkUser` mutation.\n */\n linkAccounts: boolean;\n /** An administrator can reset another user's MFA. Needs the `adminUsers.resetUserMfa` mutation. */\n resetMfa: boolean;\n}\n\n/**\n * What the identity provider behind the Users screen supports beyond creating, editing and deleting\n * users. Set by the provider's admin extension through `<AdminUsers capabilities={...} />`.\n */\nexport const AdminUsersCapabilities =\n createAbstraction<AdminUsersCapabilitiesData>(\"AdminUsers/Capabilities\");\n\nexport namespace AdminUsersCapabilities {\n export type Interface = AdminUsersCapabilitiesData;\n}\n"],"names":["AdminUsersCapabilities","createAbstraction"],"mappings":";AAiBO,MAAMA,yBACTC,kBAA8C"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AdminUsersCapabilities } from "./abstractions.js";
|
|
2
|
+
export declare const AdminUsersCapabilitiesFeature: import("@webiny/feature/admin").FeatureDefinition<{
|
|
3
|
+
capabilities: AdminUsersCapabilities.Interface;
|
|
4
|
+
}, [Partial<import("./abstractions.js").AdminUsersCapabilitiesData>]>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { AdminUsersCapabilities } from "./abstractions.js";
|
|
3
|
+
const AdminUsersCapabilitiesFeature = createFeature({
|
|
4
|
+
name: "AdminUsers/Capabilities",
|
|
5
|
+
register (container, capabilities) {
|
|
6
|
+
container.registerInstance(AdminUsersCapabilities, {
|
|
7
|
+
linkAccounts: capabilities.linkAccounts ?? false,
|
|
8
|
+
resetMfa: capabilities.resetMfa ?? false
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
capabilities: container.resolve(AdminUsersCapabilities)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { AdminUsersCapabilitiesFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/capabilities/feature.js","sources":["../../../../src/features/adminUsers/capabilities/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AdminUsersCapabilities } from \"./abstractions.js\";\n\nexport const AdminUsersCapabilitiesFeature = createFeature<\n { capabilities: AdminUsersCapabilities.Interface },\n [Partial<AdminUsersCapabilities.Interface>]\n>({\n name: \"AdminUsers/Capabilities\",\n register(container, capabilities) {\n container.registerInstance(AdminUsersCapabilities, {\n linkAccounts: capabilities.linkAccounts ?? false,\n resetMfa: capabilities.resetMfa ?? false\n });\n },\n resolve(container) {\n return {\n capabilities: container.resolve(AdminUsersCapabilities)\n };\n }\n});\n"],"names":["AdminUsersCapabilitiesFeature","createFeature","container","capabilities","AdminUsersCapabilities"],"mappings":";;AAGO,MAAMA,gCAAgCC,cAG3C;IACE,MAAM;IACN,UAASC,SAAS,EAAEC,YAAY;QAC5BD,UAAU,gBAAgB,CAACE,wBAAwB;YAC/C,cAAcD,aAAa,YAAY,IAAI;YAC3C,UAAUA,aAAa,QAAQ,IAAI;QACvC;IACJ;IACA,SAAQD,SAAS;QACb,OAAO;YACH,cAAcA,UAAU,OAAO,CAACE;QACpC;IACJ;AACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
|
+
import { CheckEmailGateway as GatewayAbstraction, type EmailStatus } from "./abstractions/index.js";
|
|
3
|
+
declare class CheckEmailGraphQLGateway implements GatewayAbstraction.Interface {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
6
|
+
execute(email: string): Promise<EmailStatus>;
|
|
7
|
+
}
|
|
8
|
+
export declare const CheckEmailGateway: typeof CheckEmailGraphQLGateway & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/CheckEmailGateway.js").ICheckEmailGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
|
|
2
|
+
import { AdminUsersError } from "../shared/AdminUsersError.js";
|
|
3
|
+
import { CheckEmailGateway } from "./abstractions/index.js";
|
|
4
|
+
const CHECK_EMAIL = `
|
|
5
|
+
query CheckEmail($email: String!) {
|
|
6
|
+
adminUsers {
|
|
7
|
+
checkEmail(email: $email) {
|
|
8
|
+
data {
|
|
9
|
+
status
|
|
10
|
+
}
|
|
11
|
+
error {
|
|
12
|
+
code
|
|
13
|
+
message
|
|
14
|
+
data
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
class CheckEmailGraphQLGateway {
|
|
21
|
+
constructor(client){
|
|
22
|
+
this.client = client;
|
|
23
|
+
}
|
|
24
|
+
async execute(email) {
|
|
25
|
+
const response = await this.client.execute({
|
|
26
|
+
query: CHECK_EMAIL,
|
|
27
|
+
variables: {
|
|
28
|
+
email
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const envelope = response.adminUsers.checkEmail;
|
|
32
|
+
if (envelope.error) throw new AdminUsersError(envelope.error);
|
|
33
|
+
return envelope.data.status;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const CheckEmailGateway_CheckEmailGateway = CheckEmailGateway.createImplementation({
|
|
37
|
+
implementation: CheckEmailGraphQLGateway,
|
|
38
|
+
dependencies: [
|
|
39
|
+
MainGraphQLClient
|
|
40
|
+
]
|
|
41
|
+
});
|
|
42
|
+
export { CheckEmailGateway_CheckEmailGateway as CheckEmailGateway };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=CheckEmailGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/users/checkEmail/CheckEmailGateway.js","sources":["../../../../../src/features/adminUsers/users/checkEmail/CheckEmailGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport { AdminUsersError } from \"../shared/AdminUsersError.js\";\nimport { CheckEmailGateway as GatewayAbstraction, type EmailStatus } from \"./abstractions/index.js\";\n\nconst CHECK_EMAIL = /* GraphQL */ `\n query CheckEmail($email: String!) {\n adminUsers {\n checkEmail(email: $email) {\n data {\n status\n }\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\ntype CheckEmailResponse = {\n adminUsers: {\n checkEmail:\n | { data: { status: EmailStatus }; error: null }\n | { data: null; error: { code: string; message: string; data: any } };\n };\n};\n\nclass CheckEmailGraphQLGateway implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(email: string): Promise<EmailStatus> {\n const response = await this.client.execute<CheckEmailResponse>({\n query: CHECK_EMAIL,\n variables: { email }\n });\n\n const envelope = response.adminUsers.checkEmail;\n if (envelope.error) {\n throw new AdminUsersError(envelope.error);\n }\n\n return envelope.data.status;\n }\n}\n\nexport const CheckEmailGateway = GatewayAbstraction.createImplementation({\n implementation: CheckEmailGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["CHECK_EMAIL","CheckEmailGraphQLGateway","client","email","response","envelope","AdminUsersError","CheckEmailGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAIA,MAAMA,cAA4B,CAAC;;;;;;;;;;;;;;;AAenC,CAAC;AAUD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,QAAQC,KAAa,EAAwB;QAC/C,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqB;YAC3D,OAAOJ;YACP,WAAW;gBAAEG;YAAM;QACvB;QAEA,MAAME,WAAWD,SAAS,UAAU,CAAC,UAAU;QAC/C,IAAIC,SAAS,KAAK,EACd,MAAM,IAAIC,gBAAgBD,SAAS,KAAK;QAG5C,OAAOA,SAAS,IAAI,CAAC,MAAM;IAC/B;AACJ;AAEO,MAAME,sCAAoBC,kBAAAA,oBAAuC,CAAC;IACrE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckEmailGateway, CheckEmailUseCase as UseCaseAbstraction, type EmailStatus } from "./abstractions/index.js";
|
|
2
|
+
declare class CheckEmailUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
3
|
+
private readonly gateway;
|
|
4
|
+
constructor(gateway: CheckEmailGateway.Interface);
|
|
5
|
+
execute(email: string): Promise<EmailStatus>;
|
|
6
|
+
}
|
|
7
|
+
export declare const CheckEmailUseCase: typeof CheckEmailUseCaseImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/CheckEmailUseCase.js").ICheckEmailUseCase>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CheckEmailGateway, CheckEmailUseCase } from "./abstractions/index.js";
|
|
2
|
+
class CheckEmailUseCaseImpl {
|
|
3
|
+
constructor(gateway){
|
|
4
|
+
this.gateway = gateway;
|
|
5
|
+
}
|
|
6
|
+
async execute(email) {
|
|
7
|
+
return this.gateway.execute(email.trim());
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const CheckEmailUseCase_CheckEmailUseCase = CheckEmailUseCase.createImplementation({
|
|
11
|
+
implementation: CheckEmailUseCaseImpl,
|
|
12
|
+
dependencies: [
|
|
13
|
+
CheckEmailGateway
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
export { CheckEmailUseCase_CheckEmailUseCase as CheckEmailUseCase };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=CheckEmailUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/users/checkEmail/CheckEmailUseCase.js","sources":["../../../../../src/features/adminUsers/users/checkEmail/CheckEmailUseCase.ts"],"sourcesContent":["import {\n CheckEmailGateway,\n CheckEmailUseCase as UseCaseAbstraction,\n type EmailStatus\n} from \"./abstractions/index.js\";\n\nclass CheckEmailUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly gateway: CheckEmailGateway.Interface) {}\n\n async execute(email: string): Promise<EmailStatus> {\n return this.gateway.execute(email.trim());\n }\n}\n\nexport const CheckEmailUseCase = UseCaseAbstraction.createImplementation({\n implementation: CheckEmailUseCaseImpl,\n dependencies: [CheckEmailGateway]\n});\n"],"names":["CheckEmailUseCaseImpl","gateway","email","CheckEmailUseCase","UseCaseAbstraction","CheckEmailGateway"],"mappings":";AAMA,MAAMA;IACF,YAA6BC,OAAoC,CAAE;aAAtCA,OAAO,GAAPA;IAAuC;IAEpE,MAAM,QAAQC,KAAa,EAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAACA,MAAM,IAAI;IAC1C;AACJ;AAEO,MAAMC,sCAAoBC,kBAAAA,oBAAuC,CAAC;IACrE,gBAAgBJ;IAChB,cAAc;QAACK;KAAkB;AACrC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - `AVAILABLE`: a new user can be created with this email.
|
|
3
|
+
* - `EXISTS_HERE`: the current tenant already has a user with this email.
|
|
4
|
+
* - `EXISTS_ELSEWHERE`: the email has an account in another tenant, which can be linked here.
|
|
5
|
+
*/
|
|
6
|
+
export type EmailStatus = "AVAILABLE" | "EXISTS_HERE" | "EXISTS_ELSEWHERE";
|
|
7
|
+
export interface ICheckEmailGateway {
|
|
8
|
+
execute(email: string): Promise<EmailStatus>;
|
|
9
|
+
}
|
|
10
|
+
export declare const CheckEmailGateway: import("@webiny/di").Abstraction<ICheckEmailGateway>;
|
|
11
|
+
export declare namespace CheckEmailGateway {
|
|
12
|
+
type Interface = ICheckEmailGateway;
|
|
13
|
+
type Status = EmailStatus;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/users/checkEmail/abstractions/CheckEmailGateway.js","sources":["../../../../../../src/features/adminUsers/users/checkEmail/abstractions/CheckEmailGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\n/**\n * - `AVAILABLE`: a new user can be created with this email.\n * - `EXISTS_HERE`: the current tenant already has a user with this email.\n * - `EXISTS_ELSEWHERE`: the email has an account in another tenant, which can be linked here.\n */\nexport type EmailStatus = \"AVAILABLE\" | \"EXISTS_HERE\" | \"EXISTS_ELSEWHERE\";\n\nexport interface ICheckEmailGateway {\n execute(email: string): Promise<EmailStatus>;\n}\n\nexport const CheckEmailGateway = createAbstraction<ICheckEmailGateway>(\"CheckEmailGateway\");\n\nexport namespace CheckEmailGateway {\n export type Interface = ICheckEmailGateway;\n export type Status = EmailStatus;\n}\n"],"names":["CheckEmailGateway","createAbstraction"],"mappings":";AAaO,MAAMA,oBAAoBC,kBAAsC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EmailStatus } from "./CheckEmailGateway.js";
|
|
2
|
+
export interface ICheckEmailUseCase {
|
|
3
|
+
execute(email: string): Promise<EmailStatus>;
|
|
4
|
+
}
|
|
5
|
+
export declare const CheckEmailUseCase: import("@webiny/di").Abstraction<ICheckEmailUseCase>;
|
|
6
|
+
export declare namespace CheckEmailUseCase {
|
|
7
|
+
type Interface = ICheckEmailUseCase;
|
|
8
|
+
type Status = EmailStatus;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/users/checkEmail/abstractions/CheckEmailUseCase.js","sources":["../../../../../../src/features/adminUsers/users/checkEmail/abstractions/CheckEmailUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { EmailStatus } from \"./CheckEmailGateway.js\";\n\nexport interface ICheckEmailUseCase {\n execute(email: string): Promise<EmailStatus>;\n}\n\nexport const CheckEmailUseCase = createAbstraction<ICheckEmailUseCase>(\"CheckEmailUseCase\");\n\nexport namespace CheckEmailUseCase {\n export type Interface = ICheckEmailUseCase;\n export type Status = EmailStatus;\n}\n"],"names":["CheckEmailUseCase","createAbstraction"],"mappings":";AAOO,MAAMA,oBAAoBC,kBAAsC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { CheckEmailUseCase } from "./abstractions/index.js";
|
|
3
|
+
import { CheckEmailUseCase as external_CheckEmailUseCase_js_CheckEmailUseCase } from "./CheckEmailUseCase.js";
|
|
4
|
+
import { CheckEmailGateway } from "./CheckEmailGateway.js";
|
|
5
|
+
const CheckEmailFeature = createFeature({
|
|
6
|
+
name: "AdminUsers/CheckEmail",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(external_CheckEmailUseCase_js_CheckEmailUseCase);
|
|
9
|
+
container.register(CheckEmailGateway).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
useCase: container.resolve(CheckEmailUseCase)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { CheckEmailFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/adminUsers/users/checkEmail/feature.js","sources":["../../../../../src/features/adminUsers/users/checkEmail/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { CheckEmailUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { CheckEmailUseCase } from \"./CheckEmailUseCase.js\";\nimport { CheckEmailGateway } from \"./CheckEmailGateway.js\";\n\nexport const CheckEmailFeature = createFeature({\n name: \"AdminUsers/CheckEmail\",\n register(container) {\n container.register(CheckEmailUseCase);\n container.register(CheckEmailGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["CheckEmailFeature","createFeature","container","CheckEmailUseCase","CheckEmailGateway","UseCaseAbstraction"],"mappings":";;;;AAKO,MAAMA,oBAAoBC,cAAc;IAC3C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,mBAAmB,gBAAgB;IAC1D;IACA,SAAQF,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACG;QAC/B;IACJ;AACJ"}
|