@wildo-ai/saas-frontend-lib 1.1.5 → 1.1.6
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/dist/esm/components/actions/action-bar.d.ts +15 -0
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +15 -0
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.d.ts +97 -7
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +8 -3
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.js +5 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.js.map +1 -1
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +1 -4
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_Register.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Register.js +1 -3
- package/dist/esm/components/auth/Auth_Register.js.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +7 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +13 -7
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js +32 -33
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +18 -20
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.d.ts.map +1 -1
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js +2 -3
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js.map +1 -1
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts +13 -16
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts.map +1 -1
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js +18 -15
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.js +2 -2
- package/dist/esm/components/billing/billing-invoice-history.js.map +1 -1
- package/dist/esm/components/billing/billing-portal-link.js +2 -2
- package/dist/esm/components/billing/billing-portal-link.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts +33 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +34 -5
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +2 -2
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts +2 -0
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +1 -0
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +15 -1
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldArray.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldArray.js +11 -0
- package/dist/esm/components/data-display/DisplayFieldArray.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +2 -2
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts +12 -2
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js +3 -2
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js +2 -2
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js +8 -2
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +18 -4
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +61 -3
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts +7 -5
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts +11 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js +36 -11
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js.map +1 -1
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts +6 -0
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts.map +1 -1
- package/dist/esm/components/data-display/display-field-resolved-props.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts +23 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js +35 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts +47 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +124 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts +8 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js +46 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js.map +1 -0
- package/dist/esm/components/feedback/resource-empty-state.d.ts +21 -8
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +56 -26
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +29 -7
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +231 -101
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +57 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.js +4 -4
- package/dist/esm/components/flows-actors/system-catalog.js.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.js +0 -5
- package/dist/esm/components/flows-actors/system-catalog.labels.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -2
- package/dist/esm/components/form/Form.js +2 -2
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts +28 -3
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +43 -14
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +3 -0
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +60 -21
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/FormFieldArray.d.ts +6 -3
- package/dist/esm/components/form/automated/FormFieldArray.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormFieldArray.js +3 -2
- package/dist/esm/components/form/automated/FormFieldArray.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +5 -4
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +148 -55
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts +30 -0
- package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.js +30 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.js.map +1 -1
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts +79 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts.map +1 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js +203 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js.map +1 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts +12 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts.map +1 -1
- package/dist/esm/components/form/automated/automated-form-submit.utils.js +11 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.js.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js +2 -2
- package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
- package/dist/esm/components/form/combobox.d.ts +7 -0
- package/dist/esm/components/form/combobox.d.ts.map +1 -1
- package/dist/esm/components/form/combobox.js.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.js +13 -0
- package/dist/esm/components/form/controls/form-field-checkbox-group.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.d.ts +58 -0
- package/dist/esm/components/form/fields/form-field-address.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.js +34 -6
- package/dist/esm/components/form/fields/form-field-address.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js +60 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.d.ts +0 -12
- package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.js +34 -13
- package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.labels.js +46 -0
- package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts +73 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts.map +1 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.js +64 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.js.map +1 -0
- package/dist/esm/components/form/fields/form-field-string.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.js +8 -1
- package/dist/esm/components/form/fields/form-field-string.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.labels.js +4 -0
- package/dist/esm/components/form/fields/form-field-string.labels.js.map +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts +31 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.js +81 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.js.map +1 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +14 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +14 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts +22 -0
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js +1 -22
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js.map +1 -1
- package/dist/esm/components/layout/resizable.d.ts +11 -0
- package/dist/esm/components/layout/resizable.d.ts.map +1 -1
- package/dist/esm/components/layout/resizable.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +11 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +15 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js +2 -2
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +18 -20
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +7 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +4 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +18 -2
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js +82 -10
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js +8 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts +8 -2
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.js +6 -2
- package/dist/esm/components/resources/ResourceCollectionToolbar.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js +31 -16
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js +23 -8
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.d.ts +13 -0
- package/dist/esm/components/resources/ResourceLayout_Header.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.js +55 -28
- package/dist/esm/components/resources/ResourceLayout_Header.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +41 -20
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.js +1 -2
- package/dist/esm/components/resources/ResourceLayout_List.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts +9 -4
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.js +30 -11
- package/dist/esm/components/resources/ResourceLayout_Read.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js +4 -2
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js +6 -2
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +30 -14
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js +14 -198
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Update.d.ts +2 -2
- package/dist/esm/components/resources/ResourceLayout_Update.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_Update.js.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js +69 -39
- package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
- package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts +32 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts.map +1 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.js +130 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.js.map +1 -0
- package/dist/esm/components/resources/collection-create-placement.utils.d.ts +32 -0
- package/dist/esm/components/resources/collection-create-placement.utils.d.ts.map +1 -0
- package/dist/esm/components/resources/collection-create-placement.utils.js +37 -0
- package/dist/esm/components/resources/collection-create-placement.utils.js.map +1 -0
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.js +5 -1
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +8 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js +49 -2
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +22 -0
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +85 -2
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/resourceLayout.utils.d.ts +14 -0
- package/dist/esm/components/resources/resourceLayout.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/resourceLayout.utils.js +22 -0
- package/dist/esm/components/resources/resourceLayout.utils.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.js +3 -0
- package/dist/esm/components/resources/skeleton/ArrayField.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +33 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ObjectScope.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ObjectScope.js +3 -0
- package/dist/esm/components/resources/skeleton/ObjectScope.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.d.ts +12 -0
- package/dist/esm/components/resources/skeleton/Section.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.js +28 -2
- package/dist/esm/components/resources/skeleton/Section.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +70 -0
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +157 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts +6 -0
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.js +13 -2
- package/dist/esm/components/resources/skeleton/WizardLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.js +2 -1
- package/dist/esm/components/resources/skeleton/WizardStep.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +61 -15
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts +24 -2
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js +69 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js +18 -19
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +5 -4
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/stepper.d.ts +5 -0
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/components/sections/surface.d.ts.map +1 -1
- package/dist/esm/components/sections/surface.js +12 -3
- package/dist/esm/components/sections/surface.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts +43 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js +129 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js +34 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AppearanceSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.js +9 -11
- package/dist/esm/components/settings/AppPage_AppearanceSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js +3 -2
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.d.ts +4 -2
- package/dist/esm/components/settings/AppPage_BillingSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.js +21 -3
- package/dist/esm/components/settings/AppPage_BillingSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.js +5 -10
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +58 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +243 -40
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +67 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js +19 -11
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js +4 -2
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +3 -0
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js +16 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js.map +1 -1
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts +59 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts.map +1 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.js +136 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.js.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.d.ts +5 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view.utils.js +5 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +50 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.js +72 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -0
- package/dist/esm/components/views/composite-view/CompositeLayout.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.js +2 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +86 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts.map +1 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +187 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -0
- package/dist/esm/core/app-shell/PortalContainerContext.d.ts +5 -2
- package/dist/esm/core/app-shell/PortalContainerContext.d.ts.map +1 -1
- package/dist/esm/core/app-shell/PortalContainerContext.js +5 -2
- package/dist/esm/core/app-shell/PortalContainerContext.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +18 -9
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +1 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/useAppShellLayout.d.ts +10 -0
- package/dist/esm/core/app-shell/useAppShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/useAppShellLayout.js +28 -5
- package/dist/esm/core/app-shell/useAppShellLayout.js.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.js +38 -0
- package/dist/esm/core/app-shell/usePublicShellLayout.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +47 -13
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +25 -2
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +16 -25
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts +11 -3
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.js +14 -8
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/useBillingPlanChange.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingPlanChange.js +2 -0
- package/dist/esm/core/billing/useBillingPlanChange.js.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts +29 -229
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js +29 -327
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js.map +1 -1
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts +17 -27
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts.map +1 -1
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js +28 -48
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +21 -11
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +4 -4
- package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +17 -0
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +17 -0
- package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +10 -10
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +221 -6
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +10 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js +9 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +30 -19
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/ErrorContext.d.ts.map +1 -1
- package/dist/esm/core/errors/ErrorContext.js +9 -1
- package/dist/esm/core/errors/ErrorContext.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +5 -4
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/RouterErrorBoundary.js +1 -1
- package/dist/esm/core/errors/RouterErrorBoundary.js.map +1 -1
- package/dist/esm/core/errors/errors-builder.frontend.services.d.ts +2 -2
- package/dist/esm/core/errors/errors-builder.frontend.services.d.ts.map +1 -1
- package/dist/esm/core/errors/errors-builder.frontend.services.js +4 -4
- package/dist/esm/core/errors/errors-builder.frontend.services.js.map +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +23 -5
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +110 -43
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.js +89 -15
- package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts +2 -0
- package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.js +2 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.js.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js +5 -2
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +63 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +131 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts +61 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js +178 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts +52 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.js +144 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts +22 -1
- package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts.map +1 -1
- package/dist/esm/core/external-providers/ProviderFilePickerHost.js +23 -3
- package/dist/esm/core/external-providers/ProviderFilePickerHost.js.map +1 -1
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts +55 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js +65 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js.map +1 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts +63 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts.map +1 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js +100 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js.map +1 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +45 -7
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +112 -28
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts +32 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.js +91 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.js.map +1 -0
- package/dist/esm/core/guidance/GuidanceRenderer.d.ts.map +1 -1
- package/dist/esm/core/guidance/GuidanceRenderer.js +3 -2
- package/dist/esm/core/guidance/GuidanceRenderer.js.map +1 -1
- package/dist/esm/core/i18n/I18nContext.d.ts +22 -8
- package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
- package/dist/esm/core/i18n/I18nContext.js +21 -9
- package/dist/esm/core/i18n/I18nContext.js.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts +5 -3
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js +5 -3
- package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
- package/dist/esm/core/i18n/useI18n.d.ts +2 -1
- package/dist/esm/core/i18n/useI18n.d.ts.map +1 -1
- package/dist/esm/core/i18n/useI18n.js +2 -1
- package/dist/esm/core/i18n/useI18n.js.map +1 -1
- package/dist/esm/core/loading/LoadingContext.d.ts.map +1 -1
- package/dist/esm/core/loading/LoadingContext.js +7 -1
- package/dist/esm/core/loading/LoadingContext.js.map +1 -1
- package/dist/esm/core/loading/LoadingGate.d.ts.map +1 -1
- package/dist/esm/core/loading/LoadingGate.js +19 -1
- package/dist/esm/core/loading/LoadingGate.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +15 -2
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +183 -20
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +2 -2
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts +7 -15
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js +8 -26
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts +12 -3
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js +3 -2
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts +42 -0
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js +89 -5
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts +2 -0
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js +2 -0
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts +78 -0
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +264 -16
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.d.ts +8 -0
- package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.js +137 -30
- package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +1 -0
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/navigation-cascade.d.ts +46 -0
- package/dist/esm/core/navigation/navigation-cascade.d.ts.map +1 -0
- package/dist/esm/core/navigation/navigation-cascade.js +222 -0
- package/dist/esm/core/navigation/navigation-cascade.js.map +1 -0
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js +21 -2
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts +71 -0
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -0
- package/dist/esm/core/navigation/navigation-controller-internals.js +84 -0
- package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -0
- package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts +86 -2
- package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js +242 -124
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.d.ts +170 -8
- package/dist/esm/core/navigation/navigation.schemas.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.js +121 -2
- package/dist/esm/core/navigation/navigation.schemas.js.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.d.ts +102 -6
- package/dist/esm/core/navigation/navigation.utils.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.js +283 -34
- package/dist/esm/core/navigation/navigation.utils.js.map +1 -1
- package/dist/esm/core/navigation/useIsStackEntryActive.d.ts +0 -10
- package/dist/esm/core/navigation/useIsStackEntryActive.d.ts.map +0 -1
- package/dist/esm/core/navigation/useIsStackEntryActive.js.map +0 -1
- package/dist/esm/core/navigation/useNavigationController.d.ts +28 -157
- package/dist/esm/core/navigation/useNavigationController.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationController.js +211 -1189
- package/dist/esm/core/navigation/useNavigationController.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts +174 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.js +977 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -0
- package/dist/esm/core/navigation/useOverlayTitle.d.ts +13 -1
- package/dist/esm/core/navigation/useOverlayTitle.d.ts.map +1 -1
- package/dist/esm/core/navigation/useOverlayTitle.js +15 -10
- package/dist/esm/core/navigation/useOverlayTitle.js.map +1 -1
- package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts +43 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts.map +1 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.js +44 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.js.map +1 -0
- package/dist/esm/core/navigation/zone-collapse-migration.d.ts +83 -0
- package/dist/esm/core/navigation/zone-collapse-migration.d.ts.map +1 -0
- package/dist/esm/core/navigation/zone-collapse-migration.js +116 -0
- package/dist/esm/core/navigation/zone-collapse-migration.js.map +1 -0
- package/dist/esm/core/navigation/zone-collapse.d.ts +51 -0
- package/dist/esm/core/navigation/zone-collapse.d.ts.map +1 -0
- package/dist/esm/core/navigation/zone-collapse.js +59 -0
- package/dist/esm/core/navigation/zone-collapse.js.map +1 -0
- package/dist/esm/core/navigation/zone-emphasis.d.ts +3 -0
- package/dist/esm/core/navigation/zone-emphasis.d.ts.map +1 -1
- package/dist/esm/core/navigation/zone-emphasis.js +26 -4
- package/dist/esm/core/navigation/zone-emphasis.js.map +1 -1
- package/dist/esm/core/navigation/zone-visible-entry.d.ts +22 -0
- package/dist/esm/core/navigation/zone-visible-entry.d.ts.map +1 -1
- package/dist/esm/core/navigation/zone-visible-entry.js +25 -0
- package/dist/esm/core/navigation/zone-visible-entry.js.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketContext.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketContext.js +53 -18
- package/dist/esm/core/requests/websockets/WebSocketContext.js.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +3 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts +22 -0
- package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/useNotificationBadges.js +72 -3
- package/dist/esm/core/requests/websockets/useNotificationBadges.js.map +1 -1
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts +28 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts.map +1 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js +86 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js.map +1 -0
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +38 -3
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +57 -2
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +4 -2
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts +30 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js +47 -4
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/ResourceRegistryContext.d.ts.map +1 -1
- package/dist/esm/core/resources/ResourceRegistryContext.js +22 -1
- package/dist/esm/core/resources/ResourceRegistryContext.js.map +1 -1
- package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js +1 -1
- package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/frontend-resource.utils.d.ts +22 -1
- package/dist/esm/core/resources/frontend-resource.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/frontend-resource.utils.js +25 -2
- package/dist/esm/core/resources/frontend-resource.utils.js.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts +113 -13
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js +173 -20
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts +11 -0
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js +7 -0
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts +3 -2
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js +13 -5
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts +6 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +90 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +139 -16
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +110 -11
- package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js +3 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts +10 -0
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js +8 -0
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts +7 -0
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.js +9 -2
- package/dist/esm/core/resources/rmm/useResourceRMM.js.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts +59 -0
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -0
- package/dist/esm/core/resources/useOperationDirectExecution.js +278 -0
- package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -0
- package/dist/esm/core/resources/useResourceOperationActions.d.ts +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +69 -22
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts +8 -6
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.js +3 -2
- package/dist/esm/core/resources/useResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +23 -2
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationContext.shared.d.ts +4 -2
- package/dist/esm/core/runtime/ApplicationContext.shared.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationContext.shared.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +12 -2
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +5 -2
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +25 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +37 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +21 -2
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +51 -4
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.d.ts +11 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +70 -22
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +10 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.js +72 -8
- package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts +7 -0
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/route-organization-access.frontend.utils.js +8 -2
- package/dist/esm/core/security/route-organization-access.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.d.ts +30 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.d.ts.map +1 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.js +38 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -0
- package/dist/esm/core/ui/UIContext.d.ts.map +1 -1
- package/dist/esm/core/ui/UIContext.js +10 -6
- package/dist/esm/core/ui/UIContext.js.map +1 -1
- package/dist/esm/core/ui/color-conversion.utils.d.ts +20 -0
- package/dist/esm/core/ui/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/color-conversion.utils.js +39 -5
- package/dist/esm/core/ui/color-conversion.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.d.ts.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.js +22 -2
- package/dist/esm/core/ui/themes/default.theme.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts +6 -6
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.js +3 -3
- package/dist/esm/core/ui/ui.frontend.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +10 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +19 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/app-shell-placement-coverage.d.ts +43 -0
- package/dist/esm/testing/app-shell-placement-coverage.d.ts.map +1 -0
- package/dist/esm/testing/app-shell-placement-coverage.js +114 -0
- package/dist/esm/testing/app-shell-placement-coverage.js.map +1 -0
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +5 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/esm/testing.d.ts +1 -0
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/testing.js +1 -0
- package/dist/esm/testing.js.map +1 -1
- package/package.json +9 -7
- package/dist/esm/core/navigation/useIsStackEntryActive.js +0 -15
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -2,31 +2,90 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { AI_ApprovalRequest, AI_ApprovalQueue, AI_DecisionRequest, AI_HumanInputRequest, } from "../../components/ai-elements/decision/approval.js";
|
|
5
|
+
import { AGENT_WORK_REASON_CODE_VOCABULARY, ApplicationConfigVocabulary, HumanDecision_Act, HumanDecision_ActOutcomeKind, HumanDecision_Plane, HumanDecision_RefusalReason, HumanDecision_RouteKind, HumanDecision_ToolApprovalOption, ReviewDeadlineKind, ServiceProviderExpertApprovalOption, } from "@wildo-ai/saas-models";
|
|
6
|
+
import { usePendingDecisions } from "../../core/flows-actors/usePendingDecisions.js";
|
|
5
7
|
import { useFlowsActors } from "../../core/flows-actors/useFlowsActors.js";
|
|
6
|
-
import {
|
|
7
|
-
import { FrontendComponentType } from "@wildo-ai/presets-components-models";
|
|
8
|
+
import { FrontendComponentType, LabellingTypes } from "@wildo-ai/presets-components-models";
|
|
8
9
|
import { useI18n } from "../../core/i18n/useI18n.js";
|
|
9
10
|
import { describeApprovalModificationRefusal } from "../../components/flows-actors/approval-modification-refusal.utils.js";
|
|
11
|
+
//===============================================================
|
|
12
|
+
// Flows-Actors Approval Wrappers
|
|
13
|
+
//
|
|
14
|
+
// Thin context-wired wrappers over the preset decision components.
|
|
15
|
+
//
|
|
16
|
+
// - FlowsActors_ApprovalRequest answers a decision IN its conversation, over the socket the turn runs on.
|
|
17
|
+
// - FlowsActors_ApprovalQueue is the person's INBOX: every decision they may act on, read from the server
|
|
18
|
+
// (#1594 D6), answered and moved over REST.
|
|
19
|
+
// - FlowsActors_DecisionRequest / FlowsActors_HumanInputRequest answer in the one answer shape,
|
|
20
|
+
// `HumanDecision_Answer` (#1594 D12). They used to send a comment prefixed `[DECISION]` / `[INPUT]` as a
|
|
21
|
+
// tool DENIAL, which nothing on the server read: the choice was dropped and the call refused.
|
|
22
|
+
//===============================================================
|
|
23
|
+
/**
|
|
24
|
+
* What an act came to, in the approval's own labels. Total over the outcome vocabulary, so an outcome added
|
|
25
|
+
* tomorrow is a compile error here rather than a silent act.
|
|
26
|
+
*/
|
|
27
|
+
function noticeOfOutcome(outcome, t) {
|
|
28
|
+
const byKind = {
|
|
29
|
+
[HumanDecision_ActOutcomeKind.APPLIED]: undefined,
|
|
30
|
+
// An admitted person's refused clock act names why (#1628); anything else stays one undisclosing notice.
|
|
31
|
+
[HumanDecision_ActOutcomeKind.NOT_ACTIONABLE]: outcome.reason === HumanDecision_RefusalReason.CLOCK_ALREADY_PAUSED ? t("noticeClockAlreadyPaused")
|
|
32
|
+
: outcome.reason === HumanDecision_RefusalReason.CLOCK_NOT_PAUSED ? t("noticeClockNotPaused")
|
|
33
|
+
: outcome.reason === HumanDecision_RefusalReason.PAUSE_STATE_NOT_DECLARED ? t("noticePauseStateNotDeclared")
|
|
34
|
+
: t("noticeNotActionable"),
|
|
35
|
+
[HumanDecision_ActOutcomeKind.LAPSED]: t("noticeLapsed"),
|
|
36
|
+
[HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED]: t("noticeRequesterAuthorityLapsed"),
|
|
37
|
+
[HumanDecision_ActOutcomeKind.MODIFICATION_REJECTED]: t("noticeModificationRejected"),
|
|
38
|
+
[HumanDecision_ActOutcomeKind.REASON_CODE_REJECTED]: t("noticeReasonCodeRejected"),
|
|
39
|
+
[HumanDecision_ActOutcomeKind.CONSENT_REQUIRED]: t("noticeConsentRequired"),
|
|
40
|
+
[HumanDecision_ActOutcomeKind.TARGET_REFUSED]: outcome.reason === HumanDecision_RefusalReason.NO_TARGET ? t("noticeNoEscalationTarget") : t("noticeTargetRefused"),
|
|
41
|
+
[HumanDecision_ActOutcomeKind.SUPERSEDED]: t("noticeSuperseded"),
|
|
42
|
+
};
|
|
43
|
+
return byKind[outcome.kind];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The reason picker's options (#1921): each declared code with its word from `system_enums.AgentWorkReasonCode.<code>`.
|
|
47
|
+
*
|
|
48
|
+
* The codes are the APPLICATION's (`agentWorkReview.reasonCodes`); their words live under the framework's named
|
|
49
|
+
* vocabulary, where the labelling pipeline plans one key per declared code. A code nobody has worded yet shows as the
|
|
50
|
+
* code itself — `tSystemEnum` answers the raw value on a miss — which is a missing label that looks missing, never words
|
|
51
|
+
* invented from the identifier. Exported for the pin that holds that fallback.
|
|
52
|
+
*/
|
|
53
|
+
export function describeReasonCodeOptions(reasonCodes, tSystemEnum) {
|
|
54
|
+
if (!reasonCodes || reasonCodes.length === 0)
|
|
55
|
+
return undefined;
|
|
56
|
+
return reasonCodes.map((code) => ({ value: code, label: tSystemEnum(AGENT_WORK_REASON_CODE_VOCABULARY, code) }));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A gate's pause states as the words a reviewer reads (#1864): each state's word under the framework's named vocabulary
|
|
60
|
+
* `system_enums.HumanDecisionPauseState.<state>`, which the labelling pipeline plans from every gate's declared
|
|
61
|
+
* `pauseStates`. A state nobody has worded yet shows as itself — `tSystemEnum` answers the raw value on a miss — a
|
|
62
|
+
* missing label that looks missing. Exported for the pin that holds it.
|
|
63
|
+
*/
|
|
64
|
+
export function describePauseState(pauseState, tSystemEnum) {
|
|
65
|
+
return tSystemEnum(ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, pauseState);
|
|
66
|
+
}
|
|
67
|
+
/** The label namespaces the approval wrappers read beyond their own component: the reason codes' (#1921) and pause states' (#1864) words. */
|
|
68
|
+
const APPROVAL_LABEL_NAMESPACES = [LabellingTypes.SYSTEM_ENUMS];
|
|
10
69
|
export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
11
70
|
const { executions, respondToApproval } = useFlowsActors();
|
|
12
|
-
const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });
|
|
71
|
+
const { tComponent, tSystemEnum } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: APPROVAL_LABEL_NAMESPACES });
|
|
13
72
|
const [processingId, setProcessingId] = React.useState(null);
|
|
14
73
|
const execution = executions.get(executionId);
|
|
15
74
|
const pendingApproval = execution?.pendingApproval;
|
|
16
75
|
// Every hook runs BEFORE the early return below. React requires the same hooks on every render, and the render
|
|
17
76
|
// that clears `pendingApproval` — the moment a decision is answered — used to run three fewer (#534 fourth
|
|
18
77
|
// review F1).
|
|
19
|
-
const handleApprove = React.useCallback((id, comment, modifiedToolArgs) => {
|
|
20
|
-
setProcessingId(id);
|
|
21
|
-
respondToApproval(executionId, id, true, comment, modifiedToolArgs);
|
|
22
|
-
}, [executionId, respondToApproval]);
|
|
23
|
-
const handleDeny = React.useCallback((id, comment) => {
|
|
78
|
+
const handleApprove = React.useCallback((id, comment, modifiedToolArgs, reasonCode) => {
|
|
24
79
|
setProcessingId(id);
|
|
25
|
-
|
|
80
|
+
// The reason rides only when given, so an answer without one keeps the call shape it always had.
|
|
81
|
+
respondToApproval(executionId, id, true, comment, modifiedToolArgs, ...(reasonCode ? [reasonCode] : []));
|
|
26
82
|
}, [executionId, respondToApproval]);
|
|
27
|
-
const
|
|
83
|
+
const handleDeny = React.useCallback((id, comment, reasonCode) => {
|
|
28
84
|
setProcessingId(id);
|
|
29
|
-
|
|
85
|
+
if (reasonCode)
|
|
86
|
+
respondToApproval(executionId, id, false, comment, undefined, reasonCode);
|
|
87
|
+
else
|
|
88
|
+
respondToApproval(executionId, id, false, comment);
|
|
30
89
|
}, [executionId, respondToApproval]);
|
|
31
90
|
// A decision answered and then handed BACK arrives as a new pending approval — a refused edit (#587), or a
|
|
32
91
|
// decision the consent requirement refused (#534). Whatever this component recorded as in flight has been
|
|
@@ -36,119 +95,190 @@ export function FlowsActors_ApprovalRequest({ executionId, ...props }) {
|
|
|
36
95
|
}, [pendingApproval]);
|
|
37
96
|
if (!execution || !pendingApproval)
|
|
38
97
|
return null;
|
|
39
|
-
const { approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs, toolInputSchema, modificationRefusal, rejectedToolArgs, } = pendingApproval;
|
|
40
|
-
|
|
98
|
+
const { approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs, toolInputSchema, modificationRefusal, rejectedToolArgs, routeKind, reasonCodes, reasonCodeRefused, } = pendingApproval;
|
|
99
|
+
/*
|
|
100
|
+
* Only an OWNER-routed decision is answered here. One routed to an assignee or a role is answered by a
|
|
101
|
+
* reviewer from their inbox, and the person whose conversation this is may not answer it (separation of
|
|
102
|
+
* duties, #1594) — so it shows as waiting, with nothing to press that the server would refuse.
|
|
103
|
+
*
|
|
104
|
+
* There is no Escalate here either. It used to send a DENIAL prefixed `[ESCALATED]`, which refused the call
|
|
105
|
+
* and escalated nothing; an OWNER route cannot be escalated at all, and a reviewer escalates from the inbox.
|
|
106
|
+
*/
|
|
107
|
+
const answerable = routeKind === undefined || routeKind === HumanDecision_RouteKind.OWNER;
|
|
108
|
+
return (_jsx(AI_ApprovalRequest, { approvalId: approvalId, actionDescription: actionDescription, riskLevel: riskLevel, executionId: executionId, systemRef: execution.systemRef, expiresAt: expiresAt, requiredRoles: requiredRoles, answerable: answerable,
|
|
109
|
+
// A refused reason code leaves the approval standing (#1921): it is back on screen, and says why in its own labels.
|
|
110
|
+
actionNotice: !answerable
|
|
111
|
+
? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, "awaitingReview")
|
|
112
|
+
: reasonCodeRefused ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, "noticeReasonCodeRejected") : undefined, reasonCodeOptions: answerable ? describeReasonCodeOptions(reasonCodes, tSystemEnum) : undefined,
|
|
41
113
|
/*
|
|
42
114
|
* The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.
|
|
43
115
|
* `toolArgs` are the proposed arguments — a person approving "rename this record" is approving
|
|
44
116
|
* a specific new title, and an approval surface that hides them is asking for a signature on an
|
|
45
117
|
* unread document.
|
|
46
118
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* audit trail that what executed was not what was proposed. So the editor is offered here.
|
|
52
|
-
*
|
|
53
|
-
* `allowArgumentModification` is not defaulted by the preset and IS defaulted on by this
|
|
54
|
-
* wrapper: the preset cannot know whether its decision path carries the result, whereas this
|
|
55
|
-
* one is the path, and it does. A caller who wants a read-only surface passes `false`.
|
|
119
|
+
* #566 built the carrier for an edited call: the payload takes `modifiedToolArgs`, the server
|
|
120
|
+
* re-validates them against the tool's own `inputSchema`, re-signs the approval over them and
|
|
121
|
+
* records that the decider changed them. So the editor is offered here, where the decision is
|
|
122
|
+
* answered — never where it is only shown.
|
|
56
123
|
*/
|
|
57
|
-
allowArgumentModification:
|
|
124
|
+
allowArgumentModification: answerable, toolName: toolName, executionContext: toolArgs, argumentsSchema: toolInputSchema,
|
|
58
125
|
// The refusal in the approval's own labels, naming the tool and the offending arguments (#1186).
|
|
59
126
|
argumentModificationError: modificationRefusal
|
|
60
127
|
? describeApprovalModificationRefusal(modificationRefusal, (labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params))
|
|
61
|
-
: undefined, rejectedArguments: rejectedToolArgs, onApprove: handleApprove, onDeny: handleDeny,
|
|
128
|
+
: undefined, rejectedArguments: rejectedToolArgs, onApprove: handleApprove, onDeny: handleDeny,
|
|
62
129
|
// Released by the effect above whenever the approval is handed back. Not released while the socket is
|
|
63
130
|
// disconnected: `respondToApproval` then sends nothing and leaves the approval exactly as it was, so its
|
|
64
131
|
// identity never changes — a stuck state that predates #534 and is cured by the view remounting.
|
|
65
132
|
isProcessing: processingId === approvalId, ...props }));
|
|
66
133
|
}
|
|
134
|
+
//===============================================================
|
|
135
|
+
// FlowsActors_ApprovalQueue
|
|
136
|
+
//
|
|
137
|
+
// The person's inbox: every decision they may act on, from the server.
|
|
138
|
+
//===============================================================
|
|
139
|
+
/**
|
|
140
|
+
* What one inbox card SAYS, per plane. A tool approval names the tool (an identifier, travelling as a parameter)
|
|
141
|
+
* and shows its proposed arguments; an expert admission (#1612) says which firm asks to admit which person, in the
|
|
142
|
+
* approval's own words, and shows no argument table — there is no tool, and the client's own data is not on the card.
|
|
143
|
+
*/
|
|
144
|
+
function describeInboxCard(card, t, roleLabel = (roleKey) => roleKey) {
|
|
145
|
+
const admission = card.plane === HumanDecision_Plane.SERVICE_PROVIDER_EXPERT_ADMISSION ? card.serviceProviderExpertAdmission : undefined;
|
|
146
|
+
if (admission) {
|
|
147
|
+
// Names and email are DATA the firm and its expert supplied; the firm's id and the expert's id stand in when unreadable.
|
|
148
|
+
// The role and the scope are what the approver is granting, so the line names both (#1612 review L3). The role is
|
|
149
|
+
// worded by the roles label tree (`tRole`), never shown as its identifier; the scope by its own label.
|
|
150
|
+
const unitCount = admission.organizationUnitIds?.length ?? 0;
|
|
151
|
+
return {
|
|
152
|
+
actionDescription: t("inboxExpertAdmission", {
|
|
153
|
+
firm: admission.providerOrganizationName ?? admission.providerOrganizationId,
|
|
154
|
+
expert: admission.expertName ?? admission.expertEmail ?? admission.expertUserId,
|
|
155
|
+
email: admission.expertEmail ?? admission.expertUserId,
|
|
156
|
+
role: roleLabel(admission.role),
|
|
157
|
+
scope: unitCount > 0 ? t("inboxExpertAdmissionScopeUnits", { count: String(unitCount) }) : t("inboxExpertAdmissionScopeOrganization"),
|
|
158
|
+
}),
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
// The words are the approval's own label; the tool name is an identifier and travels as a parameter.
|
|
163
|
+
actionDescription: t("inboxToolCall", { toolName: card.toolName }),
|
|
164
|
+
toolName: card.toolName,
|
|
165
|
+
executionContext: card.toolArgs,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
67
168
|
export function FlowsActors_ApprovalQueue(props) {
|
|
68
|
-
const {
|
|
169
|
+
const { decisions, act, candidates } = usePendingDecisions();
|
|
170
|
+
const { tComponent, tRole, tSystemEnum, formatDateTime } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: APPROVAL_LABEL_NAMESPACES });
|
|
171
|
+
const t = React.useCallback((labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params), [tComponent]);
|
|
172
|
+
// Keyed by decisionRef: a decision is in flight from the act until its outcome returns.
|
|
173
|
+
const [processing, setProcessing] = React.useState(() => new Set());
|
|
174
|
+
const [notices, setNotices] = React.useState(() => new Map());
|
|
175
|
+
const [reassignCandidates, setReassignCandidates] = React.useState(() => new Map());
|
|
176
|
+
const run = React.useCallback(async (decisionRef, decisionAct, request) => {
|
|
177
|
+
setProcessing((previous) => new Set(previous).add(decisionRef));
|
|
178
|
+
try {
|
|
179
|
+
const outcome = await act(decisionRef, decisionAct, request);
|
|
180
|
+
const notice = noticeOfOutcome(outcome, t);
|
|
181
|
+
setNotices((previous) => {
|
|
182
|
+
const next = new Map(previous);
|
|
183
|
+
if (notice === undefined)
|
|
184
|
+
next.delete(decisionRef);
|
|
185
|
+
else
|
|
186
|
+
next.set(decisionRef, notice);
|
|
187
|
+
return next;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
catch {
|
|
191
|
+
// Not an outcome the server reported (a network failure): say it did not take, and leave it answerable.
|
|
192
|
+
setNotices((previous) => new Map(previous).set(decisionRef, t("noticeNotActionable")));
|
|
193
|
+
}
|
|
194
|
+
finally {
|
|
195
|
+
setProcessing((previous) => {
|
|
196
|
+
const next = new Set(previous);
|
|
197
|
+
next.delete(decisionRef);
|
|
198
|
+
return next;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}, [act, t]);
|
|
202
|
+
const items = React.useMemo(() => decisions.map((card) => ({
|
|
203
|
+
approvalId: card.decisionRef,
|
|
204
|
+
executionId: card.executionId,
|
|
205
|
+
systemRef: card.systemRef,
|
|
206
|
+
...describeInboxCard(card, t, (roleKey) => (tRole ? tRole(roleKey, 'label') : roleKey)),
|
|
207
|
+
expiresAt: card.expiresAt ? new Date(card.expiresAt) : undefined,
|
|
208
|
+
createdAt: new Date(card.requestedAt),
|
|
209
|
+
// Only the acts the server says this person may perform — computed with the rule every act is checked by.
|
|
210
|
+
// The inbox's Escalate names nobody, so it is offered only where the gate declares where escalations go;
|
|
211
|
+
// handing it to a person of the reviewer's choosing is Reassign.
|
|
212
|
+
canEscalate: card.permittedActs.includes(HumanDecision_Act.ESCALATE) && card.declaresEscalationTarget,
|
|
213
|
+
canClaim: card.permittedActs.includes(HumanDecision_Act.CLAIM),
|
|
214
|
+
canUnclaim: card.permittedActs.includes(HumanDecision_Act.UNCLAIM),
|
|
215
|
+
canReassign: card.permittedActs.includes(HumanDecision_Act.REASSIGN),
|
|
216
|
+
reassignCandidates: reassignCandidates.get(card.decisionRef),
|
|
217
|
+
actionNotice: notices.get(card.decisionRef),
|
|
218
|
+
// #1628 — the next deadline, or why its deadlines are paused; Pause only with a declared reason to name.
|
|
219
|
+
canPauseClock: card.permittedActs.includes(HumanDecision_Act.PAUSE_CLOCK) && !card.clockPause && card.pauseStates.length > 0,
|
|
220
|
+
canResumeClock: card.permittedActs.includes(HumanDecision_Act.RESUME_CLOCK) && !!card.clockPause,
|
|
221
|
+
// A pause state is the APPLICATION's identifier, shown as its word (#1864) — see `describePauseState`.
|
|
222
|
+
pauseStateOptions: card.pauseStates.map((pauseState) => ({ value: pauseState, label: describePauseState(pauseState, tSystemEnum) })),
|
|
223
|
+
deadlineNotice: card.nextDeadline
|
|
224
|
+
? t(card.nextDeadline.kind === ReviewDeadlineKind.CLAIM ? "deadlineClaimBy" : "deadlineDecisionBy", { when: formatDateTime(card.nextDeadline.dueAt) })
|
|
225
|
+
: undefined,
|
|
226
|
+
clockPausedNotice: card.clockPause ? t("clockPausedIn", { pauseState: describePauseState(card.clockPause.pauseStateRef, tSystemEnum) }) : undefined,
|
|
227
|
+
// #1921 — the reviewer may give a reason from the application's vocabulary when correcting the agent, and may
|
|
228
|
+
// CORRECT it by editing the call: the act request carries `modifiedToolArgs`, which the server re-validates against
|
|
229
|
+
// the tool's own schema. Only on a tool approval — an expert admission has no call to edit and no agent to correct.
|
|
230
|
+
reasonCodeOptions: describeReasonCodeOptions(card.reasonCodes, tSystemEnum),
|
|
231
|
+
allowArgumentModification: card.plane === HumanDecision_Plane.CONVERSATIONAL,
|
|
232
|
+
argumentsSchema: card.toolInputSchema,
|
|
233
|
+
})), [decisions, reassignCandidates, notices, t, tRole, tSystemEnum, formatDateTime]);
|
|
69
234
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* An id alone cannot tell "still waiting for the server" from "handed back": a refused edit (#587) or a decision
|
|
73
|
-
* the consent requirement refused (#534) returns under the SAME `approvalId`. What differs is the object — the
|
|
74
|
-
* context clears the approval when it is answered and restores a new one when it is handed back — so an id counts
|
|
75
|
-
* as in flight only while the current pending approval for it is still the very object that was answered (#534
|
|
76
|
-
* fifth review M1). Until then the item stays disabled, which is what stops a double submit.
|
|
77
|
-
*
|
|
78
|
-
* Not released while the socket is disconnected: `respondToApproval` then sends nothing and leaves the approval
|
|
79
|
-
* exactly as it was, so its object never changes and the item stays disabled until the component remounts — the
|
|
80
|
-
* same pre-existing stuck state the chat view's wrapper documents.
|
|
81
|
-
*
|
|
82
|
-
* DERIVED on every render rather than pruned by an effect: an effect keyed on `executions` would depend on the
|
|
83
|
-
* context replacing its map on every change, and a release that silently stops working when that changes is the
|
|
84
|
-
* defect this exists to remove.
|
|
235
|
+
* An answer in the one answer shape: the option chosen, and no values. Which option refs "approve" and "deny" mean
|
|
236
|
+
* depends on the decision's plane — a tool approval's, or an expert admission's (#1612) — so the card decides.
|
|
85
237
|
*/
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
expiresAt: execution.pendingApproval.expiresAt,
|
|
99
|
-
requiredRoles: execution.pendingApproval.requiredRoles,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
238
|
+
const answer = React.useCallback((decisionRef, approve, comment, modifiedToolArgs, reasonCode) => {
|
|
239
|
+
const plane = decisions.find((card) => card.decisionRef === decisionRef)?.plane;
|
|
240
|
+
const optionRef = plane === HumanDecision_Plane.SERVICE_PROVIDER_EXPERT_ADMISSION
|
|
241
|
+
? (approve ? ServiceProviderExpertApprovalOption.APPROVE : ServiceProviderExpertApprovalOption.REJECT)
|
|
242
|
+
: (approve ? HumanDecision_ToolApprovalOption.APPROVE : HumanDecision_ToolApprovalOption.DENY);
|
|
243
|
+
void run(decisionRef, HumanDecision_Act.ANSWER, {
|
|
244
|
+
answer: { decisionId: decisionRef, optionRef, values: [] },
|
|
245
|
+
...(comment ? { reason: comment } : {}),
|
|
246
|
+
// Only when the reviewer edited the call: an absent field means "run it as proposed" (#566).
|
|
247
|
+
...(modifiedToolArgs ? { modifiedToolArgs } : {}),
|
|
248
|
+
// Why the reviewer corrected the agent (#1921); refused with REASON_CODE_REJECTED unless the application declares it.
|
|
249
|
+
...(reasonCode ? { reasonCode } : {}),
|
|
102
250
|
});
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
});
|
|
110
|
-
const processingIds = new Set();
|
|
111
|
-
for (const [approvalId, answeredApproval] of answered) {
|
|
112
|
-
if (currentPending.get(approvalId) === answeredApproval)
|
|
113
|
-
processingIds.add(approvalId);
|
|
114
|
-
}
|
|
115
|
-
const respond = React.useCallback((approvalId, approved, comment) => {
|
|
116
|
-
const item = items.find((i) => i.approvalId === approvalId);
|
|
117
|
-
if (!item)
|
|
118
|
-
return;
|
|
119
|
-
const answeredApproval = executions.get(item.executionId)?.pendingApproval;
|
|
120
|
-
// Entries whose approval has since moved on are dropped here, so the map never outgrows the queue.
|
|
121
|
-
setAnswered((previous) => {
|
|
122
|
-
const next = new Map();
|
|
123
|
-
previous.forEach((value, id) => { if (currentPending.get(id) === value)
|
|
124
|
-
next.set(id, value); });
|
|
125
|
-
return next.set(approvalId, answeredApproval);
|
|
251
|
+
}, [run, decisions]);
|
|
252
|
+
const handleReassignOpen = React.useCallback((decisionRef) => {
|
|
253
|
+
setReassignCandidates((previous) => {
|
|
254
|
+
const next = new Map(previous);
|
|
255
|
+
next.delete(decisionRef);
|
|
256
|
+
return next;
|
|
126
257
|
});
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, [respond]);
|
|
135
|
-
const handleEscalate = React.useCallback((approvalId, comment) => {
|
|
136
|
-
respond(approvalId, false, `[ESCALATED] ${comment ?? ""}`);
|
|
137
|
-
}, [respond]);
|
|
138
|
-
return (_jsx(AI_ApprovalQueue, { items: items, onApprove: handleApprove, onDeny: handleDeny, onEscalate: handleEscalate, processingIds: processingIds, ...props }));
|
|
258
|
+
void candidates(decisionRef)
|
|
259
|
+
.then((people) => setReassignCandidates((previous) => new Map(previous).set(decisionRef,
|
|
260
|
+
// The membership's email is how a same-organization reviewer tells people apart; it is data, not a label.
|
|
261
|
+
people.map((person) => ({ value: person.userId, label: person.email ?? person.userId })))))
|
|
262
|
+
.catch(() => setReassignCandidates((previous) => new Map(previous).set(decisionRef, [])));
|
|
263
|
+
}, [candidates]);
|
|
264
|
+
return (_jsx(AI_ApprovalQueue, { items: items, onApprove: (decisionRef, comment, modifiedToolArgs, reasonCode) => answer(decisionRef, true, comment, modifiedToolArgs, reasonCode), onDeny: (decisionRef, comment, reasonCode) => answer(decisionRef, false, comment, undefined, reasonCode), onEscalate: (decisionRef, comment) => void run(decisionRef, HumanDecision_Act.ESCALATE, comment ? { reason: comment } : {}), onClaim: (decisionRef) => void run(decisionRef, HumanDecision_Act.CLAIM, {}), onUnclaim: (decisionRef) => void run(decisionRef, HumanDecision_Act.UNCLAIM, {}), onReassignOpen: handleReassignOpen, onReassign: (decisionRef, targetUserId, comment) => void run(decisionRef, HumanDecision_Act.REASSIGN, { targetUserId, ...(comment ? { reason: comment } : {}) }), onPauseClock: (decisionRef, pauseStateRef) => void run(decisionRef, HumanDecision_Act.PAUSE_CLOCK, { pauseStateRef }), onResumeClock: (decisionRef) => void run(decisionRef, HumanDecision_Act.RESUME_CLOCK, {}), processingIds: processing, ...props }));
|
|
139
265
|
}
|
|
140
|
-
export function FlowsActors_DecisionRequest({
|
|
141
|
-
const {
|
|
266
|
+
export function FlowsActors_DecisionRequest({ onOutcome, ...props }) {
|
|
267
|
+
const { act } = usePendingDecisions({ list: false });
|
|
268
|
+
const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });
|
|
142
269
|
const handleSelect = React.useCallback((decisionId, optionId) => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
270
|
+
void act(decisionId, HumanDecision_Act.ANSWER, { answer: { decisionId, optionRef: optionId, values: [] } })
|
|
271
|
+
.then((outcome) => onOutcome?.(noticeOfOutcome(outcome, (ref) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, ref))));
|
|
272
|
+
}, [act, onOutcome, tComponent]);
|
|
273
|
+
return _jsx(AI_DecisionRequest, { ...props, onSelect: handleSelect });
|
|
146
274
|
}
|
|
147
|
-
export function FlowsActors_HumanInputRequest({
|
|
148
|
-
const {
|
|
275
|
+
export function FlowsActors_HumanInputRequest({ optionRef, fieldRef, onOutcome, ...props }) {
|
|
276
|
+
const { act } = usePendingDecisions({ list: false });
|
|
277
|
+
const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });
|
|
149
278
|
const handleSubmit = React.useCallback((requestId, value) => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
279
|
+
void act(requestId, HumanDecision_Act.ANSWER, { answer: { decisionId: requestId, optionRef, values: [{ ref: fieldRef, value }] } })
|
|
280
|
+
.then((outcome) => onOutcome?.(noticeOfOutcome(outcome, (ref) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, ref))));
|
|
281
|
+
}, [act, optionRef, fieldRef, onOutcome, tComponent]);
|
|
282
|
+
return _jsx(AI_HumanInputRequest, { ...props, onSubmit: handleSubmit });
|
|
153
283
|
}
|
|
154
284
|
//# sourceMappingURL=approval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GAMrB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AACtF,OAAO,EAAE,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B,EAAE,EAAE;QAC9E,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,QAAQ,EAAE,CAAC,CAAC;IAC7E,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,kBAAkB,OACb,KAAK,EACT,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,6BAA6B,CAAC,EAC5C,WAAW,EACX,GAAG,KAAK,EAC2B;IACnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/C,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,SAAiB,EAAE,KAAa,EAAE,EAAE;QAC1E,iBAAiB,CAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,KAAK,EAAE,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,oBAAoB,OACf,KAAK,EACT,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n AI_DecisionRequest,\n AI_HumanInputRequest,\n type AI_ApprovalQueueItem,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionRequestProps,\n type AI_HumanInputRequestProps,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport { FlowsActorsExecutionStatus, type FlowsActorsExecution } from \"~wildo-frontend-lib/core/flows-actors/FlowsActorsContext\";\nimport type { ComponentProps } from \"react\";\nimport { FrontendComponentType } from \"@wildo-ai/presets-components-models\"\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { describeApprovalModificationRefusal } from \"~wildo-frontend-lib/components/flows-actors/approval-modification-refusal.utils\";\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers that:\n// 1. Import generic preset components (AI_ApprovalRequest, etc.)\n// 2. Inject useFlowsActors() to get executions + respondToApproval()\n// 3. Aggregate pending approvals across all executions into the queue\n// 4. Wire onApprove/onDeny/onEscalate callbacks to respondToApproval()\n//===============================================================\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// Wraps AI_ApprovalRequest with context-wired callbacks.\n// Accepts executionId — pulls pendingApproval from context.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval } = useFlowsActors();\n const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n const execution = executions.get(executionId);\n const pendingApproval = execution?.pendingApproval;\n\n // Every hook runs BEFORE the early return below. React requires the same hooks on every render, and the render\n // that clears `pendingApproval` — the moment a decision is answered — used to run three fewer (#534 fourth\n // review F1).\n const handleApprove = React.useCallback((id: string, comment?: string, modifiedToolArgs?: Record<string, unknown>) => {\n setProcessingId(id);\n respondToApproval(executionId, id, true, comment, modifiedToolArgs);\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n const handleEscalate = React.useCallback((id: string, comment?: string) => {\n setProcessingId(id);\n respondToApproval(executionId, id, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [executionId, respondToApproval]);\n\n // A decision answered and then handed BACK arrives as a new pending approval — a refused edit (#587), or a\n // decision the consent requirement refused (#534). Whatever this component recorded as in flight has been\n // answered, so the decision is answerable again instead of staying disabled until the view remounts.\n React.useEffect(() => {\n setProcessingId(null);\n }, [pendingApproval]);\n\n if (!execution || !pendingApproval) return null;\n\n const {\n approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs, toolInputSchema, modificationRefusal,\n rejectedToolArgs,\n } = pendingApproval;\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n requiredRoles={requiredRoles}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * They were DISPLAYED and never edited, because the response payload had no field to carry a\n * modification and an editable form would have collected changes the protocol then dropped.\n * #566 built the carrier: the payload takes `modifiedToolArgs`, the server re-validates them\n * against the tool's own `inputSchema`, re-signs the approval over them and records on the\n * audit trail that what executed was not what was proposed. So the editor is offered here.\n *\n * `allowArgumentModification` is not defaulted by the preset and IS defaulted on by this\n * wrapper: the preset cannot know whether its decision path carries the result, whereas this\n * one is the path, and it does. A caller who wants a read-only surface passes `false`.\n */\n allowArgumentModification\n toolName={toolName}\n executionContext={toolArgs}\n argumentsSchema={toolInputSchema}\n // The refusal in the approval's own labels, naming the tool and the offending arguments (#1186).\n argumentModificationError={modificationRefusal\n ? describeApprovalModificationRefusal(modificationRefusal, (labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params))\n : undefined}\n rejectedArguments={rejectedToolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n // Released by the effect above whenever the approval is handed back. Not released while the socket is\n // disconnected: `respondToApproval` then sends nothing and leaves the approval exactly as it was, so its\n // identity never changes — a stuck state that predates #534 and is cured by the view remounting.\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// Aggregates all pending approvals from all active executions\n// into a single queue. Auto-refreshes via WebSocket events.\n//===============================================================\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"processingIds\"\n>;\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { executions, respondToApproval } = useFlowsActors();\n /**\n * Each answered approval, keyed by id, mapped to the pending-approval OBJECT that was answered.\n *\n * An id alone cannot tell \"still waiting for the server\" from \"handed back\": a refused edit (#587) or a decision\n * the consent requirement refused (#534) returns under the SAME `approvalId`. What differs is the object — the\n * context clears the approval when it is answered and restores a new one when it is handed back — so an id counts\n * as in flight only while the current pending approval for it is still the very object that was answered (#534\n * fifth review M1). Until then the item stays disabled, which is what stops a double submit.\n *\n * Not released while the socket is disconnected: `respondToApproval` then sends nothing and leaves the approval\n * exactly as it was, so its object never changes and the item stays disabled until the component remounts — the\n * same pre-existing stuck state the chat view's wrapper documents.\n *\n * DERIVED on every render rather than pruned by an effect: an effect keyed on `executions` would depend on the\n * context replacing its map on every change, and a release that silently stops working when that changes is the\n * defect this exists to remove.\n */\n const [answered, setAnswered] = React.useState<ReadonlyMap<string, unknown>>(() => new Map());\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => {\n const result: AI_ApprovalQueueItem[] = [];\n executions.forEach((execution) => {\n if (\n execution.status === FlowsActorsExecutionStatus.AWAITING_APPROVAL &&\n execution.pendingApproval\n ) {\n result.push({\n approvalId: execution.pendingApproval.approvalId,\n executionId: execution.executionId,\n systemRef: execution.systemRef,\n actionDescription: execution.pendingApproval.actionDescription,\n riskLevel: execution.pendingApproval.riskLevel,\n expiresAt: execution.pendingApproval.expiresAt,\n requiredRoles: execution.pendingApproval.requiredRoles,\n });\n }\n });\n return result;\n }, [executions]);\n\n const currentPending = new Map<string, unknown>();\n executions.forEach((execution) => {\n if (execution.pendingApproval) currentPending.set(execution.pendingApproval.approvalId, execution.pendingApproval);\n });\n const processingIds = new Set<string>();\n for (const [approvalId, answeredApproval] of answered) {\n if (currentPending.get(approvalId) === answeredApproval) processingIds.add(approvalId);\n }\n\n const respond = React.useCallback((approvalId: string, approved: boolean, comment?: string) => {\n const item = items.find((i) => i.approvalId === approvalId);\n if (!item) return;\n\n const answeredApproval = executions.get(item.executionId)?.pendingApproval;\n // Entries whose approval has since moved on are dropped here, so the map never outgrows the queue.\n setAnswered((previous) => {\n const next = new Map<string, unknown>();\n previous.forEach((value, id) => { if (currentPending.get(id) === value) next.set(id, value); });\n return next.set(approvalId, answeredApproval);\n });\n respondToApproval(item.executionId, approvalId, approved, comment);\n }, [items, executions, respondToApproval]);\n\n const handleApprove = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, true, comment);\n }, [respond]);\n\n const handleDeny = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, comment);\n }, [respond]);\n\n const handleEscalate = React.useCallback((approvalId: string, comment?: string) => {\n respond(approvalId, false, `[ESCALATED] ${comment ?? \"\"}`);\n }, [respond]);\n\n return (\n <AI_ApprovalQueue\n items={items}\n onApprove={handleApprove}\n onDeny={handleDeny}\n onEscalate={handleEscalate}\n processingIds={processingIds}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_DecisionRequest\n//\n// Wraps AI_DecisionRequest — selection is forwarded to\n// respondToApproval() using the optionId as the comment.\n//===============================================================\n\nexport type FlowsActors_DecisionRequestProps = Omit<\n AI_DecisionRequestProps,\n \"onSelect\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_DecisionRequest({\n executionId,\n ...props\n}: FlowsActors_DecisionRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSelect = React.useCallback((decisionId: string, optionId: string) => {\n respondToApproval(executionId, decisionId, true, `[DECISION] ${optionId}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_DecisionRequest\n {...props}\n onSelect={handleSelect}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_HumanInputRequest\n//\n// Wraps AI_HumanInputRequest — submitted value is forwarded to\n// respondToApproval() as the comment.\n//===============================================================\n\nexport type FlowsActors_HumanInputRequestProps = Omit<\n AI_HumanInputRequestProps,\n \"onSubmit\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_HumanInputRequest({\n executionId,\n ...props\n}: FlowsActors_HumanInputRequestProps): React.JSX.Element {\n const { respondToApproval } = useFlowsActors();\n\n const handleSubmit = React.useCallback((requestId: string, value: string) => {\n respondToApproval(executionId, requestId, true, `[INPUT] ${value}`);\n }, [executionId, respondToApproval]);\n\n return (\n <AI_HumanInputRequest\n {...props}\n onSubmit={handleSubmit}\n />\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../../../src/components/flows-actors/approval.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GAQrB,MAAM,8DAA8D,CAAC;AACtE,OAAO,EACL,iCAAiC,EACjC,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,gCAAgC,EAChC,kBAAkB,EAClB,mCAAmC,GAIpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAGtF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,iFAAiF,CAAC;A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AAoB,OAAK,KAAK,EAAE,QAAQ,EAAE,YAAY,GAAI,CAAC;AACrE,CAAC","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n AI_ApprovalRequest,\n AI_ApprovalQueue,\n AI_DecisionRequest,\n AI_HumanInputRequest,\n type AI_ApprovalQueueItem,\n type AI_ApprovalReasonCodeOption,\n type AI_ApprovalReassignCandidate,\n type AI_ApprovalRequestProps,\n type AI_ApprovalQueueProps,\n type AI_DecisionRequestProps,\n type AI_HumanInputRequestProps,\n} from \"~wildo-frontend-lib/components/ai-elements/decision/approval\";\nimport {\n AGENT_WORK_REASON_CODE_VOCABULARY,\n ApplicationConfigVocabulary,\n HumanDecision_Act,\n HumanDecision_ActOutcomeKind,\n HumanDecision_Plane,\n HumanDecision_RefusalReason,\n HumanDecision_RouteKind,\n HumanDecision_ToolApprovalOption,\n ReviewDeadlineKind,\n ServiceProviderExpertApprovalOption,\n type HumanDecision_ActOutcome,\n type HumanDecision_ActRequest,\n type HumanDecision_PendingCard,\n} from \"@wildo-ai/saas-models\";\nimport { usePendingDecisions } from \"~wildo-frontend-lib/core/flows-actors/usePendingDecisions\";\nimport { useFlowsActors } from \"~wildo-frontend-lib/core/flows-actors/useFlowsActors\";\nimport type { ComponentProps } from \"react\";\nimport type { SerializableZodSchema } from \"@wildo-ai/zod-decorators\";\nimport { FrontendComponentType, LabellingTypes } from \"@wildo-ai/presets-components-models\"\nimport { useI18n } from \"~wildo-frontend-lib/core/i18n/useI18n\";\nimport { describeApprovalModificationRefusal } from \"~wildo-frontend-lib/components/flows-actors/approval-modification-refusal.utils\";\n\n//===============================================================\n// Flows-Actors Approval Wrappers\n//\n// Thin context-wired wrappers over the preset decision components.\n//\n// - FlowsActors_ApprovalRequest answers a decision IN its conversation, over the socket the turn runs on.\n// - FlowsActors_ApprovalQueue is the person's INBOX: every decision they may act on, read from the server\n// (#1594 D6), answered and moved over REST.\n// - FlowsActors_DecisionRequest / FlowsActors_HumanInputRequest answer in the one answer shape,\n// `HumanDecision_Answer` (#1594 D12). They used to send a comment prefixed `[DECISION]` / `[INPUT]` as a\n// tool DENIAL, which nothing on the server read: the choice was dropped and the call refused.\n//===============================================================\n\n/**\n * What an act came to, in the approval's own labels. Total over the outcome vocabulary, so an outcome added\n * tomorrow is a compile error here rather than a silent act.\n */\nfunction noticeOfOutcome(\n outcome: HumanDecision_ActOutcome,\n t: (labelRef: string) => string,\n): string | undefined {\n const byKind: Readonly<Record<HumanDecision_ActOutcomeKind, string | undefined>> = {\n [HumanDecision_ActOutcomeKind.APPLIED]: undefined,\n // An admitted person's refused clock act names why (#1628); anything else stays one undisclosing notice.\n [HumanDecision_ActOutcomeKind.NOT_ACTIONABLE]: outcome.reason === HumanDecision_RefusalReason.CLOCK_ALREADY_PAUSED ? t(\"noticeClockAlreadyPaused\")\n : outcome.reason === HumanDecision_RefusalReason.CLOCK_NOT_PAUSED ? t(\"noticeClockNotPaused\")\n : outcome.reason === HumanDecision_RefusalReason.PAUSE_STATE_NOT_DECLARED ? t(\"noticePauseStateNotDeclared\")\n : t(\"noticeNotActionable\"),\n [HumanDecision_ActOutcomeKind.LAPSED]: t(\"noticeLapsed\"),\n [HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED]: t(\"noticeRequesterAuthorityLapsed\"),\n [HumanDecision_ActOutcomeKind.MODIFICATION_REJECTED]: t(\"noticeModificationRejected\"),\n [HumanDecision_ActOutcomeKind.REASON_CODE_REJECTED]: t(\"noticeReasonCodeRejected\"),\n [HumanDecision_ActOutcomeKind.CONSENT_REQUIRED]: t(\"noticeConsentRequired\"),\n [HumanDecision_ActOutcomeKind.TARGET_REFUSED]: outcome.reason === HumanDecision_RefusalReason.NO_TARGET ? t(\"noticeNoEscalationTarget\") : t(\"noticeTargetRefused\"),\n [HumanDecision_ActOutcomeKind.SUPERSEDED]: t(\"noticeSuperseded\"),\n };\n return byKind[outcome.kind];\n}\n\n/**\n * The reason picker's options (#1921): each declared code with its word from `system_enums.AgentWorkReasonCode.<code>`.\n *\n * The codes are the APPLICATION's (`agentWorkReview.reasonCodes`); their words live under the framework's named\n * vocabulary, where the labelling pipeline plans one key per declared code. A code nobody has worded yet shows as the\n * code itself — `tSystemEnum` answers the raw value on a miss — which is a missing label that looks missing, never words\n * invented from the identifier. Exported for the pin that holds that fallback.\n */\nexport function describeReasonCodeOptions(\n reasonCodes: readonly string[] | undefined,\n tSystemEnum: (enumName: typeof AGENT_WORK_REASON_CODE_VOCABULARY, enumValue: string) => string,\n): AI_ApprovalReasonCodeOption[] | undefined {\n if (!reasonCodes || reasonCodes.length === 0) return undefined;\n return reasonCodes.map((code) => ({ value: code, label: tSystemEnum(AGENT_WORK_REASON_CODE_VOCABULARY, code) }));\n}\n\n/**\n * A gate's pause states as the words a reviewer reads (#1864): each state's word under the framework's named vocabulary\n * `system_enums.HumanDecisionPauseState.<state>`, which the labelling pipeline plans from every gate's declared\n * `pauseStates`. A state nobody has worded yet shows as itself — `tSystemEnum` answers the raw value on a miss — a\n * missing label that looks missing. Exported for the pin that holds it.\n */\nexport function describePauseState(\n pauseState: string,\n tSystemEnum: (enumName: ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, enumValue: string) => string,\n): string {\n return tSystemEnum(ApplicationConfigVocabulary.HUMAN_DECISION_PAUSE_STATE, pauseState);\n}\n\n/** The label namespaces the approval wrappers read beyond their own component: the reason codes' (#1921) and pause states' (#1864) words. */\nconst APPROVAL_LABEL_NAMESPACES = [LabellingTypes.SYSTEM_ENUMS];\n\n//===============================================================\n// FlowsActors_ApprovalRequest\n//\n// A decision answered in the conversation it was raised in.\n//===============================================================\n\nexport type FlowsActors_ApprovalRequestProps = Omit<\n AI_ApprovalRequestProps,\n \"approvalId\" | \"actionDescription\" | \"riskLevel\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"answerable\"\n> & {\n executionId: string;\n};\n\nexport function FlowsActors_ApprovalRequest({\n executionId,\n ...props\n}: FlowsActors_ApprovalRequestProps): React.JSX.Element | null {\n const { executions, respondToApproval } = useFlowsActors();\n const { tComponent, tSystemEnum } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: APPROVAL_LABEL_NAMESPACES });\n const [processingId, setProcessingId] = React.useState<string | null>(null);\n const execution = executions.get(executionId);\n const pendingApproval = execution?.pendingApproval;\n\n // Every hook runs BEFORE the early return below. React requires the same hooks on every render, and the render\n // that clears `pendingApproval` — the moment a decision is answered — used to run three fewer (#534 fourth\n // review F1).\n const handleApprove = React.useCallback((id: string, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n setProcessingId(id);\n // The reason rides only when given, so an answer without one keeps the call shape it always had.\n respondToApproval(executionId, id, true, comment, modifiedToolArgs, ...(reasonCode ? [reasonCode] : []));\n }, [executionId, respondToApproval]);\n\n const handleDeny = React.useCallback((id: string, comment?: string, reasonCode?: string) => {\n setProcessingId(id);\n if (reasonCode) respondToApproval(executionId, id, false, comment, undefined, reasonCode);\n else respondToApproval(executionId, id, false, comment);\n }, [executionId, respondToApproval]);\n\n // A decision answered and then handed BACK arrives as a new pending approval — a refused edit (#587), or a\n // decision the consent requirement refused (#534). Whatever this component recorded as in flight has been\n // answered, so the decision is answerable again instead of staying disabled until the view remounts.\n React.useEffect(() => {\n setProcessingId(null);\n }, [pendingApproval]);\n\n if (!execution || !pendingApproval) return null;\n\n const {\n approvalId, actionDescription, riskLevel, expiresAt, requiredRoles, toolName, toolArgs, toolInputSchema, modificationRefusal,\n rejectedToolArgs, routeKind, reasonCodes, reasonCodeRefused,\n } = pendingApproval;\n /*\n * Only an OWNER-routed decision is answered here. One routed to an assignee or a role is answered by a\n * reviewer from their inbox, and the person whose conversation this is may not answer it (separation of\n * duties, #1594) — so it shows as waiting, with nothing to press that the server would refuse.\n *\n * There is no Escalate here either. It used to send a DENIAL prefixed `[ESCALATED]`, which refused the call\n * and escalated nothing; an OWNER route cannot be escalated at all, and a reviewer escalates from the inbox.\n */\n const answerable = routeKind === undefined || routeKind === HumanDecision_RouteKind.OWNER;\n\n return (\n <AI_ApprovalRequest\n approvalId={approvalId}\n actionDescription={actionDescription}\n riskLevel={riskLevel}\n executionId={executionId}\n systemRef={execution.systemRef}\n expiresAt={expiresAt}\n requiredRoles={requiredRoles}\n answerable={answerable}\n // A refused reason code leaves the approval standing (#1921): it is back on screen, and says why in its own labels.\n actionNotice={!answerable\n ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"awaitingReview\")\n : reasonCodeRefused ? tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, \"noticeReasonCodeRejected\") : undefined}\n reasonCodeOptions={answerable ? describeReasonCodeOptions(reasonCodes, tSystemEnum) : undefined}\n /*\n * The tool call is WHAT is being approved, and until #528 it did not reach the browser at all.\n * `toolArgs` are the proposed arguments — a person approving \"rename this record\" is approving\n * a specific new title, and an approval surface that hides them is asking for a signature on an\n * unread document.\n *\n * #566 built the carrier for an edited call: the payload takes `modifiedToolArgs`, the server\n * re-validates them against the tool's own `inputSchema`, re-signs the approval over them and\n * records that the decider changed them. So the editor is offered here, where the decision is\n * answered — never where it is only shown.\n */\n allowArgumentModification={answerable}\n toolName={toolName}\n executionContext={toolArgs}\n argumentsSchema={toolInputSchema}\n // The refusal in the approval's own labels, naming the tool and the offending arguments (#1186).\n argumentModificationError={modificationRefusal\n ? describeApprovalModificationRefusal(modificationRefusal, (labelRef, params) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef, params))\n : undefined}\n rejectedArguments={rejectedToolArgs}\n onApprove={handleApprove}\n onDeny={handleDeny}\n // Released by the effect above whenever the approval is handed back. Not released while the socket is\n // disconnected: `respondToApproval` then sends nothing and leaves the approval exactly as it was, so its\n // identity never changes — a stuck state that predates #534 and is cured by the view remounting.\n isProcessing={processingId === approvalId}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_ApprovalQueue\n//\n// The person's inbox: every decision they may act on, from the server.\n//===============================================================\n\n/**\n * What one inbox card SAYS, per plane. A tool approval names the tool (an identifier, travelling as a parameter)\n * and shows its proposed arguments; an expert admission (#1612) says which firm asks to admit which person, in the\n * approval's own words, and shows no argument table — there is no tool, and the client's own data is not on the card.\n */\nfunction describeInboxCard(\n card: HumanDecision_PendingCard,\n t: (labelRef: string, params?: Record<string, string>) => string,\n roleLabel: (roleKey: string) => string = (roleKey) => roleKey,\n): Pick<AI_ApprovalQueueItem, 'actionDescription' | 'toolName' | 'executionContext'> {\n const admission = card.plane === HumanDecision_Plane.SERVICE_PROVIDER_EXPERT_ADMISSION ? card.serviceProviderExpertAdmission : undefined;\n if (admission) {\n // Names and email are DATA the firm and its expert supplied; the firm's id and the expert's id stand in when unreadable.\n // The role and the scope are what the approver is granting, so the line names both (#1612 review L3). The role is\n // worded by the roles label tree (`tRole`), never shown as its identifier; the scope by its own label.\n const unitCount = admission.organizationUnitIds?.length ?? 0;\n return {\n actionDescription: t(\"inboxExpertAdmission\", {\n firm: admission.providerOrganizationName ?? admission.providerOrganizationId,\n expert: admission.expertName ?? admission.expertEmail ?? admission.expertUserId,\n email: admission.expertEmail ?? admission.expertUserId,\n role: roleLabel(admission.role),\n scope: unitCount > 0 ? t(\"inboxExpertAdmissionScopeUnits\", { count: String(unitCount) }) : t(\"inboxExpertAdmissionScopeOrganization\"),\n }),\n };\n }\n return {\n // The words are the approval's own label; the tool name is an identifier and travels as a parameter.\n actionDescription: t(\"inboxToolCall\", { toolName: card.toolName }),\n toolName: card.toolName,\n executionContext: card.toolArgs,\n };\n}\n\nexport type FlowsActors_ApprovalQueueProps = Omit<\n AI_ApprovalQueueProps,\n \"items\" | \"onApprove\" | \"onDeny\" | \"onEscalate\" | \"onClaim\" | \"onUnclaim\" | \"onReassignOpen\" | \"onReassign\" | \"onPauseClock\" | \"onResumeClock\" | \"processingIds\"\n>;\n\nexport function FlowsActors_ApprovalQueue(props: FlowsActors_ApprovalQueueProps): React.JSX.Element {\n const { decisions, act, candidates } = usePendingDecisions();\n const { tComponent, tRole, tSystemEnum, formatDateTime } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL, keys: APPROVAL_LABEL_NAMESPACES });\n const t = React.useCallback(\n (labelRef: string, params?: Record<string, string>) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, labelRef as never, params),\n [tComponent],\n );\n // Keyed by decisionRef: a decision is in flight from the act until its outcome returns.\n const [processing, setProcessing] = React.useState<ReadonlySet<string>>(() => new Set());\n const [notices, setNotices] = React.useState<ReadonlyMap<string, string>>(() => new Map());\n const [reassignCandidates, setReassignCandidates] = React.useState<ReadonlyMap<string, readonly AI_ApprovalReassignCandidate[]>>(() => new Map());\n\n const run = React.useCallback(async (decisionRef: string, decisionAct: HumanDecision_Act, request: HumanDecision_ActRequest) => {\n setProcessing((previous) => new Set(previous).add(decisionRef));\n try {\n const outcome = await act(decisionRef, decisionAct, request);\n const notice = noticeOfOutcome(outcome, t);\n setNotices((previous) => {\n const next = new Map(previous);\n if (notice === undefined) next.delete(decisionRef); else next.set(decisionRef, notice);\n return next;\n });\n } catch {\n // Not an outcome the server reported (a network failure): say it did not take, and leave it answerable.\n setNotices((previous) => new Map(previous).set(decisionRef, t(\"noticeNotActionable\")));\n } finally {\n setProcessing((previous) => {\n const next = new Set(previous);\n next.delete(decisionRef);\n return next;\n });\n }\n }, [act, t]);\n\n const items: AI_ApprovalQueueItem[] = React.useMemo(() => decisions.map((card) => ({\n approvalId: card.decisionRef,\n executionId: card.executionId,\n systemRef: card.systemRef,\n ...describeInboxCard(card, t, (roleKey) => (tRole ? tRole(roleKey, 'label') : roleKey)),\n expiresAt: card.expiresAt ? new Date(card.expiresAt) : undefined,\n createdAt: new Date(card.requestedAt),\n // Only the acts the server says this person may perform — computed with the rule every act is checked by.\n // The inbox's Escalate names nobody, so it is offered only where the gate declares where escalations go;\n // handing it to a person of the reviewer's choosing is Reassign.\n canEscalate: card.permittedActs.includes(HumanDecision_Act.ESCALATE) && card.declaresEscalationTarget,\n canClaim: card.permittedActs.includes(HumanDecision_Act.CLAIM),\n canUnclaim: card.permittedActs.includes(HumanDecision_Act.UNCLAIM),\n canReassign: card.permittedActs.includes(HumanDecision_Act.REASSIGN),\n reassignCandidates: reassignCandidates.get(card.decisionRef),\n actionNotice: notices.get(card.decisionRef),\n // #1628 — the next deadline, or why its deadlines are paused; Pause only with a declared reason to name.\n canPauseClock: card.permittedActs.includes(HumanDecision_Act.PAUSE_CLOCK) && !card.clockPause && card.pauseStates.length > 0,\n canResumeClock: card.permittedActs.includes(HumanDecision_Act.RESUME_CLOCK) && !!card.clockPause,\n // A pause state is the APPLICATION's identifier, shown as its word (#1864) — see `describePauseState`.\n pauseStateOptions: card.pauseStates.map((pauseState) => ({ value: pauseState, label: describePauseState(pauseState, tSystemEnum) })),\n deadlineNotice: card.nextDeadline\n ? t(card.nextDeadline.kind === ReviewDeadlineKind.CLAIM ? \"deadlineClaimBy\" : \"deadlineDecisionBy\", { when: formatDateTime(card.nextDeadline.dueAt) })\n : undefined,\n clockPausedNotice: card.clockPause ? t(\"clockPausedIn\", { pauseState: describePauseState(card.clockPause.pauseStateRef, tSystemEnum) }) : undefined,\n // #1921 — the reviewer may give a reason from the application's vocabulary when correcting the agent, and may\n // CORRECT it by editing the call: the act request carries `modifiedToolArgs`, which the server re-validates against\n // the tool's own schema. Only on a tool approval — an expert admission has no call to edit and no agent to correct.\n reasonCodeOptions: describeReasonCodeOptions(card.reasonCodes, tSystemEnum),\n allowArgumentModification: card.plane === HumanDecision_Plane.CONVERSATIONAL,\n argumentsSchema: card.toolInputSchema as SerializableZodSchema | undefined,\n })), [decisions, reassignCandidates, notices, t, tRole, tSystemEnum, formatDateTime]);\n\n /**\n * An answer in the one answer shape: the option chosen, and no values. Which option refs \"approve\" and \"deny\" mean\n * depends on the decision's plane — a tool approval's, or an expert admission's (#1612) — so the card decides.\n */\n const answer = React.useCallback((decisionRef: string, approve: boolean, comment?: string, modifiedToolArgs?: Record<string, unknown>, reasonCode?: string) => {\n const plane = decisions.find((card) => card.decisionRef === decisionRef)?.plane;\n const optionRef = plane === HumanDecision_Plane.SERVICE_PROVIDER_EXPERT_ADMISSION\n ? (approve ? ServiceProviderExpertApprovalOption.APPROVE : ServiceProviderExpertApprovalOption.REJECT)\n : (approve ? HumanDecision_ToolApprovalOption.APPROVE : HumanDecision_ToolApprovalOption.DENY);\n void run(decisionRef, HumanDecision_Act.ANSWER, {\n answer: { decisionId: decisionRef, optionRef, values: [] },\n ...(comment ? { reason: comment } : {}),\n // Only when the reviewer edited the call: an absent field means \"run it as proposed\" (#566).\n ...(modifiedToolArgs ? { modifiedToolArgs } : {}),\n // Why the reviewer corrected the agent (#1921); refused with REASON_CODE_REJECTED unless the application declares it.\n ...(reasonCode ? { reasonCode } : {}),\n });\n }, [run, decisions]);\n\n const handleReassignOpen = React.useCallback((decisionRef: string) => {\n setReassignCandidates((previous) => {\n const next = new Map(previous);\n next.delete(decisionRef);\n return next;\n });\n void candidates(decisionRef)\n .then((people) => setReassignCandidates((previous) => new Map(previous).set(\n decisionRef,\n // The membership's email is how a same-organization reviewer tells people apart; it is data, not a label.\n people.map((person) => ({ value: person.userId, label: person.email ?? person.userId })),\n )))\n .catch(() => setReassignCandidates((previous) => new Map(previous).set(decisionRef, [])));\n }, [candidates]);\n\n return (\n <AI_ApprovalQueue\n items={items}\n onApprove={(decisionRef, comment, modifiedToolArgs, reasonCode) => answer(decisionRef, true, comment, modifiedToolArgs, reasonCode)}\n onDeny={(decisionRef, comment, reasonCode) => answer(decisionRef, false, comment, undefined, reasonCode)}\n onEscalate={(decisionRef, comment) => void run(decisionRef, HumanDecision_Act.ESCALATE, comment ? { reason: comment } : {})}\n onClaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.CLAIM, {})}\n onUnclaim={(decisionRef) => void run(decisionRef, HumanDecision_Act.UNCLAIM, {})}\n onReassignOpen={handleReassignOpen}\n onReassign={(decisionRef, targetUserId, comment) => void run(decisionRef, HumanDecision_Act.REASSIGN, { targetUserId, ...(comment ? { reason: comment } : {}) })}\n onPauseClock={(decisionRef, pauseStateRef) => void run(decisionRef, HumanDecision_Act.PAUSE_CLOCK, { pauseStateRef })}\n onResumeClock={(decisionRef) => void run(decisionRef, HumanDecision_Act.RESUME_CLOCK, {})}\n processingIds={processing as Set<string>}\n {...props}\n />\n );\n}\n\n//===============================================================\n// FlowsActors_DecisionRequest\n//\n// A decision with named options, answered in the one answer shape (#1594 D12).\n//===============================================================\n\nexport type FlowsActors_DecisionRequestProps = Omit<AI_DecisionRequestProps, \"onSelect\"> & {\n /** Told what the answer came to — nothing on success, a localized notice otherwise. */\n onOutcome?: (notice: string | undefined) => void;\n};\n\nexport function FlowsActors_DecisionRequest({ onOutcome, ...props }: FlowsActors_DecisionRequestProps): React.JSX.Element {\n const { act } = usePendingDecisions({ list: false });\n const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });\n\n const handleSelect = React.useCallback((decisionId: string, optionId: string) => {\n void act(decisionId, HumanDecision_Act.ANSWER, { answer: { decisionId, optionRef: optionId, values: [] } })\n .then((outcome) => onOutcome?.(noticeOfOutcome(outcome, (ref) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, ref as never))));\n }, [act, onOutcome, tComponent]);\n\n return <AI_DecisionRequest {...props} onSelect={handleSelect} />;\n}\n\n//===============================================================\n// FlowsActors_HumanInputRequest\n//\n// A free-text question, answered in the one answer shape: the option that proceeds with the value, and the\n// value under the field it answers.\n//===============================================================\n\nexport type FlowsActors_HumanInputRequestProps = Omit<AI_HumanInputRequestProps, \"onSubmit\"> & {\n /** The decision's option that proceeds WITH values — the one a submitted answer chooses. */\n optionRef: string;\n /** The decision's field this input answers. */\n fieldRef: string;\n onOutcome?: (notice: string | undefined) => void;\n};\n\nexport function FlowsActors_HumanInputRequest({ optionRef, fieldRef, onOutcome, ...props }: FlowsActors_HumanInputRequestProps): React.JSX.Element {\n const { act } = usePendingDecisions({ list: false });\n const { tComponent } = useI18n({ component: FrontendComponentType.LOW_LEVEL_AI_APPROVAL });\n\n const handleSubmit = React.useCallback((requestId: string, value: string) => {\n void act(requestId, HumanDecision_Act.ANSWER, { answer: { decisionId: requestId, optionRef, values: [{ ref: fieldRef, value }] } })\n .then((outcome) => onOutcome?.(noticeOfOutcome(outcome, (ref) => tComponent(FrontendComponentType.LOW_LEVEL_AI_APPROVAL, ref as never))));\n }, [act, optionRef, fieldRef, onOutcome, tComponent]);\n\n return <AI_HumanInputRequest {...props} onSubmit={handleSubmit} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"approval.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/flows-actors/approval.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAuHzD,CAAC"}
|
|
@@ -7,6 +7,63 @@ export const LowLevelAiApprovalLabels = [
|
|
|
7
7
|
{ ref: 'deny', kind: LabelKind.BUTTON, purpose: 'Button to deny the pending request' },
|
|
8
8
|
{ ref: 'escalate', kind: LabelKind.BUTTON, purpose: 'Button to escalate the request to a higher approver' },
|
|
9
9
|
{ ref: 'queueTitle', kind: LabelKind.HEADING, purpose: 'Heading for the approval queue' },
|
|
10
|
+
// #1594 — moving a decision between people, and what an act came to.
|
|
11
|
+
{ ref: 'claim', kind: LabelKind.BUTTON, purpose: 'Button taking a request routed to a role the person holds, so it is theirs to answer' },
|
|
12
|
+
{ ref: 'unclaim', kind: LabelKind.BUTTON, purpose: 'Button giving a request the person claimed back to everyone holding its role' },
|
|
13
|
+
{ ref: 'reassign', kind: LabelKind.BUTTON, purpose: 'Button opening a choice of who else this request should go to' },
|
|
14
|
+
{ ref: 'reassignTarget', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder of the list of people this request can be handed to' },
|
|
15
|
+
{ ref: 'reassignConfirm', kind: LabelKind.BUTTON, purpose: 'Button handing the request to the person chosen' },
|
|
16
|
+
{ ref: 'reassignNoCandidates', kind: LabelKind.MESSAGE, purpose: 'Shown when nobody else can answer this request, so it cannot be handed on' },
|
|
17
|
+
// #1628 — a request's deadlines, and stopping its clocks while the reviewer waits on something outside their control.
|
|
18
|
+
{ ref: 'deadlineClaimBy', kind: LabelKind.MESSAGE, purpose: 'Line on a waiting request saying by when someone should take it on', params: [{ key: 'when', meaning: 'the date and time it should be taken by, already formatted for the reader' }] },
|
|
19
|
+
{ ref: 'deadlineDecisionBy', kind: LabelKind.MESSAGE, purpose: 'Line on a waiting request saying by when it should be answered', params: [{ key: 'when', meaning: 'the date and time it should be answered by, already formatted for the reader' }] },
|
|
20
|
+
{ ref: 'clockPausedIn', kind: LabelKind.MESSAGE, purpose: 'Line on a waiting request whose deadlines are paused, naming why; the request still expires at its original time', params: [{ key: 'pauseState', meaning: 'the reason the deadlines are paused, as the application names it' }] },
|
|
21
|
+
{ ref: 'pauseClock', kind: LabelKind.BUTTON, purpose: 'Button stopping the request\'s deadlines while the reviewer waits on something outside their control; it does not stop the request expiring' },
|
|
22
|
+
{ ref: 'pauseClockState', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder of the list of reasons the deadlines can be paused for' },
|
|
23
|
+
{ ref: 'pauseClockConfirm', kind: LabelKind.BUTTON, purpose: 'Button confirming the pause for the reason chosen' },
|
|
24
|
+
{ ref: 'resumeClock', kind: LabelKind.BUTTON, purpose: 'Button restarting the request\'s paused deadlines; the paused time is added to them' },
|
|
25
|
+
{ ref: 'noticeClockAlreadyPaused', kind: LabelKind.MESSAGE, purpose: 'Shown when the deadlines were already paused, so this pause did nothing' },
|
|
26
|
+
{ ref: 'noticeClockNotPaused', kind: LabelKind.MESSAGE, purpose: 'Shown when the deadlines were not paused, so there was nothing to restart' },
|
|
27
|
+
{ ref: 'noticePauseStateNotDeclared', kind: LabelKind.MESSAGE, purpose: 'Shown when the reason chosen for pausing is not one this request allows' },
|
|
28
|
+
{
|
|
29
|
+
ref: 'inboxToolCall',
|
|
30
|
+
kind: LabelKind.MESSAGE,
|
|
31
|
+
purpose: 'One line describing a request waiting in the inbox: an assistant is waiting for approval to run an action',
|
|
32
|
+
params: [{ key: 'toolName', meaning: 'name of the action the assistant wants to run, as the system names it' }],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
ref: 'inboxExpertAdmission',
|
|
36
|
+
kind: LabelKind.MESSAGE,
|
|
37
|
+
purpose: 'One line describing a request waiting in an administrator\'s inbox: a service firm assigned one of its people to work inside this organization with a given role and scope, and they are admitted only if an administrator approves. Must name the role and the scope: they are what the approver grants',
|
|
38
|
+
params: [
|
|
39
|
+
{ key: 'firm', meaning: 'name of the service firm that assigned the person' },
|
|
40
|
+
{ key: 'expert', meaning: 'name of the person the firm assigned' },
|
|
41
|
+
{ key: 'email', meaning: 'email address of the person the firm assigned' },
|
|
42
|
+
{ key: 'role', meaning: 'the name of the role the person would hold in this organization (already worded)' },
|
|
43
|
+
{ key: 'scope', meaning: 'where in this organization the person would work: the whole organization, or a number of teams (already worded)' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{ ref: 'inboxExpertAdmissionScopeOrganization', kind: LabelKind.MESSAGE, purpose: 'Noun phrase, no leading preposition, filling the scope of the inbox line for a firm\'s person: the whole organization (for example "the whole organization")' },
|
|
47
|
+
{
|
|
48
|
+
ref: 'inboxExpertAdmissionScopeUnits',
|
|
49
|
+
kind: LabelKind.MESSAGE,
|
|
50
|
+
purpose: 'Noun phrase, no leading preposition, filling the scope of the inbox line for a firm\'s person: only some of the organization\'s teams (for example "3 teams")',
|
|
51
|
+
params: [{ key: 'count', meaning: 'how many teams' }],
|
|
52
|
+
},
|
|
53
|
+
{ ref: 'awaitingReview', kind: LabelKind.MESSAGE, purpose: 'Shown on a request in the conversation it came from when a reviewer answers it, not the person in the conversation' },
|
|
54
|
+
{ ref: 'noticeNotActionable', kind: LabelKind.MESSAGE, purpose: 'Shown when the request can no longer be acted on by this person: it was settled, or is no longer theirs' },
|
|
55
|
+
{ ref: 'noticeSuperseded', kind: LabelKind.MESSAGE, purpose: 'Shown when someone else answered or moved the request a moment earlier, so this action did nothing' },
|
|
56
|
+
{ ref: 'noticeLapsed', kind: LabelKind.MESSAGE, purpose: 'Shown when the request expired before it was answered, so it is closed and the action did not run' },
|
|
57
|
+
{ ref: 'noticeRequesterAuthorityLapsed', kind: LabelKind.MESSAGE, purpose: 'Shown when the person the work was for no longer has the access it needs, so it was not run and the request is closed' },
|
|
58
|
+
{ ref: 'noticeTargetRefused', kind: LabelKind.MESSAGE, purpose: 'Shown when the person chosen cannot answer this request, so it stays where it was' },
|
|
59
|
+
{ ref: 'noticeNoEscalationTarget', kind: LabelKind.MESSAGE, purpose: 'Shown when there is nobody defined to escalate this request to, so it stays where it was; hand it to someone instead' },
|
|
60
|
+
{ ref: 'noticeConsentRequired', kind: LabelKind.MESSAGE, purpose: 'Shown when the person the work was for has not agreed to something this work needs; the request is still waiting' },
|
|
61
|
+
{ ref: 'noticeModificationRejected', kind: LabelKind.MESSAGE, purpose: 'Shown when edited arguments were refused; the request is still waiting and can be answered as proposed' },
|
|
62
|
+
{ ref: 'noticeReasonCodeRejected', kind: LabelKind.MESSAGE, purpose: 'Shown when the reason given is not one the application offers; the request is still waiting and can be answered again' },
|
|
63
|
+
// #1921 — why the approver changed or rejected an assistant's proposed action, chosen from the application's own reasons.
|
|
64
|
+
{ ref: 'reasonCode', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder of the optional list of reasons for changing or rejecting the assistant\'s proposed action, as the application defines them' },
|
|
65
|
+
{ ref: 'reasonCodeClear', kind: LabelKind.BUTTON, purpose: 'Button removing the reason chosen, so the answer is given without one' },
|
|
66
|
+
{ ref: 'denyConfirm', kind: LabelKind.BUTTON, purpose: 'Button rejecting the proposed action, with the reason chosen if any' },
|
|
10
67
|
{ ref: 'riskLow', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a low-risk approval request' },
|
|
11
68
|
{ ref: 'riskMedium', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a medium-risk approval request' },
|
|
12
69
|
{ ref: 'riskHigh', kind: LabelKind.MESSAGE, purpose: 'Risk badge for a high-risk approval request' },
|