@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +114 -26
- package/LICENSE.enterprise +129 -0
- package/dist/esm/companion-exports.d.ts +5 -2
- package/dist/esm/companion-exports.d.ts.map +1 -1
- package/dist/esm/companion-exports.js +4 -2
- package/dist/esm/companion-exports.js.map +1 -1
- package/dist/esm/components/actions/action-bar.d.ts +16 -1
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +6 -14
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_DecisionInbox.js +2 -4
- package/dist/esm/components/app/AppLayout_DecisionInbox.js.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_Home.js +14 -7
- package/dist/esm/components/app/AppLayout_Home.js.map +1 -1
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts +13 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.d.ts.map +1 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js +16 -0
- package/dist/esm/components/app/AppLayout_IdentityPortalContainer.js.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts +10 -0
- package/dist/esm/components/app/DecisionInboxSection.d.ts.map +1 -0
- package/dist/esm/components/app/DecisionInboxSection.js +15 -0
- package/dist/esm/components/app/DecisionInboxSection.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts +13 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js +28 -0
- package/dist/esm/components/app/IdentityPortalLayout_AuthenticatedRoute.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts +10 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js +40 -0
- package/dist/esm/components/app/IdentityPortalPage_Home.js.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts +16 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.d.ts.map +1 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js +41 -0
- package/dist/esm/components/app/IdentityPortalPage_SettingsDestination.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts +15 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js +268 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js +35 -0
- package/dist/esm/components/auth/Auth_DecisionEmailAnswer.labels.js.map +1 -0
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +5 -0
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts +19 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js +156 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts +3 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.d.ts.map +1 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js +107 -0
- package/dist/esm/components/auth/Auth_OAuthDeviceVerification.labels.js.map +1 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +31 -10
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +81 -17
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +19 -0
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_DecisionEmailAnswer.js.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts +11 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.d.ts.map +1 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js +25 -0
- package/dist/esm/components/auth/pages/AuthPage_OAuthDeviceVerification.js.map +1 -0
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +40 -7
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +9 -1
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +3 -2
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
- package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/AutomaticDisplayer.js +7 -2
- package/dist/esm/components/data-display/AutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +67 -45
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +4 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +16 -6
- package/dist/esm/components/data-display/DisplayValueDispatcher.js.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js +3 -1
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
- package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
- package/dist/esm/components/data-display/approval-seal.js +10 -4
- package/dist/esm/components/data-display/approval-seal.js.map +1 -1
- package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
- package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
- package/dist/esm/components/data-display/signature-requests.js +123 -0
- package/dist/esm/components/data-display/signature-requests.js.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts +16 -0
- package/dist/esm/components/feedback/empty-state-marker.d.ts.map +1 -0
- package/dist/esm/components/feedback/empty-state-marker.js +16 -0
- package/dist/esm/components/feedback/empty-state-marker.js.map +1 -0
- package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.js +2 -1
- package/dist/esm/components/feedback/empty-state.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts +7 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js +8 -2
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +2 -1
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +25 -1
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +22 -24
- package/dist/esm/components/flows-actors/approval.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.labels.js +30 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js +4 -1
- package/dist/esm/components/flows-actors/flow-node.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/flow-step-visuals.js +8 -2
- package/dist/esm/components/flows-actors/flow-step-visuals.js.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/human-decision-form.js +4 -1
- package/dist/esm/components/flows-actors/human-decision-form.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -0
- package/dist/esm/components/form/Form.d.ts.map +1 -1
- package/dist/esm/components/form/Form.js +1 -0
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +7 -4
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutosaveContext.js +8 -0
- package/dist/esm/components/form/automated/AutosaveContext.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +5 -3
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +38 -13
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +75 -47
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.d.ts +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js +1 -1
- package/dist/esm/components/form/fields/form-field-file-provider-constraints.frontend.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.d.ts +5 -7
- package/dist/esm/components/form/validation-errors/form-validation.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/form-validation.js +7 -22
- package/dist/esm/components/form/validation-errors/form-validation.js.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts +25 -2
- package/dist/esm/components/form/validation-errors/getFieldError.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/getFieldError.js +29 -2
- package/dist/esm/components/form/validation-errors/getFieldError.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +5 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js +3 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts +9 -0
- package/dist/esm/components/form/validation-errors/save-attempt.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js +42 -0
- package/dist/esm/components/form/validation-errors/save-attempt.js.map +1 -0
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js +3 -1
- package/dist/esm/components/form/validation-errors/unstarted-field-visit.js.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts +2 -2
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js +3 -0
- package/dist/esm/components/form/validation-errors/validate-fields-and-show-errors.js.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
- package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
- package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
- package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +40 -4
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
- package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
- package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
- package/dist/esm/components/navigation/command.d.ts +5 -0
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts +19 -0
- package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js +51 -12
- package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +21 -7
- package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +17 -7
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
- package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +12 -8
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js +11 -4
- package/dist/esm/components/resources/ResourceOwnedViewEmbeds.js.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
- package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
- package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
- package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +5 -5
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +21 -14
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/DisplayLayout.js +40 -4
- package/dist/esm/components/resources/skeleton/DisplayLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +22 -6
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Group.js +4 -1
- package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.d.ts +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js +1 -1
- package/dist/esm/components/resources/skeleton/ResourceHeaderTitle.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +21 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +53 -9
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts +1 -3
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
- package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts +15 -0
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +14 -4
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
- package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
- package/dist/esm/components/typography/document-heading-level.js +63 -0
- package/dist/esm/components/typography/document-heading-level.js.map +1 -0
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts +3 -2
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js +4 -3
- package/dist/esm/components/views/chart-dashboard/ChartDashboard.js.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.d.ts.map +1 -1
- package/dist/esm/components/views/chart-dashboard/useChartDashboardLayout.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts +33 -0
- package/dist/esm/components/views/chart-view/ChartKpiFigure.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js +63 -4
- package/dist/esm/components/views/chart-view/ChartKpiFigure.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.js +52 -22
- package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.labels.js +76 -3
- package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js +2 -1
- package/dist/esm/components/views/chart-view/ChartView.lazy.js.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/ChartWidget.js +12 -4
- package/dist/esm/components/views/chart-view/ChartWidget.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts +8 -0
- package/dist/esm/components/views/chart-view/chart-export.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-export.utils.js +15 -25
- package/dist/esm/components/views/chart-view/chart-export.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js +6 -0
- package/dist/esm/components/views/chart-view/chart-view-defaults.js.map +1 -0
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +47 -12
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +87 -32
- package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +8 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/composed.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +8 -2
- package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
- package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +9 -8
- package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +10 -11
- package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +7 -3
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js +13 -13
- package/dist/esm/components/views/chart-view/option-builder/echarts-option-builder.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.d.ts +6 -0
- package/dist/esm/components/views/composite-view/CompositeView.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeView.js +6 -2
- package/dist/esm/components/views/composite-view/CompositeView.js.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts +7 -0
- package/dist/esm/components/views/execution-view/ExecutionView.d.ts.map +1 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js +11 -1
- package/dist/esm/components/views/execution-view/ExecutionView.js.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts +7 -0
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.d.ts.map +1 -1
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js +6 -2
- package/dist/esm/components/views/flows-actors-view/FlowsActorsView.js.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts +7 -0
- package/dist/esm/components/views/full-custom-view/FullCustomView.d.ts.map +1 -1
- package/dist/esm/components/views/full-custom-view/FullCustomView.js +8 -3
- package/dist/esm/components/views/full-custom-view/FullCustomView.js.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts +7 -0
- package/dist/esm/components/views/onboarding-view/OnboardingView.d.ts.map +1 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js +11 -1
- package/dist/esm/components/views/onboarding-view/OnboardingView.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +2 -2
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.d.ts +4 -4
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js +3 -3
- package/dist/esm/core/app-shell/shell-motion/shell-motion-vocabulary.js.map +1 -1
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts +45 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.d.ts.map +1 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js +72 -0
- package/dist/esm/core/app-shell/useIdentityPortalShellLayout.js.map +1 -0
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js +4 -3
- package/dist/esm/core/automated-layout/automated-layout.frontend.schemas.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -8
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +22 -21
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +27 -4
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +61 -2
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/useBillingAction.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingAction.js +3 -2
- package/dist/esm/core/billing/useBillingAction.js.map +1 -1
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts +19 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.d.ts.map +1 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js +23 -0
- package/dist/esm/core/components-registry/RegisteredComponentRoot.js.map +1 -0
- package/dist/esm/core/components-registry/register-framework-layouts.d.ts.map +1 -1
- package/dist/esm/core/components-registry/register-framework-layouts.js +4 -0
- package/dist/esm/core/components-registry/register-framework-layouts.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +159 -0
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +68 -3
- package/dist/esm/core/config/app-configuration-frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +2 -2
- package/dist/esm/core/config/app-level-components.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts +59 -18
- package/dist/esm/core/config/chart-view.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/chart-view.frontend.schemas.js +42 -7
- package/dist/esm/core/config/chart-view.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts +8 -1
- package/dist/esm/core/config/composite-view.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/composite-view.schemas.js +1 -0
- package/dist/esm/core/config/composite-view.schemas.js.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js +1 -1
- package/dist/esm/core/config/decision-inbox-capability.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.d.ts +6 -0
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +12 -0
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/execution-view.schemas.d.ts +1 -1
- package/dist/esm/core/config/execution-view.schemas.js.map +1 -1
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts +17 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.d.ts.map +1 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js +64 -0
- package/dist/esm/core/config/identity-portal-settings.frontend.js.map +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -8
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js +1 -1
- package/dist/esm/core/config/settings-hub-gating.frontend.utils.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +17 -6
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useSettingsHubConfig.js +1 -0
- package/dist/esm/core/config/useSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts +7 -0
- package/dist/esm/core/config/useVisibleSettingsHubConfig.d.ts.map +1 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js +9 -1
- package/dist/esm/core/config/useVisibleSettingsHubConfig.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts +7 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +31 -0
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +10 -0
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.d.ts.map +1 -1
- package/dist/esm/core/errors/backend-refusal.frontend.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +19 -2
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts +21 -2
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js +25 -4
- package/dist/esm/core/events/notification-display-policy.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecution.d.ts +3 -3
- package/dist/esm/core/execution/useExecution.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -1
- package/dist/esm/core/features/FeatureGate.d.ts +13 -1
- package/dist/esm/core/features/FeatureGate.d.ts.map +1 -1
- package/dist/esm/core/features/FeatureGate.js +6 -1
- package/dist/esm/core/features/FeatureGate.js.map +1 -1
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts +28 -0
- package/dist/esm/core/features/InPlaceFeatureLock.d.ts.map +1 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js +49 -0
- package/dist/esm/core/features/InPlaceFeatureLock.js.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts +12 -0
- package/dist/esm/core/features/PlanRefusalPrompt.d.ts.map +1 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js +90 -0
- package/dist/esm/core/features/PlanRefusalPrompt.js.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts +39 -0
- package/dist/esm/core/features/RequiredFeaturesGate.d.ts.map +1 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js +51 -0
- package/dist/esm/core/features/RequiredFeaturesGate.js.map +1 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts +6 -0
- package/dist/esm/core/features/feature-unavailability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js +27 -10
- package/dist/esm/core/features/feature-unavailability.frontend.utils.js.map +1 -1
- package/dist/esm/core/features/plan-refusal.frontend.d.ts +43 -0
- package/dist/esm/core/features/plan-refusal.frontend.d.ts.map +1 -0
- package/dist/esm/core/features/plan-refusal.frontend.js +67 -0
- package/dist/esm/core/features/plan-refusal.frontend.js.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts +21 -0
- package/dist/esm/core/features/required-features-gate-presentation.d.ts.map +1 -0
- package/dist/esm/core/features/required-features-gate-presentation.js +26 -0
- package/dist/esm/core/features/required-features-gate-presentation.js.map +1 -0
- package/dist/esm/core/features/useFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useFeatureAvailability.js +4 -0
- package/dist/esm/core/features/useFeatureAvailability.js.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts +2 -0
- package/dist/esm/core/features/useOperationFeatureAvailability.d.ts.map +1 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js +6 -1
- package/dist/esm/core/features/useOperationFeatureAvailability.js.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +11 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +117 -3
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.d.ts.map +1 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js +3 -1
- package/dist/esm/core/guidance/renderers/GuidanceAnnouncement.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +28 -9
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.d.ts → core/navigation/chart-read-gate.d.ts} +11 -7
- package/dist/esm/core/navigation/chart-read-gate.d.ts.map +1 -0
- package/dist/esm/{components/views/chart-dashboard/chart-dashboard.utils.js → core/navigation/chart-read-gate.js} +27 -11
- package/dist/esm/core/navigation/chart-read-gate.js.map +1 -0
- package/dist/esm/core/navigation/home-resolution.d.ts +36 -0
- package/dist/esm/core/navigation/home-resolution.d.ts.map +1 -0
- package/dist/esm/core/navigation/home-resolution.js +46 -0
- package/dist/esm/core/navigation/home-resolution.js.map +1 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -34
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +13 -18
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-runtime-availability.js +7 -2
- package/dist/esm/core/navigation/launcher-runtime-availability.js.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.d.ts +2 -2
- package/dist/esm/core/navigation/primary-destination-layout.d.ts.map +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js +1 -1
- package/dist/esm/core/navigation/primary-destination-layout.js.map +1 -1
- package/dist/esm/core/navigation/useChartReadDecision.d.ts +26 -0
- package/dist/esm/core/navigation/useChartReadDecision.d.ts.map +1 -0
- package/dist/esm/core/navigation/useChartReadDecision.js +58 -0
- package/dist/esm/core/navigation/useChartReadDecision.js.map +1 -0
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationConfigurationPresence.js.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.d.ts.map +1 -1
- package/dist/esm/core/navigation/useCurrentOrganizationHoldsUnrevokedScimToken.js.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.d.ts +21 -0
- package/dist/esm/core/navigation/view-title-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/view-title-resolution.js +25 -0
- package/dist/esm/core/navigation/view-title-resolution.js.map +1 -1
- package/dist/esm/core/navigation/viewer-field-reader.d.ts +81 -0
- package/dist/esm/core/navigation/viewer-field-reader.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-field-reader.js +113 -0
- package/dist/esm/core/navigation/viewer-field-reader.js.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts +40 -0
- package/dist/esm/core/navigation/viewer-roles.d.ts.map +1 -0
- package/dist/esm/core/navigation/viewer-roles.js +26 -0
- package/dist/esm/core/navigation/viewer-roles.js.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts +32 -0
- package/dist/esm/core/requests/user-interaction-clock.d.ts.map +1 -0
- package/dist/esm/core/requests/user-interaction-clock.js +47 -0
- package/dist/esm/core/requests/user-interaction-clock.js.map +1 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +2 -0
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +66 -10
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +63 -8
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js +13 -0
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
- package/dist/esm/core/resources/hooks/useOperationEnabled.js +45 -3
- package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-addressability.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +2 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +29 -23
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +20 -20
- package/dist/esm/core/resources/resources.frontend.schemas.js.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js +4 -0
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +7 -7
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +11 -33
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +15 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +41 -23
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts +20 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.d.ts.map +1 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js +31 -0
- package/dist/esm/core/runtime/IdentityPortalRouter.js.map +1 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +9 -0
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +3 -2
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts +21 -0
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.d.ts.map +1 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js +19 -1
- package/dist/esm/core/runtime/frontend-companion-resource-inputs.js.map +1 -1
- package/dist/esm/core/runtime/identity-routes.d.ts +13 -0
- package/dist/esm/core/runtime/identity-routes.d.ts.map +1 -0
- package/dist/esm/core/runtime/identity-routes.js +50 -0
- package/dist/esm/core/runtime/identity-routes.js.map +1 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts +19 -0
- package/dist/esm/core/runtime/routes.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js +20 -1
- package/dist/esm/core/runtime/routes.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts +3 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/runtime.frontend.schemas.js +2 -0
- package/dist/esm/core/runtime/runtime.frontend.schemas.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +7 -0
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +4 -2
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/search/command-score.d.ts +33 -0
- package/dist/esm/core/search/command-score.d.ts.map +1 -0
- package/dist/esm/core/search/command-score.js +109 -0
- package/dist/esm/core/search/command-score.js.map +1 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +4 -0
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts +3 -2
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +7 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts +13 -2
- package/dist/esm/core/security/federated-reauthentication.frontend.d.ts.map +1 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js +21 -1
- package/dist/esm/core/security/federated-reauthentication.frontend.js.map +1 -1
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts +24 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.d.ts.map +1 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js +37 -0
- package/dist/esm/core/security/useAuthenticatedRouteEntry.js.map +1 -0
- package/dist/esm/core/ui/design-token.utils.d.ts +9 -0
- package/dist/esm/core/ui/design-token.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/design-token.utils.js +24 -3
- package/dist/esm/core/ui/design-token.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.d.ts +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js +1 -1
- package/dist/esm/core/ui/themes/focus-indicator.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/index.d.ts +19 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +22 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/mock-builders.d.ts +1 -1
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +1 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -6
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.d.ts.map +0 -1
- package/dist/esm/components/views/chart-dashboard/chart-dashboard.utils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppPage_SecuritySettings.labels.js","sourceRoot":"","sources":["../../../../../src/components/auth/admin-config/AppPage_SecuritySettings.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,4EAA4E;AAC5E,8EAA8E;AAC9E,4DAA4D;AAE5D,MAAM,CAAC,MAAM,gCAAgC,GAA0B;IACrE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,uDAAuD,EAAE;IAC/G,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAC9G,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gEAAgE,EAAE;IAC1H,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAC9G,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAC9G,EAAE,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,6DAA6D,E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,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,6EAA6E,EAAE;IAChJ,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,4EAA4E,EAAE;IAClJ,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,6EAA6E,EAAE;IACxJ,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,2DAA2D,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;CACzI,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,6BAA6B,EAAE,gCAAgC,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + per-key\n// purpose / kind / variable meaning. Statically scanned by the dev companion;\n// NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsSecuritySettingsLabels: LabellingUnitaryDef[] = [\n { ref: 'pageTitle', kind: LabelKind.HEADING, purpose: 'Page heading for the account security-settings screen' },\n { ref: 'sectionPasskeys', kind: LabelKind.HEADING, purpose: 'Section title for the passkeys management card' },\n { ref: 'sectionTotp', kind: LabelKind.HEADING, purpose: 'Section title for the authenticator-app (TOTP) management card' },\n { ref: 'sectionPhone', kind: LabelKind.HEADING, purpose: 'Section title for the phone / SMS management card' },\n { ref: 'sectionPassword', kind: LabelKind.HEADING, purpose: 'Section title for the password management card' },\n { ref: 'sectionIdentityLinks', kind: LabelKind.HEADING, purpose: 'Section title for the linked social-identity providers card' },\n { ref: 'passkeyAdd', kind: LabelKind.BUTTON, purpose: 'Button that registers a new passkey' },\n { ref: 'passkeyUnsupported', kind: LabelKind.MESSAGE, purpose: 'Notice shown when the device or browser does not support passkeys' },\n { ref: 'passkeyRemove', kind: LabelKind.BUTTON, purpose: 'Button that removes an individual passkey' },\n { ref: 'totpSetup', kind: LabelKind.BUTTON, purpose: 'Button that starts authenticator-app setup' },\n { ref: 'totpDisable', kind: LabelKind.BUTTON, purpose: 'Button that disables the authenticator app' },\n { ref: 'totpOnlyMfaWarning', kind: LabelKind.MESSAGE, purpose: 'Warning that the authenticator app is the only enrolled second factor' },\n { ref: 'phoneChange', kind: LabelKind.BUTTON, purpose: 'Button that changes the verified phone number' },\n { ref: 'passwordChange', kind: LabelKind.BUTTON, purpose: 'Submit button that changes the existing password' },\n { ref: 'passwordSet', kind: LabelKind.BUTTON, purpose: 'Submit button that sets a password for an account that has none' },\n { ref: 'passwordCurrent', kind: LabelKind.LABEL, purpose: 'Field label for the current-password input' },\n { ref: 'passwordNew', kind: LabelKind.LABEL, purpose: 'Field label for the new-password input' },\n { ref: 'passwordConfirm', kind: LabelKind.LABEL, purpose: 'Field label for the confirm-new-password input' },\n { ref: 'identityLinksUnlink', kind: LabelKind.BUTTON, purpose: 'Button that unlinks a connected social identity' },\n // Sessions (#2317).\n { ref: 'sectionSessions', kind: LabelKind.HEADING, purpose: 'Title of the row about the sessions the account is signed in with, on every device and browser' },\n { ref: 'signOutEverywhere', kind: LabelKind.BUTTON, purpose: 'Button that signs the account out of every session on every device, including the one in use; also the confirm button of its dialog' },\n { ref: 'signOutEverywhereDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the sessions title: signing out everywhere ends every session of the account on every device and browser, this one included' },\n { ref: 'signOutEverywhereConfirmTitle', kind: LabelKind.HEADING, purpose: 'Title of the dialog asking the person to confirm signing out of every session' },\n { ref: 'signOutEverywhereConfirmDescription', kind: LabelKind.DESCRIPTION, purpose: 'Body of that dialog: every device and browser, this one included, will be signed out and will have to sign in again' },\n {\n ref: 'sessionDevice', kind: LabelKind.LABEL, purpose: 'Name of one signed-in session in the list: the browser and the operating system it signed in from, e.g. \"Chrome on macOS\"',\n params: [{ key: 'browser', meaning: 'browser family word, e.g. Chrome' }, { key: 'operatingSystem', meaning: 'operating-system family word, e.g. macOS' }],\n },\n {\n ref: 'sessionDetails', kind: LabelKind.MESSAGE, purpose: 'Second line of a session row: the address it signed in from and when it was last active',\n params: [{ key: 'address', meaning: 'IP address the session signed in from' }, { key: 'lastActive', meaning: 'date and time of its last activity' }],\n },\n {\n ref: 'sessionLastActive', kind: LabelKind.MESSAGE, purpose: 'Second line of a session row whose address is unknown: when it was last active',\n params: [{ key: 'lastActive', meaning: 'date and time of its last activity' }],\n },\n { ref: 'sessionThisDevice', kind: LabelKind.LABEL, purpose: 'Short badge on the session in the list that the person is using right now' },\n { ref: 'sessionSignOut', kind: LabelKind.BUTTON, purpose: 'Button on one session row that signs that session out, on its device' },\n { ref: 'reauthTitle', kind: LabelKind.HEADING, purpose: 'Title of the re-authentication confirmation dialog' },\n { ref: 'reauthDescription', kind: LabelKind.DESCRIPTION, purpose: 'Explains that the person must confirm it is really them before this sensitive change goes through. Must not name a method: they may confirm with a password, a passkey or an authenticator code' },\n { ref: 'reauthPassword', kind: LabelKind.LABEL, purpose: 'Field label for the re-authentication password input' },\n { ref: 'cancel', kind: LabelKind.BUTTON, purpose: 'Button that closes the password change or set-password form without saving' },\n { ref: 'success', kind: LabelKind.MESSAGE, purpose: 'Generic confirmation shown after a successful security change' },\n { ref: 'error', kind: LabelKind.MESSAGE, purpose: 'Generic error shown when a security operation fails' },\n { ref: 'passkeyCancelled', kind: LabelKind.MESSAGE, purpose: 'Notice shown when the user cancels passkey registration' },\n { ref: 'passkeyAdding', kind: LabelKind.MESSAGE, purpose: 'In-progress status while a passkey is being registered' },\n { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading status while the security settings are being fetched' },\n { ref: 'passwordMismatch', kind: LabelKind.MESSAGE, purpose: 'Validation error when the new password and confirmation do not match' },\n { ref: 'reauthPasswordPlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder inside the re-authentication password input' },\n { ref: 'reauthWithPassword', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity by typing the account password' },\n { ref: 'reauthWithPasskey', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity with a registered passkey' },\n { ref: 'reauthWithTotp', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity with a code from an authenticator app' },\n { ref: 'reauthPasskeyPrompt', kind: LabelKind.MESSAGE, purpose: 'Explains that confirming will ask the browser or device to use a registered passkey' },\n { ref: 'reauthTotpCode', kind: LabelKind.LABEL, purpose: 'Field label for the authenticator-app code input in the re-authentication dialog' },\n { ref: 'reauthTotpCodePlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder inside the authenticator-app code input, which takes the current one-time code' },\n { ref: 'reauthNoAcceptedMethod', kind: LabelKind.MESSAGE, purpose: 'Shown in the re-authentication dialog when none of the account\\'s sign-in methods is accepted for this confirmation, because the account\\'s security policy requires a method it has not added yet. Tells the person to add that method (for example a passkey) in their security settings first' },\n { ref: 'reauthGrantingOrganizationDescription', kind: LabelKind.DESCRIPTION, purpose: 'Shown in the re-authentication dialog to a person who has just opened the workspace of an organization they work in on behalf of another organization (for example a service firm\\'s staff opening a client\\'s workspace): that organization asks people working in it on behalf of another organization to confirm with a second factor (an authenticator code or a passkey) before continuing, and this confirmation counts for that organization only. Must not name a specific organization' },\n {\n ref: 'reauthWithProvider',\n kind: LabelKind.BUTTON,\n purpose: 'Choice in the re-authentication dialog: confirm it is you by signing in again at a linked identity provider, such as Google or the company\\'s sign-in',\n params: [{ key: 'provider', meaning: 'display name of the linked identity provider' }],\n },\n {\n ref: 'reauthProviderPrompt',\n kind: LabelKind.MESSAGE,\n purpose: 'Shown in the re-authentication dialog when a linked identity provider is chosen: confirming opens a window at that provider, where the person signs in again',\n params: [{ key: 'provider', meaning: 'display name of the linked identity provider' }],\n },\n { ref: 'reauthProviderPopupBlocked', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when the browser blocked the sign-in window from opening; asks the person to allow pop-ups for this site and try again' },\n { ref: 'reauthProviderTimedOut', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when signing in again at the identity provider was not finished in time (the sign-in window was left open or closed without finishing); they can try again or choose another method' },\n { ref: 'reauthProviderFailed', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when signing in again at the identity provider did not confirm the person; they can try again or choose another method' },\n { ref: 'phoneVerify', kind: LabelKind.BUTTON, purpose: 'Button that starts phone-number verification' },\n\n // Per-factor descriptive copy. The panel presents each authentication factor\n // as a scannable row (icon · name · status badge), so every state owns an\n // explicit status word, and every factor owns a short plain-language\n // description that is shown only while the factor is NOT active — it is the\n // prompt for a decision not yet taken.\n //\n // Removed with the text they rendered, because each restated something else on\n // the same row: the panel sub-heading (`pageDescription`), the status lines\n // under a badge saying the same (`totpEnabled`, `totpNotSetup`,\n // `phoneNotVerified`, `passwordSetStatus`, `passwordNotSetStatus`), the empty\n // sentences under a \"Not configured\" badge (`passkeyEmpty`,\n // `identityLinksEmpty`), the counts above the lists they count (`passkeyCount`,\n // `identityLinksCount`) and the \"Verified:\" in front of the masked phone number\n // (`phoneVerified`). Their `SecuritySettingsLabel` members went with them, as did\n // `accountComplete` / `accountIncomplete`, `passkeyRename` and a `confirm` the\n // re-authentication dialog never read (its confirm button is the critical-confirm's own).\n { ref: 'statusActive', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor the user has configured' },\n { ref: 'statusNotConfigured', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor the user has not configured yet' },\n { ref: 'statusUnavailable', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor unavailable on the current device or browser' },\n { ref: 'passkeysDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of what a passkey is and why it is the strongest sign-in method' },\n { ref: 'totpDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of authenticator-app one-time codes as a second factor' },\n { ref: 'phoneDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of SMS one-time codes to a verified phone number' },\n { ref: 'passwordDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of the account password as a sign-in credential' },\n { ref: 'identityLinksDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of external identity accounts linked for sign-in' },\n { ref: 'passkeyAdded', kind: LabelKind.MESSAGE, purpose: 'Registration date shown under an individual passkey entry', params: ['date'] },\n];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_SECURITY_SETTINGS, AppLayoutsSecuritySettingsLabels);\n"]}
|
|
1
|
+
{"version":3,"file":"AppPage_SecuritySettings.labels.js","sourceRoot":"","sources":["../../../../../src/components/auth/admin-config/AppPage_SecuritySettings.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAA4B,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE1I,4EAA4E;AAC5E,8EAA8E;AAC9E,4DAA4D;AAE5D,MAAM,CAAC,MAAM,gCAAgC,GAA0B;IACrE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,uDAAuD,EAAE;IAC/G,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAC9G,EAAE,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gEAAgE,EAAE;IAC1H,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAC9G,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAC9G,EAAE,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO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B,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,6EAA6E,EAAE;IAChJ,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,4EAA4E,EAAE;IAClJ,EAAE,GAAG,EAAE,0BAA0B,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,6EAA6E,EAAE;IACxJ,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,2DAA2D,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;CACzI,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,6BAA6B,EAAE,gCAAgC,CAAC,CAAC","sourcesContent":["import { FrontendComponentType, LabelKind, type LabellingUnitaryDef, registerComponentLabels } from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + per-key\n// purpose / kind / variable meaning. Statically scanned by the dev companion;\n// NOT imported at runtime, so it never ships in the bundle.\n\nexport const AppLayoutsSecuritySettingsLabels: LabellingUnitaryDef[] = [\n { ref: 'pageTitle', kind: LabelKind.HEADING, purpose: 'Page heading for the account security-settings screen' },\n { ref: 'sectionPasskeys', kind: LabelKind.HEADING, purpose: 'Section title for the passkeys management card' },\n { ref: 'sectionTotp', kind: LabelKind.HEADING, purpose: 'Section title for the authenticator-app (TOTP) management card' },\n { ref: 'sectionPhone', kind: LabelKind.HEADING, purpose: 'Section title for the phone / SMS management card' },\n { ref: 'sectionPassword', kind: LabelKind.HEADING, purpose: 'Section title for the password management card' },\n { ref: 'sectionIdentityLinks', kind: LabelKind.HEADING, purpose: 'Section title for the linked social-identity providers card' },\n { ref: 'passkeyAdd', kind: LabelKind.BUTTON, purpose: 'Button that registers a new passkey' },\n { ref: 'passkeyUnsupported', kind: LabelKind.MESSAGE, purpose: 'Notice shown when the device or browser does not support passkeys' },\n { ref: 'passkeyRemove', kind: LabelKind.BUTTON, purpose: 'Button that removes an individual passkey' },\n { ref: 'totpSetup', kind: LabelKind.BUTTON, purpose: 'Button that starts authenticator-app setup' },\n { ref: 'totpDisable', kind: LabelKind.BUTTON, purpose: 'Button that disables the authenticator app' },\n { ref: 'totpOnlyMfaWarning', kind: LabelKind.MESSAGE, purpose: 'Warning that the authenticator app is the only enrolled second factor' },\n { ref: 'phoneChange', kind: LabelKind.BUTTON, purpose: 'Button that changes the verified phone number' },\n { ref: 'passwordChange', kind: LabelKind.BUTTON, purpose: 'Submit button that changes the existing password' },\n { ref: 'passwordSet', kind: LabelKind.BUTTON, purpose: 'Submit button that sets a password for an account that has none' },\n { ref: 'passwordCurrent', kind: LabelKind.LABEL, purpose: 'Field label for the current-password input' },\n { ref: 'passwordNew', kind: LabelKind.LABEL, purpose: 'Field label for the new-password input' },\n { ref: 'passwordConfirm', kind: LabelKind.LABEL, purpose: 'Field label for the confirm-new-password input' },\n { ref: 'identityLinksUnlink', kind: LabelKind.BUTTON, purpose: 'Button that unlinks a connected social identity' },\n // Sessions (#2317).\n { ref: 'sectionSessions', kind: LabelKind.HEADING, purpose: 'Title of the row about the sessions the account is signed in with, on every device and browser' },\n { ref: 'signOutEverywhere', kind: LabelKind.BUTTON, purpose: 'Button that signs the account out of every session on every device, including the one in use; also the confirm button of its dialog' },\n { ref: 'signOutEverywhereDescription', kind: LabelKind.DESCRIPTION, purpose: 'One sentence under the sessions title: signing out everywhere ends every session of the account on every device and browser, this one included' },\n { ref: 'signOutEverywhereConfirmTitle', kind: LabelKind.HEADING, purpose: 'Title of the dialog asking the person to confirm signing out of every session' },\n { ref: 'signOutEverywhereConfirmDescription', kind: LabelKind.DESCRIPTION, purpose: 'Body of that dialog: every device and browser, this one included, will be signed out and will have to sign in again' },\n {\n ref: 'sessionDevice', kind: LabelKind.LABEL, purpose: 'Name of one signed-in session in the list: the browser and the operating system it signed in from, e.g. \"Chrome on macOS\"',\n params: [{ key: 'browser', meaning: 'browser family word, e.g. Chrome' }, { key: 'operatingSystem', meaning: 'operating-system family word, e.g. macOS' }],\n },\n {\n ref: 'sessionDetails', kind: LabelKind.MESSAGE, purpose: 'Second line of a session row: the address it signed in from and when it was last active',\n params: [{ key: 'address', meaning: 'IP address the session signed in from' }, { key: 'lastActive', meaning: 'date and time of its last activity' }],\n },\n {\n ref: 'sessionLastActive', kind: LabelKind.MESSAGE, purpose: 'Second line of a session row whose address is unknown: when it was last active',\n params: [{ key: 'lastActive', meaning: 'date and time of its last activity' }],\n },\n { ref: 'sessionThisDevice', kind: LabelKind.LABEL, purpose: 'Short badge on the session in the list that the person is using right now' },\n { ref: 'sessionSignOut', kind: LabelKind.BUTTON, purpose: 'Button on one session row that signs that session out, on its device' },\n { ref: 'reauthTitle', kind: LabelKind.HEADING, purpose: 'Title of the re-authentication confirmation dialog' },\n { ref: 'reauthDescription', kind: LabelKind.DESCRIPTION, purpose: 'Explains that the person must confirm it is really them before this sensitive change goes through. Must not name a method: they may confirm with a password, a passkey or an authenticator code' },\n { ref: 'reauthPassword', kind: LabelKind.LABEL, purpose: 'Field label for the re-authentication password input' },\n { ref: 'cancel', kind: LabelKind.BUTTON, purpose: 'Button that closes the password change or set-password form without saving' },\n { ref: 'success', kind: LabelKind.MESSAGE, purpose: 'Generic confirmation shown after a successful security change' },\n { ref: 'error', kind: LabelKind.MESSAGE, purpose: 'Generic error shown when a security operation fails' },\n { ref: 'passkeyCancelled', kind: LabelKind.MESSAGE, purpose: 'Notice shown when the user cancels passkey registration' },\n { ref: 'passkeyAdding', kind: LabelKind.MESSAGE, purpose: 'In-progress status while a passkey is being registered' },\n { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading status while the security settings are being fetched' },\n { ref: 'passwordMismatch', kind: LabelKind.MESSAGE, purpose: 'Validation error when the new password and confirmation do not match' },\n { ref: 'reauthPasswordPlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder inside the re-authentication password input' },\n { ref: 'reauthWithPassword', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity by typing the account password' },\n { ref: 'reauthWithPasskey', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity with a registered passkey' },\n { ref: 'reauthWithTotp', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm identity with a code from an authenticator app' },\n { ref: 'reauthPasskeyPrompt', kind: LabelKind.MESSAGE, purpose: 'Explains that confirming will ask the browser or device to use a registered passkey' },\n { ref: 'reauthTotpCode', kind: LabelKind.LABEL, purpose: 'Field label for the authenticator-app code input in the re-authentication dialog' },\n { ref: 'reauthTotpCodePlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder inside the authenticator-app code input, which takes the current one-time code' },\n { ref: 'reauthNoAcceptedMethod', kind: LabelKind.MESSAGE, purpose: 'Shown in the re-authentication dialog when none of the account\\'s sign-in methods is accepted for this confirmation, because the account\\'s security policy requires a method it has not added yet. Tells the person to add that method (for example a passkey) in their security settings first' },\n { ref: 'reauthGrantingOrganizationDescription', kind: LabelKind.DESCRIPTION, purpose: 'Shown in the re-authentication dialog to a person who has just opened the workspace of an organization they work in on behalf of another organization (for example a service firm\\'s staff opening a client\\'s workspace): that organization asks people working in it on behalf of another organization to confirm with a second factor (an authenticator code or a passkey) before continuing, and this confirmation counts for that organization only. Must not name a specific organization' },\n {\n ref: 'reauthWithProvider',\n kind: LabelKind.BUTTON,\n purpose: 'Choice in the re-authentication dialog: confirm it is you by signing in again at a linked identity provider, such as Google or the company\\'s sign-in',\n params: [{ key: 'provider', meaning: 'display name of the linked identity provider' }],\n },\n {\n ref: 'reauthProviderPrompt',\n kind: LabelKind.MESSAGE,\n purpose: 'Shown in the re-authentication dialog when a linked identity provider is chosen: confirming opens a window at that provider, where the person signs in again',\n params: [{ key: 'provider', meaning: 'display name of the linked identity provider' }],\n },\n { ref: 'reauthProviderPopupBlocked', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when the browser blocked the sign-in window from opening; asks the person to allow pop-ups for this site and try again' },\n { ref: 'reauthProviderTimedOut', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when signing in again at the identity provider was not finished in time (the sign-in window was left open or closed without finishing); they can try again or choose another method' },\n { ref: 'reauthProviderRateLimited', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when too many sign-ins at an identity provider were started from this device in the last minute; asks the person to wait a minute and try again, or to choose another method' },\n { ref: 'reauthProviderFailed', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when signing in again at the identity provider did not confirm the person; they can try again or choose another method' },\n { ref: 'reauthProviderDidNotReauthenticate', kind: LabelKind.MESSAGE, purpose: 'Error in the re-authentication dialog when the company\\'s identity provider answered from the sign-in the person already had instead of asking them to sign in again, so it did not confirm them now; tells them to ask their administrator, who can turn re-authentication off for that sign-in connection, and that they can choose another method meanwhile' },\n // A code the application sends by text message or email, used when the account has no stronger way to confirm.\n { ref: 'reauthWithSmsCode', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm it is you with a one-time code sent by text message to the account\\'s verified phone' },\n { ref: 'reauthWithEmailCode', kind: LabelKind.BUTTON, purpose: 'Choice in the re-authentication dialog: confirm it is you with a one-time code sent by email to the account\\'s address' },\n { ref: 'reauthSendCode', kind: LabelKind.BUTTON, purpose: 'Button in the re-authentication dialog that sends the one-time code by the chosen channel (text message or email)' },\n { ref: 'reauthResendCode', kind: LabelKind.BUTTON, purpose: 'Button in the re-authentication dialog that sends a new one-time code after one was sent; the new code replaces the earlier one' },\n {\n ref: 'reauthCodeSent',\n kind: LabelKind.MESSAGE,\n purpose: 'Shown in the re-authentication dialog once a one-time code was sent: where it went (partly hidden) and how many minutes it stays valid; asks the person to enter it below',\n params: [\n { key: 'destination', meaning: 'the phone number or email address the code went to, partly hidden, e.g. ***5678 or p***@example.com' },\n { key: 'minutes', meaning: 'how many minutes the code stays valid, a whole number' },\n ],\n },\n { ref: 'reauthOneTimeCode', kind: LabelKind.LABEL, purpose: 'Field label for the one-time code input in the re-authentication dialog, the code received by text message or email' },\n { ref: 'reauthOneTimeCodePlaceholder', kind: LabelKind.PLACEHOLDER, purpose: 'Placeholder inside the one-time code input of the re-authentication dialog, which takes the code just received' },\n { ref: 'reauthRestrictedCodeNotice', kind: LabelKind.MESSAGE, purpose: 'Notice shown in the re-authentication dialog whenever a code sent by text message or email is offered: such a code is weaker than a passkey or an authenticator app, because whoever controls the phone number or the mailbox can receive it; tells the person they can add a passkey or an authenticator app in their security settings to confirm more safely' },\n { ref: 'phoneVerify', kind: LabelKind.BUTTON, purpose: 'Button that starts phone-number verification' },\n\n // Per-factor descriptive copy. The panel presents each authentication factor\n // as a scannable row (icon · name · status badge), so every state owns an\n // explicit status word, and every factor owns a short plain-language\n // description that is shown only while the factor is NOT active — it is the\n // prompt for a decision not yet taken.\n //\n // Removed with the text they rendered, because each restated something else on\n // the same row: the panel sub-heading (`pageDescription`), the status lines\n // under a badge saying the same (`totpEnabled`, `totpNotSetup`,\n // `phoneNotVerified`, `passwordSetStatus`, `passwordNotSetStatus`), the empty\n // sentences under a \"Not configured\" badge (`passkeyEmpty`,\n // `identityLinksEmpty`), the counts above the lists they count (`passkeyCount`,\n // `identityLinksCount`) and the \"Verified:\" in front of the masked phone number\n // (`phoneVerified`). Their `SecuritySettingsLabel` members went with them, as did\n // `accountComplete` / `accountIncomplete`, `passkeyRename` and a `confirm` the\n // re-authentication dialog never read (its confirm button is the critical-confirm's own).\n { ref: 'statusActive', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor the user has configured' },\n { ref: 'statusNotConfigured', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor the user has not configured yet' },\n { ref: 'statusUnavailable', kind: LabelKind.MESSAGE, purpose: 'Short status word on a factor unavailable on the current device or browser' },\n { ref: 'passkeysDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of what a passkey is and why it is the strongest sign-in method' },\n { ref: 'totpDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of authenticator-app one-time codes as a second factor' },\n { ref: 'phoneDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of SMS one-time codes to a verified phone number' },\n { ref: 'passwordDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of the account password as a sign-in credential' },\n { ref: 'identityLinksDescription', kind: LabelKind.DESCRIPTION, purpose: 'Plain-language explanation of external identity accounts linked for sign-in' },\n { ref: 'passkeyAdded', kind: LabelKind.MESSAGE, purpose: 'Registration date shown under an individual passkey entry', params: ['date'] },\n];\nregisterComponentLabels(FrontendComponentType.APP_LAYOUTS_SECURITY_SETTINGS, AppLayoutsSecuritySettingsLabels);\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `/decision-answer` — the routed wrapper for the decision-answer page. A public identity route: the link's single-use
|
|
4
|
+
* token is the credential, the page answers nothing until the person confirms, and it signs them in first only when the
|
|
5
|
+
* decision requires a step-up ({@link Auth_DecisionEmailAnswer}).
|
|
6
|
+
*
|
|
7
|
+
* `referrer: no-referrer` (like the other token pages) keeps the token out of the `Referer` header of any outbound
|
|
8
|
+
* navigation in the moment before the page takes it out of the address bar.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AuthPage_DecisionEmailAnswer: React.FC;
|
|
11
|
+
//# sourceMappingURL=AuthPage_DecisionEmailAnswer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthPage_DecisionEmailAnswer.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/pages/AuthPage_DecisionEmailAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,EAAE,KAAK,CAAC,EAgBhD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PublicLayout_MainContainer } from '../../../components/app/PublicLayout_MainContainer.js';
|
|
4
|
+
import { Auth_DecisionEmailAnswer } from '../../../components/auth/Auth_DecisionEmailAnswer.js';
|
|
5
|
+
/**
|
|
6
|
+
* `/decision-answer` — the routed wrapper for the decision-answer page. A public identity route: the link's single-use
|
|
7
|
+
* token is the credential, the page answers nothing until the person confirms, and it signs them in first only when the
|
|
8
|
+
* decision requires a step-up ({@link Auth_DecisionEmailAnswer}).
|
|
9
|
+
*
|
|
10
|
+
* `referrer: no-referrer` (like the other token pages) keeps the token out of the `Referer` header of any outbound
|
|
11
|
+
* navigation in the moment before the page takes it out of the address bar.
|
|
12
|
+
*/
|
|
13
|
+
export const AuthPage_DecisionEmailAnswer = () => {
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
const meta = document.createElement('meta');
|
|
16
|
+
meta.name = 'referrer';
|
|
17
|
+
meta.content = 'no-referrer';
|
|
18
|
+
document.head.appendChild(meta);
|
|
19
|
+
return () => {
|
|
20
|
+
document.head.removeChild(meta);
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
return (_jsx(PublicLayout_MainContainer, { useCardLayout: true, children: _jsx(Auth_DecisionEmailAnswer, {}) }));
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=AuthPage_DecisionEmailAnswer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthPage_DecisionEmailAnswer.js","sourceRoot":"","sources":["../../../../../src/components/auth/pages/AuthPage_DecisionEmailAnswer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,8DAA8D,CAAC;AAExG;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAa,GAAG,EAAE;IACzD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,0BAA0B,IAAC,aAAa,EAAE,IAAI,YAC7C,KAAC,wBAAwB,KAAG,GACD,CAC9B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { PublicLayout_MainContainer } from '~wildo-frontend-lib/components/app/PublicLayout_MainContainer';\nimport { Auth_DecisionEmailAnswer } from '~wildo-frontend-lib/components/auth/Auth_DecisionEmailAnswer';\n\n/**\n * `/decision-answer` — the routed wrapper for the decision-answer page. A public identity route: the link's single-use\n * token is the credential, the page answers nothing until the person confirms, and it signs them in first only when the\n * decision requires a step-up ({@link Auth_DecisionEmailAnswer}).\n *\n * `referrer: no-referrer` (like the other token pages) keeps the token out of the `Referer` header of any outbound\n * navigation in the moment before the page takes it out of the address bar.\n */\nexport const AuthPage_DecisionEmailAnswer: React.FC = () => {\n React.useEffect(() => {\n const meta = document.createElement('meta');\n meta.name = 'referrer';\n meta.content = 'no-referrer';\n document.head.appendChild(meta);\n return () => {\n document.head.removeChild(meta);\n };\n }, []);\n\n return (\n <PublicLayout_MainContainer useCardLayout={true}>\n <Auth_DecisionEmailAnswer />\n </PublicLayout_MainContainer>\n );\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `/device` — the routed wrapper for the OAuth device authorization grant's verification page, rendered in the centered
|
|
4
|
+
* public card. A public route: the body sends a signed-out person to sign in, then returns here with the code intact
|
|
5
|
+
* ({@link Auth_OAuthDeviceVerification}).
|
|
6
|
+
*
|
|
7
|
+
* `referrer: no-referrer` (like the other auth pages) keeps a user code that arrived in the address out of the `Referer`
|
|
8
|
+
* header of any outbound navigation.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AuthPage_OAuthDeviceVerification: React.FC;
|
|
11
|
+
//# sourceMappingURL=AuthPage_OAuthDeviceVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthPage_OAuthDeviceVerification.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/pages/AuthPage_OAuthDeviceVerification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;;GAOG;AACH,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAgBpD,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PublicLayout_MainContainer } from '../../../components/app/PublicLayout_MainContainer.js';
|
|
4
|
+
import { Auth_OAuthDeviceVerification } from '../../../components/auth/Auth_OAuthDeviceVerification.js';
|
|
5
|
+
/**
|
|
6
|
+
* `/device` — the routed wrapper for the OAuth device authorization grant's verification page, rendered in the centered
|
|
7
|
+
* public card. A public route: the body sends a signed-out person to sign in, then returns here with the code intact
|
|
8
|
+
* ({@link Auth_OAuthDeviceVerification}).
|
|
9
|
+
*
|
|
10
|
+
* `referrer: no-referrer` (like the other auth pages) keeps a user code that arrived in the address out of the `Referer`
|
|
11
|
+
* header of any outbound navigation.
|
|
12
|
+
*/
|
|
13
|
+
export const AuthPage_OAuthDeviceVerification = () => {
|
|
14
|
+
React.useEffect(() => {
|
|
15
|
+
const meta = document.createElement('meta');
|
|
16
|
+
meta.name = 'referrer';
|
|
17
|
+
meta.content = 'no-referrer';
|
|
18
|
+
document.head.appendChild(meta);
|
|
19
|
+
return () => {
|
|
20
|
+
document.head.removeChild(meta);
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
return (_jsx(PublicLayout_MainContainer, { useCardLayout: true, children: _jsx(Auth_OAuthDeviceVerification, {}) }));
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=AuthPage_OAuthDeviceVerification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthPage_OAuthDeviceVerification.js","sourceRoot":"","sources":["../../../../../src/components/auth/pages/AuthPage_OAuthDeviceVerification.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAEhH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAa,GAAG,EAAE;IAC7D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,0BAA0B,IAAC,aAAa,EAAE,IAAI,YAC7C,KAAC,4BAA4B,KAAG,GACL,CAC9B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { PublicLayout_MainContainer } from '~wildo-frontend-lib/components/app/PublicLayout_MainContainer';\nimport { Auth_OAuthDeviceVerification } from '~wildo-frontend-lib/components/auth/Auth_OAuthDeviceVerification';\n\n/**\n * `/device` — the routed wrapper for the OAuth device authorization grant's verification page, rendered in the centered\n * public card. A public route: the body sends a signed-out person to sign in, then returns here with the code intact\n * ({@link Auth_OAuthDeviceVerification}).\n *\n * `referrer: no-referrer` (like the other auth pages) keeps a user code that arrived in the address out of the `Referer`\n * header of any outbound navigation.\n */\nexport const AuthPage_OAuthDeviceVerification: React.FC = () => {\n React.useEffect(() => {\n const meta = document.createElement('meta');\n meta.name = 'referrer';\n meta.content = 'no-referrer';\n document.head.appendChild(meta);\n return () => {\n document.head.removeChild(meta);\n };\n }, []);\n\n return (\n <PublicLayout_MainContainer useCardLayout={true}>\n <Auth_OAuthDeviceVerification />\n </PublicLayout_MainContainer>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-pricing-table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"billing-pricing-table.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-pricing-table.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAwC,sBAAsB,EAAmF,MAAM,uBAAuB,CAAA;AAGrL,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAkB5H,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,W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C;IACrC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAID;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,cAAc,CAAC,GACtF,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,cAAc,CAAC,CAAC,GAC1D,oBAAoB,CAAA;AAEtB,wBAAgB,YAAY,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA0L/H"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { BillingPlanChangePhase, useBillingPlanChange } from '../../core/billing/useBillingPlanChange.js';
|
|
3
3
|
import { PlanChangePreview } from './billing-plan-change-preview.js';
|
|
4
4
|
import { BillingStateSlice } from '@wildo-ai/saas-models';
|
|
5
5
|
import { useMemo, useCallback, useEffect, useRef, useState } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import { fromMoneyAmount } from '@wildo-ai/zod-decorators';
|
|
7
|
+
import { BillingCollectionMethod, ProductType, isPendingPlanChangeWithdrawable, isPriceOffered, resolveBillingCollectionPolicy } from '@wildo-ai/saas-models';
|
|
7
8
|
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
8
9
|
import { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models';
|
|
9
10
|
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
10
11
|
import { useBillingSafe } from '../../core/billing/useBilling.js';
|
|
11
12
|
import { useSafeBillingActionExecutor } from '../../core/billing/useSafeBillingActionExecutor.js';
|
|
12
13
|
import { useUserFacingErrorMessage } from '../../core/errors/useUserFacingErrorMessage.js';
|
|
14
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../components/overlays/containers/alert-dialog.js';
|
|
13
15
|
export function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
14
16
|
const billing = useBillingSafe();
|
|
15
17
|
const toUserFacingErrorMessage = useUserFacingErrorMessage();
|
|
@@ -25,9 +27,12 @@ export function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
|
25
27
|
useEffect(() => { if (props.onSelectPlan)
|
|
26
28
|
planChange.cancel(); }, [props.onSelectPlan, planChange.cancel]);
|
|
27
29
|
const runBillingActionSafely = useSafeBillingActionExecutor();
|
|
28
|
-
const { tBillingProduct, tBillingFeature, tBillingLimit, isReady } = useI18n({
|
|
30
|
+
const { tBillingProduct, tBillingFeature, tBillingLimit, tComponent, isReady, formatNumber } = useI18n({
|
|
29
31
|
keys: ['billing_products', 'billing_features', 'billing_limits'],
|
|
30
32
|
});
|
|
33
|
+
// A plan paid by invoice is subscribed without checkout, so its confirmation is here: nothing is opened until the buyer
|
|
34
|
+
// has seen the plan, its price and the payment term.
|
|
35
|
+
const [invoiceConfirmation, setInvoiceConfirmation] = useState(null);
|
|
31
36
|
const Component = createComponentResolver(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'PricingTable')(preset);
|
|
32
37
|
const plans = useMemo(() => {
|
|
33
38
|
if (props.plans)
|
|
@@ -41,7 +46,9 @@ export function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
|
41
46
|
.filter(p => p.type === ProductType.PLAN && p.isPublic && p.isActive)
|
|
42
47
|
.filter(p => !billing.currentScope || !p.targetScopes || p.targetScopes.includes(billing.currentScope))
|
|
43
48
|
.map(product => {
|
|
44
|
-
|
|
49
|
+
// The prices on OFFER only (#4315 review F1): a retired row is kept for the subscribers on it, and offering it
|
|
50
|
+
// would sell what checkout refuses, or call a plan whose price is not decided Free over an old `0` row.
|
|
51
|
+
const productPrices = billing.getPricesForProduct(product._id).filter(isPriceOffered);
|
|
45
52
|
return {
|
|
46
53
|
key: product.key,
|
|
47
54
|
name: tBillingProduct(product.key, 'name'),
|
|
@@ -112,15 +119,41 @@ export function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
|
112
119
|
void planChange.select({ newProductKey: planKey, newPriceId: priceId });
|
|
113
120
|
}
|
|
114
121
|
else {
|
|
115
|
-
|
|
122
|
+
// A plan its collection policy offers only by invoice is subscribed without checkout. A plan offering a card
|
|
123
|
+
// keeps checkout here; an application offering the buyer the choice composes `openInvoicedSubscription` itself.
|
|
124
|
+
const collection = resolveBillingCollectionPolicy(billing.getProductByKey(planKey)?.behaviorPolicy, billing.billingConfiguration?.defaultBehaviorPolicy?.defaultCollection);
|
|
125
|
+
if (collection.methods.includes(BillingCollectionMethod.CARD_AUTOMATIC)) {
|
|
126
|
+
runBillingActionSafely(() => billing.openCheckout(planKey, priceId));
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// The amount the buyer commits to, as the plan card shows it: the price and its billing interval. Quantity is
|
|
130
|
+
// not shown, since this door subscribes one unit, as checkout does.
|
|
131
|
+
const offered = plans.find(plan => plan.key === planKey)?.prices.find(entry => entry.priceId === priceId);
|
|
132
|
+
const price = offered
|
|
133
|
+
? `${formatNumber(fromMoneyAmount(offered.price.amount, offered.price.decimals), {
|
|
134
|
+
style: 'currency', currency: offered.price.currency, minimumFractionDigits: 0, maximumFractionDigits: offered.price.decimals,
|
|
135
|
+
})}${tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, offered.interval === 'year' ? 'perYear' : 'perMonth')}`
|
|
136
|
+
: '';
|
|
137
|
+
setInvoiceConfirmation({ planKey, priceId, termDays: collection.invoicePaymentTermDays ?? 0, price });
|
|
138
|
+
}
|
|
116
139
|
}
|
|
117
|
-
}, [props.onSelectPlan, billing, runBillingActionSafely, planChange.select]);
|
|
140
|
+
}, [props.onSelectPlan, billing, runBillingActionSafely, planChange.select, plans, formatNumber, tComponent]);
|
|
118
141
|
const unavailable = props.unavailable ?? (!!billing?.isEnabled && !(props.plans !== undefined) && [BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.SUBSCRIPTION].some(slice => !billing.isSliceAvailable(slice)));
|
|
119
142
|
const isLoading = props.isLoading ?? billing?.isLoading;
|
|
120
143
|
const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null);
|
|
121
144
|
if (!isReady)
|
|
122
145
|
return null;
|
|
123
|
-
return (_jsxs(_Fragment, { children: [_jsx(Component, { ...props, plans: plans, currentPlanKey: currentPlanKey, onSelectPlan: onSelectPlan, isLoading: isLoading, error: error, unavailable: unavailable, isSelectionDisabled: props.isSelectionDisabled || planChange.state.phase === BillingPlanChangePhase.CONFIRMING || !!pendingPlanChange, pendingPlanChange: pendingPlanChange, onKeepCurrentPlan: onKeepCurrentPlan, isKeepingCurrentPlan: props.isKeepingCurrentPlan ?? isKeepingCurrentPlan }),
|
|
146
|
+
return (_jsxs(_Fragment, { children: [_jsx(Component, { ...props, plans: plans, currentPlanKey: currentPlanKey, onSelectPlan: onSelectPlan, isLoading: isLoading, error: error, unavailable: unavailable, isSelectionDisabled: props.isSelectionDisabled || planChange.state.phase === BillingPlanChangePhase.CONFIRMING || !!pendingPlanChange, pendingPlanChange: pendingPlanChange, onKeepCurrentPlan: onKeepCurrentPlan, isKeepingCurrentPlan: props.isKeepingCurrentPlan ?? isKeepingCurrentPlan }), invoiceConfirmation && (_jsx(AlertDialog, { open: true, onOpenChange: (open) => { if (!open)
|
|
147
|
+
setInvoiceConfirmation(null); }, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirmTitle') }), _jsx(AlertDialogDescription, { children: tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirmDescription', {
|
|
148
|
+
plan: tBillingProduct(invoiceConfirmation.planKey, 'name'),
|
|
149
|
+
price: invoiceConfirmation.price,
|
|
150
|
+
days: invoiceConfirmation.termDays,
|
|
151
|
+
}) })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { onClick: () => setInvoiceConfirmation(null), children: tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceCancel') }), _jsx(AlertDialogAction, { onClick: () => {
|
|
152
|
+
const confirmed = invoiceConfirmation;
|
|
153
|
+
setInvoiceConfirmation(null);
|
|
154
|
+
if (confirmed && billing)
|
|
155
|
+
runBillingActionSafely(() => billing.openInvoicedSubscription(confirmed.planKey, confirmed.priceId));
|
|
156
|
+
}, children: tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirm') })] })] }) })), planChange.state.phase !== BillingPlanChangePhase.IDLE && (_jsx(PlanChangePreview, { targetPlanName: tBillingProduct(planChange.state.target.newProductKey, 'name'), preview: 'preview' in planChange.state ? planChange.state.preview : null, isLoading: planChange.state.phase === BillingPlanChangePhase.PREVIEWING, isConfirming: planChange.state.phase === BillingPlanChangePhase.CONFIRMING, hasError: planChange.state.phase === BillingPlanChangePhase.FAILED || ('hasError' in planChange.state && planChange.state.hasError), onCancel: planChange.cancel, onConfirm: planChange.state.phase === BillingPlanChangePhase.READY || planChange.state.phase === BillingPlanChangePhase.CONFIRMING ? () => { void planChange.confirm(); } : undefined, onRetry: planChange.state.phase === BillingPlanChangePhase.FAILED ? () => {
|
|
124
157
|
if (planChange.state.phase === BillingPlanChangePhase.FAILED)
|
|
125
158
|
void planChange.select(planChange.state.target);
|
|
126
159
|
} : undefined }))] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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U,CAAC,MAAM,EAC3B,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,KAAK,sBAAsB,CAAC,KAAK,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,KAAK,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,UAAU,CAAC,OAAO,EAAE,CAAA,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACpL,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,KAAK,sBAAsB,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;oBACvE,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,KAAK,sBAAsB,CAAC,MAAM;wBAAE,KAAK,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;gBAC/G,CAAC,CAAC,CAAC,CAAC,SAAS,GACb,CACH,IACE,CACJ,CAAA;AACH,CAAC","sourcesContent":["import { BillingPlanChangePhase, useBillingPlanChange } from '~wildo-frontend-lib/core/billing/useBillingPlanChange'\nimport { PlanChangePreview } from './billing-plan-change-preview'\nimport { BillingStateSlice } from '@wildo-ai/saas-models'\nimport React, { useMemo, useCallback, useEffect, useRef, useState } from 'react'\nimport type { MoneyValue } from '@wildo-ai/zod-decorators'\nimport { ProductType, ProductPriceDisclosure, isPendingPlanChangeWithdrawable } from '@wildo-ai/saas-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\nimport { useSafeBillingActionExecutor } from '~wildo-frontend-lib/core/billing/useSafeBillingActionExecutor'\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage'\n\n// --- Contract ---\n\nexport interface PricingTableFeature {\n id: string\n label: string\n}\n\nexport interface PricingTableLimit {\n id: string\n label: string\n value: number\n}\n\nexport interface PricingTablePlan {\n key: string\n name: string\n description?: string\n planTier?: string\n sortOrder: number\n grantedFeatures: PricingTableFeature[]\n grantedLimits: PricingTableLimit[]\n isCurrent: boolean\n prices: Array<{\n priceId: string\n price: MoneyValue\n interval?: string\n isDefault: boolean\n }>\n /**\n * The plan the catalogue recommends (`Product.isRecommended`), emphasised in the grid. A\n * recommendation, never a popularity claim. Until #1835 this was `isPopular`, derived from\n * `sortOrder === 1` — so whichever plan happened to sort second was badged \"most popular\" on a\n * product nobody had measured.\n */\n isRecommended?: boolean\n /** How much of the price the tile may state (`Product.priceDisclosure`). Omitted = listed. */\n priceDisclosure?: ProductPriceDisclosure\n /**\n * Whether the plan can be bought right now. `false` for an announced-but-upcoming plan: the tile\n * is shown so the plan can be seen, and its selection is disabled because the backend refuses it.\n * Omitted = acquirable, for a caller supplying its own `plans`.\n */\n isAcquirable?: boolean\n isFree?: boolean\n trialDays?: number\n}\n\nexport interface PricingTableProps {\n plans: PricingTablePlan[]\n currentPlanKey?: string | null\n onSelectPlan: (planKey: string, priceId: string) => void\n showIntervalToggle?: boolean\n /**\n * Where an on-request plan's \"contact sales\" action leads. Without it, an on-request plan shows no\n * action: a button that goes nowhere is worse than none.\n */\n contactSalesHref?: string\n /** Freeze plan selection while a confirmed mutation is in flight. */\n isSelectionDisabled?: boolean\n /**\n * A plan change pending at the end of the period (#1868): the plan the subscription moves to, and when. Shown above the grid; plan\n * selection is disabled while it is pending, because another change is refused until it is withdrawn.\n */\n pendingPlanChange?: { targetPlanName: string; effectiveAt: Date } | null\n /** Withdraw the pending change and keep the current plan. Absent when nothing is pending. */\n onKeepCurrentPlan?: () => void\n /** The withdrawal is in progress. */\n isKeepingCurrentPlan?: boolean\n isLoading?: boolean\n unavailable?: boolean\n error?: string | null\n}\n\n// --- Wrapper ---\n\n/**\n * Wrapper props: `plans` / `onSelectPlan` are OPTIONAL here — the wrapper\n * derives plans from the billing product catalog and defaults plan selection to\n * checkout for new subscriptions and preview/confirmation for existing ones when omitted. The PRESET contract above keeps\n * them required: the wrapper always materializes them before resolving the\n * preset. NOTE: do NOT pass `plans={[]}` to \"let the context win\" — a provided\n * array (even empty) intentionally overrides the derived catalog.\n */\nexport type PricingTableWrapperProps = Omit<PricingTableProps, 'plans' | 'onSelectPlan'> &\n Partial<Pick<PricingTableProps, 'plans' | 'onSelectPlan'>> &\n ComponentPresetProps\n\nexport function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }: PricingTableWrapperProps): React.JSX.Element | null {\n const billing = useBillingSafe()\n const toUserFacingErrorMessage = useUserFacingErrorMessage()\n const planChange = useBillingPlanChange(billing)\n const selectionTrigger = useRef<HTMLElement | null>(null)\n const hadPreview = useRef(false)\n useEffect(() => {\n const hasPreview = planChange.state.phase !== BillingPlanChangePhase.IDLE\n if (hadPreview.current && !hasPreview && selectionTrigger.current?.isConnected) selectionTrigger.current.focus()\n hadPreview.current = hasPreview\n }, [planChange.state.phase])\n useEffect(() => { if (props.onSelectPlan) planChange.cancel() }, [props.onSelectPlan, planChange.cancel])\n const runBillingActionSafely = useSafeBillingActionExecutor()\n const { tBillingProduct, tBillingFeature, tBillingLimit, isReady } = useI18n({\n keys: ['billing_products', 'billing_features', 'billing_limits'],\n })\n const Component = createComponentResolver<PricingTableProps>(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'PricingTable')(preset)\n\n const plans: PricingTablePlan[] = useMemo(() => {\n if (props.plans) return props.plans\n if (!billing?.products) return []\n\n return billing.products\n // VISIBILITY, not acquirability: public and not retired. An UPCOMING plan stays listed — the\n // grid announces it — and its selection is gated by `isAcquirable` below, which reads the\n // backend's own answer rather than re-deriving it.\n .filter(p => p.type === ProductType.PLAN && p.isPublic && p.isActive)\n .filter(p => !billing.currentScope || !p.targetScopes || p.targetScopes.includes(billing.currentScope))\n .map(product => {\n const productPrices = billing.getPricesForProduct(product._id)\n return {\n key: product.key,\n name: tBillingProduct(product.key, 'name'),\n description: tBillingProduct(product.key, 'tagline'),\n planTier: product.planTier,\n sortOrder: product.sortOrder ?? 0,\n grantedFeatures: (product.grantedFeatures ?? []).map(f => ({\n id: f,\n label: tBillingFeature(f, 'label'),\n })),\n grantedLimits: Object.entries(product.grantedLimits ?? {}).map(([k, v]) => ({\n id: k,\n label: tBillingLimit(k, 'label'),\n value: typeof v === 'object' && v !== null ? (v as any).value ?? 0 : 0,\n })),\n isCurrent: product.key === billing.currentPlanKey,\n prices: productPrices\n .filter(price => price.unitPrice && price.unitPrice.currency)\n .map(price => ({\n priceId: price._id,\n price: price.unitPrice as MoneyValue,\n interval: price.interval,\n isDefault: price.isDefault ?? true,\n })),\n isRecommended: product.isRecommended === true,\n priceDisclosure: product.priceDisclosure,\n isAcquirable: billing.isProductAcquirable(product.key),\n isFree: productPrices.length > 0 && productPrices.every(price => price.unitPrice?.amount === 0n),\n trialDays: product.behaviorPolicy?.trial?.days,\n }\n })\n }, [props.plans, billing?.products, billing?.currentScope, billing?.currentPlanKey, billing?.getPricesForProduct, billing?.isProductAcquirable, tBillingProduct, tBillingFeature, tBillingLimit])\n\n const currentPlanKey = props.currentPlanKey !== undefined ? props.currentPlanKey : (billing?.currentPlanKey ?? null)\n\n // A plan change pending at the end of the period (#1868). The plan is named from the catalogue; a product the catalogue no longer\n // lists shows its id, so a missing name looks missing instead of being invented.\n const storedPendingChange = billing?.subscription?.pendingPlanChange\n const pendingPlanChange = props.pendingPlanChange !== undefined ? props.pendingPlanChange : (storedPendingChange ? {\n targetPlanName: (() => {\n const key = billing?.products?.find(product => product._id === storedPendingChange.productId)?.key\n return key ? tBillingProduct(key, 'name') : storedPendingChange.productId\n })(),\n effectiveAt: new Date(storedPendingChange.effectiveAt),\n } : null)\n const [isKeepingCurrentPlan, setIsKeepingCurrentPlan] = useState(false)\n // Offered only while the change can still be withdrawn: minutes from renewal the operation refuses it, so the action is withheld\n // rather than shown to fail (#1868, `PLAN_CHANGE_WITHDRAWAL_CUTOFF_MS`).\n const onKeepCurrentPlan = props.onKeepCurrentPlan ?? (storedPendingChange && billing && isPendingPlanChangeWithdrawable(storedPendingChange) ? () => {\n setIsKeepingCurrentPlan(true)\n runBillingActionSafely(async () => {\n try { await billing.cancelPendingPlanChange() } finally { setIsKeepingCurrentPlan(false) }\n })\n } : undefined)\n\n const onSelectPlan = useCallback(\n (planKey: string, priceId: string) => {\n if (props.onSelectPlan) {\n props.onSelectPlan(planKey, priceId)\n return\n }\n if (!billing || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.SUBSCRIPTION, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES].every(billing.isSliceAvailable)) return\n if (billing.subscription) {\n if (document.activeElement instanceof HTMLElement) selectionTrigger.current = document.activeElement\n void planChange.select({ newProductKey: planKey, newPriceId: priceId })\n } else {\n runBillingActionSafely(() => billing.openCheckout(planKey, priceId))\n }\n },\n [props.onSelectPlan, billing, runBillingActionSafely, planChange.select],\n )\n\n const unavailable = props.unavailable ?? (!!billing?.isEnabled && !(props.plans !== undefined) && [BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.SUBSCRIPTION].some(slice => !billing.isSliceAvailable(slice)))\n const isLoading = props.isLoading ?? billing?.isLoading\n const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null)\n\n if (!isReady) return null\n\n return (\n <>\n <Component\n {...props}\n plans={plans}\n currentPlanKey={currentPlanKey}\n onSelectPlan={onSelectPlan}\n isLoading={isLoading}\n error={error}\n unavailable={unavailable}\n isSelectionDisabled={props.isSelectionDisabled || planChange.state.phase === BillingPlanChangePhase.CONFIRMING || !!pendingPlanChange}\n pendingPlanChange={pendingPlanChange}\n onKeepCurrentPlan={onKeepCurrentPlan}\n isKeepingCurrentPlan={props.isKeepingCurrentPlan ?? isKeepingCurrentPlan}\n />\n {planChange.state.phase !== BillingPlanChangePhase.IDLE && (\n <PlanChangePreview\n targetPlanName={tBillingProduct(planChange.state.target.newProductKey, 'name')}\n preview={'preview' in planChange.state ? planChange.state.preview : null}\n isLoading={planChange.state.phase === BillingPlanChangePhase.PREVIEWING}\n isConfirming={planChange.state.phase === BillingPlanChangePhase.CONFIRMING}\n hasError={planChange.state.phase === BillingPlanChangePhase.FAILED || ('hasError' in planChange.state && planChange.state.hasError)}\n onCancel={planChange.cancel}\n onConfirm={planChange.state.phase === BillingPlanChangePhase.READY || planChange.state.phase === BillingPlanChangePhase.CONFIRMING ? () => { void planChange.confirm() } : undefined}\n onRetry={planChange.state.phase === BillingPlanChangePhase.FAILED ? () => {\n if (planChange.state.phase === BillingPlanChangePhase.FAILED) void planChange.select(planChange.state.target)\n } : undefined}\n />\n )}\n </>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billing-pricing-table.js","sourceRoot":"","sources":["../../../../src/components/billing/billing-pricing-table.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAA;AACpH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAc,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAA0B,+BAA+B,EAAE,cAAc,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AACrL,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EA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AAK,CAAC,KAAK,KAAK,sBAAsB,CAAC,MAAM;wBAAE,KAAK,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;gBAC/G,CAAC,CAAC,CAAC,CAAC,SAAS,GACb,CACH,IACE,CACJ,CAAA;AACH,CAAC","sourcesContent":["import { BillingPlanChangePhase, useBillingPlanChange } from '~wildo-frontend-lib/core/billing/useBillingPlanChange'\nimport { PlanChangePreview } from './billing-plan-change-preview'\nimport { BillingStateSlice } from '@wildo-ai/saas-models'\nimport React, { useMemo, useCallback, useEffect, useRef, useState } from 'react'\nimport type { MoneyValue } from '@wildo-ai/zod-decorators'\nimport { fromMoneyAmount } from '@wildo-ai/zod-decorators'\nimport { BillingCollectionMethod, ProductType, ProductPriceDisclosure, isPendingPlanChangeWithdrawable, isPriceOffered, resolveBillingCollectionPolicy } from '@wildo-ai/saas-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\nimport { useSafeBillingActionExecutor } from '~wildo-frontend-lib/core/billing/useSafeBillingActionExecutor'\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage'\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '~wildo-frontend-lib/components/overlays/containers/alert-dialog'\n\n// --- Contract ---\n\nexport interface PricingTableFeature {\n id: string\n label: string\n}\n\nexport interface PricingTableLimit {\n id: string\n label: string\n value: number\n}\n\nexport interface PricingTablePlan {\n key: string\n name: string\n description?: string\n planTier?: string\n sortOrder: number\n grantedFeatures: PricingTableFeature[]\n grantedLimits: PricingTableLimit[]\n isCurrent: boolean\n prices: Array<{\n priceId: string\n price: MoneyValue\n interval?: string\n isDefault: boolean\n }>\n /**\n * The plan the catalogue recommends (`Product.isRecommended`), emphasised in the grid. A\n * recommendation, never a popularity claim. Until #1835 this was `isPopular`, derived from\n * `sortOrder === 1` — so whichever plan happened to sort second was badged \"most popular\" on a\n * product nobody had measured.\n */\n isRecommended?: boolean\n /** How much of the price the tile may state (`Product.priceDisclosure`). Omitted = listed. */\n priceDisclosure?: ProductPriceDisclosure\n /**\n * Whether the plan can be bought right now. `false` for an announced-but-upcoming plan: the tile\n * is shown so the plan can be seen, and its selection is disabled because the backend refuses it.\n * Omitted = acquirable, for a caller supplying its own `plans`.\n */\n isAcquirable?: boolean\n isFree?: boolean\n trialDays?: number\n}\n\nexport interface PricingTableProps {\n plans: PricingTablePlan[]\n currentPlanKey?: string | null\n onSelectPlan: (planKey: string, priceId: string) => void\n showIntervalToggle?: boolean\n /**\n * Where an on-request plan's \"contact sales\" action leads. Without it, an on-request plan shows no\n * action: a button that goes nowhere is worse than none.\n */\n contactSalesHref?: string\n /** Freeze plan selection while a confirmed mutation is in flight. */\n isSelectionDisabled?: boolean\n /**\n * A plan change pending at the end of the period (#1868): the plan the subscription moves to, and when. Shown above the grid; plan\n * selection is disabled while it is pending, because another change is refused until it is withdrawn.\n */\n pendingPlanChange?: { targetPlanName: string; effectiveAt: Date } | null\n /** Withdraw the pending change and keep the current plan. Absent when nothing is pending. */\n onKeepCurrentPlan?: () => void\n /** The withdrawal is in progress. */\n isKeepingCurrentPlan?: boolean\n isLoading?: boolean\n unavailable?: boolean\n error?: string | null\n}\n\n// --- Wrapper ---\n\n/**\n * Wrapper props: `plans` / `onSelectPlan` are OPTIONAL here — the wrapper\n * derives plans from the billing product catalog and defaults plan selection to\n * checkout for new subscriptions and preview/confirmation for existing ones when omitted. The PRESET contract above keeps\n * them required: the wrapper always materializes them before resolving the\n * preset. NOTE: do NOT pass `plans={[]}` to \"let the context win\" — a provided\n * array (even empty) intentionally overrides the derived catalog.\n */\nexport type PricingTableWrapperProps = Omit<PricingTableProps, 'plans' | 'onSelectPlan'> &\n Partial<Pick<PricingTableProps, 'plans' | 'onSelectPlan'>> &\n ComponentPresetProps\n\nexport function PricingTable({ preset = CorePresetNames.DEFAULT, ...props }: PricingTableWrapperProps): React.JSX.Element | null {\n const billing = useBillingSafe()\n const toUserFacingErrorMessage = useUserFacingErrorMessage()\n const planChange = useBillingPlanChange(billing)\n const selectionTrigger = useRef<HTMLElement | null>(null)\n const hadPreview = useRef(false)\n useEffect(() => {\n const hasPreview = planChange.state.phase !== BillingPlanChangePhase.IDLE\n if (hadPreview.current && !hasPreview && selectionTrigger.current?.isConnected) selectionTrigger.current.focus()\n hadPreview.current = hasPreview\n }, [planChange.state.phase])\n useEffect(() => { if (props.onSelectPlan) planChange.cancel() }, [props.onSelectPlan, planChange.cancel])\n const runBillingActionSafely = useSafeBillingActionExecutor()\n const { tBillingProduct, tBillingFeature, tBillingLimit, tComponent, isReady, formatNumber } = useI18n({\n keys: ['billing_products', 'billing_features', 'billing_limits'],\n })\n // A plan paid by invoice is subscribed without checkout, so its confirmation is here: nothing is opened until the buyer\n // has seen the plan, its price and the payment term.\n const [invoiceConfirmation, setInvoiceConfirmation] = useState<{ planKey: string; priceId: string; termDays: number; price: string } | null>(null)\n const Component = createComponentResolver<PricingTableProps>(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'PricingTable')(preset)\n\n const plans: PricingTablePlan[] = useMemo(() => {\n if (props.plans) return props.plans\n if (!billing?.products) return []\n\n return billing.products\n // VISIBILITY, not acquirability: public and not retired. An UPCOMING plan stays listed — the\n // grid announces it — and its selection is gated by `isAcquirable` below, which reads the\n // backend's own answer rather than re-deriving it.\n .filter(p => p.type === ProductType.PLAN && p.isPublic && p.isActive)\n .filter(p => !billing.currentScope || !p.targetScopes || p.targetScopes.includes(billing.currentScope))\n .map(product => {\n // The prices on OFFER only (#4315 review F1): a retired row is kept for the subscribers on it, and offering it\n // would sell what checkout refuses, or call a plan whose price is not decided Free over an old `0` row.\n const productPrices = billing.getPricesForProduct(product._id).filter(isPriceOffered)\n return {\n key: product.key,\n name: tBillingProduct(product.key, 'name'),\n description: tBillingProduct(product.key, 'tagline'),\n planTier: product.planTier,\n sortOrder: product.sortOrder ?? 0,\n grantedFeatures: (product.grantedFeatures ?? []).map(f => ({\n id: f,\n label: tBillingFeature(f, 'label'),\n })),\n grantedLimits: Object.entries(product.grantedLimits ?? {}).map(([k, v]) => ({\n id: k,\n label: tBillingLimit(k, 'label'),\n value: typeof v === 'object' && v !== null ? (v as any).value ?? 0 : 0,\n })),\n isCurrent: product.key === billing.currentPlanKey,\n prices: productPrices\n .filter(price => price.unitPrice && price.unitPrice.currency)\n .map(price => ({\n priceId: price._id,\n price: price.unitPrice as MoneyValue,\n interval: price.interval,\n isDefault: price.isDefault ?? true,\n })),\n isRecommended: product.isRecommended === true,\n priceDisclosure: product.priceDisclosure,\n isAcquirable: billing.isProductAcquirable(product.key),\n isFree: productPrices.length > 0 && productPrices.every(price => price.unitPrice?.amount === 0n),\n trialDays: product.behaviorPolicy?.trial?.days,\n }\n })\n }, [props.plans, billing?.products, billing?.currentScope, billing?.currentPlanKey, billing?.getPricesForProduct, billing?.isProductAcquirable, tBillingProduct, tBillingFeature, tBillingLimit])\n\n const currentPlanKey = props.currentPlanKey !== undefined ? props.currentPlanKey : (billing?.currentPlanKey ?? null)\n\n // A plan change pending at the end of the period (#1868). The plan is named from the catalogue; a product the catalogue no longer\n // lists shows its id, so a missing name looks missing instead of being invented.\n const storedPendingChange = billing?.subscription?.pendingPlanChange\n const pendingPlanChange = props.pendingPlanChange !== undefined ? props.pendingPlanChange : (storedPendingChange ? {\n targetPlanName: (() => {\n const key = billing?.products?.find(product => product._id === storedPendingChange.productId)?.key\n return key ? tBillingProduct(key, 'name') : storedPendingChange.productId\n })(),\n effectiveAt: new Date(storedPendingChange.effectiveAt),\n } : null)\n const [isKeepingCurrentPlan, setIsKeepingCurrentPlan] = useState(false)\n // Offered only while the change can still be withdrawn: minutes from renewal the operation refuses it, so the action is withheld\n // rather than shown to fail (#1868, `PLAN_CHANGE_WITHDRAWAL_CUTOFF_MS`).\n const onKeepCurrentPlan = props.onKeepCurrentPlan ?? (storedPendingChange && billing && isPendingPlanChangeWithdrawable(storedPendingChange) ? () => {\n setIsKeepingCurrentPlan(true)\n runBillingActionSafely(async () => {\n try { await billing.cancelPendingPlanChange() } finally { setIsKeepingCurrentPlan(false) }\n })\n } : undefined)\n\n const onSelectPlan = useCallback(\n (planKey: string, priceId: string) => {\n if (props.onSelectPlan) {\n props.onSelectPlan(planKey, priceId)\n return\n }\n if (!billing || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.SUBSCRIPTION, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES].every(billing.isSliceAvailable)) return\n if (billing.subscription) {\n if (document.activeElement instanceof HTMLElement) selectionTrigger.current = document.activeElement\n void planChange.select({ newProductKey: planKey, newPriceId: priceId })\n } else {\n // A plan its collection policy offers only by invoice is subscribed without checkout. A plan offering a card\n // keeps checkout here; an application offering the buyer the choice composes `openInvoicedSubscription` itself.\n const collection = resolveBillingCollectionPolicy(\n billing.getProductByKey(planKey)?.behaviorPolicy,\n billing.billingConfiguration?.defaultBehaviorPolicy?.defaultCollection,\n )\n if (collection.methods.includes(BillingCollectionMethod.CARD_AUTOMATIC)) {\n runBillingActionSafely(() => billing.openCheckout(planKey, priceId))\n } else {\n // The amount the buyer commits to, as the plan card shows it: the price and its billing interval. Quantity is\n // not shown, since this door subscribes one unit, as checkout does.\n const offered = plans.find(plan => plan.key === planKey)?.prices.find(entry => entry.priceId === priceId)\n const price = offered\n ? `${formatNumber(fromMoneyAmount(offered.price.amount, offered.price.decimals), {\n style: 'currency', currency: offered.price.currency, minimumFractionDigits: 0, maximumFractionDigits: offered.price.decimals,\n })}${tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, offered.interval === 'year' ? 'perYear' : 'perMonth')}`\n : ''\n setInvoiceConfirmation({ planKey, priceId, termDays: collection.invoicePaymentTermDays ?? 0, price })\n }\n }\n },\n [props.onSelectPlan, billing, runBillingActionSafely, planChange.select, plans, formatNumber, tComponent],\n )\n\n const unavailable = props.unavailable ?? (!!billing?.isEnabled && !(props.plans !== undefined) && [BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.SUBSCRIPTION].some(slice => !billing.isSliceAvailable(slice)))\n const isLoading = props.isLoading ?? billing?.isLoading\n const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null)\n\n if (!isReady) return null\n\n return (\n <>\n <Component\n {...props}\n plans={plans}\n currentPlanKey={currentPlanKey}\n onSelectPlan={onSelectPlan}\n isLoading={isLoading}\n error={error}\n unavailable={unavailable}\n isSelectionDisabled={props.isSelectionDisabled || planChange.state.phase === BillingPlanChangePhase.CONFIRMING || !!pendingPlanChange}\n pendingPlanChange={pendingPlanChange}\n onKeepCurrentPlan={onKeepCurrentPlan}\n isKeepingCurrentPlan={props.isKeepingCurrentPlan ?? isKeepingCurrentPlan}\n />\n {invoiceConfirmation && (\n <AlertDialog open onOpenChange={(open) => { if (!open) setInvoiceConfirmation(null) }}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirmTitle')}</AlertDialogTitle>\n <AlertDialogDescription>\n {tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirmDescription', {\n plan: tBillingProduct(invoiceConfirmation.planKey, 'name'),\n price: invoiceConfirmation.price,\n days: invoiceConfirmation.termDays,\n })}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel onClick={() => setInvoiceConfirmation(null)}>{tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceCancel')}</AlertDialogCancel>\n <AlertDialogAction onClick={() => {\n const confirmed = invoiceConfirmation\n setInvoiceConfirmation(null)\n if (confirmed && billing) runBillingActionSafely(() => billing.openInvoicedSubscription(confirmed.planKey, confirmed.priceId))\n }}>{tComponent(FrontendComponentType.LOW_LEVEL_BILLING_PRICING_TABLE, 'invoiceConfirm')}</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n )}\n {planChange.state.phase !== BillingPlanChangePhase.IDLE && (\n <PlanChangePreview\n targetPlanName={tBillingProduct(planChange.state.target.newProductKey, 'name')}\n preview={'preview' in planChange.state ? planChange.state.preview : null}\n isLoading={planChange.state.phase === BillingPlanChangePhase.PREVIEWING}\n isConfirming={planChange.state.phase === BillingPlanChangePhase.CONFIRMING}\n hasError={planChange.state.phase === BillingPlanChangePhase.FAILED || ('hasError' in planChange.state && planChange.state.hasError)}\n onCancel={planChange.cancel}\n onConfirm={planChange.state.phase === BillingPlanChangePhase.READY || planChange.state.phase === BillingPlanChangePhase.CONFIRMING ? () => { void planChange.confirm() } : undefined}\n onRetry={planChange.state.phase === BillingPlanChangePhase.FAILED ? () => {\n if (planChange.state.phase === BillingPlanChangePhase.FAILED) void planChange.select(planChange.state.target)\n } : undefined}\n />\n )}\n </>\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-subscription-status.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-subscription-status.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAY5H,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACtB,WAAW,CAAC,EAAE,UAAU,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAID;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,UAAU,GAAG,kBAAkB,CAAC,GACpH,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,UAAU,GAAG,kBAAkB,CAAC,CAAC,GAClF,oBAAoB,CAAA;AAEtB,wBAAgB,kBAAkB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"billing-subscription-status.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-subscription-status.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAG1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAY5H,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAA;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACtB,WAAW,CAAC,EAAE,UAAU,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAID;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,UAAU,GAAG,kBAAkB,CAAC,GACpH,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,QAAQ,GAAG,UAAU,GAAG,kBAAkB,CAAC,CAAC,GAClF,oBAAoB,CAAA;AAEtB,wBAAgB,kBAAkB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkE3I"}
|
|
@@ -32,7 +32,15 @@ export function SubscriptionStatus({ preset = CorePresetNames.DEFAULT, ...props
|
|
|
32
32
|
if (!billing?.isSliceAvailable(BillingStateSlice.PRICES) || !billing.currentPlanProduct)
|
|
33
33
|
return undefined;
|
|
34
34
|
const planPrices = billing.getPricesForProduct(billing.currentPlanProduct._id);
|
|
35
|
-
|
|
35
|
+
/*
|
|
36
|
+
* The price the subscription's plan line is billed at, by its own id (#4315 review): a guess among the plan's prices
|
|
37
|
+
* picks the default, and since the catalogue sync retires a price a definition no longer carries, the default can be a
|
|
38
|
+
* price this subscriber does not pay. The guess stays only for a line whose price the state does not hold.
|
|
39
|
+
*/
|
|
40
|
+
const planProductId = billing.currentPlanProduct._id;
|
|
41
|
+
const billedPriceId = billing.subscription?.items?.find(item => item.productId === planProductId)?.priceId;
|
|
42
|
+
const billedPrice = billedPriceId === undefined ? undefined : planPrices.find(p => p._id === billedPriceId);
|
|
43
|
+
const defaultPrice = billedPrice ?? planPrices.find(p => p.isDefault) ?? planPrices[0];
|
|
36
44
|
const price = defaultPrice?.unitPrice;
|
|
37
45
|
if (!price || !price.currency)
|
|
38
46
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-subscription-status.js","sourceRoot":"","sources":["../../../../src/components/billing/billing-subscription-status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAC5G,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAA;AACrG,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,0EAA0E,CAAA;AA8BjF,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkC;IAC/G,MAAM,OAAO,GAAG,cAAc,EAAE,CAAA;IAChC,MAAM,wBAAwB,GAAG,yBAAyB,EAAE,CAAA;IAC5D,MAAM,sBAAsB,GAAG,4BAA4B,EAAE,CAAA;IAC7D,MAAM,wBAAwB,GAAG,OAAO,CACtC,GAAG,EAAE,CAAC,+BAA+B,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAClE,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAC9B,CAAA;IACD,MAAM,EAAE,eAAe,EAAE,CAAC,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QACjE,IAAI,EAAE,CAAC,kBAAkB,EAAE,GAAG,wBAAwB,CAAC;K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,kBAAkB,CAAC,GAAG,CAAC,CAAA;QAC9E,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"billing-subscription-status.js","sourceRoot":"","sources":["../../../../src/components/billing/billing-subscription-status.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAC5G,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAA;AACrG,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,GAClC,MAAM,0EAA0E,CAAA;AA8BjF,MAAM,UAAU,kBAAkB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAkC;IAC/G,MAAM,OAAO,GAAG,cAAc,EAAE,CAAA;IAChC,MAAM,wBAAwB,GAAG,yBAAyB,EAAE,CAAA;IAC5D,MAAM,sBAAsB,GAAG,4BAA4B,EAAE,CAAA;IAC7D,MAAM,wBAAwB,GAAG,OAAO,CACtC,GAAG,EAAE,CAAC,+BAA+B,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAClE,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAC9B,CAAA;IACD,MAAM,EAAE,eAAe,EAAE,CAAC,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,OAAO,CAA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AAC,CAAC,OAAO,EAAE,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,iBAAiB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAClT,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,OAAO,EAAE,SAAS,CAAA;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAEzH,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,OAAO,CACL,KAAC,SAAS,OACJ,KAAK,EACT,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,GACxB,CACH,CAAA;AACH,CAAC","sourcesContent":["import { BillingStateSlice } from '@wildo-ai/saas-models'\nimport React, { useMemo } from 'react'\nimport type { MoneyValue } from '@wildo-ai/zod-decorators'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\nimport { useSafeBillingActionExecutor } from '~wildo-frontend-lib/core/billing/useSafeBillingActionExecutor'\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage'\nimport {\n collectBillingProviderLabelKeys,\n resolveBillingProviderDisplayName,\n} from '~wildo-frontend-lib/core/billing/billing-provider-display.frontend.utils'\n\n// --- Contract ---\n\nexport interface SubscriptionStatusProps {\n status: string | null\n planName: string | null\n providerName?: string\n currentPeriodEnd: Date | null\n cancelAtPeriodEnd?: boolean\n trialEnd?: Date | null\n nextPayment?: MoneyValue\n onManageBilling?: () => void\n isLoading?: boolean\n unavailable?: boolean\n error?: string | null\n}\n\n// --- Wrapper ---\n\n/**\n * Wrapper props: the context-hydratable data props are OPTIONAL here — the\n * wrapper fills `status` / `planName` / `currentPeriodEnd` (and the rest) from\n * `useBillingSafe()` when omitted. The PRESET contract above keeps them\n * required: the wrapper always materializes them before resolving the preset.\n */\nexport type SubscriptionStatusWrapperProps = Omit<SubscriptionStatusProps, 'status' | 'planName' | 'currentPeriodEnd'> &\n Partial<Pick<SubscriptionStatusProps, 'status' | 'planName' | 'currentPeriodEnd'>> &\n ComponentPresetProps\n\nexport function SubscriptionStatus({ preset = CorePresetNames.DEFAULT, ...props }: SubscriptionStatusWrapperProps): React.JSX.Element | null {\n const billing = useBillingSafe()\n const toUserFacingErrorMessage = useUserFacingErrorMessage()\n const runBillingActionSafely = useSafeBillingActionExecutor()\n const billingProviderLabelKeys = useMemo(\n () => collectBillingProviderLabelKeys(billing?.billingProviderRef),\n [billing?.billingProviderRef],\n )\n const { tBillingProduct, t: translateProvider, isReady } = useI18n({\n keys: ['billing_products', ...billingProviderLabelKeys],\n })\n const Component = createComponentResolver<SubscriptionStatusProps>(FrontendComponentType.LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS, 'SubscriptionStatus')(preset)\n\n const status = props.status ?? billing?.subscription?.status ?? null\n const planName = props.planName ?? (billing?.currentPlanKey ? tBillingProduct(billing.currentPlanKey, 'name') : null)\n const providerName = props.providerName ?? resolveBillingProviderDisplayName({\n providerRef: billing?.billingProviderRef,\n translate: translateProvider,\n })\n const currentPeriodEnd = props.currentPeriodEnd ?? billing?.subscription?.currentPeriodEnd ?? null\n const cancelAtPeriodEnd = props.cancelAtPeriodEnd ?? billing?.subscription?.cancelAtPeriodEnd\n const trialEnd = props.trialEnd !== undefined ? props.trialEnd : (billing?.subscription?.trialEnd ?? null)\n\n const nextPayment = useMemo(() => {\n if (props.nextPayment !== undefined) return props.nextPayment\n if (!billing?.isSliceAvailable(BillingStateSlice.PRICES) || !billing.currentPlanProduct) return undefined\n const planPrices = billing.getPricesForProduct(billing.currentPlanProduct._id)\n /*\n * The price the subscription's plan line is billed at, by its own id (#4315 review): a guess among the plan's prices\n * picks the default, and since the catalogue sync retires a price a definition no longer carries, the default can be a\n * price this subscriber does not pay. The guess stays only for a line whose price the state does not hold.\n */\n const planProductId = billing.currentPlanProduct._id\n const billedPriceId = billing.subscription?.items?.find(item => item.productId === planProductId)?.priceId\n const billedPrice = billedPriceId === undefined ? undefined : planPrices.find(p => p._id === billedPriceId)\n const defaultPrice = billedPrice ?? planPrices.find(p => p.isDefault) ?? planPrices[0]\n const price = defaultPrice?.unitPrice\n if (!price || !price.currency) return undefined\n return price as MoneyValue\n }, [props.nextPayment, billing?.currentPlanProduct, billing?.getPricesForProduct])\n\n const onManageBilling = props.onManageBilling ?? (billing?.isSliceAvailable(BillingStateSlice.BILLING_ACCOUNT) ? () => {\n runBillingActionSafely(() => billing.openCustomerPortal())\n } : undefined)\n const unavailable = props.unavailable ?? (!!billing?.isEnabled && !(props.status !== undefined && props.planName !== undefined && props.currentPeriodEnd !== undefined) && [BillingStateSlice.SUBSCRIPTION, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES].some(slice => !billing.isSliceAvailable(slice)))\n const isLoading = props.isLoading ?? billing?.isLoading\n const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null)\n\n if (!isReady) return null\n\n return (\n <Component\n {...props}\n status={status}\n planName={planName}\n providerName={providerName}\n currentPeriodEnd={currentPeriodEnd}\n cancelAtPeriodEnd={cancelAtPeriodEnd}\n trialEnd={trialEnd}\n nextPayment={nextPayment}\n onManageBilling={onManageBilling}\n isLoading={isLoading}\n error={error}\n unavailable={unavailable}\n />\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-usage-dashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-usage-dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAInD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAQ5H,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,WAAW,EAAE,wBAAwB,EAAE,CAAA;IACvC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAID;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,GAC5F,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC,GAC9D,oBAAoB,CAAA;AAEtB,wBAAgB,cAAc,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"billing-usage-dashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/billing/billing-usage-dashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAInD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAA;AAQ5H,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,WAAW,EAAE,wBAAwB,EAAE,CAAA;IACvC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAID;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,GAC5F,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC,GAC9D,oBAAoB,CAAA;AAEtB,wBAAgB,cAAc,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAyEnI"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useCallback } from 'react';
|
|
3
|
-
import { BillingStateSlice, ProductType } from '@wildo-ai/saas-models';
|
|
3
|
+
import { BillingStateSlice, ProductType, isPriceOffered } from '@wildo-ai/saas-models';
|
|
4
4
|
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
5
5
|
import { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models';
|
|
6
6
|
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
@@ -53,7 +53,8 @@ export function UsageDashboard({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
|
53
53
|
const creditPackProduct = billing.products.find(p => p.type === ProductType.CREDIT_PACK && p.purchaseConfig?.creditPoolKey === poolKey);
|
|
54
54
|
if (!creditPackProduct)
|
|
55
55
|
return;
|
|
56
|
-
|
|
56
|
+
// Offered prices only (#4315 review F1): checkout refuses a retired one.
|
|
57
|
+
const creditPackPrices = billing.getPricesForProduct(creditPackProduct._id).filter(isPriceOffered);
|
|
57
58
|
const defaultPrice = creditPackPrices.find(p => p.isDefault) ?? creditPackPrices[0];
|
|
58
59
|
if (defaultPrice) {
|
|
59
60
|
runBillingActionSafely(() => billing.openCheckout(creditPackProduct.key, defaultPrice._id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-usage-dashboard.js","sourceRoot":"","sources":["../../../../src/components/billing/billing-usage-dashboard.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAC5G,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAA;AA6CrG,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAA8B;IACvG,MAAM,OAAO,GAAG,cAAc,EAAE,CAAA;IAChC,MAAM,wBAAwB,GAAG,yBAAyB,EAAE,CAAA;IAC5D,MAAM,sBAAsB,GAAG,4BAA4B,EAAE,CAAA;IAC7D,MAAM,EAAE,eAAe,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC/D,IAAI,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;KACnD,CAAC,CAAA;IACF,MAAM,SAAS,GAAG,uBAAuB,CAAsB,qBAAqB,CAAC,iC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AgB,EAClC,sBAAsB,EAAE,sBAAsB,EAC9C,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;AACH,CAAC","sourcesContent":["import React, { useMemo, useCallback } from 'react'\nimport { BillingStateSlice, ProductType } from '@wildo-ai/saas-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\nimport { useSafeBillingActionExecutor } from '~wildo-frontend-lib/core/billing/useSafeBillingActionExecutor'\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage'\n\n// --- Contract ---\n\nexport interface UsageDashboardProduct {\n productKey: string\n productName: string\n currentPeriodUsage: number\n previousPeriodUsage?: number\n limit?: number\n lastRecordedAt?: Date\n}\n\nexport interface UsageDashboardCreditPool {\n poolKey: string\n poolName: string\n available: number\n totalPurchased: number\n /** Credits given rather than bought, such as referral rewards (#1802). */\n totalGranted: number\n totalConsumed: number\n}\n\nexport interface UsageDashboardProps {\n products: UsageDashboardProduct[]\n creditPools: UsageDashboardCreditPool[]\n onTopUp?: (poolKey: string) => void\n isLoading?: boolean\n usageUnavailable?: boolean\n creditPoolsUnavailable?: boolean\n error?: string | null\n}\n\n// --- Wrapper ---\n\n/**\n * Wrapper props: `products` / `creditPools` are OPTIONAL here — the wrapper\n * derives both from the billing usage state when omitted. The PRESET contract\n * above keeps them required: the wrapper always materializes them before\n * resolving the preset.\n */\nexport type UsageDashboardWrapperProps = Omit<UsageDashboardProps, 'products' | 'creditPools'> &\n Partial<Pick<UsageDashboardProps, 'products' | 'creditPools'>> &\n ComponentPresetProps\n\nexport function UsageDashboard({ preset = CorePresetNames.DEFAULT, ...props }: UsageDashboardWrapperProps): React.JSX.Element | null {\n const billing = useBillingSafe()\n const toUserFacingErrorMessage = useUserFacingErrorMessage()\n const runBillingActionSafely = useSafeBillingActionExecutor()\n const { tBillingProduct, tBillingCreditPool, isReady } = useI18n({\n keys: ['billing_products', 'billing_credit_pools'],\n })\n const Component = createComponentResolver<UsageDashboardProps>(FrontendComponentType.LOW_LEVEL_BILLING_USAGE_DASHBOARD, 'UsageDashboard')(preset)\n\n const products: UsageDashboardProduct[] = useMemo(() => {\n if (props.products) return props.products\n if (!billing?.usage?.byProduct) return []\n return Object.entries(billing.usage.byProduct).map(([productKey, data]) => ({\n productKey,\n productName: tBillingProduct(productKey, 'name'),\n currentPeriodUsage: data.currentPeriodUsage,\n previousPeriodUsage: data.previousPeriodUsage,\n limit: data.limit,\n lastRecordedAt: data.lastRecordedAt,\n }))\n }, [props.products, billing?.usage?.byProduct, tBillingProduct])\n\n const creditPools: UsageDashboardCreditPool[] = useMemo(() => {\n if (props.creditPools) return props.creditPools\n if (!billing?.creditPools) return []\n return Object.entries(billing.creditPools).map(([poolKey, data]) => ({\n poolKey,\n poolName: tBillingCreditPool(poolKey, 'name'),\n available: data.available,\n totalPurchased: data.totalPurchased,\n totalGranted: data.totalGranted ?? 0,\n totalConsumed: data.totalConsumed,\n }))\n }, [props.creditPools, billing?.creditPools, tBillingCreditPool])\n\n const onTopUp = useCallback((poolKey: string) => {\n if (props.onTopUp) {\n props.onTopUp(poolKey)\n return\n }\n if (!billing || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.CREDIT_POOLS].every(billing.isSliceAvailable)) return\n const creditPackProduct = billing.products.find(\n p => p.type === ProductType.CREDIT_PACK && p.purchaseConfig?.creditPoolKey === poolKey,\n )\n if (!creditPackProduct) return\n const creditPackPrices = billing.getPricesForProduct(creditPackProduct._id)\n const defaultPrice = creditPackPrices.find(p => p.isDefault) ?? creditPackPrices[0]\n if (defaultPrice) {\n runBillingActionSafely(() => billing.openCheckout(creditPackProduct.key, defaultPrice._id))\n }\n }, [props.onTopUp, billing, runBillingActionSafely])\n\n const usageUnavailable = props.usageUnavailable ?? (!!billing?.isEnabled && props.products === undefined && !billing.isSliceAvailable(BillingStateSlice.USAGE))\n const creditPoolsUnavailable = props.creditPoolsUnavailable ?? (!!billing?.isEnabled && props.creditPools === undefined && !billing.isSliceAvailable(BillingStateSlice.CREDIT_POOLS))\n const canTopUp = !!props.onTopUp || !!billing && [BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.CREDIT_POOLS].every(billing.isSliceAvailable)\n const isLoading = props.isLoading ?? billing?.isLoading\n const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null)\n\n if (!isReady) return null\n\n return (\n <Component\n {...props}\n products={products}\n creditPools={creditPools}\n onTopUp={canTopUp ? onTopUp : undefined}\n usageUnavailable={usageUnavailable}\n creditPoolsUnavailable={creditPoolsUnavailable}\n isLoading={isLoading}\n error={error}\n />\n )\n}\n"]}
|
|
1
|
+
{"version":3,"file":"billing-usage-dashboard.js","sourceRoot":"","sources":["../../../../src/components/billing/billing-usage-dashboard.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAA;AACzH,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAA;AAC5G,OAAO,EAAE,yBAAyB,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AAC,SAAS,IAAI,OAAO,EAAE,SAAS,CAAA;IACvD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAEzH,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,OAAO,CACL,KAAC,SAAS,OACJ,KAAK,EACT,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACvC,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,sBAAsB,EAC9C,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,GACZ,CACH,CAAA;AACH,CAAC","sourcesContent":["import React, { useMemo, useCallback } from 'react'\nimport { BillingStateSlice, ProductType, isPriceOffered } from '@wildo-ai/saas-models'\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper'\nimport { FrontendComponentType, CorePresetNames } from '@wildo-ai/presets-components-models'\nimport type { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas'\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n'\nimport { useBillingSafe } from '~wildo-frontend-lib/core/billing/useBilling'\nimport { useSafeBillingActionExecutor } from '~wildo-frontend-lib/core/billing/useSafeBillingActionExecutor'\nimport { useUserFacingErrorMessage } from '~wildo-frontend-lib/core/errors/useUserFacingErrorMessage'\n\n// --- Contract ---\n\nexport interface UsageDashboardProduct {\n productKey: string\n productName: string\n currentPeriodUsage: number\n previousPeriodUsage?: number\n limit?: number\n lastRecordedAt?: Date\n}\n\nexport interface UsageDashboardCreditPool {\n poolKey: string\n poolName: string\n available: number\n totalPurchased: number\n /** Credits given rather than bought, such as referral rewards (#1802). */\n totalGranted: number\n totalConsumed: number\n}\n\nexport interface UsageDashboardProps {\n products: UsageDashboardProduct[]\n creditPools: UsageDashboardCreditPool[]\n onTopUp?: (poolKey: string) => void\n isLoading?: boolean\n usageUnavailable?: boolean\n creditPoolsUnavailable?: boolean\n error?: string | null\n}\n\n// --- Wrapper ---\n\n/**\n * Wrapper props: `products` / `creditPools` are OPTIONAL here — the wrapper\n * derives both from the billing usage state when omitted. The PRESET contract\n * above keeps them required: the wrapper always materializes them before\n * resolving the preset.\n */\nexport type UsageDashboardWrapperProps = Omit<UsageDashboardProps, 'products' | 'creditPools'> &\n Partial<Pick<UsageDashboardProps, 'products' | 'creditPools'>> &\n ComponentPresetProps\n\nexport function UsageDashboard({ preset = CorePresetNames.DEFAULT, ...props }: UsageDashboardWrapperProps): React.JSX.Element | null {\n const billing = useBillingSafe()\n const toUserFacingErrorMessage = useUserFacingErrorMessage()\n const runBillingActionSafely = useSafeBillingActionExecutor()\n const { tBillingProduct, tBillingCreditPool, isReady } = useI18n({\n keys: ['billing_products', 'billing_credit_pools'],\n })\n const Component = createComponentResolver<UsageDashboardProps>(FrontendComponentType.LOW_LEVEL_BILLING_USAGE_DASHBOARD, 'UsageDashboard')(preset)\n\n const products: UsageDashboardProduct[] = useMemo(() => {\n if (props.products) return props.products\n if (!billing?.usage?.byProduct) return []\n return Object.entries(billing.usage.byProduct).map(([productKey, data]) => ({\n productKey,\n productName: tBillingProduct(productKey, 'name'),\n currentPeriodUsage: data.currentPeriodUsage,\n previousPeriodUsage: data.previousPeriodUsage,\n limit: data.limit,\n lastRecordedAt: data.lastRecordedAt,\n }))\n }, [props.products, billing?.usage?.byProduct, tBillingProduct])\n\n const creditPools: UsageDashboardCreditPool[] = useMemo(() => {\n if (props.creditPools) return props.creditPools\n if (!billing?.creditPools) return []\n return Object.entries(billing.creditPools).map(([poolKey, data]) => ({\n poolKey,\n poolName: tBillingCreditPool(poolKey, 'name'),\n available: data.available,\n totalPurchased: data.totalPurchased,\n totalGranted: data.totalGranted ?? 0,\n totalConsumed: data.totalConsumed,\n }))\n }, [props.creditPools, billing?.creditPools, tBillingCreditPool])\n\n const onTopUp = useCallback((poolKey: string) => {\n if (props.onTopUp) {\n props.onTopUp(poolKey)\n return\n }\n if (!billing || ![BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.CREDIT_POOLS].every(billing.isSliceAvailable)) return\n const creditPackProduct = billing.products.find(\n p => p.type === ProductType.CREDIT_PACK && p.purchaseConfig?.creditPoolKey === poolKey,\n )\n if (!creditPackProduct) return\n // Offered prices only (#4315 review F1): checkout refuses a retired one.\n const creditPackPrices = billing.getPricesForProduct(creditPackProduct._id).filter(isPriceOffered)\n const defaultPrice = creditPackPrices.find(p => p.isDefault) ?? creditPackPrices[0]\n if (defaultPrice) {\n runBillingActionSafely(() => billing.openCheckout(creditPackProduct.key, defaultPrice._id))\n }\n }, [props.onTopUp, billing, runBillingActionSafely])\n\n const usageUnavailable = props.usageUnavailable ?? (!!billing?.isEnabled && props.products === undefined && !billing.isSliceAvailable(BillingStateSlice.USAGE))\n const creditPoolsUnavailable = props.creditPoolsUnavailable ?? (!!billing?.isEnabled && props.creditPools === undefined && !billing.isSliceAvailable(BillingStateSlice.CREDIT_POOLS))\n const canTopUp = !!props.onTopUp || !!billing && [BillingStateSlice.BILLING_ACCOUNT, BillingStateSlice.PRODUCTS, BillingStateSlice.PRICES, BillingStateSlice.CREDIT_POOLS].every(billing.isSliceAvailable)\n const isLoading = props.isLoading ?? billing?.isLoading\n const error = props.error !== undefined ? props.error : (billing?.error ? toUserFacingErrorMessage(billing.error) : null)\n\n if (!isReady) return null\n\n return (\n <Component\n {...props}\n products={products}\n creditPools={creditPools}\n onTopUp={canTopUp ? onTopUp : undefined}\n usageUnavailable={usageUnavailable}\n creditPoolsUnavailable={creditPoolsUnavailable}\n isLoading={isLoading}\n error={error}\n />\n )\n}\n"]}
|