@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":"presentation/banners/abstractions.js","sources":["../../../src/presentation/banners/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { Banners } from \"~/features/banners/abstractions.js\";\n\nexport interface IBannerViewModel {\n id: string;\n variant: Banners.Variant;\n title: string | null;\n message: string;\n dismissible: boolean;\n actionLabel: string | null;\n actionDisabled: boolean;\n}\n\nexport interface IBannersViewModel {\n // The one banner on screen, or null when there is none.\n banner: IBannerViewModel | null;\n}\n\nexport interface IBannersPresenter {\n readonly vm: IBannersViewModel;\n runAction(): void;\n dismiss(): void;\n}\n\nexport const BannersPresenter = createAbstraction<IBannersPresenter>(\"BannersPresenter\");\n\nexport namespace BannersPresenter {\n export type Interface = IBannersPresenter;\n export type ViewModel = IBannersViewModel;\n export type Banner = IBannerViewModel;\n}\n"],"names":["BannersPresenter","createAbstraction"],"mappings":";AAwBO,MAAMA,mBAAmBC,kBAAqC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Banners } from "../../../features/banners/abstractions.js";
|
|
2
|
+
export type BannerProps = Banners.Banner;
|
|
3
|
+
/**
|
|
4
|
+
* Shows a banner for as long as this component is mounted, and hides it on unmount. Renders
|
|
5
|
+
* nothing itself; the Layout's bar does the drawing.
|
|
6
|
+
*
|
|
7
|
+
* To show a banner from an event handler, use `useBanner()`. Outside React, inject `Banners`
|
|
8
|
+
* and call `show()` and `hide()` directly.
|
|
9
|
+
*/
|
|
10
|
+
export declare const Banner: (props: BannerProps) => null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useBanner } from "../useBanner.js";
|
|
3
|
+
const Banner = (props)=>{
|
|
4
|
+
const { showBanner, hideBanner } = useBanner();
|
|
5
|
+
const { id, variant, title, message, dismissible, action } = props;
|
|
6
|
+
useEffect(()=>{
|
|
7
|
+
showBanner({
|
|
8
|
+
id,
|
|
9
|
+
variant,
|
|
10
|
+
title,
|
|
11
|
+
message,
|
|
12
|
+
dismissible,
|
|
13
|
+
action
|
|
14
|
+
});
|
|
15
|
+
}, [
|
|
16
|
+
id,
|
|
17
|
+
variant,
|
|
18
|
+
title,
|
|
19
|
+
message,
|
|
20
|
+
dismissible,
|
|
21
|
+
action?.label,
|
|
22
|
+
action?.disabled,
|
|
23
|
+
action?.onClick
|
|
24
|
+
]);
|
|
25
|
+
useEffect(()=>()=>hideBanner(id), [
|
|
26
|
+
id
|
|
27
|
+
]);
|
|
28
|
+
return null;
|
|
29
|
+
};
|
|
30
|
+
export { Banner };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=Banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/banners/components/Banner.js","sources":["../../../../src/presentation/banners/components/Banner.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport type { Banners } from \"~/features/banners/abstractions.js\";\nimport { useBanner } from \"../useBanner.js\";\n\nexport type BannerProps = Banners.Banner;\n\n/**\n * Shows a banner for as long as this component is mounted, and hides it on unmount. Renders\n * nothing itself; the Layout's bar does the drawing.\n *\n * To show a banner from an event handler, use `useBanner()`. Outside React, inject `Banners`\n * and call `show()` and `hide()` directly.\n */\nexport const Banner = (props: BannerProps) => {\n const { showBanner, hideBanner } = useBanner();\n const { id, variant, title, message, dismissible, action } = props;\n\n useEffect(() => {\n showBanner({ id, variant, title, message, dismissible, action });\n }, [\n id,\n variant,\n title,\n message,\n dismissible,\n action?.label,\n action?.disabled,\n action?.onClick\n ]);\n\n useEffect(() => {\n return () => hideBanner(id);\n }, [id]);\n\n return null;\n};\n"],"names":["Banner","props","showBanner","hideBanner","useBanner","id","variant","title","message","dismissible","action","useEffect"],"mappings":";;AAaO,MAAMA,SAAS,CAACC;IACnB,MAAM,EAAEC,UAAU,EAAEC,UAAU,EAAE,GAAGC;IACnC,MAAM,EAAEC,EAAE,EAAEC,OAAO,EAAEC,KAAK,EAAEC,OAAO,EAAEC,WAAW,EAAEC,MAAM,EAAE,GAAGT;IAE7DU,UAAU;QACNT,WAAW;YAAEG;YAAIC;YAASC;YAAOC;YAASC;YAAaC;QAAO;IAClE,GAAG;QACCL;QACAC;QACAC;QACAC;QACAC;QACAC,QAAQ;QACRA,QAAQ;QACRA,QAAQ;KACX;IAEDC,UAAU,IACC,IAAMR,WAAWE,KACzB;QAACA;KAAG;IAEP,OAAO;AACX"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The bar across the top of the content column, above the header. Rendered once, by the Layout.
|
|
4
|
+
*
|
|
5
|
+
* It is always exactly `--spacing-banner` tall, and the text is cut to one line, with the full text
|
|
6
|
+
* in the tooltip. A known height is what lets the Layout take the bar out of `h-main-content` with
|
|
7
|
+
* plain CSS, instead of measuring the bar at runtime.
|
|
8
|
+
*/
|
|
9
|
+
export declare const BannerBar: (() => React.JSX.Element | null) & React.NamedExoticComponent<unknown> & {
|
|
10
|
+
readonly type: () => React.JSX.Element | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { useFeature } from "@webiny/app";
|
|
3
|
+
import { Button, IconButton, Text, cn } from "@webiny/admin-ui";
|
|
4
|
+
import { ReactComponent } from "@webiny/icons/close.svg";
|
|
5
|
+
import { createReactiveComponent } from "../../createReactiveComponent.js";
|
|
6
|
+
import { BannersPresenterFeature } from "../feature.js";
|
|
7
|
+
const VARIANT_CLASS_NAMES = {
|
|
8
|
+
info: "bg-neutral-dimmed",
|
|
9
|
+
success: "bg-success-subtle",
|
|
10
|
+
warning: "bg-warning",
|
|
11
|
+
error: "bg-destructive-subtle"
|
|
12
|
+
};
|
|
13
|
+
function fullText(banner) {
|
|
14
|
+
if (!banner.title) return banner.message;
|
|
15
|
+
return `${banner.title} ${banner.message}`;
|
|
16
|
+
}
|
|
17
|
+
const BannerBar = createReactiveComponent(()=>{
|
|
18
|
+
const { presenter } = useFeature(BannersPresenterFeature);
|
|
19
|
+
const { banner } = presenter.vm;
|
|
20
|
+
if (!banner) return null;
|
|
21
|
+
let action = null;
|
|
22
|
+
if (banner.actionLabel) action = /*#__PURE__*/ react.createElement(Button, {
|
|
23
|
+
variant: "ghost",
|
|
24
|
+
size: "sm",
|
|
25
|
+
text: banner.actionLabel,
|
|
26
|
+
disabled: banner.actionDisabled,
|
|
27
|
+
onClick: ()=>presenter.runAction()
|
|
28
|
+
});
|
|
29
|
+
let close = null;
|
|
30
|
+
if (banner.dismissible) close = /*#__PURE__*/ react.createElement(IconButton, {
|
|
31
|
+
variant: "ghost",
|
|
32
|
+
size: "sm",
|
|
33
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
34
|
+
"aria-label": "Dismiss banner",
|
|
35
|
+
onClick: ()=>presenter.dismiss()
|
|
36
|
+
});
|
|
37
|
+
return /*#__PURE__*/ react.createElement("div", {
|
|
38
|
+
className: cn("grid h-banner grid-cols-[1fr_minmax(0,max-content)_1fr] items-center gap-sm px-sm", VARIANT_CLASS_NAMES[banner.variant]),
|
|
39
|
+
"data-admin-banner": banner.variant,
|
|
40
|
+
"data-testid": "admin-banner"
|
|
41
|
+
}, /*#__PURE__*/ react.createElement("span", null), /*#__PURE__*/ react.createElement(Text, {
|
|
42
|
+
size: "sm",
|
|
43
|
+
className: "truncate text-center text-neutral-primary",
|
|
44
|
+
title: fullText(banner)
|
|
45
|
+
}, banner.title ? /*#__PURE__*/ react.createElement("strong", null, `${banner.title} `) : null, banner.message), /*#__PURE__*/ react.createElement("div", {
|
|
46
|
+
className: "flex items-center justify-self-end gap-xs"
|
|
47
|
+
}, action, close));
|
|
48
|
+
});
|
|
49
|
+
export { BannerBar };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=BannerBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/banners/components/BannerBar.js","sources":["../../../../src/presentation/banners/components/BannerBar.tsx"],"sourcesContent":["import React from \"react\";\nimport { useFeature } from \"@webiny/app\";\nimport { Button } from \"@webiny/admin-ui\";\nimport { IconButton } from \"@webiny/admin-ui\";\nimport { Text } from \"@webiny/admin-ui\";\nimport { cn } from \"@webiny/admin-ui\";\nimport { ReactComponent as CloseIcon } from \"@webiny/icons/close.svg\";\nimport { createReactiveComponent } from \"~/presentation/createReactiveComponent.js\";\nimport { BannersPresenterFeature } from \"../feature.js\";\nimport type { BannersPresenter } from \"../abstractions.js\";\n\nconst VARIANT_CLASS_NAMES: Record<BannersPresenter.Banner[\"variant\"], string> = {\n info: \"bg-neutral-dimmed\",\n success: \"bg-success-subtle\",\n warning: \"bg-warning\",\n error: \"bg-destructive-subtle\"\n};\n\nfunction fullText(banner: BannersPresenter.Banner): string {\n if (!banner.title) {\n return banner.message;\n }\n return `${banner.title} ${banner.message}`;\n}\n\n/**\n * The bar across the top of the content column, above the header. Rendered once, by the Layout.\n *\n * It is always exactly `--spacing-banner` tall, and the text is cut to one line, with the full text\n * in the tooltip. A known height is what lets the Layout take the bar out of `h-main-content` with\n * plain CSS, instead of measuring the bar at runtime.\n */\nexport const BannerBar = createReactiveComponent(() => {\n const { presenter } = useFeature(BannersPresenterFeature);\n const { banner } = presenter.vm;\n\n if (!banner) {\n return null;\n }\n\n let action = null;\n if (banner.actionLabel) {\n action = (\n <Button\n variant={\"ghost\"}\n size={\"sm\"}\n text={banner.actionLabel}\n disabled={banner.actionDisabled}\n onClick={() => presenter.runAction()}\n />\n );\n }\n\n let close = null;\n if (banner.dismissible) {\n close = (\n <IconButton\n variant={\"ghost\"}\n size={\"sm\"}\n icon={<CloseIcon />}\n aria-label={\"Dismiss banner\"}\n onClick={() => presenter.dismiss()}\n />\n );\n }\n\n return (\n <div\n className={cn(\n \"grid h-banner grid-cols-[1fr_minmax(0,max-content)_1fr] items-center gap-sm px-sm\",\n VARIANT_CLASS_NAMES[banner.variant]\n )}\n data-admin-banner={banner.variant}\n data-testid={\"admin-banner\"}\n >\n <span />\n <Text\n size={\"sm\"}\n className={\"truncate text-center text-neutral-primary\"}\n title={fullText(banner)}\n >\n {banner.title ? <strong>{`${banner.title} `}</strong> : null}\n {banner.message}\n </Text>\n <div className={\"flex items-center justify-self-end gap-xs\"}>\n {action}\n {close}\n </div>\n </div>\n );\n});\n"],"names":["VARIANT_CLASS_NAMES","fullText","banner","BannerBar","createReactiveComponent","presenter","useFeature","BannersPresenterFeature","action","Button","close","IconButton","CloseIcon","cn","Text"],"mappings":";;;;;;AAWA,MAAMA,sBAA0E;IAC5E,MAAM;IACN,SAAS;IACT,SAAS;IACT,OAAO;AACX;AAEA,SAASC,SAASC,MAA+B;IAC7C,IAAI,CAACA,OAAO,KAAK,EACb,OAAOA,OAAO,OAAO;IAEzB,OAAO,GAAGA,OAAO,KAAK,CAAC,CAAC,EAAEA,OAAO,OAAO,EAAE;AAC9C;AASO,MAAMC,YAAYC,wBAAwB;IAC7C,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAM,EAAEL,MAAM,EAAE,GAAGG,UAAU,EAAE;IAE/B,IAAI,CAACH,QACD,OAAO;IAGX,IAAIM,SAAS;IACb,IAAIN,OAAO,WAAW,EAClBM,SAAS,WAATA,GACI,oBAACC,QAAMA;QACH,SAAS;QACT,MAAM;QACN,MAAMP,OAAO,WAAW;QACxB,UAAUA,OAAO,cAAc;QAC/B,SAAS,IAAMG,UAAU,SAAS;;IAK9C,IAAIK,QAAQ;IACZ,IAAIR,OAAO,WAAW,EAClBQ,QAAQ,WAARA,GACI,oBAACC,YAAUA;QACP,SAAS;QACT,MAAM;QACN,oBAAM,oBAACC,gBAASA;QAChB,cAAY;QACZ,SAAS,IAAMP,UAAU,OAAO;;IAK5C,OAAO,WAAP,GACI,oBAAC;QACG,WAAWQ,GACP,qFACAb,mBAAmB,CAACE,OAAO,OAAO,CAAC;QAEvC,qBAAmBA,OAAO,OAAO;QACjC,eAAa;qBAEb,oBAAC,6BACD,oBAACY,MAAIA;QACD,MAAM;QACN,WAAW;QACX,OAAOb,SAASC;OAEfA,OAAO,KAAK,GAAG,WAAH,GAAG,oBAAC,gBAAQ,GAAGA,OAAO,KAAK,CAAC,CAAC,CAAC,IAAa,MACvDA,OAAO,OAAO,iBAEnB,oBAAC;QAAI,WAAW;OACXM,QACAE;AAIjB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { BannersPresenter } from "./abstractions.js";
|
|
3
|
+
import { BannersPresenter as external_BannersPresenter_js_BannersPresenter } from "./BannersPresenter.js";
|
|
4
|
+
const BannersPresenterFeature = createFeature({
|
|
5
|
+
name: "BannersPresenter",
|
|
6
|
+
register (container) {
|
|
7
|
+
container.register(external_BannersPresenter_js_BannersPresenter).inSingletonScope();
|
|
8
|
+
},
|
|
9
|
+
resolve (container) {
|
|
10
|
+
return {
|
|
11
|
+
presenter: container.resolve(BannersPresenter)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export { BannersPresenterFeature };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/banners/feature.js","sources":["../../../src/presentation/banners/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { BannersPresenter as Abstraction } from \"./abstractions.js\";\nimport { BannersPresenter } from \"./BannersPresenter.js\";\n\nexport const BannersPresenterFeature = createFeature({\n name: \"BannersPresenter\",\n register(container) {\n // Singleton so every mount of the bar reads the same state.\n container.register(BannersPresenter).inSingletonScope();\n },\n resolve(container) {\n return {\n presenter: container.resolve(Abstraction)\n };\n }\n});\n"],"names":["BannersPresenterFeature","createFeature","container","BannersPresenter","Abstraction"],"mappings":";;;AAIO,MAAMA,0BAA0BC,cAAc;IACjD,MAAM;IACN,UAASC,SAAS;QAEdA,UAAU,QAAQ,CAACC,+CAAkB,gBAAgB;IACzD;IACA,SAAQD,SAAS;QACb,OAAO;YACH,WAAWA,UAAU,OAAO,CAACE;QACjC;IACJ;AACJ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BannersPresenterFeature } from "./feature.js";
|
|
2
|
+
export { BannerBar } from "./components/BannerBar.js";
|
|
3
|
+
export { Banner } from "./components/Banner.js";
|
|
4
|
+
export type { BannerProps } from "./components/Banner.js";
|
|
5
|
+
export { useBanner } from "./useBanner.js";
|
|
6
|
+
export type { UseBannerResponse } from "./useBanner.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Banners } from "../../features/banners/abstractions.js";
|
|
2
|
+
export interface UseBannerResponse {
|
|
3
|
+
showBanner(banner: Banners.Banner): void;
|
|
4
|
+
hideBanner(id: string): void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Shows banners from event handlers, the way `useToast` shows toasts. For a banner that should show
|
|
8
|
+
* for as long as a component is mounted, render `<Banner>` instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useBanner: () => UseBannerResponse;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useFeature } from "@webiny/app";
|
|
3
|
+
import { BannersFeature } from "../../features/banners/feature.js";
|
|
4
|
+
const useBanner = ()=>{
|
|
5
|
+
const { banners } = useFeature(BannersFeature);
|
|
6
|
+
return useMemo(()=>({
|
|
7
|
+
showBanner: (banner)=>banners.show(banner),
|
|
8
|
+
hideBanner: (id)=>banners.hide(id)
|
|
9
|
+
}), [
|
|
10
|
+
banners
|
|
11
|
+
]);
|
|
12
|
+
};
|
|
13
|
+
export { useBanner };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=useBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/banners/useBanner.js","sources":["../../../src/presentation/banners/useBanner.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useFeature } from \"@webiny/app\";\nimport { BannersFeature } from \"~/features/banners/feature.js\";\nimport type { Banners } from \"~/features/banners/abstractions.js\";\n\nexport interface UseBannerResponse {\n // Shows the banner, or updates it in place if one with the same `id` is already showing.\n showBanner(banner: Banners.Banner): void;\n hideBanner(id: string): void;\n}\n\n/**\n * Shows banners from event handlers, the way `useToast` shows toasts. For a banner that should show\n * for as long as a component is mounted, render `<Banner>` instead.\n */\nexport const useBanner = (): UseBannerResponse => {\n const { banners } = useFeature(BannersFeature);\n\n return useMemo(() => {\n return {\n showBanner: (banner: Banners.Banner) => banners.show(banner),\n hideBanner: (id: string) => banners.hide(id)\n };\n }, [banners]);\n};\n"],"names":["useBanner","banners","useFeature","BannersFeature","useMemo","banner","id"],"mappings":";;;AAeO,MAAMA,YAAY;IACrB,MAAM,EAAEC,OAAO,EAAE,GAAGC,WAAWC;IAE/B,OAAOC,QAAQ,IACJ;YACH,YAAY,CAACC,SAA2BJ,QAAQ,IAAI,CAACI;YACrD,YAAY,CAACC,KAAeL,QAAQ,IAAI,CAACK;QAC7C,IACD;QAACL;KAAQ;AAChB"}
|
|
@@ -34,7 +34,9 @@ class CommandPalettePresenter {
|
|
|
34
34
|
category: cmd.category,
|
|
35
35
|
keywords: cmd.keywords,
|
|
36
36
|
shortcut: cmd.shortcut,
|
|
37
|
-
hasDetailView: Boolean(cmd.detailView)
|
|
37
|
+
hasDetailView: Boolean(cmd.detailView),
|
|
38
|
+
entersAiMode: Boolean(cmd.entersAiMode),
|
|
39
|
+
requiresAssistant: Boolean(cmd.requiresAssistant)
|
|
38
40
|
})),
|
|
39
41
|
activeCommand: activeCmd && activeCmd.detailView ? {
|
|
40
42
|
command: activeCmd,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/commandPalette/CommandPalettePresenter.js","sources":["../../../src/presentation/commandPalette/CommandPalettePresenter.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport {\n Command,\n CommandPalettePresenter as Abstraction,\n type CommandPaletteViewModel\n} from \"./abstractions.js\";\n\nexport class CommandPalettePresenter implements Abstraction.Interface {\n private isOpen = false;\n private activeCommandName: string | null = null;\n private aiModeActive = false;\n private query = \"\";\n private resolvedCommands: Command.Interface[] = [];\n\n constructor(private getCommands: () => Command.Interface[]) {\n makeAutoObservable(this);\n }\n\n init(): void {\n this.resolvedCommands = this.getCommands();\n }\n\n get shortcutKeys(): Record<string, (e: KeyboardEvent) => void> {\n const keys: Record<string, (e: KeyboardEvent) => void> = {};\n for (const cmd of this.resolvedCommands) {\n if (cmd.shortcut) {\n keys[cmd.shortcut] = (e: KeyboardEvent) => {\n e.preventDefault();\n this.useCommand(cmd.name);\n };\n }\n }\n return keys;\n }\n\n get vm(): CommandPaletteViewModel {\n const activeCmd =\n this.activeCommandName !== null\n ? this.resolvedCommands.find(c => c.name === this.activeCommandName)\n : null;\n\n return {\n isOpen: this.isOpen,\n aiModeActive: this.aiModeActive,\n query: this.query,\n commands: this.resolvedCommands.map(cmd => ({\n name: cmd.name,\n label: cmd.label,\n description: cmd.description,\n icon: cmd.icon,\n category: cmd.category,\n keywords: cmd.keywords,\n shortcut: cmd.shortcut,\n hasDetailView: Boolean(cmd.detailView)\n })),\n activeCommand:\n activeCmd && activeCmd.detailView\n ? {\n command: activeCmd,\n DetailView: activeCmd.detailView\n }\n : null\n };\n }\n\n open(): void {\n this.resolvedCommands = this.getCommands();\n this.activeCommandName = null;\n this.aiModeActive = false;\n this.query = \"\";\n this.isOpen = true;\n }\n\n close(): void {\n this.isOpen = false;\n this.activeCommandName = null;\n this.aiModeActive = false;\n this.query = \"\";\n }\n\n enterAiMode(): void {\n this.aiModeActive = true;\n this.query = \"\";\n }\n\n exitAiMode(): void {\n this.aiModeActive = false;\n this.query = \"\";\n }\n\n setQuery(query: string): void {\n this.query = query;\n }\n\n toggle(): void {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n useCommand(name: string): void {\n const cmd = this.resolvedCommands.find(c => c.name === name);\n if (!cmd) {\n return;\n }\n\n if (cmd.entersAiMode) {\n // A mode replaces the command list and keeps the input row, so the palette stays open.\n this.enterAiMode();\n return;\n }\n\n if (cmd.detailView) {\n this.activeCommandName = name;\n this.isOpen = true;\n return;\n }\n\n cmd.execute?.();\n this.close();\n }\n\n cancelCommand(): void {\n this.activeCommandName = null;\n }\n}\n"],"names":["CommandPalettePresenter","getCommands","makeAutoObservable","keys","cmd","e","activeCmd","c","Boolean","query","name"],"mappings":";AAOO,MAAMA;IAOT,YAAoBC,WAAsC,CAAE;aAAxCA,WAAW,GAAXA;aANZ,MAAM,GAAG;aACT,iBAAiB,GAAkB;aACnC,YAAY,GAAG;aACf,KAAK,GAAG;aACR,gBAAgB,GAAwB,EAAE;QAG9CC,mBAAmB,IAAI;IAC3B;IAEA,OAAa;QACT,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW;IAC5C;IAEA,IAAI,eAA2D;QAC3D,MAAMC,OAAmD,CAAC;QAC1D,KAAK,MAAMC,OAAO,IAAI,CAAC,gBAAgB,CACnC,IAAIA,IAAI,QAAQ,EACZD,IAAI,CAACC,IAAI,QAAQ,CAAC,GAAG,CAACC;YAClBA,EAAE,cAAc;YAChB,IAAI,CAAC,UAAU,CAACD,IAAI,IAAI;QAC5B;QAGR,OAAOD;IACX;IAEA,IAAI,KAA8B;QAC9B,MAAMG,YACF,AAA2B,SAA3B,IAAI,CAAC,iBAAiB,GAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAACC,CAAAA,IAAKA,EAAE,IAAI,KAAK,IAAI,CAAC,iBAAiB,IACjE;QAEV,OAAO;YACH,QAAQ,IAAI,CAAC,MAAM;YACnB,cAAc,IAAI,CAAC,YAAY;YAC/B,OAAO,IAAI,CAAC,KAAK;YACjB,UAAU,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAACH,CAAAA,MAAQ;oBACxC,MAAMA,IAAI,IAAI;oBACd,OAAOA,IAAI,KAAK;oBAChB,aAAaA,IAAI,WAAW;oBAC5B,MAAMA,IAAI,IAAI;oBACd,UAAUA,IAAI,QAAQ;oBACtB,UAAUA,IAAI,QAAQ;oBACtB,UAAUA,IAAI,QAAQ;oBACtB,eAAeI,QAAQJ,IAAI,UAAU;
|
|
1
|
+
{"version":3,"file":"presentation/commandPalette/CommandPalettePresenter.js","sources":["../../../src/presentation/commandPalette/CommandPalettePresenter.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport {\n Command,\n CommandPalettePresenter as Abstraction,\n type CommandPaletteViewModel\n} from \"./abstractions.js\";\n\nexport class CommandPalettePresenter implements Abstraction.Interface {\n private isOpen = false;\n private activeCommandName: string | null = null;\n private aiModeActive = false;\n private query = \"\";\n private resolvedCommands: Command.Interface[] = [];\n\n constructor(private getCommands: () => Command.Interface[]) {\n makeAutoObservable(this);\n }\n\n init(): void {\n this.resolvedCommands = this.getCommands();\n }\n\n get shortcutKeys(): Record<string, (e: KeyboardEvent) => void> {\n const keys: Record<string, (e: KeyboardEvent) => void> = {};\n for (const cmd of this.resolvedCommands) {\n if (cmd.shortcut) {\n keys[cmd.shortcut] = (e: KeyboardEvent) => {\n e.preventDefault();\n this.useCommand(cmd.name);\n };\n }\n }\n return keys;\n }\n\n get vm(): CommandPaletteViewModel {\n const activeCmd =\n this.activeCommandName !== null\n ? this.resolvedCommands.find(c => c.name === this.activeCommandName)\n : null;\n\n return {\n isOpen: this.isOpen,\n aiModeActive: this.aiModeActive,\n query: this.query,\n commands: this.resolvedCommands.map(cmd => ({\n name: cmd.name,\n label: cmd.label,\n description: cmd.description,\n icon: cmd.icon,\n category: cmd.category,\n keywords: cmd.keywords,\n shortcut: cmd.shortcut,\n hasDetailView: Boolean(cmd.detailView),\n entersAiMode: Boolean(cmd.entersAiMode),\n requiresAssistant: Boolean(cmd.requiresAssistant)\n })),\n activeCommand:\n activeCmd && activeCmd.detailView\n ? {\n command: activeCmd,\n DetailView: activeCmd.detailView\n }\n : null\n };\n }\n\n open(): void {\n this.resolvedCommands = this.getCommands();\n this.activeCommandName = null;\n this.aiModeActive = false;\n this.query = \"\";\n this.isOpen = true;\n }\n\n close(): void {\n this.isOpen = false;\n this.activeCommandName = null;\n this.aiModeActive = false;\n this.query = \"\";\n }\n\n enterAiMode(): void {\n this.aiModeActive = true;\n this.query = \"\";\n }\n\n exitAiMode(): void {\n this.aiModeActive = false;\n this.query = \"\";\n }\n\n setQuery(query: string): void {\n this.query = query;\n }\n\n toggle(): void {\n if (this.isOpen) {\n this.close();\n } else {\n this.open();\n }\n }\n\n useCommand(name: string): void {\n const cmd = this.resolvedCommands.find(c => c.name === name);\n if (!cmd) {\n return;\n }\n\n if (cmd.entersAiMode) {\n // A mode replaces the command list and keeps the input row, so the palette stays open.\n this.enterAiMode();\n return;\n }\n\n if (cmd.detailView) {\n this.activeCommandName = name;\n this.isOpen = true;\n return;\n }\n\n cmd.execute?.();\n this.close();\n }\n\n cancelCommand(): void {\n this.activeCommandName = null;\n }\n}\n"],"names":["CommandPalettePresenter","getCommands","makeAutoObservable","keys","cmd","e","activeCmd","c","Boolean","query","name"],"mappings":";AAOO,MAAMA;IAOT,YAAoBC,WAAsC,CAAE;aAAxCA,WAAW,GAAXA;aANZ,MAAM,GAAG;aACT,iBAAiB,GAAkB;aACnC,YAAY,GAAG;aACf,KAAK,GAAG;aACR,gBAAgB,GAAwB,EAAE;QAG9CC,mBAAmB,IAAI;IAC3B;IAEA,OAAa;QACT,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW;IAC5C;IAEA,IAAI,eAA2D;QAC3D,MAAMC,OAAmD,CAAC;QAC1D,KAAK,MAAMC,OAAO,IAAI,CAAC,gBAAgB,CACnC,IAAIA,IAAI,QAAQ,EACZD,IAAI,CAACC,IAAI,QAAQ,CAAC,GAAG,CAACC;YAClBA,EAAE,cAAc;YAChB,IAAI,CAAC,UAAU,CAACD,IAAI,IAAI;QAC5B;QAGR,OAAOD;IACX;IAEA,IAAI,KAA8B;QAC9B,MAAMG,YACF,AAA2B,SAA3B,IAAI,CAAC,iBAAiB,GAChB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAACC,CAAAA,IAAKA,EAAE,IAAI,KAAK,IAAI,CAAC,iBAAiB,IACjE;QAEV,OAAO;YACH,QAAQ,IAAI,CAAC,MAAM;YACnB,cAAc,IAAI,CAAC,YAAY;YAC/B,OAAO,IAAI,CAAC,KAAK;YACjB,UAAU,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAACH,CAAAA,MAAQ;oBACxC,MAAMA,IAAI,IAAI;oBACd,OAAOA,IAAI,KAAK;oBAChB,aAAaA,IAAI,WAAW;oBAC5B,MAAMA,IAAI,IAAI;oBACd,UAAUA,IAAI,QAAQ;oBACtB,UAAUA,IAAI,QAAQ;oBACtB,UAAUA,IAAI,QAAQ;oBACtB,eAAeI,QAAQJ,IAAI,UAAU;oBACrC,cAAcI,QAAQJ,IAAI,YAAY;oBACtC,mBAAmBI,QAAQJ,IAAI,iBAAiB;gBACpD;YACA,eACIE,aAAaA,UAAU,UAAU,GAC3B;gBACI,SAASA;gBACT,YAAYA,UAAU,UAAU;YACpC,IACA;QACd;IACJ;IAEA,OAAa;QACT,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW;QACxC,IAAI,CAAC,iBAAiB,GAAG;QACzB,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,CAAC,KAAK,GAAG;QACb,IAAI,CAAC,MAAM,GAAG;IAClB;IAEA,QAAc;QACV,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,iBAAiB,GAAG;QACzB,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,CAAC,KAAK,GAAG;IACjB;IAEA,cAAoB;QAChB,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,CAAC,KAAK,GAAG;IACjB;IAEA,aAAmB;QACf,IAAI,CAAC,YAAY,GAAG;QACpB,IAAI,CAAC,KAAK,GAAG;IACjB;IAEA,SAASG,KAAa,EAAQ;QAC1B,IAAI,CAAC,KAAK,GAAGA;IACjB;IAEA,SAAe;QACX,IAAI,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,KAAK;aAEV,IAAI,CAAC,IAAI;IAEjB;IAEA,WAAWC,IAAY,EAAQ;QAC3B,MAAMN,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAACG,CAAAA,IAAKA,EAAE,IAAI,KAAKG;QACvD,IAAI,CAACN,KACD;QAGJ,IAAIA,IAAI,YAAY,EAAE,YAElB,IAAI,CAAC,WAAW;QAIpB,IAAIA,IAAI,UAAU,EAAE;YAChB,IAAI,CAAC,iBAAiB,GAAGM;YACzB,IAAI,CAAC,MAAM,GAAG;YACd;QACJ;QAEAN,IAAI,OAAO;QACX,IAAI,CAAC,KAAK;IACd;IAEA,gBAAsB;QAClB,IAAI,CAAC,iBAAiB,GAAG;IAC7B;AACJ"}
|
|
@@ -21,6 +21,7 @@ export interface ICommand {
|
|
|
21
21
|
execute?(params?: unknown): void | Promise<void>;
|
|
22
22
|
detailView?: React.ComponentType<CommandDetailProps>;
|
|
23
23
|
entersAiMode?: boolean;
|
|
24
|
+
requiresAssistant?: boolean;
|
|
24
25
|
}
|
|
25
26
|
export declare const Command: Abstraction<ICommand>;
|
|
26
27
|
export declare namespace Command {
|
|
@@ -36,6 +37,10 @@ export interface CommandItemVm {
|
|
|
36
37
|
keywords?: string[];
|
|
37
38
|
shortcut?: string;
|
|
38
39
|
hasDetailView: boolean;
|
|
40
|
+
/** Selecting this switches the palette into AI mode. Lets a caller hide it when AI is off. */
|
|
41
|
+
entersAiMode: boolean;
|
|
42
|
+
/** Needs the admin assistant. Lets a caller hide it when the assistant is not licensed. */
|
|
43
|
+
requiresAssistant: boolean;
|
|
39
44
|
}
|
|
40
45
|
export interface ActiveCommandVm {
|
|
41
46
|
command: ICommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/commandPalette/abstractions.js","sources":["../../../src/presentation/commandPalette/abstractions.ts"],"sourcesContent":["import type React from \"react\";\nimport { createAbstraction } from \"@webiny/feature/admin\";\nimport { Abstraction } from \"@webiny/di\";\n\nexport interface CommandDetailProps {\n command: ICommand;\n onClose: () => void;\n onBack: () => void;\n}\n\n/**\n * A command registered with the command palette via dependency injection. Register an\n * implementation with `Command.createImplementation(...)` and add it to the container;\n * the palette resolves all of them with `container.resolveAll(Command)`.\n */\nexport interface ICommand {\n name: string;\n label: string;\n description?: string;\n icon?: React.ReactNode;\n category?: string;\n keywords?: string[];\n /* Global hotkey (is-hotkey syntax, e.g. \"cmd+shift+m\") that runs this command. */\n shortcut?: string;\n /* Omitted by a command that only selects a mode; there is no action to run. */\n execute?(params?: unknown): void | Promise<void>;\n /* Optional React view rendered inside the palette when the command is selected. */\n detailView?: React.ComponentType<CommandDetailProps>;\n /*\n * Selecting this command switches the palette into AI mode rather than doing something. A mode\n * needs the shared input row, so the palette stays open and `execute` is never called.\n *\n * Named after the one mode that exists. If a second one ever arrives, this becomes\n * `entersMode: \"
|
|
1
|
+
{"version":3,"file":"presentation/commandPalette/abstractions.js","sources":["../../../src/presentation/commandPalette/abstractions.ts"],"sourcesContent":["import type React from \"react\";\nimport { createAbstraction } from \"@webiny/feature/admin\";\nimport { Abstraction } from \"@webiny/di\";\n\nexport interface CommandDetailProps {\n command: ICommand;\n onClose: () => void;\n onBack: () => void;\n}\n\n/**\n * A command registered with the command palette via dependency injection. Register an\n * implementation with `Command.createImplementation(...)` and add it to the container;\n * the palette resolves all of them with `container.resolveAll(Command)`.\n */\nexport interface ICommand {\n name: string;\n label: string;\n description?: string;\n icon?: React.ReactNode;\n category?: string;\n keywords?: string[];\n /* Global hotkey (is-hotkey syntax, e.g. \"cmd+shift+m\") that runs this command. */\n shortcut?: string;\n /* Omitted by a command that only selects a mode; there is no action to run. */\n execute?(params?: unknown): void | Promise<void>;\n /* Optional React view rendered inside the palette when the command is selected. */\n detailView?: React.ComponentType<CommandDetailProps>;\n /*\n * Selecting this command switches the palette into AI mode rather than doing something. A mode\n * needs the shared input row, so the palette stays open and `execute` is never called.\n *\n * Named after the one mode that exists. If a second one ever arrives, this becomes\n * `entersMode: \"adminAssistant\"` and the palette looks the mode up by name instead of hardcoding it.\n */\n entersAiMode?: boolean;\n /*\n * Needs the admin assistant, which is licensed separately. The palette leaves the command out\n * while the license is missing.\n */\n requiresAssistant?: boolean;\n}\n\nexport const Command = createAbstraction<ICommand>(\"Command\");\n\nexport namespace Command {\n export type Interface = ICommand;\n export type DetailProps = CommandDetailProps;\n}\n\nexport interface CommandItemVm {\n name: string;\n label: string;\n description?: string;\n icon?: React.ReactNode;\n category?: string;\n keywords?: string[];\n shortcut?: string;\n hasDetailView: boolean;\n /** Selecting this switches the palette into AI mode. Lets a caller hide it when AI is off. */\n entersAiMode: boolean;\n /** Needs the admin assistant. Lets a caller hide it when the assistant is not licensed. */\n requiresAssistant: boolean;\n}\n\nexport interface ActiveCommandVm {\n command: ICommand;\n DetailView: React.ComponentType<CommandDetailProps>;\n}\n\nexport interface CommandPaletteViewModel {\n isOpen: boolean;\n /**\n * A mode is showing instead of the command list. The palette keeps ONE input row across every\n * mode, so this is the palette's state rather than the mode's.\n */\n aiModeActive: boolean;\n /**\n * What the user has typed. Owned here rather than by the component because it is cleared\n * whenever the palette opens, closes, or enters or leaves a mode.\n */\n query: string;\n commands: CommandItemVm[];\n activeCommand: ActiveCommandVm | null;\n}\n\nexport interface ICommandPalettePresenter {\n vm: CommandPaletteViewModel;\n shortcutKeys: Record<string, (e: KeyboardEvent) => void>;\n init(): void;\n open(): void;\n close(): void;\n toggle(): void;\n useCommand(name: string): void;\n cancelCommand(): void;\n enterAiMode(): void;\n exitAiMode(): void;\n setQuery(query: string): void;\n}\n\nexport const CommandPalettePresenter = new Abstraction<ICommandPalettePresenter>(\n \"CommandPalettePresenter\"\n);\n\nexport namespace CommandPalettePresenter {\n export type Interface = ICommandPalettePresenter;\n export type ViewModel = CommandPaletteViewModel;\n}\n"],"names":["Command","createAbstraction","CommandPalettePresenter","Abstraction"],"mappings":";;AA2CO,MAAMA,UAAUC,kBAA4B;AAyD5C,MAAMC,0BAA0B,IAAIC,YACvC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AiChatsPanelPresenter } from "../../../presentation/aiChats/abstractions.js";
|
|
3
|
+
import { Command } from "../abstractions.js";
|
|
4
|
+
/**
|
|
5
|
+
* Opens the AI chats panel on the saved chats, or closes it. Also bound to mod+j, so the panel is
|
|
6
|
+
* one key away without the palette.
|
|
7
|
+
*/
|
|
8
|
+
declare class AiChatsCommandImpl implements Command.Interface {
|
|
9
|
+
private panel;
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
category: string;
|
|
14
|
+
keywords: string[];
|
|
15
|
+
icon: React.JSX.Element;
|
|
16
|
+
shortcut: string;
|
|
17
|
+
requiresAssistant: boolean;
|
|
18
|
+
constructor(panel: AiChatsPanelPresenter.Interface);
|
|
19
|
+
execute(): void;
|
|
20
|
+
}
|
|
21
|
+
export declare const AiChatsCommand: typeof AiChatsCommandImpl & {
|
|
22
|
+
__abstraction: import("@webiny/di").Abstraction<import("../abstractions.js").ICommand>;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { Icon } from "@webiny/admin-ui";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/forum.svg";
|
|
4
|
+
import { AiChatsPanelPresenter } from "../../aiChats/abstractions.js";
|
|
5
|
+
import { Command } from "../abstractions.js";
|
|
6
|
+
class AiChatsCommandImpl {
|
|
7
|
+
constructor(panel){
|
|
8
|
+
this.panel = panel;
|
|
9
|
+
this.name = "admin.ai.chats";
|
|
10
|
+
this.label = "AI chats";
|
|
11
|
+
this.description = "Browse saved conversations";
|
|
12
|
+
this.category = "Assistant";
|
|
13
|
+
this.keywords = [
|
|
14
|
+
"ai",
|
|
15
|
+
"chats",
|
|
16
|
+
"assistant",
|
|
17
|
+
"history",
|
|
18
|
+
"conversations"
|
|
19
|
+
];
|
|
20
|
+
this.icon = /*#__PURE__*/ react.createElement(Icon, {
|
|
21
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
22
|
+
size: "sm",
|
|
23
|
+
color: "neutral-strong",
|
|
24
|
+
label: ""
|
|
25
|
+
});
|
|
26
|
+
this.shortcut = "mod+j";
|
|
27
|
+
this.requiresAssistant = true;
|
|
28
|
+
}
|
|
29
|
+
execute() {
|
|
30
|
+
this.panel.toggleHistory();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const AiChatsCommand = Command.createImplementation({
|
|
34
|
+
implementation: AiChatsCommandImpl,
|
|
35
|
+
dependencies: [
|
|
36
|
+
AiChatsPanelPresenter
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
export { AiChatsCommand };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=AiChatsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/commandPalette/commands/AiChatsCommand.js","sources":["../../../../src/presentation/commandPalette/commands/AiChatsCommand.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { ReactComponent as ForumIcon } from \"@webiny/icons/forum.svg\";\nimport { AiChatsPanelPresenter } from \"~/presentation/aiChats/abstractions.js\";\nimport { Command } from \"../abstractions.js\";\n\n/**\n * Opens the AI chats panel on the saved chats, or closes it. Also bound to mod+j, so the panel is\n * one key away without the palette.\n */\nclass AiChatsCommandImpl implements Command.Interface {\n name = \"admin.ai.chats\";\n label = \"AI chats\";\n description = \"Browse saved conversations\";\n category = \"Assistant\";\n keywords = [\"ai\", \"chats\", \"assistant\", \"history\", \"conversations\"];\n icon = <Icon icon={<ForumIcon />} size=\"sm\" color=\"neutral-strong\" label=\"\" />;\n shortcut = \"mod+j\";\n requiresAssistant = true;\n\n constructor(private panel: AiChatsPanelPresenter.Interface) {}\n\n execute(): void {\n this.panel.toggleHistory();\n }\n}\n\nexport const AiChatsCommand = Command.createImplementation({\n implementation: AiChatsCommandImpl,\n dependencies: [AiChatsPanelPresenter]\n});\n"],"names":["AiChatsCommandImpl","panel","Icon","ForumIcon","AiChatsCommand","Command","AiChatsPanelPresenter"],"mappings":";;;;;AAUA,MAAMA;IAUF,YAAoBC,KAAsC,CAAE;aAAxCA,KAAK,GAALA;aATpB,IAAI,GAAG;aACP,KAAK,GAAG;aACR,WAAW,GAAG;aACd,QAAQ,GAAG;aACX,QAAQ,GAAG;YAAC;YAAM;YAAS;YAAa;YAAW;SAAgB;aACnE,IAAI,GAAG,WAAP,GAAO,oBAACC,MAAIA;YAAC,oBAAM,oBAACC,gBAASA;YAAK,MAAK;YAAK,OAAM;YAAiB,OAAM;;aACzE,QAAQ,GAAG;aACX,iBAAiB,GAAG;IAEyC;IAE7D,UAAgB;QACZ,IAAI,CAAC,KAAK,CAAC,aAAa;IAC5B;AACJ;AAEO,MAAMC,iBAAiBC,QAAQ,oBAAoB,CAAC;IACvD,gBAAgBL;IAChB,cAAc;QAACM;KAAsB;AACzC"}
|
|
@@ -18,6 +18,7 @@ declare class AskAiCommandImpl implements Command.Interface {
|
|
|
18
18
|
keywords: string[];
|
|
19
19
|
icon: React.JSX.Element;
|
|
20
20
|
entersAiMode: boolean;
|
|
21
|
+
requiresAssistant: boolean;
|
|
21
22
|
}
|
|
22
23
|
export declare const AskAiCommand: typeof AskAiCommandImpl & {
|
|
23
24
|
__abstraction: import("@webiny/di").Abstraction<import("../abstractions.js").ICommand>;
|
|
@@ -5,8 +5,8 @@ import { Command } from "../abstractions.js";
|
|
|
5
5
|
class AskAiCommandImpl {
|
|
6
6
|
constructor(){
|
|
7
7
|
this.name = "admin.ai.ask";
|
|
8
|
-
this.label = "Ask AI";
|
|
9
|
-
this.description = "Ask about your content
|
|
8
|
+
this.label = "Ask the AI assistant";
|
|
9
|
+
this.description = "Ask about your content, or run an action";
|
|
10
10
|
this.category = "Assistant";
|
|
11
11
|
this.keywords = [
|
|
12
12
|
"ai",
|
|
@@ -22,6 +22,7 @@ class AskAiCommandImpl {
|
|
|
22
22
|
label: ""
|
|
23
23
|
});
|
|
24
24
|
this.entersAiMode = true;
|
|
25
|
+
this.requiresAssistant = true;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
const AskAiCommand = Command.createImplementation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/commandPalette/commands/AskAiCommand.js","sources":["../../../../src/presentation/commandPalette/commands/AskAiCommand.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { ReactComponent as AiIcon } from \"@webiny/icons/auto_awesome.svg\";\nimport { Command } from \"../abstractions.js\";\n\n/**\n * Discoverable entry point for the palette's AI mode.\n *\n * `entersAiMode` rather than `execute`: the design keeps one input row across every mode, so selecting\n * this switches the palette instead of running an action, and the palette stays open. A command\n * without a `detailView` is otherwise executed and then closed, which a mode cannot survive.\n *\n * It exists as a command at all so it stays searchable (\"ai\", \"ask\", \"assistant\") for people who\n * never learn the space shortcut.\n */\nclass AskAiCommandImpl implements Command.Interface {\n name = \"admin.ai.ask\";\n label = \"Ask AI\";\n description = \"Ask about your content
|
|
1
|
+
{"version":3,"file":"presentation/commandPalette/commands/AskAiCommand.js","sources":["../../../../src/presentation/commandPalette/commands/AskAiCommand.tsx"],"sourcesContent":["import React from \"react\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { ReactComponent as AiIcon } from \"@webiny/icons/auto_awesome.svg\";\nimport { Command } from \"../abstractions.js\";\n\n/**\n * Discoverable entry point for the palette's AI mode.\n *\n * `entersAiMode` rather than `execute`: the design keeps one input row across every mode, so selecting\n * this switches the palette instead of running an action, and the palette stays open. A command\n * without a `detailView` is otherwise executed and then closed, which a mode cannot survive.\n *\n * It exists as a command at all so it stays searchable (\"ai\", \"ask\", \"assistant\") for people who\n * never learn the space shortcut.\n */\nclass AskAiCommandImpl implements Command.Interface {\n name = \"admin.ai.ask\";\n label = \"Ask the AI assistant\";\n description = \"Ask about your content, or run an action\";\n category = \"Assistant\";\n keywords = [\"ai\", \"ask\", \"assistant\", \"chat\", \"search\"];\n icon = <Icon icon={<AiIcon />} size=\"sm\" color=\"neutral-strong\" label=\"\" />;\n entersAiMode = true;\n requiresAssistant = true;\n}\n\nexport const AskAiCommand = Command.createImplementation({\n implementation: AskAiCommandImpl,\n dependencies: []\n});\n"],"names":["AskAiCommandImpl","Icon","AiIcon","AskAiCommand","Command"],"mappings":";;;;AAeA,MAAMA;;aACF,IAAI,GAAG;aACP,KAAK,GAAG;aACR,WAAW,GAAG;aACd,QAAQ,GAAG;aACX,QAAQ,GAAG;YAAC;YAAM;YAAO;YAAa;YAAQ;SAAS;aACvD,IAAI,GAAG,WAAP,GAAO,oBAACC,MAAIA;YAAC,oBAAM,oBAACC,gBAAMA;YAAK,MAAK;YAAK,OAAM;YAAiB,OAAM;;aACtE,YAAY,GAAG;aACf,iBAAiB,GAAG;;AACxB;AAEO,MAAMC,eAAeC,QAAQ,oBAAoB,CAAC;IACrD,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -3,12 +3,14 @@ import { CopyCurrentUrlCommand } from "./CopyCurrentUrlCommand.js";
|
|
|
3
3
|
import { SignOutCommand } from "./SignOutCommand.js";
|
|
4
4
|
import { SendMessageCommand } from "./SendMessageCommand.js";
|
|
5
5
|
import { AskAiCommand } from "./AskAiCommand.js";
|
|
6
|
+
import { AiChatsCommand } from "./AiChatsCommand.js";
|
|
6
7
|
const AdminCommandsFeature = createFeature({
|
|
7
8
|
name: "AdminCommands",
|
|
8
9
|
register (container) {
|
|
9
10
|
container.register(CopyCurrentUrlCommand);
|
|
10
11
|
container.register(SignOutCommand);
|
|
11
12
|
container.register(AskAiCommand);
|
|
13
|
+
container.register(AiChatsCommand);
|
|
12
14
|
container.register(SendMessageCommand);
|
|
13
15
|
}
|
|
14
16
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/commandPalette/commands/feature.js","sources":["../../../../src/presentation/commandPalette/commands/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\nimport { CopyCurrentUrlCommand } from \"./CopyCurrentUrlCommand.js\";\nimport { SignOutCommand } from \"./SignOutCommand.js\";\nimport { SendMessageCommand } from \"./SendMessageCommand.js\";\nimport { AskAiCommand } from \"./AskAiCommand.js\";\n\n/**\n * Baseline command-palette actions available everywhere in the admin app. Registered\n * as DI commands; other modules register their own via `Command.createImplementation`.\n */\nexport const AdminCommandsFeature = createFeature({\n name: \"AdminCommands\",\n register(container: Container) {\n container.register(CopyCurrentUrlCommand);\n container.register(SignOutCommand);\n container.register(AskAiCommand);\n // Demo of the detail-view capability — safe to remove.\n container.register(SendMessageCommand);\n }\n});\n"],"names":["AdminCommandsFeature","createFeature","container","CopyCurrentUrlCommand","SignOutCommand","AskAiCommand","SendMessageCommand"],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation/commandPalette/commands/feature.js","sources":["../../../../src/presentation/commandPalette/commands/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { Container } from \"@webiny/di\";\nimport { CopyCurrentUrlCommand } from \"./CopyCurrentUrlCommand.js\";\nimport { SignOutCommand } from \"./SignOutCommand.js\";\nimport { SendMessageCommand } from \"./SendMessageCommand.js\";\nimport { AskAiCommand } from \"./AskAiCommand.js\";\nimport { AiChatsCommand } from \"./AiChatsCommand.js\";\n\n/**\n * Baseline command-palette actions available everywhere in the admin app. Registered\n * as DI commands; other modules register their own via `Command.createImplementation`.\n */\nexport const AdminCommandsFeature = createFeature({\n name: \"AdminCommands\",\n register(container: Container) {\n container.register(CopyCurrentUrlCommand);\n container.register(SignOutCommand);\n container.register(AskAiCommand);\n container.register(AiChatsCommand);\n // Demo of the detail-view capability — safe to remove.\n container.register(SendMessageCommand);\n }\n});\n"],"names":["AdminCommandsFeature","createFeature","container","CopyCurrentUrlCommand","SignOutCommand","AskAiCommand","AiChatsCommand","SendMessageCommand"],"mappings":";;;;;;AAYO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAoB;QACzBA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;QAEnBJ,UAAU,QAAQ,CAACK;IACvB;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { observer as createReactiveComponent } from "mobx-react-lite";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { observer as createReactiveComponent } from "mobx-react-lite";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DebugSessionsRepository } from "../../features/debugger/index.js";
|
|
2
|
+
import { DebuggerPresenter as Abstraction } from "./abstractions.js";
|
|
3
|
+
declare class DebuggerPresenterImpl implements Abstraction.Interface {
|
|
4
|
+
private repository;
|
|
5
|
+
constructor(repository: DebugSessionsRepository.Interface);
|
|
6
|
+
get vm(): Abstraction.ViewModel;
|
|
7
|
+
setCaptureOn(enabled: boolean): void;
|
|
8
|
+
clear(): void;
|
|
9
|
+
downloadReport(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const DebuggerPresenter: typeof DebuggerPresenterImpl & {
|
|
12
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IDebuggerPresenter>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
import { DebugSessionsRepository } from "../../features/debugger/index.js";
|
|
3
|
+
import { DebuggerPresenter } from "./abstractions.js";
|
|
4
|
+
import { downloadJson } from "./downloadJson.js";
|
|
5
|
+
class DebuggerPresenterImpl {
|
|
6
|
+
constructor(repository){
|
|
7
|
+
this.repository = repository;
|
|
8
|
+
makeAutoObservable(this, {
|
|
9
|
+
repository: false
|
|
10
|
+
}, {
|
|
11
|
+
autoBind: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
get vm() {
|
|
15
|
+
return {
|
|
16
|
+
available: this.repository.canCapture(),
|
|
17
|
+
captureOn: this.repository.isCaptureOn(),
|
|
18
|
+
sessionCount: this.repository.getSessions().length,
|
|
19
|
+
entryCount: this.repository.getEntryCount()
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
setCaptureOn(enabled) {
|
|
23
|
+
this.repository.setCaptureOn(enabled);
|
|
24
|
+
}
|
|
25
|
+
clear() {
|
|
26
|
+
this.repository.clear();
|
|
27
|
+
}
|
|
28
|
+
downloadReport() {
|
|
29
|
+
const generatedAt = new Date().toISOString();
|
|
30
|
+
const report = {
|
|
31
|
+
generatedAt,
|
|
32
|
+
sessions: this.repository.getSessions()
|
|
33
|
+
};
|
|
34
|
+
downloadJson(`webiny-debug-${generatedAt}.json`, report);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const DebuggerPresenter_DebuggerPresenter = DebuggerPresenter.createImplementation({
|
|
38
|
+
implementation: DebuggerPresenterImpl,
|
|
39
|
+
dependencies: [
|
|
40
|
+
DebugSessionsRepository
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
export { DebuggerPresenter_DebuggerPresenter as DebuggerPresenter };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=DebuggerPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/debugger/DebuggerPresenter.js","sources":["../../../src/presentation/debugger/DebuggerPresenter.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport { DebugSessionsRepository } from \"~/features/debugger/index.js\";\nimport { DebuggerPresenter as Abstraction } from \"./abstractions.js\";\nimport { downloadJson } from \"./downloadJson.js\";\n\nclass DebuggerPresenterImpl implements Abstraction.Interface {\n constructor(private repository: DebugSessionsRepository.Interface) {\n makeAutoObservable<DebuggerPresenterImpl, \"repository\">(\n this,\n { repository: false },\n { autoBind: true }\n );\n }\n\n get vm(): Abstraction.ViewModel {\n return {\n available: this.repository.canCapture(),\n captureOn: this.repository.isCaptureOn(),\n sessionCount: this.repository.getSessions().length,\n entryCount: this.repository.getEntryCount()\n };\n }\n\n setCaptureOn(enabled: boolean): void {\n this.repository.setCaptureOn(enabled);\n }\n\n clear(): void {\n this.repository.clear();\n }\n\n downloadReport(): void {\n const generatedAt = new Date().toISOString();\n const report = {\n generatedAt,\n sessions: this.repository.getSessions()\n };\n downloadJson(`webiny-debug-${generatedAt}.json`, report);\n }\n}\n\nexport const DebuggerPresenter = Abstraction.createImplementation({\n implementation: DebuggerPresenterImpl,\n dependencies: [DebugSessionsRepository]\n});\n"],"names":["DebuggerPresenterImpl","repository","makeAutoObservable","enabled","generatedAt","Date","report","downloadJson","DebuggerPresenter","Abstraction","DebugSessionsRepository"],"mappings":";;;;AAKA,MAAMA;IACF,YAAoBC,UAA6C,CAAE;aAA/CA,UAAU,GAAVA;QAChBC,mBACI,IAAI,EACJ;YAAE,YAAY;QAAM,GACpB;YAAE,UAAU;QAAK;IAEzB;IAEA,IAAI,KAA4B;QAC5B,OAAO;YACH,WAAW,IAAI,CAAC,UAAU,CAAC,UAAU;YACrC,WAAW,IAAI,CAAC,UAAU,CAAC,WAAW;YACtC,cAAc,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,MAAM;YAClD,YAAY,IAAI,CAAC,UAAU,CAAC,aAAa;QAC7C;IACJ;IAEA,aAAaC,OAAgB,EAAQ;QACjC,IAAI,CAAC,UAAU,CAAC,YAAY,CAACA;IACjC;IAEA,QAAc;QACV,IAAI,CAAC,UAAU,CAAC,KAAK;IACzB;IAEA,iBAAuB;QACnB,MAAMC,cAAc,IAAIC,OAAO,WAAW;QAC1C,MAAMC,SAAS;YACXF;YACA,UAAU,IAAI,CAAC,UAAU,CAAC,WAAW;QACzC;QACAG,aAAa,CAAC,aAAa,EAAEH,YAAY,KAAK,CAAC,EAAEE;IACrD;AACJ;AAEO,MAAME,sCAAoBC,kBAAAA,oBAAgC,CAAC;IAC9D,gBAAgBT;IAChB,cAAc;QAACU;KAAwB;AAC3C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface IDebuggerViewModel {
|
|
2
|
+
available: boolean;
|
|
3
|
+
captureOn: boolean;
|
|
4
|
+
sessionCount: number;
|
|
5
|
+
entryCount: number;
|
|
6
|
+
}
|
|
7
|
+
export interface IDebuggerPresenter {
|
|
8
|
+
readonly vm: IDebuggerViewModel;
|
|
9
|
+
setCaptureOn(enabled: boolean): void;
|
|
10
|
+
clear(): void;
|
|
11
|
+
downloadReport(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const DebuggerPresenter: import("@webiny/di").Abstraction<IDebuggerPresenter>;
|
|
14
|
+
export declare namespace DebuggerPresenter {
|
|
15
|
+
type Interface = IDebuggerPresenter;
|
|
16
|
+
type ViewModel = IDebuggerViewModel;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/debugger/abstractions.js","sources":["../../../src/presentation/debugger/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IDebuggerViewModel {\n // Whether the identity holds the permission; nothing debug related renders without it.\n available: boolean;\n captureOn: boolean;\n sessionCount: number;\n entryCount: number;\n}\n\nexport interface IDebuggerPresenter {\n readonly vm: IDebuggerViewModel;\n setCaptureOn(enabled: boolean): void;\n clear(): void;\n downloadReport(): void;\n}\n\nexport const DebuggerPresenter = createAbstraction<IDebuggerPresenter>(\"DebuggerPresenter\");\n\nexport namespace DebuggerPresenter {\n export type Interface = IDebuggerPresenter;\n export type ViewModel = IDebuggerViewModel;\n}\n"],"names":["DebuggerPresenter","createAbstraction"],"mappings":";AAiBO,MAAMA,oBAAoBC,kBAAsC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { useFeature, useRouter } from "@webiny/app";
|
|
3
|
+
import { DropdownMenu, Tag } from "@webiny/admin-ui";
|
|
4
|
+
import { ReactComponent } from "@webiny/icons/bug_report.svg";
|
|
5
|
+
import { DebuggerIndicator as DebuggerIndicator_js_DebuggerIndicator } from "../../../base/ui/DebuggerIndicator.js";
|
|
6
|
+
import { createReactiveComponent } from "../../createReactiveComponent.js";
|
|
7
|
+
import { DebuggerPresenterFeature } from "../feature.js";
|
|
8
|
+
import { DebuggerRoutes } from "../routes.js";
|
|
9
|
+
const DebuggerIndicatorView = createReactiveComponent(()=>{
|
|
10
|
+
const { presenter } = useFeature(DebuggerPresenterFeature);
|
|
11
|
+
const router = useRouter();
|
|
12
|
+
const { vm } = presenter;
|
|
13
|
+
if (!vm.captureOn) return null;
|
|
14
|
+
const hasEntries = vm.entryCount > 0;
|
|
15
|
+
const content = hasEntries ? `Debug mode (${vm.entryCount})` : "Debug mode";
|
|
16
|
+
const title = hasEntries ? `Debug capture is on. ${vm.entryCount} entries collected.` : "Debug capture is on. Nothing collected yet.";
|
|
17
|
+
return /*#__PURE__*/ react.createElement(DropdownMenu, {
|
|
18
|
+
trigger: /*#__PURE__*/ react.createElement("div", {
|
|
19
|
+
className: "cursor-pointer",
|
|
20
|
+
title: title,
|
|
21
|
+
"data-testid": "debugger-indicator"
|
|
22
|
+
}, /*#__PURE__*/ react.createElement(Tag, {
|
|
23
|
+
variant: "accent-light",
|
|
24
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
25
|
+
content: content
|
|
26
|
+
}))
|
|
27
|
+
}, /*#__PURE__*/ react.createElement(DropdownMenu.Item, {
|
|
28
|
+
text: "Download report",
|
|
29
|
+
disabled: !hasEntries,
|
|
30
|
+
onClick: presenter.downloadReport
|
|
31
|
+
}), /*#__PURE__*/ react.createElement(DropdownMenu.Item, {
|
|
32
|
+
text: "Clear collected data",
|
|
33
|
+
disabled: !hasEntries,
|
|
34
|
+
onClick: presenter.clear
|
|
35
|
+
}), /*#__PURE__*/ react.createElement(DropdownMenu.Separator, null), /*#__PURE__*/ react.createElement(DropdownMenu.Item, {
|
|
36
|
+
text: "Open debugger",
|
|
37
|
+
onClick: ()=>router.goToRoute(DebuggerRoutes.Debugger)
|
|
38
|
+
}));
|
|
39
|
+
});
|
|
40
|
+
const DebuggerIndicator_DebuggerIndicator = DebuggerIndicator_js_DebuggerIndicator.createDecorator(()=>function() {
|
|
41
|
+
return /*#__PURE__*/ react.createElement(DebuggerIndicatorView, null);
|
|
42
|
+
});
|
|
43
|
+
export { DebuggerIndicator_DebuggerIndicator as DebuggerIndicator };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=DebuggerIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/debugger/components/DebuggerIndicator.js","sources":["../../../../src/presentation/debugger/components/DebuggerIndicator.tsx"],"sourcesContent":["import React from \"react\";\nimport { useFeature } from \"@webiny/app\";\nimport { useRouter } from \"@webiny/app\";\nimport { DropdownMenu } from \"@webiny/admin-ui\";\nimport { Tag } from \"@webiny/admin-ui\";\nimport { ReactComponent as DebuggerIcon } from \"@webiny/icons/bug_report.svg\";\nimport { DebuggerIndicator as BaseDebuggerIndicator } from \"~/base/ui/DebuggerIndicator.js\";\nimport { createReactiveComponent } from \"~/presentation/createReactiveComponent.js\";\nimport { DebuggerPresenterFeature } from \"../feature.js\";\nimport { DebuggerRoutes } from \"../routes.js\";\n\n/**\n * Says that capture is on, how much has been collected, and offers what is worth doing about it.\n *\n * Renders nothing while capture is off, which is the normal state. When it is on it is deliberately\n * hard to miss, because leaving capture running is the mistake it exists to prevent.\n *\n * Clearing matters as much as downloading: an hour of browsing collects a great deal, and everything\n * held is in memory and lands in the next report whether or not it is relevant to the problem being\n * reproduced.\n */\nconst DebuggerIndicatorView = createReactiveComponent(() => {\n const { presenter } = useFeature(DebuggerPresenterFeature);\n const router = useRouter();\n const { vm } = presenter;\n\n if (!vm.captureOn) {\n return null;\n }\n\n const hasEntries = vm.entryCount > 0;\n const content = hasEntries ? `Debug mode (${vm.entryCount})` : \"Debug mode\";\n const title = hasEntries\n ? `Debug capture is on. ${vm.entryCount} entries collected.`\n : \"Debug capture is on. Nothing collected yet.\";\n\n return (\n <DropdownMenu\n trigger={\n <div className={\"cursor-pointer\"} title={title} data-testid={\"debugger-indicator\"}>\n <Tag variant={\"accent-light\"} icon={<DebuggerIcon />} content={content} />\n </div>\n }\n >\n <DropdownMenu.Item\n text={\"Download report\"}\n disabled={!hasEntries}\n onClick={presenter.downloadReport}\n />\n <DropdownMenu.Item\n text={\"Clear collected data\"}\n disabled={!hasEntries}\n onClick={presenter.clear}\n />\n <DropdownMenu.Separator />\n <DropdownMenu.Item\n text={\"Open debugger\"}\n onClick={() => router.goToRoute(DebuggerRoutes.Debugger)}\n />\n </DropdownMenu>\n );\n});\n\nexport const DebuggerIndicator = BaseDebuggerIndicator.createDecorator(() => {\n return function DebuggerIndicator() {\n return <DebuggerIndicatorView />;\n };\n});\n"],"names":["DebuggerIndicatorView","createReactiveComponent","presenter","useFeature","DebuggerPresenterFeature","router","useRouter","vm","hasEntries","content","title","DropdownMenu","Tag","DebuggerIcon","DebuggerRoutes","DebuggerIndicator","BaseDebuggerIndicator"],"mappings":";;;;;;;;AAqBA,MAAMA,wBAAwBC,wBAAwB;IAClD,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAMC,SAASC;IACf,MAAM,EAAEC,EAAE,EAAE,GAAGL;IAEf,IAAI,CAACK,GAAG,SAAS,EACb,OAAO;IAGX,MAAMC,aAAaD,GAAG,UAAU,GAAG;IACnC,MAAME,UAAUD,aAAa,CAAC,YAAY,EAAED,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG;IAC/D,MAAMG,QAAQF,aACR,CAAC,qBAAqB,EAAED,GAAG,UAAU,CAAC,mBAAmB,CAAC,GAC1D;IAEN,OAAO,WAAP,GACI,oBAACI,cAAYA;QACT,uBACI,oBAAC;YAAI,WAAW;YAAkB,OAAOD;YAAO,eAAa;yBACzD,oBAACE,KAAGA;YAAC,SAAS;YAAgB,oBAAM,oBAACC,gBAAYA;YAAK,SAASJ;;qBAIvE,oBAACE,aAAa,IAAI;QACd,MAAM;QACN,UAAU,CAACH;QACX,SAASN,UAAU,cAAc;sBAErC,oBAACS,aAAa,IAAI;QACd,MAAM;QACN,UAAU,CAACH;QACX,SAASN,UAAU,KAAK;sBAE5B,oBAACS,aAAa,SAAS,uBACvB,oBAACA,aAAa,IAAI;QACd,MAAM;QACN,SAAS,IAAMN,OAAO,SAAS,CAACS,eAAe,QAAQ;;AAIvE;AAEO,MAAMC,sCAAoBC,uCAAAA,eAAqC,CAAC,IAC5D;QACH,OAAO,WAAP,GAAO,oBAAChB,uBAAqBA;IACjC"}
|