@wildo-ai/saas-frontend-lib 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/companion-exports.d.ts +2 -1
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +2 -1
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/actions/action-bar.d.ts +45 -1
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +84 -0
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/actions/button.d.ts +22 -0
- package/dist/esm/components/actions/button.d.ts.map +1 -1
- package/dist/esm/components/actions/button.js +45 -0
- package/dist/esm/components/actions/button.js.map +1 -1
- package/dist/esm/components/ai-elements/chat/conversation-thread.d.ts +109 -0
- package/dist/esm/components/ai-elements/chat/conversation-thread.d.ts.map +1 -0
- package/dist/esm/components/ai-elements/chat/conversation-thread.js +22 -0
- package/dist/esm/components/ai-elements/chat/conversation-thread.js.map +1 -0
- package/dist/esm/components/ai-elements/decision/approval.d.ts +103 -7
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/ai-elements/execution/tool.d.ts +6 -0
- package/dist/esm/components/ai-elements/execution/tool.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/tool.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/canvas.d.ts +60 -1
- package/dist/esm/components/ai-elements/graph/canvas.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/canvas.js +26 -0
- package/dist/esm/components/ai-elements/graph/canvas.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/node.d.ts +39 -4
- package/dist/esm/components/ai-elements/graph/node.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/node.js +18 -0
- package/dist/esm/components/ai-elements/graph/node.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts +6 -0
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +29 -8
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts +17 -0
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -0
- package/dist/esm/components/app/AppLayout_DecisionInbox.js +24 -0
- package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -0
- package/dist/esm/components/app/AppLayout_MainContainer.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_MainContainer.js +3 -0
- package/dist/esm/components/app/AppLayout_MainContainer.js.map +1 -1
- package/dist/esm/components/app/PublicLayout_LegalNotice.d.ts +18 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.d.ts.map +1 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.js +8 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.js.map +1 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.labels.d.ts +3 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.labels.d.ts.map +1 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.labels.js +38 -0
- package/dist/esm/components/app/PublicLayout_LegalNotice.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.d.ts +15 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.js +219 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.js.map +1 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.labels.js +49 -0
- package/dist/esm/components/auth/Auth_ChatIdentityLink.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_Invitation.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Invitation.js +3 -2
- package/dist/esm/components/auth/Auth_Invitation.js.map +1 -1
- package/dist/esm/components/auth/Auth_Invitation.labels.js +2 -2
- package/dist/esm/components/auth/Auth_Invitation.labels.js.map +1 -1
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +40 -7
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_Main.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.labels.js +9 -0
- package/dist/esm/components/auth/Auth_Main.labels.js.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthConsent.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthConsent.js +3 -2
- package/dist/esm/components/auth/Auth_OAuthConsent.js.map +1 -1
- package/dist/esm/components/auth/Auth_PasswordLost.labels.js +2 -2
- package/dist/esm/components/auth/Auth_PasswordLost.labels.js.map +1 -1
- package/dist/esm/components/auth/Auth_Register.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Register.js +8 -1
- package/dist/esm/components/auth/Auth_Register.js.map +1 -1
- package/dist/esm/components/auth/Auth_Register.labels.js +2 -2
- package/dist/esm/components/auth/Auth_Register.labels.js.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +3 -3
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js +94 -6
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +21 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/admin-config/ResourceLayoutPreset_Create_SamlWizard.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/ResourceLayoutPreset_Create_SamlWizard.js +16 -13
- package/dist/esm/components/auth/admin-config/ResourceLayoutPreset_Create_SamlWizard.js.map +1 -1
- package/dist/esm/components/auth/admin-config/SsoConnectionSamlReadSection.js +3 -3
- package/dist/esm/components/auth/admin-config/SsoConnectionSamlReadSection.js.map +1 -1
- package/dist/esm/components/auth/enrollment/PasskeyEnrollmentMethod.d.ts.map +1 -1
- package/dist/esm/components/auth/enrollment/PasskeyEnrollmentMethod.js +1 -1
- package/dist/esm/components/auth/enrollment/PasskeyEnrollmentMethod.js.map +1 -1
- package/dist/esm/components/auth/methods/OrgSamlAuthMethod.d.ts +1 -1
- package/dist/esm/components/auth/methods/OrgSamlAuthMethod.d.ts.map +1 -1
- package/dist/esm/components/auth/methods/OrgSamlAuthMethod.js +3 -4
- package/dist/esm/components/auth/methods/OrgSamlAuthMethod.js.map +1 -1
- package/dist/esm/components/auth/pages/AuthPage_ChatIdentityLink.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_ChatIdentityLink.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_ChatIdentityLink.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_ChatIdentityLink.js.map +1 -0
- package/dist/esm/components/auth/utils/AuthPrivacyNoticeLink.d.ts +39 -0
- package/dist/esm/components/auth/utils/AuthPrivacyNoticeLink.d.ts.map +1 -0
- package/dist/esm/components/auth/utils/AuthPrivacyNoticeLink.js +45 -0
- package/dist/esm/components/auth/utils/AuthPrivacyNoticeLink.js.map +1 -0
- package/dist/esm/components/auth/utils/PasswordStrengthIndicator.js +1 -1
- package/dist/esm/components/auth/utils/PasswordStrengthIndicator.js.map +1 -1
- package/dist/esm/components/compliance/GovernedDocumentAcceptanceControl.d.ts.map +1 -1
- package/dist/esm/components/compliance/GovernedDocumentAcceptanceControl.js +2 -1
- package/dist/esm/components/compliance/GovernedDocumentAcceptanceControl.js.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.js +21 -35
- 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 +98 -70
- 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 +48 -8
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts +3 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js +30 -4
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js +2 -2
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +45 -94
- 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 +14 -8
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts +41 -3
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.js +49 -5
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/SummaryContext.d.ts +2 -2
- package/dist/esm/components/data-display/SummaryContext.js.map +1 -1
- package/dist/esm/components/data-display/automatic-displayer.utils.d.ts +22 -1
- package/dist/esm/components/data-display/automatic-displayer.utils.d.ts.map +1 -1
- package/dist/esm/components/data-display/automatic-displayer.utils.js +29 -0
- package/dist/esm/components/data-display/automatic-displayer.utils.js.map +1 -1
- package/dist/esm/components/data-display/badge.d.ts +9 -0
- package/dist/esm/components/data-display/badge.d.ts.map +1 -1
- package/dist/esm/components/data-display/badge.js.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts +14 -2
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js +42 -12
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js.map +1 -1
- package/dist/esm/components/data-display/chromes/display-chrome-mode-resolution.d.ts +10 -0
- package/dist/esm/components/data-display/chromes/display-chrome-mode-resolution.d.ts.map +1 -0
- package/dist/esm/components/data-display/chromes/display-chrome-mode-resolution.js +18 -0
- package/dist/esm/components/data-display/chromes/display-chrome-mode-resolution.js.map +1 -0
- package/dist/esm/components/data-display/chromes/field-tile-boundaries.d.ts +38 -0
- package/dist/esm/components/data-display/chromes/field-tile-boundaries.d.ts.map +1 -0
- package/dist/esm/components/data-display/chromes/field-tile-boundaries.js +30 -0
- package/dist/esm/components/data-display/chromes/field-tile-boundaries.js.map +1 -0
- package/dist/esm/components/data-display/chromes/field-tiles.utils.d.ts +22 -0
- package/dist/esm/components/data-display/chromes/field-tiles.utils.d.ts.map +1 -0
- package/dist/esm/components/data-display/chromes/field-tiles.utils.js +52 -0
- package/dist/esm/components/data-display/chromes/field-tiles.utils.js.map +1 -0
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts +4 -0
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts.map +1 -1
- package/dist/esm/components/data-display/display-field-resolved-props.js.map +1 -1
- package/dist/esm/components/data-display/display-layout-template.utils.d.ts +18 -0
- package/dist/esm/components/data-display/display-layout-template.utils.d.ts.map +1 -0
- package/dist/esm/components/data-display/display-layout-template.utils.js +18 -0
- package/dist/esm/components/data-display/display-layout-template.utils.js.map +1 -0
- package/dist/esm/components/data-display/display-value-emptiness.utils.d.ts +44 -0
- package/dist/esm/components/data-display/display-value-emptiness.utils.d.ts.map +1 -0
- package/dist/esm/components/data-display/display-value-emptiness.utils.js +61 -0
- package/dist/esm/components/data-display/display-value-emptiness.utils.js.map +1 -0
- package/dist/esm/components/data-display/empty-value-mark.d.ts +31 -0
- package/dist/esm/components/data-display/empty-value-mark.d.ts.map +1 -0
- package/dist/esm/components/data-display/empty-value-mark.js +49 -0
- package/dist/esm/components/data-display/empty-value-mark.js.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts +3 -2
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js +4 -4
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts +6 -3
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +22 -12
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js +2 -2
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js.map +1 -1
- package/dist/esm/components/data-display/reference-display-target.d.ts +98 -0
- package/dist/esm/components/data-display/reference-display-target.d.ts.map +1 -0
- package/dist/esm/components/data-display/reference-display-target.js +154 -0
- package/dist/esm/components/data-display/reference-display-target.js.map +1 -0
- package/dist/esm/components/data-display/summary-value-naming.context.d.ts +15 -0
- package/dist/esm/components/data-display/summary-value-naming.context.d.ts.map +1 -0
- package/dist/esm/components/data-display/summary-value-naming.context.js +18 -0
- package/dist/esm/components/data-display/summary-value-naming.context.js.map +1 -0
- package/dist/esm/components/data-display/tone-marker.d.ts +38 -0
- package/dist/esm/components/data-display/tone-marker.d.ts.map +1 -0
- package/dist/esm/components/data-display/tone-marker.js +56 -0
- package/dist/esm/components/data-display/tone-marker.js.map +1 -0
- package/dist/esm/components/data-display/useFileActivation.d.ts.map +1 -1
- package/dist/esm/components/data-display/useFileActivation.js +2 -9
- package/dist/esm/components/data-display/useFileActivation.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-limit-indicator.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-limit-indicator.js +12 -4
- package/dist/esm/components/feedback/features/feature-limit-indicator.js.map +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.d.ts +8 -0
- package/dist/esm/components/feedback/operations-confirm-critical.d.ts.map +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.js.map +1 -1
- package/dist/esm/components/files/Files_UploadGrantDrop.d.ts +0 -5
- package/dist/esm/components/files/Files_UploadGrantDrop.d.ts.map +1 -1
- package/dist/esm/components/files/Files_UploadGrantDrop.js +5 -17
- package/dist/esm/components/files/Files_UploadGrantDrop.js.map +1 -1
- package/dist/esm/components/flows-actors/actor.d.ts +21 -4
- package/dist/esm/components/flows-actors/actor.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/actor.js +114 -192
- package/dist/esm/components/flows-actors/actor.js.map +1 -1
- package/dist/esm/components/flows-actors/actor.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/actor.labels.js +5 -10
- package/dist/esm/components/flows-actors/actor.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.js +1 -1
- package/dist/esm/components/flows-actors/agent-config.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/approval-modification-refusal.utils.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval-modification-refusal.utils.js +1 -0
- package/dist/esm/components/flows-actors/approval-modification-refusal.utils.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +26 -16
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +208 -70
- 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 +67 -22
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/artifact-browser.labels.js +1 -1
- package/dist/esm/components/flows-actors/artifact-browser.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/execution-plan.d.ts +19 -7
- package/dist/esm/components/flows-actors/execution-plan.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/execution-plan.js +55 -41
- package/dist/esm/components/flows-actors/execution-plan.js.map +1 -1
- package/dist/esm/components/flows-actors/execution-plan.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/execution-plan.labels.js +25 -8
- package/dist/esm/components/flows-actors/execution-plan.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/execution-usage.d.ts +69 -0
- package/dist/esm/components/flows-actors/execution-usage.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/execution-usage.js +189 -0
- package/dist/esm/components/flows-actors/execution-usage.js.map +1 -0
- package/dist/esm/components/flows-actors/execution-usage.labels.d.ts +3 -0
- package/dist/esm/components/flows-actors/execution-usage.labels.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/execution-usage.labels.js +27 -0
- package/dist/esm/components/flows-actors/execution-usage.labels.js.map +1 -0
- package/dist/esm/components/flows-actors/flow-execution.d.ts +23 -6
- package/dist/esm/components/flows-actors/flow-execution.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-execution.js +56 -208
- package/dist/esm/components/flows-actors/flow-execution.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-execution.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-execution.labels.js +3 -10
- package/dist/esm/components/flows-actors/flow-execution.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-node-badges.d.ts +54 -21
- package/dist/esm/components/flows-actors/flow-node-badges.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-node-badges.js +80 -6
- package/dist/esm/components/flows-actors/flow-node-badges.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 +0 -8
- package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts +31 -0
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/flow-step-visuals.js +98 -0
- package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -0
- package/dist/esm/components/flows-actors/flows-actors-graph-runtime.d.ts +18 -19
- package/dist/esm/components/flows-actors/flows-actors-graph-runtime.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flows-actors-graph-runtime.js +18 -19
- package/dist/esm/components/flows-actors/flows-actors-graph-runtime.js.map +1 -1
- package/dist/esm/components/flows-actors/flows-actors-graph.lazy.d.ts +27 -42
- package/dist/esm/components/flows-actors/flows-actors-graph.lazy.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flows-actors-graph.lazy.js +28 -43
- package/dist/esm/components/flows-actors/flows-actors-graph.lazy.js.map +1 -1
- package/dist/esm/components/flows-actors/flows-actors-ui.utils.d.ts +15 -10
- package/dist/esm/components/flows-actors/flows-actors-ui.utils.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flows-actors-ui.utils.js +16 -42
- package/dist/esm/components/flows-actors/flows-actors-ui.utils.js.map +1 -1
- package/dist/esm/components/flows-actors/graph-viewer.d.ts +112 -0
- package/dist/esm/components/flows-actors/graph-viewer.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/graph-viewer.js +431 -0
- package/dist/esm/components/flows-actors/graph-viewer.js.map +1 -0
- package/dist/esm/components/flows-actors/graph-viewer.labels.d.ts +3 -0
- package/dist/esm/components/flows-actors/graph-viewer.labels.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/graph-viewer.labels.js +67 -0
- package/dist/esm/components/flows-actors/graph-viewer.labels.js.map +1 -0
- package/dist/esm/components/flows-actors/graph-viewer.models.d.ts +16 -0
- package/dist/esm/components/flows-actors/graph-viewer.models.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/graph-viewer.models.js +18 -0
- package/dist/esm/components/flows-actors/graph-viewer.models.js.map +1 -0
- package/dist/esm/components/flows-actors/human-decision-form.d.ts +57 -0
- package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -0
- package/dist/esm/components/flows-actors/human-decision-form.js +128 -0
- package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -0
- package/dist/esm/components/flows-actors/system-catalog.d.ts +6 -1
- package/dist/esm/components/flows-actors/system-catalog.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.js +22 -20
- package/dist/esm/components/flows-actors/system-catalog.js.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.js +3 -2
- package/dist/esm/components/flows-actors/system-catalog.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.d.ts +17 -3
- package/dist/esm/components/flows-actors/task-detail.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/task-detail.js +32 -25
- package/dist/esm/components/flows-actors/task-detail.js.map +1 -1
- package/dist/esm/components/flows-actors/task-memory.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/task-memory.js +3 -2
- package/dist/esm/components/flows-actors/task-memory.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 +4 -0
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts +16 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +101 -21
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedForm.d.ts +19 -2
- package/dist/esm/components/form/automated/AutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedForm.js +40 -6
- package/dist/esm/components/form/automated/AutomatedForm.js.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts +22 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.js +53 -0
- package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +127 -53
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/FormFieldComposite.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormFieldComposite.js +12 -10
- package/dist/esm/components/form/automated/FormFieldComposite.js.map +1 -1
- package/dist/esm/components/form/automated/FormFieldRecord.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormFieldRecord.js +16 -7
- package/dist/esm/components/form/automated/FormFieldRecord.js.map +1 -1
- package/dist/esm/components/form/automated/FormTemplateContext.d.ts +27 -0
- package/dist/esm/components/form/automated/FormTemplateContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormTemplateContext.js +0 -48
- package/dist/esm/components/form/automated/FormTemplateContext.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +4 -3
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +616 -149
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts +105 -5
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts.map +1 -1
- package/dist/esm/components/form/automated/automated-form-submit.utils.js +225 -6
- package/dist/esm/components/form/automated/automated-form-submit.utils.js.map +1 -1
- package/dist/esm/components/form/automated/bulk-field-clear-context.d.ts +59 -0
- package/dist/esm/components/form/automated/bulk-field-clear-context.d.ts.map +1 -0
- package/dist/esm/components/form/automated/bulk-field-clear-context.js +77 -0
- package/dist/esm/components/form/automated/bulk-field-clear-context.js.map +1 -0
- package/dist/esm/components/form/automated/generated-relationship-field.hooks.d.ts +1 -1
- package/dist/esm/components/form/automated/unplaced-request-fields.context.d.ts +19 -0
- package/dist/esm/components/form/automated/unplaced-request-fields.context.d.ts.map +1 -0
- package/dist/esm/components/form/automated/unplaced-request-fields.context.js +13 -0
- package/dist/esm/components/form/automated/unplaced-request-fields.context.js.map +1 -0
- package/dist/esm/components/form/automated/useArrayItemAutosaveField.d.ts +7 -0
- package/dist/esm/components/form/automated/useArrayItemAutosaveField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/useArrayItemAutosaveField.js +10 -2
- package/dist/esm/components/form/automated/useArrayItemAutosaveField.js.map +1 -1
- package/dist/esm/components/form/automated/useReferenceRecordLabels.d.ts +16 -0
- package/dist/esm/components/form/automated/useReferenceRecordLabels.d.ts.map +1 -0
- package/dist/esm/components/form/automated/useReferenceRecordLabels.js +66 -0
- package/dist/esm/components/form/automated/useReferenceRecordLabels.js.map +1 -0
- package/dist/esm/components/form/automated/useRequestFieldOffer.d.ts +18 -0
- package/dist/esm/components/form/automated/useRequestFieldOffer.d.ts.map +1 -0
- package/dist/esm/components/form/automated/useRequestFieldOffer.js +107 -0
- package/dist/esm/components/form/automated/useRequestFieldOffer.js.map +1 -0
- package/dist/esm/components/form/chromes/FormFieldChrome.d.ts +7 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js +6 -3
- package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/date-range-picker.d.ts +11 -0
- package/dist/esm/components/form/controls/date-time/date-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/date-range-picker.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/datepicker.d.ts +21 -0
- package/dist/esm/components/form/controls/date-time/datepicker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datepicker.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-picker.d.ts +9 -0
- package/dist/esm/components/form/controls/date-time/datetime-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-picker.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.d.ts +9 -0
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-range-picker.d.ts +1 -0
- package/dist/esm/components/form/controls/date-time/time-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-range-picker.js.map +1 -1
- package/dist/esm/components/form/controls/enum/radio.d.ts +10 -0
- package/dist/esm/components/form/controls/enum/radio.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/radio.js.map +1 -1
- package/dist/esm/components/form/controls/enum/toggle-group.d.ts +14 -10
- package/dist/esm/components/form/controls/enum/toggle-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/toggle-group.js +14 -6
- package/dist/esm/components/form/controls/enum/toggle-group.js.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.js +7 -3
- package/dist/esm/components/form/controls/form-field-checkbox-group.js.map +1 -1
- package/dist/esm/components/form/controls/string/chips-input.d.ts +65 -0
- package/dist/esm/components/form/controls/string/chips-input.d.ts.map +1 -0
- package/dist/esm/components/form/controls/string/chips-input.js +9 -0
- package/dist/esm/components/form/controls/string/chips-input.js.map +1 -0
- package/dist/esm/components/form/fields/form-field-address.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.js +7 -5
- package/dist/esm/components/form/fields/form-field-address.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-bigdecimal.js +2 -2
- package/dist/esm/components/form/fields/form-field-bigdecimal.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-boolean.js +2 -2
- package/dist/esm/components/form/fields/form-field-boolean.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-code.labels.js +1 -1
- package/dist/esm/components/form/fields/form-field-code.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-date.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-date.js +16 -11
- package/dist/esm/components/form/fields/form-field-date.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-datetime.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-datetime.js +10 -5
- package/dist/esm/components/form/fields/form-field-datetime.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-duration.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-duration.js +5 -7
- package/dist/esm/components/form/fields/form-field-duration.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-duration.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-duration.labels.js +8 -2
- package/dist/esm/components/form/fields/form-field-duration.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-enum.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-enum.js +31 -31
- package/dist/esm/components/form/fields/form-field-enum.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.js +13 -12
- package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.labels.js +6 -6
- package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-money.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-money.js +5 -4
- package/dist/esm/components/form/fields/form-field-money.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-money.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-money.labels.js +8 -2
- package/dist/esm/components/form/fields/form-field-money.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-number.js +2 -2
- package/dist/esm/components/form/fields/form-field-number.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-bigdecimal.js +2 -2
- package/dist/esm/components/form/fields/form-field-range-bigdecimal.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-date.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-date.js +7 -2
- package/dist/esm/components/form/fields/form-field-range-date.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-datetime.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-datetime.js +5 -2
- package/dist/esm/components/form/fields/form-field-range-datetime.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-money.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-money.js +6 -19
- package/dist/esm/components/form/fields/form-field-range-money.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-money.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-money.labels.js +8 -2
- package/dist/esm/components/form/fields/form-field-range-money.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-number.js +2 -2
- package/dist/esm/components/form/fields/form-field-range-number.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-range-time.js +2 -2
- package/dist/esm/components/form/fields/form-field-range-time.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-resource-reference.d.ts +56 -0
- package/dist/esm/components/form/fields/form-field-resource-reference.d.ts.map +1 -0
- package/dist/esm/components/form/fields/form-field-resource-reference.js +51 -0
- package/dist/esm/components/form/fields/form-field-resource-reference.js.map +1 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts +36 -6
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string-organization-role.js +30 -11
- package/dist/esm/components/form/fields/form-field-string-organization-role.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.d.ts +5 -0
- package/dist/esm/components/form/fields/form-field-string.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.js +9 -7
- package/dist/esm/components/form/fields/form-field-string.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-time.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-time.js +6 -3
- package/dist/esm/components/form/fields/form-field-time.js.map +1 -1
- package/dist/esm/components/form/fields/themed-native-select.d.ts +29 -0
- package/dist/esm/components/form/fields/themed-native-select.d.ts.map +1 -0
- package/dist/esm/components/form/fields/themed-native-select.js +36 -0
- package/dist/esm/components/form/fields/themed-native-select.js.map +1 -0
- package/dist/esm/components/form/form-context.d.ts +11 -0
- package/dist/esm/components/form/form-context.d.ts.map +1 -1
- package/dist/esm/components/form/form-context.js +11 -0
- package/dist/esm/components/form/form-context.js.map +1 -1
- package/dist/esm/components/form/form-context.utils.d.ts +2 -0
- package/dist/esm/components/form/form-context.utils.d.ts.map +1 -1
- package/dist/esm/components/form/form-context.utils.js +6 -2
- package/dist/esm/components/form/form-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js +17 -15
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js.map +1 -1
- package/dist/esm/components/form/validation-errors/field-reveal.d.ts +41 -0
- package/dist/esm/components/form/validation-errors/field-reveal.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/field-reveal.js +108 -0
- package/dist/esm/components/form/validation-errors/field-reveal.js.map +1 -0
- package/dist/esm/components/form/validation-errors/form-level-error-recheck.d.ts +3 -0
- package/dist/esm/components/form/validation-errors/form-level-error-recheck.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/form-level-error-recheck.js +37 -0
- package/dist/esm/components/form/validation-errors/form-level-error-recheck.js.map +1 -0
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts +6 -0
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.js +9 -2
- package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
- package/dist/esm/components/form/validation-errors/scroll-to-first-error.utils.d.ts +8 -1
- package/dist/esm/components/form/validation-errors/scroll-to-first-error.utils.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/scroll-to-first-error.utils.js +46 -3
- package/dist/esm/components/form/validation-errors/scroll-to-first-error.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/useServerErrorInjection.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/useServerErrorInjection.js +8 -3
- package/dist/esm/components/form/validation-errors/useServerErrorInjection.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +32 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +60 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -0
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts +10 -0
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js +12 -3
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_QuickActionButton.d.ts +7 -0
- package/dist/esm/components/navigation/app-level/ApplicationLevel_QuickActionButton.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_QuickActionButton.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_UtilityPanel.d.ts +6 -0
- package/dist/esm/components/navigation/app-level/ApplicationLevel_UtilityPanel.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_UtilityPanel.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +11 -28
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/engine-launcher-entries.d.ts +46 -0
- package/dist/esm/components/navigation/app-level/engine-launcher-entries.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/engine-launcher-entries.js +165 -0
- package/dist/esm/components/navigation/app-level/engine-launcher-entries.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +8 -3
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +41 -20
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBehaviors.d.ts +1 -2
- package/dist/esm/components/navigation/app-level/useNavigationBehaviors.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBehaviors.js +1 -15
- package/dist/esm/components/navigation/app-level/useNavigationBehaviors.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useOwnOrganizationSearch.d.ts +32 -0
- package/dist/esm/components/navigation/app-level/useOwnOrganizationSearch.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useOwnOrganizationSearch.js +91 -0
- package/dist/esm/components/navigation/app-level/useOwnOrganizationSearch.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useQuickSwitcherBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useQuickSwitcherBehavior.js +3 -1
- package/dist/esm/components/navigation/app-level/useQuickSwitcherBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.d.ts +18 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js +66 -9
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useUtilityPanelBehavior.d.ts +15 -10
- package/dist/esm/components/navigation/app-level/useUtilityPanelBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useUtilityPanelBehavior.js +89 -12
- package/dist/esm/components/navigation/app-level/useUtilityPanelBehavior.js.map +1 -1
- package/dist/esm/components/progression/ProgressionMilestoneTracker.labels.js +2 -2
- package/dist/esm/components/progression/ProgressionMilestoneTracker.labels.js.map +1 -1
- package/dist/esm/components/resources/CollectionSelectAllCheckbox.d.ts +39 -0
- package/dist/esm/components/resources/CollectionSelectAllCheckbox.d.ts.map +1 -0
- package/dist/esm/components/resources/CollectionSelectAllCheckbox.js +21 -0
- package/dist/esm/components/resources/CollectionSelectAllCheckbox.js.map +1 -0
- package/dist/esm/components/resources/CollectionSelectionControls.d.ts +4 -3
- package/dist/esm/components/resources/CollectionSelectionControls.d.ts.map +1 -1
- package/dist/esm/components/resources/CollectionSelectionControls.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts +7 -2
- package/dist/esm/components/resources/ResourceCollectionBody_Table.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js +38 -14
- package/dist/esm/components/resources/ResourceCollectionBody_Table.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionFilterPresets.d.ts +4 -4
- package/dist/esm/components/resources/ResourceCollectionFilterPresets.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionFilterPresets.js +20 -13
- package/dist/esm/components/resources/ResourceCollectionFilterPresets.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.d.ts +4 -3
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js +40 -6
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts +65 -23
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.js +73 -10
- package/dist/esm/components/resources/ResourceCollectionToolbar.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Action.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Action.labels.js +5 -0
- package/dist/esm/components/resources/ResourceLayout_Action.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.d.ts +18 -0
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js +57 -48
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_CollectionActions.d.ts +1 -1
- package/dist/esm/components/resources/ResourceLayout_CollectionActions.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_CollectionActions.js +1 -1
- package/dist/esm/components/resources/ResourceLayout_CollectionActions.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js +7 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Create.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Create.js +3 -4
- package/dist/esm/components/resources/ResourceLayout_Create.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Create.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Create.labels.js +10 -0
- package/dist/esm/components/resources/ResourceLayout_Create.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +5 -3
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +4 -3
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_FilterChips.d.ts +8 -1
- package/dist/esm/components/resources/ResourceLayout_FilterChips.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_FilterChips.js +83 -11
- package/dist/esm/components/resources/ResourceLayout_FilterChips.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Filters.labels.js +1 -1
- package/dist/esm/components/resources/ResourceLayout_Filters.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_FiltersControl.d.ts +5 -8
- package/dist/esm/components/resources/ResourceLayout_FiltersControl.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_FiltersControl.js +68 -19
- package/dist/esm/components/resources/ResourceLayout_FiltersControl.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.js +150 -44
- package/dist/esm/components/resources/ResourceLayout_Header.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +62 -40
- 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 +68 -70
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.js +4 -10
- package/dist/esm/components/resources/ResourceLayout_List.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.d.ts +8 -9
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.js +67 -25
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.labels.js +8 -8
- package/dist/esm/components/resources/ResourceLayout_OperationBulk.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.d.ts +8 -2
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.js +12 -7
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.labels.js +11 -6
- package/dist/esm/components/resources/ResourceLayout_OperationsItems.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts +2 -0
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.js +23 -5
- package/dist/esm/components/resources/ResourceLayout_Read.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js +5 -3
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js +18 -7
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +56 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +184 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.labels.d.ts +3 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.labels.d.ts.map +1 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.labels.js +106 -0
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.labels.js.map +1 -0
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +55 -42
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.labels.js +0 -6
- package/dist/esm/components/resources/ResourceLayout_Search.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.d.ts +8 -0
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js +2 -3
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SortControl.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SortControl.js +3 -2
- package/dist/esm/components/resources/ResourceLayout_SortControl.js.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts +29 -5
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js +123 -41
- package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
- package/dist/esm/components/resources/ResourceViewModeToggle.d.ts +6 -1
- package/dist/esm/components/resources/ResourceViewModeToggle.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceViewModeToggle.js +9 -7
- package/dist/esm/components/resources/ResourceViewModeToggle.js.map +1 -1
- package/dist/esm/components/resources/collection-card-layout.utils.d.ts +37 -15
- package/dist/esm/components/resources/collection-card-layout.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/collection-card-layout.utils.js +37 -15
- package/dist/esm/components/resources/collection-card-layout.utils.js.map +1 -1
- package/dist/esm/components/resources/collection-selection-bar-density.d.ts +113 -0
- package/dist/esm/components/resources/collection-selection-bar-density.d.ts.map +1 -0
- package/dist/esm/components/resources/collection-selection-bar-density.js +175 -0
- package/dist/esm/components/resources/collection-selection-bar-density.js.map +1 -0
- package/dist/esm/components/resources/embeds/EmbeddedResourceDescent.d.ts +2 -1
- package/dist/esm/components/resources/embeds/EmbeddedResourceDescent.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/EmbeddedResourceDescent.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js +14 -2
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +61 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +151 -15
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/embeds/child-operation-addressability.utils.d.ts +11 -0
- package/dist/esm/components/resources/embeds/child-operation-addressability.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/child-operation-addressability.utils.js +13 -0
- package/dist/esm/components/resources/embeds/child-operation-addressability.utils.js.map +1 -1
- package/dist/esm/components/resources/embeds/useEmbeddedResourceContext.d.ts +24 -1
- package/dist/esm/components/resources/embeds/useEmbeddedResourceContext.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/useEmbeddedResourceContext.js +47 -3
- package/dist/esm/components/resources/embeds/useEmbeddedResourceContext.js.map +1 -1
- package/dist/esm/components/resources/resource-filter-field-type.frontend.schemas.d.ts +35 -0
- package/dist/esm/components/resources/resource-filter-field-type.frontend.schemas.d.ts.map +1 -0
- package/dist/esm/components/resources/resource-filter-field-type.frontend.schemas.js +36 -0
- package/dist/esm/components/resources/resource-filter-field-type.frontend.schemas.js.map +1 -0
- package/dist/esm/components/resources/resource-header-geometry.d.ts +19 -0
- package/dist/esm/components/resources/resource-header-geometry.d.ts.map +1 -0
- package/dist/esm/components/resources/resource-header-geometry.js +19 -0
- package/dist/esm/components/resources/resource-header-geometry.js.map +1 -0
- package/dist/esm/components/resources/resourceLayout.utils.d.ts +28 -2
- package/dist/esm/components/resources/resourceLayout.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/resourceLayout.utils.js +45 -12
- package/dist/esm/components/resources/resourceLayout.utils.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.js +10 -0
- package/dist/esm/components/resources/skeleton/ArrayField.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts +20 -4
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +19 -2
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FieldTiles.d.ts +48 -0
- package/dist/esm/components/resources/skeleton/FieldTiles.d.ts.map +1 -0
- package/dist/esm/components/resources/skeleton/FieldTiles.js +51 -0
- package/dist/esm/components/resources/skeleton/FieldTiles.js.map +1 -0
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +2 -1
- 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 +5 -2
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +77 -14
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +98 -25
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.d.ts +7 -0
- package/dist/esm/components/resources/skeleton/Section.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.js +9 -3
- package/dist/esm/components/resources/skeleton/Section.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SummaryLayout.d.ts +3 -3
- package/dist/esm/components/resources/skeleton/SummaryLayout.js +3 -3
- package/dist/esm/components/resources/skeleton/SummaryLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts +7 -5
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.js +176 -65
- package/dist/esm/components/resources/skeleton/WizardLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayoutContext.d.ts +9 -1
- package/dist/esm/components/resources/skeleton/WizardLayoutContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayoutContext.js +7 -0
- package/dist/esm/components/resources/skeleton/WizardLayoutContext.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.d.ts +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.js +9 -5
- package/dist/esm/components/resources/skeleton/WizardStep.js.map +1 -1
- package/dist/esm/components/resources/skeleton/section-consolidation.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/section-consolidation.utils.js +31 -2
- package/dist/esm/components/resources/skeleton/section-consolidation.utils.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +176 -61
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.js +14 -7
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.labels.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.labels.js +18 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldEditPreset_ResourceReference_Default.labels.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts +8 -0
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js +3 -0
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js +48 -17
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +226 -74
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.labels.js +2 -3
- package/dist/esm/components/sections/ContentSectionContainer.labels.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +2 -2
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/sections/section-grouping.shared.d.ts +19 -0
- package/dist/esm/components/sections/section-grouping.shared.d.ts.map +1 -1
- package/dist/esm/components/sections/section-grouping.shared.js +24 -0
- package/dist/esm/components/sections/section-grouping.shared.js.map +1 -1
- package/dist/esm/components/sections/section-legend-voice.context.d.ts +19 -0
- package/dist/esm/components/sections/section-legend-voice.context.d.ts.map +1 -0
- package/dist/esm/components/sections/section-legend-voice.context.js +21 -0
- package/dist/esm/components/sections/section-legend-voice.context.js.map +1 -0
- package/dist/esm/components/sections/section-legend-voice.d.ts +41 -0
- package/dist/esm/components/sections/section-legend-voice.d.ts.map +1 -0
- package/dist/esm/components/sections/section-legend-voice.js +67 -0
- package/dist/esm/components/sections/section-legend-voice.js.map +1 -0
- package/dist/esm/components/sections/stepper.d.ts +14 -0
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/components/sections/surface.d.ts.map +1 -1
- package/dist/esm/components/sections/surface.js +10 -2
- package/dist/esm/components/sections/surface.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.d.ts +39 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.js +187 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.labels.js +34 -0
- package/dist/esm/components/settings/AppPage_AgentWorkEvaluationExportSettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js +8 -8
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.d.ts +43 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.js +142 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.labels.js +62 -0
- package/dist/esm/components/settings/AppPage_AutonomousAgentsSettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +25 -8
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +275 -71
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +91 -14
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.d.ts +13 -8
- package/dist/esm/components/settings/AppPage_InvitationsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js +95 -23
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js +25 -2
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.d.ts +67 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.js +177 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.labels.js +45 -0
- package/dist/esm/components/settings/AppPage_ModelCostBreakdownSettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.d.ts +35 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.js +137 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.labels.js +38 -0
- package/dist/esm/components/settings/AppPage_RepresentativeActivitySettings.labels.js.map +1 -0
- package/dist/esm/components/settings/SettingsHub.d.ts +3 -3
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +98 -48
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.labels.js +2 -0
- package/dist/esm/components/settings/SettingsHub.labels.js.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js +21 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js.map +1 -1
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts +24 -5
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts.map +1 -1
- package/dist/esm/components/settings/useOwnerProviderConnections.js +67 -9
- package/dist/esm/components/settings/useOwnerProviderConnections.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +3 -3
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- 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 +2 -9
- package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/enum-color-bridge.d.ts +1 -0
- package/dist/esm/components/views/chart-view/enum-color-bridge.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/enum-color-bridge.js +10 -1
- package/dist/esm/components/views/chart-view/enum-color-bridge.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +8 -6
- 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 +10 -8
- 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.js +2 -2
- 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/line-family.builder.js +1 -1
- 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/scatter-family.builder.js +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/scatter-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/chart-type-builder.interface.d.ts +6 -0
- package/dist/esm/components/views/chart-view/option-builder/chart-type-builder.interface.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/chart-type-builder.interface.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts +3 -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 +4 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.d.ts +0 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.js.map +1 -1
- package/dist/esm/components/views/composite-view/useCompositeResourceOperationContextBuilder.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/useCompositeResourceOperationContextBuilder.js +24 -1
- package/dist/esm/components/views/composite-view/useCompositeResourceOperationContextBuilder.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/AgentReplyReportAction.d.ts +29 -0
- package/dist/esm/components/views/flows-actors-view/AgentReplyReportAction.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/AgentReplyReportAction.js +104 -0
- package/dist/esm/components/views/flows-actors-view/AgentReplyReportAction.js.map +1 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +16 -5
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +219 -230
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.d.ts +5 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js +15 -13
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.labels.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts +13 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.d.ts.map +1 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js +44 -0
- package/dist/esm/components/views/flows-actors-view/held-conversation-selection.js.map +1 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +6 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +64 -9
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/hosted-components.utils.d.ts +11 -1
- package/dist/esm/core/app-shell/hosted-components.utils.d.ts.map +1 -1
- package/dist/esm/core/app-shell/hosted-components.utils.js +25 -0
- package/dist/esm/core/app-shell/hosted-components.utils.js.map +1 -1
- package/dist/esm/core/app-shell/shell-layout.d.ts +138 -0
- package/dist/esm/core/app-shell/shell-layout.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-layout.js +143 -0
- package/dist/esm/core/app-shell/shell-layout.js.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-layout-stylesheet.d.ts +13 -0
- package/dist/esm/core/app-shell/shell-motion/shell-layout-stylesheet.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-layout-stylesheet.js +49 -0
- package/dist/esm/core/app-shell/shell-motion/shell-layout-stylesheet.js.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts +95 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js +316 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-origins.js.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +217 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +197 -0
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-view-transition.d.ts +46 -0
- package/dist/esm/core/app-shell/shell-motion/shell-view-transition.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/shell-view-transition.js +139 -0
- package/dist/esm/core/app-shell/shell-motion/shell-view-transition.js.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts +108 -0
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.d.ts.map +1 -0
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js +423 -0
- package/dist/esm/core/app-shell/shell-motion/use-shell-motion.js.map +1 -0
- package/dist/esm/core/app-shell/useAppShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/useAppShellLayout.js +6 -1
- package/dist/esm/core/app-shell/useAppShellLayout.js.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.js +11 -4
- package/dist/esm/core/app-shell/usePublicShellLayout.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +18 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +26 -4
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/automated-layout/composite-value-defaults.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/composite-value-defaults.frontend.utils.js +3 -22
- package/dist/esm/core/automated-layout/composite-value-defaults.frontend.utils.js.map +1 -1
- package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.d.ts +19 -3
- package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js +100 -13
- package/dist/esm/core/automated-layout/default-layout-generator.frontend.utils.js.map +1 -1
- package/dist/esm/core/automated-layout/summary-value-naming.utils.d.ts +67 -0
- package/dist/esm/core/automated-layout/summary-value-naming.utils.d.ts.map +1 -0
- package/dist/esm/core/automated-layout/summary-value-naming.utils.js +100 -0
- package/dist/esm/core/automated-layout/summary-value-naming.utils.js.map +1 -0
- package/dist/esm/core/billing/BillingContext.d.ts +0 -17
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +6 -1
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/branding/OrganizationBrandingPublisher.d.ts +2 -0
- package/dist/esm/core/branding/OrganizationBrandingPublisher.d.ts.map +1 -0
- package/dist/esm/core/branding/OrganizationBrandingPublisher.js +78 -0
- package/dist/esm/core/branding/OrganizationBrandingPublisher.js.map +1 -0
- package/dist/esm/core/branding/useBrandIdentity.d.ts +21 -0
- package/dist/esm/core/branding/useBrandIdentity.d.ts.map +1 -1
- package/dist/esm/core/branding/useBrandIdentity.js +31 -5
- package/dist/esm/core/branding/useBrandIdentity.js.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.d.ts +5 -0
- package/dist/esm/core/branding/useBrandPresentation.d.ts.map +1 -1
- package/dist/esm/core/branding/useBrandPresentation.js +1 -0
- package/dist/esm/core/branding/useBrandPresentation.js.map +1 -1
- package/dist/esm/core/branding/useDisplayableImageUrl.d.ts +4 -0
- package/dist/esm/core/branding/useDisplayableImageUrl.d.ts.map +1 -0
- package/dist/esm/core/branding/useDisplayableImageUrl.js +66 -0
- package/dist/esm/core/branding/useDisplayableImageUrl.js.map +1 -0
- package/dist/esm/core/branding/useOrganizationDocumentTitle.d.ts +2 -0
- package/dist/esm/core/branding/useOrganizationDocumentTitle.d.ts.map +1 -0
- package/dist/esm/core/branding/useOrganizationDocumentTitle.js +23 -0
- package/dist/esm/core/branding/useOrganizationDocumentTitle.js.map +1 -0
- package/dist/esm/core/commons/save-blob-as-file.frontend.utils.d.ts +16 -0
- package/dist/esm/core/commons/save-blob-as-file.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/commons/save-blob-as-file.frontend.utils.js +35 -0
- package/dist/esm/core/commons/save-blob-as-file.frontend.utils.js.map +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +8 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
- package/dist/esm/core/components-registry/component-resolver.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/component-resolver.frontend.helper.js +34 -5
- package/dist/esm/core/components-registry/component-resolver.frontend.helper.js.map +1 -1
- 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 +36 -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 +29 -2
- 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 +10 -16
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +10 -16
- 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 +12 -8
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.js +10 -0
- package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +2 -2
- package/dist/esm/core/config/config-merge-utilities.d.ts +31 -3
- package/dist/esm/core/config/config-merge-utilities.d.ts.map +1 -1
- package/dist/esm/core/config/config-merge-utilities.js +61 -7
- package/dist/esm/core/config/config-merge-utilities.js.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +83 -0
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +100 -0
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -0
- package/dist/esm/core/config/directory-provisioning-capabilities.frontend.utils.d.ts +69 -0
- package/dist/esm/core/config/directory-provisioning-capabilities.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/config/directory-provisioning-capabilities.frontend.utils.js +65 -0
- package/dist/esm/core/config/directory-provisioning-capabilities.frontend.utils.js.map +1 -0
- package/dist/esm/core/config/engine-settings-destinations.d.ts +13 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +588 -155
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.d.ts +17 -3
- package/dist/esm/core/config/execution-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.js +1 -1
- package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
- package/dist/esm/core/config/flows-actors-view.schemas.d.ts +12 -2
- package/dist/esm/core/config/flows-actors-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/flows-actors-view.schemas.js +13 -1
- package/dist/esm/core/config/flows-actors-view.schemas.js.map +1 -1
- package/dist/esm/core/config/inserted-view-launcher.schemas.d.ts +12 -11
- package/dist/esm/core/config/inserted-view-launcher.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/inserted-view-launcher.schemas.js +14 -13
- package/dist/esm/core/config/inserted-view-launcher.schemas.js.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +77 -27
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js +18 -13
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/relationship-side-capabilities.frontend.utils.d.ts +79 -0
- package/dist/esm/core/config/relationship-side-capabilities.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/config/relationship-side-capabilities.frontend.utils.js +95 -0
- package/dist/esm/core/config/relationship-side-capabilities.frontend.utils.js.map +1 -0
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +19 -7
- 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 +45 -10
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.d.ts +2 -2
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js +38 -5
- package/dist/esm/core/config/settings-hub-presentation.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +94 -10
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js +40 -3
- 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 +4 -1
- package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +2 -2
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js +7 -8
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts +16 -2
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +64 -4
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/config/verify-settings-hub-content.d.ts +4 -0
- package/dist/esm/core/config/verify-settings-hub-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-settings-hub-content.js +34 -0
- package/dist/esm/core/config/verify-settings-hub-content.js.map +1 -1
- package/dist/esm/core/enums/common-enum-registry.d.ts +16 -23
- package/dist/esm/core/enums/common-enum-registry.d.ts.map +1 -1
- package/dist/esm/core/enums/common-enum-registry.js +26 -29
- package/dist/esm/core/enums/common-enum-registry.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +71 -9
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/error-management.frontend.service.d.ts +0 -4
- package/dist/esm/core/errors/error-management.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/errors/error-management.frontend.service.js +5 -8
- package/dist/esm/core/errors/error-management.frontend.service.js.map +1 -1
- package/dist/esm/core/errors/errors.frontend.schemas.d.ts +21 -10
- package/dist/esm/core/errors/errors.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/errors/errors.frontend.schemas.js.map +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.d.ts +35 -0
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js +44 -5
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js.map +1 -1
- package/dist/esm/core/events/EventBusContext.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts +13 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +89 -22
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +68 -4
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.js +67 -3
- package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
- package/dist/esm/core/events/useNotificationPreferenceKinds.d.ts +9 -0
- package/dist/esm/core/events/useNotificationPreferenceKinds.d.ts.map +1 -0
- package/dist/esm/core/events/useNotificationPreferenceKinds.js +50 -0
- package/dist/esm/core/events/useNotificationPreferenceKinds.js.map +1 -0
- package/dist/esm/core/execution/useExecution.js +1 -1
- package/dist/esm/core/execution/useExecution.js.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.js +4 -0
- package/dist/esm/core/execution/useExecutionParticipationRMM.js.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js +3 -3
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/external-providers/chat-sign-in-completion.frontend.d.ts +52 -0
- package/dist/esm/core/external-providers/chat-sign-in-completion.frontend.d.ts.map +1 -0
- package/dist/esm/core/external-providers/chat-sign-in-completion.frontend.js +88 -0
- package/dist/esm/core/external-providers/chat-sign-in-completion.frontend.js.map +1 -0
- package/dist/esm/core/external-providers/frontend-provider-registry.frontend.service.d.ts +20 -2
- package/dist/esm/core/external-providers/frontend-provider-registry.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/external-providers/frontend-provider-registry.frontend.service.js +18 -1
- package/dist/esm/core/external-providers/frontend-provider-registry.frontend.service.js.map +1 -1
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts +7 -5
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts.map +1 -1
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js +9 -6
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js.map +1 -1
- package/dist/esm/core/features/FeaturesContext.d.ts +9 -1
- package/dist/esm/core/features/FeaturesContext.d.ts.map +1 -1
- package/dist/esm/core/features/FeaturesContext.js +38 -12
- package/dist/esm/core/features/FeaturesContext.js.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js +4 -0
- package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +90 -33
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +153 -100
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts +41 -0
- package/dist/esm/core/flows-actors/conversation-history.model.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/conversation-history.model.js +65 -0
- package/dist/esm/core/flows-actors/conversation-history.model.js.map +1 -0
- package/dist/esm/core/flows-actors/conversation-thread.model.d.ts +144 -0
- package/dist/esm/core/flows-actors/conversation-thread.model.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/conversation-thread.model.js +315 -0
- package/dist/esm/core/flows-actors/conversation-thread.model.js.map +1 -0
- package/dist/esm/core/flows-actors/execution-usages-batch.frontend.utils.d.ts +29 -0
- package/dist/esm/core/flows-actors/execution-usages-batch.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/execution-usages-batch.frontend.utils.js +67 -0
- package/dist/esm/core/flows-actors/execution-usages-batch.frontend.utils.js.map +1 -0
- package/dist/esm/core/flows-actors/graph-view.layout.d.ts +77 -0
- package/dist/esm/core/flows-actors/graph-view.layout.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/graph-view.layout.js +169 -0
- package/dist/esm/core/flows-actors/graph-view.layout.js.map +1 -0
- package/dist/esm/core/flows-actors/graph-view.model.d.ts +245 -0
- package/dist/esm/core/flows-actors/graph-view.model.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/graph-view.model.js +414 -0
- package/dist/esm/core/flows-actors/graph-view.model.js.map +1 -0
- package/dist/esm/core/flows-actors/model-cost-money.frontend.utils.d.ts +12 -0
- package/dist/esm/core/flows-actors/model-cost-money.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/model-cost-money.frontend.utils.js +20 -0
- package/dist/esm/core/flows-actors/model-cost-money.frontend.utils.js.map +1 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts +36 -11
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/usePendingDecisions.js +114 -29
- package/dist/esm/core/flows-actors/usePendingDecisions.js.map +1 -1
- package/dist/esm/core/guidance/GuidanceContext.d.ts.map +1 -1
- package/dist/esm/core/guidance/GuidanceContext.js +1 -2
- package/dist/esm/core/guidance/GuidanceContext.js.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceChecklist.labels.js +2 -2
- package/dist/esm/core/guidance/renderers/GuidanceChecklist.labels.js.map +1 -1
- package/dist/esm/core/hotkey/DefaultHotkeyHandler.d.ts +3 -9
- package/dist/esm/core/hotkey/DefaultHotkeyHandler.d.ts.map +1 -1
- package/dist/esm/core/hotkey/DefaultHotkeyHandler.js +3 -15
- package/dist/esm/core/hotkey/DefaultHotkeyHandler.js.map +1 -1
- package/dist/esm/core/hotkey/merge-hotkey-emit-shortcuts.d.ts +2 -2
- package/dist/esm/core/hotkey/merge-hotkey-emit-shortcuts.js +2 -2
- package/dist/esm/core/hotkey/merge-hotkey-emit-shortcuts.js.map +1 -1
- package/dist/esm/core/i18n/I18nContext.d.ts +52 -3
- package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
- package/dist/esm/core/i18n/I18nContext.js +80 -7
- package/dist/esm/core/i18n/I18nContext.js.map +1 -1
- package/dist/esm/core/i18n/regional-preference-resolution.frontend.utils.d.ts +82 -1
- package/dist/esm/core/i18n/regional-preference-resolution.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/i18n/regional-preference-resolution.frontend.utils.js +121 -6
- package/dist/esm/core/i18n/regional-preference-resolution.frontend.utils.js.map +1 -1
- package/dist/esm/core/i18n/useI18n.d.ts +3 -1
- package/dist/esm/core/i18n/useI18n.d.ts.map +1 -1
- package/dist/esm/core/i18n/useI18n.js +3 -1
- package/dist/esm/core/i18n/useI18n.js.map +1 -1
- package/dist/esm/core/icons/IconRegistryBridge.d.ts +38 -4
- package/dist/esm/core/icons/IconRegistryBridge.d.ts.map +1 -1
- package/dist/esm/core/icons/IconRegistryBridge.js +103 -63
- package/dist/esm/core/icons/IconRegistryBridge.js.map +1 -1
- package/dist/esm/core/icons/IconRegistryContext.d.ts.map +1 -1
- package/dist/esm/core/icons/IconRegistryContext.js +41 -0
- package/dist/esm/core/icons/IconRegistryContext.js.map +1 -1
- package/dist/esm/core/icons/icon-registry.frontend.schemas.d.ts +44 -0
- package/dist/esm/core/icons/icon-registry.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/icons/icon-registry.frontend.schemas.js +46 -0
- package/dist/esm/core/icons/icon-registry.frontend.schemas.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js +2 -2
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts +64 -20
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +82 -51
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.js +130 -23
- package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
- package/dist/esm/core/navigation/NavigationRequestBridge.d.ts +4 -0
- package/dist/esm/core/navigation/NavigationRequestBridge.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationRequestBridge.js +17 -1
- package/dist/esm/core/navigation/NavigationRequestBridge.js.map +1 -1
- package/dist/esm/core/navigation/ZoneChromeContext.d.ts +80 -0
- package/dist/esm/core/navigation/ZoneChromeContext.d.ts.map +1 -0
- package/dist/esm/core/navigation/ZoneChromeContext.js +130 -0
- package/dist/esm/core/navigation/ZoneChromeContext.js.map +1 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts +102 -2
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +194 -9
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +35 -5
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.js +147 -18
- package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
- package/dist/esm/core/navigation/navigation-cascade.d.ts +44 -14
- package/dist/esm/core/navigation/navigation-cascade.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-cascade.js +87 -19
- package/dist/esm/core/navigation/navigation-cascade.js.map +1 -1
- package/dist/esm/core/navigation/navigation-commit.d.ts +45 -0
- package/dist/esm/core/navigation/navigation-commit.d.ts.map +1 -0
- package/dist/esm/core/navigation/navigation-commit.js +68 -0
- package/dist/esm/core/navigation/navigation-commit.js.map +1 -0
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts +54 -3
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.js +91 -3
- package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -1
- package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts +3 -3
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js +3 -3
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.d.ts +95 -22
- package/dist/esm/core/navigation/navigation.utils.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.js +190 -63
- package/dist/esm/core/navigation/navigation.utils.js.map +1 -1
- package/dist/esm/core/navigation/sidebar-resource-browser-operation.d.ts +8 -0
- package/dist/esm/core/navigation/sidebar-resource-browser-operation.d.ts.map +1 -0
- package/dist/esm/core/navigation/sidebar-resource-browser-operation.js +27 -0
- package/dist/esm/core/navigation/sidebar-resource-browser-operation.js.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +64 -0
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js +212 -0
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -0
- package/dist/esm/core/navigation/useLauncherResolutionContext.d.ts +1 -1
- package/dist/esm/core/navigation/useLauncherResolutionContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/useLauncherResolutionContext.js +17 -2
- package/dist/esm/core/navigation/useLauncherResolutionContext.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationController.d.ts +1 -0
- package/dist/esm/core/navigation/useNavigationController.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationController.js +51 -67
- package/dist/esm/core/navigation/useNavigationController.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js +17 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -1
- package/dist/esm/core/navigation/useZoneEntryOrganizationHold.d.ts +17 -0
- package/dist/esm/core/navigation/useZoneEntryOrganizationHold.d.ts.map +1 -0
- package/dist/esm/core/navigation/useZoneEntryOrganizationHold.js +32 -0
- package/dist/esm/core/navigation/useZoneEntryOrganizationHold.js.map +1 -0
- package/dist/esm/core/navigation/zone-collapse.d.ts +2 -1
- package/dist/esm/core/navigation/zone-collapse.d.ts.map +1 -1
- package/dist/esm/core/navigation/zone-collapse.js +2 -1
- package/dist/esm/core/navigation/zone-collapse.js.map +1 -1
- package/dist/esm/core/navigation/zone-entry-organization.d.ts +34 -0
- package/dist/esm/core/navigation/zone-entry-organization.d.ts.map +1 -0
- package/dist/esm/core/navigation/zone-entry-organization.js +77 -0
- package/dist/esm/core/navigation/zone-entry-organization.js.map +1 -0
- package/dist/esm/core/requests/auth-refresh-resilience.frontend.d.ts +15 -0
- package/dist/esm/core/requests/auth-refresh-resilience.frontend.d.ts.map +1 -1
- package/dist/esm/core/requests/auth-refresh-resilience.frontend.js +24 -0
- package/dist/esm/core/requests/auth-refresh-resilience.frontend.js.map +1 -1
- package/dist/esm/core/requests/automatic-resend-safety.frontend.d.ts +74 -0
- package/dist/esm/core/requests/automatic-resend-safety.frontend.d.ts.map +1 -0
- package/dist/esm/core/requests/automatic-resend-safety.frontend.js +52 -0
- package/dist/esm/core/requests/automatic-resend-safety.frontend.js.map +1 -0
- package/dist/esm/core/requests/websockets/WebSocketContext.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketContext.js +31 -0
- package/dist/esm/core/requests/websockets/WebSocketContext.js.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +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 +162 -98
- 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 +283 -157
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts +9 -13
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +45 -97
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts +25 -5
- 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 +56 -11
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/ScopedResourceRegistryProvider.d.ts.map +1 -1
- package/dist/esm/core/resources/ScopedResourceRegistryProvider.js +1 -2
- package/dist/esm/core/resources/ScopedResourceRegistryProvider.js.map +1 -1
- package/dist/esm/core/resources/calendar-date-fields.frontend.utils.d.ts +14 -0
- package/dist/esm/core/resources/calendar-date-fields.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/calendar-date-fields.frontend.utils.js +29 -0
- package/dist/esm/core/resources/calendar-date-fields.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/caller-identity-record.frontend.utils.d.ts +23 -0
- package/dist/esm/core/resources/caller-identity-record.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/caller-identity-record.frontend.utils.js +26 -0
- package/dist/esm/core/resources/caller-identity-record.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/collection-export-url.frontend.utils.d.ts +1 -1
- package/dist/esm/core/resources/collection-export-url.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/collection-export-url.frontend.utils.js +34 -16
- package/dist/esm/core/resources/collection-export-url.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/collection-filter-presets.frontend.utils.d.ts +54 -11
- package/dist/esm/core/resources/collection-filter-presets.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/collection-filter-presets.frontend.utils.js +131 -63
- package/dist/esm/core/resources/collection-filter-presets.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/date-filter-window.frontend.utils.d.ts +58 -0
- package/dist/esm/core/resources/date-filter-window.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/date-filter-window.frontend.utils.js +70 -0
- package/dist/esm/core/resources/date-filter-window.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/frontend-resource.utils.d.ts +146 -7
- package/dist/esm/core/resources/frontend-resource.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/frontend-resource.utils.js +194 -22
- package/dist/esm/core/resources/frontend-resource.utils.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts +18 -4
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +26 -6
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts +95 -2
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js +126 -13
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/read-through-organization-unit.frontend.utils.d.ts +45 -0
- package/dist/esm/core/resources/read-through-organization-unit.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/read-through-organization-unit.frontend.utils.js +46 -0
- package/dist/esm/core/resources/read-through-organization-unit.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/referenced-record-scope.frontend.utils.d.ts +46 -0
- package/dist/esm/core/resources/referenced-record-scope.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/referenced-record-scope.frontend.utils.js +86 -0
- package/dist/esm/core/resources/referenced-record-scope.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/relationship-quick-create.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/relationship-quick-create.frontend.utils.js +5 -1
- package/dist/esm/core/resources/relationship-quick-create.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +28 -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 +43 -3
- package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resource-discriminators.frontend.utils.d.ts +26 -0
- package/dist/esm/core/resources/resource-discriminators.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/resource-discriminators.frontend.utils.js +37 -0
- package/dist/esm/core/resources/resource-discriminators.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts +40 -8
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +333 -73
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +175 -65
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +245 -75
- package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
- package/dist/esm/core/resources/rmm/HttpTransportAdapter.d.ts +9 -1
- package/dist/esm/core/resources/rmm/HttpTransportAdapter.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/HttpTransportAdapter.js +57 -22
- package/dist/esm/core/resources/rmm/HttpTransportAdapter.js.map +1 -1
- package/dist/esm/core/resources/rmm/RMMRegistry.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/RMMRegistry.js +1 -0
- package/dist/esm/core/resources/rmm/RMMRegistry.js.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts +3 -0
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js +94 -35
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/rmm/types.d.ts +58 -6
- package/dist/esm/core/resources/rmm/types.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/types.js +17 -0
- package/dist/esm/core/resources/rmm/types.js.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts +43 -6
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js +49 -6
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceMutationManager.js +2 -0
- package/dist/esm/core/resources/rmm/useResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts +2 -0
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.js +10 -3
- package/dist/esm/core/resources/rmm/useResourceRMM.js.map +1 -1
- package/dist/esm/core/resources/temporal-day-groups.frontend.utils.d.ts +22 -0
- package/dist/esm/core/resources/temporal-day-groups.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/temporal-day-groups.frontend.utils.js +31 -0
- package/dist/esm/core/resources/temporal-day-groups.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/ui-behavior-presentation.frontend.utils.d.ts +36 -0
- package/dist/esm/core/resources/ui-behavior-presentation.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/resources/ui-behavior-presentation.frontend.utils.js +88 -0
- package/dist/esm/core/resources/ui-behavior-presentation.frontend.utils.js.map +1 -0
- package/dist/esm/core/resources/useBulkJobProgress.d.ts +6 -0
- package/dist/esm/core/resources/useBulkJobProgress.d.ts.map +1 -1
- package/dist/esm/core/resources/useBulkJobProgress.js +1 -0
- package/dist/esm/core/resources/useBulkJobProgress.js.map +1 -1
- package/dist/esm/core/resources/useCollectionFilterPresetScope.d.ts +14 -0
- package/dist/esm/core/resources/useCollectionFilterPresetScope.d.ts.map +1 -0
- package/dist/esm/core/resources/useCollectionFilterPresetScope.js +29 -0
- package/dist/esm/core/resources/useCollectionFilterPresetScope.js.map +1 -0
- package/dist/esm/core/resources/useHostlessResourceNavigation.d.ts +7 -6
- package/dist/esm/core/resources/useHostlessResourceNavigation.d.ts.map +1 -1
- package/dist/esm/core/resources/useHostlessResourceNavigation.js +35 -21
- package/dist/esm/core/resources/useHostlessResourceNavigation.js.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.js +25 -10
- package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -1
- package/dist/esm/core/resources/useRecordSharing.d.ts +58 -0
- package/dist/esm/core/resources/useRecordSharing.d.ts.map +1 -0
- package/dist/esm/core/resources/useRecordSharing.js +220 -0
- package/dist/esm/core/resources/useRecordSharing.js.map +1 -0
- package/dist/esm/core/resources/useResourceLabels.d.ts +4 -1
- package/dist/esm/core/resources/useResourceLabels.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceLabels.js +31 -32
- package/dist/esm/core/resources/useResourceLabels.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts +23 -4
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +219 -51
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationOutcomeEmitter.d.ts +10 -1
- package/dist/esm/core/resources/useResourceOperationOutcomeEmitter.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationOutcomeEmitter.js +7 -2
- package/dist/esm/core/resources/useResourceOperationOutcomeEmitter.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts +5 -5
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.js +5 -4
- package/dist/esm/core/resources/useResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/resources/useResourceSelection.d.ts +6 -0
- package/dist/esm/core/resources/useResourceSelection.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceSelection.js.map +1 -1
- package/dist/esm/core/resources/utils/operation-enabled-condition.frontend.utils.d.ts +47 -0
- package/dist/esm/core/resources/utils/operation-enabled-condition.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/utils/operation-enabled-condition.frontend.utils.js +117 -4
- package/dist/esm/core/resources/utils/operation-enabled-condition.frontend.utils.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +5 -2
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +10 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +17 -2
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +5 -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 +4 -2
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -3
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +23 -7
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +3 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/scope/AppScopeContext.d.ts +7 -2
- package/dist/esm/core/scope/AppScopeContext.d.ts.map +1 -1
- package/dist/esm/core/scope/AppScopeContext.js +56 -10
- package/dist/esm/core/scope/AppScopeContext.js.map +1 -1
- package/dist/esm/core/security/ApplicationRoleTablesContext.d.ts +23 -0
- package/dist/esm/core/security/ApplicationRoleTablesContext.d.ts.map +1 -0
- package/dist/esm/core/security/ApplicationRoleTablesContext.js +27 -0
- package/dist/esm/core/security/ApplicationRoleTablesContext.js.map +1 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts +26 -8
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +81 -17
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/RouteOrganizationDecisionContext.d.ts +13 -0
- package/dist/esm/core/security/RouteOrganizationDecisionContext.d.ts.map +1 -0
- package/dist/esm/core/security/RouteOrganizationDecisionContext.js +12 -0
- package/dist/esm/core/security/RouteOrganizationDecisionContext.js.map +1 -0
- package/dist/esm/core/security/StepUpAuthContext.js +5 -5
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts +13 -0
- package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.js +272 -103
- package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
- package/dist/esm/core/security/auth-redirect.frontend.utils.d.ts +1 -0
- package/dist/esm/core/security/auth-redirect.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/auth-redirect.frontend.utils.js +3 -2
- package/dist/esm/core/security/auth-redirect.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/effective-permissions.frontend.utils.d.ts +43 -0
- package/dist/esm/core/security/effective-permissions.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/security/effective-permissions.frontend.utils.js +73 -0
- package/dist/esm/core/security/effective-permissions.frontend.utils.js.map +1 -0
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts +175 -5
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/route-organization-access.frontend.utils.js +147 -6
- package/dist/esm/core/security/route-organization-access.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/security.frontend.schemas.d.ts +17 -5
- package/dist/esm/core/security/security.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/security/security.frontend.schemas.js +0 -5
- package/dist/esm/core/security/security.frontend.schemas.js.map +1 -1
- package/dist/esm/core/security/useApplicationRoleTables.d.ts +3 -0
- package/dist/esm/core/security/useApplicationRoleTables.d.ts.map +1 -0
- package/dist/esm/core/security/useApplicationRoleTables.js +11 -0
- package/dist/esm/core/security/useApplicationRoleTables.js.map +1 -0
- package/dist/esm/core/security/useRouteOrganizationAccess.d.ts +9 -0
- package/dist/esm/core/security/useRouteOrganizationAccess.d.ts.map +1 -1
- package/dist/esm/core/security/useRouteOrganizationAccess.js +31 -10
- package/dist/esm/core/security/useRouteOrganizationAccess.js.map +1 -1
- package/dist/esm/core/security/useRouteOrganizationFollow.d.ts +24 -0
- package/dist/esm/core/security/useRouteOrganizationFollow.d.ts.map +1 -0
- package/dist/esm/core/security/useRouteOrganizationFollow.js +76 -0
- package/dist/esm/core/security/useRouteOrganizationFollow.js.map +1 -0
- package/dist/esm/core/ui/UIContext.d.ts +25 -2
- package/dist/esm/core/ui/UIContext.d.ts.map +1 -1
- package/dist/esm/core/ui/UIContext.js +49 -37
- package/dist/esm/core/ui/UIContext.js.map +1 -1
- package/dist/esm/core/ui/design-token.utils.d.ts +0 -11
- package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/design-token.utils.js +51 -83
- package/dist/esm/core/ui/design-token.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.d.ts.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.js +151 -59
- package/dist/esm/core/ui/themes/default.theme.js.map +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.d.ts +221 -0
- package/dist/esm/core/ui/themes/focus-indicator.d.ts.map +1 -0
- package/dist/esm/core/ui/themes/focus-indicator.js +229 -0
- package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -0
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts +7 -0
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/ui/useThemePreferenceControl.d.ts.map +1 -1
- package/dist/esm/core/ui/useThemePreferenceControl.js +1 -2
- package/dist/esm/core/ui/useThemePreferenceControl.js.map +1 -1
- package/dist/esm/index.d.ts +34 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +45 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tailwind/index.d.ts.map +1 -1
- package/dist/esm/tailwind/index.js +3 -0
- package/dist/esm/tailwind/index.js.map +1 -1
- package/dist/esm/testing/app-shell-placement-coverage.d.ts.map +1 -1
- package/dist/esm/testing/app-shell-placement-coverage.js +6 -2
- package/dist/esm/testing/app-shell-placement-coverage.js.map +1 -1
- package/dist/esm/testing/mock-builders.d.ts +13 -1
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +35 -1
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/esm/testing/rmm-helpers.d.ts +5 -3
- package/dist/esm/testing/rmm-helpers.d.ts.map +1 -1
- package/dist/esm/testing/rmm-helpers.js +3 -0
- package/dist/esm/testing/rmm-helpers.js.map +1 -1
- package/dist/esm/testing/test-providers.d.ts.map +1 -1
- package/dist/esm/testing/test-providers.js +3 -0
- package/dist/esm/testing/test-providers.js.map +1 -1
- package/package.json +7 -6
- package/dist/esm/components/flows-actors/flow-node.d.ts +0 -28
- package/dist/esm/components/flows-actors/flow-node.d.ts.map +0 -1
- package/dist/esm/components/flows-actors/flow-node.js +0 -115
- package/dist/esm/components/flows-actors/flow-node.js.map +0 -1
- package/dist/esm/components/resources/CollectionSelectionHeaderRail.d.ts +0 -30
- package/dist/esm/components/resources/CollectionSelectionHeaderRail.d.ts.map +0 -1
- package/dist/esm/components/resources/CollectionSelectionHeaderRail.js +0 -17
- package/dist/esm/components/resources/CollectionSelectionHeaderRail.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DisplayChromeMode, FieldSchemaType } from '@wildo-ai/zod-decorators';
|
|
2
|
+
/**
|
|
3
|
+
* Whether a value of this type cannot speak for itself and keeps its name wherever it is — the
|
|
4
|
+
* ORDER-FREE half of the naming rule, applied field by field by `DisplayField` on every summary whose
|
|
5
|
+
* layout declares no chrome, authored templates included.
|
|
6
|
+
*/
|
|
7
|
+
export declare function keepsItsNameAlone(schemaType: FieldSchemaType | undefined): boolean;
|
|
8
|
+
/** One summary value, as the naming rule reads it. */
|
|
9
|
+
export interface SummaryValueShape {
|
|
10
|
+
schemaType: FieldSchemaType | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the record holds a value for it ({@link isPresentSummaryValue}). An absent value shows
|
|
13
|
+
* nothing, so it is not named and does not count among the dates: when a record's first date is
|
|
14
|
+
* empty, the date that IS shown is the first one a reader sees.
|
|
15
|
+
*/
|
|
16
|
+
present: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The summary chrome the FIELD declares (`summaryOverride.chromeMode`, or `display.chromeMode`), resolved
|
|
19
|
+
* for the current breakpoint. It outranks the layout's declaration and the rule (audit B-8).
|
|
20
|
+
*/
|
|
21
|
+
declaredChrome?: DisplayChromeMode | undefined;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A value a summary actually shows. The one emptiness predicate of the read surfaces
|
|
25
|
+
* (`isEmptyDisplayValue`): null, undefined, a blank string, an empty list and an empty plain object show
|
|
26
|
+
* nothing; `false`, `0`, a date and money are answers.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isPresentSummaryValue(value: unknown): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The DATE half of the naming rule, which needs the summary's ORDER: every date after the first one the
|
|
31
|
+
* record shows keeps its name. Applied where the order is known — the generated summary template and the
|
|
32
|
+
* no-template card. An authored template places its own dates; a second one is named with
|
|
33
|
+
* `summaryOverride: { chromeMode: INLINE }`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function summaryDatesKeepingTheirName(values: ReadonlyArray<SummaryValueShape>): boolean[];
|
|
36
|
+
/**
|
|
37
|
+
* Which values of a summary (a card, a search hit, a reference preview) keep their NAME when the
|
|
38
|
+
* resource's layout declares NO summary chrome — the default is bare values (`DisplayChromeMode.HIDDEN`).
|
|
39
|
+
*
|
|
40
|
+
* It is the rule the `resource-ui-behavior` skill teaches an author to write by hand as
|
|
41
|
+
* `summaryOverride: { chromeMode: INLINE }` ("a bare value that cannot speak for itself keeps its label
|
|
42
|
+
* there"), applied where nobody wrote it: a boolean and a bare number always ({@link keepsItsNameAlone}),
|
|
43
|
+
* and a date whenever the summary SHOWS more than one — every date after the first, which its place still
|
|
44
|
+
* names ({@link summaryDatesKeepingTheirName}). Measured 2026-10-01 on Wonder Todos resources with no
|
|
45
|
+
* template: an expense receipt read as an amount and two unnamed dates, a billable service as two unnamed
|
|
46
|
+
* numbers. A value the record does not hold is never named.
|
|
47
|
+
*
|
|
48
|
+
* @param values - the summary's values, in the order they render
|
|
49
|
+
* @returns one flag per value: `true` = show its name beside it
|
|
50
|
+
*/
|
|
51
|
+
export declare function summaryValuesKeepingTheirName(values: ReadonlyArray<SummaryValueShape>): boolean[];
|
|
52
|
+
/**
|
|
53
|
+
* Which summary values show their name on a host that has no chrome machinery of its own (the card a
|
|
54
|
+
* resource with no summary template gets). For each value, the first that speaks decides:
|
|
55
|
+
*
|
|
56
|
+
* 1. the FIELD's own declared summary chrome ({@link SummaryValueShape.declaredChrome});
|
|
57
|
+
* 2. the LAYOUT's declared summary chrome (`layout.defaultChromeMode.summary`);
|
|
58
|
+
* 3. the naming rule ({@link summaryValuesKeepingTheirName}).
|
|
59
|
+
*
|
|
60
|
+
* A declared chrome that shows a name (STACKED, SETTINGS_ROW, INLINE, TILE) names the value; COMPACT and
|
|
61
|
+
* HIDDEN do not. A value the record does not hold is never named.
|
|
62
|
+
*
|
|
63
|
+
* @param declaredSummaryChrome - the layout's declaration, resolved for the current breakpoint, or `undefined`
|
|
64
|
+
* @param values - the summary's values, in the order they render
|
|
65
|
+
*/
|
|
66
|
+
export declare function summaryValueNamesShown(declaredSummaryChrome: DisplayChromeMode | undefined, values: ReadonlyArray<SummaryValueShape>): boolean[];
|
|
67
|
+
//# sourceMappingURL=summary-value-naming.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-value-naming.utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/automated-layout/summary-value-naming.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AA8B9E;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAElF;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,eAAe,GAAG,SAAS,CAAC;IACxC;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAChD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE,CAOhG;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,OAAO,EAAE,CAGjG;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,qBAAqB,EAAE,iBAAiB,GAAG,SAAS,EACpD,MAAM,EAAE,aAAa,CAAC,iBAAiB,CAAC,GACvC,OAAO,EAAE,CAOX"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { DisplayChromeMode, FieldSchemaType } from '@wildo-ai/zod-decorators';
|
|
2
|
+
import { isEmptyDisplayValue } from '../../components/data-display/display-value-emptiness.utils.js';
|
|
3
|
+
/**
|
|
4
|
+
* Values that never say what they are on their own: a lone ✓ says nothing about WHAT is true, and a bare
|
|
5
|
+
* number — a count, an amount with no currency, an external id — is a figure with no subject. A money
|
|
6
|
+
* value carries its currency, a word, a state or a name speaks for itself, so none of those is here.
|
|
7
|
+
*/
|
|
8
|
+
const NAMELESS_ALONE = new Set([
|
|
9
|
+
FieldSchemaType.BOOLEAN,
|
|
10
|
+
FieldSchemaType.NUMBER,
|
|
11
|
+
FieldSchemaType.BIGINT,
|
|
12
|
+
FieldSchemaType.BIGDECIMAL,
|
|
13
|
+
FieldSchemaType.RANGE_NUMBER,
|
|
14
|
+
FieldSchemaType.RANGE_BIGDECIMAL,
|
|
15
|
+
]);
|
|
16
|
+
/** Dates and times: ONE on a card is read by its place; several cannot all be. */
|
|
17
|
+
const DATE_LIKE = new Set([
|
|
18
|
+
FieldSchemaType.DATE,
|
|
19
|
+
FieldSchemaType.DATETIME,
|
|
20
|
+
FieldSchemaType.TIME,
|
|
21
|
+
FieldSchemaType.RANGE_DATE,
|
|
22
|
+
FieldSchemaType.RANGE_DATETIME,
|
|
23
|
+
FieldSchemaType.RANGE_TIME,
|
|
24
|
+
]);
|
|
25
|
+
/** The display chromes that show the bare value and no name (see `DisplayChromeMode`). */
|
|
26
|
+
const CHROMES_WITHOUT_A_NAME = new Set([DisplayChromeMode.COMPACT, DisplayChromeMode.HIDDEN]);
|
|
27
|
+
/**
|
|
28
|
+
* Whether a value of this type cannot speak for itself and keeps its name wherever it is — the
|
|
29
|
+
* ORDER-FREE half of the naming rule, applied field by field by `DisplayField` on every summary whose
|
|
30
|
+
* layout declares no chrome, authored templates included.
|
|
31
|
+
*/
|
|
32
|
+
export function keepsItsNameAlone(schemaType) {
|
|
33
|
+
return schemaType !== undefined && NAMELESS_ALONE.has(schemaType);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A value a summary actually shows. The one emptiness predicate of the read surfaces
|
|
37
|
+
* (`isEmptyDisplayValue`): null, undefined, a blank string, an empty list and an empty plain object show
|
|
38
|
+
* nothing; `false`, `0`, a date and money are answers.
|
|
39
|
+
*/
|
|
40
|
+
export function isPresentSummaryValue(value) {
|
|
41
|
+
return !isEmptyDisplayValue(value);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The DATE half of the naming rule, which needs the summary's ORDER: every date after the first one the
|
|
45
|
+
* record shows keeps its name. Applied where the order is known — the generated summary template and the
|
|
46
|
+
* no-template card. An authored template places its own dates; a second one is named with
|
|
47
|
+
* `summaryOverride: { chromeMode: INLINE }`.
|
|
48
|
+
*/
|
|
49
|
+
export function summaryDatesKeepingTheirName(values) {
|
|
50
|
+
let datesShown = 0;
|
|
51
|
+
return values.map(({ schemaType, present }) => {
|
|
52
|
+
if (!present || schemaType === undefined || !DATE_LIKE.has(schemaType))
|
|
53
|
+
return false;
|
|
54
|
+
datesShown += 1;
|
|
55
|
+
return datesShown > 1;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Which values of a summary (a card, a search hit, a reference preview) keep their NAME when the
|
|
60
|
+
* resource's layout declares NO summary chrome — the default is bare values (`DisplayChromeMode.HIDDEN`).
|
|
61
|
+
*
|
|
62
|
+
* It is the rule the `resource-ui-behavior` skill teaches an author to write by hand as
|
|
63
|
+
* `summaryOverride: { chromeMode: INLINE }` ("a bare value that cannot speak for itself keeps its label
|
|
64
|
+
* there"), applied where nobody wrote it: a boolean and a bare number always ({@link keepsItsNameAlone}),
|
|
65
|
+
* and a date whenever the summary SHOWS more than one — every date after the first, which its place still
|
|
66
|
+
* names ({@link summaryDatesKeepingTheirName}). Measured 2026-10-01 on Wonder Todos resources with no
|
|
67
|
+
* template: an expense receipt read as an amount and two unnamed dates, a billable service as two unnamed
|
|
68
|
+
* numbers. A value the record does not hold is never named.
|
|
69
|
+
*
|
|
70
|
+
* @param values - the summary's values, in the order they render
|
|
71
|
+
* @returns one flag per value: `true` = show its name beside it
|
|
72
|
+
*/
|
|
73
|
+
export function summaryValuesKeepingTheirName(values) {
|
|
74
|
+
const dates = summaryDatesKeepingTheirName(values);
|
|
75
|
+
return values.map(({ schemaType, present }, index) => present && (keepsItsNameAlone(schemaType) || dates[index]));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Which summary values show their name on a host that has no chrome machinery of its own (the card a
|
|
79
|
+
* resource with no summary template gets). For each value, the first that speaks decides:
|
|
80
|
+
*
|
|
81
|
+
* 1. the FIELD's own declared summary chrome ({@link SummaryValueShape.declaredChrome});
|
|
82
|
+
* 2. the LAYOUT's declared summary chrome (`layout.defaultChromeMode.summary`);
|
|
83
|
+
* 3. the naming rule ({@link summaryValuesKeepingTheirName}).
|
|
84
|
+
*
|
|
85
|
+
* A declared chrome that shows a name (STACKED, SETTINGS_ROW, INLINE, TILE) names the value; COMPACT and
|
|
86
|
+
* HIDDEN do not. A value the record does not hold is never named.
|
|
87
|
+
*
|
|
88
|
+
* @param declaredSummaryChrome - the layout's declaration, resolved for the current breakpoint, or `undefined`
|
|
89
|
+
* @param values - the summary's values, in the order they render
|
|
90
|
+
*/
|
|
91
|
+
export function summaryValueNamesShown(declaredSummaryChrome, values) {
|
|
92
|
+
const byRule = summaryValuesKeepingTheirName(values);
|
|
93
|
+
return values.map(({ present, declaredChrome }, index) => {
|
|
94
|
+
if (!present)
|
|
95
|
+
return false;
|
|
96
|
+
const declared = declaredChrome ?? declaredSummaryChrome;
|
|
97
|
+
return declared !== undefined ? !CHROMES_WITHOUT_A_NAME.has(declared) : byRule[index];
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=summary-value-naming.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-value-naming.utils.js","sourceRoot":"","sources":["../../../../../src/core/automated-layout/summary-value-naming.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2EAA2E,CAAC;AAEhH;;;;GAIG;AACH,MAAM,cAAc,GAAiC,IAAI,GAAG,CAAC;IAC3D,eAAe,CAAC,OAAO;IACvB,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,MAAM;IACtB,eAAe,CAAC,UAAU;IAC1B,eAAe,CAAC,YAAY;IAC5B,eAAe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OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACpH,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CACpC,qBAAoD,EACpD,MAAwC;IAExC,MAAM,MAAM,GAAG,6BAA6B,CAAC,MAAM,CAAC,CAAC;IACrD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE;QACvD,IAAI,CAAC,OAAO;YAAE,OAAO,KAAK,CAAC;QAC3B,MAAM,QAAQ,GAAG,cAAc,IAAI,qBAAqB,CAAC;QACzD,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { DisplayChromeMode, FieldSchemaType } from '@wildo-ai/zod-decorators';\nimport { isEmptyDisplayValue } from '~wildo-frontend-lib/components/data-display/display-value-emptiness.utils';\n\n/**\n * Values that never say what they are on their own: a lone ✓ says nothing about WHAT is true, and a bare\n * number — a count, an amount with no currency, an external id — is a figure with no subject. A money\n * value carries its currency, a word, a state or a name speaks for itself, so none of those is here.\n */\nconst NAMELESS_ALONE: ReadonlySet<FieldSchemaType> = new Set([\n FieldSchemaType.BOOLEAN,\n FieldSchemaType.NUMBER,\n FieldSchemaType.BIGINT,\n FieldSchemaType.BIGDECIMAL,\n FieldSchemaType.RANGE_NUMBER,\n FieldSchemaType.RANGE_BIGDECIMAL,\n]);\n\n/** Dates and times: ONE on a card is read by its place; several cannot all be. */\nconst DATE_LIKE: ReadonlySet<FieldSchemaType> = new Set([\n FieldSchemaType.DATE,\n FieldSchemaType.DATETIME,\n FieldSchemaType.TIME,\n FieldSchemaType.RANGE_DATE,\n FieldSchemaType.RANGE_DATETIME,\n FieldSchemaType.RANGE_TIME,\n]);\n\n/** The display chromes that show the bare value and no name (see `DisplayChromeMode`). */\nconst CHROMES_WITHOUT_A_NAME: ReadonlySet<DisplayChromeMode> = new Set([DisplayChromeMode.COMPACT, DisplayChromeMode.HIDDEN]);\n\n/**\n * Whether a value of this type cannot speak for itself and keeps its name wherever it is — the\n * ORDER-FREE half of the naming rule, applied field by field by `DisplayField` on every summary whose\n * layout declares no chrome, authored templates included.\n */\nexport function keepsItsNameAlone(schemaType: FieldSchemaType | undefined): boolean {\n return schemaType !== undefined && NAMELESS_ALONE.has(schemaType);\n}\n\n/** One summary value, as the naming rule reads it. */\nexport interface SummaryValueShape {\n schemaType: FieldSchemaType | undefined;\n /**\n * Whether the record holds a value for it ({@link isPresentSummaryValue}). An absent value shows\n * nothing, so it is not named and does not count among the dates: when a record's first date is\n * empty, the date that IS shown is the first one a reader sees.\n */\n present: boolean;\n /**\n * The summary chrome the FIELD declares (`summaryOverride.chromeMode`, or `display.chromeMode`), resolved\n * for the current breakpoint. It outranks the layout's declaration and the rule (audit B-8).\n */\n declaredChrome?: DisplayChromeMode | undefined;\n}\n\n/**\n * A value a summary actually shows. The one emptiness predicate of the read surfaces\n * (`isEmptyDisplayValue`): null, undefined, a blank string, an empty list and an empty plain object show\n * nothing; `false`, `0`, a date and money are answers.\n */\nexport function isPresentSummaryValue(value: unknown): boolean {\n return !isEmptyDisplayValue(value);\n}\n\n/**\n * The DATE half of the naming rule, which needs the summary's ORDER: every date after the first one the\n * record shows keeps its name. Applied where the order is known — the generated summary template and the\n * no-template card. An authored template places its own dates; a second one is named with\n * `summaryOverride: { chromeMode: INLINE }`.\n */\nexport function summaryDatesKeepingTheirName(values: ReadonlyArray<SummaryValueShape>): boolean[] {\n let datesShown = 0;\n return values.map(({ schemaType, present }) => {\n if (!present || schemaType === undefined || !DATE_LIKE.has(schemaType)) return false;\n datesShown += 1;\n return datesShown > 1;\n });\n}\n\n/**\n * Which values of a summary (a card, a search hit, a reference preview) keep their NAME when the\n * resource's layout declares NO summary chrome — the default is bare values (`DisplayChromeMode.HIDDEN`).\n *\n * It is the rule the `resource-ui-behavior` skill teaches an author to write by hand as\n * `summaryOverride: { chromeMode: INLINE }` (\"a bare value that cannot speak for itself keeps its label\n * there\"), applied where nobody wrote it: a boolean and a bare number always ({@link keepsItsNameAlone}),\n * and a date whenever the summary SHOWS more than one — every date after the first, which its place still\n * names ({@link summaryDatesKeepingTheirName}). Measured 2026-10-01 on Wonder Todos resources with no\n * template: an expense receipt read as an amount and two unnamed dates, a billable service as two unnamed\n * numbers. A value the record does not hold is never named.\n *\n * @param values - the summary's values, in the order they render\n * @returns one flag per value: `true` = show its name beside it\n */\nexport function summaryValuesKeepingTheirName(values: ReadonlyArray<SummaryValueShape>): boolean[] {\n const dates = summaryDatesKeepingTheirName(values);\n return values.map(({ schemaType, present }, index) => present && (keepsItsNameAlone(schemaType) || dates[index]));\n}\n\n/**\n * Which summary values show their name on a host that has no chrome machinery of its own (the card a\n * resource with no summary template gets). For each value, the first that speaks decides:\n *\n * 1. the FIELD's own declared summary chrome ({@link SummaryValueShape.declaredChrome});\n * 2. the LAYOUT's declared summary chrome (`layout.defaultChromeMode.summary`);\n * 3. the naming rule ({@link summaryValuesKeepingTheirName}).\n *\n * A declared chrome that shows a name (STACKED, SETTINGS_ROW, INLINE, TILE) names the value; COMPACT and\n * HIDDEN do not. A value the record does not hold is never named.\n *\n * @param declaredSummaryChrome - the layout's declaration, resolved for the current breakpoint, or `undefined`\n * @param values - the summary's values, in the order they render\n */\nexport function summaryValueNamesShown(\n declaredSummaryChrome: DisplayChromeMode | undefined,\n values: ReadonlyArray<SummaryValueShape>,\n): boolean[] {\n const byRule = summaryValuesKeepingTheirName(values);\n return values.map(({ present, declaredChrome }, index) => {\n if (!present) return false;\n const declared = declaredChrome ?? declaredSummaryChrome;\n return declared !== undefined ? !CHROMES_WITHOUT_A_NAME.has(declared) : byRule[index];\n });\n}\n"]}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* BillingContext
|
|
4
|
-
*
|
|
5
|
-
* Central context for billing operations on the frontend.
|
|
6
|
-
*
|
|
7
|
-
* Responsibilities:
|
|
8
|
-
* - Self-resolves scope (org/user) from AppScope + user context — no external props needed
|
|
9
|
-
* - Fetches billing state via the GET_STATE resource operation on the billing account
|
|
10
|
-
* - The backend auto-creates the billing account if one doesn't exist
|
|
11
|
-
* - Provides actions: openCheckout, openCustomerPortal (via resource operations)
|
|
12
|
-
* - Caches billing state and invalidates on WebSocket events
|
|
13
|
-
* - Exposes convenience accessors for current plan, subscription status, etc.
|
|
14
|
-
*
|
|
15
|
-
* DELEGATION PRINCIPLE: The frontend does NOT build payment UI.
|
|
16
|
-
* - Stripe Checkout (hosted page): for new subscriptions and upgrades
|
|
17
|
-
* - Stripe Customer Portal (hosted page): for invoices, payment methods, cancellation
|
|
18
|
-
*/
|
|
19
2
|
import React from 'react';
|
|
20
3
|
import type { BillingAccount, BillingSubscriptionBase, Product, Price, Promotion, InvoiceRef, UsageSummary, BillingConfiguration, ProductDefinition, BillingStateAvailability } from '@wildo-ai/saas-models';
|
|
21
4
|
import { BillingSubscription_PreviewPlanChangeRequestDto, BillingSubscription_ChangePlanRequestDto, BillingSubscription_PlanChangePreviewResponseDto, BillingStateSlice, ResourcePrimaryScope } from '@wildo-ai/saas-models';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/billing/BillingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"BillingContext.d.ts","sourceRoot":"","sources":["../../../../../src/core/billing/BillingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MA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GxD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAOD,2DAA2D;AAE3D,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAA4D,CAAC;AAMtI,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,CAwetI"}
|
|
@@ -16,6 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
* - Stripe Checkout (hosted page): for new subscriptions and upgrades
|
|
17
17
|
* - Stripe Customer Portal (hosted page): for invoices, payment methods, cancellation
|
|
18
18
|
*/
|
|
19
|
+
import { useApplicationRoleTables } from '../../core/security/useApplicationRoleTables.js';
|
|
19
20
|
import { createContext, useEffect, useState, useCallback, useMemo, useRef } from 'react';
|
|
20
21
|
import { BillingAccount_Operations, BillingSubscription_Operations, BillingSubscription_PreviewPlanChangeRequestDto, BillingSubscription_ChangePlanRequestDto, BillingSubscription_PlanChangePreviewResponseDto, ResourceOperationVariantType, ResourcesConfig_OperationPathUtils, HttpMethod, BillingStateSlice, BillingSliceAvailability, CoreWebSocketEvent, CoreResourceType, ResourcePrimaryScope, MAIN_API_BASE_PATH, userRolesSatisfyRequiredRoles, } from '@wildo-ai/saas-models';
|
|
21
22
|
import { useWebSocket } from '../../core/requests/websockets/useWebSocket.js';
|
|
@@ -144,6 +145,7 @@ export function BillingProvider({ children, productDefinitions: injectedProductD
|
|
|
144
145
|
*/
|
|
145
146
|
const permissions = userOrgs.permissions;
|
|
146
147
|
const currentOrganizationId = appScope?.currentOrganizationId ?? null;
|
|
148
|
+
const roleTables = useApplicationRoleTables();
|
|
147
149
|
const mayReadBillingState = useMemo(() => {
|
|
148
150
|
if (!isEnabled || !billingAccountResourceType)
|
|
149
151
|
return false;
|
|
@@ -155,8 +157,11 @@ export function BillingProvider({ children, productDefinitions: injectedProductD
|
|
|
155
157
|
requiredRoles: getStateOperation.roles,
|
|
156
158
|
userAppRoles: permissions?.appLevel ?? [],
|
|
157
159
|
userOrgRoles: currentOrganizationId ? permissions?.organizations?.[currentOrganizationId] ?? [] : [],
|
|
160
|
+
appRolesConfig: roleTables.appRolesConfig,
|
|
161
|
+
orgRolesConfig: roleTables.orgRolesConfig,
|
|
162
|
+
unresolvableRoles: roleTables.unresolvableRoles,
|
|
158
163
|
});
|
|
159
|
-
}, [isEnabled, billingAccountResourceType, resourceRegistry, permissions, currentOrganizationId]);
|
|
164
|
+
}, [isEnabled, billingAccountResourceType, resourceRegistry, permissions, currentOrganizationId, roleTables]);
|
|
160
165
|
// ── State ──
|
|
161
166
|
const [billingState, setBillingState] = useState(null);
|
|
162
167
|
const [isLoading, setIsLoading] = useState(mayReadBillingState && !!scopeEntityId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingContext.js","sourceRoot":"","sources":["../../../../../src/core/billing/BillingContext.tsx"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAc,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAehG,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,+CAA+C,EAC/C,wCAAwC,EACxC,gDAAgD,EAChD,4BAA4B,EAC5B,kCAAkC,EAClC,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,C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E,EAAE,CAAC,CAAC;QAC/E,MAAM,iBAAiB,EAAE,CAAC;IAC5B,CAAC,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE3C,MAAM,YAAY,GAAuB,OAAO,CAC9C,GAAG,EAAE,CAAC,CAAC;QACL,SAAS;QACT,oBAAoB,EAAE,aAAa;QACnC,kBAAkB;QAClB,cAAc;QACd,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,kBAAkB;QAClB,mBAAmB;QACnB,eAAe;QACf,mBAAmB;QACnB,gBAAgB;QAChB,KAAK;QACL,WAAW;QACX,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,KAAK;QACL,OAAO,EAAE,iBAAiB;KAC3B,CAAC,EACF;QACE,SAAS;QACT,aAAa;QACb,kBAAkB;QAClB,cAAc;QACd,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,kBAAkB;QAClB,mBAAmB;QACnB,eAAe;QACf,mBAAmB;QACnB,gBAAgB;QAChB,KAAK;QACL,WAAW;QACX,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,KAAK;QACL,iBAAiB;KAClB,CACF,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACzC,QAAQ,GACe,CAC3B,CAAC;AACJ,CAAC","sourcesContent":["import type { z } from 'zod';\n/**\n * BillingContext\n *\n * Central context for billing operations on the frontend.\n *\n * Responsibilities:\n * - Self-resolves scope (org/user) from AppScope + user context — no external props needed\n * - Fetches billing state via the GET_STATE resource operation on the billing account\n * - The backend auto-creates the billing account if one doesn't exist\n * - Provides actions: openCheckout, openCustomerPortal (via resource operations)\n * - Caches billing state and invalidates on WebSocket events\n * - Exposes convenience accessors for current plan, subscription status, etc.\n *\n * DELEGATION PRINCIPLE: The frontend does NOT build payment UI.\n * - Stripe Checkout (hosted page): for new subscriptions and upgrades\n * - Stripe Customer Portal (hosted page): for invoices, payment methods, cancellation\n */\n\nimport React, { createContext, useEffect, useState, useCallback, useMemo, useRef } from 'react';\nimport type {\n BillingAccount,\n BillingSubscriptionBase,\n Product,\n Price,\n Promotion,\n InvoiceRef,\n UsageSummary,\n BillingConfiguration,\n ProductDefinition,\n BillingStateResponse,\n BillingStateAvailability,\n WS_BillingEventPayload,\n} from '@wildo-ai/saas-models';\nimport {\n BillingAccount_Operations,\n BillingSubscription_Operations,\n BillingSubscription_PreviewPlanChangeRequestDto,\n BillingSubscription_ChangePlanRequestDto,\n BillingSubscription_PlanChangePreviewResponseDto,\n ResourceOperationVariantType,\n ResourcesConfig_OperationPathUtils,\n HttpMethod,\n BillingStateSlice,\n BillingSliceAvailability,\n CoreWebSocketEvent,\n CoreResourceType,\n ResourcePrimaryScope,\n MAIN_API_BASE_PATH,\n userRolesSatisfyRequiredRoles,\n} from '@wildo-ai/saas-models';\nimport { useWebSocket } from '~wildo-frontend-lib/core/requests/websockets/useWebSocket';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { isResourceReachable, useResourceRegistrySafe } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service';\nimport { useEmitLoadingScope } from '~wildo-frontend-lib/core/loading/useEmitLoadingScope';\nimport { ContextLoadingIdentifier } from '~wildo-frontend-lib/core/loading/loading-types.frontend.schemas';\n\n// ================================\n// Logger\n// ================================\n\nconst billingLogger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = billingLogger.debugByType('BillingContext');\nbillingLogger.setDebugTypeLogging('BillingContext', false);\n\n// ================================\n// Constants\n// ================================\n\nconst API_PREFIX = MAIN_API_BASE_PATH;\n\n/** WebSocket events that trigger a refetch of billing state */\nconst INVALIDATION_EVENTS = [\n CoreWebSocketEvent.BILLING_STATUS_CHANGED,\n CoreWebSocketEvent.BILLING_SUBSCRIPTION_UPDATED,\n CoreWebSocketEvent.BILLING_ACCOUNT_CHANGED,\n CoreWebSocketEvent.BILLING_USAGE_UPDATED,\n CoreWebSocketEvent.BILLING_CREDIT_POOL_UPDATED,\n CoreWebSocketEvent.BILLING_FEATURES_UPDATED,\n] as const;\n\n/** Maps ResourcePrimaryScope → billing account variant resource type (for resource operations) */\nconst SCOPE_TO_BILLING_ACCOUNT_RESOURCE: Record<string, string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n [ResourcePrimaryScope.USER_SELF]: CoreResourceType.USER_BILLING_ACCOUNTS,\n};\n\n// The billing-account GET_STATE / OPEN_CHECKOUT / OPEN_PORTAL custom operations\n// borrow COUNT / UPDATE / READ core semantics (see\n// `billing-account.shared.resources-config.schemas.ts`), so their canonical\n// routes follow the framework's scoped resource-operation shape:\n// GET_STATE (COUNT-like) → GET /<scope>/{id}/<res>/get-state/count\n// OPEN_CHECKOUT (UPDATE-like) → PUT /<scope>/{id}/<res>/{accountId}/open-checkout\n// OPEN_PORTAL (READ-like) → GET /<scope>/{id}/<res>/{accountId}/open-portal\n// Built here to mirror the routes the backend registers from the same\n// resources-config; the prior `/operations/open_checkout` POST 404'd.\n\n/** Maps ResourcePrimaryScope → GET_STATE URL builder (COUNT-like → trailing `/count`) */\nconst SCOPE_TO_GET_STATE_URL: Record<string, (scopeEntityId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/get-state/count`,\n [ResourcePrimaryScope.USER_SELF]: (id) => `${API_PREFIX}/users/${id}/user-billing-accounts/get-state/count`,\n};\n\n/** Maps ResourcePrimaryScope → OPEN_CHECKOUT URL builder (UPDATE-like → keyed PUT) */\nconst SCOPE_TO_OPEN_CHECKOUT_URL: Record<string, (scopeEntityId: string, billingAccountId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id, acc) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/${acc}/open-checkout`,\n [ResourcePrimaryScope.USER_SELF]: (id, acc) => `${API_PREFIX}/users/${id}/user-billing-accounts/${acc}/open-checkout`,\n};\n\n/** Maps ResourcePrimaryScope → OPEN_PORTAL URL builder (READ-like → keyed GET) */\nconst SCOPE_TO_OPEN_PORTAL_URL: Record<string, (scopeEntityId: string, billingAccountId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id, acc) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/${acc}/open-portal`,\n [ResourcePrimaryScope.USER_SELF]: (id, acc) => `${API_PREFIX}/users/${id}/user-billing-accounts/${acc}/open-portal`,\n};\n\n// ================================\n// API Response Types\n// ================================\n\n/** Response from PUT /<scope>/{id}/<billing-accounts>/{accountId}/open-checkout (OPEN_CHECKOUT) */\ninterface CheckoutSessionResponse {\n url: string;\n sessionId: string;\n}\n\n/** Response from GET /<scope>/{id}/<billing-accounts>/{accountId}/open-portal (OPEN_PORTAL) */\ninterface PortalSessionResponse {\n url: string;\n}\n\n// ================================\n// Context Type\n// ================================\n\n/**\n * @wildo_source:part:start saas.frontend.billing-context facet:layer:frontend facet:audience:app-developer\n *\n * Everything an application's own frontend reads or does about billing. Reached with `useBilling()`,\n * which throws outside a `BillingProvider`; `useBillingSafe()` returns `undefined` instead, for a\n * component that may render before the provider mounts or in an application where billing is off.\n *\n * The shipped billing components and the feature-gating hooks read this same context, so an\n * application composing its own purchase flow works from exactly what they do — no application code\n * builds the request.\n *\n * ## Starting a purchase\n *\n * `openCheckout(productKey, priceId, options)` posts to the scoped billing-account route and follows\n * the returned URL; success and cancel destinations come from the application's own redirect base. A\n * SECOND call while one is in flight is IGNORED, so a double-click cannot open two sessions — do not\n * add your own guard expecting otherwise, and do not read the silence as a failure.\n *\n * The `priceId` must belong to the product named by `productKey`; the checkout operation refuses a\n * mismatched pair. Resolve it through `getPricesForProduct` rather than assuming an ordering.\n *\n * `openCustomerPortal()` opens the provider's own portal — which is where payment methods, card\n * updates and receipt downloads live. Those are deliberately NOT rendered by the framework, so an\n * application that needs them links the portal rather than building them.\n *\n * ## What `usage` contains\n *\n * Metered consumption appears here only if the application RECORDS it. Nothing is automatic: a\n * metered product with no recorded usage shows an empty dashboard rather than an error.\n *\n * ## Invoices are capped\n *\n * `invoices` carries the fifty most recent, which is what the shipped history component renders. An\n * application needing more reads the invoices resource directly.\n */\nexport type BillingPlanChangeTarget = z.infer<typeof BillingSubscription_PreviewPlanChangeRequestDto>;\nexport type BillingPlanChangeConfirmation = z.infer<typeof BillingSubscription_ChangePlanRequestDto>;\nexport type BillingPlanChangePreviewResponse = z.infer<typeof BillingSubscription_PlanChangePreviewResponseDto>;\n\nexport interface BillingContextType {\n // ── Configuration ──\n isEnabled: boolean;\n billingConfiguration: BillingConfiguration | undefined;\n /**\n * The configured billing provider's REF (`billing.providerRef`), or null when billing is off or\n * names none. Surfaces show the vendor's name from it (`providers.<ref>.displayName`, #1895).\n *\n * It used to be a frontend provider MODULE, resolved from the registry by ref or by the `BILLING`\n * capability. The only such module was Stripe's, which loaded no Stripe code — checkout and the\n * customer portal are hosted redirects — and existed only to carry that name (#1701). The ref is the\n * fact the application configured; a module was a second place that had to agree with it.\n */\n billingProviderRef: string | null;\n\n // ── Billing State ──\n billingAccount: BillingAccount | null;\n subscription: BillingSubscriptionBase | null;\n currentPlanKey: string | null;\n currentPlanProduct: Product | null;\n\n // ── Product Catalog ──\n products: Product[];\n prices: Price[];\n productDefinitions: ProductDefinition[];\n getPricesForProduct: (productId: string) => Price[];\n getProductByKey: (key: string) => Product | undefined;\n /**\n * May this product be bought, or moved onto, right now? Answered from the billing state's\n * `acquirableProductKeys` — the set the backend derives with the SAME predicate its checkout,\n * plan-change and add-on doors enforce — so a surface never re-derives it from `isActive` and can\n * never offer a plan the backend refuses (a retired one, or an announced-but-upcoming one, #1835).\n * Fails closed: a state that did not carry the set answers `false`, because an unknown answer must\n * not offer a checkout.\n */\n isProductAcquirable: (key: string) => boolean;\n\n // ── Scope ──\n currentScope: ResourcePrimaryScope | null;\n\n // ── Invoices ──\n invoices: InvoiceRef[];\n\n // ── Promotions ──\n activePromotions: Promotion[];\n\n // ── Usage & Credits ──\n usage: UsageSummary;\n creditPools: Record<string, { available: number; totalPurchased: number; totalGranted: number; totalConsumed: number }>;\n\n // ── Actions ──\n openCheckout: (productKey: string, priceId: string, options?: {\n quantity?: number;\n promotionCode?: string;\n }) => Promise<void>;\n\n openCustomerPortal: () => Promise<void>;\n /** Provider estimate bound to the current subscription and selected target; never commits a change. */\n previewPlanChange: (target: BillingPlanChangeTarget, options?: { signal?: AbortSignal }) => Promise<BillingPlanChangePreviewResponse>;\n /** Confirm only the server token returned for the displayed preview. Successful mutation refreshes billing state. */\n confirmPlanChange: (confirmation: BillingPlanChangeConfirmation) => Promise<void>;\n /**\n * Withdraw the plan change pending at the end of the period (`subscription.pendingPlanChange`, #1868), so the subscription renews\n * on its current plan. Successful withdrawal refreshes billing state.\n */\n cancelPendingPlanChange: () => Promise<void>;\n\n // ── State ──\n isLoading: boolean;\n error: Error | null;\n /** Only a successful slice read establishes emptiness; failed or absent state is unavailable. */\n availability: BillingStateAvailability | null;\n isSliceAvailable: (slice: BillingStateSlice) => boolean;\n\n // ── Actions ──\n refetch: () => void;\n}\n\n// ── Default empty state ──\nconst EMPTY_USAGE: UsageSummary = {\n byProduct: {},\n};\n\n/** @wildo_source:part:end saas.frontend.billing-context */\n\nexport const BillingContext: React.Context<BillingContextType | undefined> = createContext<BillingContextType | undefined>(undefined);\n\n// ================================\n// Provider\n// ================================\n\nexport interface BillingProviderProps {\n children: React.ReactNode;\n productDefinitions?: ProductDefinition[];\n}\n\nexport function BillingProvider({ children, productDefinitions: injectedProductDefinitions }: BillingProviderProps): React.ReactElement {\n // ── Self-resolve configuration from hooks ──\n const userOrgs = useUserOrgs();\n const appScope = useAppScopeSafe();\n const { appConfig } = useApplication();\n const resourceRegistry = useResourceRegistrySafe();\n const billingConfig = appConfig.billing;\n /** What the application CONFIGURED — see `isEnabled` below for why that is only half the answer. */\n const isConfiguredEnabled = billingConfig?.enabled ?? false;\n const billingProviderRef = isConfiguredEnabled ? billingConfig?.providerRef ?? null : null;\n\n // ── Self-resolve scope ──\n const enabledScopes = billingConfig?.enabledScopes ?? [ResourcePrimaryScope.ORGANIZATIONS];\n\n const { scopeType, scopeEntityId } = useMemo(() => {\n if (enabledScopes.includes(ResourcePrimaryScope.ORGANIZATIONS) && appScope?.currentOrganizationId) {\n return { scopeType: ResourcePrimaryScope.ORGANIZATIONS as ResourcePrimaryScope, scopeEntityId: appScope.currentOrganizationId };\n }\n if (enabledScopes.includes(ResourcePrimaryScope.USER_SELF) && userOrgs.user?._id) {\n return { scopeType: ResourcePrimaryScope.USER_SELF as ResourcePrimaryScope, scopeEntityId: userOrgs.user._id };\n }\n return { scopeType: null as ResourcePrimaryScope | null, scopeEntityId: null as string | null };\n }, [enabledScopes, appScope?.currentOrganizationId, userOrgs.user?._id]);\n\n // ── Derive variant resource type for operations ──\n const billingAccountResourceType = scopeType ? SCOPE_TO_BILLING_ACCOUNT_RESOURCE[scopeType] : null;\n\n /**\n * Enabled means CONFIGURED **and** REACHABLE — the config flag alone was not enough.\n *\n * Every request this provider makes is an operation on a billing-account resource, so a consumer\n * whose registry does not carry that resource cannot serve one no matter what the config says.\n * That is not hypothetical: the application-creation workbench excludes the whole tenant\n * vocabulary from its registry (it observes an application's creation and is not that\n * application's admin console) while rendering the OBSERVED application's config, which has\n * billing enabled — so it fired `organization-billing-accounts/get-state/count` at its own origin\n * on every page load, where the companion serves no billing routes, and answered 404 every time\n * (issue #268, reproduced live).\n *\n * Reading the registry rather than adding a second opt-out keeps the two halves from disagreeing:\n * a consumer that excludes the resource has already said billing is not part of its surface, and\n * saying it twice is how the two copies drift. A tenant application carries the resource and is\n * unaffected.\n */\n const isEnabled = isConfiguredEnabled\n && billingAccountResourceType !== null\n // The absent-registry-is-ignorance rule lives on the seam (`isResourceReachable`), shared with the\n // features, guidance and analytics providers since #1069 so the four cannot drift.\n && isResourceReachable(resourceRegistry, billingAccountResourceType);\n\n /**\n * Whether THIS CALLER may read the billing state served for this scope — kept separate from `isEnabled`, on purpose.\n *\n * `isEnabled` says billing is PART OF the application. Every consumer of it — feature availability, operation\n * gating, the launcher — needs that answer for every user alike, so it must not vary with who is looking.\n *\n * Fetching is a different question. `GET_STATE` is role-gated per scope (organization owners and administrators on\n * the organization variant), and a plain member used to request it on every page load, be refused with 403, and\n * see an access-denied message on a page with nothing wrong with it (#1039). That member already ended with a null\n * billing state — the refusal produced it — so not asking changes nothing they can see except the message.\n *\n * The required roles are read from the registry's OWN operation, never copied, and decided by the same\n * hierarchy-aware check the action bar uses. That check fails open on a role it cannot resolve, so a custom role\n * inheriting an administrator role is not locked out here — the server stays the authority either way. With no\n * registry, or no such operation in it, there is no evidence to withhold on, and the request goes out as before.\n */\n const permissions = userOrgs.permissions;\n const currentOrganizationId = appScope?.currentOrganizationId ?? null;\n const mayReadBillingState = useMemo((): boolean => {\n if (!isEnabled || !billingAccountResourceType) return false;\n const getStateOperation = resourceRegistry?.registry.resourceConfigurations[billingAccountResourceType]\n ?.operations.find((operation) =>\n String(operation.operationIdentifier) === BillingAccount_Operations.GET_STATE && operation.isOperationDefault === true);\n if (!getStateOperation) return true;\n return userRolesSatisfyRequiredRoles({\n requiredRoles: getStateOperation.roles,\n userAppRoles: permissions?.appLevel ?? [],\n userOrgRoles: currentOrganizationId ? permissions?.organizations?.[currentOrganizationId] ?? [] : [],\n });\n }, [isEnabled, billingAccountResourceType, resourceRegistry, permissions, currentOrganizationId]);\n\n // ── State ──\n const [billingState, setBillingState] = useState<BillingStateResponse | null>(null);\n const [isLoading, setIsLoading] = useState<boolean>(mayReadBillingState && !!scopeEntityId);\n const [error, setError] = useState<Error | null>(null);\n\n // L-2.b: mirror local loading state onto the LoadingContext event bus so\n // unrelated components can observe billing-state lifecycle via\n // `useComponentLoading({ customIdentifier: ContextLoadingIdentifier.BILLING_STATE })`\n // or `<LoadingGate scopes={[buildContextLoadingScope(BILLING_STATE)]}>`.\n // Local `isLoading` is still exposed for direct consumers (back-compat).\n useEmitLoadingScope({\n identifier: ContextLoadingIdentifier.BILLING_STATE,\n isLoading,\n hasLoadedOnce: billingState !== null,\n });\n\n // ── Refs for stable callbacks ──\n const fetchInFlightRef = useRef<boolean>(false);\n const mountedRef = useRef<boolean>(true);\n const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const checkoutInFlightRef = useRef<boolean>(false);\n\n // ── WebSocket ──\n const { on } = useWebSocket();\n\n // ── Resolve redirect base URL ──\n const resolvedRedirectBase = useMemo(\n () => typeof window !== 'undefined' ? window.location.origin : '',\n [],\n );\n\n // ── billingAccountId from response ──\n const billingAccountId = billingState?.billingAccount?._id ?? null;\n\n // ── Clear stale state on scope change ──\n useEffect(() => {\n setBillingState(null);\n setError(null);\n setIsLoading(mayReadBillingState && !!scopeEntityId);\n }, [scopeType, scopeEntityId, mayReadBillingState]);\n\n // ── Fetch billing state from backend ──\n const fetchBillingState = useCallback(async () => {\n if (!mayReadBillingState || !scopeType || !scopeEntityId) return;\n if (fetchInFlightRef.current) return;\n fetchInFlightRef.current = true;\n\n try {\n logDebug('Fetching billing state', { scopeType, scopeEntityId });\n const httpClient = getManualCallsHttpClient();\n\n const urlBuilder = SCOPE_TO_GET_STATE_URL[scopeType];\n if (!urlBuilder) return;\n const url = urlBuilder(scopeEntityId);\n const response = await httpClient.get<BillingStateResponse>(url);\n\n if (mountedRef.current) {\n setBillingState(response);\n setError(null);\n\n logDebug('Billing state fetched', {\n hasAccount: !!response.billingAccount,\n hasSubscription: !!response.subscription,\n productCount: response.products?.length ?? 0,\n priceCount: response.prices?.length ?? 0,\n billingAccountId: response.billingAccount?._id,\n });\n }\n } catch (err: unknown) {\n if (mountedRef.current) {\n const message = err instanceof Error ? err.message : 'Failed to fetch billing state';\n setBillingState(null);\n setError(err instanceof Error ? err : new Error(message));\n logDebug('Failed to fetch billing state', { error: message });\n }\n } finally {\n if (mountedRef.current) {\n setIsLoading(false);\n }\n fetchInFlightRef.current = false;\n }\n }, [mayReadBillingState, scopeType, scopeEntityId]);\n\n // ── Initial fetch ──\n useEffect(() => {\n mountedRef.current = true;\n if (mayReadBillingState && scopeType && scopeEntityId) {\n fetchBillingState();\n } else {\n setIsLoading(false);\n }\n return () => {\n mountedRef.current = false;\n };\n }, [fetchBillingState, mayReadBillingState, scopeType, scopeEntityId]);\n\n // ── WebSocket invalidation (debounced) ──\n useEffect(() => {\n if (!mayReadBillingState) return;\n\n const unsubscribers: Array<() => void> = [];\n\n const debouncedRefetch = () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current);\n }\n debounceTimerRef.current = setTimeout(() => {\n debounceTimerRef.current = null;\n fetchBillingState();\n }, 300);\n };\n\n for (const event of INVALIDATION_EVENTS) {\n const unsub = on<WS_BillingEventPayload>(event, (payload) => {\n if (!scopeType || !scopeEntityId) {\n logDebug('Ignoring billing invalidation without active scope', { event, payload });\n return;\n }\n\n if (payload.scopeType !== scopeType || payload.scopeEntityId !== scopeEntityId) {\n logDebug('Ignoring billing invalidation for another scope', {\n event,\n payload,\n currentScopeType: scopeType,\n currentScopeEntityId: scopeEntityId,\n });\n return;\n }\n\n if (billingAccountId && payload.billingAccountId !== billingAccountId) {\n logDebug('Ignoring billing invalidation for another billing account', {\n event,\n payload,\n currentBillingAccountId: billingAccountId,\n });\n return;\n }\n\n logDebug('WebSocket invalidation event received, scheduling refetch', { event, payload });\n debouncedRefetch();\n });\n unsubscribers.push(unsub);\n }\n\n return () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current);\n }\n for (const unsub of unsubscribers) {\n unsub();\n }\n };\n }, [on, fetchBillingState, mayReadBillingState, scopeType, scopeEntityId, billingAccountId]);\n\n // ── Derived state ──\n const availability = billingState?.availability ?? null;\n const isSliceAvailable = useCallback((slice: BillingStateSlice) => availability?.[slice] === BillingSliceAvailability.AVAILABLE, [availability]);\n\n const billingAccount = billingState?.billingAccount ?? null;\n const subscription = billingState?.subscription ?? null;\n const products = billingState?.products ?? [];\n const prices = billingState?.prices ?? [];\n const invoices = billingState?.invoices ?? [];\n const usage = billingState?.usage ?? EMPTY_USAGE;\n const creditPools = billingState?.creditPools ?? {};\n const activePromotions = billingState?.activePromotions ?? [];\n const acquirableProductKeys = billingState?.acquirableProductKeys;\n const currentScope = scopeType ?? null;\n\n // ── Product catalog lookups ──\n const productsByKey = useMemo(() => {\n const map = new Map<string, Product>();\n for (const p of products) {\n map.set(p.key, p);\n }\n return map;\n }, [products]);\n\n const pricesByProductId = useMemo(() => {\n const map = new Map<string, Price[]>();\n for (const price of prices) {\n const existing = map.get(price.productId) ?? [];\n existing.push(price);\n map.set(price.productId, existing);\n }\n return map;\n }, [prices]);\n\n const getPricesForProduct = useCallback(\n (productId: string): Price[] => pricesByProductId.get(productId) ?? [],\n [pricesByProductId],\n );\n\n const getProductByKey = useCallback(\n (key: string): Product | undefined => productsByKey.get(key),\n [productsByKey],\n );\n\n const acquirableProductKeySet = useMemo(() => new Set(acquirableProductKeys ?? []), [acquirableProductKeys]);\n const isProductAcquirable = useCallback((key: string): boolean => acquirableProductKeySet.has(key), [acquirableProductKeySet]);\n\n // ── Current plan derivation ──\n const { currentPlanKey, currentPlanProduct } = useMemo(() => {\n if (!subscription || !subscription.items?.length) {\n return { currentPlanKey: null, currentPlanProduct: null };\n }\n for (const item of subscription.items) {\n const product = products.find(p => p._id === item.productId);\n if (product && product.type === 'plan') {\n return { currentPlanKey: product.key, currentPlanProduct: product };\n }\n }\n return { currentPlanKey: null, currentPlanProduct: null };\n }, [subscription, products]);\n\n const productDefinitions = useMemo<ProductDefinition[]>(\n () => injectedProductDefinitions ?? [],\n [injectedProductDefinitions],\n );\n\n // ── Actions ──\n const openCheckout = useCallback(\n async (productKey: string, priceId: string, options?: {\n quantity?: number;\n promotionCode?: string;\n }): Promise<void> => {\n if (!billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId) {\n throw new Error('No billing account available. Cannot open checkout.');\n }\n const checkoutUrl = SCOPE_TO_OPEN_CHECKOUT_URL[scopeType]?.(scopeEntityId, billingAccountId);\n if (!checkoutUrl) {\n throw new Error(`No OPEN_CHECKOUT URL builder for scope ${scopeType}.`);\n }\n if (checkoutInFlightRef.current) {\n logDebug('Checkout already in progress, ignoring duplicate request');\n return;\n }\n\n checkoutInFlightRef.current = true;\n try {\n logDebug('Opening checkout session', { productKey, priceId, ...options });\n const httpClient = getManualCallsHttpClient();\n\n // OPEN_CHECKOUT borrows UPDATE → keyed PUT on the scoped account route.\n const response = await httpClient.put<CheckoutSessionResponse>(\n checkoutUrl,\n {\n productKey,\n priceId,\n successUrl: `${resolvedRedirectBase}/billing/success?session_id={CHECKOUT_SESSION_ID}`,\n cancelUrl: `${resolvedRedirectBase}/billing/cancel`,\n quantity: options?.quantity,\n promotionCode: options?.promotionCode,\n },\n );\n\n if (response.url) {\n window.location.href = response.url;\n }\n } finally {\n checkoutInFlightRef.current = false;\n }\n },\n [billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, resolvedRedirectBase],\n );\n\n const openCustomerPortal = useCallback(async (): Promise<void> => {\n if (!billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId) {\n throw new Error('No billing account available. Cannot open customer portal.');\n }\n const portalUrlBase = SCOPE_TO_OPEN_PORTAL_URL[scopeType]?.(scopeEntityId, billingAccountId);\n if (!portalUrlBase) {\n throw new Error(`No OPEN_PORTAL URL builder for scope ${scopeType}.`);\n }\n\n logDebug('Opening customer portal session');\n const httpClient = getManualCallsHttpClient();\n\n // OPEN_PORTAL borrows READ → keyed GET on the scoped account route; the\n // returnUrl travels as a query param since GET carries no request body.\n const returnUrl = encodeURIComponent(`${resolvedRedirectBase}/billing`);\n const response = await httpClient.get<PortalSessionResponse>(\n `${portalUrlBase}?returnUrl=${returnUrl}`,\n );\n\n if (response.url) {\n window.location.href = response.url;\n }\n }, [billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, resolvedRedirectBase]);\n\n // ── Context value (memoized for stable reference) ──\n // Use the registry's compiled operation paths and parameter vocabulary. Subscription routes have\n // account and scope parents; hand-authored URLs would silently diverge between org and user variants.\n const callPlanOperation = useCallback(async <TResponse,>(\n operationIdentifier: BillingSubscription_Operations,\n payload: BillingPlanChangeTarget | BillingPlanChangeConfirmation | Record<string, never>,\n signal?: AbortSignal,\n ): Promise<TResponse> => {\n if (!resourceRegistry || !subscription?._id || !billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId\n || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.SUBSCRIPTION, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES].every(isSliceAvailable)) {\n throw new Error('Billing plan change context is unavailable.');\n }\n const subscriptionType = scopeType === ResourcePrimaryScope.ORGANIZATIONS ? CoreResourceType.ORGANIZATION_SUBSCRIPTIONS : CoreResourceType.USER_SUBSCRIPTIONS;\n const config = resourceRegistry.registry.resourceConfigurations[subscriptionType];\n const operation = config?.operations.find(candidate => candidate.operationIdentifier === operationIdentifier\n && candidate.variantType === ResourceOperationVariantType.API_CALL && candidate.isOperationDefault);\n if (!operation || operation.variantType !== ResourceOperationVariantType.API_CALL) throw new Error('Billing plan change operation is unavailable.');\n const fields = resourceRegistry.registry.allResourceFieldIdentifiers;\n const scopeResourceType = scopeType === ResourcePrimaryScope.ORGANIZATIONS ? CoreResourceType.ORGANIZATIONS : CoreResourceType.USERS;\n const accountField = fields[billingAccountResourceType];\n const scopeField = fields[scopeResourceType];\n if (!config.resourceFieldIdentifier || !accountField || !scopeField) throw new Error('Billing plan change route context is unavailable.');\n return resourceRegistry.doOperation<TResponse>(ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation), {\n contextualParameters: { [config.resourceFieldIdentifier]: subscription._id, [accountField]: billingAccountId, [scopeField]: scopeEntityId },\n ...(operation.httpVerb === HttpMethod.GET ? { queryParameters: payload } : { requestData: payload }),\n }, { signal, silent: true });\n }, [resourceRegistry, subscription?._id, billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, isSliceAvailable]);\n\n const previewPlanChange = useCallback(async (target: BillingPlanChangeTarget, options?: { signal?: AbortSignal }): Promise<BillingPlanChangePreviewResponse> => {\n const parsed = BillingSubscription_PreviewPlanChangeRequestDto.parse(target);\n const response = await callPlanOperation<BillingPlanChangePreviewResponse>(BillingSubscription_Operations.PREVIEW_PLAN_CHANGE, parsed, options?.signal);\n return BillingSubscription_PlanChangePreviewResponseDto.parse(response);\n }, [callPlanOperation]);\n\n const confirmPlanChange = useCallback(async (confirmation: BillingPlanChangeConfirmation): Promise<void> => {\n const parsed = BillingSubscription_ChangePlanRequestDto.parse(confirmation);\n await callPlanOperation(BillingSubscription_Operations.CHANGE_PLAN, parsed);\n await fetchBillingState();\n }, [callPlanOperation, fetchBillingState]);\n\n const cancelPendingPlanChange = useCallback(async (): Promise<void> => {\n await callPlanOperation(BillingSubscription_Operations.CANCEL_PLAN_CHANGE, {});\n await fetchBillingState();\n }, [callPlanOperation, fetchBillingState]);\n\n const contextValue: BillingContextType = useMemo(\n () => ({\n isEnabled,\n billingConfiguration: billingConfig,\n billingProviderRef,\n billingAccount,\n subscription,\n currentPlanKey,\n currentPlanProduct,\n currentScope,\n products,\n prices,\n invoices,\n productDefinitions,\n getPricesForProduct,\n getProductByKey,\n isProductAcquirable,\n activePromotions,\n usage,\n creditPools,\n openCheckout,\n openCustomerPortal,\n previewPlanChange,\n confirmPlanChange,\n cancelPendingPlanChange,\n isLoading,\n availability,\n isSliceAvailable,\n error,\n refetch: fetchBillingState,\n }),\n [\n isEnabled,\n billingConfig,\n billingProviderRef,\n billingAccount,\n subscription,\n currentPlanKey,\n currentPlanProduct,\n currentScope,\n products,\n prices,\n invoices,\n productDefinitions,\n getPricesForProduct,\n getProductByKey,\n isProductAcquirable,\n activePromotions,\n usage,\n creditPools,\n openCheckout,\n openCustomerPortal,\n previewPlanChange,\n confirmPlanChange,\n cancelPendingPlanChange,\n isLoading,\n availability,\n isSliceAvailable,\n error,\n fetchBillingState,\n ],\n );\n\n return (\n <BillingContext.Provider value={contextValue}>\n {children}\n </BillingContext.Provider>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BillingContext.js","sourceRoot":"","sources":["../../../../../src/core/billing/BillingContext.tsx"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAc,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAehG,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,+CAA+C,EAC/C,wCAAwC,EACxC,gDAAgD,EAChD,4BAA4B,EAC5B,kCAAkC,EAClC,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,2DAA2D,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAA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,MAAM,iBAAiB,CAAC,8BAA8B,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;QAC/E,MAAM,iBAAiB,EAAE,CAAC;IAC5B,CAAC,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAE3C,MAAM,YAAY,GAAuB,OAAO,CAC9C,GAAG,EAAE,CAAC,CAAC;QACL,SAAS;QACT,oBAAoB,EAAE,aAAa;QACnC,kBAAkB;QAClB,cAAc;QACd,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,kBAAkB;QAClB,mBAAmB;QACnB,eAAe;QACf,mBAAmB;QACnB,gBAAgB;QAChB,KAAK;QACL,WAAW;QACX,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,KAAK;QACL,OAAO,EAAE,iBAAiB;KAC3B,CAAC,EACF;QACE,SAAS;QACT,aAAa;QACb,kBAAkB;QAClB,cAAc;QACd,YAAY;QACZ,cAAc;QACd,kBAAkB;QAClB,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,kBAAkB;QAClB,mBAAmB;QACnB,eAAe;QACf,mBAAmB;QACnB,gBAAgB;QAChB,KAAK;QACL,WAAW;QACX,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,SAAS;QACT,YAAY;QACZ,gBAAgB;QAChB,KAAK;QACL,iBAAiB;KAClB,CACF,CAAC;IAEF,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACzC,QAAQ,GACe,CAC3B,CAAC;AACJ,CAAC","sourcesContent":["import type { z } from 'zod';\n/**\n * BillingContext\n *\n * Central context for billing operations on the frontend.\n *\n * Responsibilities:\n * - Self-resolves scope (org/user) from AppScope + user context — no external props needed\n * - Fetches billing state via the GET_STATE resource operation on the billing account\n * - The backend auto-creates the billing account if one doesn't exist\n * - Provides actions: openCheckout, openCustomerPortal (via resource operations)\n * - Caches billing state and invalidates on WebSocket events\n * - Exposes convenience accessors for current plan, subscription status, etc.\n *\n * DELEGATION PRINCIPLE: The frontend does NOT build payment UI.\n * - Stripe Checkout (hosted page): for new subscriptions and upgrades\n * - Stripe Customer Portal (hosted page): for invoices, payment methods, cancellation\n */\n\nimport { useApplicationRoleTables } from '~wildo-frontend-lib/core/security/useApplicationRoleTables';\nimport React, { createContext, useEffect, useState, useCallback, useMemo, useRef } from 'react';\nimport type {\n BillingAccount,\n BillingSubscriptionBase,\n Product,\n Price,\n Promotion,\n InvoiceRef,\n UsageSummary,\n BillingConfiguration,\n ProductDefinition,\n BillingStateResponse,\n BillingStateAvailability,\n WS_BillingEventPayload,\n} from '@wildo-ai/saas-models';\nimport {\n BillingAccount_Operations,\n BillingSubscription_Operations,\n BillingSubscription_PreviewPlanChangeRequestDto,\n BillingSubscription_ChangePlanRequestDto,\n BillingSubscription_PlanChangePreviewResponseDto,\n ResourceOperationVariantType,\n ResourcesConfig_OperationPathUtils,\n HttpMethod,\n BillingStateSlice,\n BillingSliceAvailability,\n CoreWebSocketEvent,\n CoreResourceType,\n ResourcePrimaryScope,\n MAIN_API_BASE_PATH,\n userRolesSatisfyRequiredRoles,\n} from '@wildo-ai/saas-models';\nimport { useWebSocket } from '~wildo-frontend-lib/core/requests/websockets/useWebSocket';\nimport { useUserOrgs } from '~wildo-frontend-lib/core/security/useUserOrgs';\nimport { useAppScopeSafe } from '~wildo-frontend-lib/core/scope/useAppScope';\nimport { useApplication } from '~wildo-frontend-lib/core/runtime/useApplication';\nimport { isResourceReachable, useResourceRegistrySafe } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { getManualCallsHttpClient } from '~wildo-frontend-lib/core/requests/wildo-http-client-manual-calls.frontend.service';\nimport { useEmitLoadingScope } from '~wildo-frontend-lib/core/loading/useEmitLoadingScope';\nimport { ContextLoadingIdentifier } from '~wildo-frontend-lib/core/loading/loading-types.frontend.schemas';\n\n// ================================\n// Logger\n// ================================\n\nconst billingLogger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = billingLogger.debugByType('BillingContext');\nbillingLogger.setDebugTypeLogging('BillingContext', false);\n\n// ================================\n// Constants\n// ================================\n\nconst API_PREFIX = MAIN_API_BASE_PATH;\n\n/** WebSocket events that trigger a refetch of billing state */\nconst INVALIDATION_EVENTS = [\n CoreWebSocketEvent.BILLING_STATUS_CHANGED,\n CoreWebSocketEvent.BILLING_SUBSCRIPTION_UPDATED,\n CoreWebSocketEvent.BILLING_ACCOUNT_CHANGED,\n CoreWebSocketEvent.BILLING_USAGE_UPDATED,\n CoreWebSocketEvent.BILLING_CREDIT_POOL_UPDATED,\n CoreWebSocketEvent.BILLING_FEATURES_UPDATED,\n] as const;\n\n/** Maps ResourcePrimaryScope → billing account variant resource type (for resource operations) */\nconst SCOPE_TO_BILLING_ACCOUNT_RESOURCE: Record<string, string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: CoreResourceType.ORGANIZATION_BILLING_ACCOUNTS,\n [ResourcePrimaryScope.USER_SELF]: CoreResourceType.USER_BILLING_ACCOUNTS,\n};\n\n// The billing-account GET_STATE / OPEN_CHECKOUT / OPEN_PORTAL custom operations\n// borrow COUNT / UPDATE / READ core semantics (see\n// `billing-account.shared.resources-config.schemas.ts`), so their canonical\n// routes follow the framework's scoped resource-operation shape:\n// GET_STATE (COUNT-like) → GET /<scope>/{id}/<res>/get-state/count\n// OPEN_CHECKOUT (UPDATE-like) → PUT /<scope>/{id}/<res>/{accountId}/open-checkout\n// OPEN_PORTAL (READ-like) → GET /<scope>/{id}/<res>/{accountId}/open-portal\n// Built here to mirror the routes the backend registers from the same\n// resources-config; the prior `/operations/open_checkout` POST 404'd.\n\n/** Maps ResourcePrimaryScope → GET_STATE URL builder (COUNT-like → trailing `/count`) */\nconst SCOPE_TO_GET_STATE_URL: Record<string, (scopeEntityId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/get-state/count`,\n [ResourcePrimaryScope.USER_SELF]: (id) => `${API_PREFIX}/users/${id}/user-billing-accounts/get-state/count`,\n};\n\n/** Maps ResourcePrimaryScope → OPEN_CHECKOUT URL builder (UPDATE-like → keyed PUT) */\nconst SCOPE_TO_OPEN_CHECKOUT_URL: Record<string, (scopeEntityId: string, billingAccountId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id, acc) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/${acc}/open-checkout`,\n [ResourcePrimaryScope.USER_SELF]: (id, acc) => `${API_PREFIX}/users/${id}/user-billing-accounts/${acc}/open-checkout`,\n};\n\n/** Maps ResourcePrimaryScope → OPEN_PORTAL URL builder (READ-like → keyed GET) */\nconst SCOPE_TO_OPEN_PORTAL_URL: Record<string, (scopeEntityId: string, billingAccountId: string) => string> = {\n [ResourcePrimaryScope.ORGANIZATIONS]: (id, acc) => `${API_PREFIX}/organizations/${id}/organization-billing-accounts/${acc}/open-portal`,\n [ResourcePrimaryScope.USER_SELF]: (id, acc) => `${API_PREFIX}/users/${id}/user-billing-accounts/${acc}/open-portal`,\n};\n\n// ================================\n// API Response Types\n// ================================\n\n/** Response from PUT /<scope>/{id}/<billing-accounts>/{accountId}/open-checkout (OPEN_CHECKOUT) */\ninterface CheckoutSessionResponse {\n url: string;\n sessionId: string;\n}\n\n/** Response from GET /<scope>/{id}/<billing-accounts>/{accountId}/open-portal (OPEN_PORTAL) */\ninterface PortalSessionResponse {\n url: string;\n}\n\n// ================================\n// Context Type\n// ================================\n\n/**\n * @wildo_source:part:start saas.frontend.billing-context facet:layer:frontend facet:audience:app-developer\n *\n * Everything an application's own frontend reads or does about billing. Reached with `useBilling()`,\n * which throws outside a `BillingProvider`; `useBillingSafe()` returns `undefined` instead, for a\n * component that may render before the provider mounts or in an application where billing is off.\n *\n * The shipped billing components and the feature-gating hooks read this same context, so an\n * application composing its own purchase flow works from exactly what they do — no application code\n * builds the request.\n *\n * ## Starting a purchase\n *\n * `openCheckout(productKey, priceId, options)` posts to the scoped billing-account route and follows\n * the returned URL; success and cancel destinations come from the application's own redirect base. A\n * SECOND call while one is in flight is IGNORED, so a double-click cannot open two sessions — do not\n * add your own guard expecting otherwise, and do not read the silence as a failure.\n *\n * The `priceId` must belong to the product named by `productKey`; the checkout operation refuses a\n * mismatched pair. Resolve it through `getPricesForProduct` rather than assuming an ordering.\n *\n * `openCustomerPortal()` opens the provider's own portal — which is where payment methods, card\n * updates and receipt downloads live. Those are deliberately NOT rendered by the framework, so an\n * application that needs them links the portal rather than building them.\n *\n * ## What `usage` contains\n *\n * Metered consumption appears here only if the application RECORDS it. Nothing is automatic: a\n * metered product with no recorded usage shows an empty dashboard rather than an error.\n *\n * ## Invoices are capped\n *\n * `invoices` carries the fifty most recent, which is what the shipped history component renders. An\n * application needing more reads the invoices resource directly.\n */\nexport type BillingPlanChangeTarget = z.infer<typeof BillingSubscription_PreviewPlanChangeRequestDto>;\nexport type BillingPlanChangeConfirmation = z.infer<typeof BillingSubscription_ChangePlanRequestDto>;\nexport type BillingPlanChangePreviewResponse = z.infer<typeof BillingSubscription_PlanChangePreviewResponseDto>;\n\nexport interface BillingContextType {\n // ── Configuration ──\n isEnabled: boolean;\n billingConfiguration: BillingConfiguration | undefined;\n /**\n * The configured billing provider's REF (`billing.providerRef`), or null when billing is off or\n * names none. Surfaces show the vendor's name from it (`providers.<ref>.displayName`, #1895).\n *\n * It used to be a frontend provider MODULE, resolved from the registry by ref or by the `BILLING`\n * capability. The only such module was Stripe's, which loaded no Stripe code — checkout and the\n * customer portal are hosted redirects — and existed only to carry that name (#1701). The ref is the\n * fact the application configured; a module was a second place that had to agree with it.\n */\n billingProviderRef: string | null;\n\n // ── Billing State ──\n billingAccount: BillingAccount | null;\n subscription: BillingSubscriptionBase | null;\n currentPlanKey: string | null;\n currentPlanProduct: Product | null;\n\n // ── Product Catalog ──\n products: Product[];\n prices: Price[];\n productDefinitions: ProductDefinition[];\n getPricesForProduct: (productId: string) => Price[];\n getProductByKey: (key: string) => Product | undefined;\n /**\n * May this product be bought, or moved onto, right now? Answered from the billing state's\n * `acquirableProductKeys` — the set the backend derives with the SAME predicate its checkout,\n * plan-change and add-on doors enforce — so a surface never re-derives it from `isActive` and can\n * never offer a plan the backend refuses (a retired one, or an announced-but-upcoming one, #1835).\n * Fails closed: a state that did not carry the set answers `false`, because an unknown answer must\n * not offer a checkout.\n */\n isProductAcquirable: (key: string) => boolean;\n\n // ── Scope ──\n currentScope: ResourcePrimaryScope | null;\n\n // ── Invoices ──\n invoices: InvoiceRef[];\n\n // ── Promotions ──\n activePromotions: Promotion[];\n\n // ── Usage & Credits ──\n usage: UsageSummary;\n creditPools: Record<string, { available: number; totalPurchased: number; totalGranted: number; totalConsumed: number }>;\n\n // ── Actions ──\n openCheckout: (productKey: string, priceId: string, options?: {\n quantity?: number;\n promotionCode?: string;\n }) => Promise<void>;\n\n openCustomerPortal: () => Promise<void>;\n /** Provider estimate bound to the current subscription and selected target; never commits a change. */\n previewPlanChange: (target: BillingPlanChangeTarget, options?: { signal?: AbortSignal }) => Promise<BillingPlanChangePreviewResponse>;\n /** Confirm only the server token returned for the displayed preview. Successful mutation refreshes billing state. */\n confirmPlanChange: (confirmation: BillingPlanChangeConfirmation) => Promise<void>;\n /**\n * Withdraw the plan change pending at the end of the period (`subscription.pendingPlanChange`, #1868), so the subscription renews\n * on its current plan. Successful withdrawal refreshes billing state.\n */\n cancelPendingPlanChange: () => Promise<void>;\n\n // ── State ──\n isLoading: boolean;\n error: Error | null;\n /** Only a successful slice read establishes emptiness; failed or absent state is unavailable. */\n availability: BillingStateAvailability | null;\n isSliceAvailable: (slice: BillingStateSlice) => boolean;\n\n // ── Actions ──\n refetch: () => void;\n}\n\n// ── Default empty state ──\nconst EMPTY_USAGE: UsageSummary = {\n byProduct: {},\n};\n\n/** @wildo_source:part:end saas.frontend.billing-context */\n\nexport const BillingContext: React.Context<BillingContextType | undefined> = createContext<BillingContextType | undefined>(undefined);\n\n// ================================\n// Provider\n// ================================\n\nexport interface BillingProviderProps {\n children: React.ReactNode;\n productDefinitions?: ProductDefinition[];\n}\n\nexport function BillingProvider({ children, productDefinitions: injectedProductDefinitions }: BillingProviderProps): React.ReactElement {\n // ── Self-resolve configuration from hooks ──\n const userOrgs = useUserOrgs();\n const appScope = useAppScopeSafe();\n const { appConfig } = useApplication();\n const resourceRegistry = useResourceRegistrySafe();\n const billingConfig = appConfig.billing;\n /** What the application CONFIGURED — see `isEnabled` below for why that is only half the answer. */\n const isConfiguredEnabled = billingConfig?.enabled ?? false;\n const billingProviderRef = isConfiguredEnabled ? billingConfig?.providerRef ?? null : null;\n\n // ── Self-resolve scope ──\n const enabledScopes = billingConfig?.enabledScopes ?? [ResourcePrimaryScope.ORGANIZATIONS];\n\n const { scopeType, scopeEntityId } = useMemo(() => {\n if (enabledScopes.includes(ResourcePrimaryScope.ORGANIZATIONS) && appScope?.currentOrganizationId) {\n return { scopeType: ResourcePrimaryScope.ORGANIZATIONS as ResourcePrimaryScope, scopeEntityId: appScope.currentOrganizationId };\n }\n if (enabledScopes.includes(ResourcePrimaryScope.USER_SELF) && userOrgs.user?._id) {\n return { scopeType: ResourcePrimaryScope.USER_SELF as ResourcePrimaryScope, scopeEntityId: userOrgs.user._id };\n }\n return { scopeType: null as ResourcePrimaryScope | null, scopeEntityId: null as string | null };\n }, [enabledScopes, appScope?.currentOrganizationId, userOrgs.user?._id]);\n\n // ── Derive variant resource type for operations ──\n const billingAccountResourceType = scopeType ? SCOPE_TO_BILLING_ACCOUNT_RESOURCE[scopeType] : null;\n\n /**\n * Enabled means CONFIGURED **and** REACHABLE — the config flag alone was not enough.\n *\n * Every request this provider makes is an operation on a billing-account resource, so a consumer\n * whose registry does not carry that resource cannot serve one no matter what the config says.\n * That is not hypothetical: the application-creation workbench excludes the whole tenant\n * vocabulary from its registry (it observes an application's creation and is not that\n * application's admin console) while rendering the OBSERVED application's config, which has\n * billing enabled — so it fired `organization-billing-accounts/get-state/count` at its own origin\n * on every page load, where the companion serves no billing routes, and answered 404 every time\n * (issue #268, reproduced live).\n *\n * Reading the registry rather than adding a second opt-out keeps the two halves from disagreeing:\n * a consumer that excludes the resource has already said billing is not part of its surface, and\n * saying it twice is how the two copies drift. A tenant application carries the resource and is\n * unaffected.\n */\n const isEnabled = isConfiguredEnabled\n && billingAccountResourceType !== null\n // The absent-registry-is-ignorance rule lives on the seam (`isResourceReachable`), shared with the\n // features, guidance and analytics providers since #1069 so the four cannot drift.\n && isResourceReachable(resourceRegistry, billingAccountResourceType);\n\n /**\n * Whether THIS CALLER may read the billing state served for this scope — kept separate from `isEnabled`, on purpose.\n *\n * `isEnabled` says billing is PART OF the application. Every consumer of it — feature availability, operation\n * gating, the launcher — needs that answer for every user alike, so it must not vary with who is looking.\n *\n * Fetching is a different question. `GET_STATE` is role-gated per scope (organization owners and administrators on\n * the organization variant), and a plain member used to request it on every page load, be refused with 403, and\n * see an access-denied message on a page with nothing wrong with it (#1039). That member already ended with a null\n * billing state — the refusal produced it — so not asking changes nothing they can see except the message.\n *\n * The required roles are read from the registry's OWN operation, never copied, and decided by the same\n * hierarchy-aware check the action bar uses. That check fails open on a role it cannot resolve, so a custom role\n * inheriting an administrator role is not locked out here — the server stays the authority either way. With no\n * registry, or no such operation in it, there is no evidence to withhold on, and the request goes out as before.\n */\n const permissions = userOrgs.permissions;\n const currentOrganizationId = appScope?.currentOrganizationId ?? null;\n const roleTables = useApplicationRoleTables();\n const mayReadBillingState = useMemo((): boolean => {\n if (!isEnabled || !billingAccountResourceType) return false;\n const getStateOperation = resourceRegistry?.registry.resourceConfigurations[billingAccountResourceType]\n ?.operations.find((operation) =>\n String(operation.operationIdentifier) === BillingAccount_Operations.GET_STATE && operation.isOperationDefault === true);\n if (!getStateOperation) return true;\n return userRolesSatisfyRequiredRoles({\n requiredRoles: getStateOperation.roles,\n userAppRoles: permissions?.appLevel ?? [],\n userOrgRoles: currentOrganizationId ? permissions?.organizations?.[currentOrganizationId] ?? [] : [],\n appRolesConfig: roleTables.appRolesConfig,\n orgRolesConfig: roleTables.orgRolesConfig,\n unresolvableRoles: roleTables.unresolvableRoles,\n });\n }, [isEnabled, billingAccountResourceType, resourceRegistry, permissions, currentOrganizationId, roleTables]);\n\n // ── State ──\n const [billingState, setBillingState] = useState<BillingStateResponse | null>(null);\n const [isLoading, setIsLoading] = useState<boolean>(mayReadBillingState && !!scopeEntityId);\n const [error, setError] = useState<Error | null>(null);\n\n // L-2.b: mirror local loading state onto the LoadingContext event bus so\n // unrelated components can observe billing-state lifecycle via\n // `useComponentLoading({ customIdentifier: ContextLoadingIdentifier.BILLING_STATE })`\n // or `<LoadingGate scopes={[buildContextLoadingScope(BILLING_STATE)]}>`.\n // Local `isLoading` is still exposed for direct consumers (back-compat).\n useEmitLoadingScope({\n identifier: ContextLoadingIdentifier.BILLING_STATE,\n isLoading,\n hasLoadedOnce: billingState !== null,\n });\n\n // ── Refs for stable callbacks ──\n const fetchInFlightRef = useRef<boolean>(false);\n const mountedRef = useRef<boolean>(true);\n const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const checkoutInFlightRef = useRef<boolean>(false);\n\n // ── WebSocket ──\n const { on } = useWebSocket();\n\n // ── Resolve redirect base URL ──\n const resolvedRedirectBase = useMemo(\n () => typeof window !== 'undefined' ? window.location.origin : '',\n [],\n );\n\n // ── billingAccountId from response ──\n const billingAccountId = billingState?.billingAccount?._id ?? null;\n\n // ── Clear stale state on scope change ──\n useEffect(() => {\n setBillingState(null);\n setError(null);\n setIsLoading(mayReadBillingState && !!scopeEntityId);\n }, [scopeType, scopeEntityId, mayReadBillingState]);\n\n // ── Fetch billing state from backend ──\n const fetchBillingState = useCallback(async () => {\n if (!mayReadBillingState || !scopeType || !scopeEntityId) return;\n if (fetchInFlightRef.current) return;\n fetchInFlightRef.current = true;\n\n try {\n logDebug('Fetching billing state', { scopeType, scopeEntityId });\n const httpClient = getManualCallsHttpClient();\n\n const urlBuilder = SCOPE_TO_GET_STATE_URL[scopeType];\n if (!urlBuilder) return;\n const url = urlBuilder(scopeEntityId);\n const response = await httpClient.get<BillingStateResponse>(url);\n\n if (mountedRef.current) {\n setBillingState(response);\n setError(null);\n\n logDebug('Billing state fetched', {\n hasAccount: !!response.billingAccount,\n hasSubscription: !!response.subscription,\n productCount: response.products?.length ?? 0,\n priceCount: response.prices?.length ?? 0,\n billingAccountId: response.billingAccount?._id,\n });\n }\n } catch (err: unknown) {\n if (mountedRef.current) {\n const message = err instanceof Error ? err.message : 'Failed to fetch billing state';\n setBillingState(null);\n setError(err instanceof Error ? err : new Error(message));\n logDebug('Failed to fetch billing state', { error: message });\n }\n } finally {\n if (mountedRef.current) {\n setIsLoading(false);\n }\n fetchInFlightRef.current = false;\n }\n }, [mayReadBillingState, scopeType, scopeEntityId]);\n\n // ── Initial fetch ──\n useEffect(() => {\n mountedRef.current = true;\n if (mayReadBillingState && scopeType && scopeEntityId) {\n fetchBillingState();\n } else {\n setIsLoading(false);\n }\n return () => {\n mountedRef.current = false;\n };\n }, [fetchBillingState, mayReadBillingState, scopeType, scopeEntityId]);\n\n // ── WebSocket invalidation (debounced) ──\n useEffect(() => {\n if (!mayReadBillingState) return;\n\n const unsubscribers: Array<() => void> = [];\n\n const debouncedRefetch = () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current);\n }\n debounceTimerRef.current = setTimeout(() => {\n debounceTimerRef.current = null;\n fetchBillingState();\n }, 300);\n };\n\n for (const event of INVALIDATION_EVENTS) {\n const unsub = on<WS_BillingEventPayload>(event, (payload) => {\n if (!scopeType || !scopeEntityId) {\n logDebug('Ignoring billing invalidation without active scope', { event, payload });\n return;\n }\n\n if (payload.scopeType !== scopeType || payload.scopeEntityId !== scopeEntityId) {\n logDebug('Ignoring billing invalidation for another scope', {\n event,\n payload,\n currentScopeType: scopeType,\n currentScopeEntityId: scopeEntityId,\n });\n return;\n }\n\n if (billingAccountId && payload.billingAccountId !== billingAccountId) {\n logDebug('Ignoring billing invalidation for another billing account', {\n event,\n payload,\n currentBillingAccountId: billingAccountId,\n });\n return;\n }\n\n logDebug('WebSocket invalidation event received, scheduling refetch', { event, payload });\n debouncedRefetch();\n });\n unsubscribers.push(unsub);\n }\n\n return () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current);\n }\n for (const unsub of unsubscribers) {\n unsub();\n }\n };\n }, [on, fetchBillingState, mayReadBillingState, scopeType, scopeEntityId, billingAccountId]);\n\n // ── Derived state ──\n const availability = billingState?.availability ?? null;\n const isSliceAvailable = useCallback((slice: BillingStateSlice) => availability?.[slice] === BillingSliceAvailability.AVAILABLE, [availability]);\n\n const billingAccount = billingState?.billingAccount ?? null;\n const subscription = billingState?.subscription ?? null;\n const products = billingState?.products ?? [];\n const prices = billingState?.prices ?? [];\n const invoices = billingState?.invoices ?? [];\n const usage = billingState?.usage ?? EMPTY_USAGE;\n const creditPools = billingState?.creditPools ?? {};\n const activePromotions = billingState?.activePromotions ?? [];\n const acquirableProductKeys = billingState?.acquirableProductKeys;\n const currentScope = scopeType ?? null;\n\n // ── Product catalog lookups ──\n const productsByKey = useMemo(() => {\n const map = new Map<string, Product>();\n for (const p of products) {\n map.set(p.key, p);\n }\n return map;\n }, [products]);\n\n const pricesByProductId = useMemo(() => {\n const map = new Map<string, Price[]>();\n for (const price of prices) {\n const existing = map.get(price.productId) ?? [];\n existing.push(price);\n map.set(price.productId, existing);\n }\n return map;\n }, [prices]);\n\n const getPricesForProduct = useCallback(\n (productId: string): Price[] => pricesByProductId.get(productId) ?? [],\n [pricesByProductId],\n );\n\n const getProductByKey = useCallback(\n (key: string): Product | undefined => productsByKey.get(key),\n [productsByKey],\n );\n\n const acquirableProductKeySet = useMemo(() => new Set(acquirableProductKeys ?? []), [acquirableProductKeys]);\n const isProductAcquirable = useCallback((key: string): boolean => acquirableProductKeySet.has(key), [acquirableProductKeySet]);\n\n // ── Current plan derivation ──\n const { currentPlanKey, currentPlanProduct } = useMemo(() => {\n if (!subscription || !subscription.items?.length) {\n return { currentPlanKey: null, currentPlanProduct: null };\n }\n for (const item of subscription.items) {\n const product = products.find(p => p._id === item.productId);\n if (product && product.type === 'plan') {\n return { currentPlanKey: product.key, currentPlanProduct: product };\n }\n }\n return { currentPlanKey: null, currentPlanProduct: null };\n }, [subscription, products]);\n\n const productDefinitions = useMemo<ProductDefinition[]>(\n () => injectedProductDefinitions ?? [],\n [injectedProductDefinitions],\n );\n\n // ── Actions ──\n const openCheckout = useCallback(\n async (productKey: string, priceId: string, options?: {\n quantity?: number;\n promotionCode?: string;\n }): Promise<void> => {\n if (!billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId) {\n throw new Error('No billing account available. Cannot open checkout.');\n }\n const checkoutUrl = SCOPE_TO_OPEN_CHECKOUT_URL[scopeType]?.(scopeEntityId, billingAccountId);\n if (!checkoutUrl) {\n throw new Error(`No OPEN_CHECKOUT URL builder for scope ${scopeType}.`);\n }\n if (checkoutInFlightRef.current) {\n logDebug('Checkout already in progress, ignoring duplicate request');\n return;\n }\n\n checkoutInFlightRef.current = true;\n try {\n logDebug('Opening checkout session', { productKey, priceId, ...options });\n const httpClient = getManualCallsHttpClient();\n\n // OPEN_CHECKOUT borrows UPDATE → keyed PUT on the scoped account route.\n const response = await httpClient.put<CheckoutSessionResponse>(\n checkoutUrl,\n {\n productKey,\n priceId,\n successUrl: `${resolvedRedirectBase}/billing/success?session_id={CHECKOUT_SESSION_ID}`,\n cancelUrl: `${resolvedRedirectBase}/billing/cancel`,\n quantity: options?.quantity,\n promotionCode: options?.promotionCode,\n },\n );\n\n if (response.url) {\n window.location.href = response.url;\n }\n } finally {\n checkoutInFlightRef.current = false;\n }\n },\n [billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, resolvedRedirectBase],\n );\n\n const openCustomerPortal = useCallback(async (): Promise<void> => {\n if (!billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId) {\n throw new Error('No billing account available. Cannot open customer portal.');\n }\n const portalUrlBase = SCOPE_TO_OPEN_PORTAL_URL[scopeType]?.(scopeEntityId, billingAccountId);\n if (!portalUrlBase) {\n throw new Error(`No OPEN_PORTAL URL builder for scope ${scopeType}.`);\n }\n\n logDebug('Opening customer portal session');\n const httpClient = getManualCallsHttpClient();\n\n // OPEN_PORTAL borrows READ → keyed GET on the scoped account route; the\n // returnUrl travels as a query param since GET carries no request body.\n const returnUrl = encodeURIComponent(`${resolvedRedirectBase}/billing`);\n const response = await httpClient.get<PortalSessionResponse>(\n `${portalUrlBase}?returnUrl=${returnUrl}`,\n );\n\n if (response.url) {\n window.location.href = response.url;\n }\n }, [billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, resolvedRedirectBase]);\n\n // ── Context value (memoized for stable reference) ──\n // Use the registry's compiled operation paths and parameter vocabulary. Subscription routes have\n // account and scope parents; hand-authored URLs would silently diverge between org and user variants.\n const callPlanOperation = useCallback(async <TResponse,>(\n operationIdentifier: BillingSubscription_Operations,\n payload: BillingPlanChangeTarget | BillingPlanChangeConfirmation | Record<string, never>,\n signal?: AbortSignal,\n ): Promise<TResponse> => {\n if (!resourceRegistry || !subscription?._id || !billingAccountId || !billingAccountResourceType || !scopeType || !scopeEntityId\n || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.SUBSCRIPTION, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES].every(isSliceAvailable)) {\n throw new Error('Billing plan change context is unavailable.');\n }\n const subscriptionType = scopeType === ResourcePrimaryScope.ORGANIZATIONS ? CoreResourceType.ORGANIZATION_SUBSCRIPTIONS : CoreResourceType.USER_SUBSCRIPTIONS;\n const config = resourceRegistry.registry.resourceConfigurations[subscriptionType];\n const operation = config?.operations.find(candidate => candidate.operationIdentifier === operationIdentifier\n && candidate.variantType === ResourceOperationVariantType.API_CALL && candidate.isOperationDefault);\n if (!operation || operation.variantType !== ResourceOperationVariantType.API_CALL) throw new Error('Billing plan change operation is unavailable.');\n const fields = resourceRegistry.registry.allResourceFieldIdentifiers;\n const scopeResourceType = scopeType === ResourcePrimaryScope.ORGANIZATIONS ? CoreResourceType.ORGANIZATIONS : CoreResourceType.USERS;\n const accountField = fields[billingAccountResourceType];\n const scopeField = fields[scopeResourceType];\n if (!config.resourceFieldIdentifier || !accountField || !scopeField) throw new Error('Billing plan change route context is unavailable.');\n return resourceRegistry.doOperation<TResponse>(ResourcesConfig_OperationPathUtils.createOperationPathKeyFromOperation(operation), {\n contextualParameters: { [config.resourceFieldIdentifier]: subscription._id, [accountField]: billingAccountId, [scopeField]: scopeEntityId },\n ...(operation.httpVerb === HttpMethod.GET ? { queryParameters: payload } : { requestData: payload }),\n }, { signal, silent: true });\n }, [resourceRegistry, subscription?._id, billingAccountId, billingAccountResourceType, scopeType, scopeEntityId, isSliceAvailable]);\n\n const previewPlanChange = useCallback(async (target: BillingPlanChangeTarget, options?: { signal?: AbortSignal }): Promise<BillingPlanChangePreviewResponse> => {\n const parsed = BillingSubscription_PreviewPlanChangeRequestDto.parse(target);\n const response = await callPlanOperation<BillingPlanChangePreviewResponse>(BillingSubscription_Operations.PREVIEW_PLAN_CHANGE, parsed, options?.signal);\n return BillingSubscription_PlanChangePreviewResponseDto.parse(response);\n }, [callPlanOperation]);\n\n const confirmPlanChange = useCallback(async (confirmation: BillingPlanChangeConfirmation): Promise<void> => {\n const parsed = BillingSubscription_ChangePlanRequestDto.parse(confirmation);\n await callPlanOperation(BillingSubscription_Operations.CHANGE_PLAN, parsed);\n await fetchBillingState();\n }, [callPlanOperation, fetchBillingState]);\n\n const cancelPendingPlanChange = useCallback(async (): Promise<void> => {\n await callPlanOperation(BillingSubscription_Operations.CANCEL_PLAN_CHANGE, {});\n await fetchBillingState();\n }, [callPlanOperation, fetchBillingState]);\n\n const contextValue: BillingContextType = useMemo(\n () => ({\n isEnabled,\n billingConfiguration: billingConfig,\n billingProviderRef,\n billingAccount,\n subscription,\n currentPlanKey,\n currentPlanProduct,\n currentScope,\n products,\n prices,\n invoices,\n productDefinitions,\n getPricesForProduct,\n getProductByKey,\n isProductAcquirable,\n activePromotions,\n usage,\n creditPools,\n openCheckout,\n openCustomerPortal,\n previewPlanChange,\n confirmPlanChange,\n cancelPendingPlanChange,\n isLoading,\n availability,\n isSliceAvailable,\n error,\n refetch: fetchBillingState,\n }),\n [\n isEnabled,\n billingConfig,\n billingProviderRef,\n billingAccount,\n subscription,\n currentPlanKey,\n currentPlanProduct,\n currentScope,\n products,\n prices,\n invoices,\n productDefinitions,\n getPricesForProduct,\n getProductByKey,\n isProductAcquirable,\n activePromotions,\n usage,\n creditPools,\n openCheckout,\n openCustomerPortal,\n previewPlanChange,\n confirmPlanChange,\n cancelPendingPlanChange,\n isLoading,\n availability,\n isSliceAvailable,\n error,\n fetchBillingState,\n ],\n );\n\n return (\n <BillingContext.Provider value={contextValue}>\n {children}\n </BillingContext.Provider>\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationBrandingPublisher.d.ts","sourceRoot":"","sources":["../../../../../src/core/branding/OrganizationBrandingPublisher.tsx"],"names":[],"mappings":"AAyCA,wBAAgB,6BAA6B,IAAI,IAAI,CAyDpD"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publishes the CURRENT organization's branding while it is in effect (#2306), for the surfaces mounted above the
|
|
3
|
+
* organization and feature contexts (`UIProvider` applies the colour and carries the logo to `useBrandIdentity`).
|
|
4
|
+
*
|
|
5
|
+
* In effect means the organization holds `CoreFeature.CUSTOM_BRANDING` as the backend resolved it for THAT
|
|
6
|
+
* organization: the answer is read only once the features response is for the current organization and has loaded, so
|
|
7
|
+
* a switch never shows one organization's brand under another's entitlement, and a lapsed plan never flashes a brand
|
|
8
|
+
* while loading (the availability hook is optimistic while loading, which is why it is not used here). Without the
|
|
9
|
+
* entitlement, or without an organization, it publishes nulls and the application's own brand shows. The backend
|
|
10
|
+
* makes the same decision for the surfaces it serves (`isOrganizationBrandingInEffect`), so a tenant's sign-in card and
|
|
11
|
+
* its application agree.
|
|
12
|
+
*
|
|
13
|
+
* The branding is the organization profile's, read through its own READ (any member may read it). A read that fails
|
|
14
|
+
* publishes nulls: presentation falls back to the application, never to an error.
|
|
15
|
+
*
|
|
16
|
+
* It is read again after any write to the organization profile in this tab (`RESOURCE_OPERATION_EXECUTED` on
|
|
17
|
+
* `organizationProfiles`, not read-shaped), so an administrator who changes the colour sees it applied without a
|
|
18
|
+
* reload. A change made in another session is seen on the next organization switch or reload: the shell's ordinary
|
|
19
|
+
* staleness for a configuration-like value. When the publisher unmounts it publishes nulls, so nothing above it keeps
|
|
20
|
+
* showing a brand nothing maintains any more.
|
|
21
|
+
*/
|
|
22
|
+
import { useEffect, useState } from 'react';
|
|
23
|
+
import { CoreFeature, CoreResourceType, MAIN_API_BASE_PATH, OrganizationBrandingAsset, ResourcesConfig_OperationPathUtils, buildOrganizationBrandingAssetRoutePath, isReadShapedOperation, organizationBrandingFile, } from '@wildo-ai/saas-models';
|
|
24
|
+
import { useApplication } from '../../core/runtime/useApplication.js';
|
|
25
|
+
import { useEventBus } from '../../core/events/useEventBus.js';
|
|
26
|
+
import { FrontendEvents } from '../../core/events/events.frontend.schemas.js';
|
|
27
|
+
import { useFeatures } from '../../core/features/useFeatures.js';
|
|
28
|
+
import { useResourceRegistry } from '../../core/resources/useResourceRegistry.js';
|
|
29
|
+
import { findDefaultApiReadOperation } from '../../core/security/route-organization-access.frontend.utils.js';
|
|
30
|
+
import { useUserOrgs } from '../../core/security/useUserOrgs.js';
|
|
31
|
+
export function OrganizationBrandingPublisher() {
|
|
32
|
+
const { currentOrganizationId } = useUserOrgs();
|
|
33
|
+
const { isLoading, isFeatureEnabled, resolvedForOrganizationId } = useFeatures();
|
|
34
|
+
const { doOperation, registry } = useResourceRegistry();
|
|
35
|
+
const { emit, on } = useEventBus();
|
|
36
|
+
const { httpClient } = useApplication();
|
|
37
|
+
/** Advanced by every write to the organization profile, so the branding is read again. */
|
|
38
|
+
const [profileRevision, setProfileRevision] = useState(0);
|
|
39
|
+
const organizationId = currentOrganizationId ?? null;
|
|
40
|
+
const entitled = organizationId !== null
|
|
41
|
+
&& !isLoading
|
|
42
|
+
&& resolvedForOrganizationId === organizationId
|
|
43
|
+
&& isFeatureEnabled(CoreFeature.CUSTOM_BRANDING);
|
|
44
|
+
useEffect(() => on(FrontendEvents.RESOURCE_OPERATION_EXECUTED, () => setProfileRevision((revision) => revision + 1), (payload) => payload.resourceType === CoreResourceType.ORGANIZATION_PROFILES
|
|
45
|
+
&& !isReadShapedOperation(payload.operation ?? { operationIdentifier: payload.operationIdentifier })), [on]);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
let cancelled = false;
|
|
48
|
+
const publish = (branding) => {
|
|
49
|
+
if (cancelled)
|
|
50
|
+
return;
|
|
51
|
+
// The uploaded logo's public address on the API (#2979); `useBrandIdentity` shows it through an object URL.
|
|
52
|
+
const logo = organizationId !== null ? organizationBrandingFile(branding?.logo) : undefined;
|
|
53
|
+
const logoUrl = logo && organizationId !== null
|
|
54
|
+
? `${httpClient.getBaseURL().replace(/\/+$/, '')}${MAIN_API_BASE_PATH}${buildOrganizationBrandingAssetRoutePath(organizationId, OrganizationBrandingAsset.LOGO, logo.updatedAt)}`
|
|
55
|
+
: null;
|
|
56
|
+
emit(FrontendEvents.ORGANIZATION_BRANDING_CHANGED, {
|
|
57
|
+
organizationId,
|
|
58
|
+
primaryColor: branding?.primaryColor ?? null,
|
|
59
|
+
secondaryColor: branding?.secondaryColor ?? null,
|
|
60
|
+
logoUrl,
|
|
61
|
+
productName: branding?.productName ?? null,
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
const readOperation = findDefaultApiReadOperation(registry.resourceConfigurations[CoreResourceType.ORGANIZATION_PROFILES]);
|
|
65
|
+
if (!entitled || organizationId === null || !readOperation) {
|
|
66
|
+
publish(null);
|
|
67
|
+
return () => { cancelled = true; };
|
|
68
|
+
}
|
|
69
|
+
doOperation(ResourcesConfig_OperationPathUtils.buildOperationPathKeyFromOperation(readOperation), { contextualParameters: { organizationId } })
|
|
70
|
+
.then((profile) => publish(profile?.branding))
|
|
71
|
+
.catch(() => publish(null));
|
|
72
|
+
return () => { cancelled = true; };
|
|
73
|
+
}, [organizationId, entitled, doOperation, registry, emit, profileRevision, httpClient]);
|
|
74
|
+
// Unmounted: nothing maintains the brand any more, so the application's shows.
|
|
75
|
+
useEffect(() => () => emit(FrontendEvents.ORGANIZATION_BRANDING_CHANGED, { organizationId: null, primaryColor: null, secondaryColor: null, logoUrl: null, productName: null }), [emit]);
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=OrganizationBrandingPublisher.js.map
|