@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.18
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/LICENSE +114 -26
- package/LICENSE.enterprise +129 -0
- package/dist/esm/companion-exports.d.ts +5 -2
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +4 -2
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/actions/action-bar.d.ts +16 -1
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
- package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.js +14 -7
- package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.js +15 -0
- package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +5 -0
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
- package/dist/esm/components/auth/StepUpAuthDialog.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 +19 -0
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +40 -7
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +9 -1
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
- package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +67 -45
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
- 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 +3 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
- package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
- package/dist/esm/components/data-display/approval-seal.js +10 -4
- package/dist/esm/components/data-display/approval-seal.js.map +1 -1
- package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
- package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
- package/dist/esm/components/data-display/signature-requests.js +123 -0
- package/dist/esm/components/data-display/signature-requests.js.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.js +16 -0
- package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
- package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.js +2 -1
- package/dist/esm/components/feedback/empty-state.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +2 -1
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +25 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +22 -24
- 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 +30 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
- package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
- package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -0
- package/dist/esm/components/form/Form.d.ts.map +1 -1
- package/dist/esm/components/form/Form.js +1 -0
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
- package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +5 -3
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +38 -13
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +75 -47
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
- package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
- package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
- package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
- 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 +3 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
- package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +40 -4
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
- package/dist/esm/components/navigation/command.d.ts +5 -0
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +51 -12
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +21 -7
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +17 -7
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.js +4 -1
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +1 -3
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +14 -4
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
- package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
- package/dist/esm/components/typography/document-heading-level.js +63 -0
- package/dist/esm/components/typography/document-heading-level.js.map +1 -0
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +52 -22
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +76 -3
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
- package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
- package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +47 -12
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +87 -32
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +8 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +8 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +9 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +10 -11
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
- package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
- 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 +22 -21
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +27 -4
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +61 -2
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingAction.js +3 -2
- package/dist/esm/core/billing/useBillingAction.js.map +1 -1
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
- package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
- package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
- package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
- 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 +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
- 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 +59 -18
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
- package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js +1 -0
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +12 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
- package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
- package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +31 -0
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +19 -2
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecution.d.ts +3 -3
- package/dist/esm/core/execution/useExecution.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
- package/dist/esm/core/features/FeatureGate.d.ts +13 -1
- package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
- package/dist/esm/core/features/FeatureGate.js +6 -1
- package/dist/esm/core/features/FeatureGate.js.map +1 -1
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
- package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
- package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
- package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
- package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
- package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
- package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useFeatureAvailability.js +4 -0
- package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
- package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
- package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
- package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
- package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
- package/dist/esm/core/navigation/home-resolution.js +46 -0
- package/dist/esm/core/navigation/home-resolution.js.map +1 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +13 -18
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
- package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
- package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
- package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
- package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
- package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
- package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
- package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.js +25 -0
- package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
- package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
- package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
- package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.js +26 -0
- package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.js +47 -0
- package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +66 -10
- 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 +63 -8
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -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 +13 -0
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +45 -3
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
- 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 +4 -0
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +11 -33
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
- package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
- package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
- package/dist/esm/core/runtime/identity-routes.js +50 -0
- package/dist/esm/core/runtime/identity-routes.js.map +1 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
- package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/search/command-score.d.ts +33 -0
- package/dist/esm/core/search/command-score.d.ts.map +1 -0
- package/dist/esm/core/search/command-score.js +109 -0
- package/dist/esm/core/search/command-score.js.map +1 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +4 -0
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +7 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
- package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
- package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/design-token.utils.js +24 -3
- package/dist/esm/core/ui/design-token.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +19 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +22 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/mock-builders.d.ts +1 -1
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +1 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { Navigate, useNavigate, useSearchParams } from 'react-router';
|
|
4
|
+
import { CorePresetNames, DecisionEmailAnswerLabel, FrontendComponentType } from '@wildo-ai/presets-components-models';
|
|
5
|
+
import { HUMAN_DECISION_EMAIL_ANSWER_PAGE_PATH, HumanDecision_ActOutcomeKind, HumanDecision_RefusalReason, HumanDecisionEmailAnswerPageQueryParam, HumanDecisionEmailAnswerStanding, MAIN_API_BASE_PATH, ManualControllerRouteKey, WildoHeaderKeys, buildManualControllerRoutePath, describeHumanDecisionCard, humanDecisionInboxPathOf, humanDecisionPresentedRowsOf, } from '@wildo-ai/saas-models';
|
|
6
|
+
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
7
|
+
import { Button, ButtonVariants_Variant } from '../../components/actions/button.js';
|
|
8
|
+
import { Heading } from '../../components/typography/heading.js';
|
|
9
|
+
import { Text } from '../../components/typography/text.js';
|
|
10
|
+
import { Alert, AlertDescription } from '../../components/overlays/containers/alert.js';
|
|
11
|
+
import { LoadingSpinner } from '../../components/feedback/loading-spinner.js';
|
|
12
|
+
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
13
|
+
import { useApplication } from '../../core/runtime/useApplication.js';
|
|
14
|
+
import { useUserOrgs } from '../../core/security/useUserOrgs.js';
|
|
15
|
+
import { CommonRoutePaths } from '../../core/runtime/routes.frontend.definitions.js';
|
|
16
|
+
import { appendAuthRedirectToPath, buildAuthRedirectTarget } from '../../core/security/auth-redirect.frontend.utils.js';
|
|
17
|
+
import { useHumanDecisionWords, wordHumanDecisionPhrase } from '../../components/flows-actors/approval.js';
|
|
18
|
+
/**
|
|
19
|
+
* The decision-answer page — the body rendered by {@link AuthPage_DecisionEmailAnswer}.
|
|
20
|
+
*
|
|
21
|
+
* A decision's email carries one link per option a link can answer (never the Approve of an agent's HIGH or CRITICAL
|
|
22
|
+
* call, which needs the approver's stated reason and is given in the application); each opens this page with a
|
|
23
|
+
* single-use token naming the decision, the option and the person it was sent to. The page:
|
|
24
|
+
*
|
|
25
|
+
* 1. asks the server what the link names (`decision-email-answers/inspect`), WITHOUT answering anything: mail
|
|
26
|
+
* scanners and link previews open links, so loading this page decides nothing;
|
|
27
|
+
* 2. shows the decision as the person's inbox would (its title and the values it is about, as the server presented
|
|
28
|
+
* them) and the answer the link gives;
|
|
29
|
+
* 3. when the server asks for sign-in (the decision says more than its email, which only the person signed in is shown,
|
|
30
|
+
* or it requires a step-up), sends the person to sign in first (the link intact), reads the link again with their
|
|
31
|
+
* session, and asks for any proof bound to the decision before confirming, as the inbox does;
|
|
32
|
+
* 4. answers only on an explicit click (`decision-email-answers/answer`), echoing the presentation it showed.
|
|
33
|
+
*
|
|
34
|
+
* The token leaves the address bar once the page knows it will not send the person to sign in. A second click, or a
|
|
35
|
+
* link already used, shows that the link was used: one link answers once.
|
|
36
|
+
*
|
|
37
|
+
* Copy is resolved through {@link DecisionEmailAnswerLabel} (component `PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER`); the
|
|
38
|
+
* decision itself is worded by the inbox's own words (`useHumanDecisionWords`), so the page and the inbox cannot read one
|
|
39
|
+
* decision two ways.
|
|
40
|
+
*/
|
|
41
|
+
/** Where the page is in the link's life. */
|
|
42
|
+
var DecisionEmailAnswerPageStatus;
|
|
43
|
+
(function (DecisionEmailAnswerPageStatus) {
|
|
44
|
+
DecisionEmailAnswerPageStatus["LOADING"] = "loading";
|
|
45
|
+
DecisionEmailAnswerPageStatus["READY"] = "ready";
|
|
46
|
+
DecisionEmailAnswerPageStatus["ANSWERING"] = "answering";
|
|
47
|
+
DecisionEmailAnswerPageStatus["ANSWERED"] = "answered";
|
|
48
|
+
/** The link cannot answer: its standing, or the decision's refusal, says why. */
|
|
49
|
+
DecisionEmailAnswerPageStatus["REFUSED"] = "refused";
|
|
50
|
+
})(DecisionEmailAnswerPageStatus || (DecisionEmailAnswerPageStatus = {}));
|
|
51
|
+
/** The words for each link standing that cannot answer. Total over the standings. */
|
|
52
|
+
const STANDING_LABEL = {
|
|
53
|
+
[HumanDecisionEmailAnswerStanding.LINK_NOT_FOUND]: DecisionEmailAnswerLabel.LINK_NOT_FOUND,
|
|
54
|
+
[HumanDecisionEmailAnswerStanding.LINK_EXPIRED]: DecisionEmailAnswerLabel.LINK_EXPIRED,
|
|
55
|
+
[HumanDecisionEmailAnswerStanding.LINK_USED]: DecisionEmailAnswerLabel.LINK_USED,
|
|
56
|
+
[HumanDecisionEmailAnswerStanding.NO_LONGER_ANSWERABLE]: DecisionEmailAnswerLabel.NO_LONGER_ANSWERABLE,
|
|
57
|
+
[HumanDecisionEmailAnswerStanding.SIGNED_IN_AS_ANOTHER_PERSON]: DecisionEmailAnswerLabel.SIGNED_IN_AS_ANOTHER_PERSON,
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* A refusal a person resolves by signing in: the decision or their organization asks for a factor a link cannot prove, or
|
|
61
|
+
* the decision says more than its email and is answered only by the person signed in.
|
|
62
|
+
*/
|
|
63
|
+
const SIGN_IN_RESOLVES = new Set([
|
|
64
|
+
HumanDecision_RefusalReason.DECISION_STEP_UP_REQUIRED,
|
|
65
|
+
HumanDecision_RefusalReason.GRANTING_ORGANIZATION_SECOND_FACTOR_REQUIRED,
|
|
66
|
+
HumanDecision_RefusalReason.DECIDER_NOT_IN_PERSON,
|
|
67
|
+
]);
|
|
68
|
+
/** What the page shows for a decision outcome that did not apply. */
|
|
69
|
+
function refusalOfOutcome(outcome) {
|
|
70
|
+
if (outcome.reason === HumanDecision_RefusalReason.PRESENTATION_STALE)
|
|
71
|
+
return { kind: 'changed' };
|
|
72
|
+
if (outcome.reason !== undefined && SIGN_IN_RESOLVES.has(outcome.reason))
|
|
73
|
+
return { kind: 'step_up' };
|
|
74
|
+
// A high-stakes approval asks the approver's stated reason, which a link cannot carry: the decision still waits, and the
|
|
75
|
+
// person answers it in the application, where the approval asks for the reason.
|
|
76
|
+
if (outcome.reason === HumanDecision_RefusalReason.APPROVAL_REASON_REQUIRED)
|
|
77
|
+
return { kind: 'elsewhere' };
|
|
78
|
+
if (outcome.kind === HumanDecision_ActOutcomeKind.NOT_ACTIONABLE || outcome.kind === HumanDecision_ActOutcomeKind.SUPERSEDED
|
|
79
|
+
|| outcome.kind === HumanDecision_ActOutcomeKind.LAPSED || outcome.kind === HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED) {
|
|
80
|
+
return { kind: 'standing', standing: HumanDecisionEmailAnswerStanding.NO_LONGER_ANSWERABLE };
|
|
81
|
+
}
|
|
82
|
+
return { kind: 'elsewhere' };
|
|
83
|
+
}
|
|
84
|
+
const COMPONENT = FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER;
|
|
85
|
+
const NO_TOOLS = [];
|
|
86
|
+
/** Default preset implementation for {@link FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER}. */
|
|
87
|
+
export const PublicLayoutPreset_DecisionEmailAnswer_Default = (_props) => {
|
|
88
|
+
const { auth } = useUserOrgs();
|
|
89
|
+
const signedIn = Boolean(auth?.accessToken);
|
|
90
|
+
const { httpClient } = useApplication();
|
|
91
|
+
// Read through a ref: a provider handing out a new client object must not make the page read the link again.
|
|
92
|
+
const httpClientRef = useRef(httpClient);
|
|
93
|
+
httpClientRef.current = httpClient;
|
|
94
|
+
const { tComponent, isReady, formatDateTime } = useI18n({ component: COMPONENT });
|
|
95
|
+
const t = (key, params) => tComponent(COMPONENT, key, params);
|
|
96
|
+
const navigate = useNavigate();
|
|
97
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
98
|
+
// Read once: the token leaves the address bar as soon as the page knows it stays here.
|
|
99
|
+
const [token] = useState(() => searchParams.get(HumanDecisionEmailAnswerPageQueryParam.TOKEN));
|
|
100
|
+
const [status, setStatus] = useState(DecisionEmailAnswerPageStatus.LOADING);
|
|
101
|
+
const [inspection, setInspection] = useState(null);
|
|
102
|
+
const [refusalState, setRefusal] = useState(null);
|
|
103
|
+
const [readGeneration, setReadGeneration] = useState(0);
|
|
104
|
+
// A synchronous double click must not send two answers.
|
|
105
|
+
const answeringRef = useRef(false);
|
|
106
|
+
// The card's tools and operations name the label scopes the decision is worded from.
|
|
107
|
+
const card = inspection?.card;
|
|
108
|
+
const toolNames = React.useMemo(() => (card?.toolName ? [card.toolName] : NO_TOOLS), [card?.toolName]);
|
|
109
|
+
const operationResources = React.useMemo(() => (card?.operationApproval?.resourceType ? [card.operationApproval.resourceType] : NO_TOOLS), [card?.operationApproval?.resourceType]);
|
|
110
|
+
const words = useHumanDecisionWords(toolNames, operationResources);
|
|
111
|
+
const routePath = (key) => `${MAIN_API_BASE_PATH}${buildManualControllerRoutePath(key)}`;
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
if (answeringRef.current)
|
|
114
|
+
return;
|
|
115
|
+
const httpClient = httpClientRef.current;
|
|
116
|
+
if (!token || !httpClient) {
|
|
117
|
+
setRefusal({ kind: 'incomplete_link' });
|
|
118
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
let cancelled = false;
|
|
122
|
+
setStatus(DecisionEmailAnswerPageStatus.LOADING);
|
|
123
|
+
httpClient.post(routePath(ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER_INSPECT), { token }, { silent: true })
|
|
124
|
+
.then((answer) => {
|
|
125
|
+
if (cancelled)
|
|
126
|
+
return;
|
|
127
|
+
if (answer.standing !== HumanDecisionEmailAnswerStanding.ANSWERABLE) {
|
|
128
|
+
setRefusal({ kind: 'standing', standing: answer.standing });
|
|
129
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
setInspection(answer);
|
|
133
|
+
setStatus(DecisionEmailAnswerPageStatus.READY);
|
|
134
|
+
})
|
|
135
|
+
.catch(() => {
|
|
136
|
+
if (cancelled)
|
|
137
|
+
return;
|
|
138
|
+
setRefusal({ kind: 'elsewhere' });
|
|
139
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
140
|
+
});
|
|
141
|
+
return () => {
|
|
142
|
+
cancelled = true;
|
|
143
|
+
};
|
|
144
|
+
// One read per link (and per "read it again"); a session refresh or a new client object must not re-read.
|
|
145
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
146
|
+
}, [token, readGeneration]);
|
|
147
|
+
// Where signing in returns: this page, with the link. Built from the token held in memory, so it survives the strip.
|
|
148
|
+
const signInPath = token
|
|
149
|
+
? appendAuthRedirectToPath(CommonRoutePaths.login, buildAuthRedirectTarget({
|
|
150
|
+
pathname: HUMAN_DECISION_EMAIL_ANSWER_PAGE_PATH,
|
|
151
|
+
search: `?${new URLSearchParams({ [HumanDecisionEmailAnswerPageQueryParam.TOKEN]: token }).toString()}`,
|
|
152
|
+
}))
|
|
153
|
+
: CommonRoutePaths.login;
|
|
154
|
+
const mustSignInFirst = status === DecisionEmailAnswerPageStatus.READY && inspection?.signInRequired === true && !signedIn;
|
|
155
|
+
// Once the page stays here, the token leaves the address bar.
|
|
156
|
+
useEffect(() => {
|
|
157
|
+
if (status === DecisionEmailAnswerPageStatus.LOADING || mustSignInFirst)
|
|
158
|
+
return;
|
|
159
|
+
if (searchParams.has(HumanDecisionEmailAnswerPageQueryParam.TOKEN))
|
|
160
|
+
setSearchParams({}, { replace: true });
|
|
161
|
+
}, [status, mustSignInFirst, searchParams, setSearchParams]);
|
|
162
|
+
const confirm = useCallback(async () => {
|
|
163
|
+
const httpClient = httpClientRef.current;
|
|
164
|
+
if (answeringRef.current || !inspection?.card || !token || !httpClient)
|
|
165
|
+
return;
|
|
166
|
+
const shown = inspection.card;
|
|
167
|
+
const presentationId = shown.presentationId;
|
|
168
|
+
if (!presentationId) {
|
|
169
|
+
setRefusal({ kind: 'elsewhere' });
|
|
170
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
answeringRef.current = true;
|
|
174
|
+
setStatus(DecisionEmailAnswerPageStatus.ANSWERING);
|
|
175
|
+
const send = (reAuthToken) => httpClient.post(routePath(ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER), { token, presentationId }, { silent: true, ...(reAuthToken ? { headers: { [WildoHeaderKeys.REAUTH_TOKEN]: reAuthToken } } : {}) });
|
|
176
|
+
// The proof bound to this decision, on the presentation shown, as the inbox asks for it. Only a signed-in session can mint it.
|
|
177
|
+
const stepUpFor = (requirement) => (signedIn
|
|
178
|
+
? httpClient.stepUpForDecision({ binding: { decisionRef: shown.decisionRef, presentationId }, requirement })
|
|
179
|
+
: Promise.resolve(undefined));
|
|
180
|
+
try {
|
|
181
|
+
let result;
|
|
182
|
+
const required = shown.stepUp;
|
|
183
|
+
if (required) {
|
|
184
|
+
const proof = await stepUpFor(required);
|
|
185
|
+
if (!proof) {
|
|
186
|
+
answeringRef.current = false;
|
|
187
|
+
setRefusal({ kind: 'step_up' });
|
|
188
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
result = await send(proof);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
result = await send();
|
|
195
|
+
// The decision asks for a proof the card did not show: once more, with one, when the person is signed in.
|
|
196
|
+
if (signedIn && result.standing === HumanDecisionEmailAnswerStanding.ANSWERABLE
|
|
197
|
+
&& result.outcome.reason === HumanDecision_RefusalReason.DECISION_STEP_UP_REQUIRED) {
|
|
198
|
+
const proof = await stepUpFor({});
|
|
199
|
+
if (proof)
|
|
200
|
+
result = await send(proof);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
if (result.standing !== HumanDecisionEmailAnswerStanding.ANSWERABLE) {
|
|
204
|
+
setRefusal({ kind: 'standing', standing: result.standing });
|
|
205
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (result.outcome.kind === HumanDecision_ActOutcomeKind.APPLIED) {
|
|
209
|
+
setStatus(DecisionEmailAnswerPageStatus.ANSWERED);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
// A refusal that leaves the link usable lets the person try again.
|
|
213
|
+
answeringRef.current = false;
|
|
214
|
+
setRefusal(refusalOfOutcome(result.outcome));
|
|
215
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
answeringRef.current = false;
|
|
219
|
+
setRefusal({ kind: 'elsewhere' });
|
|
220
|
+
setStatus(DecisionEmailAnswerPageStatus.REFUSED);
|
|
221
|
+
}
|
|
222
|
+
// `routePath` builds a constant path; the client is read through its ref.
|
|
223
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
224
|
+
}, [inspection, token, signedIn]);
|
|
225
|
+
const backToApp = _jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, onClick: () => navigate(CommonRoutePaths.home), children: t(DecisionEmailAnswerLabel.BACK_TO_APP) });
|
|
226
|
+
const openInbox = card
|
|
227
|
+
? _jsx(Button, { variant: ButtonVariants_Variant.DEFAULT, onClick: () => navigate(humanDecisionInboxPathOf(card.decisionRef)), children: t(DecisionEmailAnswerLabel.OPEN_INBOX) })
|
|
228
|
+
: null;
|
|
229
|
+
// The decision requires a step-up and the person is not signed in: sign in first, returning here with the link.
|
|
230
|
+
if (mustSignInFirst)
|
|
231
|
+
return _jsx(Navigate, { to: signInPath, replace: true });
|
|
232
|
+
if (!isReady || status === DecisionEmailAnswerPageStatus.LOADING || status === DecisionEmailAnswerPageStatus.ANSWERING) {
|
|
233
|
+
return (_jsxs("div", { className: "py-region flex flex-col items-center gap-element", children: [_jsx(LoadingSpinner, {}), isReady && _jsx(Text, { children: t(status === DecisionEmailAnswerPageStatus.ANSWERING ? DecisionEmailAnswerLabel.ANSWERING : DecisionEmailAnswerLabel.LOADING) })] }));
|
|
234
|
+
}
|
|
235
|
+
if (status === DecisionEmailAnswerPageStatus.ANSWERED) {
|
|
236
|
+
return (_jsxs("div", { className: "space-y-group text-center", children: [_jsx(Heading, { children: t(DecisionEmailAnswerLabel.SUCCESS_TITLE) }), _jsx(Text, { children: t(DecisionEmailAnswerLabel.SUCCESS_MESSAGE) }), backToApp] }));
|
|
237
|
+
}
|
|
238
|
+
// Signed in, and still not shown the decision: the server did not see the person it was sent to in person (a session of a
|
|
239
|
+
// client they delegated to). Signing in as themselves resolves it, so it reads as a sign-in refusal, not a broken link.
|
|
240
|
+
const cardWithheld = status === DecisionEmailAnswerPageStatus.READY && inspection?.signInRequired === true && !card;
|
|
241
|
+
if (status === DecisionEmailAnswerPageStatus.REFUSED || !inspection || !card) {
|
|
242
|
+
const refusal = cardWithheld ? { kind: 'step_up' } : refusalState;
|
|
243
|
+
const message = !refusal || refusal.kind === 'incomplete_link'
|
|
244
|
+
? t(DecisionEmailAnswerLabel.ERROR_INCOMPLETE_LINK)
|
|
245
|
+
: refusal.kind === 'standing' ? t(STANDING_LABEL[refusal.standing])
|
|
246
|
+
: refusal.kind === 'step_up' ? t(DecisionEmailAnswerLabel.REFUSED_STEP_UP)
|
|
247
|
+
: refusal.kind === 'changed' ? t(DecisionEmailAnswerLabel.REFUSED_CHANGED)
|
|
248
|
+
: t(DecisionEmailAnswerLabel.REFUSED_ELSEWHERE);
|
|
249
|
+
return (_jsxs("div", { className: "space-y-group", children: [_jsx(Heading, { children: t(DecisionEmailAnswerLabel.ERROR_TITLE) }), _jsx(Alert, { variant: "destructive", children: _jsx(AlertDescription, { children: message }) }), _jsxs("div", { className: "flex gap-element", children: [backToApp, refusal?.kind === 'changed' && (_jsx(Button, { variant: ButtonVariants_Variant.DEFAULT, onClick: () => setReadGeneration((generation) => generation + 1), children: t(DecisionEmailAnswerLabel.READ_AGAIN) })), refusal?.kind === 'step_up' && (!signedIn || cardWithheld) && (_jsx(Button, { variant: ButtonVariants_Variant.DEFAULT, onClick: () => navigate(signInPath), children: t(DecisionEmailAnswerLabel.SIGN_IN) })), (refusal?.kind === 'elsewhere' || (refusal?.kind === 'step_up' && signedIn && !cardWithheld)) && openInbox] })] }));
|
|
250
|
+
}
|
|
251
|
+
// The decision as the inbox words it, and the answer the link gives.
|
|
252
|
+
const wording = describeHumanDecisionCard(card);
|
|
253
|
+
const word = (phrase) => wordHumanDecisionPhrase(phrase, words.t, words.roleLabel, words.toolLabel, words.operationLabel);
|
|
254
|
+
const title = word(card.presentation?.title ?? wording.title);
|
|
255
|
+
const option = wording.options.find((candidate) => candidate.ref === inspection.optionRef);
|
|
256
|
+
const answer = option ? word(option.label) : inspection.optionRef;
|
|
257
|
+
const rows = card.presentation ? humanDecisionPresentedRowsOf(card.presentation) : [];
|
|
258
|
+
return (_jsxs("div", { className: "space-y-group", children: [_jsxs("div", { className: "text-center space-y-item-xs", children: [_jsx(Heading, { children: t(DecisionEmailAnswerLabel.TITLE) }), _jsx(Text, { className: "max-w-sm mx-auto", children: t(DecisionEmailAnswerLabel.INTRO) })] }), _jsxs("dl", { className: "space-y-item-xs", children: [_jsx("dt", { children: _jsx(Text, { className: "font-medium", children: t(DecisionEmailAnswerLabel.DECISION_LABEL) }) }), _jsx("dd", { children: _jsx(Text, { children: title }) }), _jsx("dt", { children: _jsx(Text, { className: "font-medium", children: t(DecisionEmailAnswerLabel.ANSWER_LABEL) }) }), _jsx("dd", { children: _jsx(Text, { className: "font-medium", children: answer }) })] }), rows.length > 0 && (_jsxs("div", { className: "space-y-item-xs", children: [_jsx(Text, { className: "font-medium", children: t(DecisionEmailAnswerLabel.DETAILS_LABEL) }), _jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-element gap-y-0.5 text-sm", children: rows.map(({ key, value }) => (_jsxs(React.Fragment, { children: [_jsx("dt", { className: "font-mono text-muted-foreground", children: key }), _jsx("dd", { className: "min-w-0 break-words font-mono", children: value })] }, key))) })] })), card.stepUp !== undefined && (_jsx(Alert, { variant: "warning", children: _jsx(AlertDescription, { children: t(DecisionEmailAnswerLabel.SIGN_IN_REQUIRED) }) })), _jsx(Text, { className: "text-sm", children: t(DecisionEmailAnswerLabel.EXPIRES_AT, { expiresAt: formatDateTime(inspection.expiresAt) }) }), _jsxs("div", { className: "flex gap-element", children: [_jsx(Button, { variant: ButtonVariants_Variant.OUTLINE, className: "flex-1", onClick: () => navigate(CommonRoutePaths.home), children: t(DecisionEmailAnswerLabel.CANCEL) }), _jsx(Button, { variant: ButtonVariants_Variant.DEFAULT, className: "flex-1", onClick: () => { void confirm(); }, children: t(DecisionEmailAnswerLabel.CONFIRM) })] })] }));
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Preset-resolving wrapper for the decision-answer page (mirrors every other `PUBLIC_LAYOUTS` page), so an application
|
|
262
|
+
* can swap in its own through the component registry. {@link AuthPage_DecisionEmailAnswer} renders this wrapper.
|
|
263
|
+
*/
|
|
264
|
+
export function Auth_DecisionEmailAnswer({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
265
|
+
const Component = createComponentResolver(COMPONENT, 'Auth_DecisionEmailAnswer')(preset);
|
|
266
|
+
return _jsx(Component, { ...props });
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=Auth_DecisionEmailAnswer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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AAI,CAAC;AAClC,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { Navigate, useNavigate, useSearchParams } from 'react-router';\nimport { CorePresetNames, DecisionEmailAnswerLabel, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport {\n HUMAN_DECISION_EMAIL_ANSWER_PAGE_PATH,\n HumanDecision_ActOutcomeKind,\n HumanDecision_RefusalReason,\n HumanDecisionEmailAnswerPageQueryParam,\n HumanDecisionEmailAnswerStanding,\n MAIN_API_BASE_PATH,\n ManualControllerRouteKey,\n WildoHeaderKeys,\n buildManualControllerRoutePath,\n describeHumanDecisionCard,\n humanDecisionInboxPathOf,\n humanDecisionPresentedRowsOf,\n type HumanDecision_ActOutcome,\n type HumanDecision_StepUpRequirement,\n type HumanDecisionEmailAnswerCard,\n type HumanDecisionEmailAnswerInspection,\n type HumanDecisionEmailAnswerResult,\n} from '@wildo-ai/saas-models';\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { Heading } from '~wildo-frontend-lib/components/typography/heading';\nimport { Text } from '~wildo-frontend-lib/components/typography/text';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { LoadingSpinner } from '~wildo-frontend-lib/components/feedback/loading-spinner';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { CommonRoutePaths } from '~wildo-frontend-lib/core/runtime/routes.frontend.definitions';\nimport { appendAuthRedirectToPath, buildAuthRedirectTarget } from '~wildo-frontend-lib/core/security/auth-redirect.frontend.utils';\nimport { useHumanDecisionWords, wordHumanDecisionPhrase } from '~wildo-frontend-lib/components/flows-actors/approval';\n\n/**\n * The decision-answer page — the body rendered by {@link AuthPage_DecisionEmailAnswer}.\n *\n * A decision's email carries one link per option a link can answer (never the Approve of an agent's HIGH or CRITICAL\n * call, which needs the approver's stated reason and is given in the application); each opens this page with a\n * single-use token naming the decision, the option and the person it was sent to. The page:\n *\n * 1. asks the server what the link names (`decision-email-answers/inspect`), WITHOUT answering anything: mail\n * scanners and link previews open links, so loading this page decides nothing;\n * 2. shows the decision as the person's inbox would (its title and the values it is about, as the server presented\n * them) and the answer the link gives;\n * 3. when the server asks for sign-in (the decision says more than its email, which only the person signed in is shown,\n * or it requires a step-up), sends the person to sign in first (the link intact), reads the link again with their\n * session, and asks for any proof bound to the decision before confirming, as the inbox does;\n * 4. answers only on an explicit click (`decision-email-answers/answer`), echoing the presentation it showed.\n *\n * The token leaves the address bar once the page knows it will not send the person to sign in. A second click, or a\n * link already used, shows that the link was used: one link answers once.\n *\n * Copy is resolved through {@link DecisionEmailAnswerLabel} (component `PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER`); the\n * decision itself is worded by the inbox's own words (`useHumanDecisionWords`), so the page and the inbox cannot read one\n * decision two ways.\n */\n\n/** Where the page is in the link's life. */\nenum DecisionEmailAnswerPageStatus {\n LOADING = 'loading',\n READY = 'ready',\n ANSWERING = 'answering',\n ANSWERED = 'answered',\n /** The link cannot answer: its standing, or the decision's refusal, says why. */\n REFUSED = 'refused',\n}\n\n/** Why the page shows a refusal, each with its own words. */\ntype DecisionEmailAnswerRefusal =\n | { readonly kind: 'standing'; readonly standing: Exclude<HumanDecisionEmailAnswerStanding, HumanDecisionEmailAnswerStanding.ANSWERABLE> }\n | { readonly kind: 'incomplete_link' }\n | { readonly kind: 'step_up' }\n | { readonly kind: 'changed' }\n | { readonly kind: 'elsewhere' };\n\n/** The words for each link standing that cannot answer. Total over the standings. */\nconst STANDING_LABEL: Readonly<Record<Exclude<HumanDecisionEmailAnswerStanding, HumanDecisionEmailAnswerStanding.ANSWERABLE>, DecisionEmailAnswerLabel>> = {\n [HumanDecisionEmailAnswerStanding.LINK_NOT_FOUND]: DecisionEmailAnswerLabel.LINK_NOT_FOUND,\n [HumanDecisionEmailAnswerStanding.LINK_EXPIRED]: DecisionEmailAnswerLabel.LINK_EXPIRED,\n [HumanDecisionEmailAnswerStanding.LINK_USED]: DecisionEmailAnswerLabel.LINK_USED,\n [HumanDecisionEmailAnswerStanding.NO_LONGER_ANSWERABLE]: DecisionEmailAnswerLabel.NO_LONGER_ANSWERABLE,\n [HumanDecisionEmailAnswerStanding.SIGNED_IN_AS_ANOTHER_PERSON]: DecisionEmailAnswerLabel.SIGNED_IN_AS_ANOTHER_PERSON,\n};\n\n/**\n * A refusal a person resolves by signing in: the decision or their organization asks for a factor a link cannot prove, or\n * the decision says more than its email and is answered only by the person signed in.\n */\nconst SIGN_IN_RESOLVES: ReadonlySet<HumanDecision_RefusalReason> = new Set([\n HumanDecision_RefusalReason.DECISION_STEP_UP_REQUIRED,\n HumanDecision_RefusalReason.GRANTING_ORGANIZATION_SECOND_FACTOR_REQUIRED,\n HumanDecision_RefusalReason.DECIDER_NOT_IN_PERSON,\n]);\n\n/** What the page shows for a decision outcome that did not apply. */\nfunction refusalOfOutcome(outcome: HumanDecision_ActOutcome): DecisionEmailAnswerRefusal {\n if (outcome.reason === HumanDecision_RefusalReason.PRESENTATION_STALE) return { kind: 'changed' };\n if (outcome.reason !== undefined && SIGN_IN_RESOLVES.has(outcome.reason)) return { kind: 'step_up' };\n // A high-stakes approval asks the approver's stated reason, which a link cannot carry: the decision still waits, and the\n // person answers it in the application, where the approval asks for the reason.\n if (outcome.reason === HumanDecision_RefusalReason.APPROVAL_REASON_REQUIRED) return { kind: 'elsewhere' };\n if (outcome.kind === HumanDecision_ActOutcomeKind.NOT_ACTIONABLE || outcome.kind === HumanDecision_ActOutcomeKind.SUPERSEDED\n || outcome.kind === HumanDecision_ActOutcomeKind.LAPSED || outcome.kind === HumanDecision_ActOutcomeKind.REQUESTER_AUTHORITY_LAPSED) {\n return { kind: 'standing', standing: HumanDecisionEmailAnswerStanding.NO_LONGER_ANSWERABLE };\n }\n return { kind: 'elsewhere' };\n}\n\n/** Props for the decision-answer page preset. Self-driven from the link's query and the session, so it takes none. */\nexport interface PublicLayoutPreset_DecisionEmailAnswer_DefaultProps {\n /** Reserved: the page is URL/session-driven and currently accepts no props. */\n readonly _selfDriven?: never;\n}\n\nconst COMPONENT = FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER;\nconst NO_TOOLS: readonly string[] = [];\n\n/** Default preset implementation for {@link FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER}. */\nexport const PublicLayoutPreset_DecisionEmailAnswer_Default = (\n _props: PublicLayoutPreset_DecisionEmailAnswer_DefaultProps,\n): React.JSX.Element => {\n const { auth } = useUserOrgs();\n const signedIn = Boolean(auth?.accessToken);\n const { httpClient } = useApplication();\n // Read through a ref: a provider handing out a new client object must not make the page read the link again.\n const httpClientRef = useRef(httpClient);\n httpClientRef.current = httpClient;\n const { tComponent, isReady, formatDateTime } = useI18n({ component: COMPONENT });\n const t = (key: DecisionEmailAnswerLabel, params?: Record<string, string>): string => tComponent(COMPONENT, key, params);\n const navigate = useNavigate();\n const [searchParams, setSearchParams] = useSearchParams();\n\n // Read once: the token leaves the address bar as soon as the page knows it stays here.\n const [token] = useState(() => searchParams.get(HumanDecisionEmailAnswerPageQueryParam.TOKEN));\n const [status, setStatus] = useState<DecisionEmailAnswerPageStatus>(DecisionEmailAnswerPageStatus.LOADING);\n const [inspection, setInspection] = useState<Extract<HumanDecisionEmailAnswerInspection, { standing: HumanDecisionEmailAnswerStanding.ANSWERABLE }> | null>(null);\n const [refusalState, setRefusal] = useState<DecisionEmailAnswerRefusal | null>(null);\n const [readGeneration, setReadGeneration] = useState(0);\n // A synchronous double click must not send two answers.\n const answeringRef = useRef(false);\n\n // The card's tools and operations name the label scopes the decision is worded from.\n const card: HumanDecisionEmailAnswerCard | undefined = inspection?.card;\n const toolNames = React.useMemo(() => (card?.toolName ? [card.toolName] : NO_TOOLS), [card?.toolName]);\n const operationResources = React.useMemo(() => (card?.operationApproval?.resourceType ? [card.operationApproval.resourceType] : NO_TOOLS), [card?.operationApproval?.resourceType]);\n const words = useHumanDecisionWords(toolNames, operationResources);\n\n const routePath = (key: ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER_INSPECT | ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER): string =>\n `${MAIN_API_BASE_PATH}${buildManualControllerRoutePath(key)}`;\n\n useEffect(() => {\n if (answeringRef.current) return;\n const httpClient = httpClientRef.current;\n if (!token || !httpClient) {\n setRefusal({ kind: 'incomplete_link' });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n return;\n }\n let cancelled = false;\n setStatus(DecisionEmailAnswerPageStatus.LOADING);\n httpClient.post<HumanDecisionEmailAnswerInspection>(routePath(ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER_INSPECT), { token }, { silent: true })\n .then((answer) => {\n if (cancelled) return;\n if (answer.standing !== HumanDecisionEmailAnswerStanding.ANSWERABLE) {\n setRefusal({ kind: 'standing', standing: answer.standing });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n return;\n }\n setInspection(answer);\n setStatus(DecisionEmailAnswerPageStatus.READY);\n })\n .catch(() => {\n if (cancelled) return;\n setRefusal({ kind: 'elsewhere' });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n });\n return () => {\n cancelled = true;\n };\n // One read per link (and per \"read it again\"); a session refresh or a new client object must not re-read.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [token, readGeneration]);\n\n // Where signing in returns: this page, with the link. Built from the token held in memory, so it survives the strip.\n const signInPath = token\n ? appendAuthRedirectToPath(CommonRoutePaths.login, buildAuthRedirectTarget({\n pathname: HUMAN_DECISION_EMAIL_ANSWER_PAGE_PATH,\n search: `?${new URLSearchParams({ [HumanDecisionEmailAnswerPageQueryParam.TOKEN]: token }).toString()}`,\n }))\n : CommonRoutePaths.login;\n const mustSignInFirst = status === DecisionEmailAnswerPageStatus.READY && inspection?.signInRequired === true && !signedIn;\n\n // Once the page stays here, the token leaves the address bar.\n useEffect(() => {\n if (status === DecisionEmailAnswerPageStatus.LOADING || mustSignInFirst) return;\n if (searchParams.has(HumanDecisionEmailAnswerPageQueryParam.TOKEN)) setSearchParams({}, { replace: true });\n }, [status, mustSignInFirst, searchParams, setSearchParams]);\n\n const confirm = useCallback(async () => {\n const httpClient = httpClientRef.current;\n if (answeringRef.current || !inspection?.card || !token || !httpClient) return;\n const shown = inspection.card;\n const presentationId = shown.presentationId;\n if (!presentationId) {\n setRefusal({ kind: 'elsewhere' });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n return;\n }\n answeringRef.current = true;\n setStatus(DecisionEmailAnswerPageStatus.ANSWERING);\n const send = (reAuthToken?: string) => httpClient.post<HumanDecisionEmailAnswerResult>(\n routePath(ManualControllerRouteKey.FLOWS_ACTORS_DECISION_EMAIL_ANSWER),\n { token, presentationId },\n { silent: true, ...(reAuthToken ? { headers: { [WildoHeaderKeys.REAUTH_TOKEN]: reAuthToken } } : {}) },\n );\n // The proof bound to this decision, on the presentation shown, as the inbox asks for it. Only a signed-in session can mint it.\n const stepUpFor = (requirement: HumanDecision_StepUpRequirement) => (signedIn\n ? httpClient.stepUpForDecision({ binding: { decisionRef: shown.decisionRef, presentationId }, requirement })\n : Promise.resolve(undefined));\n try {\n let result: HumanDecisionEmailAnswerResult;\n const required = shown.stepUp;\n if (required) {\n const proof = await stepUpFor(required);\n if (!proof) {\n answeringRef.current = false;\n setRefusal({ kind: 'step_up' });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n return;\n }\n result = await send(proof);\n } else {\n result = await send();\n // The decision asks for a proof the card did not show: once more, with one, when the person is signed in.\n if (signedIn && result.standing === HumanDecisionEmailAnswerStanding.ANSWERABLE\n && result.outcome.reason === HumanDecision_RefusalReason.DECISION_STEP_UP_REQUIRED) {\n const proof = await stepUpFor({});\n if (proof) result = await send(proof);\n }\n }\n if (result.standing !== HumanDecisionEmailAnswerStanding.ANSWERABLE) {\n setRefusal({ kind: 'standing', standing: result.standing });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n return;\n }\n if (result.outcome.kind === HumanDecision_ActOutcomeKind.APPLIED) {\n setStatus(DecisionEmailAnswerPageStatus.ANSWERED);\n return;\n }\n // A refusal that leaves the link usable lets the person try again.\n answeringRef.current = false;\n setRefusal(refusalOfOutcome(result.outcome));\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n } catch {\n answeringRef.current = false;\n setRefusal({ kind: 'elsewhere' });\n setStatus(DecisionEmailAnswerPageStatus.REFUSED);\n }\n // `routePath` builds a constant path; the client is read through its ref.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [inspection, token, signedIn]);\n\n const backToApp = <Button variant={ButtonVariants_Variant.OUTLINE} onClick={() => navigate(CommonRoutePaths.home)}>{t(DecisionEmailAnswerLabel.BACK_TO_APP)}</Button>;\n const openInbox = card\n ? <Button variant={ButtonVariants_Variant.DEFAULT} onClick={() => navigate(humanDecisionInboxPathOf(card.decisionRef))}>{t(DecisionEmailAnswerLabel.OPEN_INBOX)}</Button>\n : null;\n\n // The decision requires a step-up and the person is not signed in: sign in first, returning here with the link.\n if (mustSignInFirst) return <Navigate to={signInPath} replace />;\n\n if (!isReady || status === DecisionEmailAnswerPageStatus.LOADING || status === DecisionEmailAnswerPageStatus.ANSWERING) {\n return (\n <div className=\"py-region flex flex-col items-center gap-element\">\n <LoadingSpinner />\n {isReady && <Text>{t(status === DecisionEmailAnswerPageStatus.ANSWERING ? DecisionEmailAnswerLabel.ANSWERING : DecisionEmailAnswerLabel.LOADING)}</Text>}\n </div>\n );\n }\n\n if (status === DecisionEmailAnswerPageStatus.ANSWERED) {\n return (\n <div className=\"space-y-group text-center\">\n <Heading>{t(DecisionEmailAnswerLabel.SUCCESS_TITLE)}</Heading>\n <Text>{t(DecisionEmailAnswerLabel.SUCCESS_MESSAGE)}</Text>\n {backToApp}\n </div>\n );\n }\n\n // Signed in, and still not shown the decision: the server did not see the person it was sent to in person (a session of a\n // client they delegated to). Signing in as themselves resolves it, so it reads as a sign-in refusal, not a broken link.\n const cardWithheld = status === DecisionEmailAnswerPageStatus.READY && inspection?.signInRequired === true && !card;\n if (status === DecisionEmailAnswerPageStatus.REFUSED || !inspection || !card) {\n const refusal: DecisionEmailAnswerRefusal | null = cardWithheld ? { kind: 'step_up' } : refusalState;\n const message = !refusal || refusal.kind === 'incomplete_link'\n ? t(DecisionEmailAnswerLabel.ERROR_INCOMPLETE_LINK)\n : refusal.kind === 'standing' ? t(STANDING_LABEL[refusal.standing])\n : refusal.kind === 'step_up' ? t(DecisionEmailAnswerLabel.REFUSED_STEP_UP)\n : refusal.kind === 'changed' ? t(DecisionEmailAnswerLabel.REFUSED_CHANGED)\n : t(DecisionEmailAnswerLabel.REFUSED_ELSEWHERE);\n return (\n <div className=\"space-y-group\">\n <Heading>{t(DecisionEmailAnswerLabel.ERROR_TITLE)}</Heading>\n <Alert variant=\"destructive\">\n <AlertDescription>{message}</AlertDescription>\n </Alert>\n <div className=\"flex gap-element\">\n {backToApp}\n {refusal?.kind === 'changed' && (\n <Button variant={ButtonVariants_Variant.DEFAULT} onClick={() => setReadGeneration((generation) => generation + 1)}>{t(DecisionEmailAnswerLabel.READ_AGAIN)}</Button>\n )}\n {refusal?.kind === 'step_up' && (!signedIn || cardWithheld) && (\n <Button variant={ButtonVariants_Variant.DEFAULT} onClick={() => navigate(signInPath)}>{t(DecisionEmailAnswerLabel.SIGN_IN)}</Button>\n )}\n {(refusal?.kind === 'elsewhere' || (refusal?.kind === 'step_up' && signedIn && !cardWithheld)) && openInbox}\n </div>\n </div>\n );\n }\n\n // The decision as the inbox words it, and the answer the link gives.\n const wording = describeHumanDecisionCard(card);\n const word = (phrase: Parameters<typeof wordHumanDecisionPhrase>[0]) => wordHumanDecisionPhrase(phrase, words.t, words.roleLabel, words.toolLabel, words.operationLabel);\n const title = word(card.presentation?.title ?? wording.title);\n const option = wording.options.find((candidate) => candidate.ref === inspection.optionRef);\n const answer = option ? word(option.label) : inspection.optionRef;\n const rows = card.presentation ? humanDecisionPresentedRowsOf(card.presentation) : [];\n\n return (\n <div className=\"space-y-group\">\n <div className=\"text-center space-y-item-xs\">\n <Heading>{t(DecisionEmailAnswerLabel.TITLE)}</Heading>\n <Text className=\"max-w-sm mx-auto\">{t(DecisionEmailAnswerLabel.INTRO)}</Text>\n </div>\n <dl className=\"space-y-item-xs\">\n <dt><Text className=\"font-medium\">{t(DecisionEmailAnswerLabel.DECISION_LABEL)}</Text></dt>\n <dd><Text>{title}</Text></dd>\n <dt><Text className=\"font-medium\">{t(DecisionEmailAnswerLabel.ANSWER_LABEL)}</Text></dt>\n <dd><Text className=\"font-medium\">{answer}</Text></dd>\n </dl>\n {rows.length > 0 && (\n <div className=\"space-y-item-xs\">\n <Text className=\"font-medium\">{t(DecisionEmailAnswerLabel.DETAILS_LABEL)}</Text>\n {/* The values as the server presented them, rendered verbatim: the answer is sealed over exactly these. */}\n <dl className=\"grid grid-cols-[auto_1fr] gap-x-element gap-y-0.5 text-sm\">\n {rows.map(({ key, value }) => (\n <React.Fragment key={key}>\n <dt className=\"font-mono text-muted-foreground\">{key}</dt>\n <dd className=\"min-w-0 break-words font-mono\">{value}</dd>\n </React.Fragment>\n ))}\n </dl>\n </div>\n )}\n {card.stepUp !== undefined && (\n <Alert variant=\"warning\">\n <AlertDescription>{t(DecisionEmailAnswerLabel.SIGN_IN_REQUIRED)}</AlertDescription>\n </Alert>\n )}\n <Text className=\"text-sm\">{t(DecisionEmailAnswerLabel.EXPIRES_AT, { expiresAt: formatDateTime(inspection.expiresAt) })}</Text>\n <div className=\"flex gap-element\">\n <Button variant={ButtonVariants_Variant.OUTLINE} className=\"flex-1\" onClick={() => navigate(CommonRoutePaths.home)}>{t(DecisionEmailAnswerLabel.CANCEL)}</Button>\n <Button variant={ButtonVariants_Variant.DEFAULT} className=\"flex-1\" onClick={() => { void confirm(); }}>{t(DecisionEmailAnswerLabel.CONFIRM)}</Button>\n </div>\n </div>\n );\n};\n\n/**\n * Preset-resolving wrapper for the decision-answer page (mirrors every other `PUBLIC_LAYOUTS` page), so an application\n * can swap in its own through the component registry. {@link AuthPage_DecisionEmailAnswer} renders this wrapper.\n */\nexport function Auth_DecisionEmailAnswer({\n preset = CorePresetNames.DEFAULT,\n ...props\n}: PublicLayoutPreset_DecisionEmailAnswer_DefaultProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<PublicLayoutPreset_DecisionEmailAnswer_DefaultProps>(\n COMPONENT,\n 'Auth_DecisionEmailAnswer',\n )(preset);\n return <Component {...props} />;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth_DecisionEmailAnswer.labels.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/Auth_DecisionEmailAnswer.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAM7C,eAAO,MAAM,sCAAsC,EAAE,mBAAmB,EA4BvE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DecisionEmailAnswerLabel, FrontendComponentType, LabelKind, registerComponentLabels, } from '@wildo-ai/presets-components-models';
|
|
2
|
+
// Companion-only label metadata for the decision-answer page: keys + params + per-key purpose / kind. Statically scanned
|
|
3
|
+
// by the dev companion to plan `components.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER.*` label generation; NOT imported at
|
|
4
|
+
// runtime, so these description strings never ship in the browser bundle.
|
|
5
|
+
export const PublicLayoutsDecisionEmailAnswerLabels = [
|
|
6
|
+
{ ref: DecisionEmailAnswerLabel.TITLE, kind: LabelKind.HEADING, purpose: 'Heading of the page a link in a decision\'s email opens, where the person confirms their answer to a pending decision' },
|
|
7
|
+
{ ref: DecisionEmailAnswerLabel.INTRO, kind: LabelKind.DESCRIPTION, purpose: 'Explains that the person answers the decision as themselves, and that nothing is decided until they confirm on this page' },
|
|
8
|
+
{ ref: DecisionEmailAnswerLabel.LOADING, kind: LabelKind.MESSAGE, purpose: 'In-progress status while the page reads which decision the link names' },
|
|
9
|
+
{ ref: DecisionEmailAnswerLabel.DECISION_LABEL, kind: LabelKind.LABEL, purpose: 'Label of the line saying what is being decided' },
|
|
10
|
+
{ ref: DecisionEmailAnswerLabel.ANSWER_LABEL, kind: LabelKind.LABEL, purpose: 'Label of the line naming the answer this link gives (for example approve or refuse)' },
|
|
11
|
+
{ ref: DecisionEmailAnswerLabel.DETAILS_LABEL, kind: LabelKind.LABEL, purpose: 'Label above the values the decision is about, exactly as the application presents them' },
|
|
12
|
+
{ ref: DecisionEmailAnswerLabel.EXPIRES_AT, kind: LabelKind.MESSAGE, purpose: 'Says until when the link can be used', params: [{ key: 'expiresAt', meaning: 'The moment the link stops working, already formatted for display' }] },
|
|
13
|
+
{ ref: DecisionEmailAnswerLabel.SIGN_IN_REQUIRED, kind: LabelKind.MESSAGE, purpose: 'Says this decision asks the person to prove who they are again before their answer counts, which they will be asked for when they confirm' },
|
|
14
|
+
{ ref: DecisionEmailAnswerLabel.SIGN_IN, kind: LabelKind.BUTTON, purpose: 'Goes to sign in, then back to this page to confirm the answer' },
|
|
15
|
+
{ ref: DecisionEmailAnswerLabel.CONFIRM, kind: LabelKind.BUTTON, purpose: 'Confirms the answer the link gives; only this button answers the decision' },
|
|
16
|
+
{ ref: DecisionEmailAnswerLabel.CANCEL, kind: LabelKind.BUTTON, purpose: 'Leaves without answering; the decision keeps waiting and the link still works until it expires' },
|
|
17
|
+
{ ref: DecisionEmailAnswerLabel.ANSWERING, kind: LabelKind.MESSAGE, purpose: 'In-progress status while the answer is being recorded' },
|
|
18
|
+
{ ref: DecisionEmailAnswerLabel.SUCCESS_TITLE, kind: LabelKind.HEADING, purpose: 'Heading once the answer was recorded' },
|
|
19
|
+
{ ref: DecisionEmailAnswerLabel.SUCCESS_MESSAGE, kind: LabelKind.MESSAGE, purpose: 'Says the answer was recorded as the person\'s and that the work it was waiting on continues' },
|
|
20
|
+
{ ref: DecisionEmailAnswerLabel.ERROR_TITLE, kind: LabelKind.HEADING, purpose: 'Heading when the link cannot answer the decision' },
|
|
21
|
+
{ ref: DecisionEmailAnswerLabel.ERROR_INCOMPLETE_LINK, kind: LabelKind.MESSAGE, purpose: 'Error when the page was opened without the token the email\'s link carries' },
|
|
22
|
+
{ ref: DecisionEmailAnswerLabel.LINK_NOT_FOUND, kind: LabelKind.MESSAGE, purpose: 'Error when the link is not one the application knows, or was withdrawn' },
|
|
23
|
+
{ ref: DecisionEmailAnswerLabel.LINK_EXPIRED, kind: LabelKind.MESSAGE, purpose: 'Error when the link\'s time ran out; the decision may still wait in the application' },
|
|
24
|
+
{ ref: DecisionEmailAnswerLabel.LINK_USED, kind: LabelKind.MESSAGE, purpose: 'Error when the link was already used: each link answers once, so the decision was already answered from it' },
|
|
25
|
+
{ ref: DecisionEmailAnswerLabel.NO_LONGER_ANSWERABLE, kind: LabelKind.MESSAGE, purpose: 'Error when the decision no longer waits for this person: someone answered it, it expired, or it was moved to someone else' },
|
|
26
|
+
{ ref: DecisionEmailAnswerLabel.SIGNED_IN_AS_ANOTHER_PERSON, kind: LabelKind.MESSAGE, purpose: 'Error when the browser is signed in as someone other than the person the email was sent to; nothing was answered' },
|
|
27
|
+
{ ref: DecisionEmailAnswerLabel.REFUSED_STEP_UP, kind: LabelKind.MESSAGE, purpose: 'Error when the decision, or the person\'s organization, asks them to prove who they are again and that was not done; nothing was answered' },
|
|
28
|
+
{ ref: DecisionEmailAnswerLabel.REFUSED_CHANGED, kind: LabelKind.MESSAGE, purpose: 'Error when what the decision is about changed since the page was opened; nothing was answered, and the person should read it again' },
|
|
29
|
+
{ ref: DecisionEmailAnswerLabel.READ_AGAIN, kind: LabelKind.BUTTON, purpose: 'Reads the decision again, as it is now' },
|
|
30
|
+
{ ref: DecisionEmailAnswerLabel.REFUSED_ELSEWHERE, kind: LabelKind.MESSAGE, purpose: 'Error when the decision cannot be answered from this link; the person can answer it in the application' },
|
|
31
|
+
{ ref: DecisionEmailAnswerLabel.OPEN_INBOX, kind: LabelKind.BUTTON, purpose: 'Opens the decision in the application\'s list of decisions waiting for the person' },
|
|
32
|
+
{ ref: DecisionEmailAnswerLabel.BACK_TO_APP, kind: LabelKind.BUTTON, purpose: 'Goes to the application\'s home page' },
|
|
33
|
+
];
|
|
34
|
+
registerComponentLabels(FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER, PublicLayoutsDecisionEmailAnswerLabels);
|
|
35
|
+
//# sourceMappingURL=Auth_DecisionEmailAnswer.labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Auth_DecisionEmailAnswer.labels.js","sourceRoot":"","sources":["../../../../src/components/auth/Auth_DecisionEmailAnswer.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,SAAS,EAET,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,yHAAyH;AACzH,qHAAqH;AACrH,0EAA0E;AAE1E,MAAM,CAAC,MAAM,sCAAsC,GAA0B;IAC3E,EAAE,GAAG,EAAE,wBAAwB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,uHAAuH,EAAE;IAClM,EAAE,GAAG,EAAE,wBAAwB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,0HAA0H,EAAE;IACzM,EAAE,GAAG,EAAE,wBAAwB,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,uEAAuE,EAAE;IACpJ,EAAE,GAAG,EAAE,wBAAwB,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE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AAE,OAAO,EAAE,wGAAwG,EAAE;IAC/L,EAAE,GAAG,EAAE,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mFAAmF,EAAE;IAClK,EAAE,GAAG,EAAE,wBAAwB,CAAC,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,sCAAsC,EAAE;CACvH,CAAC;AAEF,uBAAuB,CAAC,qBAAqB,CAAC,oCAAoC,EAAE,sCAAsC,CAAC,CAAC","sourcesContent":["import {\n DecisionEmailAnswerLabel,\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for the decision-answer page: keys + params + per-key purpose / kind. Statically scanned\n// by the dev companion to plan `components.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER.*` label generation; NOT imported at\n// runtime, so these description strings never ship in the browser bundle.\n\nexport const PublicLayoutsDecisionEmailAnswerLabels: LabellingUnitaryDef[] = [\n { ref: DecisionEmailAnswerLabel.TITLE, kind: LabelKind.HEADING, purpose: 'Heading of the page a link in a decision\\'s email opens, where the person confirms their answer to a pending decision' },\n { ref: DecisionEmailAnswerLabel.INTRO, kind: LabelKind.DESCRIPTION, purpose: 'Explains that the person answers the decision as themselves, and that nothing is decided until they confirm on this page' },\n { ref: DecisionEmailAnswerLabel.LOADING, kind: LabelKind.MESSAGE, purpose: 'In-progress status while the page reads which decision the link names' },\n { ref: DecisionEmailAnswerLabel.DECISION_LABEL, kind: LabelKind.LABEL, purpose: 'Label of the line saying what is being decided' },\n { ref: DecisionEmailAnswerLabel.ANSWER_LABEL, kind: LabelKind.LABEL, purpose: 'Label of the line naming the answer this link gives (for example approve or refuse)' },\n { ref: DecisionEmailAnswerLabel.DETAILS_LABEL, kind: LabelKind.LABEL, purpose: 'Label above the values the decision is about, exactly as the application presents them' },\n { ref: DecisionEmailAnswerLabel.EXPIRES_AT, kind: LabelKind.MESSAGE, purpose: 'Says until when the link can be used', params: [{ key: 'expiresAt', meaning: 'The moment the link stops working, already formatted for display' }] },\n { ref: DecisionEmailAnswerLabel.SIGN_IN_REQUIRED, kind: LabelKind.MESSAGE, purpose: 'Says this decision asks the person to prove who they are again before their answer counts, which they will be asked for when they confirm' },\n { ref: DecisionEmailAnswerLabel.SIGN_IN, kind: LabelKind.BUTTON, purpose: 'Goes to sign in, then back to this page to confirm the answer' },\n { ref: DecisionEmailAnswerLabel.CONFIRM, kind: LabelKind.BUTTON, purpose: 'Confirms the answer the link gives; only this button answers the decision' },\n { ref: DecisionEmailAnswerLabel.CANCEL, kind: LabelKind.BUTTON, purpose: 'Leaves without answering; the decision keeps waiting and the link still works until it expires' },\n { ref: DecisionEmailAnswerLabel.ANSWERING, kind: LabelKind.MESSAGE, purpose: 'In-progress status while the answer is being recorded' },\n { ref: DecisionEmailAnswerLabel.SUCCESS_TITLE, kind: LabelKind.HEADING, purpose: 'Heading once the answer was recorded' },\n { ref: DecisionEmailAnswerLabel.SUCCESS_MESSAGE, kind: LabelKind.MESSAGE, purpose: 'Says the answer was recorded as the person\\'s and that the work it was waiting on continues' },\n { ref: DecisionEmailAnswerLabel.ERROR_TITLE, kind: LabelKind.HEADING, purpose: 'Heading when the link cannot answer the decision' },\n { ref: DecisionEmailAnswerLabel.ERROR_INCOMPLETE_LINK, kind: LabelKind.MESSAGE, purpose: 'Error when the page was opened without the token the email\\'s link carries' },\n { ref: DecisionEmailAnswerLabel.LINK_NOT_FOUND, kind: LabelKind.MESSAGE, purpose: 'Error when the link is not one the application knows, or was withdrawn' },\n { ref: DecisionEmailAnswerLabel.LINK_EXPIRED, kind: LabelKind.MESSAGE, purpose: 'Error when the link\\'s time ran out; the decision may still wait in the application' },\n { ref: DecisionEmailAnswerLabel.LINK_USED, kind: LabelKind.MESSAGE, purpose: 'Error when the link was already used: each link answers once, so the decision was already answered from it' },\n { ref: DecisionEmailAnswerLabel.NO_LONGER_ANSWERABLE, kind: LabelKind.MESSAGE, purpose: 'Error when the decision no longer waits for this person: someone answered it, it expired, or it was moved to someone else' },\n { ref: DecisionEmailAnswerLabel.SIGNED_IN_AS_ANOTHER_PERSON, kind: LabelKind.MESSAGE, purpose: 'Error when the browser is signed in as someone other than the person the email was sent to; nothing was answered' },\n { ref: DecisionEmailAnswerLabel.REFUSED_STEP_UP, kind: LabelKind.MESSAGE, purpose: 'Error when the decision, or the person\\'s organization, asks them to prove who they are again and that was not done; nothing was answered' },\n { ref: DecisionEmailAnswerLabel.REFUSED_CHANGED, kind: LabelKind.MESSAGE, purpose: 'Error when what the decision is about changed since the page was opened; nothing was answered, and the person should read it again' },\n { ref: DecisionEmailAnswerLabel.READ_AGAIN, kind: LabelKind.BUTTON, purpose: 'Reads the decision again, as it is now' },\n { ref: DecisionEmailAnswerLabel.REFUSED_ELSEWHERE, kind: LabelKind.MESSAGE, purpose: 'Error when the decision cannot be answered from this link; the person can answer it in the application' },\n { ref: DecisionEmailAnswerLabel.OPEN_INBOX, kind: LabelKind.BUTTON, purpose: 'Opens the decision in the application\\'s list of decisions waiting for the person' },\n { ref: DecisionEmailAnswerLabel.BACK_TO_APP, kind: LabelKind.BUTTON, purpose: 'Goes to the application\\'s home page' },\n];\n\nregisterComponentLabels(FrontendComponentType.PUBLIC_LAYOUTS_DECISION_EMAIL_ANSWER, PublicLayoutsDecisionEmailAnswerLabels);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Auth_Main.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/Auth_Main.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAmDjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;
|
|
1
|
+
{"version":3,"file":"Auth_Main.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/Auth_Main.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAmDjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAsFvH,MAAM,WAAW,wCAAwC;CACxD;AAED,eAAO,MAAM,mCAAmC,GAAI,IAAI,wCAAwC,KAAG,KAAK,CAAC,GAAG,CAAC,OA8e5G,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,wCAAwC,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAI5J"}
|
|
@@ -89,6 +89,11 @@ const AUTH_REDIRECT_ERROR_LABELS = {
|
|
|
89
89
|
[AuthRedirectErrorCode.OAUTH_FAILED]: { label: UserAuthLabel.PROVIDER_SIGN_IN_FAILED, variant: 'destructive' },
|
|
90
90
|
// A sign-out that did not finish at the provider is a caution, not a failure of what the person asked for here.
|
|
91
91
|
[AuthRedirectErrorCode.SAML_SLO_FAILED]: { label: UserAuthLabel.PROVIDER_SIGN_OUT_FAILED, variant: 'warning' },
|
|
92
|
+
// Sent only to the re-authentication popup's page, which hands it to the step-up dialog and its own words; mapped so
|
|
93
|
+
// the table stays total, and so a hand-typed URL on the sign-in page still reads as a failed provider sign-in.
|
|
94
|
+
[AuthRedirectErrorCode.REAUTHENTICATION_NOT_FRESH]: { label: UserAuthLabel.PROVIDER_SIGN_IN_FAILED, variant: 'destructive' },
|
|
95
|
+
// Also popup-only, mapped for the same reasons.
|
|
96
|
+
[AuthRedirectErrorCode.REAUTHENTICATION_RATE_LIMITED]: { label: UserAuthLabel.PROVIDER_SIGN_IN_FAILED, variant: 'destructive' },
|
|
92
97
|
};
|
|
93
98
|
export const PublicLayoutPreset_UserAuth_Default = ({}) => {
|
|
94
99
|
const { auth, identifyByEmail, initiateOAuth2Login } = useUserOrgs();
|