@webiny/app-admin 6.6.0-alpha.1 → 6.6.0-alpha.10
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/Admin.js +19 -2
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.js +4 -0
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js +1 -0
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/BirthdayInputRenderer.d.ts +21 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.js +39 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.d.ts +1 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js +123 -0
- package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js +21 -4
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +11 -2
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +2 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +14 -5
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +16 -25
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +18 -3
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/{TemplatePicker.d.ts → TemplatePicker/AddTemplateButton.d.ts} +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js +24 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.d.ts +13 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js +21 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.d.ts +3 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js +35 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.d.ts +8 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js +22 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js +52 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.d.ts +8 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js +16 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.d.ts +10 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js +22 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.d.ts +3 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js +35 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.js +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.d.ts +6 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.js +0 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +8 -3
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +25 -17
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js +106 -0
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js.map +1 -0
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +3 -2
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/SelectRenderer.js +4 -2
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base.js +2 -1
- package/base/Base.js.map +1 -1
- package/base/createRootContainer.js +4 -0
- package/base/createRootContainer.js.map +1 -1
- package/base/resolveApiUrl.d.ts +10 -0
- package/base/resolveApiUrl.js +11 -3
- package/base/resolveApiUrl.js.map +1 -1
- package/base/ui/AssumedPermissionsSelector.d.ts +47 -0
- package/base/ui/AssumedPermissionsSelector.js +7 -0
- package/base/ui/AssumedPermissionsSelector.js.map +1 -0
- package/base/ui/DebuggerIndicator.d.ts +23 -0
- package/base/ui/DebuggerIndicator.js +5 -0
- package/base/ui/DebuggerIndicator.js.map +1 -0
- package/base/ui/Layout.d.ts +20 -0
- package/base/ui/Layout.js +2 -1
- package/base/ui/Layout.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.d.ts +1 -3
- package/components/DeveloperMode/DeveloperMode.js.map +1 -1
- package/components/Filters/Filters.js +7 -1
- package/components/Filters/Filters.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.js +1 -1
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/SplitView/SplitView.d.ts +2 -2
- package/components/SplitView/SplitView.js +7 -7
- package/components/SplitView/SplitView.js.map +1 -1
- package/config/AdminConfig/Widget.d.ts +9 -1
- package/config/AdminConfig/Widget.js +6 -2
- package/config/AdminConfig/Widget.js.map +1 -1
- package/domain/Identity.js +1 -1
- package/domain/Identity.js.map +1 -1
- package/exports/admin/ui.d.ts +4 -0
- package/exports/admin/ui.js +4 -1
- package/exports/admin.d.ts +4 -0
- package/exports/admin.js +2 -0
- package/features/{aiChat/AiChatGateway.d.ts → adminAssistant/AdminAssistantGateway.d.ts} +7 -7
- package/features/{aiChat/AiChatGateway.js → adminAssistant/AdminAssistantGateway.js} +8 -8
- package/features/adminAssistant/AdminAssistantGateway.js.map +1 -0
- package/features/adminAssistant/AdminAssistantPresenter.d.ts +60 -0
- package/features/adminAssistant/AdminAssistantPresenter.js +377 -0
- package/features/adminAssistant/AdminAssistantPresenter.js.map +1 -0
- package/features/adminAssistant/abstractions.d.ts +176 -0
- package/features/adminAssistant/abstractions.js +6 -0
- package/features/adminAssistant/abstractions.js.map +1 -0
- package/features/adminAssistant/feature.d.ts +3 -0
- package/features/adminAssistant/feature.js +19 -0
- package/features/adminAssistant/feature.js.map +1 -0
- package/features/adminAssistant/index.d.ts +6 -0
- package/features/adminAssistant/index.js +3 -0
- package/features/adminAssistant/turnsFromMessages.d.ts +15 -0
- package/features/adminAssistant/turnsFromMessages.js +77 -0
- package/features/adminAssistant/turnsFromMessages.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
- package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/index.d.ts +6 -0
- package/features/adminUsers/account/getCurrentUser/abstractions/index.js +2 -0
- package/features/adminUsers/account/getCurrentUser/feature.d.ts +3 -0
- package/features/adminUsers/account/getCurrentUser/feature.js +19 -0
- package/features/adminUsers/account/getCurrentUser/feature.js.map +1 -0
- package/features/adminUsers/account/getCurrentUser/index.d.ts +1 -0
- package/features/adminUsers/account/getCurrentUser/index.js +1 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
- package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/index.d.ts +8 -0
- package/features/adminUsers/account/updateCurrentUser/abstractions/index.js +2 -0
- package/features/adminUsers/account/updateCurrentUser/feature.d.ts +3 -0
- package/features/adminUsers/account/updateCurrentUser/feature.js +19 -0
- package/features/adminUsers/account/updateCurrentUser/feature.js.map +1 -0
- package/features/adminUsers/account/updateCurrentUser/index.d.ts +1 -0
- package/features/adminUsers/account/updateCurrentUser/index.js +1 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.d.ts +6 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js +22 -0
- package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js.map +1 -0
- package/features/adminUsers/passwordPolicy/abstractions.d.ts +20 -0
- package/features/adminUsers/passwordPolicy/abstractions.js +5 -0
- package/features/adminUsers/passwordPolicy/abstractions.js.map +1 -0
- package/features/adminUsers/passwordPolicy/feature.d.ts +8 -0
- package/features/adminUsers/passwordPolicy/feature.js +18 -0
- package/features/adminUsers/passwordPolicy/feature.js.map +1 -0
- package/features/adminUsers/passwordPolicy/index.d.ts +3 -0
- package/features/adminUsers/passwordPolicy/index.js +3 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.d.ts +10 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js +11 -0
- package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js.map +1 -0
- package/features/adminUsers/permissions/abstractions.d.ts +17 -0
- package/features/adminUsers/permissions/abstractions.js +6 -0
- package/features/adminUsers/permissions/abstractions.js.map +1 -0
- package/features/adminUsers/permissions/feature.d.ts +14 -0
- package/features/adminUsers/permissions/feature.js +7 -0
- package/features/adminUsers/permissions/feature.js.map +1 -0
- package/features/adminUsers/permissionsSchema.d.ts +10 -0
- package/features/adminUsers/permissionsSchema.js +18 -0
- package/features/adminUsers/permissionsSchema.js.map +1 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.d.ts +11 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.js +49 -0
- package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.js +18 -0
- package/features/adminUsers/users/createUser/CreateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js +5 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js +5 -0
- package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/createUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/createUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/createUser/feature.d.ts +3 -0
- package/features/adminUsers/users/createUser/feature.js +19 -0
- package/features/adminUsers/users/createUser/feature.js.map +1 -0
- package/features/adminUsers/users/createUser/index.d.ts +2 -0
- package/features/adminUsers/users/createUser/index.js +2 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.js +40 -0
- package/features/adminUsers/users/deleteUser/DeleteUserGateway.js.map +1 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js +18 -0
- package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
- package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
- package/features/adminUsers/users/deleteUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/deleteUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/deleteUser/feature.d.ts +3 -0
- package/features/adminUsers/users/deleteUser/feature.js +19 -0
- package/features/adminUsers/users/deleteUser/feature.js.map +1 -0
- package/features/adminUsers/users/deleteUser/index.d.ts +2 -0
- package/features/adminUsers/users/deleteUser/index.js +2 -0
- package/features/adminUsers/users/getUser/GetUserGateway.d.ts +11 -0
- package/features/adminUsers/users/getUser/GetUserGateway.js +57 -0
- package/features/adminUsers/users/getUser/GetUserGateway.js.map +1 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.js +18 -0
- package/features/adminUsers/users/getUser/GetUserUseCase.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js +5 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js +5 -0
- package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
- package/features/adminUsers/users/getUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/getUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/getUser/feature.d.ts +3 -0
- package/features/adminUsers/users/getUser/feature.js +19 -0
- package/features/adminUsers/users/getUser/feature.js.map +1 -0
- package/features/adminUsers/users/getUser/index.d.ts +2 -0
- package/features/adminUsers/users/getUser/index.js +2 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.d.ts +11 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.js +39 -0
- package/features/adminUsers/users/listUsers/ListUsersGateway.js.map +1 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.d.ts +10 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.js +18 -0
- package/features/adminUsers/users/listUsers/ListUsersUseCase.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js +5 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
- package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
- package/features/adminUsers/users/listUsers/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/listUsers/abstractions/index.js +2 -0
- package/features/adminUsers/users/listUsers/feature.d.ts +3 -0
- package/features/adminUsers/users/listUsers/feature.js +19 -0
- package/features/adminUsers/users/listUsers/feature.js.map +1 -0
- package/features/adminUsers/users/listUsers/index.d.ts +2 -0
- package/features/adminUsers/users/listUsers/index.js +2 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.d.ts +11 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.js +59 -0
- package/features/adminUsers/users/updateUser/UpdateUserGateway.js.map +1 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.d.ts +10 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.js +18 -0
- package/features/adminUsers/users/updateUser/UpdateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
- package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
- package/features/adminUsers/users/updateUser/abstractions/index.d.ts +2 -0
- package/features/adminUsers/users/updateUser/abstractions/index.js +2 -0
- package/features/adminUsers/users/updateUser/feature.d.ts +3 -0
- package/features/adminUsers/users/updateUser/feature.js +19 -0
- package/features/adminUsers/users/updateUser/feature.js.map +1 -0
- package/features/adminUsers/users/updateUser/index.d.ts +2 -0
- package/features/adminUsers/users/updateUser/index.js +2 -0
- package/features/aiChats/AiChatSaveError.d.ts +6 -0
- package/features/aiChats/AiChatSaveError.js +8 -0
- package/features/aiChats/AiChatSaveError.js.map +1 -0
- package/features/aiChats/AiChatsGateway.d.ts +18 -0
- package/features/aiChats/AiChatsGateway.js +132 -0
- package/features/aiChats/AiChatsGateway.js.map +1 -0
- package/features/aiChats/AiChatsRepository.d.ts +36 -0
- package/features/aiChats/AiChatsRepository.js +110 -0
- package/features/aiChats/AiChatsRepository.js.map +1 -0
- package/features/aiChats/AiChatsRequestError.d.ts +9 -0
- package/features/aiChats/AiChatsRequestError.js +8 -0
- package/features/aiChats/AiChatsRequestError.js.map +1 -0
- package/features/aiChats/abstractions.d.ts +76 -0
- package/features/aiChats/abstractions.js +6 -0
- package/features/aiChats/abstractions.js.map +1 -0
- package/features/aiChats/feature.d.ts +3 -0
- package/features/aiChats/feature.js +19 -0
- package/features/aiChats/feature.js.map +1 -0
- package/features/aiChats/index.d.ts +9 -0
- package/features/aiChats/index.js +3 -0
- package/features/aiChats/messageOf.d.ts +2 -0
- package/features/aiChats/messageOf.js +7 -0
- package/features/aiChats/messageOf.js.map +1 -0
- package/features/aiSettings/abstractions.d.ts +16 -0
- package/features/aiSettings/abstractions.js +5 -0
- package/features/aiSettings/abstractions.js.map +1 -0
- package/features/aiSettings/index.d.ts +2 -0
- package/features/aiSettings/index.js +1 -0
- package/features/assumePermissions/ApiStreamClientDecorator.d.ts +16 -0
- package/features/assumePermissions/ApiStreamClientDecorator.js +29 -0
- package/features/assumePermissions/ApiStreamClientDecorator.js.map +1 -0
- package/features/assumePermissions/AssumePermissionsContext.d.ts +17 -0
- package/features/assumePermissions/AssumePermissionsContext.js +32 -0
- package/features/assumePermissions/AssumePermissionsContext.js.map +1 -0
- package/features/assumePermissions/AssumePermissionsUseCase.d.ts +33 -0
- package/features/assumePermissions/AssumePermissionsUseCase.js +48 -0
- package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -0
- package/features/assumePermissions/GraphQLClientDecorator.d.ts +16 -0
- package/features/assumePermissions/GraphQLClientDecorator.js +29 -0
- package/features/assumePermissions/GraphQLClientDecorator.js.map +1 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.d.ts +13 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.js +74 -0
- package/features/assumePermissions/ListAssumableTargetsGateway.js.map +1 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.d.ts +16 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.js +38 -0
- package/features/assumePermissions/ListAssumableTargetsUseCase.js.map +1 -0
- package/features/assumePermissions/LogInUseCaseDecorator.d.ts +33 -0
- package/features/assumePermissions/LogInUseCaseDecorator.js +36 -0
- package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.d.ts +16 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.js +21 -0
- package/features/assumePermissions/LogOutUseCaseDecorator.js.map +1 -0
- package/features/assumePermissions/abstractions.d.ts +78 -0
- package/features/assumePermissions/abstractions.js +8 -0
- package/features/assumePermissions/abstractions.js.map +1 -0
- package/features/assumePermissions/assumePermissionsHeader.d.ts +3 -0
- package/features/assumePermissions/assumePermissionsHeader.js +7 -0
- package/features/assumePermissions/assumePermissionsHeader.js.map +1 -0
- package/features/assumePermissions/feature.d.ts +4 -0
- package/features/assumePermissions/feature.js +32 -0
- package/features/assumePermissions/feature.js.map +1 -0
- package/features/assumePermissions/index.d.ts +4 -0
- package/features/assumePermissions/index.js +2 -0
- package/features/banners/Banners.d.ts +15 -0
- package/features/banners/Banners.js +39 -0
- package/features/banners/Banners.js.map +1 -0
- package/features/banners/abstractions.d.ts +34 -0
- package/features/banners/abstractions.js +5 -0
- package/features/banners/abstractions.js.map +1 -0
- package/features/banners/feature.d.ts +3 -0
- package/features/banners/feature.js +17 -0
- package/features/banners/feature.js.map +1 -0
- package/features/banners/index.d.ts +2 -0
- package/features/banners/index.js +2 -0
- package/features/dateFormatter/formatUtcOffset.d.ts +1 -0
- package/features/dateFormatter/formatUtcOffset.js +11 -0
- package/features/dateFormatter/formatUtcOffset.js.map +1 -0
- package/features/debugger/DebugSessionsRepository.d.ts +35 -0
- package/features/debugger/DebugSessionsRepository.js +57 -0
- package/features/debugger/DebugSessionsRepository.js.map +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.d.ts +17 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.js +21 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.js.map +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.d.ts +1 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.js +112 -0
- package/features/debugger/GraphQLExtensionsDebugHandler.test.js.map +1 -0
- package/features/debugger/abstractions.d.ts +50 -0
- package/features/debugger/abstractions.js +5 -0
- package/features/debugger/abstractions.js.map +1 -0
- package/features/debugger/constants.d.ts +1 -0
- package/features/debugger/constants.js +4 -0
- package/features/debugger/constants.js.map +1 -0
- package/features/debugger/feature.d.ts +3 -0
- package/features/debugger/feature.js +19 -0
- package/features/debugger/feature.js.map +1 -0
- package/features/debugger/index.d.ts +3 -0
- package/features/debugger/index.js +3 -0
- package/features/formModel/AccessControlRuleEvaluator.d.ts +12 -0
- package/features/formModel/AccessControlRuleEvaluator.js +30 -0
- package/features/formModel/AccessControlRuleEvaluator.js.map +1 -0
- package/features/formModel/AccessControlRuleEvaluator.test.d.ts +1 -0
- package/features/formModel/AccessControlRuleEvaluator.test.js +219 -0
- package/features/formModel/AccessControlRuleEvaluator.test.js.map +1 -0
- package/features/formModel/ConditionRuleEvaluator.js +34 -4
- package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
- package/features/formModel/Field.d.ts +14 -1
- package/features/formModel/Field.js +41 -5
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.d.ts +3 -3
- package/features/formModel/FieldBuilder.js +2 -1
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FieldBuilder.test.js +158 -1
- package/features/formModel/FieldBuilder.test.js.map +1 -1
- package/features/formModel/FocusManager.js +10 -3
- package/features/formModel/FocusManager.js.map +1 -1
- package/features/formModel/FormErrors.js +1 -1
- package/features/formModel/FormErrors.js.map +1 -1
- package/features/formModel/FormModel.d.ts +2 -0
- package/features/formModel/FormModel.js +32 -9
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +835 -4
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/ObjectField.d.ts +12 -1
- package/features/formModel/ObjectField.js +70 -20
- package/features/formModel/ObjectField.js.map +1 -1
- package/features/formModel/Rules.test.js +224 -16
- package/features/formModel/Rules.test.js.map +1 -1
- package/features/formModel/abstractions.d.ts +56 -4
- package/features/formModel/abstractions.js +2 -1
- package/features/formModel/abstractions.js.map +1 -1
- package/features/formModel/createFieldRenderer.d.ts +42 -0
- package/features/formModel/createFieldRenderer.js +33 -10
- package/features/formModel/createFieldRenderer.js.map +1 -1
- package/features/formModel/feature.js +2 -0
- package/features/formModel/feature.js.map +1 -1
- package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +67 -4
- package/features/formModel/fieldTypes/DateTimeFieldType.js +88 -22
- package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/ObjectFieldType.d.ts +3 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js +23 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/dateLimits.d.ts +37 -0
- package/features/formModel/fieldTypes/dateLimits.js +64 -0
- package/features/formModel/fieldTypes/dateLimits.js.map +1 -0
- package/features/formModel/fieldTypes/dateLimits.test.d.ts +1 -0
- package/features/formModel/fieldTypes/dateLimits.test.js +60 -0
- package/features/formModel/fieldTypes/dateLimits.test.js.map +1 -0
- package/features/formModel/hasSubtreeFocusRequest.d.ts +12 -0
- package/features/formModel/hasSubtreeFocusRequest.js +15 -0
- package/features/formModel/hasSubtreeFocusRequest.js.map +1 -0
- package/features/formModel/index.d.ts +3 -2
- package/features/formModel/index.js +2 -1
- package/features/formModel/jsonSchema/JsonSchema.d.ts +18 -0
- package/features/formModel/jsonSchema/JsonSchema.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaFieldOptions.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaFieldOptions.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaIssue.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaIssue.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaValidationResult.d.ts +5 -0
- package/features/formModel/jsonSchema/JsonSchemaValidationResult.js +0 -0
- package/features/formModel/jsonSchema/JsonSchemaValidator.d.ts +4 -0
- package/features/formModel/jsonSchema/JsonSchemaValidator.js +0 -0
- package/features/formModel/jsonSchema/PlainObject.d.ts +1 -0
- package/features/formModel/jsonSchema/PlainObject.js +0 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.d.ts +5 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js +154 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js.map +1 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.d.ts +1 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js +643 -0
- package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js.map +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.d.ts +3 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.js +40 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.js.map +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.d.ts +1 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js +141 -0
- package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js.map +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.d.ts +3 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js +52 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js.map +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.d.ts +1 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js +250 -0
- package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js.map +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.d.ts +3 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.js +31 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.js.map +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.d.ts +1 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.js +123 -0
- package/features/formModel/jsonSchema/getJsonSchemaKind.test.js.map +1 -0
- package/features/formModel/jsonSchema/isPlainObject.d.ts +2 -0
- package/features/formModel/jsonSchema/isPlainObject.js +4 -0
- package/features/formModel/jsonSchema/isPlainObject.js.map +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.d.ts +3 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js +30 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js.map +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.d.ts +1 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js +207 -0
- package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js.map +1 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.d.ts +2 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.js +10 -0
- package/features/formModel/jsonSchema/normalizeJsonSchema.js.map +1 -0
- package/features/formModel/renderers.d.ts +1 -0
- package/features/formModel/renderers.js +1 -0
- package/features/notifications/Notifications.d.ts +1 -0
- package/features/notifications/Notifications.js +3 -0
- package/features/notifications/Notifications.js.map +1 -1
- package/features/notifications/Notifications.test.d.ts +1 -0
- package/features/notifications/Notifications.test.js +106 -0
- package/features/notifications/Notifications.test.js.map +1 -0
- package/features/notifications/NotificationsRenderer.d.ts +2 -1
- package/features/notifications/NotificationsRenderer.js +23 -4
- package/features/notifications/NotificationsRenderer.js.map +1 -1
- package/features/notifications/NotificationsRenderer.test.d.ts +1 -0
- package/features/notifications/NotificationsRenderer.test.js +261 -0
- package/features/notifications/NotificationsRenderer.test.js.map +1 -0
- package/features/notifications/abstractions.d.ts +13 -2
- package/features/notifications/abstractions.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.d.ts +0 -1
- package/features/security/LogIn/LogInUseCase.js +2 -5
- package/features/security/LogIn/LogInUseCase.js.map +1 -1
- package/features/security/LogIn/hasAppPermissions.d.ts +2 -0
- package/features/security/LogIn/hasAppPermissions.js +8 -0
- package/features/security/LogIn/hasAppPermissions.js.map +1 -0
- package/features/wcp/ReactLicense.d.ts +6 -1
- package/features/wcp/ReactLicense.js +17 -2
- package/features/wcp/ReactLicense.js.map +1 -1
- package/features/wcp/WcpGateway.js +4 -0
- package/features/wcp/WcpGateway.js.map +1 -1
- package/hooks/useHotkeys.js +6 -4
- package/hooks/useHotkeys.js.map +1 -1
- package/index.d.ts +27 -3
- package/index.js +23 -6
- package/modules/AccessManagementExtension.js +3 -1
- package/modules/AccessManagementExtension.js.map +1 -1
- package/modules/DebuggerExtension.d.ts +2 -0
- package/modules/DebuggerExtension.js +55 -0
- package/modules/DebuggerExtension.js.map +1 -0
- package/package.json +41 -41
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +1 -2
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
- package/presentation/accessManagement/roles/RolesPresenter.js +1 -2
- package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
- package/presentation/accessManagement/roles/components/RolesDataList.d.ts +10 -0
- package/presentation/accessManagement/roles/components/RolesDataList.js +146 -0
- package/presentation/accessManagement/roles/components/RolesDataList.js.map +1 -0
- package/presentation/accessManagement/roles/components/RolesForm.d.ts +13 -0
- package/presentation/accessManagement/roles/components/RolesForm.js +114 -0
- package/presentation/accessManagement/roles/components/RolesForm.js.map +1 -0
- package/presentation/accessManagement/roles/components/RolesView.js +6 -216
- package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
- package/presentation/accessManagement/teams/TeamsPresenter.js +1 -2
- package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
- package/presentation/accessManagement/teams/components/TeamsDataList.d.ts +10 -0
- package/presentation/accessManagement/teams/components/TeamsDataList.js +146 -0
- package/presentation/accessManagement/teams/components/TeamsDataList.js.map +1 -0
- package/presentation/accessManagement/teams/components/TeamsForm.d.ts +13 -0
- package/presentation/accessManagement/teams/components/TeamsForm.js +96 -0
- package/presentation/accessManagement/teams/components/TeamsForm.js.map +1 -0
- package/presentation/accessManagement/teams/components/TeamsView.js +6 -198
- package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
- package/presentation/adminUsers/AdminUsers.d.ts +10 -0
- package/presentation/adminUsers/AdminUsers.js +77 -0
- package/presentation/adminUsers/AdminUsers.js.map +1 -0
- package/presentation/adminUsers/SecurityPermission.d.ts +2 -0
- package/presentation/adminUsers/SecurityPermission.js +15 -0
- package/presentation/adminUsers/SecurityPermission.js.map +1 -0
- package/presentation/adminUsers/UserItem.d.ts +10 -0
- package/presentation/adminUsers/UserItem.js +0 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.d.ts +3 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.js +31 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImage.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.d.ts +10 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js +53 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.d.ts +7 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js +28 -0
- package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js.map +1 -0
- package/presentation/adminUsers/components/AvatarImage/index.d.ts +1 -0
- package/presentation/adminUsers/components/AvatarImage/index.js +1 -0
- package/presentation/adminUsers/routes.d.ts +10 -0
- package/presentation/adminUsers/routes.js +20 -0
- package/presentation/adminUsers/routes.js.map +1 -0
- package/presentation/adminUsers/userMenu/AccountDetails.d.ts +6 -0
- package/presentation/adminUsers/userMenu/AccountDetails.js +20 -0
- package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.d.ts +1 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.js +9 -0
- package/presentation/adminUsers/userMenu/useIsDefaultTenant.js.map +1 -0
- package/presentation/adminUsers/views/Account/Account.d.ts +2 -0
- package/presentation/adminUsers/views/Account/Account.js +137 -0
- package/presentation/adminUsers/views/Account/Account.js.map +1 -0
- package/presentation/adminUsers/views/Account/index.d.ts +1 -0
- package/presentation/adminUsers/views/Account/index.js +1 -0
- package/presentation/adminUsers/views/Users/UsersDataList.d.ts +3 -0
- package/presentation/adminUsers/views/Users/UsersDataList.js +180 -0
- package/presentation/adminUsers/views/Users/UsersDataList.js.map +1 -0
- package/presentation/adminUsers/views/Users/UsersForm.d.ts +5 -0
- package/presentation/adminUsers/views/Users/UsersForm.js +175 -0
- package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -0
- package/presentation/adminUsers/views/Users/UsersView.d.ts +2 -0
- package/presentation/adminUsers/views/Users/UsersView.js +15 -0
- package/presentation/adminUsers/views/Users/UsersView.js.map +1 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.d.ts +7 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.js +29 -0
- package/presentation/adminUsers/views/Users/components/DeleteAction.js.map +1 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +27 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js +101 -0
- package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -0
- package/presentation/adminUsers/views/Users/search.js +21 -0
- package/presentation/adminUsers/views/Users/search.js.map +1 -0
- package/presentation/adminUsers/views/Users/search.svg +20 -0
- package/presentation/adminUsers/views/utils.d.ts +3 -0
- package/presentation/adminUsers/views/utils.js +12 -0
- package/presentation/adminUsers/views/utils.js.map +1 -0
- package/presentation/aiChats/AiChatsPanelPresenter.d.ts +28 -0
- package/presentation/aiChats/AiChatsPanelPresenter.js +132 -0
- package/presentation/aiChats/AiChatsPanelPresenter.js.map +1 -0
- package/presentation/aiChats/abstractions.d.ts +69 -0
- package/presentation/aiChats/abstractions.js +5 -0
- package/presentation/aiChats/abstractions.js.map +1 -0
- package/presentation/aiChats/feature.d.ts +3 -0
- package/presentation/aiChats/feature.js +17 -0
- package/presentation/aiChats/feature.js.map +1 -0
- package/presentation/aiChats/index.d.ts +2 -0
- package/presentation/aiChats/index.js +2 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.d.ts +36 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.js +153 -0
- package/presentation/assumePermissions/AssumePermissionsPresenter.js.map +1 -0
- package/presentation/assumePermissions/abstractions.d.ts +30 -0
- package/presentation/assumePermissions/abstractions.js +5 -0
- package/presentation/assumePermissions/abstractions.js.map +1 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.d.ts +14 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.js +42 -0
- package/presentation/assumePermissions/components/AssumePermissionsButton.js.map +1 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.d.ts +11 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.js +25 -0
- package/presentation/assumePermissions/components/AssumedPermissionsBanner.js.map +1 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.d.ts +2 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.js +68 -0
- package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -0
- package/presentation/assumePermissions/feature.d.ts +3 -0
- package/presentation/assumePermissions/feature.js +17 -0
- package/presentation/assumePermissions/feature.js.map +1 -0
- package/presentation/assumePermissions/index.d.ts +4 -0
- package/presentation/assumePermissions/index.js +4 -0
- package/presentation/banners/BannersPresenter.d.ts +14 -0
- package/presentation/banners/BannersPresenter.js +60 -0
- package/presentation/banners/BannersPresenter.js.map +1 -0
- package/presentation/banners/abstractions.d.ts +24 -0
- package/presentation/banners/abstractions.js +5 -0
- package/presentation/banners/abstractions.js.map +1 -0
- package/presentation/banners/components/Banner.d.ts +10 -0
- package/presentation/banners/components/Banner.js +32 -0
- package/presentation/banners/components/Banner.js.map +1 -0
- package/presentation/banners/components/BannerBar.d.ts +11 -0
- package/presentation/banners/components/BannerBar.js +51 -0
- package/presentation/banners/components/BannerBar.js.map +1 -0
- package/presentation/banners/feature.d.ts +3 -0
- package/presentation/banners/feature.js +17 -0
- package/presentation/banners/feature.js.map +1 -0
- package/presentation/banners/index.d.ts +6 -0
- package/presentation/banners/index.js +4 -0
- package/presentation/banners/useBanner.d.ts +10 -0
- package/presentation/banners/useBanner.js +15 -0
- package/presentation/banners/useBanner.js.map +1 -0
- package/presentation/commandPalette/CommandPalettePresenter.js +3 -1
- package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -1
- package/presentation/commandPalette/abstractions.d.ts +5 -0
- package/presentation/commandPalette/abstractions.js.map +1 -1
- package/presentation/commandPalette/commands/AiChatsCommand.d.ts +24 -0
- package/presentation/commandPalette/commands/AiChatsCommand.js +41 -0
- package/presentation/commandPalette/commands/AiChatsCommand.js.map +1 -0
- package/presentation/commandPalette/commands/AskAiCommand.d.ts +1 -0
- package/presentation/commandPalette/commands/AskAiCommand.js +3 -2
- package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -1
- package/presentation/commandPalette/commands/feature.js +2 -0
- package/presentation/commandPalette/commands/feature.js.map +1 -1
- package/presentation/createReactiveComponent.d.ts +1 -0
- package/presentation/createReactiveComponent.js +1 -0
- package/presentation/debugger/DebuggerPresenter.d.ts +14 -0
- package/presentation/debugger/DebuggerPresenter.js +45 -0
- package/presentation/debugger/DebuggerPresenter.js.map +1 -0
- package/presentation/debugger/abstractions.d.ts +17 -0
- package/presentation/debugger/abstractions.js +5 -0
- package/presentation/debugger/abstractions.js.map +1 -0
- package/presentation/debugger/components/DebuggerIndicator.d.ts +2 -0
- package/presentation/debugger/components/DebuggerIndicator.js +45 -0
- package/presentation/debugger/components/DebuggerIndicator.js.map +1 -0
- package/presentation/debugger/components/DebuggerView.d.ts +4 -0
- package/presentation/debugger/components/DebuggerView.js +44 -0
- package/presentation/debugger/components/DebuggerView.js.map +1 -0
- package/presentation/debugger/downloadJson.d.ts +7 -0
- package/presentation/debugger/downloadJson.js +17 -0
- package/presentation/debugger/downloadJson.js.map +1 -0
- package/presentation/debugger/feature.d.ts +3 -0
- package/presentation/debugger/feature.js +17 -0
- package/presentation/debugger/feature.js.map +1 -0
- package/presentation/debugger/routes.d.ts +4 -0
- package/presentation/debugger/routes.js +10 -0
- package/presentation/debugger/routes.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +4 -3
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/listPresenter/FolderAwareDataSource.d.ts +5 -0
- package/presentation/listPresenter/FolderAwareDataSource.js +4 -3
- package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.d.ts +28 -5
- package/presentation/listPresenter/QueryMatcher.js +72 -2
- package/presentation/listPresenter/QueryMatcher.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.test.d.ts +1 -0
- package/presentation/listPresenter/QueryMatcher.test.js +345 -0
- package/presentation/listPresenter/QueryMatcher.test.js.map +1 -0
- package/presentation/trashBin/TrashBinPresenter.js +3 -1
- package/presentation/trashBin/TrashBinPresenter.js.map +1 -1
- package/presentation/trashBin/TrashBinPresenter.test.d.ts +1 -0
- package/presentation/trashBin/TrashBinPresenter.test.js +91 -0
- package/presentation/trashBin/TrashBinPresenter.test.js.map +1 -0
- package/presentation/trashBin/abstractions.d.ts +1 -1
- package/presentation/trashBin/abstractions.js.map +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.js +5 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -1
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.d.ts +1 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +100 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +2 -1
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -1
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.d.ts +1 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js +67 -0
- package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js.map +1 -0
- package/static/svg/search.43fa797c.svg +20 -0
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +0 -68
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +0 -1
- package/features/aiChat/AiChatGateway.js.map +0 -1
- package/features/aiChat/AiChatPresenter.d.ts +0 -32
- package/features/aiChat/AiChatPresenter.js +0 -220
- package/features/aiChat/AiChatPresenter.js.map +0 -1
- package/features/aiChat/abstractions.d.ts +0 -124
- package/features/aiChat/abstractions.js +0 -6
- package/features/aiChat/abstractions.js.map +0 -1
- package/features/aiChat/feature.d.ts +0 -3
- package/features/aiChat/feature.js +0 -19
- package/features/aiChat/feature.js.map +0 -1
- package/features/aiChat/index.d.ts +0 -6
- package/features/aiChat/index.js +0 -3
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +0 -8
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +0 -17
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +0 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +0 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +0 -16
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/notifications/Notifications.test.js","sources":["../../../src/features/notifications/Notifications.test.ts"],"sourcesContent":["import { beforeEach } from \"vitest\";\nimport { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { Container } from \"@webiny/di\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport { Notifications } from \"./abstractions.js\";\n\nconst createNotifications = (): Notifications.Interface => {\n const container = new Container();\n NotificationsFeature.register(container);\n return container.resolve(Notifications);\n};\n\ndescribe(\"Notifications\", () => {\n let notifications: Notifications.Interface;\n\n beforeEach(() => {\n notifications = createNotifications();\n });\n\n it(\"queues a plain notification with exactly its own fields\", () => {\n notifications.notify({ title: \"Saved\", description: \"All good.\" });\n\n expect(notifications.getNotifications()).toEqual([\n { id: \"notification-1\", variant: \"default\", title: \"Saved\", description: \"All good.\" }\n ]);\n });\n\n it(\"queues success and warning notifications with their variant\", () => {\n notifications.success({ title: \"Done\" });\n notifications.warning({ title: \"Careful\" });\n\n const queued = notifications.getNotifications();\n expect(queued.map(item => item.variant)).toEqual([\"success\", \"warning\"]);\n expect(queued.map(item => item.id)).toEqual([\"notification-1\", \"notification-2\"]);\n });\n\n it(\"queues an error notification with the error variant\", () => {\n notifications.error({ title: \"Failed\", description: \"Try again.\" });\n\n expect(notifications.getNotifications()).toEqual([\n { id: \"notification-1\", variant: \"error\", title: \"Failed\", description: \"Try again.\" }\n ]);\n });\n\n it(\"keeps link, duration, position and dismissible on the queued notification\", () => {\n notifications.success({\n title: \"Requested\",\n description: \"Spring launch\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" },\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n });\n\n expect(notifications.getNotifications()).toEqual([\n {\n id: \"notification-1\",\n variant: \"success\",\n title: \"Requested\",\n description: \"Spring launch\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" },\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n }\n ]);\n });\n\n it(\"removes a notification by id and leaves the others\", () => {\n notifications.notify({ title: \"One\" });\n notifications.error({ title: \"Two\" });\n notifications.warning({ title: \"Three\" });\n\n notifications.remove(\"notification-2\");\n\n expect(notifications.getNotifications().map(item => item.title)).toEqual([\"One\", \"Three\"]);\n });\n});\n"],"names":["createNotifications","container","Container","NotificationsFeature","Notifications","describe","notifications","beforeEach","it","expect","queued","item"],"mappings":";;;;AAQA,MAAMA,sBAAsB;IACxB,MAAMC,YAAY,IAAIC;IACtBC,qBAAqB,QAAQ,CAACF;IAC9B,OAA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sD;QACrDF,cAAc,MAAM,CAAC;YAAE,OAAO;QAAM;QACpCA,cAAc,KAAK,CAAC;YAAE,OAAO;QAAM;QACnCA,cAAc,OAAO,CAAC;YAAE,OAAO;QAAQ;QAEvCA,cAAc,MAAM,CAAC;QAErBG,OAAOH,cAAc,gBAAgB,GAAG,GAAG,CAACK,CAAAA,OAAQA,KAAK,KAAK,GAAG,OAAO,CAAC;YAAC;YAAO;SAAQ;IAC7F;AACJ"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* Standalone consumer of the Notifications queue. Drains queued notifications oldest-first
|
|
3
4
|
* and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.
|
|
4
5
|
*/
|
|
5
|
-
export declare const NotificationsRenderer: (() => null) &
|
|
6
|
+
export declare const NotificationsRenderer: (() => null) & React.NamedExoticComponent<unknown> & {
|
|
6
7
|
readonly type: () => null;
|
|
7
8
|
};
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
-
import { useEffect } from "react";
|
|
1
|
+
import react, { useEffect } from "react";
|
|
2
2
|
import { observer } from "mobx-react-lite";
|
|
3
|
-
import { useFeature } from "@webiny/app";
|
|
4
|
-
import { useToast } from "@webiny/admin-ui";
|
|
3
|
+
import { SimpleLink, useFeature } from "@webiny/app";
|
|
4
|
+
import { Icon, useToast } from "@webiny/admin-ui";
|
|
5
|
+
import { ReactComponent } from "@webiny/icons/error.svg";
|
|
5
6
|
import { NotificationsFeature } from "./feature.js";
|
|
6
|
-
const
|
|
7
|
+
const getToastParams = (notification)=>{
|
|
7
8
|
const params = {
|
|
8
9
|
title: notification.title,
|
|
9
10
|
description: notification.description
|
|
10
11
|
};
|
|
12
|
+
if (void 0 !== notification.duration) params.duration = notification.duration;
|
|
13
|
+
if (void 0 !== notification.position) params.position = notification.position;
|
|
14
|
+
if (void 0 !== notification.dismissible) params.dismissible = notification.dismissible;
|
|
15
|
+
if (notification.link) params.actions = /*#__PURE__*/ react.createElement(SimpleLink, {
|
|
16
|
+
to: notification.link.url
|
|
17
|
+
}, notification.link.label);
|
|
18
|
+
return params;
|
|
19
|
+
};
|
|
20
|
+
const showNotification = (toast, notification)=>{
|
|
21
|
+
const params = getToastParams(notification);
|
|
11
22
|
switch(notification.variant){
|
|
12
23
|
case "success":
|
|
13
24
|
toast.showSuccessToast(params);
|
|
@@ -15,6 +26,14 @@ const showNotification = (toast, notification)=>{
|
|
|
15
26
|
case "warning":
|
|
16
27
|
toast.showWarningToast(params);
|
|
17
28
|
break;
|
|
29
|
+
case "error":
|
|
30
|
+
params.icon = /*#__PURE__*/ react.createElement(Icon, {
|
|
31
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
32
|
+
label: "",
|
|
33
|
+
className: "fill-destructive"
|
|
34
|
+
});
|
|
35
|
+
toast.showToast(params);
|
|
36
|
+
break;
|
|
18
37
|
default:
|
|
19
38
|
toast.showToast(params);
|
|
20
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/notifications/NotificationsRenderer.js","sources":["../../../src/features/notifications/NotificationsRenderer.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useFeature } from \"@webiny/app\";\nimport { useToast } from \"@webiny/admin-ui\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ntype Toast = ReturnType<typeof useToast>;\n\nconst
|
|
1
|
+
{"version":3,"file":"features/notifications/NotificationsRenderer.js","sources":["../../../src/features/notifications/NotificationsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { SimpleLink } from \"@webiny/app\";\nimport { useFeature } from \"@webiny/app\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { useToast } from \"@webiny/admin-ui\";\nimport type { ShowToastParams } from \"@webiny/admin-ui\";\nimport { ReactComponent as ErrorIcon } from \"@webiny/icons/error.svg\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ntype Toast = ReturnType<typeof useToast>;\n\nconst getToastParams = (notification: INotification): ShowToastParams => {\n const params: ShowToastParams = {\n title: notification.title,\n description: notification.description\n };\n\n if (notification.duration !== undefined) {\n params.duration = notification.duration;\n }\n\n if (notification.position !== undefined) {\n params.position = notification.position;\n }\n\n if (notification.dismissible !== undefined) {\n params.dismissible = notification.dismissible;\n }\n\n if (notification.link) {\n params.actions = (\n <SimpleLink to={notification.link.url}>{notification.link.label}</SimpleLink>\n );\n }\n\n return params;\n};\n\nconst showNotification = (toast: Toast, notification: INotification) => {\n const params = getToastParams(notification);\n\n switch (notification.variant) {\n case \"success\":\n toast.showSuccessToast(params);\n break;\n case \"warning\":\n toast.showWarningToast(params);\n break;\n case \"error\":\n params.icon = <Icon icon={<ErrorIcon />} label={\"\"} className={\"fill-destructive\"} />;\n toast.showToast(params);\n break;\n default:\n toast.showToast(params);\n }\n};\n\n/**\n * Standalone consumer of the Notifications queue. Drains queued notifications oldest-first\n * and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.\n */\nexport const NotificationsRenderer = observer(() => {\n const { presenter } = useFeature(NotificationsFeature);\n const toast = useToast();\n\n const ids = presenter.vm.notifications.map(notification => notification.id).join(\"|\");\n\n useEffect(() => {\n presenter.vm.notifications.forEach(notification => {\n showNotification(toast, notification);\n presenter.markShown(notification.id);\n });\n // `ids` captures queue changes; `toast`/`presenter` are stable singletons.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ids]);\n\n return null;\n});\n"],"names":["getToastParams","notification","params","undefined","SimpleLink","showNotification","toast","Icon","ErrorIcon","NotificationsRenderer","observer","presenter","useFeature","NotificationsFeature","useToast","ids","useEffect"],"mappings":";;;;;;AAcA,MAAMA,iBAAiB,CAACC;IACpB,MAAMC,SAA0B;QAC5B,OAAOD,aAAa,KAAK;QACzB,aAAaA,aAAa,WAAW;IACzC;IAEA,IAA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@
|
|
|
1
|
+
import react_0 from "react";
|
|
2
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
3
|
+
import { cleanup, render, screen } from "@testing-library/react";
|
|
4
|
+
import { NotificationsRenderer } from "./NotificationsRenderer.js";
|
|
5
|
+
const mocks = vi.hoisted(()=>({
|
|
6
|
+
toast: {
|
|
7
|
+
showToast: vi.fn(),
|
|
8
|
+
showSuccessToast: vi.fn(),
|
|
9
|
+
showWarningToast: vi.fn()
|
|
10
|
+
},
|
|
11
|
+
presenter: {
|
|
12
|
+
vm: {
|
|
13
|
+
notifications: []
|
|
14
|
+
},
|
|
15
|
+
markShown: vi.fn()
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
18
|
+
vi.mock("@webiny/admin-ui", async ()=>{
|
|
19
|
+
const react = await import("react");
|
|
20
|
+
return {
|
|
21
|
+
useToast: ()=>mocks.toast,
|
|
22
|
+
Icon: (props)=>react.createElement("span", {
|
|
23
|
+
"data-testid": "toast-icon",
|
|
24
|
+
className: props.className
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
vi.mock("@webiny/app", async ()=>{
|
|
29
|
+
const react = await import("react");
|
|
30
|
+
return {
|
|
31
|
+
useFeature: ()=>({
|
|
32
|
+
presenter: mocks.presenter
|
|
33
|
+
}),
|
|
34
|
+
SimpleLink: (props)=>react.createElement("a", {
|
|
35
|
+
href: props.to
|
|
36
|
+
}, props.children)
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
vi.mock("@webiny/icons/error.svg", ()=>({
|
|
40
|
+
ReactComponent: ()=>null
|
|
41
|
+
}));
|
|
42
|
+
vi.mock("./feature.js", ()=>({
|
|
43
|
+
NotificationsFeature: {}
|
|
44
|
+
}));
|
|
45
|
+
const notificationOf = (overrides)=>({
|
|
46
|
+
id: "notification-1",
|
|
47
|
+
variant: "default",
|
|
48
|
+
title: "Title",
|
|
49
|
+
...overrides
|
|
50
|
+
});
|
|
51
|
+
const renderQueue = (notifications)=>{
|
|
52
|
+
mocks.presenter.vm = {
|
|
53
|
+
notifications
|
|
54
|
+
};
|
|
55
|
+
render(/*#__PURE__*/ react_0.createElement(NotificationsRenderer, null));
|
|
56
|
+
};
|
|
57
|
+
describe("NotificationsRenderer", ()=>{
|
|
58
|
+
beforeEach(()=>{
|
|
59
|
+
mocks.toast.showToast.mockReset();
|
|
60
|
+
mocks.toast.showSuccessToast.mockReset();
|
|
61
|
+
mocks.toast.showWarningToast.mockReset();
|
|
62
|
+
mocks.presenter.markShown.mockReset();
|
|
63
|
+
});
|
|
64
|
+
afterEach(()=>{
|
|
65
|
+
cleanup();
|
|
66
|
+
});
|
|
67
|
+
describe("a notification without the new fields keeps today's call", ()=>{
|
|
68
|
+
it("default calls showToast with title and description only", ()=>{
|
|
69
|
+
renderQueue([
|
|
70
|
+
notificationOf({
|
|
71
|
+
description: "Body"
|
|
72
|
+
})
|
|
73
|
+
]);
|
|
74
|
+
expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);
|
|
75
|
+
expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
|
|
76
|
+
title: "Title",
|
|
77
|
+
description: "Body"
|
|
78
|
+
});
|
|
79
|
+
expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();
|
|
80
|
+
expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();
|
|
81
|
+
expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
|
|
82
|
+
expect(mocks.presenter.markShown).toHaveBeenCalledWith("notification-1");
|
|
83
|
+
});
|
|
84
|
+
it("default without a description keeps the description key undefined", ()=>{
|
|
85
|
+
renderQueue([
|
|
86
|
+
notificationOf({})
|
|
87
|
+
]);
|
|
88
|
+
expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
|
|
89
|
+
title: "Title",
|
|
90
|
+
description: void 0
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
it("success calls showSuccessToast with title and description only", ()=>{
|
|
94
|
+
renderQueue([
|
|
95
|
+
notificationOf({
|
|
96
|
+
variant: "success",
|
|
97
|
+
description: "Body"
|
|
98
|
+
})
|
|
99
|
+
]);
|
|
100
|
+
expect(mocks.toast.showSuccessToast).toHaveBeenCalledTimes(1);
|
|
101
|
+
expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({
|
|
102
|
+
title: "Title",
|
|
103
|
+
description: "Body"
|
|
104
|
+
});
|
|
105
|
+
expect(mocks.toast.showToast).not.toHaveBeenCalled();
|
|
106
|
+
expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
|
|
107
|
+
});
|
|
108
|
+
it("warning calls showWarningToast with title and description only", ()=>{
|
|
109
|
+
renderQueue([
|
|
110
|
+
notificationOf({
|
|
111
|
+
variant: "warning",
|
|
112
|
+
description: "Body"
|
|
113
|
+
})
|
|
114
|
+
]);
|
|
115
|
+
expect(mocks.toast.showWarningToast).toHaveBeenCalledTimes(1);
|
|
116
|
+
expect(mocks.toast.showWarningToast.mock.calls[0][0]).toStrictEqual({
|
|
117
|
+
title: "Title",
|
|
118
|
+
description: "Body"
|
|
119
|
+
});
|
|
120
|
+
expect(mocks.toast.showToast).not.toHaveBeenCalled();
|
|
121
|
+
expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
describe("a notification with the new fields", ()=>{
|
|
125
|
+
it("passes duration, position and dismissible through", ()=>{
|
|
126
|
+
renderQueue([
|
|
127
|
+
notificationOf({
|
|
128
|
+
variant: "success",
|
|
129
|
+
description: "Body",
|
|
130
|
+
duration: 8000,
|
|
131
|
+
position: "bottom-right",
|
|
132
|
+
dismissible: true
|
|
133
|
+
})
|
|
134
|
+
]);
|
|
135
|
+
expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({
|
|
136
|
+
title: "Title",
|
|
137
|
+
description: "Body",
|
|
138
|
+
duration: 8000,
|
|
139
|
+
position: "bottom-right",
|
|
140
|
+
dismissible: true
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
it("forwards an explicit dismissible false and a zero duration", ()=>{
|
|
144
|
+
renderQueue([
|
|
145
|
+
notificationOf({
|
|
146
|
+
dismissible: false,
|
|
147
|
+
duration: 0
|
|
148
|
+
})
|
|
149
|
+
]);
|
|
150
|
+
expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
|
|
151
|
+
title: "Title",
|
|
152
|
+
description: void 0,
|
|
153
|
+
duration: 0,
|
|
154
|
+
dismissible: false
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
it("passes only the fields that are set", ()=>{
|
|
158
|
+
renderQueue([
|
|
159
|
+
notificationOf({
|
|
160
|
+
position: "top-center"
|
|
161
|
+
})
|
|
162
|
+
]);
|
|
163
|
+
expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
|
|
164
|
+
title: "Title",
|
|
165
|
+
description: void 0,
|
|
166
|
+
position: "top-center"
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
it("renders the link as an in-app link action", ()=>{
|
|
170
|
+
renderQueue([
|
|
171
|
+
notificationOf({
|
|
172
|
+
variant: "success",
|
|
173
|
+
link: {
|
|
174
|
+
label: "Open Content Reviews",
|
|
175
|
+
url: "/cms/content-reviews"
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
]);
|
|
179
|
+
const params = mocks.toast.showSuccessToast.mock.calls[0][0];
|
|
180
|
+
expect(/*#__PURE__*/ react_0.isValidElement(params.actions)).toBe(true);
|
|
181
|
+
render(/*#__PURE__*/ react_0.createElement("div", null, params.actions));
|
|
182
|
+
const link = screen.getByRole("link", {
|
|
183
|
+
name: "Open Content Reviews"
|
|
184
|
+
});
|
|
185
|
+
expect(link.getAttribute("href")).toBe("/cms/content-reviews");
|
|
186
|
+
});
|
|
187
|
+
it("adds no actions without a link", ()=>{
|
|
188
|
+
renderQueue([
|
|
189
|
+
notificationOf({
|
|
190
|
+
duration: 8000
|
|
191
|
+
})
|
|
192
|
+
]);
|
|
193
|
+
expect(mocks.toast.showToast.mock.calls[0][0]).not.toHaveProperty("actions");
|
|
194
|
+
});
|
|
195
|
+
it("error calls showToast with the destructive error icon and the other fields", ()=>{
|
|
196
|
+
renderQueue([
|
|
197
|
+
notificationOf({
|
|
198
|
+
variant: "error",
|
|
199
|
+
description: "Body",
|
|
200
|
+
duration: 8000,
|
|
201
|
+
position: "bottom-right",
|
|
202
|
+
dismissible: true
|
|
203
|
+
})
|
|
204
|
+
]);
|
|
205
|
+
expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);
|
|
206
|
+
expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();
|
|
207
|
+
expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();
|
|
208
|
+
const params = mocks.toast.showToast.mock.calls[0][0];
|
|
209
|
+
expect(params.title).toBe("Title");
|
|
210
|
+
expect(params.description).toBe("Body");
|
|
211
|
+
expect(params.duration).toBe(8000);
|
|
212
|
+
expect(params.position).toBe("bottom-right");
|
|
213
|
+
expect(params.dismissible).toBe(true);
|
|
214
|
+
expect(/*#__PURE__*/ react_0.isValidElement(params.icon)).toBe(true);
|
|
215
|
+
expect(params.icon.props.className).toBe("fill-destructive");
|
|
216
|
+
});
|
|
217
|
+
it("error without the new fields still shows through showToast with the icon", ()=>{
|
|
218
|
+
renderQueue([
|
|
219
|
+
notificationOf({
|
|
220
|
+
variant: "error"
|
|
221
|
+
})
|
|
222
|
+
]);
|
|
223
|
+
const params = mocks.toast.showToast.mock.calls[0][0];
|
|
224
|
+
expect(Object.keys(params).sort()).toEqual([
|
|
225
|
+
"description",
|
|
226
|
+
"icon",
|
|
227
|
+
"title"
|
|
228
|
+
]);
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
it("shows every queued notification oldest first and marks each shown once", ()=>{
|
|
232
|
+
renderQueue([
|
|
233
|
+
notificationOf({
|
|
234
|
+
id: "notification-1",
|
|
235
|
+
title: "One"
|
|
236
|
+
}),
|
|
237
|
+
notificationOf({
|
|
238
|
+
id: "notification-2",
|
|
239
|
+
variant: "warning",
|
|
240
|
+
title: "Two"
|
|
241
|
+
}),
|
|
242
|
+
notificationOf({
|
|
243
|
+
id: "notification-3",
|
|
244
|
+
variant: "error",
|
|
245
|
+
title: "Three"
|
|
246
|
+
})
|
|
247
|
+
]);
|
|
248
|
+
expect(mocks.toast.showToast.mock.calls.map((call)=>call[0].title)).toEqual([
|
|
249
|
+
"One",
|
|
250
|
+
"Three"
|
|
251
|
+
]);
|
|
252
|
+
expect(mocks.toast.showWarningToast.mock.calls[0][0].title).toBe("Two");
|
|
253
|
+
expect(mocks.presenter.markShown.mock.calls.map((call)=>call[0])).toEqual([
|
|
254
|
+
"notification-1",
|
|
255
|
+
"notification-2",
|
|
256
|
+
"notification-3"
|
|
257
|
+
]);
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
//# sourceMappingURL=NotificationsRenderer.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/notifications/NotificationsRenderer.test.js","sources":["../../../src/features/notifications/NotificationsRenderer.test.tsx"],"sourcesContent":["import React from \"react\";\nimport { afterEach } from \"vitest\";\nimport type { Mock } from \"vitest\";\nimport { beforeEach } from \"vitest\";\nimport { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { vi } from \"vitest\";\nimport { cleanup } from \"@testing-library/react\";\nimport { render } from \"@testing-library/react\";\nimport { screen } from \"@testing-library/react\";\nimport { NotificationsRenderer } from \"./NotificationsRenderer.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ninterface RendererMocks {\n toast: {\n showToast: Mock;\n showSuccessToast: Mock;\n showWarningToast: Mock;\n };\n presenter: {\n vm: { notifications: INotification[] };\n markShown: Mock;\n };\n}\n\nconst mocks = vi.hoisted((): RendererMocks => {\n return {\n toast: {\n showToast: vi.fn(),\n showSuccessToast: vi.fn(),\n showWarningToast: vi.fn()\n },\n presenter: {\n vm: { notifications: [] },\n markShown: vi.fn()\n }\n };\n});\n\nvi.mock(\"@webiny/admin-ui\", async () => {\n const react = await import(\"react\");\n return {\n useToast: () => mocks.toast,\n Icon: (props: { className?: string }) => {\n return react.createElement(\"span\", {\n \"data-testid\": \"toast-icon\",\n className: props.className\n });\n }\n };\n});\n\nvi.mock(\"@webiny/app\", async () => {\n const react = await import(\"react\");\n return {\n useFeature: () => ({ presenter: mocks.presenter }),\n SimpleLink: (props: { to: string; children?: React.ReactNode }) => {\n return react.createElement(\"a\", { href: props.to }, props.children);\n }\n };\n});\n\nvi.mock(\"@webiny/icons/error.svg\", () => {\n return { ReactComponent: () => null };\n});\n\nvi.mock(\"./feature.js\", () => {\n return { NotificationsFeature: {} };\n});\n\nconst notificationOf = (overrides: Partial<INotification>): INotification => {\n return { id: \"notification-1\", variant: \"default\", title: \"Title\", ...overrides };\n};\n\nconst renderQueue = (notifications: INotification[]): void => {\n mocks.presenter.vm = { notifications };\n render(<NotificationsRenderer />);\n};\n\ndescribe(\"NotificationsRenderer\", () => {\n beforeEach(() => {\n mocks.toast.showToast.mockReset();\n mocks.toast.showSuccessToast.mockReset();\n mocks.toast.showWarningToast.mockReset();\n mocks.presenter.markShown.mockReset();\n });\n\n afterEach(() => {\n cleanup();\n });\n\n describe(\"a notification without the new fields keeps today's call\", () => {\n it(\"default calls showToast with title and description only\", () => {\n renderQueue([notificationOf({ description: \"Body\" })]);\n\n expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();\n expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n expect(mocks.presenter.markShown).toHaveBeenCalledWith(\"notification-1\");\n });\n\n it(\"default without a description keeps the description key undefined\", () => {\n renderQueue([notificationOf({})]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined\n });\n });\n\n it(\"success calls showSuccessToast with title and description only\", () => {\n renderQueue([notificationOf({ variant: \"success\", description: \"Body\" })]);\n\n expect(mocks.toast.showSuccessToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n });\n\n it(\"warning calls showWarningToast with title and description only\", () => {\n renderQueue([notificationOf({ variant: \"warning\", description: \"Body\" })]);\n\n expect(mocks.toast.showWarningToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showWarningToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n });\n });\n\n describe(\"a notification with the new fields\", () => {\n it(\"passes duration, position and dismissible through\", () => {\n renderQueue([\n notificationOf({\n variant: \"success\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n })\n ]);\n\n expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n });\n });\n\n it(\"forwards an explicit dismissible false and a zero duration\", () => {\n renderQueue([notificationOf({ dismissible: false, duration: 0 })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined,\n duration: 0,\n dismissible: false\n });\n });\n\n it(\"passes only the fields that are set\", () => {\n renderQueue([notificationOf({ position: \"top-center\" })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined,\n position: \"top-center\"\n });\n });\n\n it(\"renders the link as an in-app link action\", () => {\n renderQueue([\n notificationOf({\n variant: \"success\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" }\n })\n ]);\n\n const params = mocks.toast.showSuccessToast.mock.calls[0][0];\n expect(React.isValidElement(params.actions)).toBe(true);\n\n render(<div>{params.actions}</div>);\n\n const link = screen.getByRole(\"link\", { name: \"Open Content Reviews\" });\n expect(link.getAttribute(\"href\")).toBe(\"/cms/content-reviews\");\n });\n\n it(\"adds no actions without a link\", () => {\n renderQueue([notificationOf({ duration: 8000 })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).not.toHaveProperty(\"actions\");\n });\n\n it(\"error calls showToast with the destructive error icon and the other fields\", () => {\n renderQueue([\n notificationOf({\n variant: \"error\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n })\n ]);\n\n expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();\n expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();\n\n const params = mocks.toast.showToast.mock.calls[0][0];\n expect(params.title).toBe(\"Title\");\n expect(params.description).toBe(\"Body\");\n expect(params.duration).toBe(8000);\n expect(params.position).toBe(\"bottom-right\");\n expect(params.dismissible).toBe(true);\n expect(React.isValidElement(params.icon)).toBe(true);\n expect(params.icon.props.className).toBe(\"fill-destructive\");\n });\n\n it(\"error without the new fields still shows through showToast with the icon\", () => {\n renderQueue([notificationOf({ variant: \"error\" })]);\n\n const params = mocks.toast.showToast.mock.calls[0][0];\n expect(Object.keys(params).sort()).toEqual([\"description\", \"icon\", \"title\"]);\n });\n });\n\n it(\"shows every queued notification oldest first and marks each shown once\", () => {\n renderQueue([\n notificationOf({ id: \"notification-1\", title: \"One\" }),\n notificationOf({ id: \"notification-2\", variant: \"warning\", title: \"Two\" }),\n notificationOf({ id: \"notification-3\", variant: \"error\", title: \"Three\" })\n ]);\n\n expect(mocks.toast.showToast.mock.calls.map(call => call[0].title)).toEqual([\n \"One\",\n \"Three\"\n ]);\n expect(mocks.toast.showWarningToast.mock.calls[0][0].title).toBe(\"Two\");\n expect(mocks.presenter.markShown.mock.calls.map(call => call[0])).toEqual([\n \"notification-1\",\n \"notification-2\",\n \"notification-3\"\n ]);\n });\n});\n"],"names":["mocks","vi","react","props","notificationOf","overrides","renderQueue","notifications","render","NotificationsRenderer","describe","beforeEach","afterEach","cleanup","it","expect","undefined","params","React","link","screen","Object","call"],"mappings":";;;;AA0BA,MAAMA,QAAQC,GAAG,OAAO,CAAC,IACd;QACH,OAAO;YACH,WAAWA,GAAG,EAAE;YAChB,kBAAkBA,GAAG,EAAE;YACvB,kBAAkBA,GAAG,EAAE;QAC3B;QACA,WAAW;YACP,IAAI;gBAAE,eAAe,EAAE;YAAC;YACxB,WAAWA,GAAG,EAAE;QACpB;IACJ;AAGJA,GAAG,IAAI,CAAC,oBAAoB;IACxB,MAAMC,QAAQ,MAAM,MAAM,CAAC;IAC3B,OAAO;QACH,UAAU,IAAMF,MAAM,KAAK;QAC3B,MAAM,CAACG,QACID,MAAM,aAAa,CAAC,QAAQ;gBAC/B,eAAe;gBACf,WAAWC,MAAM,SAAS;YAC9B;IAER;AACJ;AAEAF,GAAG,IAAI,CAAC,eAAe;IACnB,MAAMC,QAAQ,MAAM,MAAM,CAAC;IAC3B,OAAO;QACH,YAAY,IAAO;gBAAE,WAAWF,MAAM,SAAS;YAAC;QAChD,YAAY,CAACG,QACFD,MAAM,aAAa,CAAC,KAAK;gBAAE,MAAMC,MAAM,EAAE;YAAC,GAAGA,MAAM,QAAQ;IAE1E;AACJ;AAEAF,GAAG,IAAI,CAAC,2BAA2B,IACxB;QAAE,gBAAgB,IAAM;IAAK;AAGxCA,GAAG,IAAI,CAAC,gBAAgB,IACb;QAAE,sBAAsB,CAAC;IAAE;AAGtC,MAAMG,iBAAiB,CAACC,YACb;QAAE,IAAI;QAAkB,SAAS;QAAW,OAAO;QAAS,GAAGA,SAAS;IAAC;AAGpF,MAAMC,cAAc,CAACC;IACjBP,MAAM,SAAS,CAAC,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AAE,IAAI,CAAC;QACjEe,OAAOf,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACsB,CAAAA,OAAQA,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;YACtE;YACA;YACA;SACH;IACL;AACJ"}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
export type NotificationVariant = "default" | "success" | "warning";
|
|
1
|
+
export type NotificationVariant = "default" | "success" | "warning" | "error";
|
|
2
|
+
export type NotificationPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
3
|
+
export interface INotificationLink {
|
|
4
|
+
label: string;
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
2
7
|
export interface INotificationInput {
|
|
3
8
|
title: string;
|
|
4
9
|
description?: string;
|
|
10
|
+
link?: INotificationLink;
|
|
11
|
+
duration?: number;
|
|
12
|
+
position?: NotificationPosition;
|
|
13
|
+
dismissible?: boolean;
|
|
5
14
|
}
|
|
6
15
|
export interface INotification extends INotificationInput {
|
|
7
16
|
id: string;
|
|
@@ -9,12 +18,14 @@ export interface INotification extends INotificationInput {
|
|
|
9
18
|
}
|
|
10
19
|
/**
|
|
11
20
|
* App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /
|
|
12
|
-
* `warning()` to surface a notification on screen, without depending on React or the
|
|
21
|
+
* `warning()` / `error()` to surface a notification on screen, without depending on React or the
|
|
22
|
+
* toast UI.
|
|
13
23
|
*/
|
|
14
24
|
export interface INotifications {
|
|
15
25
|
notify(notification: INotificationInput): void;
|
|
16
26
|
success(notification: INotificationInput): void;
|
|
17
27
|
warning(notification: INotificationInput): void;
|
|
28
|
+
error(notification: INotificationInput): void;
|
|
18
29
|
getNotifications(): INotification[];
|
|
19
30
|
remove(id: string): void;
|
|
20
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/notifications/abstractions.js","sources":["../../../src/features/notifications/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport type NotificationVariant = \"default\" | \"success\" | \"warning\";\n\nexport interface INotificationInput {\n title: string;\n description?: string;\n}\n\nexport interface INotification extends INotificationInput {\n id: string;\n variant: NotificationVariant;\n}\n\n/**\n * App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /\n * `warning()` to surface a notification on screen, without depending on React or the toast UI.\n */\nexport interface INotifications {\n notify(notification: INotificationInput): void;\n success(notification: INotificationInput): void;\n warning(notification: INotificationInput): void;\n getNotifications(): INotification[];\n remove(id: string): void;\n}\n\nexport const Notifications = createAbstraction<INotifications>(\"Notifications\");\n\nexport namespace Notifications {\n export type Interface = INotifications;\n}\n\nexport interface INotificationsViewModel {\n notifications: INotification[];\n}\n\n/**\n * Presents queued notifications (oldest first) to the UI layer, which renders them in order.\n */\nexport interface INotificationsPresenter {\n readonly vm: INotificationsViewModel;\n markShown(id: string): void;\n}\n\nexport const NotificationsPresenter =\n createAbstraction<INotificationsPresenter>(\"NotificationsPresenter\");\n\nexport namespace NotificationsPresenter {\n export type Interface = INotificationsPresenter;\n}\n"],"names":["Notifications","createAbstraction","NotificationsPresenter"],"mappings":";
|
|
1
|
+
{"version":3,"file":"features/notifications/abstractions.js","sources":["../../../src/features/notifications/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport type NotificationVariant = \"default\" | \"success\" | \"warning\" | \"error\";\n\nexport type NotificationPosition =\n | \"top-left\"\n | \"top-center\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-center\"\n | \"bottom-right\";\n\nexport interface INotificationLink {\n label: string;\n url: string;\n}\n\nexport interface INotificationInput {\n title: string;\n description?: string;\n link?: INotificationLink;\n duration?: number;\n position?: NotificationPosition;\n dismissible?: boolean;\n}\n\nexport interface INotification extends INotificationInput {\n id: string;\n variant: NotificationVariant;\n}\n\n/**\n * App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /\n * `warning()` / `error()` to surface a notification on screen, without depending on React or the\n * toast UI.\n */\nexport interface INotifications {\n notify(notification: INotificationInput): void;\n success(notification: INotificationInput): void;\n warning(notification: INotificationInput): void;\n error(notification: INotificationInput): void;\n getNotifications(): INotification[];\n remove(id: string): void;\n}\n\nexport const Notifications = createAbstraction<INotifications>(\"Notifications\");\n\nexport namespace Notifications {\n export type Interface = INotifications;\n}\n\nexport interface INotificationsViewModel {\n notifications: INotification[];\n}\n\n/**\n * Presents queued notifications (oldest first) to the UI layer, which renders them in order.\n */\nexport interface INotificationsPresenter {\n readonly vm: INotificationsViewModel;\n markShown(id: string): void;\n}\n\nexport const NotificationsPresenter =\n createAbstraction<INotificationsPresenter>(\"NotificationsPresenter\");\n\nexport namespace NotificationsPresenter {\n export type Interface = INotificationsPresenter;\n}\n"],"names":["Notifications","createAbstraction","NotificationsPresenter"],"mappings":";AA6CO,MAAMA,gBAAgBC,kBAAkC;AAkBxD,MAAMC,yBACTD,kBAA2C"}
|
|
@@ -7,7 +7,6 @@ declare class LoginUseCaseImpl implements UseCase.Interface {
|
|
|
7
7
|
private logInRepository;
|
|
8
8
|
constructor(authContext: AuthenticationContext.Interface, identityContext: IdentityContext.Interface, logInRepository: LogInRepository.Interface);
|
|
9
9
|
execute(params: UseCase.Params): Promise<void>;
|
|
10
|
-
private validatePermissions;
|
|
11
10
|
}
|
|
12
11
|
export declare const LogInUseCase: typeof LoginUseCaseImpl & {
|
|
13
12
|
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ILogInUseCase>;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { LogInRepository, LogInUseCase } from "./abstractions.js";
|
|
2
2
|
import { AuthenticationContext } from "../AuthenticationContext/index.js";
|
|
3
3
|
import { IdentityContext } from "../IdentityContext/index.js";
|
|
4
|
+
import { hasAppPermissions } from "./hasAppPermissions.js";
|
|
4
5
|
class LoginUseCaseImpl {
|
|
5
6
|
constructor(authContext, identityContext, logInRepository){
|
|
6
7
|
this.authContext = authContext;
|
|
7
8
|
this.identityContext = identityContext;
|
|
8
9
|
this.logInRepository = logInRepository;
|
|
9
|
-
this.validatePermissions = (permissions)=>{
|
|
10
|
-
const appPermissions = permissions.filter((p)=>"aacl" !== p.name);
|
|
11
|
-
if (0 === appPermissions.length) throw new Error("You have no permissions on this tenant!");
|
|
12
|
-
};
|
|
13
10
|
}
|
|
14
11
|
async execute(params) {
|
|
15
12
|
this.authContext.setIdTokenProvider(params.idTokenProvider);
|
|
16
13
|
if (params.logoutCallback) this.authContext.setLogoutCallback(params.logoutCallback);
|
|
17
14
|
const identity = await this.logInRepository.login();
|
|
18
|
-
|
|
15
|
+
if (!hasAppPermissions(identity)) throw new Error("You have no permissions on this tenant!");
|
|
19
16
|
this.identityContext.setIdentity(identity);
|
|
20
17
|
}
|
|
21
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/security/LogIn/LogInUseCase.js","sources":["../../../../src/features/security/LogIn/LogInUseCase.ts"],"sourcesContent":["import { LogInRepository, LogInUseCase as UseCase } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"~/features/security/AuthenticationContext/index.js\";\nimport { IdentityContext } from \"~/features/security/IdentityContext/index.js\";\nimport
|
|
1
|
+
{"version":3,"file":"features/security/LogIn/LogInUseCase.js","sources":["../../../../src/features/security/LogIn/LogInUseCase.ts"],"sourcesContent":["import { LogInRepository, LogInUseCase as UseCase } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"~/features/security/AuthenticationContext/index.js\";\nimport { IdentityContext } from \"~/features/security/IdentityContext/index.js\";\nimport { hasAppPermissions } from \"./hasAppPermissions.js\";\n\nclass LoginUseCaseImpl implements UseCase.Interface {\n constructor(\n private authContext: AuthenticationContext.Interface,\n private identityContext: IdentityContext.Interface,\n private logInRepository: LogInRepository.Interface\n ) {}\n\n async execute(params: UseCase.Params): Promise<void> {\n // 1. Set authentication providers\n this.authContext.setIdTokenProvider(params.idTokenProvider);\n if (params.logoutCallback) {\n this.authContext.setLogoutCallback(params.logoutCallback);\n }\n\n // TODO: if it's a multi-tenant system, and current tenant is not known (no URL param, no localStorage),\n // execute the GET_DEFAULT_TENANT query to first determine the tenant. Only then login the user.\n\n const identity = await this.logInRepository.login();\n\n // 3. Ensure identity has some permissions\n if (!hasAppPermissions(identity)) {\n throw new Error(\"You have no permissions on this tenant!\");\n }\n\n // 4. Set identity (user is now \"logged in\")\n this.identityContext.setIdentity(identity);\n }\n}\n\nexport const LogInUseCase = UseCase.createImplementation({\n implementation: LoginUseCaseImpl,\n dependencies: [AuthenticationContext, IdentityContext, LogInRepository]\n});\n"],"names":["LoginUseCaseImpl","authContext","identityContext","logInRepository","params","identity","hasAppPermissions","Error","LogInUseCase","UseCase","AuthenticationContext","IdentityContext","LogInRepository"],"mappings":";;;;AAKA,MAAMA;IACF,YACYC,WAA4C,EAC5CC,eAA0C,EAC1CC,eAA0C,CACpD;aAHUF,WAAW,GAAXA;aACAC,eAAe,GAAfA;aACAC,eAAe,GAAfA;IACT;IAEH,MAAM,QAAQC,MAAsB,EAAiB;QAEjD,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAACA,OAAO,eAAe;QAC1D,IAAIA,OAAO,cAAc,EACrB,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAACA,OAAO,cAAc;QAM5D,MAAMC,WAAW,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK;QAGjD,IAAI,CAACC,kBAAkBD,WACnB,MAAM,IAAIE,MAAM;QAIpB,IAAI,CAAC,eAAe,CAAC,WAAW,CAACF;IACrC;AACJ;AAEO,MAAMG,4BAAeC,aAAAA,oBAA4B,CAAC;IACrD,gBAAgBT;IAChB,cAAc;QAACU;QAAuBC;QAAiBC;KAAgB;AAC3E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function hasAppPermissions(identity) {
|
|
2
|
+
const permissions = identity.getPermissions();
|
|
3
|
+
const appPermissions = permissions.filter((permission)=>"aacl" !== permission.name);
|
|
4
|
+
return appPermissions.length > 0;
|
|
5
|
+
}
|
|
6
|
+
export { hasAppPermissions };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=hasAppPermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/security/LogIn/hasAppPermissions.js","sources":["../../../../src/features/security/LogIn/hasAppPermissions.ts"],"sourcesContent":["import type { Identity } from \"~/domain/Identity.js\";\n\n/*\n * `aacl` is granted to every identity that can reach the Admin, so it says nothing about whether\n * the identity can use any app. An identity with nothing else cannot log in.\n */\nexport function hasAppPermissions(identity: Identity): boolean {\n const permissions = identity.getPermissions();\n const appPermissions = permissions.filter(permission => permission.name !== \"aacl\");\n\n return appPermissions.length > 0;\n}\n"],"names":["hasAppPermissions","identity","permissions","appPermissions","permission"],"mappings":"AAMO,SAASA,kBAAkBC,QAAkB;IAChD,MAAMC,cAAcD,SAAS,cAAc;IAC3C,MAAME,iBAAiBD,YAAY,MAAM,CAACE,CAAAA,aAAcA,AAAoB,WAApBA,WAAW,IAAI;IAEvE,OAAOD,eAAe,MAAM,GAAG;AACnC"}
|
|
@@ -19,10 +19,15 @@ export declare class ReactLicense implements ILicense {
|
|
|
19
19
|
canUseAiPageGeneration(): boolean;
|
|
20
20
|
canUseAiPageTranslation(): boolean;
|
|
21
21
|
canUseAiLexicalGeneration(): boolean;
|
|
22
|
+
canUseAiAdminAssistant(): boolean;
|
|
22
23
|
canUseAiEntryGeneration(): boolean;
|
|
23
24
|
canUseAiEntryComparison(): boolean;
|
|
24
25
|
canUseAiEntryTranslation(): boolean;
|
|
26
|
+
canUseAiPowerups(): boolean;
|
|
25
27
|
canUseAbTesting(): boolean;
|
|
26
|
-
|
|
28
|
+
canUseCollaboration(): boolean;
|
|
29
|
+
canUseComments(): boolean;
|
|
30
|
+
canUseActivityLog(): boolean;
|
|
31
|
+
canUseLanguages(): boolean;
|
|
27
32
|
toDto(): DecryptedWcpProjectLicense | null;
|
|
28
33
|
}
|
|
@@ -50,6 +50,9 @@ class ReactLicense {
|
|
|
50
50
|
canUseAiLexicalGeneration() {
|
|
51
51
|
return this.license.canUseAiLexicalGeneration();
|
|
52
52
|
}
|
|
53
|
+
canUseAiAdminAssistant() {
|
|
54
|
+
return this.license.canUseAiAdminAssistant();
|
|
55
|
+
}
|
|
53
56
|
canUseAiEntryGeneration() {
|
|
54
57
|
return this.license.canUseAiEntryGeneration();
|
|
55
58
|
}
|
|
@@ -59,11 +62,23 @@ class ReactLicense {
|
|
|
59
62
|
canUseAiEntryTranslation() {
|
|
60
63
|
return this.license.canUseAiEntryTranslation();
|
|
61
64
|
}
|
|
65
|
+
canUseAiPowerups() {
|
|
66
|
+
return this.license.canUseAiPowerups();
|
|
67
|
+
}
|
|
62
68
|
canUseAbTesting() {
|
|
63
69
|
return this.license.canUseAbTesting();
|
|
64
70
|
}
|
|
65
|
-
|
|
66
|
-
return this.license.
|
|
71
|
+
canUseCollaboration() {
|
|
72
|
+
return this.license.canUseCollaboration();
|
|
73
|
+
}
|
|
74
|
+
canUseComments() {
|
|
75
|
+
return this.license.canUseComments();
|
|
76
|
+
}
|
|
77
|
+
canUseActivityLog() {
|
|
78
|
+
return this.license.canUseActivityLog();
|
|
79
|
+
}
|
|
80
|
+
canUseLanguages() {
|
|
81
|
+
return this.license.canUseLanguages();
|
|
67
82
|
}
|
|
68
83
|
toDto() {
|
|
69
84
|
return this.license.toDto();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiPageTranslation(): boolean {\n return this.license.canUseAiPageTranslation();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n canUseAiEntryGeneration(): boolean {\n return this.license.canUseAiEntryGeneration();\n }\n\n canUseAiEntryComparison(): boolean {\n return this.license.canUseAiEntryComparison();\n }\n\n canUseAiEntryTranslation(): boolean {\n return this.license.canUseAiEntryTranslation();\n }\n\n canUseAbTesting(): boolean {\n return this.license.canUseAbTesting();\n }\n\n
|
|
1
|
+
{"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiPageTranslation(): boolean {\n return this.license.canUseAiPageTranslation();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n canUseAiAdminAssistant(): boolean {\n return this.license.canUseAiAdminAssistant();\n }\n\n canUseAiEntryGeneration(): boolean {\n return this.license.canUseAiEntryGeneration();\n }\n\n canUseAiEntryComparison(): boolean {\n return this.license.canUseAiEntryComparison();\n }\n\n canUseAiEntryTranslation(): boolean {\n return this.license.canUseAiEntryTranslation();\n }\n\n canUseAiPowerups(): boolean {\n return this.license.canUseAiPowerups();\n }\n\n canUseAbTesting(): boolean {\n return this.license.canUseAbTesting();\n }\n\n canUseCollaboration(): boolean {\n return this.license.canUseCollaboration();\n }\n\n canUseComments(): boolean {\n return this.license.canUseComments();\n }\n\n canUseActivityLog(): boolean {\n return this.license.canUseActivityLog();\n }\n\n canUseLanguages(): boolean {\n return this.license.canUseLanguages();\n }\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AC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,2BAAoC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB;IAChD;IAEA,mBAA4B;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB;IACxC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,sBAA+B;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB;IAC3C;IAEA,iBAA0B;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;IACtC;IAEA,oBAA6B;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB;IACzC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,QAA2C;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;IAC7B;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n abTesting {\n enabled\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n abTesting {\n enabled\n }\n collaboration {\n enabled\n options\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDvC,CAAC;AAED,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,eAA+C;QACjD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAC9D,OAAOH;YACP,SAAS;gBACL,YAAY;YAChB;QACJ;QAEA,IAAIG,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,EAC7B,MAAM,IAAIC,MAAMD,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;QAGzD,OAAOA,SAAS,GAAG,CAAC,UAAU,CAAC,IAAI;IACvC;AACJ;AAEO,MAAME,wBAAaC,qBAAqB;IAC3C,aAAaC;IACb,gBAAgBN;IAChB,cAAc;QAACO;KAAkB;AACrC"}
|