@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-seal.js","sourceRoot":"","sources":["../../../../src/components/data-display/approval-seal.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,0BAA0B,GAG3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AAEzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mFAAmF,CAAA;AAC5H,OAAO,EAAE,cAAc,EAAE,MAAM,mEAAmE,CAAA;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AACjH,OAAO,EAAE,iCAAiC,EAAE,MAAM,oEAAoE,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAA;AAE3F,kHAAkH;AAClH,MAAM,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAA;AAEtD,yDAAyD;AACzD,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,+BAA+B;IAC/B,4CAAmB,CAA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,CAAC,MAAM,CAAC;QACrE,QAAQ,EAAE,GAAG,EAAE,CAAC,wBAAwB,EAAE,CAAC,sCAAsC,CAAC,MAAM,CAAC;QACzF,YAAY,EAAE,YAAY,MAAM,MAAM;QACtC,cAAc,EAAE,IAAI;KACrB,CAAC,CAAA;IACF,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,qBAAqB,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACjF,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,KAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,CAAA;AAC/E,CAAC;AAUD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAA6B;IACrG,MAAM,KAAK,GAAG,mBAAmB,CAAC;QAChC,GAAG,EAAE,WAAW;QAChB,IAAI,EAAE,GAAG,EAAE,CAAC,wBAAwB,EAAE,CAAC,0BAA0B,CAAC,WAAW,CAAC;QAC9E,YAAY,EAAE,YAAY,WAAW,MAAM;QAC3C,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAA;IACF,IAAI,KAAK,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAC3B,2GAA2G;IAC3G,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,KAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAI,CAAA;AAC5I,CAAC","sourcesContent":["import React, { useCallback, useEffect, useRef, useState } from 'react'\nimport {\n ApprovalSealOnRecordState,\n ApprovalSealSchema,\n CoreResourceType,\n ErrorType,\n approvalSealCheckOutcomeOf,\n type ApprovalSealCheckOutcome,\n type ApprovalSealOnRecordView,\n} from '@wildo-ai/saas-models'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service'\nimport { saveBlobAsFile } from '~wildo-frontend-lib/core/commons/save-blob-as-file.frontend.utils'\nimport { useResourceDisplayContext } from '~wildo-frontend-lib/components/data-display/automatic-displayer.utils'\nimport { useOptionalDisplayTemplateContext } from '~wildo-frontend-lib/components/data-display/DisplayTemplateContext'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { isBackendRefusal } from '~wildo-frontend-lib/core/errors/backend-refusal.frontend'\n\n/** The seal's own resource, whose fields declare the vocabularies the meaning and the outcome are worded from. */\nconst APPROVAL_SEALS = CoreResourceType.APPROVAL_SEALS\n\n/** Where the read of a record's approval seal stands. */\nexport enum ApprovalSealReadState {\n /** Asked, not answered yet. */\n LOADING = 'loading',\n /** Answered: `view` says how the record shows its seal. */\n READY = 'ready',\n /** The read failed: said so, never shown as a record with no seal. */\n FAILED = 'failed',\n}\n\n/** Where a check of the seal (the public verifier, run on demand) stands. */\nexport enum ApprovalSealCheckState {\n /** Not asked. */\n IDLE = 'idle',\n CHECKING = 'checking',\n /** Answered: `checkOutcome` says what the verifier found. */\n DONE = 'done',\n /** The check could not be made (the request failed): not a verdict on the seal. */\n FAILED = 'failed',\n}\n\n// --- Contract ---\n\n/**\n * What the preset draws (#2913). Presentational: the wrapper reads the seal, labels the moved fields in the record's own\n * words and runs the actions; the preset never decides what a reader may see, the door already did.\n */\nexport interface ApprovalSealProps {\n readonly readState: ApprovalSealReadState\n /** Present when `readState` is READY. */\n readonly view?: ApprovalSealOnRecordView\n /** The record's own labels of `view.currency.movedFields`, in the same order. Never their values. */\n readonly movedFieldLabels?: readonly string[]\n /** The approval's meaning, in its vocabulary's words (`system_enums.ApprovalSealMeaning`). */\n readonly meaningLabel?: string\n /** The decision's outcome, in its vocabulary's words (`system_enums.HumanDecision_Outcome`). */\n readonly outcomeLabel?: string\n readonly checkState?: ApprovalSealCheckState\n /** Present when `checkState` is DONE. */\n readonly checkOutcome?: ApprovalSealCheckOutcome\n /** Runs the public verifier on the seal; offered only for a signed seal. */\n readonly onCheck?: () => void\n /** Downloads the deliverable's manifested copy; offered only when the seal holds one that can be served. */\n readonly onDownloadManifestedCopy?: () => void\n readonly downloadingManifestedCopy?: boolean\n /** What the seal is about, when the surface does not already say it (a decided card: the decision's title). */\n readonly description?: string\n readonly className?: string\n}\n\n// --- Wrapper ---\n\n/** The preset, resolved from the registry: an application may replace how a seal is drawn. */\nexport function ApprovalSeal({ preset = CorePresetNames.DEFAULT, ...props }: ApprovalSealProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ApprovalSealProps>(FrontendComponentType.LOW_LEVEL_APPROVAL_SEAL, 'ApprovalSeal')(preset)\n return <Component {...props} />\n}\n\n/** A stored id as a string; anything else is not an id. */\nfunction sealIdOf(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined\n}\n\nexport interface RecordApprovalSealProps {\n /**\n * The record's field holding the seal's id (`signOffApprovalSealId`). A top-level field: the door checks that the record\n * stores this seal there, so a seal whose approved effect failed (one the record does not name) is never shown.\n */\n readonly field: string\n /** Draw nothing when the record names no seal in the field, instead of saying it has none. */\n readonly hideWhenNone?: boolean\n readonly className?: string\n}\n\n/** How a wrapper reads one seal view, downloads its copy, and whether a missing seal is an answer or a failure. */\ninterface ApprovalSealSource {\n /** Changes when what is asked changes (and, for a record, when the record does). */\n readonly key: string\n readonly load: () => Promise<ApprovalSealOnRecordView>\n /** Absent where the view offers no copy (the decider's view: the deliverable is downloaded where its record is read). */\n readonly download?: () => Promise<Blob>\n readonly downloadName: string\n /** A 404 means \"no seal here\" (a file nothing attests, a decision that sealed nothing): draw nothing, not a failure. */\n readonly notFoundIsNone?: boolean\n /** Ask again while the seal is PENDING: a decision just made is signed seconds later. */\n readonly pollWhilePending?: boolean\n}\n\n/** How often, and how many times, a PENDING seal is asked again after a decision (about a minute in all). */\nconst PENDING_SEAL_POLL_INTERVAL_MS = 3_000\nconst PENDING_SEAL_POLL_MAX = 20\n\n/** Whether a failed read is the door answering \"nothing here\" (404), never a failure the reader should see. */\nfunction isNotFound(error: unknown): boolean {\n return isBackendRefusal(error) && error.errorType === ErrorType.NOT_FOUND\n}\n\n/** The state shared by every seal wrapper: the read, the check, the download. */\nfunction useApprovalSealView(source: ApprovalSealSource | undefined): {\n readonly read: { readonly state: ApprovalSealReadState; readonly view?: ApprovalSealOnRecordView }\n readonly none: boolean\n readonly check: { readonly state: ApprovalSealCheckState; readonly outcome?: ApprovalSealCheckOutcome }\n readonly onCheck: () => void\n readonly onDownloadManifestedCopy: () => void\n readonly downloading: boolean\n} {\n const [read, setRead] = useState<{ readonly state: ApprovalSealReadState; readonly view?: ApprovalSealOnRecordView }>({ state: ApprovalSealReadState.LOADING })\n const [none, setNone] = useState(false)\n const [check, setCheck] = useState<{ readonly state: ApprovalSealCheckState; readonly outcome?: ApprovalSealCheckOutcome }>({ state: ApprovalSealCheckState.IDLE })\n const [downloading, setDownloading] = useState(false)\n const key = source?.key\n\n useEffect(() => {\n if (!source) return\n let current = true\n let polls = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n setRead({ state: ApprovalSealReadState.LOADING })\n setNone(false)\n setCheck({ state: ApprovalSealCheckState.IDLE })\n const ask = (): void => {\n // Through a promise, so a load that throws before it returns one is a failed read like any other.\n Promise.resolve().then(source.load)\n .then((view) => {\n if (!current) return\n setRead({ state: ApprovalSealReadState.READY, view })\n if (source.pollWhilePending && view.state === ApprovalSealOnRecordState.PENDING && polls < PENDING_SEAL_POLL_MAX) {\n polls += 1\n timer = setTimeout(ask, PENDING_SEAL_POLL_INTERVAL_MS)\n }\n })\n .catch((error: unknown) => {\n if (!current) return\n if (source.notFoundIsNone && isNotFound(error)) setNone(true)\n else setRead({ state: ApprovalSealReadState.FAILED })\n })\n }\n ask()\n return () => { current = false; if (timer) clearTimeout(timer) }\n // `key` names what is asked; the source object itself is rebuilt on every render.\n }, [key])\n\n const jws = read.view?.jws\n const onCheck = useCallback(() => {\n if (!jws) return\n setCheck({ state: ApprovalSealCheckState.CHECKING })\n getManualCallsHttpClient().checkApprovalSeal(jws)\n .then((verdict) => setCheck({ state: ApprovalSealCheckState.DONE, outcome: approvalSealCheckOutcomeOf(verdict) }))\n .catch(() => setCheck({ state: ApprovalSealCheckState.FAILED }))\n }, [jws])\n\n const onDownloadManifestedCopy = useCallback(() => {\n if (!source?.download) return\n setDownloading(true)\n source.download()\n .then((blob) => saveBlobAsFile(blob, source.downloadName))\n .catch(() => undefined)\n .finally(() => setDownloading(false))\n }, [key])\n\n return { read, none, check, onCheck, onDownloadManifestedCopy, downloading }\n}\n\n/** Draws one seal view through the preset, with the meaning and outcome in their vocabularies' words. */\nfunction ApprovalSealOf({ state, offersCopy = true, movedFieldLabels, description, className }: {\n readonly state: ReturnType<typeof useApprovalSealView>\n readonly offersCopy?: boolean\n readonly movedFieldLabels?: readonly string[]\n readonly description?: string\n readonly className?: string\n}): React.JSX.Element {\n const { tResourceFieldEnumValue } = useI18n()\n const { read, check, onCheck, onDownloadManifestedCopy, downloading } = state\n const view = read.view\n const shape = ApprovalSealSchema.shape\n return (\n <ApprovalSeal\n readState={read.state}\n {...(view ? { view } : {})}\n {...(movedFieldLabels ? { movedFieldLabels } : {})}\n {...(description ? { description } : {})}\n {...(view?.meaning ? { meaningLabel: tResourceFieldEnumValue(APPROVAL_SEALS, 'meaning', view.meaning, shape.meaning) } : {})}\n {...(view?.outcome ? { outcomeLabel: tResourceFieldEnumValue(APPROVAL_SEALS, 'outcome', view.outcome, shape.outcome) } : {})}\n checkState={check.state}\n {...(check.outcome ? { checkOutcome: check.outcome } : {})}\n {...(view?.jws ? { onCheck } : {})}\n {...(offersCopy && view?.deliverable?.manifestedCopyAvailable ? { onDownloadManifestedCopy, downloadingManifestedCopy: downloading } : {})}\n {...(className ? { className } : {})}\n />\n )\n}\n\n/**\n * The approval seal the record on this display surface stores in `field` (#2913): who approved it, when, with what\n * meaning, whether the approval still describes the record, its deliverable's manifested copy and a check of the seal.\n *\n * Place it in a resource's DISPLAY template (`*.ui-behavior.tsx`), where the record and its resource are in context. It\n * asks `GET /approval-seals/:sealId/records/:resourceType/:resourceId/:field`, which admits exactly the readers the\n * record's own READ admits, and asks again when the record changes, since whether the approval is current depends on it.\n * Moved fields are labelled with the record's own field labels; their values are never shown.\n */\nexport function RecordApprovalSeal({ field, hideWhenNone, className }: RecordApprovalSealProps): React.JSX.Element | null {\n const { resourceType, resourceId } = useResourceDisplayContext()\n const template = useOptionalDisplayTemplateContext()\n const record = template?.data\n const sealId = sealIdOf(record?.[field])\n const recordVersion = useRecordVersion(record)\n const target = sealId && resourceType && resourceId ? { sealId, resourceType: String(resourceType), resourceId: String(resourceId), field } : undefined\n const state = useApprovalSealView(target ? {\n // The record is part of what is asked: a value the approval covers may have moved.\n key: `${target.sealId}|${target.resourceType}|${target.resourceId}|${field}|${recordVersion}`,\n load: () => getManualCallsHttpClient().readApprovalSealOnRecord(target),\n download: () => getManualCallsHttpClient().downloadApprovalSealManifestedCopy(target),\n downloadName: `approval-${target.sealId}.pdf`,\n } : undefined)\n\n if (!record) return null\n if (!target) {\n if (hideWhenNone || !resourceType) return null\n return <ApprovalSeal readState={ApprovalSealReadState.READY} view={{ sealId: '', state: ApprovalSealOnRecordState.NO_SEAL }} {...(className ? { className } : {})} />\n }\n const movedFieldLabels = state.read.view?.currency?.movedFields.map((name) => template?.fieldLabels?.[name] ?? name)\n return <ApprovalSealOf state={state} {...(movedFieldLabels ? { movedFieldLabels } : {})} {...(className ? { className } : {})} />\n}\n\n/** A record's identity in time, so the record's seal is asked again when the record changes. */\nfunction useRecordVersion(record: Record<string, unknown> | undefined): string {\n const updatedAt = record?.updatedAt\n const stamp = updatedAt instanceof Date ? updatedAt.toISOString() : typeof updatedAt === 'string' ? updatedAt : ''\n // Without a stamp, the object's identity is the version: a re-read hands a new object.\n const [identity, setIdentity] = useState(0)\n const last = useRef(record)\n useEffect(() => {\n if (last.current !== record) { last.current = record; if (!stamp) setIdentity((value) => value + 1) }\n }, [record, stamp])\n return stamp || String(identity)\n}\n\nexport interface FileApprovalSealProps {\n /** The file a seal may attest: the deliverable a person approved by its hash (a close report's PDF). */\n readonly fileId: string\n readonly className?: string\n}\n\n/**\n * The approval seal that attests a file, under the file (#2913): drawn by `DisplayFieldFile` on a DISPLAY surface, and\n * nothing at all for the many files no seal attests. It asks `GET /approval-seals/files/:fileId`, admitted by the READ\n * of the record the file belongs to, and only for a seal its own record still names (an approval whose effect failed\n * shows nothing). Currency is not drawn here: it is a statement about the record the approval is about.\n */\nexport function FileApprovalSeal({ fileId, className }: FileApprovalSealProps): React.JSX.Element | null {\n const state = useApprovalSealView({\n key: fileId,\n load: () => getManualCallsHttpClient().readApprovalSealOnFile(fileId),\n download: () => getManualCallsHttpClient().downloadApprovalSealFileManifestedCopy(fileId),\n downloadName: `approval-${fileId}.pdf`,\n notFoundIsNone: true,\n })\n if (state.none || state.read.state === ApprovalSealReadState.LOADING) return null\n return <ApprovalSealOf state={state} {...(className ? { className } : {})} />\n}\n\nexport interface DecisionApprovalSealProps {\n /** The decision the signed-in person just answered. */\n readonly decisionRef: string\n /** What the decision was about, in the card's own words (the title the inbox showed). */\n readonly description?: string\n readonly className?: string\n}\n\n/**\n * The seal of a decision the signed-in person answered (#2913), for a decision card once it is decided: asked of\n * `GET /approval-seals/decisions/:decisionRef`, which answers the decider only. The seal is signed seconds after the\n * decision, so a PENDING seal is asked again until it is signed (about a minute at most); a decision that sealed nothing\n * draws nothing.\n */\nexport function DecisionApprovalSeal({ decisionRef, description, className }: DecisionApprovalSealProps): React.JSX.Element | null {\n const state = useApprovalSealView({\n key: decisionRef,\n load: () => getManualCallsHttpClient().readApprovalSealOfDecision(decisionRef),\n downloadName: `approval-${decisionRef}.pdf`,\n notFoundIsNone: true,\n pollWhilePending: true,\n })\n if (state.none) return null\n // The decider's view offers no copy: the deliverable is the record's, downloaded where the record is read.\n return <ApprovalSealOf state={state} offersCopy={false} {...(description ? { description } : {})} {...(className ? { className } : {})} />\n}\n"]}
|
|
1
|
+
{"version":3,"file":"approval-seal.js","sourceRoot":"","sources":["../../../../src/components/data-display/approval-seal.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,0BAA0B,GAG3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AAEzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mFAAmF,CAAA;AAC5H,OAAO,EAAE,cAAc,EAAE,MAAM,mEAAmE,CAAA;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AACjH,OAAO,EAAE,iCAAiC,EAAE,MAAM,oEAAoE,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAA;AAE3F,kHAAkH;AAClH,MAAM,cAAc,GAAG,gBAAgB,CAAC,cAAc,CAAA;AAEtD,yDAAyD;AACzD,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,+BAA+B;IAC/B,4CAAmB,CAAA;IACnB,2DAA2D;IAC3D,wCAAe,CAAA;IACf,s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from 'react'\nimport {\n ApprovalSealOnRecordState,\n ApprovalSealSchema,\n CoreResourceType,\n ErrorType,\n approvalSealCheckOutcomeOf,\n type ApprovalSealCheckOutcome,\n type ApprovalSealOnRecordView,\n} from '@wildo-ai/saas-models'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service'\nimport { saveBlobAsFile } from '~wildo-frontend-lib/core/commons/save-blob-as-file.frontend.utils'\nimport { useResourceDisplayContext } from '~wildo-frontend-lib/components/data-display/automatic-displayer.utils'\nimport { useOptionalDisplayTemplateContext } from '~wildo-frontend-lib/components/data-display/DisplayTemplateContext'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { isBackendRefusal } from '~wildo-frontend-lib/core/errors/backend-refusal.frontend'\n\n/** The seal's own resource, whose fields declare the vocabularies the meaning and the outcome are worded from. */\nconst APPROVAL_SEALS = CoreResourceType.APPROVAL_SEALS\n\n/** Where the read of a record's approval seal stands. */\nexport enum ApprovalSealReadState {\n /** Asked, not answered yet. */\n LOADING = 'loading',\n /** Answered: `view` says how the record shows its seal. */\n READY = 'ready',\n /** The read failed: said so, never shown as a record with no seal. */\n FAILED = 'failed',\n}\n\n/** Where a check of the seal (the public verifier, run on demand) stands. */\nexport enum ApprovalSealCheckState {\n /** Not asked. */\n IDLE = 'idle',\n CHECKING = 'checking',\n /** Answered: `checkOutcome` says what the verifier found. */\n DONE = 'done',\n /** The check could not be made (the request failed): not a verdict on the seal. */\n FAILED = 'failed',\n}\n\n// --- Contract ---\n\n/**\n * What the preset draws (#2913). Presentational: the wrapper reads the seal, labels the moved fields in the record's own\n * words and runs the actions; the preset never decides what a reader may see, the door already did.\n */\nexport interface ApprovalSealProps {\n readonly readState: ApprovalSealReadState\n /** Present when `readState` is READY. */\n readonly view?: ApprovalSealOnRecordView\n /** The record's own labels of `view.currency.movedFields`, in the same order. Never their values. */\n readonly movedFieldLabels?: readonly string[]\n /** The approval's meaning, in its vocabulary's words (`system_enums.ApprovalSealMeaning`). */\n readonly meaningLabel?: string\n /** The decision's outcome, in its vocabulary's words (`system_enums.HumanDecision_Outcome`). */\n readonly outcomeLabel?: string\n readonly checkState?: ApprovalSealCheckState\n /** Present when `checkState` is DONE. */\n readonly checkOutcome?: ApprovalSealCheckOutcome\n /** Runs the public verifier on the seal; offered only for a signed seal. */\n readonly onCheck?: () => void\n /** Downloads the deliverable's manifested copy; offered only when the seal holds one that can be served. */\n readonly onDownloadManifestedCopy?: () => void\n readonly downloadingManifestedCopy?: boolean\n /** What the seal is about, when the surface does not already say it (a decided card: the decision's title). */\n readonly description?: string\n readonly className?: string\n}\n\n// --- Wrapper ---\n\n/** The preset, resolved from the registry: an application may replace how a seal is drawn. */\nexport function ApprovalSeal({ preset = CorePresetNames.DEFAULT, ...props }: ApprovalSealProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ApprovalSealProps>(FrontendComponentType.LOW_LEVEL_APPROVAL_SEAL, 'ApprovalSeal')(preset)\n return <Component {...props} />\n}\n\n/** A stored id as a string; anything else is not an id. */\nfunction sealIdOf(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined\n}\n\nexport interface RecordApprovalSealProps {\n /**\n * The record's field holding the seal's id (`signOffApprovalSealId`). A top-level field: the door checks that the record\n * stores this seal there, so a seal whose approved effect failed (one the record does not name) is never shown.\n */\n readonly field: string\n /** Draw nothing when the record names no seal in the field, instead of saying it has none. */\n readonly hideWhenNone?: boolean\n readonly className?: string\n}\n\n/** How a wrapper reads one seal view, downloads its copy, and whether a missing seal is an answer or a failure. */\ninterface ApprovalSealSource {\n /** Changes when what is asked changes (and, for a record, when the record does). */\n readonly key: string\n /** `null` is the door answering \"no seal here\" (a file nothing attests, #3868): draw nothing, not a failure. */\n readonly load: () => Promise<ApprovalSealOnRecordView | null>\n /** Absent where the view offers no copy (the decider's view: the deliverable is downloaded where its record is read). */\n readonly download?: () => Promise<Blob>\n readonly downloadName: string\n /**\n * A 404 means \"nothing to draw\" (a decision that sealed nothing, a file the caller may not read): draw nothing, not a\n * failure.\n */\n readonly notFoundIsNone?: boolean\n /** Ask again while the seal is PENDING: a decision just made is signed seconds later. */\n readonly pollWhilePending?: boolean\n}\n\n/** How often, and how many times, a PENDING seal is asked again after a decision (about a minute in all). */\nconst PENDING_SEAL_POLL_INTERVAL_MS = 3_000\nconst PENDING_SEAL_POLL_MAX = 20\n\n/** Whether a failed read is the door answering \"nothing here\" (404), never a failure the reader should see. */\nfunction isNotFound(error: unknown): boolean {\n return isBackendRefusal(error) && error.errorType === ErrorType.NOT_FOUND\n}\n\n/** The state shared by every seal wrapper: the read, the check, the download. */\nfunction useApprovalSealView(source: ApprovalSealSource | undefined): {\n readonly read: { readonly state: ApprovalSealReadState; readonly view?: ApprovalSealOnRecordView }\n readonly none: boolean\n readonly check: { readonly state: ApprovalSealCheckState; readonly outcome?: ApprovalSealCheckOutcome }\n readonly onCheck: () => void\n readonly onDownloadManifestedCopy: () => void\n readonly downloading: boolean\n} {\n const [read, setRead] = useState<{ readonly state: ApprovalSealReadState; readonly view?: ApprovalSealOnRecordView }>({ state: ApprovalSealReadState.LOADING })\n const [none, setNone] = useState(false)\n const [check, setCheck] = useState<{ readonly state: ApprovalSealCheckState; readonly outcome?: ApprovalSealCheckOutcome }>({ state: ApprovalSealCheckState.IDLE })\n const [downloading, setDownloading] = useState(false)\n const key = source?.key\n\n useEffect(() => {\n if (!source) return\n let current = true\n let polls = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n setRead({ state: ApprovalSealReadState.LOADING })\n setNone(false)\n setCheck({ state: ApprovalSealCheckState.IDLE })\n const ask = (): void => {\n // Through a promise, so a load that throws before it returns one is a failed read like any other.\n Promise.resolve().then(source.load)\n .then((view) => {\n if (!current) return\n if (view === null) {\n setNone(true)\n return\n }\n setRead({ state: ApprovalSealReadState.READY, view })\n if (source.pollWhilePending && view.state === ApprovalSealOnRecordState.PENDING && polls < PENDING_SEAL_POLL_MAX) {\n polls += 1\n timer = setTimeout(ask, PENDING_SEAL_POLL_INTERVAL_MS)\n }\n })\n .catch((error: unknown) => {\n if (!current) return\n if (source.notFoundIsNone && isNotFound(error)) setNone(true)\n else setRead({ state: ApprovalSealReadState.FAILED })\n })\n }\n ask()\n return () => { current = false; if (timer) clearTimeout(timer) }\n // `key` names what is asked; the source object itself is rebuilt on every render.\n }, [key])\n\n const jws = read.view?.jws\n const onCheck = useCallback(() => {\n if (!jws) return\n setCheck({ state: ApprovalSealCheckState.CHECKING })\n getManualCallsHttpClient().checkApprovalSeal(jws)\n .then((verdict) => setCheck({ state: ApprovalSealCheckState.DONE, outcome: approvalSealCheckOutcomeOf(verdict) }))\n .catch(() => setCheck({ state: ApprovalSealCheckState.FAILED }))\n }, [jws])\n\n const onDownloadManifestedCopy = useCallback(() => {\n if (!source?.download) return\n setDownloading(true)\n source.download()\n .then((blob) => saveBlobAsFile(blob, source.downloadName))\n .catch(() => undefined)\n .finally(() => setDownloading(false))\n }, [key])\n\n return { read, none, check, onCheck, onDownloadManifestedCopy, downloading }\n}\n\n/** Draws one seal view through the preset, with the meaning and outcome in their vocabularies' words. */\nfunction ApprovalSealOf({ state, offersCopy = true, movedFieldLabels, description, className }: {\n readonly state: ReturnType<typeof useApprovalSealView>\n readonly offersCopy?: boolean\n readonly movedFieldLabels?: readonly string[]\n readonly description?: string\n readonly className?: string\n}): React.JSX.Element {\n const { tResourceFieldEnumValue } = useI18n()\n const { read, check, onCheck, onDownloadManifestedCopy, downloading } = state\n const view = read.view\n const shape = ApprovalSealSchema.shape\n return (\n <ApprovalSeal\n readState={read.state}\n {...(view ? { view } : {})}\n {...(movedFieldLabels ? { movedFieldLabels } : {})}\n {...(description ? { description } : {})}\n {...(view?.meaning ? { meaningLabel: tResourceFieldEnumValue(APPROVAL_SEALS, 'meaning', view.meaning, shape.meaning) } : {})}\n {...(view?.outcome ? { outcomeLabel: tResourceFieldEnumValue(APPROVAL_SEALS, 'outcome', view.outcome, shape.outcome) } : {})}\n checkState={check.state}\n {...(check.outcome ? { checkOutcome: check.outcome } : {})}\n {...(view?.jws ? { onCheck } : {})}\n {...(offersCopy && view?.deliverable?.manifestedCopyAvailable ? { onDownloadManifestedCopy, downloadingManifestedCopy: downloading } : {})}\n {...(className ? { className } : {})}\n />\n )\n}\n\n/**\n * The approval seal the record on this display surface stores in `field` (#2913): who approved it, when, with what\n * meaning, whether the approval still describes the record, its deliverable's manifested copy and a check of the seal.\n *\n * Place it in a resource's DISPLAY template (`*.ui-behavior.tsx`), where the record and its resource are in context. It\n * asks `GET /approval-seals/:sealId/records/:resourceType/:resourceId/:field`, which admits exactly the readers the\n * record's own READ admits, and asks again when the record changes, since whether the approval is current depends on it.\n * Moved fields are labelled with the record's own field labels; their values are never shown.\n */\nexport function RecordApprovalSeal({ field, hideWhenNone, className }: RecordApprovalSealProps): React.JSX.Element | null {\n const { resourceType, resourceId } = useResourceDisplayContext()\n const template = useOptionalDisplayTemplateContext()\n const record = template?.data\n const sealId = sealIdOf(record?.[field])\n const recordVersion = useRecordVersion(record)\n const target = sealId && resourceType && resourceId ? { sealId, resourceType: String(resourceType), resourceId: String(resourceId), field } : undefined\n const state = useApprovalSealView(target ? {\n // The record is part of what is asked: a value the approval covers may have moved.\n key: `${target.sealId}|${target.resourceType}|${target.resourceId}|${field}|${recordVersion}`,\n load: () => getManualCallsHttpClient().readApprovalSealOnRecord(target),\n download: () => getManualCallsHttpClient().downloadApprovalSealManifestedCopy(target),\n downloadName: `approval-${target.sealId}.pdf`,\n } : undefined)\n\n if (!record) return null\n if (!target) {\n if (hideWhenNone || !resourceType) return null\n return <ApprovalSeal readState={ApprovalSealReadState.READY} view={{ sealId: '', state: ApprovalSealOnRecordState.NO_SEAL }} {...(className ? { className } : {})} />\n }\n const movedFieldLabels = state.read.view?.currency?.movedFields.map((name) => template?.fieldLabels?.[name] ?? name)\n return <ApprovalSealOf state={state} {...(movedFieldLabels ? { movedFieldLabels } : {})} {...(className ? { className } : {})} />\n}\n\n/** A record's identity in time, so the record's seal is asked again when the record changes. */\nfunction useRecordVersion(record: Record<string, unknown> | undefined): string {\n const updatedAt = record?.updatedAt\n const stamp = updatedAt instanceof Date ? updatedAt.toISOString() : typeof updatedAt === 'string' ? updatedAt : ''\n // Without a stamp, the object's identity is the version: a re-read hands a new object.\n const [identity, setIdentity] = useState(0)\n const last = useRef(record)\n useEffect(() => {\n if (last.current !== record) { last.current = record; if (!stamp) setIdentity((value) => value + 1) }\n }, [record, stamp])\n return stamp || String(identity)\n}\n\nexport interface FileApprovalSealProps {\n /** The file a seal may attest: the deliverable a person approved by its hash (a close report's PDF). */\n readonly fileId: string\n readonly className?: string\n}\n\n/**\n * The approval seal that attests a file, under the file (#2913): drawn by `DisplayFieldFile` on a DISPLAY surface, and\n * nothing at all for the many files no seal attests, which the door answers `null` rather than a 404 the browser would\n * log as a failed load (#3868). It asks `GET /approval-seals/files/:fileId`, admitted by the READ\n * of the record the file belongs to, and only for a seal its own record still names (an approval whose effect failed\n * shows nothing). Currency is not drawn here: it is a statement about the record the approval is about.\n */\nexport function FileApprovalSeal({ fileId, className }: FileApprovalSealProps): React.JSX.Element | null {\n const state = useApprovalSealView({\n key: fileId,\n load: () => getManualCallsHttpClient().readApprovalSealOnFile(fileId),\n download: () => getManualCallsHttpClient().downloadApprovalSealFileManifestedCopy(fileId),\n downloadName: `approval-${fileId}.pdf`,\n notFoundIsNone: true,\n })\n if (state.none || state.read.state === ApprovalSealReadState.LOADING) return null\n return <ApprovalSealOf state={state} {...(className ? { className } : {})} />\n}\n\nexport interface DecisionApprovalSealProps {\n /** The decision whose seal is shown: one the signed-in person answered, or one raised in their conversation (#4062). */\n readonly decisionRef: string\n /** What the decision was about, in the card's own words (the title the inbox showed). */\n readonly description?: string\n readonly className?: string\n}\n\n/**\n * The seal of a decision (#2913), once it is decided: under the inbox for the answers given there, and on a conversation's\n * line for the call that waited on it (#4062). Asked of `GET /approval-seals/decisions/:decisionRef`, which answers the\n * decider, and anyone else only when the record the seal is about names it and that record's own READ admits them. The\n * seal is signed seconds after the decision, so a PENDING seal is asked again until it is signed (about a minute at most); a decision that sealed nothing\n * draws nothing.\n */\nexport function DecisionApprovalSeal({ decisionRef, description, className }: DecisionApprovalSealProps): React.JSX.Element | null {\n const state = useApprovalSealView({\n key: decisionRef,\n load: () => getManualCallsHttpClient().readApprovalSealOfDecision(decisionRef),\n downloadName: `approval-${decisionRef}.pdf`,\n notFoundIsNone: true,\n pollWhilePending: true,\n })\n if (state.none) return null\n // The decider's view offers no copy: the deliverable is the record's, downloaded where the record is read.\n return <ApprovalSealOf state={state} offersCopy={false} {...(description ? { description } : {})} {...(className ? { className } : {})} />\n}\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SignatureRequestOnRecordView, type SignatureRequestUnsentApprovalOnRecord } from '@wildo-ai/saas-models';
|
|
3
|
+
import type { ComponentPresetProps } from '../../core/components-registry/component-registry.frontend.schemas';
|
|
4
|
+
/** Where the read of a record's signature requests stands. */
|
|
5
|
+
export declare enum SignatureRequestsReadState {
|
|
6
|
+
/** Asked, not answered yet. */
|
|
7
|
+
LOADING = "loading",
|
|
8
|
+
/** Answered: `entries` hold the record's requests, newest first (none: nothing was sent for signature). */
|
|
9
|
+
READY = "ready",
|
|
10
|
+
/** The read failed: said so, never shown as a record nothing was sent for. */
|
|
11
|
+
FAILED = "failed"
|
|
12
|
+
}
|
|
13
|
+
/** Which of a SIGNED request's two files a download asks for. */
|
|
14
|
+
export declare enum SignatureRequestDownload {
|
|
15
|
+
SIGNED_DOCUMENT = "signed_document",
|
|
16
|
+
VALIDATION_EVIDENCE = "validation_evidence"
|
|
17
|
+
}
|
|
18
|
+
/** One request, with its state and level already in their vocabularies' words. */
|
|
19
|
+
export interface SignatureRequestEntry {
|
|
20
|
+
readonly request: SignatureRequestOnRecordView;
|
|
21
|
+
/** `system_enums.SignatureRequest_State`, for the request's state. */
|
|
22
|
+
readonly stateLabel: string;
|
|
23
|
+
/** `system_enums.ElectronicSignature_Level`, for the level required. */
|
|
24
|
+
readonly levelLabel: string;
|
|
25
|
+
}
|
|
26
|
+
/** One approval whose deliverable has no request yet (#2925 review), with its level in its vocabulary's word. */
|
|
27
|
+
export interface SignatureRequestUnsentApprovalEntry {
|
|
28
|
+
readonly approval: SignatureRequestUnsentApprovalOnRecord;
|
|
29
|
+
/** `system_enums.ElectronicSignature_Level`, for the level required. */
|
|
30
|
+
readonly levelLabel: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* What the preset draws (#2925). Presentational: the wrapper reads the requests, words their state and level, and runs
|
|
34
|
+
* the actions; the preset never decides what a reader may see or do, the door already did (a resend is offered only for
|
|
35
|
+
* a request the door marked `resendable`, a download only for one whose files it marked available).
|
|
36
|
+
*/
|
|
37
|
+
export interface SignatureRequestsProps {
|
|
38
|
+
readonly readState: SignatureRequestsReadState;
|
|
39
|
+
/** Present when `readState` is READY, newest first; empty when nothing was sent for signature. */
|
|
40
|
+
readonly entries?: readonly SignatureRequestEntry[];
|
|
41
|
+
/**
|
|
42
|
+
* Present when `readState` is READY: the approvals whose deliverable is approved and has no request yet (#2925 review).
|
|
43
|
+
* Each is drawn as approved and UNSIGNED, never as nothing.
|
|
44
|
+
*/
|
|
45
|
+
readonly unsentApprovals?: readonly SignatureRequestUnsentApprovalEntry[];
|
|
46
|
+
readonly onDownload?: (signatureRequestId: string, which: SignatureRequestDownload) => void;
|
|
47
|
+
readonly onResend?: (signatureRequestId: string) => void;
|
|
48
|
+
/** Offered only when the door marked an unsent approval `sendable`. */
|
|
49
|
+
readonly onSend?: (approvalSealId: string) => void;
|
|
50
|
+
/** The request an action is running for, so its buttons show it. */
|
|
51
|
+
readonly busyRequestId?: string;
|
|
52
|
+
/** The approval a send is running for. */
|
|
53
|
+
readonly busyApprovalSealId?: string;
|
|
54
|
+
/** The last resend was refused or failed: said so beside the request it was asked for. */
|
|
55
|
+
readonly resendFailedRequestId?: string;
|
|
56
|
+
/** The last send was refused or failed: said so beside the approval it was asked for. */
|
|
57
|
+
readonly sendFailedApprovalSealId?: string;
|
|
58
|
+
/** The last download failed (a file that does not match its hash is refused): said so beside its request. */
|
|
59
|
+
readonly downloadFailedRequestId?: string;
|
|
60
|
+
readonly className?: string;
|
|
61
|
+
}
|
|
62
|
+
/** The preset, resolved from the registry: an application may replace how the requests are drawn. */
|
|
63
|
+
export declare function SignatureRequests({ preset, ...props }: SignatureRequestsProps & ComponentPresetProps): React.JSX.Element;
|
|
64
|
+
export interface RecordSignatureRequestsProps {
|
|
65
|
+
/** Draw nothing when nothing was sent for signature, instead of saying so. */
|
|
66
|
+
readonly hideWhenNone?: boolean;
|
|
67
|
+
readonly className?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The electronic-signature requests sent for the deliverable of the record on this display surface (#2925): where each
|
|
71
|
+
* stands, the signed document and its evidence once signed, and a resend of one that ended unsigned.
|
|
72
|
+
*
|
|
73
|
+
* Place it in a resource's DISPLAY template (`*.ui-behavior.tsx`), beside `EmbeddedSigningFrame` when signers sign inside
|
|
74
|
+
* the application. It asks `GET /signature-requests/records/:resourceType/:resourceId`, which admits exactly the readers
|
|
75
|
+
* the record's own READ admits; a resend is offered only to a caller the record's UPDATE admits, and only for the newest
|
|
76
|
+
* request of its approval that ended unsigned and was not replaced. An approved deliverable with no request yet is shown
|
|
77
|
+
* as approved and unsigned, with a send for the same callers. An unsigned request is never drawn as signed, and a request
|
|
78
|
+
* a vendor's test environment accepted without validating says so.
|
|
79
|
+
*/
|
|
80
|
+
export declare function RecordSignatureRequests({ hideWhenNone, className }: RecordSignatureRequestsProps): React.JSX.Element | null;
|
|
81
|
+
//# sourceMappingURL=signature-requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature-requests.d.ts","sourceRoot":"","sources":["../../../../src/components/data-display/signature-requests.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAC/D,OAAO,EAGL,KAAK,4BAA4B,EACjC,KAAK,sCAAsC,EAE5C,MAAM,uBAAuB,CAAA;AAG9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAU5H,8DAA8D;AAC9D,oBAAY,0BAA0B;IACpC,+BAA+B;IAC/B,OAAO,YAAY;IACnB,2GAA2G;IAC3G,KAAK,UAAU;IACf,8EAA8E;IAC9E,MAAM,WAAW;CAClB;AAED,iEAAiE;AACjE,oBAAY,wBAAwB;IAClC,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;CAC5C;AAED,kFAAkF;AAClF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAA;IAC9C,sEAAsE;IACtE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,iHAAiH;AACjH,MAAM,WAAW,mCAAmC;IAClD,QAAQ,CAAC,QAAQ,EAAE,sCAAsC,CAAA;IACzD,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAID;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,SAAS,EAAE,0BAA0B,CAAA;IAC9C,kGAAkG;IAClG,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACnD;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,mCAAmC,EAAE,CAAA;IACzE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAA;IAC3F,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAA;IACxD,uEAAuE;IACvE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;IAClD,oEAAoE;IACpE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,0CAA0C;IAC1C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IACpC,0FAA0F;IAC1F,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;IACvC,yFAAyF;IACzF,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAA;IAC1C,6GAA6G;IAC7G,QAAQ,CAAC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAID,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGlJ;AAED,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAwF3H"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import { CoreResourceType, SignatureRequestSchema, } from '@wildo-ai/saas-models';
|
|
4
|
+
import { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models';
|
|
5
|
+
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
6
|
+
import { getManualCallsHttpClient } from '../../core/requests/wildo-http-client-manual-calls.frontend.service.js';
|
|
7
|
+
import { saveBlobAsFile } from '../../core/commons/save-blob-as-file.frontend.utils.js';
|
|
8
|
+
import { useResourceDisplayContext } from '../../components/data-display/automatic-displayer.utils.js';
|
|
9
|
+
import { useOptionalDisplayTemplateContext } from '../../components/data-display/DisplayTemplateContext.js';
|
|
10
|
+
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
11
|
+
/** The requests' own resource, whose fields declare the vocabularies the state and the level are worded from. */
|
|
12
|
+
const SIGNATURE_REQUESTS = CoreResourceType.SIGNATURE_REQUESTS;
|
|
13
|
+
/** Where the read of a record's signature requests stands. */
|
|
14
|
+
export var SignatureRequestsReadState;
|
|
15
|
+
(function (SignatureRequestsReadState) {
|
|
16
|
+
/** Asked, not answered yet. */
|
|
17
|
+
SignatureRequestsReadState["LOADING"] = "loading";
|
|
18
|
+
/** Answered: `entries` hold the record's requests, newest first (none: nothing was sent for signature). */
|
|
19
|
+
SignatureRequestsReadState["READY"] = "ready";
|
|
20
|
+
/** The read failed: said so, never shown as a record nothing was sent for. */
|
|
21
|
+
SignatureRequestsReadState["FAILED"] = "failed";
|
|
22
|
+
})(SignatureRequestsReadState || (SignatureRequestsReadState = {}));
|
|
23
|
+
/** Which of a SIGNED request's two files a download asks for. */
|
|
24
|
+
export var SignatureRequestDownload;
|
|
25
|
+
(function (SignatureRequestDownload) {
|
|
26
|
+
SignatureRequestDownload["SIGNED_DOCUMENT"] = "signed_document";
|
|
27
|
+
SignatureRequestDownload["VALIDATION_EVIDENCE"] = "validation_evidence";
|
|
28
|
+
})(SignatureRequestDownload || (SignatureRequestDownload = {}));
|
|
29
|
+
// --- Wrapper ---
|
|
30
|
+
/** The preset, resolved from the registry: an application may replace how the requests are drawn. */
|
|
31
|
+
export function SignatureRequests({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
32
|
+
const Component = createComponentResolver(FrontendComponentType.LOW_LEVEL_SIGNATURE_REQUESTS, 'SignatureRequests')(preset);
|
|
33
|
+
return _jsx(Component, { ...props });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The electronic-signature requests sent for the deliverable of the record on this display surface (#2925): where each
|
|
37
|
+
* stands, the signed document and its evidence once signed, and a resend of one that ended unsigned.
|
|
38
|
+
*
|
|
39
|
+
* Place it in a resource's DISPLAY template (`*.ui-behavior.tsx`), beside `EmbeddedSigningFrame` when signers sign inside
|
|
40
|
+
* the application. It asks `GET /signature-requests/records/:resourceType/:resourceId`, which admits exactly the readers
|
|
41
|
+
* the record's own READ admits; a resend is offered only to a caller the record's UPDATE admits, and only for the newest
|
|
42
|
+
* request of its approval that ended unsigned and was not replaced. An approved deliverable with no request yet is shown
|
|
43
|
+
* as approved and unsigned, with a send for the same callers. An unsigned request is never drawn as signed, and a request
|
|
44
|
+
* a vendor's test environment accepted without validating says so.
|
|
45
|
+
*/
|
|
46
|
+
export function RecordSignatureRequests({ hideWhenNone, className }) {
|
|
47
|
+
const { resourceType, resourceId } = useResourceDisplayContext();
|
|
48
|
+
const template = useOptionalDisplayTemplateContext();
|
|
49
|
+
const { tResourceFieldEnumValue } = useI18n();
|
|
50
|
+
const target = resourceType && resourceId ? { resourceType: String(resourceType), resourceId: String(resourceId) } : undefined;
|
|
51
|
+
const [read, setRead] = useState({ state: SignatureRequestsReadState.LOADING });
|
|
52
|
+
const [version, setVersion] = useState(0);
|
|
53
|
+
const [busyRequestId, setBusyRequestId] = useState(undefined);
|
|
54
|
+
const [busyApprovalSealId, setBusyApprovalSealId] = useState(undefined);
|
|
55
|
+
const [resendFailedRequestId, setResendFailedRequestId] = useState(undefined);
|
|
56
|
+
const [sendFailedApprovalSealId, setSendFailedApprovalSealId] = useState(undefined);
|
|
57
|
+
const [downloadFailedRequestId, setDownloadFailedRequestId] = useState(undefined);
|
|
58
|
+
const key = target ? `${target.resourceType}|${target.resourceId}|${version}` : undefined;
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!target)
|
|
61
|
+
return;
|
|
62
|
+
let current = true;
|
|
63
|
+
setRead({ state: SignatureRequestsReadState.LOADING });
|
|
64
|
+
Promise.resolve().then(() => getManualCallsHttpClient().readSignatureRequestsOnRecord(target))
|
|
65
|
+
.then((view) => { if (current)
|
|
66
|
+
setRead({ state: SignatureRequestsReadState.READY, view }); })
|
|
67
|
+
.catch(() => { if (current)
|
|
68
|
+
setRead({ state: SignatureRequestsReadState.FAILED }); });
|
|
69
|
+
return () => { current = false; };
|
|
70
|
+
// `key` names what is asked; `target` is rebuilt on every render.
|
|
71
|
+
}, [key]);
|
|
72
|
+
const onDownload = useCallback((signatureRequestId, which) => {
|
|
73
|
+
if (!target)
|
|
74
|
+
return;
|
|
75
|
+
const params = { ...target, signatureRequestId };
|
|
76
|
+
setBusyRequestId(signatureRequestId);
|
|
77
|
+
setDownloadFailedRequestId(undefined);
|
|
78
|
+
const client = getManualCallsHttpClient();
|
|
79
|
+
const download = which === SignatureRequestDownload.SIGNED_DOCUMENT
|
|
80
|
+
? client.downloadSignatureRequestSignedDocument(params).then((blob) => saveBlobAsFile(blob, `signed-${signatureRequestId}.pdf`))
|
|
81
|
+
: client.downloadSignatureRequestValidationEvidence(params).then((blob) => saveBlobAsFile(blob, `signature-evidence-${signatureRequestId}.json`));
|
|
82
|
+
// A failed download is said, never swallowed: a file whose bytes no longer match its hash is refused (409).
|
|
83
|
+
download.catch(() => setDownloadFailedRequestId(signatureRequestId)).finally(() => setBusyRequestId(undefined));
|
|
84
|
+
}, [key]);
|
|
85
|
+
const onSend = useCallback((approvalSealId) => {
|
|
86
|
+
if (!target)
|
|
87
|
+
return;
|
|
88
|
+
setBusyApprovalSealId(approvalSealId);
|
|
89
|
+
setSendFailedApprovalSealId(undefined);
|
|
90
|
+
getManualCallsHttpClient().sendSignatureRequestForApproval({ ...target, approvalSealId })
|
|
91
|
+
.then(() => setVersion((value) => value + 1))
|
|
92
|
+
.catch(() => setSendFailedApprovalSealId(approvalSealId))
|
|
93
|
+
.finally(() => setBusyApprovalSealId(undefined));
|
|
94
|
+
}, [key]);
|
|
95
|
+
const onResend = useCallback((signatureRequestId) => {
|
|
96
|
+
if (!target)
|
|
97
|
+
return;
|
|
98
|
+
setBusyRequestId(signatureRequestId);
|
|
99
|
+
setResendFailedRequestId(undefined);
|
|
100
|
+
getManualCallsHttpClient().resendSignatureRequest({ ...target, signatureRequestId })
|
|
101
|
+
.then(() => setVersion((value) => value + 1))
|
|
102
|
+
.catch(() => setResendFailedRequestId(signatureRequestId))
|
|
103
|
+
.finally(() => setBusyRequestId(undefined));
|
|
104
|
+
}, [key]);
|
|
105
|
+
if (!template?.data || !target)
|
|
106
|
+
return null;
|
|
107
|
+
const shape = SignatureRequestSchema.shape;
|
|
108
|
+
const entries = read.view?.requests.map((request) => ({
|
|
109
|
+
request,
|
|
110
|
+
stateLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'state', request.state, shape.state),
|
|
111
|
+
levelLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'requiredLevel', request.requiredLevel, shape.requiredLevel),
|
|
112
|
+
}));
|
|
113
|
+
const unsentApprovals = read.view?.unsentApprovals.map((approval) => ({
|
|
114
|
+
approval,
|
|
115
|
+
levelLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'requiredLevel', approval.requiredLevel, shape.requiredLevel),
|
|
116
|
+
}));
|
|
117
|
+
if (hideWhenNone && read.state === SignatureRequestsReadState.READY && entries?.length === 0 && unsentApprovals?.length === 0)
|
|
118
|
+
return null;
|
|
119
|
+
const resendable = entries?.some((entry) => entry.request.resendable) === true;
|
|
120
|
+
const sendable = unsentApprovals?.some((entry) => entry.approval.sendable) === true;
|
|
121
|
+
return (_jsx(SignatureRequests, { readState: read.state, ...(entries ? { entries } : {}), ...(unsentApprovals ? { unsentApprovals } : {}), onDownload: onDownload, ...(resendable ? { onResend } : {}), ...(sendable ? { onSend } : {}), ...(busyRequestId ? { busyRequestId } : {}), ...(busyApprovalSealId ? { busyApprovalSealId } : {}), ...(resendFailedRequestId ? { resendFailedRequestId } : {}), ...(sendFailedApprovalSealId ? { sendFailedApprovalSealId } : {}), ...(downloadFailedRequestId ? { downloadFailedRequestId } : {}), ...(className ? { className } : {}) }));
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=signature-requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signature-requests.js","sourceRoot":"","sources":["../../../../src/components/data-display/signature-requests.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EACL,gBAAgB,EAChB,sBAAsB,GAIvB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AAEzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mFAAmF,CAAA;AAC5H,OAAO,EAAE,cAAc,EAAE,MAAM,mEAAmE,CAAA;AAClG,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AACjH,OAAO,EAAE,iCAAiC,EAAE,MAAM,oEAAoE,CAAA;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAE/D,iHAAiH;AACjH,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,kBAAkB,CAAA;AAE9D,8DAA8D;AAC9D,MAAM,CAAN,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,+BAA+B;IAC/B,iDAAmB,CAAA;IACnB,2GAA2G;IAC3G,6CAAe,CAAA;IACf,8EAA8E;IAC9E,+CAAiB,CAAA;AACnB,CAAC,EAPW,0BAA0B,KAA1B,0BAA0B,QAOrC;A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AAkB,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAClD,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KACxD,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAC9D,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAC5D,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GACpC,CACH,CAAA;AACH,CAAC","sourcesContent":["import React, { useCallback, useEffect, useState } from 'react'\nimport {\n CoreResourceType,\n SignatureRequestSchema,\n type SignatureRequestOnRecordView,\n type SignatureRequestUnsentApprovalOnRecord,\n type SignatureRequestsOnRecordView,\n} from '@wildo-ai/saas-models'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service'\nimport { saveBlobAsFile } from '~wildo-frontend-lib/core/commons/save-blob-as-file.frontend.utils'\nimport { useResourceDisplayContext } from '~wildo-frontend-lib/components/data-display/automatic-displayer.utils'\nimport { useOptionalDisplayTemplateContext } from '~wildo-frontend-lib/components/data-display/DisplayTemplateContext'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\n\n/** The requests' own resource, whose fields declare the vocabularies the state and the level are worded from. */\nconst SIGNATURE_REQUESTS = CoreResourceType.SIGNATURE_REQUESTS\n\n/** Where the read of a record's signature requests stands. */\nexport enum SignatureRequestsReadState {\n /** Asked, not answered yet. */\n LOADING = 'loading',\n /** Answered: `entries` hold the record's requests, newest first (none: nothing was sent for signature). */\n READY = 'ready',\n /** The read failed: said so, never shown as a record nothing was sent for. */\n FAILED = 'failed',\n}\n\n/** Which of a SIGNED request's two files a download asks for. */\nexport enum SignatureRequestDownload {\n SIGNED_DOCUMENT = 'signed_document',\n VALIDATION_EVIDENCE = 'validation_evidence',\n}\n\n/** One request, with its state and level already in their vocabularies' words. */\nexport interface SignatureRequestEntry {\n readonly request: SignatureRequestOnRecordView\n /** `system_enums.SignatureRequest_State`, for the request's state. */\n readonly stateLabel: string\n /** `system_enums.ElectronicSignature_Level`, for the level required. */\n readonly levelLabel: string\n}\n\n/** One approval whose deliverable has no request yet (#2925 review), with its level in its vocabulary's word. */\nexport interface SignatureRequestUnsentApprovalEntry {\n readonly approval: SignatureRequestUnsentApprovalOnRecord\n /** `system_enums.ElectronicSignature_Level`, for the level required. */\n readonly levelLabel: string\n}\n\n// --- Contract ---\n\n/**\n * What the preset draws (#2925). Presentational: the wrapper reads the requests, words their state and level, and runs\n * the actions; the preset never decides what a reader may see or do, the door already did (a resend is offered only for\n * a request the door marked `resendable`, a download only for one whose files it marked available).\n */\nexport interface SignatureRequestsProps {\n readonly readState: SignatureRequestsReadState\n /** Present when `readState` is READY, newest first; empty when nothing was sent for signature. */\n readonly entries?: readonly SignatureRequestEntry[]\n /**\n * Present when `readState` is READY: the approvals whose deliverable is approved and has no request yet (#2925 review).\n * Each is drawn as approved and UNSIGNED, never as nothing.\n */\n readonly unsentApprovals?: readonly SignatureRequestUnsentApprovalEntry[]\n readonly onDownload?: (signatureRequestId: string, which: SignatureRequestDownload) => void\n readonly onResend?: (signatureRequestId: string) => void\n /** Offered only when the door marked an unsent approval `sendable`. */\n readonly onSend?: (approvalSealId: string) => void\n /** The request an action is running for, so its buttons show it. */\n readonly busyRequestId?: string\n /** The approval a send is running for. */\n readonly busyApprovalSealId?: string\n /** The last resend was refused or failed: said so beside the request it was asked for. */\n readonly resendFailedRequestId?: string\n /** The last send was refused or failed: said so beside the approval it was asked for. */\n readonly sendFailedApprovalSealId?: string\n /** The last download failed (a file that does not match its hash is refused): said so beside its request. */\n readonly downloadFailedRequestId?: string\n readonly className?: string\n}\n\n// --- Wrapper ---\n\n/** The preset, resolved from the registry: an application may replace how the requests are drawn. */\nexport function SignatureRequests({ preset = CorePresetNames.DEFAULT, ...props }: SignatureRequestsProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<SignatureRequestsProps>(FrontendComponentType.LOW_LEVEL_SIGNATURE_REQUESTS, 'SignatureRequests')(preset)\n return <Component {...props} />\n}\n\nexport interface RecordSignatureRequestsProps {\n /** Draw nothing when nothing was sent for signature, instead of saying so. */\n readonly hideWhenNone?: boolean\n readonly className?: string\n}\n\n/**\n * The electronic-signature requests sent for the deliverable of the record on this display surface (#2925): where each\n * stands, the signed document and its evidence once signed, and a resend of one that ended unsigned.\n *\n * Place it in a resource's DISPLAY template (`*.ui-behavior.tsx`), beside `EmbeddedSigningFrame` when signers sign inside\n * the application. It asks `GET /signature-requests/records/:resourceType/:resourceId`, which admits exactly the readers\n * the record's own READ admits; a resend is offered only to a caller the record's UPDATE admits, and only for the newest\n * request of its approval that ended unsigned and was not replaced. An approved deliverable with no request yet is shown\n * as approved and unsigned, with a send for the same callers. An unsigned request is never drawn as signed, and a request\n * a vendor's test environment accepted without validating says so.\n */\nexport function RecordSignatureRequests({ hideWhenNone, className }: RecordSignatureRequestsProps): React.JSX.Element | null {\n const { resourceType, resourceId } = useResourceDisplayContext()\n const template = useOptionalDisplayTemplateContext()\n const { tResourceFieldEnumValue } = useI18n()\n const target = resourceType && resourceId ? { resourceType: String(resourceType), resourceId: String(resourceId) } : undefined\n const [read, setRead] = useState<{ readonly state: SignatureRequestsReadState; readonly view?: SignatureRequestsOnRecordView }>({ state: SignatureRequestsReadState.LOADING })\n const [version, setVersion] = useState(0)\n const [busyRequestId, setBusyRequestId] = useState<string | undefined>(undefined)\n const [busyApprovalSealId, setBusyApprovalSealId] = useState<string | undefined>(undefined)\n const [resendFailedRequestId, setResendFailedRequestId] = useState<string | undefined>(undefined)\n const [sendFailedApprovalSealId, setSendFailedApprovalSealId] = useState<string | undefined>(undefined)\n const [downloadFailedRequestId, setDownloadFailedRequestId] = useState<string | undefined>(undefined)\n const key = target ? `${target.resourceType}|${target.resourceId}|${version}` : undefined\n\n useEffect(() => {\n if (!target) return\n let current = true\n setRead({ state: SignatureRequestsReadState.LOADING })\n Promise.resolve().then(() => getManualCallsHttpClient().readSignatureRequestsOnRecord(target))\n .then((view) => { if (current) setRead({ state: SignatureRequestsReadState.READY, view }) })\n .catch(() => { if (current) setRead({ state: SignatureRequestsReadState.FAILED }) })\n return () => { current = false }\n // `key` names what is asked; `target` is rebuilt on every render.\n }, [key])\n\n const onDownload = useCallback((signatureRequestId: string, which: SignatureRequestDownload) => {\n if (!target) return\n const params = { ...target, signatureRequestId }\n setBusyRequestId(signatureRequestId)\n setDownloadFailedRequestId(undefined)\n const client = getManualCallsHttpClient()\n const download = which === SignatureRequestDownload.SIGNED_DOCUMENT\n ? client.downloadSignatureRequestSignedDocument(params).then((blob) => saveBlobAsFile(blob, `signed-${signatureRequestId}.pdf`))\n : client.downloadSignatureRequestValidationEvidence(params).then((blob) => saveBlobAsFile(blob, `signature-evidence-${signatureRequestId}.json`))\n // A failed download is said, never swallowed: a file whose bytes no longer match its hash is refused (409).\n download.catch(() => setDownloadFailedRequestId(signatureRequestId)).finally(() => setBusyRequestId(undefined))\n }, [key])\n\n const onSend = useCallback((approvalSealId: string) => {\n if (!target) return\n setBusyApprovalSealId(approvalSealId)\n setSendFailedApprovalSealId(undefined)\n getManualCallsHttpClient().sendSignatureRequestForApproval({ ...target, approvalSealId })\n .then(() => setVersion((value) => value + 1))\n .catch(() => setSendFailedApprovalSealId(approvalSealId))\n .finally(() => setBusyApprovalSealId(undefined))\n }, [key])\n\n const onResend = useCallback((signatureRequestId: string) => {\n if (!target) return\n setBusyRequestId(signatureRequestId)\n setResendFailedRequestId(undefined)\n getManualCallsHttpClient().resendSignatureRequest({ ...target, signatureRequestId })\n .then(() => setVersion((value) => value + 1))\n .catch(() => setResendFailedRequestId(signatureRequestId))\n .finally(() => setBusyRequestId(undefined))\n }, [key])\n\n if (!template?.data || !target) return null\n const shape = SignatureRequestSchema.shape\n const entries = read.view?.requests.map((request): SignatureRequestEntry => ({\n request,\n stateLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'state', request.state, shape.state),\n levelLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'requiredLevel', request.requiredLevel, shape.requiredLevel),\n }))\n const unsentApprovals = read.view?.unsentApprovals.map((approval): SignatureRequestUnsentApprovalEntry => ({\n approval,\n levelLabel: tResourceFieldEnumValue(SIGNATURE_REQUESTS, 'requiredLevel', approval.requiredLevel, shape.requiredLevel),\n }))\n if (hideWhenNone && read.state === SignatureRequestsReadState.READY && entries?.length === 0 && unsentApprovals?.length === 0) return null\n const resendable = entries?.some((entry) => entry.request.resendable) === true\n const sendable = unsentApprovals?.some((entry) => entry.approval.sendable) === true\n return (\n <SignatureRequests\n readState={read.state}\n {...(entries ? { entries } : {})}\n {...(unsentApprovals ? { unsentApprovals } : {})}\n onDownload={onDownload}\n {...(resendable ? { onResend } : {})}\n {...(sendable ? { onSend } : {})}\n {...(busyRequestId ? { busyRequestId } : {})}\n {...(busyApprovalSealId ? { busyApprovalSealId } : {})}\n {...(resendFailedRequestId ? { resendFailedRequestId } : {})}\n {...(sendFailedApprovalSealId ? { sendFailedApprovalSealId } : {})}\n {...(downloadFailedRequestId ? { downloadFailedRequestId } : {})}\n {...(className ? { className } : {})}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute marking a rendered EMPTY STATE, a contract other code reads (#4742).
|
|
3
|
+
*
|
|
4
|
+
* Set by both wrappers that render an empty-state preset, on every use that is an empty state and on no other:
|
|
5
|
+
* - `EmptyState` (`empty-state.tsx`), unless `respectSurfaceEmptyDisplay` is off: a chart's error fallback renders it
|
|
6
|
+
* that way and is not an empty state;
|
|
7
|
+
* - `ResourceEmptyState` (`resource-empty-state.tsx`), always: a resource collection with nothing in it.
|
|
8
|
+
* The wrapper passes it to the preset like any other prop, so a preset spreads it onto its root (the engine's default
|
|
9
|
+
* preset does). Internal to the package: no barrel re-exports this module.
|
|
10
|
+
*
|
|
11
|
+
* Its reader is the built-application quality review's drive (`wildo frontend review`, `VIEW_STATE_READING_EXPRESSION`):
|
|
12
|
+
* it reads the marked region's actions before the rest of the page, so a list's toolbar cannot crowd out the empty
|
|
13
|
+
* state's own Create. A preset that drops it leaves that reading in page order.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EMPTY_STATE_MARKER_ATTRIBUTE = "data-empty-state";
|
|
16
|
+
//# sourceMappingURL=empty-state-marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state-marker.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state-marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,4BAA4B,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The attribute marking a rendered EMPTY STATE, a contract other code reads (#4742).
|
|
3
|
+
*
|
|
4
|
+
* Set by both wrappers that render an empty-state preset, on every use that is an empty state and on no other:
|
|
5
|
+
* - `EmptyState` (`empty-state.tsx`), unless `respectSurfaceEmptyDisplay` is off: a chart's error fallback renders it
|
|
6
|
+
* that way and is not an empty state;
|
|
7
|
+
* - `ResourceEmptyState` (`resource-empty-state.tsx`), always: a resource collection with nothing in it.
|
|
8
|
+
* The wrapper passes it to the preset like any other prop, so a preset spreads it onto its root (the engine's default
|
|
9
|
+
* preset does). Internal to the package: no barrel re-exports this module.
|
|
10
|
+
*
|
|
11
|
+
* Its reader is the built-application quality review's drive (`wildo frontend review`, `VIEW_STATE_READING_EXPRESSION`):
|
|
12
|
+
* it reads the marked region's actions before the rest of the page, so a list's toolbar cannot crowd out the empty
|
|
13
|
+
* state's own Create. A preset that drops it leaves that reading in page order.
|
|
14
|
+
*/
|
|
15
|
+
export const EMPTY_STATE_MARKER_ATTRIBUTE = 'data-empty-state';
|
|
16
|
+
//# sourceMappingURL=empty-state-marker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state-marker.js","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state-marker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,kBAAkB,CAAA","sourcesContent":["/**\n * The attribute marking a rendered EMPTY STATE, a contract other code reads (#4742).\n *\n * Set by both wrappers that render an empty-state preset, on every use that is an empty state and on no other:\n * - `EmptyState` (`empty-state.tsx`), unless `respectSurfaceEmptyDisplay` is off: a chart's error fallback renders it\n * that way and is not an empty state;\n * - `ResourceEmptyState` (`resource-empty-state.tsx`), always: a resource collection with nothing in it.\n * The wrapper passes it to the preset like any other prop, so a preset spreads it onto its root (the engine's default\n * preset does). Internal to the package: no barrel re-exports this module.\n *\n * Its reader is the built-application quality review's drive (`wildo frontend review`, `VIEW_STATE_READING_EXPRESSION`):\n * it reads the marked region's actions before the rest of the page, so a list's toolbar cannot crowd out the empty\n * state's own Create. A preset that drops it leaves that reading in page order.\n */\nexport const EMPTY_STATE_MARKER_ATTRIBUTE = 'data-empty-state'\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AACvH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;
|
|
1
|
+
{"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AACvH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAA;AAUrG,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAA;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE;QAChB,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,IAAI,CAAA;KACpB,CAAA;IACD,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC/B,0EAA0E;IAC1E,0BAA0B,CAAC,EAAE,OAAO,CAAA;CACrC;AAMD,eAAO,MAAM,UAAU,+GA6BtB,CAAA"}
|
|
@@ -4,6 +4,7 @@ import { createComponentResolverWithRef } from '../../core/components-registry/c
|
|
|
4
4
|
import { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models';
|
|
5
5
|
import { useSurfacePolicy } from '../../core/ui/SurfacePolicyContext.js';
|
|
6
6
|
import { resolveSurfaceEmptyDisplay, shouldCollapseEmptyDisplay, shouldHideEmptyDisplay, } from './empty-display-policy.utils.js';
|
|
7
|
+
import { EMPTY_STATE_MARKER_ATTRIBUTE } from './empty-state-marker.js';
|
|
7
8
|
export const EmptyState = forwardRef(({ preset = CorePresetNames.DEFAULT, children, hidden, style, respectSurfaceEmptyDisplay = true, ...props }, ref) => {
|
|
8
9
|
const surfacePolicy = useSurfacePolicy();
|
|
9
10
|
const emptyDisplay = respectSurfaceEmptyDisplay
|
|
@@ -16,7 +17,7 @@ export const EmptyState = forwardRef(({ preset = CorePresetNames.DEFAULT, childr
|
|
|
16
17
|
return null;
|
|
17
18
|
}
|
|
18
19
|
const Component = createComponentResolverWithRef(FrontendComponentType.LOW_LEVEL_EMPTY_STATE, 'EmptyState')(preset);
|
|
19
|
-
return (_jsx(Component, { ...props, hidden: hidden || shouldHideEmptyDisplay(emptyDisplay), style: shouldHideEmptyDisplay(emptyDisplay) ? { ...style, display: 'none' } : style, ref: ref }));
|
|
20
|
+
return (_jsx(Component, { ...props, ...(respectSurfaceEmptyDisplay ? { [EMPTY_STATE_MARKER_ATTRIBUTE]: '' } : {}), hidden: hidden || shouldHideEmptyDisplay(emptyDisplay), style: shouldHideEmptyDisplay(emptyDisplay) ? { ...style, display: 'none' } : style, ref: ref }));
|
|
20
21
|
});
|
|
21
22
|
EmptyState.displayName = 'EmptyState';
|
|
22
23
|
//# sourceMappingURL=empty-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,iFAAiF,CAAA;AAChI,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAG5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAA;AACnF,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../../../src/components/feedback/empty-state.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,8BAA8B,EAAE,MAAM,iFAAiF,CAAA;AAChI,OAAO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E,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,EACnF,GAAG,EAAE,GAAG,GACR,CACH,CAAA;AACH,CAAC,CACF,CAAA;AACD,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport { createComponentResolverWithRef } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas'\nimport { useSurfacePolicy } from '~wildo-frontend-lib/core/ui/SurfacePolicyContext'\nimport {\n resolveSurfaceEmptyDisplay,\n shouldCollapseEmptyDisplay,\n shouldHideEmptyDisplay,\n} from './empty-display-policy.utils'\nimport { EMPTY_STATE_MARKER_ATTRIBUTE } from './empty-state-marker'\n\n// --- Contract ---\nexport interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {\n title: string\n description?: string\n /** Icon reference from the icon registry */\n iconRef?: StandardIconReference | string\n primaryActionLabel?: string\n onPrimaryAction?: () => void\n showPrimaryAction?: boolean\n secondaryAction?: {\n label: string\n onClick: () => void\n }\n variant?: 'default' | 'compact'\n /** Set false for non-empty-state usages such as chart error fallbacks. */\n respectSurfaceEmptyDisplay?: boolean\n}\n\n// --- Wrapper ---\ntype EmptyStateWrapperProps = EmptyStateProps & ComponentPresetProps\n\n\nexport const EmptyState = forwardRef<HTMLDivElement, EmptyStateWrapperProps>(\n ({ preset = CorePresetNames.DEFAULT, children, hidden, style, respectSurfaceEmptyDisplay = true, ...props }, ref) => {\n const surfacePolicy = useSurfacePolicy()\n const emptyDisplay = respectSurfaceEmptyDisplay\n ? resolveSurfaceEmptyDisplay(surfacePolicy.interactiveState?.emptyDisplay)\n : 'placeholder'\n\n if (emptyDisplay === 'render-children') {\n return <>{children ?? null}</>\n }\n\n if (shouldCollapseEmptyDisplay(emptyDisplay)) {\n return null\n }\n\n const Component = createComponentResolverWithRef<EmptyStateProps, HTMLDivElement>(\n FrontendComponentType.LOW_LEVEL_EMPTY_STATE,\n 'EmptyState'\n )(preset)\n return (\n <Component\n {...props}\n {...(respectSurfaceEmptyDisplay ? { [EMPTY_STATE_MARKER_ATTRIBUTE]: '' } : {})}\n hidden={hidden || shouldHideEmptyDisplay(emptyDisplay)}\n style={shouldHideEmptyDisplay(emptyDisplay) ? { ...style, display: 'none' } : style}\n ref={ref}\n />\n )\n }\n)\nEmptyState.displayName = 'EmptyState'\n"]}
|
|
@@ -9,6 +9,11 @@ export interface FeatureUnavailablePromptProps {
|
|
|
9
9
|
limit: number;
|
|
10
10
|
};
|
|
11
11
|
upgradeOptionsCount?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The roles that can buy for the current scope (`BillingContextType.purchaserRoleRefs`), which a contact-an-administrator
|
|
14
|
+
* prompt names so the person knows whom to ask. Filled from the billing context when not given.
|
|
15
|
+
*/
|
|
16
|
+
purchaserRoleRefs?: readonly string[];
|
|
12
17
|
/**
|
|
13
18
|
* The component a CUSTOM-behaviour feature declares (`unavailability.customComponentRef`),
|
|
14
19
|
* carried from `FeatureAvailability`. Read ONLY when `behavior` is CUSTOM; ignored otherwise.
|
|
@@ -27,6 +32,7 @@ export interface FeatureUnavailableCustomComponentProps {
|
|
|
27
32
|
limit: number;
|
|
28
33
|
};
|
|
29
34
|
upgradeOptionsCount?: number;
|
|
35
|
+
purchaserRoleRefs?: readonly string[];
|
|
30
36
|
onAction?: () => void;
|
|
31
37
|
onDismiss?: () => void;
|
|
32
38
|
}
|
|
@@ -49,6 +55,6 @@ type FeatureUnavailablePromptWrapperProps = FeatureUnavailablePromptProps & Comp
|
|
|
49
55
|
* a silent fallback is the defect this closes, one layer down. Authoring-time refusal is the
|
|
50
56
|
* companion half — see `verifyFeatureCustomComponentRefs`.
|
|
51
57
|
*/
|
|
52
|
-
export declare function FeatureUnavailablePrompt({ preset, ...
|
|
58
|
+
export declare function FeatureUnavailablePrompt({ preset, ...given }: FeatureUnavailablePromptWrapperProps): React.JSX.Element;
|
|
53
59
|
export {};
|
|
54
60
|
//# sourceMappingURL=feature-unavailable-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-unavailable-prompt.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/features/feature-unavailable-prompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"feature-unavailable-prompt.d.ts","sourceRoot":"","sources":["../../../../../src/components/feedback/features/feature-unavailable-prompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAI5H,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE;QACV,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,qEAAqE;AACrE,MAAM,WAAW,sCAAsC;IACrD,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,SAAS,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACjE,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAGD,KAAK,oCAAoC,GAAG,6BAA6B,GAAG,oBAAoB,CAAA;AAEhG;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,oCAAoC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA8BhJ"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponentResolver } from '../../../core/components-registry/component-resolver.frontend.helper.js';
|
|
3
3
|
import { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models';
|
|
4
4
|
import { ComponentRegistryService } from '../../../core/components-registry/component-registry.frontend.service.js';
|
|
5
|
+
import { RegisteredComponentRoot } from '../../../core/components-registry/RegisteredComponentRoot.js';
|
|
5
6
|
import { ComponentNotInjected } from '../../../core/components-registry/ComponentNotInjected.js';
|
|
6
7
|
import { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
|
|
8
|
+
import { useBillingSafe } from '../../../core/billing/useBilling.js';
|
|
7
9
|
/**
|
|
8
10
|
* The unavailability surface, with ONE branch the preset cannot take.
|
|
9
11
|
*
|
|
@@ -22,14 +24,18 @@ import { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models';
|
|
|
22
24
|
* a silent fallback is the defect this closes, one layer down. Authoring-time refusal is the
|
|
23
25
|
* companion half — see `verifyFeatureCustomComponentRefs`.
|
|
24
26
|
*/
|
|
25
|
-
export function FeatureUnavailablePrompt({ preset = CorePresetNames.DEFAULT, ...
|
|
27
|
+
export function FeatureUnavailablePrompt({ preset = CorePresetNames.DEFAULT, ...given }) {
|
|
28
|
+
// Who can buy is a fact of the billing context, so every surface rendering the prompt (a route guard, a gate, the action
|
|
29
|
+
// bar's dialog) names the same people without each one looking them up.
|
|
30
|
+
const billing = useBillingSafe();
|
|
31
|
+
const props = { ...given, purchaserRoleRefs: given.purchaserRoleRefs ?? billing?.purchaserRoleRefs };
|
|
26
32
|
if (props.behavior === FeatureUnavailabilityBehavior.CUSTOM && props.customComponentRef) {
|
|
27
33
|
const CustomComponent = ComponentRegistryService.resolve(props.customComponentRef, CorePresetNames.DEFAULT);
|
|
28
34
|
if (!CustomComponent) {
|
|
29
35
|
return (_jsx(ComponentNotInjected, { componentType: props.customComponentRef, componentName: props.customComponentRef }));
|
|
30
36
|
}
|
|
31
37
|
const { customComponentRef: _ignored, ...customProps } = props;
|
|
32
|
-
return _jsx(CustomComponent, { ...customProps });
|
|
38
|
+
return (_jsx(RegisteredComponentRoot, { componentRef: props.customComponentRef, children: _jsx(CustomComponent, { ...customProps }) }));
|
|
33
39
|
}
|
|
34
40
|
const Component = createComponentResolver(FrontendComponentType.LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT, 'FeatureUnavailablePrompt')(preset);
|
|
35
41
|
return _jsx(Component, { ...props });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-unavailable-prompt.js","sourceRoot":"","sources":["../../../../../src/components/feedback/features/feature-unavailable-prompt.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAA;AAC3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAA;AACxG,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"feature-unavailable-prompt.js","sourceRoot":"","sources":["../../../../../src/components/feedback/features/feature-unavailable-prompt.tsx"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AAC,kBAAkB,YAC7D,KAAC,eAAe,OAAK,WAAW,GAAI,GACZ,CAC3B,CAAA;IACH,CAAC;IAED,MAAM,SAAS,GAAG,uBAAuB,CAAgC,qBAAqB,CAAC,oCAAoC,EAAE,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAA;IACxK,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAA;AACjC,CAAC","sourcesContent":["import React from 'react'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport { ComponentRegistryService } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.service'\nimport { RegisteredComponentRoot } from '~wildo-frontend-lib/core/components-registry/RegisteredComponentRoot'\nimport { ComponentNotInjected } from '~wildo-frontend-lib/core/components-registry/ComponentNotInjected'\nimport { FeatureUnavailabilityBehavior } from '@wildo-ai/saas-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\n\n// --- Contract ---\nexport interface FeatureUnavailablePromptProps {\n behavior: string\n missingFeatures?: string[]\n limitInfo?: {\n featureId: string\n current: number\n limit: number\n }\n upgradeOptionsCount?: number\n /**\n * The roles that can buy for the current scope (`BillingContextType.purchaserRoleRefs`), which a contact-an-administrator\n * prompt names so the person knows whom to ask. Filled from the billing context when not given.\n */\n purchaserRoleRefs?: readonly string[]\n /**\n * The component a CUSTOM-behaviour feature declares (`unavailability.customComponentRef`),\n * carried from `FeatureAvailability`. Read ONLY when `behavior` is CUSTOM; ignored otherwise.\n */\n customComponentRef?: string\n onAction?: () => void\n onDismiss?: () => void\n}\n\n/** Props handed to an application's own unavailability component. */\nexport interface FeatureUnavailableCustomComponentProps {\n behavior: string\n missingFeatures?: string[]\n limitInfo?: { featureId: string; current: number; limit: number }\n upgradeOptionsCount?: number\n purchaserRoleRefs?: readonly string[]\n onAction?: () => void\n onDismiss?: () => void\n}\n\n// --- Wrapper ---\ntype FeatureUnavailablePromptWrapperProps = FeatureUnavailablePromptProps & ComponentPresetProps\n\n/**\n * The unavailability surface, with ONE branch the preset cannot take.\n *\n * CUSTOM is the behaviour whose whole point is that the application renders its own explanation or\n * upsell in place of the generic prompt. It is resolved HERE rather than in the preset, exactly as\n * `FullCustomView` resolves its `componentRef`: registry resolution is engine work, and a preset is\n * a presentation component that should not reach into the registry.\n *\n * Until 2026-09-08 `customComponentRef` had no reader anywhere, so CUSTOM rendered the generic\n * prompt with no error and no warning (#440) — and the two sites that handled it DISAGREED, the\n * preset aliasing it to the DISABLE copy while `useResourceOperationActions` grouped it with the\n * prompt behaviours. The reconciliation is that CUSTOM *is* a prompt behaviour, and this is what it\n * prompts with.\n *\n * An unresolvable ref renders `ComponentNotInjected` rather than falling back to the generic prompt:\n * a silent fallback is the defect this closes, one layer down. Authoring-time refusal is the\n * companion half — see `verifyFeatureCustomComponentRefs`.\n */\nexport function FeatureUnavailablePrompt({ preset = CorePresetNames.DEFAULT, ...given }: FeatureUnavailablePromptWrapperProps): React.JSX.Element {\n // Who can buy is a fact of the billing context, so every surface rendering the prompt (a route guard, a gate, the action\n // bar's dialog) names the same people without each one looking them up.\n const billing = useBillingSafe()\n const props: FeatureUnavailablePromptProps = { ...given, purchaserRoleRefs: given.purchaserRoleRefs ?? billing?.purchaserRoleRefs }\n if (props.behavior === FeatureUnavailabilityBehavior.CUSTOM && props.customComponentRef) {\n const CustomComponent = ComponentRegistryService.resolve(\n props.customComponentRef,\n CorePresetNames.DEFAULT,\n )\n\n if (!CustomComponent) {\n return (\n <ComponentNotInjected\n componentType={props.customComponentRef}\n componentName={props.customComponentRef}\n />\n )\n }\n\n const { customComponentRef: _ignored, ...customProps } = props\n return (\n <RegisteredComponentRoot componentRef={props.customComponentRef}>\n <CustomComponent {...customProps} />\n </RegisteredComponentRoot>\n )\n }\n\n const Component = createComponentResolver<FeatureUnavailablePromptProps>(FrontendComponentType.LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT, 'FeatureUnavailablePrompt')(preset)\n return <Component {...props} />\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-empty-state.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/resource-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAC;AAG7H,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"resource-empty-state.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/resource-empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAC;AAG7H,OAAO,EACL,KAAK,6BAA6B,EAEnC,MAAM,+DAA+D,CAAC;AAevE,MAAM,WAAW,8BAA+B,SAAQ,oBAAoB;IAC1E,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,6BAA6B,CAAC;IACvC,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,uEAAuE;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,6BAA6B,GAAG,SAAS,EACjD,kBAAkB,EAAE,OAAO,GAC1B,OAAO,CAIT;AAwBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,MAAM,EACN,kBAA0B,EAC1B,cAAc,EACd,OAAmB,EACnB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,eAAe,EAC5B,MAAgC,GACjC,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkG3D"}
|
|
@@ -7,6 +7,7 @@ import { useI18n } from '../../core/i18n/useI18n.js';
|
|
|
7
7
|
import { resolveComponentLabel } from '../../core/i18n/component-label-resolution.utils.js';
|
|
8
8
|
import { ResourceFrontend_EmptyStateSecondaryActionType, } from '../../core/resources/resources.frontend.schemas.js';
|
|
9
9
|
import { useGuidance } from '../../core/guidance/useGuidance.js';
|
|
10
|
+
import { EMPTY_STATE_MARKER_ATTRIBUTE } from './empty-state-marker.js';
|
|
10
11
|
import { useSurfacePolicy } from '../../core/ui/SurfacePolicyContext.js';
|
|
11
12
|
import { resolveSurfaceEmptyDisplay, shouldCollapseEmptyDisplay, shouldHideEmptyDisplay, } from './empty-display-policy.utils.js';
|
|
12
13
|
// ─────────────────────────────────────────────────────────────
|
|
@@ -138,6 +139,6 @@ export function ResourceEmptyState({ resourceType, config, hasCreateOperation =
|
|
|
138
139
|
if (emptyDisplay === 'render-children' || shouldCollapseEmptyDisplay(emptyDisplay)) {
|
|
139
140
|
return null;
|
|
140
141
|
}
|
|
141
|
-
return (_jsx(Component, { title: title, description: description, iconRef: iconRef, primaryActionLabel: primaryActionLabel, onPrimaryAction: showPrimaryAction ? onCreateAction : undefined, showPrimaryAction: showPrimaryAction, secondaryAction: secondaryAction, variant: variant, hidden: shouldHideEmptyDisplay(emptyDisplay), style: shouldHideEmptyDisplay(emptyDisplay) ? { display: 'none' } : undefined }));
|
|
142
|
+
return (_jsx(Component, { [EMPTY_STATE_MARKER_ATTRIBUTE]: '', title: title, description: description, iconRef: iconRef, primaryActionLabel: primaryActionLabel, onPrimaryAction: showPrimaryAction ? onCreateAction : undefined, showPrimaryAction: showPrimaryAction, secondaryAction: secondaryAction, variant: variant, hidden: shouldHideEmptyDisplay(emptyDisplay), style: shouldHideEmptyDisplay(emptyDisplay) ? { display: 'none' } : undefined }));
|
|
142
143
|
}
|
|
143
144
|
//# sourceMappingURL=resource-empty-state.js.map
|