@wildo-ai/saas-frontend-lib 1.1.17 → 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/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/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 +14 -9
- 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 +31 -18
- 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/app-level/useMenuBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +5 -3
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.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 +47 -11
- 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 +17 -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 +13 -6
- 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.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/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/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/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/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 +33 -7
- 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 +69 -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 +35 -9
- 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 +69 -21
- 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 +6 -7
- 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/heatmap.builder.js +2 -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/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 +7 -7
- 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/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 +6 -8
- 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/statistical-family.builder.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -1
- 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/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 +27 -6
- 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 +30 -7
- 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 +4 -0
- 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/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 +14 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +17 -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":"verify-launcher-content.js","sourceRoot":"","sources":["../../../../src/core/config/verify-launcher-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIrG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAInG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,qCAAqC,EACrC,iCAAiC,GAClC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,kCAAkC,GACnC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,6BAA6B,GAC9B,MAAM,yCAAyC,CAAC;AAC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AAE,CAAC;QAClC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,KAAK,4BAA4B,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC5F,OAAO,CAAC,IAAI,CACV,GAAG,MAAM,KAAK,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,QAAQ,EAAE,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Launcher Content Verification\n *\n * DEV-mode startup validator that walks every content-declaring launcher's\n * configuration and verifies that all declared references resolve to real\n * registry entries (operations, views, engine pages, hosted components).\n *\n * Adapts traversal to each launcher's structural model — sidebar sections\n * use a discriminated union on `contentKind`, while other launchers are\n * flat item arrays.\n */\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, notificationBadgeIdentityKey } from '@wildo-ai/saas-models';\n\nimport type { AppConfiguration_Frontend } from './app-configuration-frontend.schemas';\nimport type { FrontendResourcesRegistry, AnyFrontendResourceConfiguration } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport type { CompositeViewDefinition } from './composite-view.schemas';\nimport type { FullCustomViewDefinition } from './full-custom-view.schemas';\nimport type { FlowsActorsViewDefinition } from './flows-actors-view.schemas';\nimport { FrontendView_ScopeMode } from './views-frontend.schemas';\nimport {\n findResourceOwnedViewReferenceMatches,\n resolveResourceOwnedViewReference,\n} from './resource-owned-view-resolution.frontend.utils';\nimport {\n findDuplicateAppScopeResourceTypes,\n} from './app-configuration-frontend.schemas';\nimport {\n ApplicationLevelComponentType,\n} from './app-level-components.frontend.schemas';\nimport {\n LauncherItemTargetKind,\n EnginePageRef,\n SidebarSectionContentKind,\n ENGINE_PAGE_METADATA,\n} from './launcher-items.frontend.schemas';\nimport type {\n LauncherItemRef,\n MenubarLauncherItem,\n ToolbarItem,\n SidebarItem,\n SidebarSection,\n SidebarSection_NavigationList,\n SidebarSection_ResourceBrowser,\n AppModeDefinition,\n} from './launcher-items.frontend.schemas';\n\n\n// ════════════════════════════════════════════════════════════════\n// Verification Result Types\n// ════════════════════════════════════════════════════════════════\n\nexport enum LauncherVerificationSeverity {\n ERROR = 'error',\n WARNING = 'warning',\n}\n\nimport { resolveSettingsHubConfig } from './useSettingsHubConfig';\n\nexport enum LauncherVerificationErrorCode {\n RESOURCE_NOT_FOUND = 'RESOURCE_NOT_FOUND',\n OPERATION_NOT_FOUND = 'OPERATION_NOT_FOUND',\n VIEW_NOT_FOUND = 'VIEW_NOT_FOUND',\n VIEW_REF_COLLISION = 'VIEW_REF_COLLISION',\n ENGINE_PAGE_NOT_FOUND = 'ENGINE_PAGE_NOT_FOUND',\n RESOURCE_BROWSER_RESOURCE_NOT_FOUND = 'RESOURCE_BROWSER_RESOURCE_NOT_FOUND',\n RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND = 'RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND',\n RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND = 'RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND',\n RESOURCE_BROWSER_MISSING_LABEL_CONFIG = 'RESOURCE_BROWSER_MISSING_LABEL_CONFIG',\n ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES = 'ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES',\n HOSTED_COMPONENT_NOT_CONFIGURED = 'HOSTED_COMPONENT_NOT_CONFIGURED',\n VISIBLE_IN_MODES_ORPHAN = 'VISIBLE_IN_MODES_ORPHAN',\n NOTIFICATION_BADGE_REF_NOT_FOUND = 'NOTIFICATION_BADGE_REF_NOT_FOUND',\n APP_SCOPE_DUPLICATE_RESOURCE_TYPE = 'APP_SCOPE_DUPLICATE_RESOURCE_TYPE',\n VIEW_NOT_LAUNCHABLE = 'VIEW_NOT_LAUNCHABLE',\n UNKNOWN_TARGET_KIND = 'UNKNOWN_TARGET_KIND',\n /**\n * A launcher opens a Settings Hub section the application did not PLACE.\n *\n * ERROR, because the failure is silent and lands the user somewhere plausible:\n * `resolveItemRef` falls back to the hub's DEFAULT section for an unknown\n * `sectionRef`, so a command labelled \"Billing\" opens Profile.\n */\n SETTINGS_SECTION_NOT_PLACED = 'SETTINGS_SECTION_NOT_PLACED',\n /**\n * A `runtimeAvailability.requiredRoles` names a role that is neither a core role nor one of the application's\n * organization roles (#2512). WARNING, because the entry then renders for nobody holding that spelling, silently: an\n * unknown role is inert, so a role gate never fails open. Not an error, because the table checked against is the\n * organization roles the backend publishes, so a custom APPLICATION-level role is reported too.\n */\n REQUIRED_ROLES_UNKNOWN_ROLE = 'REQUIRED_ROLES_UNKNOWN_ROLE',\n}\n\nexport interface LauncherVerificationError {\n severity: LauncherVerificationSeverity;\n code: LauncherVerificationErrorCode;\n context: string;\n message: string;\n item?: unknown;\n}\n\nexport interface LauncherVerificationResult {\n errors: LauncherVerificationError[];\n isValid: boolean;\n}\n\n// ════════════════════════════════════════════════════════════════\n// View Registry — collected from AppConfiguration_Frontend\n// ════════════════════════════════════════════════════════════════\n\ninterface ViewDefinitionBase {\n ref: string;\n}\n\ninterface ViewRegistry {\n applicationViewsByRef: Map<string, { family: 'composite' | 'fullCustom' | 'flowsActors' }>;\n duplicateApplicationViewRefs: Set<string>;\n compositeViewsByRef: Map<string, CompositeViewDefinition>;\n fullCustomViewsByRef: Map<string, FullCustomViewDefinition>;\n flowsActorsViewsByRef: Map<string, FlowsActorsViewDefinition>;\n}\n\nfunction buildViewRegistry(appConfig: AppConfiguration_Frontend): ViewRegistry {\n const applicationViewsByRef = new Map<string, { family: 'composite' | 'fullCustom' | 'flowsActors' }>();\n const duplicateApplicationViewRefs = new Set<string>();\n const compositeViewsByRef = new Map<string, CompositeViewDefinition>();\n const fullCustomViewsByRef = new Map<string, FullCustomViewDefinition>();\n const flowsActorsViewsByRef = new Map<string, FlowsActorsViewDefinition>();\n\n const registerScopedView = (\n view: ViewDefinitionBase & { scope: FrontendView_ScopeMode },\n family: 'composite' | 'fullCustom' | 'flowsActors',\n ): void => {\n if (view.scope !== FrontendView_ScopeMode.APPLICATION) {\n return;\n }\n\n if (applicationViewsByRef.has(view.ref)) {\n duplicateApplicationViewRefs.add(view.ref);\n return;\n }\n\n applicationViewsByRef.set(view.ref, { family });\n };\n\n for (const compositeView of appConfig.compositeViews ?? []) {\n compositeViewsByRef.set(compositeView.ref, compositeView);\n registerScopedView(compositeView, 'composite');\n }\n\n for (const fullCustomView of appConfig.fullCustomViews ?? []) {\n fullCustomViewsByRef.set(fullCustomView.ref, fullCustomView);\n registerScopedView(fullCustomView, 'fullCustom');\n }\n\n for (const flowsActorsView of appConfig.flowsActorsViews ?? []) {\n flowsActorsViewsByRef.set(flowsActorsView.ref, flowsActorsView);\n registerScopedView(flowsActorsView, 'flowsActors');\n }\n\n return {\n applicationViewsByRef,\n duplicateApplicationViewRefs,\n compositeViewsByRef,\n fullCustomViewsByRef,\n flowsActorsViewsByRef,\n };\n}\n\nfunction verifyScopedViewRef(\n item: Extract<LauncherItemRef, { viewRef: string }>,\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n scope: 'application' | 'resource',\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n const viewEntry = scope === 'application'\n ? resolveApplicationScopedViewEntry(item.viewRef, viewRegistry, context, errors, item)\n : resolveResourceScopedViewEntry(item as Extract<LauncherItemRef, { kind: LauncherItemTargetKind.RESOURCE_VIEW }>, registry, context, errors);\n if (!viewEntry) {\n return;\n }\n\n switch (viewEntry.family) {\n case 'fullCustom': {\n const fullCustomView = viewRegistry.fullCustomViewsByRef.get(item.viewRef);\n if (fullCustomView && isComponentRegistered && !isComponentRegistered(fullCustomView.componentRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context,\n message: `Full custom view \"${item.viewRef}\" references component \"${fullCustomView.componentRef}\" which is not registered in ComponentRegistryService`,\n item,\n });\n }\n break;\n }\n\n case 'composite':\n case 'flowsActors':\n break;\n }\n}\n\nfunction resolveApplicationScopedViewEntry(\n viewRef: string,\n viewRegistry: ViewRegistry,\n context: string,\n errors: LauncherVerificationError[],\n item: LauncherItemRef,\n): { family: 'composite' | 'fullCustom' | 'flowsActors' } | null {\n if (viewRegistry.duplicateApplicationViewRefs.has(viewRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context,\n message: `Application view ref \"${viewRef}\" is declared by multiple special-view families in the same launcher scope`,\n item,\n });\n return null;\n }\n\n const viewEntry = viewRegistry.applicationViewsByRef.get(viewRef);\n if (!viewEntry) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_FOUND,\n context,\n message: `Application view \"${viewRef}\" not found in any compatible special-view definition`,\n item,\n });\n return null;\n }\n\n return viewEntry;\n}\n\nfunction resolveResourceScopedViewEntry(\n item: Extract<LauncherItemRef, { kind: LauncherItemTargetKind.RESOURCE_VIEW }>,\n registry: FrontendResourcesRegistry,\n context: string,\n errors: LauncherVerificationError[],\n): { family: 'composite' | 'chart' | 'execution' } | null {\n const resourceConfig = registry.resourceConfigurations[item.resourceType];\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_NOT_FOUND,\n context,\n message: `Resource type \"${item.resourceType}\" not found in registry`,\n item,\n });\n return null;\n }\n\n const viewMatches = findResourceOwnedViewReferenceMatches({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry,\n });\n if (viewMatches.length > 1) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context,\n message: `Resource view ref \"${item.viewRef}\" is declared multiple times on resource \"${item.resourceType}\". RESOURCE_VIEW refs must be unique per resource-owned view namespace.`,\n item,\n });\n return null;\n }\n\n const resolvedView = resolveResourceOwnedViewReference({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry,\n });\n if (resolvedView) {\n if (resolvedView.scope !== FrontendView_ScopeMode.RESOURCE) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_LAUNCHABLE,\n context,\n message: `Resource view \"${item.viewRef}\" on resource \"${item.resourceType}\" must be declared with RESOURCE scope to be targeted by RESOURCE_VIEW launchers`,\n item,\n });\n return null;\n }\n return { family: resolvedView.family };\n }\n\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_FOUND,\n context,\n message: `Resource view \"${item.viewRef}\" is not declared on resource \"${item.resourceType}\"`,\n item,\n });\n return null;\n}\n\n// ════════════════════════════════════════════════════════════════\n// Item Reference Verification\n// ════════════════════════════════════════════════════════════════\n\nfunction verifyItemRef(\n item: LauncherItemRef,\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n /**\n * Section refs the application actually placed in its settings rail.\n *\n * REQUIRED rather than optional on purpose: an optional parameter lets a call\n * site silently skip the check, which is precisely the \"invariant applied at\n * one of N call sites\" shape (`invariant-call-site-enumeration.md`). Required,\n * the compiler enumerates the sites for you.\n */\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n switch (item.kind) {\n case LauncherItemTargetKind.RESOURCE_OPERATION: {\n const resourceConfig = registry.resourceConfigurations[item.resourceType];\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_NOT_FOUND,\n context,\n message: `Resource type \"${item.resourceType}\" not found in registry`,\n item,\n });\n return;\n }\n const matchingOperations = resourceConfig.operations.filter(\n (op: { operationIdentifier: string; variantKey?: string; isOperationDefault?: boolean }) => (\n op.operationIdentifier === item.operation\n ),\n );\n const opExists = item.operationVariant\n ? matchingOperations.some((op) => op.variantKey === item.operationVariant)\n : matchingOperations.length > 0;\n if (!opExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.OPERATION_NOT_FOUND,\n context,\n message: `Operation \"${item.operation}\"${item.operationVariant ? ` (variant: ${item.operationVariant})` : ''} not found on resource \"${item.resourceType}\"`,\n item,\n });\n } else if (!item.operationVariant) {\n const defaultOperations = matchingOperations.filter((op) => op.isOperationDefault === true);\n if (matchingOperations.length > 1 && defaultOperations.length !== 1) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.OPERATION_NOT_FOUND,\n context,\n message: `Operation \"${item.operation}\" on resource \"${item.resourceType}\" is ambiguous without an explicit launcher operationVariant`,\n item,\n });\n }\n }\n break;\n }\n\n case LauncherItemTargetKind.VIEW: {\n verifyScopedViewRef(item, context, registry, viewRegistry, errors, 'application', isComponentRegistered);\n break;\n }\n\n case LauncherItemTargetKind.RESOURCE_VIEW: {\n verifyScopedViewRef(item, context, registry, viewRegistry, errors, 'resource', isComponentRegistered);\n break;\n }\n\n case LauncherItemTargetKind.ENGINE_PAGE: {\n if (!(item.pageRef in ENGINE_PAGE_METADATA)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.ENGINE_PAGE_NOT_FOUND,\n context,\n message: `Engine page ref \"${item.pageRef}\" has no entry in ENGINE_PAGE_METADATA`,\n item,\n });\n }\n break;\n }\n\n case LauncherItemTargetKind.CUSTOM_COMPONENT: {\n if (isComponentRegistered && !isComponentRegistered(item.componentRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context,\n message: `Custom launcher component \"${item.componentRef}\" is not registered in ComponentRegistryService`,\n item,\n });\n }\n break;\n }\n\n case LauncherItemTargetKind.SETTINGS_SECTION: {\n // This case used to `break` with a comment saying a settings launcher ref\n // is \"always structurally valid\" because the hub falls back to its default\n // section. That fallback is exactly why the ref MUST be checked: it turns a\n // dangling reference into a silently wrong destination rather than an\n // error, so nothing downstream can ever report it.\n //\n // An omitted `sectionRef` is legitimate — it means \"open the hub at its\n // default section\" — so only a NAMED ref is checked.\n if (item.sectionRef !== undefined && !placedSettingsSectionRefs.has(item.sectionRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.SETTINGS_SECTION_NOT_PLACED,\n context,\n message: `Launcher opens Settings Hub section \"${item.sectionRef}\", which this application does not place in its settings rail (\\`settingsHub.placements\\`); the hub would silently open its default section instead.`,\n item,\n });\n }\n break;\n }\n\n default: {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.UNKNOWN_TARGET_KIND,\n context,\n message: `Unknown LauncherItemTargetKind: \"${(item as LauncherItemRef).kind}\"`,\n item,\n });\n }\n }\n}\n\n/**\n * A launcher item's `notificationBadgeRef` must name a registered definition — sidebar and menubar\n * items alike, since both draw it with `NavigationItemBadge`.\n *\n * Matched on the badge KEY (`<scope>:<identifier>`), which is what `NavigationItemBadge` resolves\n * with and what the badge store indexes by. Matching on the bare `identifier` — the previous\n * behaviour — accepted a ref that names a definition at a DIFFERENT scope from the one that would\n * actually render, and reported nothing.\n */\nfunction verifyNotificationBadgeRef(\n item: LauncherItemRef & { notificationBadgeRef?: string },\n context: string,\n registry: FrontendResourcesRegistry,\n errors: LauncherVerificationError[],\n): void {\n if (!item.notificationBadgeRef\n || registry.notificationBadgeDefinitions.some((definition) => notificationBadgeIdentityKey(definition) === item.notificationBadgeRef)) {\n return;\n }\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.NOTIFICATION_BADGE_REF_NOT_FOUND,\n context,\n message: `notificationBadgeRef \"${item.notificationBadgeRef}\" does not resolve to a registered notification badge definition. `\n + `A ref is a badge key (\"<scope>:<identifier>\"); registered keys are: `\n + `${registry.notificationBadgeDefinitions.map(notificationBadgeIdentityKey).join(', ') || '(none)'}`,\n item,\n });\n}\n\n/**\n * Recursively verify sidebar items (navigation list children can nest).\n */\nfunction verifySidebarItems(\n items: SidebarItem[],\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n for (const item of items) {\n verifyItemRef(item, context, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n verifyNotificationBadgeRef(item, context, registry, errors);\n if (item.children) {\n verifySidebarItems(item.children, `${context}.children`, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n}\n\n// ════════════════════════════════════════════════════════════════\n// Sidebar Section Verification\n// ════════════════════════════════════════════════════════════════\n\nfunction verifySidebarSection(\n section: SidebarSection,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n appModeRefs: Set<string>,\n errors: LauncherVerificationError[],\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n const ctx = `sidebar.contentSections[${section.ref}]`;\n\n // Verify visibleInModes refs match declared appModes\n if (section.visibleInModes && section.visibleInModes.length > 0) {\n if (appModeRefs.size === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.VISIBLE_IN_MODES_ORPHAN,\n context: ctx,\n message: `Section has visibleInModes but no appModes are declared — section will always be hidden`,\n item: section,\n });\n } else {\n for (const modeRef of section.visibleInModes) {\n if (!appModeRefs.has(modeRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.VISIBLE_IN_MODES_ORPHAN,\n context: ctx,\n message: `visibleInModes ref \"${modeRef}\" does not match any declared appMode`,\n item: section,\n });\n }\n }\n }\n }\n\n switch (section.contentKind) {\n case SidebarSectionContentKind.NAVIGATION_LIST: {\n const navSection = section as SidebarSection_NavigationList;\n verifySidebarItems(navSection.children, ctx, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n break;\n }\n\n case SidebarSectionContentKind.RESOURCE_BROWSER: {\n const browserSection = section as SidebarSection_ResourceBrowser;\n const resourceConfig = registry.resourceConfigurations[browserSection.resourceType];\n\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_RESOURCE_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER resourceType \"${browserSection.resourceType}\" not found in registry`,\n item: section,\n });\n break;\n }\n\n if (browserSection.operation) {\n const opExists = resourceConfig.operations.some(\n (op: { operationIdentifier: string; variantKey?: string }) =>\n op.operationIdentifier === browserSection.operation &&\n (!browserSection.operationVariant || op.variantKey === browserSection.operationVariant),\n );\n if (!opExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER bound operation \"${browserSection.operation}\"${browserSection.operationVariant ? ` (variant: ${browserSection.operationVariant})` : ''} not found on \"${browserSection.resourceType}\"`,\n item: section,\n });\n }\n }\n\n if (browserSection.navigateOperation) {\n const navigateOpExists = resourceConfig.operations.some(\n (op: { operationIdentifier: string; variantKey?: string }) =>\n op.operationIdentifier === browserSection.navigateOperation &&\n (!browserSection.navigateOperationVariant || op.variantKey === browserSection.navigateOperationVariant),\n );\n if (!navigateOpExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER navigation operation \"${browserSection.navigateOperation}\"${browserSection.navigateOperationVariant ? ` (variant: ${browserSection.navigateOperationVariant})` : ''} not found on \"${browserSection.resourceType}\"`,\n item: section,\n });\n }\n }\n\n // Warn when no label derivation is configured — SidebarResourceBrowser names instances through the shared\n // resolver (`computeFrontendResourceLabel`), which falls back to the record's declared summary fields, then\n // its id; an explicit config is preferred.\n if (!FrontendResourceUtils.frontendResourceLabelDefinitionOf(resourceConfig)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_MISSING_LABEL_CONFIG,\n context: ctx,\n message: `RESOURCE_BROWSER for \"${browserSection.resourceType}\" has no record label configured (recordLabelFields on the resource, or getFrontendResourceLabel in its frontendConfiguration) — instance labels will fall back to the record's summary fields, then its id`,\n item: section,\n });\n }\n break;\n }\n\n case SidebarSectionContentKind.GUIDANCE_WIDGET:\n case SidebarSectionContentKind.CUSTOM_COMPONENT:\n break;\n }\n}\n\n// ════════════════════════════════════════════════════════════════\n// Main Verification Function\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Validates all launcher content declarations against the resource registry\n * and view definitions. Adapts traversal per launcher's structural model.\n *\n * Call at startup in DEV mode only. Returns errors/warnings — does not throw.\n */\nexport function verifyLauncherContent(\n registry: FrontendResourcesRegistry,\n appConfig: AppConfiguration_Frontend,\n isComponentRegistered?: (componentRef: string) => boolean,\n /**\n * What the BACKEND published, which the frontend config does not carry: the organization role keys\n * (`AppConfiguration_Shared.organizationRoles`) that `requiredRoles` is checked against.\n */\n backendPublished?: { readonly organizationRoles?: readonly string[] },\n): LauncherVerificationResult {\n const errors: LauncherVerificationError[] = [];\n const config = appConfig.appComponentsConfiguration;\n const viewRegistry = buildViewRegistry(appConfig);\n\n // The section refs this application actually places. Derived through the same\n // resolver the hub renders with, so the verifier cannot disagree with what a\n // user will see — an unplaced destination is absent from both.\n const placedSettingsSectionRefs: ReadonlySet<string> = new Set(\n resolveSettingsHubConfig(appConfig.settingsHub).sections.map(section => section.ref),\n );\n\n // Collect appMode refs for cross-validation\n const appModeRefs = new Set<string>();\n const appModes: AppModeDefinition[] = appConfig.appModes ?? [];\n for (const mode of appModes) {\n appModeRefs.add(mode.ref);\n }\n\n const appScopeFields = appConfig.appScope?.fields ?? [];\n const duplicateAppScopeResourceTypes = findDuplicateAppScopeResourceTypes(appScopeFields);\n for (const duplicate of duplicateAppScopeResourceTypes) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.APP_SCOPE_DUPLICATE_RESOURCE_TYPE,\n context: 'appScope.fields',\n message: `Duplicate app-scope resourceType \"${duplicate.resourceType}\" is not allowed in appScope.fields. Conflicting fieldIdentifiers: ${duplicate.fieldIdentifiers.join(', ')}`,\n item: duplicate,\n });\n }\n\n for (const duplicateViewRef of viewRegistry.duplicateApplicationViewRefs) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context: 'applicationViews',\n message: `Application view ref \"${duplicateViewRef}\" is declared by multiple special-view families. View refs must be unique per launcher scope.`,\n item: duplicateViewRef,\n });\n }\n\n // ── SIDEBAR: verify per content kind ──\n const sidebarConfig = config[ApplicationLevelComponentType.SIDEBAR];\n if (typeof sidebarConfig === 'object' && sidebarConfig !== null && 'contentSections' in sidebarConfig) {\n const contentSections = (sidebarConfig as { contentSections?: SidebarSection[] }).contentSections;\n if (contentSections) {\n for (const section of contentSections) {\n verifySidebarSection(section, registry, viewRegistry, appModeRefs, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── COMMAND_MENU: verify commands ──\n const cmdConfig = config[ApplicationLevelComponentType.COMMAND_MENU];\n if (typeof cmdConfig === 'object' && cmdConfig !== null && 'commands' in cmdConfig) {\n const commands = (cmdConfig as { commands?: LauncherItemRef[] }).commands;\n if (commands) {\n for (const cmd of commands) {\n verifyItemRef(cmd, 'command_menu.commands', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── HOTKEY: verify bindings ──\n const hotkeyConfig = config[ApplicationLevelComponentType.HOTKEY];\n if (typeof hotkeyConfig === 'object' && hotkeyConfig !== null && 'bindings' in hotkeyConfig) {\n const bindings = (hotkeyConfig as { bindings?: LauncherItemRef[] }).bindings;\n if (bindings) {\n for (const binding of bindings) {\n verifyItemRef(binding, 'hotkey.bindings', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── QUICK_ACTION_BUTTON: verify actions ──\n const qabConfig = config[ApplicationLevelComponentType.QUICK_ACTION_BUTTON];\n if (typeof qabConfig === 'object' && qabConfig !== null && 'actions' in qabConfig) {\n const actions = (qabConfig as { actions?: LauncherItemRef[] }).actions;\n if (actions) {\n for (const action of actions) {\n verifyItemRef(action, 'quick_action_button.actions', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── CONTROL_PANEL: verify items ──\n const cpConfig = config[ApplicationLevelComponentType.CONTROL_PANEL];\n if (typeof cpConfig === 'object' && cpConfig !== null && 'items' in cpConfig) {\n const items = (cpConfig as { items?: LauncherItemRef[] }).items;\n if (items) {\n for (const item of items) {\n verifyItemRef(item, 'control_panel.items', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── TOOLBAR: verify tools ──\n const toolbarConfig = config[ApplicationLevelComponentType.TOOLBAR];\n if (typeof toolbarConfig === 'object' && toolbarConfig !== null && 'tools' in toolbarConfig) {\n const tools = (toolbarConfig as { tools?: ToolbarItem[] }).tools;\n if (tools) {\n for (const tool of tools) {\n verifyItemRef(tool, 'toolbar.tools', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── MENUBAR: verify hostedComponents + items ──\n const menubarConfig = config[ApplicationLevelComponentType.MENUBAR];\n if (typeof menubarConfig === 'object' && menubarConfig !== null) {\n if ('hostedComponents' in menubarConfig) {\n const hostedComponents = (menubarConfig as { hostedComponents?: Array<{ componentType: string }> }).hostedComponents;\n if (hostedComponents) {\n for (const hosted of hostedComponents) {\n const componentKey = hosted.componentType as keyof typeof config;\n if (!(componentKey in config)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context: 'menubar.hostedComponents',\n message: `Hosted component \"${hosted.componentType}\" is not configured in appComponentsConfiguration`,\n item: hosted,\n });\n }\n }\n }\n }\n if ('items' in menubarConfig) {\n const items = (menubarConfig as { items?: MenubarLauncherItem[] }).items;\n if (items) {\n for (const item of items) {\n verifyItemRef(item, 'menubar.items', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n verifyNotificationBadgeRef(item, 'menubar.items', registry, errors);\n }\n }\n }\n }\n\n // ── ACTIVITY_BAR: verify appModes exist ──\n const activityBarConfig = config[ApplicationLevelComponentType.ACTIVITY_BAR];\n if (typeof activityBarConfig === 'object' && activityBarConfig !== null) {\n if (appModes.length === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES,\n context: 'activity_bar',\n message: 'ACTIVITY_BAR is configured but no appModes are declared — the mode selector will have nothing to render',\n item: activityBarConfig,\n });\n }\n } else if (activityBarConfig === true) {\n if (appModes.length === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES,\n context: 'activity_bar',\n message: 'ACTIVITY_BAR is enabled but no appModes are declared — the mode selector will have nothing to render',\n item: activityBarConfig,\n });\n }\n }\n\n verifyLauncherAudiences(config, backendPublished?.organizationRoles, errors);\n\n return { errors, isValid: errors.length === 0 };\n}\n\n/**\n * Every `runtimeAvailability.requiredRoles` across the launcher surfaces, against the roles that exist: the core\n * application and organization roles and the application's published organization roles. Skipped when the backend\n * publishes no organization role table, since every custom role would then read as unknown.\n */\nfunction verifyLauncherAudiences(\n config: AppConfiguration_Frontend['appComponentsConfiguration'],\n organizationRoles: readonly string[] | undefined,\n errors: LauncherVerificationError[],\n): void {\n if (!organizationRoles?.length) return;\n const knownRoles = new Set<string>([...Object.values(CORE_APP_ROLES), ...Object.values(CORE_ORG_ROLES), ...organizationRoles]);\n const visit = (declaration: unknown, context: string): void => {\n if (typeof declaration !== 'object' || declaration === null) return;\n const record = declaration as { runtimeAvailability?: { requiredRoles?: unknown }; children?: unknown };\n const roles = record.runtimeAvailability?.requiredRoles;\n if (Array.isArray(roles)) {\n for (const role of roles) {\n if (typeof role === 'string' && !knownRoles.has(role)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.REQUIRED_ROLES_UNKNOWN_ROLE,\n context,\n message: `requiredRoles names \"${role}\", which is neither a core role nor one of the application's organization roles: `\n + 'nobody holds it, so the entry is shown to none of the roles meant by it. Check the spelling (a custom application-level role is also reported here).',\n item: declaration,\n });\n }\n }\n }\n if (Array.isArray(record.children)) record.children.forEach((child, index) => visit(child, `${context}.children[${index}]`));\n };\n const listOf = (key: ApplicationLevelComponentType, field: string): unknown[] => {\n const surface = config[key as keyof typeof config] as unknown;\n if (typeof surface !== 'object' || surface === null) return [];\n const list = (surface as Record<string, unknown>)[field];\n return Array.isArray(list) ? list : [];\n };\n listOf(ApplicationLevelComponentType.SIDEBAR, 'contentSections').forEach((section, index) => visit(section, `sidebar.contentSections[${index}]`));\n listOf(ApplicationLevelComponentType.COMMAND_MENU, 'commands').forEach((entry, index) => visit(entry, `command_menu.commands[${index}]`));\n listOf(ApplicationLevelComponentType.HOTKEY, 'bindings').forEach((entry, index) => visit(entry, `hotkey.bindings[${index}]`));\n listOf(ApplicationLevelComponentType.QUICK_ACTION_BUTTON, 'actions').forEach((entry, index) => visit(entry, `quick_action_button.actions[${index}]`));\n listOf(ApplicationLevelComponentType.CONTROL_PANEL, 'items').forEach((entry, index) => visit(entry, `control_panel.items[${index}]`));\n listOf(ApplicationLevelComponentType.TOOLBAR, 'tools').forEach((entry, index) => visit(entry, `toolbar.tools[${index}]`));\n listOf(ApplicationLevelComponentType.MENUBAR, 'items').forEach((entry, index) => visit(entry, `menubar.items[${index}]`));\n}\n\n// ════════════════════════════════════════════════════════════════\n// Console Reporter\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Formats and logs verification results to the console.\n * Groups errors by severity and includes a summary table.\n */\nexport function reportLauncherVerificationResults(result: LauncherVerificationResult): void {\n if (result.isValid) {\n console.log('[LauncherVerification] ✓ All launcher content declarations are valid');\n return;\n }\n\n const errorCount = result.errors.filter(e => e.severity === LauncherVerificationSeverity.ERROR).length;\n const warningCount = result.errors.filter(e => e.severity === LauncherVerificationSeverity.WARNING).length;\n\n console.group(\n `[LauncherVerification] ${errorCount} error(s), ${warningCount} warning(s)`,\n );\n\n for (const error of result.errors) {\n const prefix = error.severity === LauncherVerificationSeverity.ERROR ? '✗ ERROR' : '⚠ WARN';\n console.warn(\n `${prefix} [${error.code}] ${error.context}: ${error.message}`,\n );\n }\n\n console.groupEnd();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"verify-launcher-content.js","sourceRoot":"","sources":["../../../../src/core/config/verify-launcher-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAIrG,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAInG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EACL,qCAAqC,EACrC,iCAAiC,GAClC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,kCAAkC,GACnC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,6BAA6B,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,sBAAsB,EAEtB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AA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rB,CAAC","sourcesContent":["/**\n * Launcher Content Verification\n *\n * DEV-mode startup validator that walks every content-declaring launcher's\n * configuration and verifies that all declared references resolve to real\n * registry entries (operations, views, engine pages, hosted components).\n *\n * Adapts traversal to each launcher's structural model — sidebar sections\n * use a discriminated union on `contentKind`, while other launchers are\n * flat item arrays.\n */\n\nimport { CORE_APP_ROLES, CORE_ORG_ROLES, notificationBadgeIdentityKey } from '@wildo-ai/saas-models';\n\nimport type { AppConfiguration_Frontend } from './app-configuration-frontend.schemas';\nimport type { FrontendResourcesRegistry, AnyFrontendResourceConfiguration } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport type { CompositeViewDefinition } from './composite-view.schemas';\nimport type { FullCustomViewDefinition } from './full-custom-view.schemas';\nimport type { FlowsActorsViewDefinition } from './flows-actors-view.schemas';\nimport { FrontendView_ScopeMode } from './views-frontend.schemas';\nimport {\n findResourceOwnedViewReferenceMatches,\n resolveResourceOwnedViewReference,\n} from './resource-owned-view-resolution.frontend.utils';\nimport {\n findDuplicateAppScopeResourceTypes,\n} from './app-configuration-frontend.schemas';\nimport {\n ApplicationLevelComponentType,\n} from './app-level-components.frontend.schemas';\nimport {\n LauncherItemTargetKind,\n EnginePageRef,\n SidebarSectionContentKind,\n ENGINE_PAGE_METADATA,\n} from './launcher-items.frontend.schemas';\nimport type {\n LauncherItemRef,\n MenubarLauncherItem,\n ToolbarItem,\n SidebarItem,\n SidebarSection,\n SidebarSection_NavigationList,\n SidebarSection_ResourceBrowser,\n AppModeDefinition,\n} from './launcher-items.frontend.schemas';\n\n\n// ════════════════════════════════════════════════════════════════\n// Verification Result Types\n// ════════════════════════════════════════════════════════════════\n\nexport enum LauncherVerificationSeverity {\n ERROR = 'error',\n WARNING = 'warning',\n}\n\nimport { resolveSettingsHubConfig } from './useSettingsHubConfig';\n\nexport enum LauncherVerificationErrorCode {\n RESOURCE_NOT_FOUND = 'RESOURCE_NOT_FOUND',\n OPERATION_NOT_FOUND = 'OPERATION_NOT_FOUND',\n VIEW_NOT_FOUND = 'VIEW_NOT_FOUND',\n VIEW_REF_COLLISION = 'VIEW_REF_COLLISION',\n ENGINE_PAGE_NOT_FOUND = 'ENGINE_PAGE_NOT_FOUND',\n RESOURCE_BROWSER_RESOURCE_NOT_FOUND = 'RESOURCE_BROWSER_RESOURCE_NOT_FOUND',\n RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND = 'RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND',\n RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND = 'RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND',\n RESOURCE_BROWSER_MISSING_LABEL_CONFIG = 'RESOURCE_BROWSER_MISSING_LABEL_CONFIG',\n ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES = 'ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES',\n HOSTED_COMPONENT_NOT_CONFIGURED = 'HOSTED_COMPONENT_NOT_CONFIGURED',\n VISIBLE_IN_MODES_ORPHAN = 'VISIBLE_IN_MODES_ORPHAN',\n NOTIFICATION_BADGE_REF_NOT_FOUND = 'NOTIFICATION_BADGE_REF_NOT_FOUND',\n APP_SCOPE_DUPLICATE_RESOURCE_TYPE = 'APP_SCOPE_DUPLICATE_RESOURCE_TYPE',\n VIEW_NOT_LAUNCHABLE = 'VIEW_NOT_LAUNCHABLE',\n UNKNOWN_TARGET_KIND = 'UNKNOWN_TARGET_KIND',\n /**\n * A launcher opens a Settings Hub section the application did not PLACE.\n *\n * ERROR, because the failure is silent and lands the user somewhere plausible:\n * `resolveItemRef` falls back to the hub's DEFAULT section for an unknown\n * `sectionRef`, so a command labelled \"Billing\" opens Profile.\n */\n SETTINGS_SECTION_NOT_PLACED = 'SETTINGS_SECTION_NOT_PLACED',\n /**\n * A `runtimeAvailability.requiredRoles` names a role that is neither a core role nor one of the application's\n * organization roles (#2512). WARNING, because the entry then renders for nobody holding that spelling, silently: an\n * unknown role is inert, so a role gate never fails open. Not an error, because the table checked against is the\n * organization roles the backend publishes, so a custom APPLICATION-level role is reported too.\n */\n REQUIRED_ROLES_UNKNOWN_ROLE = 'REQUIRED_ROLES_UNKNOWN_ROLE',\n /**\n * A `homeDefinition.audienceHomes` audience names a role that is neither a core role nor one of the application's\n * organization roles (#4576). WARNING for the reason {@link REQUIRED_ROLES_UNKNOWN_ROLE} is: nobody holds that\n * spelling, so the audience's members silently open on the default home instead of theirs.\n */\n HOME_AUDIENCE_UNKNOWN_ROLE = 'HOME_AUDIENCE_UNKNOWN_ROLE',\n}\n\nexport interface LauncherVerificationError {\n severity: LauncherVerificationSeverity;\n code: LauncherVerificationErrorCode;\n context: string;\n message: string;\n item?: unknown;\n}\n\nexport interface LauncherVerificationResult {\n errors: LauncherVerificationError[];\n isValid: boolean;\n}\n\n// ════════════════════════════════════════════════════════════════\n// View Registry — collected from AppConfiguration_Frontend\n// ════════════════════════════════════════════════════════════════\n\ninterface ViewDefinitionBase {\n ref: string;\n}\n\ninterface ViewRegistry {\n applicationViewsByRef: Map<string, { family: 'composite' | 'fullCustom' | 'flowsActors' }>;\n duplicateApplicationViewRefs: Set<string>;\n compositeViewsByRef: Map<string, CompositeViewDefinition>;\n fullCustomViewsByRef: Map<string, FullCustomViewDefinition>;\n flowsActorsViewsByRef: Map<string, FlowsActorsViewDefinition>;\n}\n\nfunction buildViewRegistry(appConfig: AppConfiguration_Frontend): ViewRegistry {\n const applicationViewsByRef = new Map<string, { family: 'composite' | 'fullCustom' | 'flowsActors' }>();\n const duplicateApplicationViewRefs = new Set<string>();\n const compositeViewsByRef = new Map<string, CompositeViewDefinition>();\n const fullCustomViewsByRef = new Map<string, FullCustomViewDefinition>();\n const flowsActorsViewsByRef = new Map<string, FlowsActorsViewDefinition>();\n\n const registerScopedView = (\n view: ViewDefinitionBase & { scope: FrontendView_ScopeMode },\n family: 'composite' | 'fullCustom' | 'flowsActors',\n ): void => {\n if (view.scope !== FrontendView_ScopeMode.APPLICATION) {\n return;\n }\n\n if (applicationViewsByRef.has(view.ref)) {\n duplicateApplicationViewRefs.add(view.ref);\n return;\n }\n\n applicationViewsByRef.set(view.ref, { family });\n };\n\n for (const compositeView of appConfig.compositeViews ?? []) {\n compositeViewsByRef.set(compositeView.ref, compositeView);\n registerScopedView(compositeView, 'composite');\n }\n\n for (const fullCustomView of appConfig.fullCustomViews ?? []) {\n fullCustomViewsByRef.set(fullCustomView.ref, fullCustomView);\n registerScopedView(fullCustomView, 'fullCustom');\n }\n\n for (const flowsActorsView of appConfig.flowsActorsViews ?? []) {\n flowsActorsViewsByRef.set(flowsActorsView.ref, flowsActorsView);\n registerScopedView(flowsActorsView, 'flowsActors');\n }\n\n return {\n applicationViewsByRef,\n duplicateApplicationViewRefs,\n compositeViewsByRef,\n fullCustomViewsByRef,\n flowsActorsViewsByRef,\n };\n}\n\nfunction verifyScopedViewRef(\n item: Extract<LauncherItemRef, { viewRef: string }>,\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n scope: 'application' | 'resource',\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n const viewEntry = scope === 'application'\n ? resolveApplicationScopedViewEntry(item.viewRef, viewRegistry, context, errors, item)\n : resolveResourceScopedViewEntry(item as Extract<LauncherItemRef, { kind: LauncherItemTargetKind.RESOURCE_VIEW }>, registry, context, errors);\n if (!viewEntry) {\n return;\n }\n\n switch (viewEntry.family) {\n case 'fullCustom': {\n const fullCustomView = viewRegistry.fullCustomViewsByRef.get(item.viewRef);\n if (fullCustomView && isComponentRegistered && !isComponentRegistered(fullCustomView.componentRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context,\n message: `Full custom view \"${item.viewRef}\" references component \"${fullCustomView.componentRef}\" which is not registered in ComponentRegistryService`,\n item,\n });\n }\n break;\n }\n\n case 'composite':\n case 'flowsActors':\n break;\n }\n}\n\nfunction resolveApplicationScopedViewEntry(\n viewRef: string,\n viewRegistry: ViewRegistry,\n context: string,\n errors: LauncherVerificationError[],\n item: LauncherItemRef,\n): { family: 'composite' | 'fullCustom' | 'flowsActors' } | null {\n if (viewRegistry.duplicateApplicationViewRefs.has(viewRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context,\n message: `Application view ref \"${viewRef}\" is declared by multiple special-view families in the same launcher scope`,\n item,\n });\n return null;\n }\n\n const viewEntry = viewRegistry.applicationViewsByRef.get(viewRef);\n if (!viewEntry) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_FOUND,\n context,\n message: `Application view \"${viewRef}\" not found in any compatible special-view definition`,\n item,\n });\n return null;\n }\n\n return viewEntry;\n}\n\nfunction resolveResourceScopedViewEntry(\n item: Extract<LauncherItemRef, { kind: LauncherItemTargetKind.RESOURCE_VIEW }>,\n registry: FrontendResourcesRegistry,\n context: string,\n errors: LauncherVerificationError[],\n): { family: 'composite' | 'chart' | 'execution' } | null {\n const resourceConfig = registry.resourceConfigurations[item.resourceType];\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_NOT_FOUND,\n context,\n message: `Resource type \"${item.resourceType}\" not found in registry`,\n item,\n });\n return null;\n }\n\n const viewMatches = findResourceOwnedViewReferenceMatches({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry,\n });\n if (viewMatches.length > 1) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context,\n message: `Resource view ref \"${item.viewRef}\" is declared multiple times on resource \"${item.resourceType}\". RESOURCE_VIEW refs must be unique per resource-owned view namespace.`,\n item,\n });\n return null;\n }\n\n const resolvedView = resolveResourceOwnedViewReference({\n resourceType: item.resourceType,\n viewRef: item.viewRef,\n registry,\n });\n if (resolvedView) {\n if (resolvedView.scope !== FrontendView_ScopeMode.RESOURCE) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_LAUNCHABLE,\n context,\n message: `Resource view \"${item.viewRef}\" on resource \"${item.resourceType}\" must be declared with RESOURCE scope to be targeted by RESOURCE_VIEW launchers`,\n item,\n });\n return null;\n }\n return { family: resolvedView.family };\n }\n\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_NOT_FOUND,\n context,\n message: `Resource view \"${item.viewRef}\" is not declared on resource \"${item.resourceType}\"`,\n item,\n });\n return null;\n}\n\n// ════════════════════════════════════════════════════════════════\n// Item Reference Verification\n// ════════════════════════════════════════════════════════════════\n\nfunction verifyItemRef(\n item: LauncherItemRef,\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n /**\n * Section refs the application actually placed in its settings rail.\n *\n * REQUIRED rather than optional on purpose: an optional parameter lets a call\n * site silently skip the check, which is precisely the \"invariant applied at\n * one of N call sites\" shape (`invariant-call-site-enumeration.md`). Required,\n * the compiler enumerates the sites for you.\n */\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n switch (item.kind) {\n case LauncherItemTargetKind.RESOURCE_OPERATION: {\n const resourceConfig = registry.resourceConfigurations[item.resourceType];\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_NOT_FOUND,\n context,\n message: `Resource type \"${item.resourceType}\" not found in registry`,\n item,\n });\n return;\n }\n const matchingOperations = resourceConfig.operations.filter(\n (op: { operationIdentifier: string; variantKey?: string; isOperationDefault?: boolean }) => (\n op.operationIdentifier === item.operation\n ),\n );\n const opExists = item.operationVariant\n ? matchingOperations.some((op) => op.variantKey === item.operationVariant)\n : matchingOperations.length > 0;\n if (!opExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.OPERATION_NOT_FOUND,\n context,\n message: `Operation \"${item.operation}\"${item.operationVariant ? ` (variant: ${item.operationVariant})` : ''} not found on resource \"${item.resourceType}\"`,\n item,\n });\n } else if (!item.operationVariant) {\n const defaultOperations = matchingOperations.filter((op) => op.isOperationDefault === true);\n if (matchingOperations.length > 1 && defaultOperations.length !== 1) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.OPERATION_NOT_FOUND,\n context,\n message: `Operation \"${item.operation}\" on resource \"${item.resourceType}\" is ambiguous without an explicit launcher operationVariant`,\n item,\n });\n }\n }\n break;\n }\n\n case LauncherItemTargetKind.VIEW: {\n verifyScopedViewRef(item, context, registry, viewRegistry, errors, 'application', isComponentRegistered);\n break;\n }\n\n case LauncherItemTargetKind.RESOURCE_VIEW: {\n verifyScopedViewRef(item, context, registry, viewRegistry, errors, 'resource', isComponentRegistered);\n break;\n }\n\n case LauncherItemTargetKind.ENGINE_PAGE: {\n if (!(item.pageRef in ENGINE_PAGE_METADATA)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.ENGINE_PAGE_NOT_FOUND,\n context,\n message: `Engine page ref \"${item.pageRef}\" has no entry in ENGINE_PAGE_METADATA`,\n item,\n });\n }\n break;\n }\n\n case LauncherItemTargetKind.CUSTOM_COMPONENT: {\n if (isComponentRegistered && !isComponentRegistered(item.componentRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context,\n message: `Custom launcher component \"${item.componentRef}\" is not registered in ComponentRegistryService`,\n item,\n });\n }\n break;\n }\n\n case LauncherItemTargetKind.SETTINGS_SECTION: {\n // This case used to `break` with a comment saying a settings launcher ref\n // is \"always structurally valid\" because the hub falls back to its default\n // section. That fallback is exactly why the ref MUST be checked: it turns a\n // dangling reference into a silently wrong destination rather than an\n // error, so nothing downstream can ever report it.\n //\n // An omitted `sectionRef` is legitimate — it means \"open the hub at its\n // default section\" — so only a NAMED ref is checked.\n if (item.sectionRef !== undefined && !placedSettingsSectionRefs.has(item.sectionRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.SETTINGS_SECTION_NOT_PLACED,\n context,\n message: `Launcher opens Settings Hub section \"${item.sectionRef}\", which this application does not place in its settings rail (\\`settingsHub.placements\\`); the hub would silently open its default section instead.`,\n item,\n });\n }\n break;\n }\n\n default: {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.UNKNOWN_TARGET_KIND,\n context,\n message: `Unknown LauncherItemTargetKind: \"${(item as LauncherItemRef).kind}\"`,\n item,\n });\n }\n }\n}\n\n/**\n * A launcher item's `notificationBadgeRef` must name a registered definition — sidebar and menubar\n * items alike, since both draw it with `NavigationItemBadge`.\n *\n * Matched on the badge KEY (`<scope>:<identifier>`), which is what `NavigationItemBadge` resolves\n * with and what the badge store indexes by. Matching on the bare `identifier` — the previous\n * behaviour — accepted a ref that names a definition at a DIFFERENT scope from the one that would\n * actually render, and reported nothing.\n */\nfunction verifyNotificationBadgeRef(\n item: LauncherItemRef & { notificationBadgeRef?: string },\n context: string,\n registry: FrontendResourcesRegistry,\n errors: LauncherVerificationError[],\n): void {\n if (!item.notificationBadgeRef\n || registry.notificationBadgeDefinitions.some((definition) => notificationBadgeIdentityKey(definition) === item.notificationBadgeRef)) {\n return;\n }\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.NOTIFICATION_BADGE_REF_NOT_FOUND,\n context,\n message: `notificationBadgeRef \"${item.notificationBadgeRef}\" does not resolve to a registered notification badge definition. `\n + `A ref is a badge key (\"<scope>:<identifier>\"); registered keys are: `\n + `${registry.notificationBadgeDefinitions.map(notificationBadgeIdentityKey).join(', ') || '(none)'}`,\n item,\n });\n}\n\n/**\n * Recursively verify sidebar items (navigation list children can nest).\n */\nfunction verifySidebarItems(\n items: SidebarItem[],\n context: string,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n errors: LauncherVerificationError[],\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n for (const item of items) {\n verifyItemRef(item, context, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n verifyNotificationBadgeRef(item, context, registry, errors);\n if (item.children) {\n verifySidebarItems(item.children, `${context}.children`, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n}\n\n// ════════════════════════════════════════════════════════════════\n// Sidebar Section Verification\n// ════════════════════════════════════════════════════════════════\n\nfunction verifySidebarSection(\n section: SidebarSection,\n registry: FrontendResourcesRegistry,\n viewRegistry: ViewRegistry,\n appModeRefs: Set<string>,\n errors: LauncherVerificationError[],\n placedSettingsSectionRefs: ReadonlySet<string>,\n isComponentRegistered?: (componentRef: string) => boolean,\n): void {\n const ctx = `sidebar.contentSections[${section.ref}]`;\n\n // Verify visibleInModes refs match declared appModes\n if (section.visibleInModes && section.visibleInModes.length > 0) {\n if (appModeRefs.size === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.VISIBLE_IN_MODES_ORPHAN,\n context: ctx,\n message: `Section has visibleInModes but no appModes are declared — section will always be hidden`,\n item: section,\n });\n } else {\n for (const modeRef of section.visibleInModes) {\n if (!appModeRefs.has(modeRef)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.VISIBLE_IN_MODES_ORPHAN,\n context: ctx,\n message: `visibleInModes ref \"${modeRef}\" does not match any declared appMode`,\n item: section,\n });\n }\n }\n }\n }\n\n switch (section.contentKind) {\n case SidebarSectionContentKind.NAVIGATION_LIST: {\n const navSection = section as SidebarSection_NavigationList;\n verifySidebarItems(navSection.children, ctx, registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n break;\n }\n\n case SidebarSectionContentKind.RESOURCE_BROWSER: {\n const browserSection = section as SidebarSection_ResourceBrowser;\n const resourceConfig = registry.resourceConfigurations[browserSection.resourceType];\n\n if (!resourceConfig) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_RESOURCE_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER resourceType \"${browserSection.resourceType}\" not found in registry`,\n item: section,\n });\n break;\n }\n\n if (browserSection.operation) {\n const opExists = resourceConfig.operations.some(\n (op: { operationIdentifier: string; variantKey?: string }) =>\n op.operationIdentifier === browserSection.operation &&\n (!browserSection.operationVariant || op.variantKey === browserSection.operationVariant),\n );\n if (!opExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_BOUND_OPERATION_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER bound operation \"${browserSection.operation}\"${browserSection.operationVariant ? ` (variant: ${browserSection.operationVariant})` : ''} not found on \"${browserSection.resourceType}\"`,\n item: section,\n });\n }\n }\n\n if (browserSection.navigateOperation) {\n const navigateOpExists = resourceConfig.operations.some(\n (op: { operationIdentifier: string; variantKey?: string }) =>\n op.operationIdentifier === browserSection.navigateOperation &&\n (!browserSection.navigateOperationVariant || op.variantKey === browserSection.navigateOperationVariant),\n );\n if (!navigateOpExists) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_NAVIGATION_OPERATION_NOT_FOUND,\n context: ctx,\n message: `RESOURCE_BROWSER navigation operation \"${browserSection.navigateOperation}\"${browserSection.navigateOperationVariant ? ` (variant: ${browserSection.navigateOperationVariant})` : ''} not found on \"${browserSection.resourceType}\"`,\n item: section,\n });\n }\n }\n\n // Warn when no label derivation is configured — SidebarResourceBrowser names instances through the shared\n // resolver (`computeFrontendResourceLabel`), which falls back to the record's declared summary fields, then\n // its id; an explicit config is preferred.\n if (!FrontendResourceUtils.frontendResourceLabelDefinitionOf(resourceConfig)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.RESOURCE_BROWSER_MISSING_LABEL_CONFIG,\n context: ctx,\n message: `RESOURCE_BROWSER for \"${browserSection.resourceType}\" has no record label configured (recordLabelFields on the resource, or getFrontendResourceLabel in its frontendConfiguration) — instance labels will fall back to the record's summary fields, then its id`,\n item: section,\n });\n }\n break;\n }\n\n case SidebarSectionContentKind.GUIDANCE_WIDGET:\n case SidebarSectionContentKind.CUSTOM_COMPONENT:\n break;\n }\n}\n\n// ════════════════════════════════════════════════════════════════\n// Main Verification Function\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Validates all launcher content declarations against the resource registry\n * and view definitions. Adapts traversal per launcher's structural model.\n *\n * Call at startup in DEV mode only. Returns errors/warnings — does not throw.\n */\nexport function verifyLauncherContent(\n registry: FrontendResourcesRegistry,\n appConfig: AppConfiguration_Frontend,\n isComponentRegistered?: (componentRef: string) => boolean,\n /**\n * What the BACKEND published, which the frontend config does not carry: the organization role keys\n * (`AppConfiguration_Shared.organizationRoles`) that `requiredRoles` is checked against.\n */\n backendPublished?: { readonly organizationRoles?: readonly string[] },\n): LauncherVerificationResult {\n const errors: LauncherVerificationError[] = [];\n const config = appConfig.appComponentsConfiguration;\n const viewRegistry = buildViewRegistry(appConfig);\n\n // The section refs this application actually places. Derived through the same\n // resolver the hub renders with, so the verifier cannot disagree with what a\n // user will see — an unplaced destination is absent from both.\n const placedSettingsSectionRefs: ReadonlySet<string> = new Set(\n resolveSettingsHubConfig(appConfig.settingsHub).sections.map(section => section.ref),\n );\n\n // Collect appMode refs for cross-validation\n const appModeRefs = new Set<string>();\n const appModes: AppModeDefinition[] = appConfig.appModes ?? [];\n for (const mode of appModes) {\n appModeRefs.add(mode.ref);\n }\n\n const appScopeFields = appConfig.appScope?.fields ?? [];\n const duplicateAppScopeResourceTypes = findDuplicateAppScopeResourceTypes(appScopeFields);\n for (const duplicate of duplicateAppScopeResourceTypes) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.APP_SCOPE_DUPLICATE_RESOURCE_TYPE,\n context: 'appScope.fields',\n message: `Duplicate app-scope resourceType \"${duplicate.resourceType}\" is not allowed in appScope.fields. Conflicting fieldIdentifiers: ${duplicate.fieldIdentifiers.join(', ')}`,\n item: duplicate,\n });\n }\n\n for (const duplicateViewRef of viewRegistry.duplicateApplicationViewRefs) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.VIEW_REF_COLLISION,\n context: 'applicationViews',\n message: `Application view ref \"${duplicateViewRef}\" is declared by multiple special-view families. View refs must be unique per launcher scope.`,\n item: duplicateViewRef,\n });\n }\n\n // ── SIDEBAR: verify per content kind ──\n const sidebarConfig = config[ApplicationLevelComponentType.SIDEBAR];\n if (typeof sidebarConfig === 'object' && sidebarConfig !== null && 'contentSections' in sidebarConfig) {\n const contentSections = (sidebarConfig as { contentSections?: SidebarSection[] }).contentSections;\n if (contentSections) {\n for (const section of contentSections) {\n verifySidebarSection(section, registry, viewRegistry, appModeRefs, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── COMMAND_MENU: verify commands ──\n const cmdConfig = config[ApplicationLevelComponentType.COMMAND_MENU];\n if (typeof cmdConfig === 'object' && cmdConfig !== null && 'commands' in cmdConfig) {\n const commands = (cmdConfig as { commands?: LauncherItemRef[] }).commands;\n if (commands) {\n for (const cmd of commands) {\n verifyItemRef(cmd, 'command_menu.commands', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── HOTKEY: verify bindings ──\n const hotkeyConfig = config[ApplicationLevelComponentType.HOTKEY];\n if (typeof hotkeyConfig === 'object' && hotkeyConfig !== null && 'bindings' in hotkeyConfig) {\n const bindings = (hotkeyConfig as { bindings?: LauncherItemRef[] }).bindings;\n if (bindings) {\n for (const binding of bindings) {\n verifyItemRef(binding, 'hotkey.bindings', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── QUICK_ACTION_BUTTON: verify actions ──\n const qabConfig = config[ApplicationLevelComponentType.QUICK_ACTION_BUTTON];\n if (typeof qabConfig === 'object' && qabConfig !== null && 'actions' in qabConfig) {\n const actions = (qabConfig as { actions?: LauncherItemRef[] }).actions;\n if (actions) {\n for (const action of actions) {\n verifyItemRef(action, 'quick_action_button.actions', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── CONTROL_PANEL: verify items ──\n const cpConfig = config[ApplicationLevelComponentType.CONTROL_PANEL];\n if (typeof cpConfig === 'object' && cpConfig !== null && 'items' in cpConfig) {\n const items = (cpConfig as { items?: LauncherItemRef[] }).items;\n if (items) {\n for (const item of items) {\n verifyItemRef(item, 'control_panel.items', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── TOOLBAR: verify tools ──\n const toolbarConfig = config[ApplicationLevelComponentType.TOOLBAR];\n if (typeof toolbarConfig === 'object' && toolbarConfig !== null && 'tools' in toolbarConfig) {\n const tools = (toolbarConfig as { tools?: ToolbarItem[] }).tools;\n if (tools) {\n for (const tool of tools) {\n verifyItemRef(tool, 'toolbar.tools', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n }\n }\n }\n\n // ── MENUBAR: verify hostedComponents + items ──\n const menubarConfig = config[ApplicationLevelComponentType.MENUBAR];\n if (typeof menubarConfig === 'object' && menubarConfig !== null) {\n if ('hostedComponents' in menubarConfig) {\n const hostedComponents = (menubarConfig as { hostedComponents?: Array<{ componentType: string }> }).hostedComponents;\n if (hostedComponents) {\n for (const hosted of hostedComponents) {\n const componentKey = hosted.componentType as keyof typeof config;\n if (!(componentKey in config)) {\n errors.push({\n severity: LauncherVerificationSeverity.ERROR,\n code: LauncherVerificationErrorCode.HOSTED_COMPONENT_NOT_CONFIGURED,\n context: 'menubar.hostedComponents',\n message: `Hosted component \"${hosted.componentType}\" is not configured in appComponentsConfiguration`,\n item: hosted,\n });\n }\n }\n }\n }\n if ('items' in menubarConfig) {\n const items = (menubarConfig as { items?: MenubarLauncherItem[] }).items;\n if (items) {\n for (const item of items) {\n verifyItemRef(item, 'menubar.items', registry, viewRegistry, errors, placedSettingsSectionRefs, isComponentRegistered);\n verifyNotificationBadgeRef(item, 'menubar.items', registry, errors);\n }\n }\n }\n }\n\n // ── ACTIVITY_BAR: verify appModes exist ──\n const activityBarConfig = config[ApplicationLevelComponentType.ACTIVITY_BAR];\n if (typeof activityBarConfig === 'object' && activityBarConfig !== null) {\n if (appModes.length === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES,\n context: 'activity_bar',\n message: 'ACTIVITY_BAR is configured but no appModes are declared — the mode selector will have nothing to render',\n item: activityBarConfig,\n });\n }\n } else if (activityBarConfig === true) {\n if (appModes.length === 0) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.ACTIVITY_BAR_ENABLED_BUT_NO_APP_MODES,\n context: 'activity_bar',\n message: 'ACTIVITY_BAR is enabled but no appModes are declared — the mode selector will have nothing to render',\n item: activityBarConfig,\n });\n }\n }\n\n verifyLauncherAudiences(config, backendPublished?.organizationRoles, errors);\n verifyHomeAudiences(appConfig.homeDefinition, backendPublished?.organizationRoles, errors);\n\n return { errors, isValid: errors.length === 0 };\n}\n\n/**\n * Every `runtimeAvailability.requiredRoles` across the launcher surfaces, against the roles that exist: the core\n * application and organization roles and the application's published organization roles. Skipped when the backend\n * publishes no organization role table, since every custom role would then read as unknown.\n */\nfunction verifyLauncherAudiences(\n config: AppConfiguration_Frontend['appComponentsConfiguration'],\n organizationRoles: readonly string[] | undefined,\n errors: LauncherVerificationError[],\n): void {\n if (!organizationRoles?.length) return;\n const knownRoles = new Set<string>([...Object.values(CORE_APP_ROLES), ...Object.values(CORE_ORG_ROLES), ...organizationRoles]);\n const visit = (declaration: unknown, context: string): void => {\n if (typeof declaration !== 'object' || declaration === null) return;\n const record = declaration as { runtimeAvailability?: { requiredRoles?: unknown }; children?: unknown };\n const roles = record.runtimeAvailability?.requiredRoles;\n if (Array.isArray(roles)) {\n for (const role of roles) {\n if (typeof role === 'string' && !knownRoles.has(role)) {\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.REQUIRED_ROLES_UNKNOWN_ROLE,\n context,\n message: `requiredRoles names \"${role}\", which is neither a core role nor one of the application's organization roles: `\n + 'nobody holds it, so the entry is shown to none of the roles meant by it. Check the spelling (a custom application-level role is also reported here).',\n item: declaration,\n });\n }\n }\n }\n if (Array.isArray(record.children)) record.children.forEach((child, index) => visit(child, `${context}.children[${index}]`));\n };\n const listOf = (key: ApplicationLevelComponentType, field: string): unknown[] => {\n const surface = config[key as keyof typeof config] as unknown;\n if (typeof surface !== 'object' || surface === null) return [];\n const list = (surface as Record<string, unknown>)[field];\n return Array.isArray(list) ? list : [];\n };\n listOf(ApplicationLevelComponentType.SIDEBAR, 'contentSections').forEach((section, index) => visit(section, `sidebar.contentSections[${index}]`));\n listOf(ApplicationLevelComponentType.COMMAND_MENU, 'commands').forEach((entry, index) => visit(entry, `command_menu.commands[${index}]`));\n listOf(ApplicationLevelComponentType.HOTKEY, 'bindings').forEach((entry, index) => visit(entry, `hotkey.bindings[${index}]`));\n listOf(ApplicationLevelComponentType.QUICK_ACTION_BUTTON, 'actions').forEach((entry, index) => visit(entry, `quick_action_button.actions[${index}]`));\n listOf(ApplicationLevelComponentType.CONTROL_PANEL, 'items').forEach((entry, index) => visit(entry, `control_panel.items[${index}]`));\n listOf(ApplicationLevelComponentType.TOOLBAR, 'tools').forEach((entry, index) => visit(entry, `toolbar.tools[${index}]`));\n listOf(ApplicationLevelComponentType.MENUBAR, 'items').forEach((entry, index) => visit(entry, `menubar.items[${index}]`));\n}\n\n/**\n * Every `homeDefinition.audienceHomes[].audience.roles` against the same roles {@link verifyLauncherAudiences} knows,\n * because an audience is decided by the same role decision a launcher entry's `requiredRoles` is (`useResolvedHome`).\n * Skipped when the backend publishes no organization role table, for the same reason.\n */\nfunction verifyHomeAudiences(\n homeDefinition: AppConfiguration_Frontend['homeDefinition'],\n organizationRoles: readonly string[] | undefined,\n errors: LauncherVerificationError[],\n): void {\n if (!organizationRoles?.length || !homeDefinition?.audienceHomes?.length) return;\n const knownRoles = new Set<string>([...Object.values(CORE_APP_ROLES), ...Object.values(CORE_ORG_ROLES), ...organizationRoles]);\n homeDefinition.audienceHomes.forEach((entry, index) => {\n for (const role of entry.audience.roles) {\n if (knownRoles.has(role)) continue;\n errors.push({\n severity: LauncherVerificationSeverity.WARNING,\n code: LauncherVerificationErrorCode.HOME_AUDIENCE_UNKNOWN_ROLE,\n context: `homeDefinition.audienceHomes[${index}].audience`,\n message: `The home audience names \"${role}\", which is neither a core role nor one of the application's organization roles: `\n + 'nobody holds it, so the people it is meant for open on the default home. Check the spelling (a custom application-level role is also reported here).',\n item: entry,\n });\n }\n });\n}\n\n// ════════════════════════════════════════════════════════════════\n// Console Reporter\n// ════════════════════════════════════════════════════════════════\n\n/**\n * Formats and logs verification results to the console.\n * Groups errors by severity and includes a summary table.\n */\nexport function reportLauncherVerificationResults(result: LauncherVerificationResult): void {\n if (result.isValid) {\n console.log('[LauncherVerification] ✓ All launcher content declarations are valid');\n return;\n }\n\n const errorCount = result.errors.filter(e => e.severity === LauncherVerificationSeverity.ERROR).length;\n const warningCount = result.errors.filter(e => e.severity === LauncherVerificationSeverity.WARNING).length;\n\n console.group(\n `[LauncherVerification] ${errorCount} error(s), ${warningCount} warning(s)`,\n );\n\n for (const error of result.errors) {\n const prefix = error.severity === LauncherVerificationSeverity.ERROR ? '✗ ERROR' : '⚠ WARN';\n console.warn(\n `${prefix} [${error.code}] ${error.context}: ${error.message}`,\n );\n }\n\n console.groupEnd();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/core/errors/GlobalErrorHandler.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAkBH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"GlobalErrorHandler.d.ts","sourceRoot":"","sources":["../../../../src/core/errors/GlobalErrorHandler.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAkBH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA+BpE;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,GACR,EAAE,uBAAuB,GAAG,IAAI,CAgRhC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -25,6 +25,7 @@ import { errorManagement } from './error-management.frontend.service.js';
|
|
|
25
25
|
import { LabellingTypes } from '@wildo-ai/presets-components-models';
|
|
26
26
|
import { resolveUserFacingErrorMessage } from './user-facing-error-message.frontend.utils.js';
|
|
27
27
|
import { wildoErrorIsShownToUser } from './backend-refusal.frontend.js';
|
|
28
|
+
import { isPlanRefusalPromptHostMounted, planRefusalOf } from '../../core/features/plan-refusal.frontend.js';
|
|
28
29
|
/** How long a toast raised before the error words settle waits for them (#2542). */
|
|
29
30
|
const ERROR_WORDS_WAIT_MS = 4000;
|
|
30
31
|
const logger = LoggerFrontendService.getLogger();
|
|
@@ -264,6 +265,15 @@ export function GlobalErrorHandler({ onError, }) {
|
|
|
264
265
|
&& action !== ErrorActionFrontend.SHOW_MODAL),
|
|
265
266
|
};
|
|
266
267
|
}
|
|
268
|
+
else if (shouldNotify && planRefusalOf(wildoError) && isPlanRefusalPromptHostMounted()) {
|
|
269
|
+
// A plan refusal is shown by the plan-refusal prompt, with its fence and whom to ask, so no generic toast beside it.
|
|
270
|
+
errorForDelegation = {
|
|
271
|
+
...wildoError,
|
|
272
|
+
frontendActions: frontendActions.filter(action => action !== ErrorActionFrontend.NOTIFY
|
|
273
|
+
&& action !== ErrorActionFrontend.SHOW_TOAST
|
|
274
|
+
&& action !== ErrorActionFrontend.SHOW_MODAL),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
267
277
|
else if (shouldNotify) {
|
|
268
278
|
showErrorNotification(wildoError);
|
|
269
279
|
errorForDelegation = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalErrorHandler.js","sourceRoot":"","sources":["../../../../src/core/errors/GlobalErrorHandler.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EACL,mBAAmB,EAEnB,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAA6B,MAAM,yDAAyD,CAAC;AACpH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAGtE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAgC,MAAM,4CAA4C,CAAC;AACzH,OAAO,EAAE,uBAAuB,EAAE,M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EAAE,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAElG,oCAAoC;IACpC,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,qCAAqC,EAAE;YAC9C,SAAS,EAAE,cAAc,CAAC,aAAa;SACxC,CAAC,CAAC;QAEH,MAAM,WAAW,GAAG,EAAE,CAAC,cAAc,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;QAEvE,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,yCAAyC,CAAC,CAAC;YACpD,WAAW,EAAE,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAE3B,gEAAgE;IAChE,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["/**\n * Global Error Handler\n * \n * Subscribes to ERROR_OCCURED events from the event bus and executes\n * frontend actions based on the error configuration.\n * \n * This component integrates with:\n * - AuthSession: For authentication error handling (logout)\n * - NotificationContext: For toast and notification center display\n * - ErrorContext: For other frontend actions (REDIRECT, SHOW_MODAL, etc.)\n * \n * Must be rendered inside AuthSessionProvider and NotificationProvider.\n */\n\nimport { useEffect, useCallback, useRef } from 'react';\nimport {\n ErrorActionFrontend,\n WildoError_Frontend,\n ERROR_DEFINITIONS,\n ErrorSeverity,\n} from '@wildo-ai/saas-models';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents, FrontendEventErrorOccured } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\nimport { sessionEndReasonForRefusal } from '~wildo-frontend-lib/core/requests/auth-refresh-resilience.frontend';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { useError } from './useError';\nimport { useAuthSession } from '~wildo-frontend-lib/core/security/useAuthSession';\nimport { useNotification } from '~wildo-frontend-lib/core/events/useNotification';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { errorManagement } from './error-management.frontend.service';\nimport { GlobalErrorHandlerProps } from './errors.frontend.schemas';\nimport { NotificationType } from '~wildo-frontend-lib/core/events/NotificationContext';\nimport { LabellingTypes } from '@wildo-ai/presets-components-models';\nimport { resolveUserFacingErrorMessage, type ErrorMessageTranslators } from './user-facing-error-message.frontend.utils';\nimport { wildoErrorIsShownToUser } from './backend-refusal.frontend';\n\n/** How long a toast raised before the error words settle waits for them (#2542). */\nconst ERROR_WORDS_WAIT_MS = 4000;\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = logger.debugByType('GlobalErrorHandler');\nlogger.setDebugTypeLogging('GlobalErrorHandler', false);\n\n/**\n * Map error severity to notification type\n */\nfunction severityToNotificationType(severity: ErrorSeverity): NotificationType {\n switch (severity) {\n case ErrorSeverity.CRITICAL:\n case ErrorSeverity.HIGH:\n return 'error';\n case ErrorSeverity.MEDIUM:\n return 'warning';\n case ErrorSeverity.LOW:\n return 'info';\n default:\n return 'error';\n }\n}\n\n/**\n * Global Error Handler Component\n * \n * Subscribes to ERROR_OCCURED events and executes frontend actions.\n * Integrates with AuthSession for authentication error handling (logout).\n * Delegates notification display to NotificationContext.\n * \n * Should be rendered once, inside the AuthSessionProvider and NotificationProvider.\n */\nexport function GlobalErrorHandler({\n onError,\n}: GlobalErrorHandlerProps): null {\n const { on } = useEventBus();\n const { handleWildoError } = useError();\n const { endSession, isAuthenticated, getEndedSessionReason } = useAuthSession();\n const { notifyError, notifyWarning, notifyInfo } = useNotification();\n // Resolvers for backend error references and guidance → localized human messages. No deps\n // requested: `errors_*` sections load eagerly, so this only borrows the resolvers.\n //\n // Held in a ref: `tErrorMessage` (and the whole I18n context value) is NOT\n // memoized, so a new identity is produced on every I18nProvider render. Using it\n // directly as a `useCallback` dep would ripple through `showErrorNotification` →\n // `handleErrorEvent` → the `ERROR_OCCURED` subscription effect, re-subscribing\n // the global handler on every i18n render. The ref keeps those callbacks (and the\n // subscription) stable while always reading the latest resolvers.\n const { tErrorMessage, tErrorGuidance, isKeySettled } = useI18n();\n const translatorsRef = useRef<ErrorMessageTranslators>({ tErrorMessage, tErrorGuidance });\n translatorsRef.current = { tErrorMessage, tErrorGuidance };\n\n /**\n * Whether the error words can be read yet (#2542). `errors_*` load eagerly, but \"eagerly\" is still a request: an\n * error raised while the app is booting (a restored session refused before the first labels land) used to be\n * resolved at that instant, so even the default label rendered as its key path, `errors_messages.default.msg`,\n * and the toast kept that text. A toast raised before the words settle now waits for them.\n *\n * Bounded, because a FAILED eager load clears its keys without marking them settled: past\n * {@link ERROR_WORDS_WAIT_MS} the held toasts are shown with whatever resolves, which is the key path a missing\n * label must look like, rather than never.\n */\n const errorWordsSettled = isKeySettled(LabellingTypes.ERRORS_MESSAGES);\n const errorWordsSettledRef = useRef(errorWordsSettled);\n errorWordsSettledRef.current = errorWordsSettled;\n const heldErrorsRef = useRef<WildoError_Frontend[]>([]);\n const heldErrorsTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n \n /**\n * Tear down the AuthSession in response to a `triggerLogout` error.\n *\n * Only logs out when currently authenticated, to avoid a redundant logout\n * (e.g. when the token-refresh interceptor already logged the session out).\n * Fires for ANY error flagged `triggerLogout`, not only AUTHENTICATION-typed\n * ones — see the gate in handleErrorEvent.\n */\n const handleForcedLogout = useCallback((wildoError: WildoError_Frontend) => {\n if (isAuthenticated()) {\n logDebug('triggerLogout requested - logging out via AuthSession');\n // The backend refused the session; the person did not sign out, so `USER_LOGOUT` says so (#1977), and why,\n // when the refusal names it (#2541).\n endSession(sessionEndReasonForRefusal(wildoError));\n } else {\n logDebug('triggerLogout requested but not authenticated - skipping logout');\n }\n }, [endSession, isAuthenticated]);\n \n /**\n * Show error notification via NotificationContext\n * Uses policy-driven display (toast + optional notification center)\n */\n const displayErrorNotification = useCallback((wildoError: WildoError_Frontend) => {\n const errorDefinition = ERROR_DEFINITIONS[wildoError.type];\n const severity = (wildoError as any).severity || errorDefinition?.severity || ErrorSeverity.MEDIUM;\n // The global toast speaks for no particular surface, so no surface words are passed: a generic\n // bucket shows its own label. Server `context.message` / `originalMessage` and the raw reference\n // are never shown — an unresolvable message falls to the default label, or to its key path when\n // even that is unauthored (see `resolveUserFacingErrorMessage`).\n const message = resolveUserFacingErrorMessage(wildoError, { translators: translatorsRef.current });\n const notificationType = severityToNotificationType(severity);\n \n // Use appropriate notification method based on severity\n const notificationData = {\n errorType: wildoError.type,\n severity,\n context: wildoError.context,\n };\n \n switch (notificationType) {\n case 'error':\n notifyError(message, { data: notificationData });\n break;\n case 'warning':\n notifyWarning(message, { data: notificationData });\n break;\n case 'info':\n notifyInfo(message, { data: notificationData });\n break;\n }\n \n logDebug('Error notification displayed via NotificationContext', {\n errorType: wildoError.type,\n severity,\n notificationType,\n message,\n });\n }, [notifyError, notifyWarning, notifyInfo]);\n\n const flushHeldErrorNotifications = useCallback(() => {\n if (heldErrorsTimerRef.current) {\n clearTimeout(heldErrorsTimerRef.current);\n heldErrorsTimerRef.current = null;\n }\n const held = heldErrorsRef.current;\n heldErrorsRef.current = [];\n for (const wildoError of held) displayErrorNotification(wildoError);\n }, [displayErrorNotification]);\n\n /** Show now when the error words are readable, else hold until they are (#2542). */\n const showErrorNotification = useCallback((wildoError: WildoError_Frontend) => {\n if (errorWordsSettledRef.current) {\n displayErrorNotification(wildoError);\n return;\n }\n heldErrorsRef.current.push(wildoError);\n heldErrorsTimerRef.current ??= setTimeout(flushHeldErrorNotifications, ERROR_WORDS_WAIT_MS);\n }, [displayErrorNotification, flushHeldErrorNotifications]);\n\n useEffect(() => {\n if (errorWordsSettled && heldErrorsRef.current.length > 0) flushHeldErrorNotifications();\n }, [errorWordsSettled, flushHeldErrorNotifications]);\n\n useEffect(() => () => {\n if (heldErrorsTimerRef.current) clearTimeout(heldErrorsTimerRef.current);\n // Reset, or a remount (React StrictMode) would see a timer that no longer exists and never arm a new one.\n heldErrorsTimerRef.current = null;\n }, []);\n \n /**\n * Handle ERROR_OCCURED event\n *\n * Delegates to ErrorContext.handleWildoError for action execution, but intercepts\n * any error flagged `triggerLogout` to tear down the session via the AuthSession\n * `logout()` callback instead of the DISCONNECT window-event fallback.\n */\n const handleErrorEvent = useCallback((payload: FrontendEventErrorOccured) => {\n let wildoError: WildoError_Frontend = payload.error;\n\n logDebug('Received ERROR_OCCURED event', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n triggerLogout: wildoError.triggerLogout,\n });\n \n // Check for duplicate errors using deduplication service\n if (errorManagement.shouldSuppress(wildoError)) {\n logDebug('Error suppressed (duplicate)', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n });\n return; // Don't process duplicate\n }\n \n // `triggerLogout` is the authoritative \"force a logout\" signal (set by the HTTP\n // error-behavior matrix, e.g. a 401 invalid session). It drives the AuthSession\n // logout on its own — deliberately NOT additionally gated on\n // `type === AUTHENTICATION`. The error's `type` is taken from the backend payload\n // (`backendErrorType || behavior.errorType` in buildWildoError), so a 401 whose\n // backend type is not AUTHENTICATION would still carry triggerLogout=true; an extra\n // type gate would silently swallow that logout. Mirrors `handleHttpError`'s\n // `shouldLogout`, which is also triggerLogout-only.\n const shouldTriggerLogout = wildoError.triggerLogout === true;\n\n // Handle logout via AuthSession if needed (before delegating to ErrorContext)\n if (shouldTriggerLogout) {\n logDebug('triggerLogout=true - calling AuthSession logout handler');\n handleForcedLogout(wildoError);\n \n // Remove DISCONNECT action from frontendActions since we already handled logout\n const frontendActions = (wildoError.frontendActions || []) as ErrorActionFrontend[];\n if (frontendActions.includes(ErrorActionFrontend.DISCONNECT)) {\n wildoError = {\n ...wildoError,\n frontendActions: frontendActions.filter(a => a !== ErrorActionFrontend.DISCONNECT),\n };\n }\n }\n \n // Log error for analytics/debugging\n logDebug('Error occurred', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n });\n \n // `suppressUserDisplay` (set when the originating request was `silent`) means\n // the CALLER owns the user-facing error UX — e.g. a resource form already shows\n // NOTIFY_RESOURCE_ERROR + inline field errors. In that case strip ALL display\n // actions (toast + modal) so the global handler never double-surfaces the error,\n // while still running the side-effect actions below (REDIRECT, DISCONNECT) and\n // the auth-logout handled earlier. This is what lets a silent resource mutation\n // log out on 401 without raising a duplicate global toast.\n //\n // INVARIANT (load-bearing): we deliberately KEEP REDIRECT/DISCONNECT here, so the\n // \"silent\" contract relies on HTTP_ERROR_BEHAVIOR_MATRIX never placing those two\n // actions at a risk level a silent caller can reach (today the matrix only adds\n // REDIRECT at HIGH/CRITICAL, and silent callers are autosave / RMM-fallback /\n // guidance / uniqueness — MEDIUM-or-lower). If you add REDIRECT/DISCONNECT at a\n // lower risk, OR via `setHttpErrorBehaviorOverride`, a silent background op would\n // navigate/disconnect with NO visible toast to explain it — add those to the\n // strip list here if that ever changes.\n const suppressUserDisplay = (wildoError as any).suppressUserDisplay === true;\n // The one statement of \"this is shown as a notification\", shared with `isBackendRefusalShownToUser`, which a catch\n // asks so that it adds nothing to a refusal this handler already said (#3250).\n const shouldNotify = wildoErrorIsShownToUser(wildoError);\n const frontendActions = (wildoError.frontendActions || []) as ErrorActionFrontend[];\n\n let errorForDelegation = wildoError;\n if (suppressUserDisplay) {\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY\n && action !== ErrorActionFrontend.SHOW_TOAST\n && action !== ErrorActionFrontend.SHOW_MODAL,\n ),\n };\n } else if (shouldTriggerLogout && getEndedSessionReason() !== null) {\n // The sign-in page says why the session ended (#2541), so the request that discovered it raises no toast of\n // its own: a generic \"something went wrong\" there contradicts the notice. Asked AFTER the logout above, and of\n // the session rather than of this call: in production the refresh handler usually ended the session a beat\n // earlier, so this handler found nobody signed in, and the notice is already there. When no backend-ended\n // session is being explained (a public page's 401), the toast stays. Display actions only; REDIRECT still runs.\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY\n && action !== ErrorActionFrontend.SHOW_TOAST\n && action !== ErrorActionFrontend.SHOW_MODAL,\n ),\n };\n } else if (shouldNotify) {\n showErrorNotification(wildoError);\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY && action !== ErrorActionFrontend.SHOW_TOAST,\n ),\n };\n }\n \n // Call custom error handler if provided\n if (onError) {\n onError(wildoError);\n }\n \n // Delegate to ErrorContext for other frontend actions (REDIRECT, SHOW_MODAL, etc.)\n // Note: We've already handled NOTIFY above via NotificationContext\n handleWildoError(errorForDelegation);\n }, [handleWildoError, onError, handleForcedLogout, showErrorNotification, getEndedSessionReason]);\n \n // Subscribe to ERROR_OCCURED events\n useEffect(() => {\n logDebug('Subscribing to ERROR_OCCURED events', {\n eventName: FrontendEvents.ERROR_OCCURED,\n });\n \n const unsubscribe = on(FrontendEvents.ERROR_OCCURED, handleErrorEvent);\n \n return () => {\n logDebug('Unsubscribing from ERROR_OCCURED events');\n unsubscribe();\n };\n }, [on, handleErrorEvent]);\n \n // This component renders nothing - it only subscribes to events\n return null;\n}\n\nexport default GlobalErrorHandler;\n"]}
|
|
1
|
+
{"version":3,"file":"GlobalErrorHandler.js","sourceRoot":"","sources":["../../../../src/core/errors/GlobalErrorHandler.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EACL,mBAAmB,EAEnB,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAA6B,MAAM,yDAAyD,CAAC;AACpH,OAAO,EAAE,0BAA0B,EAAE,MAAM,oEAAoE,CAAC;AAChH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6DAA6D,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CA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;AAED,eAAe,kBAAkB,CAAC","sourcesContent":["/**\n * Global Error Handler\n * \n * Subscribes to ERROR_OCCURED events from the event bus and executes\n * frontend actions based on the error configuration.\n * \n * This component integrates with:\n * - AuthSession: For authentication error handling (logout)\n * - NotificationContext: For toast and notification center display\n * - ErrorContext: For other frontend actions (REDIRECT, SHOW_MODAL, etc.)\n * \n * Must be rendered inside AuthSessionProvider and NotificationProvider.\n */\n\nimport { useEffect, useCallback, useRef } from 'react';\nimport {\n ErrorActionFrontend,\n WildoError_Frontend,\n ERROR_DEFINITIONS,\n ErrorSeverity,\n} from '@wildo-ai/saas-models';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents, FrontendEventErrorOccured } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\nimport { sessionEndReasonForRefusal } from '~wildo-frontend-lib/core/requests/auth-refresh-resilience.frontend';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\nimport { useError } from './useError';\nimport { useAuthSession } from '~wildo-frontend-lib/core/security/useAuthSession';\nimport { useNotification } from '~wildo-frontend-lib/core/events/useNotification';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { errorManagement } from './error-management.frontend.service';\nimport { GlobalErrorHandlerProps } from './errors.frontend.schemas';\nimport { NotificationType } from '~wildo-frontend-lib/core/events/NotificationContext';\nimport { LabellingTypes } from '@wildo-ai/presets-components-models';\nimport { resolveUserFacingErrorMessage, type ErrorMessageTranslators } from './user-facing-error-message.frontend.utils';\nimport { wildoErrorIsShownToUser } from './backend-refusal.frontend';\nimport { isPlanRefusalPromptHostMounted, planRefusalOf } from '~wildo-frontend-lib/core/features/plan-refusal.frontend';\n\n/** How long a toast raised before the error words settle waits for them (#2542). */\nconst ERROR_WORDS_WAIT_MS = 4000;\n\nconst logger: LoggerFrontendService = LoggerFrontendService.getLogger();\nconst logDebug: (message: string, context?: Record<string, unknown>) => void = logger.debugByType('GlobalErrorHandler');\nlogger.setDebugTypeLogging('GlobalErrorHandler', false);\n\n/**\n * Map error severity to notification type\n */\nfunction severityToNotificationType(severity: ErrorSeverity): NotificationType {\n switch (severity) {\n case ErrorSeverity.CRITICAL:\n case ErrorSeverity.HIGH:\n return 'error';\n case ErrorSeverity.MEDIUM:\n return 'warning';\n case ErrorSeverity.LOW:\n return 'info';\n default:\n return 'error';\n }\n}\n\n/**\n * Global Error Handler Component\n * \n * Subscribes to ERROR_OCCURED events and executes frontend actions.\n * Integrates with AuthSession for authentication error handling (logout).\n * Delegates notification display to NotificationContext.\n * \n * Should be rendered once, inside the AuthSessionProvider and NotificationProvider.\n */\nexport function GlobalErrorHandler({\n onError,\n}: GlobalErrorHandlerProps): null {\n const { on } = useEventBus();\n const { handleWildoError } = useError();\n const { endSession, isAuthenticated, getEndedSessionReason } = useAuthSession();\n const { notifyError, notifyWarning, notifyInfo } = useNotification();\n // Resolvers for backend error references and guidance → localized human messages. No deps\n // requested: `errors_*` sections load eagerly, so this only borrows the resolvers.\n //\n // Held in a ref: `tErrorMessage` (and the whole I18n context value) is NOT\n // memoized, so a new identity is produced on every I18nProvider render. Using it\n // directly as a `useCallback` dep would ripple through `showErrorNotification` →\n // `handleErrorEvent` → the `ERROR_OCCURED` subscription effect, re-subscribing\n // the global handler on every i18n render. The ref keeps those callbacks (and the\n // subscription) stable while always reading the latest resolvers.\n const { tErrorMessage, tErrorGuidance, isKeySettled } = useI18n();\n const translatorsRef = useRef<ErrorMessageTranslators>({ tErrorMessage, tErrorGuidance });\n translatorsRef.current = { tErrorMessage, tErrorGuidance };\n\n /**\n * Whether the error words can be read yet (#2542). `errors_*` load eagerly, but \"eagerly\" is still a request: an\n * error raised while the app is booting (a restored session refused before the first labels land) used to be\n * resolved at that instant, so even the default label rendered as its key path, `errors_messages.default.msg`,\n * and the toast kept that text. A toast raised before the words settle now waits for them.\n *\n * Bounded, because a FAILED eager load clears its keys without marking them settled: past\n * {@link ERROR_WORDS_WAIT_MS} the held toasts are shown with whatever resolves, which is the key path a missing\n * label must look like, rather than never.\n */\n const errorWordsSettled = isKeySettled(LabellingTypes.ERRORS_MESSAGES);\n const errorWordsSettledRef = useRef(errorWordsSettled);\n errorWordsSettledRef.current = errorWordsSettled;\n const heldErrorsRef = useRef<WildoError_Frontend[]>([]);\n const heldErrorsTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n \n /**\n * Tear down the AuthSession in response to a `triggerLogout` error.\n *\n * Only logs out when currently authenticated, to avoid a redundant logout\n * (e.g. when the token-refresh interceptor already logged the session out).\n * Fires for ANY error flagged `triggerLogout`, not only AUTHENTICATION-typed\n * ones — see the gate in handleErrorEvent.\n */\n const handleForcedLogout = useCallback((wildoError: WildoError_Frontend) => {\n if (isAuthenticated()) {\n logDebug('triggerLogout requested - logging out via AuthSession');\n // The backend refused the session; the person did not sign out, so `USER_LOGOUT` says so (#1977), and why,\n // when the refusal names it (#2541).\n endSession(sessionEndReasonForRefusal(wildoError));\n } else {\n logDebug('triggerLogout requested but not authenticated - skipping logout');\n }\n }, [endSession, isAuthenticated]);\n \n /**\n * Show error notification via NotificationContext\n * Uses policy-driven display (toast + optional notification center)\n */\n const displayErrorNotification = useCallback((wildoError: WildoError_Frontend) => {\n const errorDefinition = ERROR_DEFINITIONS[wildoError.type];\n const severity = (wildoError as any).severity || errorDefinition?.severity || ErrorSeverity.MEDIUM;\n // The global toast speaks for no particular surface, so no surface words are passed: a generic\n // bucket shows its own label. Server `context.message` / `originalMessage` and the raw reference\n // are never shown — an unresolvable message falls to the default label, or to its key path when\n // even that is unauthored (see `resolveUserFacingErrorMessage`).\n const message = resolveUserFacingErrorMessage(wildoError, { translators: translatorsRef.current });\n const notificationType = severityToNotificationType(severity);\n \n // Use appropriate notification method based on severity\n const notificationData = {\n errorType: wildoError.type,\n severity,\n context: wildoError.context,\n };\n \n switch (notificationType) {\n case 'error':\n notifyError(message, { data: notificationData });\n break;\n case 'warning':\n notifyWarning(message, { data: notificationData });\n break;\n case 'info':\n notifyInfo(message, { data: notificationData });\n break;\n }\n \n logDebug('Error notification displayed via NotificationContext', {\n errorType: wildoError.type,\n severity,\n notificationType,\n message,\n });\n }, [notifyError, notifyWarning, notifyInfo]);\n\n const flushHeldErrorNotifications = useCallback(() => {\n if (heldErrorsTimerRef.current) {\n clearTimeout(heldErrorsTimerRef.current);\n heldErrorsTimerRef.current = null;\n }\n const held = heldErrorsRef.current;\n heldErrorsRef.current = [];\n for (const wildoError of held) displayErrorNotification(wildoError);\n }, [displayErrorNotification]);\n\n /** Show now when the error words are readable, else hold until they are (#2542). */\n const showErrorNotification = useCallback((wildoError: WildoError_Frontend) => {\n if (errorWordsSettledRef.current) {\n displayErrorNotification(wildoError);\n return;\n }\n heldErrorsRef.current.push(wildoError);\n heldErrorsTimerRef.current ??= setTimeout(flushHeldErrorNotifications, ERROR_WORDS_WAIT_MS);\n }, [displayErrorNotification, flushHeldErrorNotifications]);\n\n useEffect(() => {\n if (errorWordsSettled && heldErrorsRef.current.length > 0) flushHeldErrorNotifications();\n }, [errorWordsSettled, flushHeldErrorNotifications]);\n\n useEffect(() => () => {\n if (heldErrorsTimerRef.current) clearTimeout(heldErrorsTimerRef.current);\n // Reset, or a remount (React StrictMode) would see a timer that no longer exists and never arm a new one.\n heldErrorsTimerRef.current = null;\n }, []);\n \n /**\n * Handle ERROR_OCCURED event\n *\n * Delegates to ErrorContext.handleWildoError for action execution, but intercepts\n * any error flagged `triggerLogout` to tear down the session via the AuthSession\n * `logout()` callback instead of the DISCONNECT window-event fallback.\n */\n const handleErrorEvent = useCallback((payload: FrontendEventErrorOccured) => {\n let wildoError: WildoError_Frontend = payload.error;\n\n logDebug('Received ERROR_OCCURED event', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n triggerLogout: wildoError.triggerLogout,\n });\n \n // Check for duplicate errors using deduplication service\n if (errorManagement.shouldSuppress(wildoError)) {\n logDebug('Error suppressed (duplicate)', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n });\n return; // Don't process duplicate\n }\n \n // `triggerLogout` is the authoritative \"force a logout\" signal (set by the HTTP\n // error-behavior matrix, e.g. a 401 invalid session). It drives the AuthSession\n // logout on its own — deliberately NOT additionally gated on\n // `type === AUTHENTICATION`. The error's `type` is taken from the backend payload\n // (`backendErrorType || behavior.errorType` in buildWildoError), so a 401 whose\n // backend type is not AUTHENTICATION would still carry triggerLogout=true; an extra\n // type gate would silently swallow that logout. Mirrors `handleHttpError`'s\n // `shouldLogout`, which is also triggerLogout-only.\n const shouldTriggerLogout = wildoError.triggerLogout === true;\n\n // Handle logout via AuthSession if needed (before delegating to ErrorContext)\n if (shouldTriggerLogout) {\n logDebug('triggerLogout=true - calling AuthSession logout handler');\n handleForcedLogout(wildoError);\n \n // Remove DISCONNECT action from frontendActions since we already handled logout\n const frontendActions = (wildoError.frontendActions || []) as ErrorActionFrontend[];\n if (frontendActions.includes(ErrorActionFrontend.DISCONNECT)) {\n wildoError = {\n ...wildoError,\n frontendActions: frontendActions.filter(a => a !== ErrorActionFrontend.DISCONNECT),\n };\n }\n }\n \n // Log error for analytics/debugging\n logDebug('Error occurred', {\n errorType: wildoError.type,\n customMessageReference: wildoError.customMessageReference,\n });\n \n // `suppressUserDisplay` (set when the originating request was `silent`) means\n // the CALLER owns the user-facing error UX — e.g. a resource form already shows\n // NOTIFY_RESOURCE_ERROR + inline field errors. In that case strip ALL display\n // actions (toast + modal) so the global handler never double-surfaces the error,\n // while still running the side-effect actions below (REDIRECT, DISCONNECT) and\n // the auth-logout handled earlier. This is what lets a silent resource mutation\n // log out on 401 without raising a duplicate global toast.\n //\n // INVARIANT (load-bearing): we deliberately KEEP REDIRECT/DISCONNECT here, so the\n // \"silent\" contract relies on HTTP_ERROR_BEHAVIOR_MATRIX never placing those two\n // actions at a risk level a silent caller can reach (today the matrix only adds\n // REDIRECT at HIGH/CRITICAL, and silent callers are autosave / RMM-fallback /\n // guidance / uniqueness — MEDIUM-or-lower). If you add REDIRECT/DISCONNECT at a\n // lower risk, OR via `setHttpErrorBehaviorOverride`, a silent background op would\n // navigate/disconnect with NO visible toast to explain it — add those to the\n // strip list here if that ever changes.\n const suppressUserDisplay = (wildoError as any).suppressUserDisplay === true;\n // The one statement of \"this is shown as a notification\", shared with `isBackendRefusalShownToUser`, which a catch\n // asks so that it adds nothing to a refusal this handler already said (#3250).\n const shouldNotify = wildoErrorIsShownToUser(wildoError);\n const frontendActions = (wildoError.frontendActions || []) as ErrorActionFrontend[];\n\n let errorForDelegation = wildoError;\n if (suppressUserDisplay) {\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY\n && action !== ErrorActionFrontend.SHOW_TOAST\n && action !== ErrorActionFrontend.SHOW_MODAL,\n ),\n };\n } else if (shouldTriggerLogout && getEndedSessionReason() !== null) {\n // The sign-in page says why the session ended (#2541), so the request that discovered it raises no toast of\n // its own: a generic \"something went wrong\" there contradicts the notice. Asked AFTER the logout above, and of\n // the session rather than of this call: in production the refresh handler usually ended the session a beat\n // earlier, so this handler found nobody signed in, and the notice is already there. When no backend-ended\n // session is being explained (a public page's 401), the toast stays. Display actions only; REDIRECT still runs.\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY\n && action !== ErrorActionFrontend.SHOW_TOAST\n && action !== ErrorActionFrontend.SHOW_MODAL,\n ),\n };\n } else if (shouldNotify && planRefusalOf(wildoError) && isPlanRefusalPromptHostMounted()) {\n // A plan refusal is shown by the plan-refusal prompt, with its fence and whom to ask, so no generic toast beside it.\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY\n && action !== ErrorActionFrontend.SHOW_TOAST\n && action !== ErrorActionFrontend.SHOW_MODAL,\n ),\n };\n } else if (shouldNotify) {\n showErrorNotification(wildoError);\n errorForDelegation = {\n ...wildoError,\n frontendActions: frontendActions.filter(\n action => action !== ErrorActionFrontend.NOTIFY && action !== ErrorActionFrontend.SHOW_TOAST,\n ),\n };\n }\n \n // Call custom error handler if provided\n if (onError) {\n onError(wildoError);\n }\n \n // Delegate to ErrorContext for other frontend actions (REDIRECT, SHOW_MODAL, etc.)\n // Note: We've already handled NOTIFY above via NotificationContext\n handleWildoError(errorForDelegation);\n }, [handleWildoError, onError, handleForcedLogout, showErrorNotification, getEndedSessionReason]);\n \n // Subscribe to ERROR_OCCURED events\n useEffect(() => {\n logDebug('Subscribing to ERROR_OCCURED events', {\n eventName: FrontendEvents.ERROR_OCCURED,\n });\n \n const unsubscribe = on(FrontendEvents.ERROR_OCCURED, handleErrorEvent);\n \n return () => {\n logDebug('Unsubscribing from ERROR_OCCURED events');\n unsubscribe();\n };\n }, [on, handleErrorEvent]);\n \n // This component renders nothing - it only subscribes to events\n return null;\n}\n\nexport default GlobalErrorHandler;\n"]}
|
|
@@ -54,7 +54,7 @@ export interface BackendRefusal {
|
|
|
54
54
|
readonly errorType: ErrorType;
|
|
55
55
|
/** The envelope's `customMessageReference`: the refusal's words in `errors_messages`. Absent on a bare envelope. */
|
|
56
56
|
readonly customMessageReference?: string;
|
|
57
|
-
/** Whether the refused request took effect, when the server knows
|
|
57
|
+
/** Whether the refused request took effect, when the server knows. */
|
|
58
58
|
readonly requestOutcome?: ErrorRequestOutcome;
|
|
59
59
|
/** The envelope's sanitized `details` (an allow-listed `code`, `versionConflict`, `inForceReleases`, …). */
|
|
60
60
|
readonly context?: Readonly<Record<string, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-refusal.frontend.d.ts","sourceRoot":"","sources":["../../../../src/core/errors/backend-refusal.frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAEL,SAAS,EACT,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,sHAAsH;AACtH;;;;;;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AC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAqB3H;AAID,sHAAsH;AACtH;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAIxE;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,WAAW,CAAC,MAAM,CAA4B,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAI7E;AACD,kEAAkE;AAElE,sHAAsH;AACtH;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,GAAG,qBAAqB,GAAG,iBAAiB,CAAC,GAAG,OAAO,CAIhJ;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAKnF;AACD,kEAAkE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend-refusal.frontend.js","sourceRoot":"","sources":["../../../../src/core/errors/backend-refusal.frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EACL,mBAAmB,EACnB,SAAS,GAGV,MAAM,uBAAuB,CAAC;AA4B/B,kEAAkE;AAElE;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAA0B,EAAE,MAA0B,EAAE,SAAkB;IACnH,IAAI,CAAC,SAAS;QAAE,OAAO;IACvB,MAAM,IAAI,GAAG,SAAgC,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAE1B,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QACzC,IAAI,MAAM,CAAC,OAAO;YAAE,KAAK,CA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;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7F;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,gBAAgB,CAAC,KAAK,CAAC;WACzB,KAAK,CAAC,UAAU,IAAI,GAAG,IAAI,KAAK,CAAC,UAAU,GAAG,GAAG;WACjD,CAAC,+BAA+B,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC9D,CAAC;AACD,kEAAkE;AAElE,sHAAsH;AACtH;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAA+F;IACrI,IAAI,UAAU,CAAC,mBAAmB,KAAK,IAAI,IAAI,UAAU,CAAC,UAAU,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC7F,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,eAAe,IAAI,EAAE,CAAmC,CAAC;IACrF,OAAO,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC1G,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAc;IACxD,OAAO,gBAAgB,CAAC,KAAK,CAAC;WACzB,KAAK,CAAC,sBAAsB,KAAK,IAAI;WACrC,KAAK,CAAC,UAAU,KAAK,SAAS;WAC9B,uBAAuB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AACD,kEAAkE","sourcesContent":["/**\n * A backend refusal, as a frontend `catch` receives it (#3250).\n *\n * ## What a catch receives\n *\n * When the backend refuses a request it answers with its error envelope, `{ error: { type, severity,\n * customMessageReference, details, requestOutcome, … } }` (`ErrorResponseSchema`). The HTTP client's response\n * interceptor rejects with the AXIOS error, and {@link attachBackendErrorEnvelope} copies the envelope onto it:\n * `errorType`, `customMessageReference`, `requestOutcome`, `context` (from `details`), `validationErrors`, and the\n * numeric `httpStatus`. `handleHttpError` then adds `wildoError` (a `WildoError_Frontend`) and\n * `wildoErrorEventEmitted`. Every frontend client (manual calls, resources, the RMM through `doOperation`) goes through\n * that one interceptor, and nothing between it and a catch rebuilds the value.\n *\n * ## Why the shared `isWildoBackendError` is not this predicate\n *\n * `isWildoBackendError` (`@wildo-ai/saas-models`) recognises the engine's own `WildoError_Backend`, which needs the\n * keys `type`, `statusCode`, `severity` and `customMessageReference`. The axios error carries none of the first three\n * (the client writes `errorType`), the wire envelope carries no `statusCode`, and `wildoError` has none either. So the\n * shared guard was `false` for every refusal that came over HTTP, measured through the real interceptor in\n * `wildo-http-client.backend-refusal.test.ts`, and every frontend branch keyed on it was dead. Nothing in a frontend\n * process builds a `WildoError_Backend`, so in this package it tested for a value no catch can receive. It is not used\n * here at all, and `no-shared-backend-error-guard.test.ts` keeps it out.\n *\n * Rejected: make the client reject with a value the shared guard accepts, by also writing `type`, `statusCode` and\n * `severity` onto the axios error. The guard would then narrow an axios error to `WildoError_Backend`, a type that\n * promises `backendActions`, a `Date` `timestamp`, an enum `customMessageReference` and the backend's internal fields,\n * none of which it has. It would also change what `describeCaughtError` prints for every frontend failure (the\n * reference instead of the message). This module names exactly the fields the client sets, and is where they are\n * written, so the predicate and its producer cannot disagree.\n *\n * ## The rethrow convention it replaces\n *\n * The dead branches mostly rethrew whatever the shared guard accepted, meaning \"the global error handler says this\n * one\". It already has: the interceptor hands the refusal to `handleHttpError` the moment it arrives, and the\n * `GlobalErrorHandler` toast follows from that. A rethrow adds nothing but harm: it reaches `unhandledrejection`,\n * which emits it a SECOND time as an `UNCAUGHT_EXCEPTION`, and it skips whatever state the catch restores after it\n * (a busy flag, a loading flag). So a catch that wants to leave a refusal to the global handler asks\n * {@link isBackendRefusalShownToUser} and, when it answers true, restores its state and says nothing of its own. A\n * refusal the handler did NOT show (a 400 at default risk, a silent request) is the caller's to word.\n */\nimport {\n ErrorActionFrontend,\n ErrorType,\n type ErrorRequestOutcome,\n type WildoError_Frontend,\n} from '@wildo-ai/saas-models';\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * A refusal the backend authored, as a frontend `catch` receives it: the fields the HTTP client adds to a rejected\n * request when the backend answered with its error envelope. Narrow a caught value to it with the predicates below,\n * all imported from `@wildo-ai/saas-frontend-lib`. Never use `isWildoBackendError` (from `@wildo-ai/saas-models`) in\n * frontend code: it recognises the backend's own error object, which never crosses HTTP, so it is false for every\n * refusal a view can catch.\n */\nexport interface BackendRefusal {\n /** The response's HTTP status. */\n readonly httpStatus: number;\n /** The envelope's `type`. Its presence is what says the backend authored the refusal. */\n readonly errorType: ErrorType;\n /** The envelope's `customMessageReference`: the refusal's words in `errors_messages`. Absent on a bare envelope. */\n readonly customMessageReference?: string;\n /** Whether the refused request took effect, when the server knows (#3004). */\n readonly requestOutcome?: ErrorRequestOutcome;\n /** The envelope's sanitized `details` (an allow-listed `code`, `versionConflict`, `inForceReleases`, …). */\n readonly context?: Readonly<Record<string, unknown>>;\n /** Field-level validation errors, when the envelope names fields. */\n readonly validationErrors?: Readonly<Record<string, unknown>>;\n /** The `WildoError_Frontend` `handleHttpError` built from it, once retries are exhausted. */\n readonly wildoError?: WildoError_Frontend;\n /** Whether `handleHttpError` emitted it to the global error handler. */\n readonly wildoErrorEventEmitted?: boolean;\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n\n/**\n * Copy the backend's error envelope onto the rejected request (the response interceptor's only writer of these\n * fields). Standard nested format `{ error: { … } }`; a legacy flat body keeps its `message` and `context` and is not\n * a {@link BackendRefusal}, since it names no `type`.\n */\nexport function attachBackendErrorEnvelope(error: Record<string, any>, status: number | undefined, errorData: unknown): void {\n if (!errorData) return;\n const data = errorData as Record<string, any>;\n const nested = data.error;\n\n if (nested && typeof nested === 'object') {\n if (nested.message) error.message = nested.message;\n if (nested.validationErrors) error.validationErrors = nested.validationErrors;\n if (nested.details) error.context = nested.details;\n if (nested.type) error.errorType = nested.type;\n if (nested.customMessageReference) error.customMessageReference = nested.customMessageReference;\n // Whether the refused request took effect, when the server knows (#3004): a caller deciding whether to offer\n // \"try again\" reads it here, and the retry ladder reads it off the response.\n if (nested.requestOutcome) error.requestOutcome = nested.requestOutcome;\n } else {\n if (data.message) error.message = data.message;\n if (data.context) error.context = data.context;\n }\n\n // Always set the numeric HTTP status for downstream consumers.\n error.httpStatus = status;\n}\n\nconst ERROR_TYPES: ReadonlySet<string> = new Set<string>(Object.values(ErrorType));\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * Whether a caught value is a refusal the backend authored: a rejected request whose response carried the backend's\n * error envelope. False for a network failure, a cancellation, a timeout, a client-side error, and a response that is\n * not the backend's envelope (a proxy's HTML 502).\n */\nexport function isBackendRefusal(error: unknown): error is BackendRefusal {\n if (error === null || typeof error !== 'object') return false;\n const candidate = error as { httpStatus?: unknown; errorType?: unknown };\n return typeof candidate.httpStatus === 'number' && typeof candidate.errorType === 'string' && ERROR_TYPES.has(candidate.errorType);\n}\n\n/**\n * The statuses that say \"send it again later\" (RFC 9110 §15.5.9 408; RFC 8470 425; RFC 6585 §4 429). Every other 4xx\n * is a refusal that sending the same request again cannot change.\n */\nexport const RETRYABLE_CLIENT_ERROR_STATUSES: ReadonlySet<number> = new Set([408, 425, 429]);\n\n/**\n * Whether sending the same request again cannot change the answer: a backend refusal with a 4xx status other than\n * {@link RETRYABLE_CLIENT_ERROR_STATUSES}. A 5xx is the server failing, and may clear on its own.\n */\nexport function isFinalBackendRefusal(error: unknown): error is BackendRefusal {\n return isBackendRefusal(error)\n && error.httpStatus >= 400 && error.httpStatus < 500\n && !RETRYABLE_CLIENT_ERROR_STATUSES.has(error.httpStatus);\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * Whether the global error handler shows this error to the person as a notification: not silenced by the request\n * (`suppressUserDisplay`), not hidden by the HTTP behaviour matrix (`showToUser`), and asking for a notification. The\n * ONE statement of that rule: `GlobalErrorHandler` decides its toast with it.\n */\nexport function wildoErrorIsShownToUser(wildoError: Pick<WildoError_Frontend, 'showToUser' | 'suppressUserDisplay' | 'frontendActions'>): boolean {\n if (wildoError.suppressUserDisplay === true || wildoError.showToUser === false) return false;\n const actions = (wildoError.frontendActions ?? []) as readonly ErrorActionFrontend[];\n return actions.includes(ErrorActionFrontend.NOTIFY) || actions.includes(ErrorActionFrontend.SHOW_TOAST);\n}\n\n/**\n * Whether the person has already been told about this refusal by the global error handler, so the catch should\n * restore its state and add nothing. Two cases count as told without a toast of this request's own: an identical\n * error the handler suppressed as a duplicate (the first one was shown), and a refusal that ended the session, which\n * the sign-in page explains.\n */\nexport function isBackendRefusalShownToUser(error: unknown): error is BackendRefusal {\n return isBackendRefusal(error)\n && error.wildoErrorEventEmitted === true\n && error.wildoError !== undefined\n && wildoErrorIsShownToUser(error.wildoError);\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n"]}
|
|
1
|
+
{"version":3,"file":"backend-refusal.frontend.js","sourceRoot":"","sources":["../../../../src/core/errors/backend-refusal.frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EACL,mBAAmB,EACnB,SAAS,GAGV,MAAM,uBAAuB,CAAC;AA4B/B,kEAAkE;AAElE;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAA0B,EAAE,MAA0B,EAAE,SAAkB;IACnH,IAAI,CAAC,SAAS;QAAE,OAAO;IACvB,MAAM,IAAI,GAAG,SAAgC,CAAC;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;IAE1B,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CA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,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AACrI,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AAE7F;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,gBAAgB,CAAC,KAAK,CAAC;WACzB,KAAK,CAAC,UAAU,IAAI,GAAG,IAAI,KAAK,CAAC,UAAU,GAAG,GAAG;WACjD,CAAC,+BAA+B,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC9D,CAAC;AACD,kEAAkE;AAElE,sHAAsH;AACtH;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAA+F;IACrI,IAAI,UAAU,CAAC,mBAAmB,KAAK,IAAI,IAAI,UAAU,CAAC,UAAU,KAAK,KAAK;QAAE,OAAO,KAAK,CAAC;IAC7F,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,eAAe,IAAI,EAAE,CAAmC,CAAC;IACrF,OAAO,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC1G,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,KAAc;IACxD,OAAO,gBAAgB,CAAC,KAAK,CAAC;WACzB,KAAK,CAAC,sBAAsB,KAAK,IAAI;WACrC,KAAK,CAAC,UAAU,KAAK,SAAS;WAC9B,uBAAuB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AACD,kEAAkE","sourcesContent":["/**\n * A backend refusal, as a frontend `catch` receives it (#3250).\n *\n * ## What a catch receives\n *\n * When the backend refuses a request it answers with its error envelope, `{ error: { type, severity,\n * customMessageReference, details, requestOutcome, … } }` (`ErrorResponseSchema`). The HTTP client's response\n * interceptor rejects with the AXIOS error, and {@link attachBackendErrorEnvelope} copies the envelope onto it:\n * `errorType`, `customMessageReference`, `requestOutcome`, `context` (from `details`), `validationErrors`, and the\n * numeric `httpStatus`. `handleHttpError` then adds `wildoError` (a `WildoError_Frontend`) and\n * `wildoErrorEventEmitted`. Every frontend client (manual calls, resources, the RMM through `doOperation`) goes through\n * that one interceptor, and nothing between it and a catch rebuilds the value.\n *\n * ## Why the shared `isWildoBackendError` is not this predicate\n *\n * `isWildoBackendError` (`@wildo-ai/saas-models`) recognises the engine's own `WildoError_Backend`, which needs the\n * keys `type`, `statusCode`, `severity` and `customMessageReference`. The axios error carries none of the first three\n * (the client writes `errorType`), the wire envelope carries no `statusCode`, and `wildoError` has none either. So the\n * shared guard was `false` for every refusal that came over HTTP, measured through the real interceptor in\n * `wildo-http-client.backend-refusal.test.ts`, and every frontend branch keyed on it was dead. Nothing in a frontend\n * process builds a `WildoError_Backend`, so in this package it tested for a value no catch can receive. It is not used\n * here at all, and `no-shared-backend-error-guard.test.ts` keeps it out.\n *\n * Rejected: make the client reject with a value the shared guard accepts, by also writing `type`, `statusCode` and\n * `severity` onto the axios error. The guard would then narrow an axios error to `WildoError_Backend`, a type that\n * promises `backendActions`, a `Date` `timestamp`, an enum `customMessageReference` and the backend's internal fields,\n * none of which it has. It would also change what `describeCaughtError` prints for every frontend failure (the\n * reference instead of the message). This module names exactly the fields the client sets, and is where they are\n * written, so the predicate and its producer cannot disagree.\n *\n * ## The rethrow convention it replaces\n *\n * The dead branches mostly rethrew whatever the shared guard accepted, meaning \"the global error handler says this\n * one\". It already has: the interceptor hands the refusal to `handleHttpError` the moment it arrives, and the\n * `GlobalErrorHandler` toast follows from that. A rethrow adds nothing but harm: it reaches `unhandledrejection`,\n * which emits it a SECOND time as an `UNCAUGHT_EXCEPTION`, and it skips whatever state the catch restores after it\n * (a busy flag, a loading flag). So a catch that wants to leave a refusal to the global handler asks\n * {@link isBackendRefusalShownToUser} and, when it answers true, restores its state and says nothing of its own. A\n * refusal the handler did NOT show (a 400 at default risk, a silent request) is the caller's to word.\n */\nimport {\n ErrorActionFrontend,\n ErrorType,\n type ErrorRequestOutcome,\n type WildoError_Frontend,\n} from '@wildo-ai/saas-models';\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * A refusal the backend authored, as a frontend `catch` receives it: the fields the HTTP client adds to a rejected\n * request when the backend answered with its error envelope. Narrow a caught value to it with the predicates below,\n * all imported from `@wildo-ai/saas-frontend-lib`. Never use `isWildoBackendError` (from `@wildo-ai/saas-models`) in\n * frontend code: it recognises the backend's own error object, which never crosses HTTP, so it is false for every\n * refusal a view can catch.\n */\nexport interface BackendRefusal {\n /** The response's HTTP status. */\n readonly httpStatus: number;\n /** The envelope's `type`. Its presence is what says the backend authored the refusal. */\n readonly errorType: ErrorType;\n /** The envelope's `customMessageReference`: the refusal's words in `errors_messages`. Absent on a bare envelope. */\n readonly customMessageReference?: string;\n /** Whether the refused request took effect, when the server knows. */\n readonly requestOutcome?: ErrorRequestOutcome;\n /** The envelope's sanitized `details` (an allow-listed `code`, `versionConflict`, `inForceReleases`, …). */\n readonly context?: Readonly<Record<string, unknown>>;\n /** Field-level validation errors, when the envelope names fields. */\n readonly validationErrors?: Readonly<Record<string, unknown>>;\n /** The `WildoError_Frontend` `handleHttpError` built from it, once retries are exhausted. */\n readonly wildoError?: WildoError_Frontend;\n /** Whether `handleHttpError` emitted it to the global error handler. */\n readonly wildoErrorEventEmitted?: boolean;\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n\n/**\n * Copy the backend's error envelope onto the rejected request (the response interceptor's only writer of these\n * fields). Standard nested format `{ error: { … } }`; a legacy flat body keeps its `message` and `context` and is not\n * a {@link BackendRefusal}, since it names no `type`.\n */\nexport function attachBackendErrorEnvelope(error: Record<string, any>, status: number | undefined, errorData: unknown): void {\n if (!errorData) return;\n const data = errorData as Record<string, any>;\n const nested = data.error;\n\n if (nested && typeof nested === 'object') {\n if (nested.message) error.message = nested.message;\n if (nested.validationErrors) error.validationErrors = nested.validationErrors;\n if (nested.details) error.context = nested.details;\n if (nested.type) error.errorType = nested.type;\n if (nested.customMessageReference) error.customMessageReference = nested.customMessageReference;\n // Whether the refused request took effect, when the server knows (#3004): a caller deciding whether to offer\n // \"try again\" reads it here, and the retry ladder reads it off the response.\n if (nested.requestOutcome) error.requestOutcome = nested.requestOutcome;\n } else {\n if (data.message) error.message = data.message;\n if (data.context) error.context = data.context;\n }\n\n // Always set the numeric HTTP status for downstream consumers.\n error.httpStatus = status;\n}\n\nconst ERROR_TYPES: ReadonlySet<string> = new Set<string>(Object.values(ErrorType));\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * Whether a caught value is a refusal the backend authored: a rejected request whose response carried the backend's\n * error envelope. False for a network failure, a cancellation, a timeout, a client-side error, and a response that is\n * not the backend's envelope (a proxy's HTML 502).\n */\nexport function isBackendRefusal(error: unknown): error is BackendRefusal {\n if (error === null || typeof error !== 'object') return false;\n const candidate = error as { httpStatus?: unknown; errorType?: unknown };\n return typeof candidate.httpStatus === 'number' && typeof candidate.errorType === 'string' && ERROR_TYPES.has(candidate.errorType);\n}\n\n/**\n * The statuses that say \"send it again later\" (RFC 9110 §15.5.9 408; RFC 8470 425; RFC 6585 §4 429). Every other 4xx\n * is a refusal that sending the same request again cannot change.\n */\nexport const RETRYABLE_CLIENT_ERROR_STATUSES: ReadonlySet<number> = new Set([408, 425, 429]);\n\n/**\n * Whether sending the same request again cannot change the answer: a backend refusal with a 4xx status other than\n * {@link RETRYABLE_CLIENT_ERROR_STATUSES}. A 5xx is the server failing, and may clear on its own.\n */\nexport function isFinalBackendRefusal(error: unknown): error is BackendRefusal {\n return isBackendRefusal(error)\n && error.httpStatus >= 400 && error.httpStatus < 500\n && !RETRYABLE_CLIENT_ERROR_STATUSES.has(error.httpStatus);\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n\n/** @wildo_source:part:start saas.frontend.errors.backend-refusal facet:layer:frontend facet:audience:app-developer */\n/**\n * Whether the global error handler shows this error to the person as a notification: not silenced by the request\n * (`suppressUserDisplay`), not hidden by the HTTP behaviour matrix (`showToUser`), and asking for a notification. The\n * ONE statement of that rule: `GlobalErrorHandler` decides its toast with it.\n */\nexport function wildoErrorIsShownToUser(wildoError: Pick<WildoError_Frontend, 'showToUser' | 'suppressUserDisplay' | 'frontendActions'>): boolean {\n if (wildoError.suppressUserDisplay === true || wildoError.showToUser === false) return false;\n const actions = (wildoError.frontendActions ?? []) as readonly ErrorActionFrontend[];\n return actions.includes(ErrorActionFrontend.NOTIFY) || actions.includes(ErrorActionFrontend.SHOW_TOAST);\n}\n\n/**\n * Whether the person has already been told about this refusal by the global error handler, so the catch should\n * restore its state and add nothing. Two cases count as told without a toast of this request's own: an identical\n * error the handler suppressed as a duplicate (the first one was shown), and a refusal that ended the session, which\n * the sign-in page explains.\n */\nexport function isBackendRefusalShownToUser(error: unknown): error is BackendRefusal {\n return isBackendRefusal(error)\n && error.wildoErrorEventEmitted === true\n && error.wildoError !== undefined\n && wildoErrorIsShownToUser(error.wildoError);\n}\n/** @wildo_source:part:end saas.frontend.errors.backend-refusal */\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationContext.d.ts","sourceRoot":"","sources":["../../../../src/core/events/NotificationContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAuF,MAAM,OAAO,CAAC;AAQ5G,OAAO,EAAE,gCAAgC,EAAE,MAAM,+DAA+D,CAAC;AAEjH,OAAO,EACL,eAAe,EACf,oBAAoB,EAEpB,KAAK,4BAA4B,EAIlC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationContext.d.ts","sourceRoot":"","sources":["../../../../src/core/events/NotificationContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,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