@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":"validate-fields-and-show-errors.js","sourceRoot":"","sources":["../../../../../src/components/form/validation-errors/validate-fields-and-show-errors.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"validate-fields-and-show-errors.js","sourceRoot":"","sources":["../../../../../src/components/form/validation-errors/validate-fields-and-show-errors.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,O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AAK,EAAE,CAAC,CAAC;IACtI,CAAC;IACD,+BAA+B,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,SAAS,iBAAiB,CAAC,IAAmB;IAC5C,MAAM,KAAK,GAAI,IAAI,CAAC,OAAuD,CAAC,MAAM,EAAE,KAAK,CAAC;IAC1F,OAAO,KAAK,YAAY,GAAG,CAAC,CAAC,CAAE,KAAqB,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;AACnE,CAAC","sourcesContent":["/**\n * Validating PART of a form and showing what is wrong with it: what a section's Save and a wizard's Next both do\n * before they act on some of a form's fields.\n *\n * Both used to call `form.trigger(names)` and, when it failed, stop. Three things went wrong between those two lines:\n *\n * 1. **The errors stayed invisible.** A field shows a CLIENT error once it is touched or the form has been submitted\n * (`getFieldError`). Without a whole-form submit, the fields a person never visited are neither, so Save or Next did\n * nothing visible at all. The fields that failed are now marked touched, and the first one is scrolled to (and its\n * hidden panel shown, `field-reveal.ts`), and the attempt is recorded so a missing value shows too (`save-attempt.ts`). A server error shows whatever the touch state, and its field is NOT\n * touched: touching writes the value back, and the server-error auto-clear reads any write as an edit.\n * 2. **A server's refusal was erased.** `trigger` re-runs the CLIENT schema at those names and replaces their errors,\n * so a uniqueness conflict or a rejection the server returned, which no client schema can know about, vanished,\n * and Next let the person past a value the server had just refused. Those errors are put back, and still count.\n * (They clear on their own once the person edits the field: `useServerErrorInjection`.)\n * 3. **An empty list validated the whole form.** `trigger()` with no names means EVERY field, so a step with no\n * fields of its own failed on fields from other steps and could never be left. No fields means nothing to check.\n *\n * What is touched is each field IN error (an array item's `steps.0.title`), not the name the section registered\n * (`steps`). Touching a field array's root went through `setValue`, which for a field array ignores `shouldTouch` and\n * republishes the array, so every row was given a new key and remounted, and the items stayed untouched with their\n * errors hidden (react-hook-form 7.71, `createFormControl` `setValue`). A field array's own error (too few items) is\n * shown whatever the touch state, so its root is never touched.\n */\nimport type { FieldError, FieldValues, UseFormReturn } from 'react-hook-form';\nimport { SERVER_ERROR_TYPE, UNIQUE_ERROR_TYPE } from '../form-context';\nimport { scrollAndFocusFirstErroredField } from './scroll-to-first-error.utils';\nimport { recordSaveAttempt } from './save-attempt';\n\ninterface ErroredLeaf {\n path: string;\n error: FieldError;\n}\n\n/** Every error leaf under `node`, with its dotted path. A leaf carries a string `type` or `message`; `ref` is never walked. */\nfunction collectErrorLeaves(node: unknown, path: string, leaves: ErroredLeaf[]): void {\n if (!node || typeof node !== 'object') return;\n const record = node as Record<string, unknown>;\n if (typeof record.type === 'string' || typeof record.message === 'string') {\n leaves.push({ path, error: record as unknown as FieldError });\n return;\n }\n for (const [key, value] of Object.entries(record)) {\n // An array's or an object's own error sits under `root` and belongs to the container's path.\n collectErrorLeaves(value, key === 'root' ? path : `${path}.${key}`, leaves);\n }\n}\n\nfunction erroredLeavesOf<TValues extends FieldValues>(form: UseFormReturn<TValues>, names: readonly string[]): ErroredLeaf[] {\n const leaves: ErroredLeaf[] = [];\n for (const name of names) collectErrorLeaves(form.getFieldState(name as never).error, name, leaves);\n return leaves;\n}\n\nconst isServerError = (error: FieldError): boolean => error.type === SERVER_ERROR_TYPE || error.type === UNIQUE_ERROR_TYPE;\n\n/**\n * Validates the named fields, and when any is invalid makes the errors visible and brings the first one on screen.\n *\n * @returns whether the named fields are valid, counting a server error still standing on one of them.\n */\nexport async function validateFieldsAndShowErrors<TValues extends FieldValues>(\n form: UseFormReturn<TValues>,\n fieldNames: readonly string[],\n): Promise<boolean> {\n if (fieldNames.length === 0) return true;\n\n const serverErrors = erroredLeavesOf(form, fieldNames).filter((leaf) => isServerError(leaf.error));\n const clientValid = await form.trigger(fieldNames as never);\n for (const { path, error } of serverErrors) {\n if (!form.getFieldState(path as never).error) form.setError(path as never, { type: error.type, message: error.message });\n }\n if (clientValid && serverErrors.length === 0) return true;\n\n const leaves = erroredLeavesOf(form, fieldNames);\n const untypedForm = form as unknown as UseFormReturn;\n // A Save or a Next is the person asking to save these fields: their missing values may show now (`getFieldError`).\n recordSaveAttempt(form.control, fieldNames);\n const fieldArrayNames = fieldArrayNamesOf(untypedForm);\n for (const leaf of leaves) {\n if (isServerError(leaf.error) || fieldArrayNames.has(leaf.path)) continue;\n // Touching is what makes a field show its error (`getFieldError`); the value is written back unchanged.\n untypedForm.setValue(leaf.path, untypedForm.getValues(leaf.path), { shouldTouch: true, shouldDirty: false, shouldValidate: false });\n }\n scrollAndFocusFirstErroredField(leaves.map((leaf) => leaf.path));\n return false;\n}\n\n/**\n * The names `useFieldArray` manages. React Hook Form keeps them on its control and offers no public question for it;\n * read defensively, an unexpected shape reads as none (the cost is a remount, never a lost value).\n */\nfunction fieldArrayNamesOf(form: UseFormReturn): ReadonlySet<string> {\n const names = (form.control as unknown as { _names?: { array?: unknown } })._names?.array;\n return names instanceof Set ? (names as Set<string>) : new Set();\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuBarBehavior.d.ts","sourceRoot":"","sources":["../../../../../src/components/navigation/app-level/useMenuBarBehavior.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAoB,KAAK,eAAe,EAA+C,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"useMenuBarBehavior.d.ts","sourceRoot":"","sources":["../../../../../src/components/navigation/app-level/useMenuBarBehavior.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAoB,KAAK,eAAe,EAA+C,MAAM,sDAAsD,CAAC;AAe3J,MAAM,WAAW,yBAAyB;IACxC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B,GAAG,eAAe,CAyI3F"}
|
|
@@ -16,6 +16,7 @@ import { FrontendEvents } from '../../../core/events/events.frontend.schemas.js'
|
|
|
16
16
|
import { mapApplicationLevelToFrontendComponentType } from '../../../core/app-shell/app-shell.utils.js';
|
|
17
17
|
import { resolveHostedComponents } from '../../../core/app-shell/hosted-components.utils.js';
|
|
18
18
|
import { MenuBarEntryKind } from '../../../core/app-shell/app-shell.schemas.js';
|
|
19
|
+
import { useResolvedHome } from '../../../core/navigation/home-resolution.js';
|
|
19
20
|
function isMenubarConfigObject(config) {
|
|
20
21
|
return typeof config === 'object' && config !== null && !Array.isArray(config);
|
|
21
22
|
}
|
|
@@ -40,12 +41,13 @@ function isMenubarConfigObject(config) {
|
|
|
40
41
|
*/
|
|
41
42
|
export function useMenuBarBehavior(options = {}) {
|
|
42
43
|
const { mode } = options;
|
|
43
|
-
const { UIConfig, appComponentsConfiguration, navigationLayout
|
|
44
|
+
const { UIConfig, appComponentsConfiguration, navigationLayout } = useUI();
|
|
44
45
|
const resolutionCtx = useLauncherResolutionContext();
|
|
45
46
|
const { navigate } = useNavigationController();
|
|
46
47
|
const runtimeAvailabilityContext = useLauncherRuntimeAvailabilityContext();
|
|
47
48
|
const { isNavigationItemActive: isItemActiveByRoute, isHomeActive, handleHomeClick } = useNavigationBehaviors();
|
|
48
|
-
|
|
49
|
+
// The home THIS person sees (#4576): an audience home, not the default, when they belong to one.
|
|
50
|
+
const homeCompositeViewRef = useResolvedHome().home?.compositeViewReference;
|
|
49
51
|
const config = appComponentsConfiguration?.[ApplicationLevelComponentType.MENUBAR];
|
|
50
52
|
const currentBreakpoint = UIConfig?.currentBreakpoint;
|
|
51
53
|
/*
|
|
@@ -76,7 +78,7 @@ export function useMenuBarBehavior(options = {}) {
|
|
|
76
78
|
*/
|
|
77
79
|
const activeUrlPath = NavigationUtils.getMostSpecificActiveRoute(resolved.items.map(item => item.urlPath), isItemActiveByRoute);
|
|
78
80
|
/*
|
|
79
|
-
* HOME renders a composite IN PLACE at `/` when `
|
|
81
|
+
* HOME renders a composite IN PLACE at `/` when the viewer's resolved home (`useResolvedHome`) names
|
|
80
82
|
* one, and the item pointing at that same composite carries `/composite/<ref>` — a different
|
|
81
83
|
* path for the same surface. On the home route that item is the current destination, and no
|
|
82
84
|
* route comparison can see it; the home definition can.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMenuBarBehavior.js","sourceRoot":"","sources":["../../../../../src/components/navigation/app-level/useMenuBarBehavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,6BAA6B,EAAE,MAAM,uEAAuE,CAAC;AAKtH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EACL,uCAAuC,EACvC,qCAAqC,GACtC,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AACtG,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AAEzF,OAAO,EAAE,0CAA0C,EAAE,MAAM,oDAAoD,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAqE,MAAM,sDAAsD,CAAC;AAE3J,SAAS,q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AC,mBAAmB,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,aAAa;QACb,0BAA0B,EAAE,0CAA0C;KACvE,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useMemo } from 'react';\n\nimport { ApplicationLevelComponentType } from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\nimport type {\n MenubarHostedComponent,\n MenubarLauncherItem,\n} from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { ViewportBreakpoint } from '@wildo-ai/zod-decorators';\nimport { HorizontalPlacement } from '@wildo-ai/presets-components-models';\nimport type { BrandAssetTheme } from '@wildo-ai/saas-models';\nimport { useBrandIdentity } from '~wildo-frontend-lib/core/branding/useBrandIdentity';\nimport {\n filterMenubarItemsByRuntimeAvailability,\n useLauncherRuntimeAvailabilityContext,\n} from '~wildo-frontend-lib/core/navigation/launcher-runtime-availability';\nimport { resolveMenubarContent } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport { NavigationUtils } from '~wildo-frontend-lib/core/navigation/navigation.utils';\nimport { useLauncherResolutionContext } from '~wildo-frontend-lib/core/navigation/useLauncherResolutionContext';\nimport { useNavigationController } from '~wildo-frontend-lib/core/navigation/useNavigationController';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useNavigationBehaviors } from './useNavigationBehaviors';\nimport { useSidebarMobileDrawerMode } from './useSidebarBehavior';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\n\nimport { mapApplicationLevelToFrontendComponentType } from '~wildo-frontend-lib/core/app-shell/app-shell.utils';\nimport { resolveHostedComponents } from '~wildo-frontend-lib/core/app-shell/hosted-components.utils';\nimport { MenuBarEntryKind, type MenuBarBehavior, type MenuBarBehaviorItem, type MenuBarEntry } from '~wildo-frontend-lib/core/app-shell/app-shell.schemas';\n\nfunction isMenubarConfigObject(\n config: unknown,\n): config is {\n displayPolicy?: string;\n hostedComponents?: MenubarHostedComponent[];\n items?: MenubarLauncherItem[];\n brandHeader?: boolean;\n brandMarkTheme?: BrandAssetTheme;\n} {\n return typeof config === 'object' && config !== null && !Array.isArray(config);\n}\n\nexport interface UseMenuBarBehaviorOptions {\n mode?: 'FIXED' | 'OVERLAY';\n}\n\n/**\n * Behavior hook for the MenuBar.\n *\n * Hosted components still follow the container inversion model via\n * `hostedComponents`, while declarative `items` are filtered by\n * `runtimeAvailability`, resolved through the launcher pipeline, then exposed\n * with executable callbacks for the preset layer to render.\n *\n * Each item also carries `isActive`, elected the way the sidebar elects its own\n * (`useNavigationBehaviors().isNavigationItemActive` narrowed by\n * `getMostSpecificActiveRoute`): the item whose route is the most specific match\n * of the current pathname, and no other. Until 2026-09-22 the resolved `urlPath`\n * was dropped here, so the preset had nothing to compare against the route and a\n * menubar could not say which destination was current — invisible while every\n * application declared `items: []`, and the first thing a menubar-only shell\n * (the application-creation workbench, #1454) needed.\n *\n * Dynamic component registry resolution remains in the preset layer.\n */\nexport function useMenuBarBehavior(options: UseMenuBarBehaviorOptions = {}): MenuBarBehavior {\n const { mode } = options;\n const { UIConfig, appComponentsConfiguration, navigationLayout, homeDefinition } = useUI();\n const resolutionCtx = useLauncherResolutionContext();\n const { navigate } = useNavigationController();\n const runtimeAvailabilityContext = useLauncherRuntimeAvailabilityContext();\n const { isNavigationItemActive: isItemActiveByRoute, isHomeActive, handleHomeClick } = useNavigationBehaviors();\n const homeCompositeViewRef = homeDefinition?.compositeViewReference;\n\n\n const config = appComponentsConfiguration?.[ApplicationLevelComponentType.MENUBAR];\n const currentBreakpoint = UIConfig?.currentBreakpoint;\n\n /*\n * Read unconditionally (rules of hooks), EXPOSED only when the config opted in — the sidebar's\n * own discipline, so a preset cannot render a mark on a surface that never asked for one.\n */\n const brandMarkTheme = isMenubarConfigObject(config) ? config.brandMarkTheme : undefined;\n const brandIdentity = useBrandIdentity({ theme: brandMarkTheme });\n const brandHeader = isMenubarConfigObject(config) && config.brandHeader === true ? brandIdentity : undefined;\n\n const containerComponents = useMemo(() => {\n if (!isMenubarConfigObject(config)) return [];\n return resolveHostedComponents(\n ApplicationLevelComponentType.MENUBAR,\n config.hostedComponents,\n appComponentsConfiguration as Record<string, unknown> | undefined,\n currentBreakpoint,\n HorizontalPlacement.START,\n navigationLayout,\n );\n // `navigationLayout` decides whether the shell may draw the back control (`backAffordanceOwner`),\n // so a layout change must re-resolve the hosted set. The sidebar's equivalent memo already lists it.\n }, [appComponentsConfiguration, config, currentBreakpoint, navigationLayout]);\n\n const configItems = useMemo(() => (\n isMenubarConfigObject(config)\n ? filterMenubarItemsByRuntimeAvailability(config.items, runtimeAvailabilityContext)\n : undefined\n ), [config, runtimeAvailabilityContext]);\n\n const items = useMemo((): MenuBarBehavior['items'] => {\n if (!resolutionCtx || !configItems?.length) {\n return [];\n }\n\n const resolved = resolveMenubarContent(undefined, configItems, resolutionCtx);\n\n /*\n * ONE active item. `isActiveRoute` marks a parent route active on a child URL too, so a bar\n * listing both would highlight both; the most specific route wins, exactly as in the sidebar.\n */\n const activeUrlPath = NavigationUtils.getMostSpecificActiveRoute(\n resolved.items.map(item => item.urlPath),\n isItemActiveByRoute,\n );\n /*\n * HOME renders a composite IN PLACE at `/` when `homeDefinition.compositeViewReference` names\n * one, and the item pointing at that same composite carries `/composite/<ref>` — a different\n * path for the same surface. On the home route that item is the current destination, and no\n * route comparison can see it; the home definition can.\n */\n const isHomeItem = (item: { viewRef?: string }): boolean =>\n isHomeActive && homeCompositeViewRef !== undefined && item.viewRef === homeCompositeViewRef;\n\n return resolved.items.map(item => ({\n id: item.id,\n label: item.label,\n iconReference: item.iconReference,\n group: item.group,\n isActive: (activeUrlPath !== undefined && item.urlPath === activeUrlPath) || isHomeItem(item),\n ...(item.notificationBadgeRef ? { notificationBadgeRef: item.notificationBadgeRef } : {}),\n onExecute: () => {\n NavigationUtils.dispatchNavigationForResolvedTarget(\n navigate,\n item,\n ApplicationLevelComponentType.MENUBAR,\n );\n },\n }));\n }, [configItems, resolutionCtx, navigate, isItemActiveByRoute, isHomeActive, homeCompositeViewRef]);\n\n /*\n * The bar's entries (#1828): an ungrouped item stands alone, and a group stands where its FIRST item is, holding all of\n * its items in declaration order. The preset used to derive this while rendering, so another renderer had to repeat it.\n */\n const entries = useMemo((): MenuBarEntry[] => {\n const byGroup = new Map<string, MenuBarBehaviorItem[]>();\n const ordered: MenuBarEntry[] = [];\n for (const item of items) {\n if (!item.group) {\n ordered.push({ kind: MenuBarEntryKind.ITEM, item });\n continue;\n }\n const members = byGroup.get(item.group);\n if (members) {\n members.push(item);\n continue;\n }\n const created = [item];\n byGroup.set(item.group, created);\n ordered.push({ kind: MenuBarEntryKind.GROUP, group: item.group, items: created });\n }\n return ordered;\n }, [items]);\n\n // While the sidebar is an overlay drawer nothing of it renders inline, so the bar carries its opening affordance. The\n // drawer's state stays the sidebar behavior's own: this only speaks the existing toggle event.\n const isSidebarDrawerMode = useSidebarMobileDrawerMode();\n const { emit } = useEventBus();\n const toggleSidebarDrawer = useCallback(() => emit(FrontendEvents.HOTKEY_SIDEBAR_TOGGLE, {}), [emit]);\n\n const menubarConfig = useMemo(() => {\n const menubarMode = mode\n || (isMenubarConfigObject(config) ? config.displayPolicy ?? 'FIXED' : typeof config === 'string' ? config : 'FIXED');\n const isOverlay = menubarMode === 'OVERLAY';\n const isMobile = currentBreakpoint === ViewportBreakpoint.MOBILE;\n\n return {\n mode: menubarMode,\n isOverlay,\n showMobileLayout: isMobile && isOverlay,\n };\n }, [config, mode, currentBreakpoint]);\n\n return {\n containerComponents,\n brandHeader,\n isHomeActive,\n handleHomeClick,\n items,\n entries,\n ...(isSidebarDrawerMode ? { toggleSidebarDrawer } : {}),\n menubarConfig,\n mapToFrontendComponentType: mapApplicationLevelToFrontendComponentType,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"useMenuBarBehavior.js","sourceRoot":"","sources":["../../../../../src/components/navigation/app-level/useMenu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sourcesContent":["import { useCallback, useMemo } from 'react';\n\nimport { ApplicationLevelComponentType } from '~wildo-frontend-lib/core/config/app-level-components.frontend.schemas';\nimport type {\n MenubarHostedComponent,\n MenubarLauncherItem,\n} from '~wildo-frontend-lib/core/config/launcher-items.frontend.schemas';\nimport { ViewportBreakpoint } from '@wildo-ai/zod-decorators';\nimport { HorizontalPlacement } from '@wildo-ai/presets-components-models';\nimport type { BrandAssetTheme } from '@wildo-ai/saas-models';\nimport { useBrandIdentity } from '~wildo-frontend-lib/core/branding/useBrandIdentity';\nimport {\n filterMenubarItemsByRuntimeAvailability,\n useLauncherRuntimeAvailabilityContext,\n} from '~wildo-frontend-lib/core/navigation/launcher-runtime-availability';\nimport { resolveMenubarContent } from '~wildo-frontend-lib/core/navigation/launcher-resolution';\nimport { NavigationUtils } from '~wildo-frontend-lib/core/navigation/navigation.utils';\nimport { useLauncherResolutionContext } from '~wildo-frontend-lib/core/navigation/useLauncherResolutionContext';\nimport { useNavigationController } from '~wildo-frontend-lib/core/navigation/useNavigationController';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useNavigationBehaviors } from './useNavigationBehaviors';\nimport { useSidebarMobileDrawerMode } from './useSidebarBehavior';\nimport { useEventBus } from '~wildo-frontend-lib/core/events/useEventBus';\nimport { FrontendEvents } from '~wildo-frontend-lib/core/events/events.frontend.schemas';\n\nimport { mapApplicationLevelToFrontendComponentType } from '~wildo-frontend-lib/core/app-shell/app-shell.utils';\nimport { resolveHostedComponents } from '~wildo-frontend-lib/core/app-shell/hosted-components.utils';\nimport { MenuBarEntryKind, type MenuBarBehavior, type MenuBarBehaviorItem, type MenuBarEntry } from '~wildo-frontend-lib/core/app-shell/app-shell.schemas';\nimport { useResolvedHome } from '~wildo-frontend-lib/core/navigation/home-resolution';\n\nfunction isMenubarConfigObject(\n config: unknown,\n): config is {\n displayPolicy?: string;\n hostedComponents?: MenubarHostedComponent[];\n items?: MenubarLauncherItem[];\n brandHeader?: boolean;\n brandMarkTheme?: BrandAssetTheme;\n} {\n return typeof config === 'object' && config !== null && !Array.isArray(config);\n}\n\nexport interface UseMenuBarBehaviorOptions {\n mode?: 'FIXED' | 'OVERLAY';\n}\n\n/**\n * Behavior hook for the MenuBar.\n *\n * Hosted components still follow the container inversion model via\n * `hostedComponents`, while declarative `items` are filtered by\n * `runtimeAvailability`, resolved through the launcher pipeline, then exposed\n * with executable callbacks for the preset layer to render.\n *\n * Each item also carries `isActive`, elected the way the sidebar elects its own\n * (`useNavigationBehaviors().isNavigationItemActive` narrowed by\n * `getMostSpecificActiveRoute`): the item whose route is the most specific match\n * of the current pathname, and no other. Until 2026-09-22 the resolved `urlPath`\n * was dropped here, so the preset had nothing to compare against the route and a\n * menubar could not say which destination was current — invisible while every\n * application declared `items: []`, and the first thing a menubar-only shell\n * (the application-creation workbench, #1454) needed.\n *\n * Dynamic component registry resolution remains in the preset layer.\n */\nexport function useMenuBarBehavior(options: UseMenuBarBehaviorOptions = {}): MenuBarBehavior {\n const { mode } = options;\n const { UIConfig, appComponentsConfiguration, navigationLayout } = useUI();\n const resolutionCtx = useLauncherResolutionContext();\n const { navigate } = useNavigationController();\n const runtimeAvailabilityContext = useLauncherRuntimeAvailabilityContext();\n const { isNavigationItemActive: isItemActiveByRoute, isHomeActive, handleHomeClick } = useNavigationBehaviors();\n // The home THIS person sees (#4576): an audience home, not the default, when they belong to one.\n const homeCompositeViewRef = useResolvedHome().home?.compositeViewReference;\n\n\n const config = appComponentsConfiguration?.[ApplicationLevelComponentType.MENUBAR];\n const currentBreakpoint = UIConfig?.currentBreakpoint;\n\n /*\n * Read unconditionally (rules of hooks), EXPOSED only when the config opted in — the sidebar's\n * own discipline, so a preset cannot render a mark on a surface that never asked for one.\n */\n const brandMarkTheme = isMenubarConfigObject(config) ? config.brandMarkTheme : undefined;\n const brandIdentity = useBrandIdentity({ theme: brandMarkTheme });\n const brandHeader = isMenubarConfigObject(config) && config.brandHeader === true ? brandIdentity : undefined;\n\n const containerComponents = useMemo(() => {\n if (!isMenubarConfigObject(config)) return [];\n return resolveHostedComponents(\n ApplicationLevelComponentType.MENUBAR,\n config.hostedComponents,\n appComponentsConfiguration as Record<string, unknown> | undefined,\n currentBreakpoint,\n HorizontalPlacement.START,\n navigationLayout,\n );\n // `navigationLayout` decides whether the shell may draw the back control (`backAffordanceOwner`),\n // so a layout change must re-resolve the hosted set. The sidebar's equivalent memo already lists it.\n }, [appComponentsConfiguration, config, currentBreakpoint, navigationLayout]);\n\n const configItems = useMemo(() => (\n isMenubarConfigObject(config)\n ? filterMenubarItemsByRuntimeAvailability(config.items, runtimeAvailabilityContext)\n : undefined\n ), [config, runtimeAvailabilityContext]);\n\n const items = useMemo((): MenuBarBehavior['items'] => {\n if (!resolutionCtx || !configItems?.length) {\n return [];\n }\n\n const resolved = resolveMenubarContent(undefined, configItems, resolutionCtx);\n\n /*\n * ONE active item. `isActiveRoute` marks a parent route active on a child URL too, so a bar\n * listing both would highlight both; the most specific route wins, exactly as in the sidebar.\n */\n const activeUrlPath = NavigationUtils.getMostSpecificActiveRoute(\n resolved.items.map(item => item.urlPath),\n isItemActiveByRoute,\n );\n /*\n * HOME renders a composite IN PLACE at `/` when the viewer's resolved home (`useResolvedHome`) names\n * one, and the item pointing at that same composite carries `/composite/<ref>` — a different\n * path for the same surface. On the home route that item is the current destination, and no\n * route comparison can see it; the home definition can.\n */\n const isHomeItem = (item: { viewRef?: string }): boolean =>\n isHomeActive && homeCompositeViewRef !== undefined && item.viewRef === homeCompositeViewRef;\n\n return resolved.items.map(item => ({\n id: item.id,\n label: item.label,\n iconReference: item.iconReference,\n group: item.group,\n isActive: (activeUrlPath !== undefined && item.urlPath === activeUrlPath) || isHomeItem(item),\n ...(item.notificationBadgeRef ? { notificationBadgeRef: item.notificationBadgeRef } : {}),\n onExecute: () => {\n NavigationUtils.dispatchNavigationForResolvedTarget(\n navigate,\n item,\n ApplicationLevelComponentType.MENUBAR,\n );\n },\n }));\n }, [configItems, resolutionCtx, navigate, isItemActiveByRoute, isHomeActive, homeCompositeViewRef]);\n\n /*\n * The bar's entries (#1828): an ungrouped item stands alone, and a group stands where its FIRST item is, holding all of\n * its items in declaration order. The preset used to derive this while rendering, so another renderer had to repeat it.\n */\n const entries = useMemo((): MenuBarEntry[] => {\n const byGroup = new Map<string, MenuBarBehaviorItem[]>();\n const ordered: MenuBarEntry[] = [];\n for (const item of items) {\n if (!item.group) {\n ordered.push({ kind: MenuBarEntryKind.ITEM, item });\n continue;\n }\n const members = byGroup.get(item.group);\n if (members) {\n members.push(item);\n continue;\n }\n const created = [item];\n byGroup.set(item.group, created);\n ordered.push({ kind: MenuBarEntryKind.GROUP, group: item.group, items: created });\n }\n return ordered;\n }, [items]);\n\n // While the sidebar is an overlay drawer nothing of it renders inline, so the bar carries its opening affordance. The\n // drawer's state stays the sidebar behavior's own: this only speaks the existing toggle event.\n const isSidebarDrawerMode = useSidebarMobileDrawerMode();\n const { emit } = useEventBus();\n const toggleSidebarDrawer = useCallback(() => emit(FrontendEvents.HOTKEY_SIDEBAR_TOGGLE, {}), [emit]);\n\n const menubarConfig = useMemo(() => {\n const menubarMode = mode\n || (isMenubarConfigObject(config) ? config.displayPolicy ?? 'FIXED' : typeof config === 'string' ? config : 'FIXED');\n const isOverlay = menubarMode === 'OVERLAY';\n const isMobile = currentBreakpoint === ViewportBreakpoint.MOBILE;\n\n return {\n mode: menubarMode,\n isOverlay,\n showMobileLayout: isMobile && isOverlay,\n };\n }, [config, mode, currentBreakpoint]);\n\n return {\n containerComponents,\n brandHeader,\n isHomeActive,\n handleHomeClick,\n items,\n entries,\n ...(isSidebarDrawerMode ? { toggleSidebarDrawer } : {}),\n menubarConfig,\n mapToFrontendComponentType: mapApplicationLevelToFrontendComponentType,\n };\n}\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type ActionBarButton, type ActionBarItem } from '../../components/actions/action-bar';
|
|
2
3
|
import type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';
|
|
3
4
|
import type { FrontendResourceConfiguration_Operation } from '../../core/resources/resources.frontend.schemas';
|
|
4
5
|
import { ComponentPresetProps } from '../../core/components-registry/component-registry.frontend.schemas';
|
|
5
6
|
import { BaseResourcesLayoutProps } from './component-props.resources-layout.frontend.schemas';
|
|
7
|
+
import type { FeatureAvailability } from '../../core/features/useFeatureAvailability';
|
|
6
8
|
export interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResourcesLayoutProps {
|
|
7
9
|
/** The loaded record — feeds `enabledCondition` evaluation + each op's target. */
|
|
8
10
|
currentObject?: Record<string, any>;
|
|
@@ -20,6 +22,23 @@ export interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResour
|
|
|
20
22
|
*/
|
|
21
23
|
responsiveMaxWidth?: ResponsiveMaxWidth;
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The zone's rows: one per concrete action, multi-variant operations (subgroups) flattened. A plan-locked operation is ONE
|
|
27
|
+
* row whatever its variants (`useResourceOperationActions` gives a locked subgroup no items), so it keeps its place and
|
|
28
|
+
* its lock instead of disappearing.
|
|
29
|
+
*/
|
|
30
|
+
export declare function flattenDangerZoneRows(items: readonly ActionBarItem[]): ActionBarButton[];
|
|
31
|
+
/**
|
|
32
|
+
* One row's action. Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see
|
|
33
|
+
* `resolveDrawnActionVariant`); its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays.
|
|
34
|
+
*
|
|
35
|
+
* A plan-locked action shows its lock and asks for the plan prompt when chosen (`onLocked`), as in the action bar: a
|
|
36
|
+
* plain disabled button said nothing about the plan. `aria-disabled`, so the click that explains it still lands.
|
|
37
|
+
*/
|
|
38
|
+
export declare function DangerZoneRowAction({ row, onLocked }: {
|
|
39
|
+
row: ActionBarButton;
|
|
40
|
+
onLocked: (availability: FeatureAvailability) => void;
|
|
41
|
+
}): React.JSX.Element;
|
|
23
42
|
/**
|
|
24
43
|
* GitHub-style "Danger Zone" — a fenced section at the bottom of a resource's
|
|
25
44
|
* read view holding the destructive (`DANGER_ZONE`-placement) operations, each
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_DangerZone.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ResourceLayout_DangerZone.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,EAA0B,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAKrI,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAK9E,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAC;AAK7H,OAAO,EAAE,oBAAoB,EAAE,MAAM,kFAAkF,CAAC;AAExH,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAK/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAIpG,MAAM,WAAW,4CAA6C,SAAQ,wBAAwB;IAC5F,kFAAkF;IAClF,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,uCAAuC,KAAK,IAAI,CAAC;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;OAQG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,eAAe,EAAE,CAcxF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;IAAE,GAAG,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmBzJ;AAsBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uCAAuC,GAAI,yGAOrD,4CAA4C,KAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAsHrE,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,EAAE,MAAgC,EAAE,GAAG,KAAK,EAAE,EAAE,4CAA4C,GAAG,oBAAoB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGhL"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from 'react';
|
|
2
|
+
import { useMemo, useState } from 'react';
|
|
3
3
|
import { Button, resolveDrawnActionVariant } from '../../components/actions/button.js';
|
|
4
4
|
import { actionBarItemCannotRun } from '../../components/actions/action-bar.js';
|
|
5
5
|
import { DangerZone } from '../../components/feedback/danger-zone.js';
|
|
@@ -14,7 +14,49 @@ import { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo
|
|
|
14
14
|
import { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';
|
|
15
15
|
import { createComponentResolver } from '../../core/components-registry/component-resolver.frontend.helper.js';
|
|
16
16
|
import { Heading } from '../../components/typography/heading.js';
|
|
17
|
+
import { FeatureLockBadge } from '../../components/feedback/features/feature-lock-badge.js';
|
|
18
|
+
import { FeatureUnavailableDialog } from '../../components/feedback/features/feature-unavailable-dialog.js';
|
|
19
|
+
import { useBillingAction } from '../../core/billing/useBillingAction.js';
|
|
17
20
|
import { useDocumentHeadingLevel } from '../../components/typography/document-heading-level.js';
|
|
21
|
+
/**
|
|
22
|
+
* The zone's rows: one per concrete action, multi-variant operations (subgroups) flattened. A plan-locked operation is ONE
|
|
23
|
+
* row whatever its variants (`useResourceOperationActions` gives a locked subgroup no items), so it keeps its place and
|
|
24
|
+
* its lock instead of disappearing.
|
|
25
|
+
*/
|
|
26
|
+
export function flattenDangerZoneRows(items) {
|
|
27
|
+
return items.flatMap((item) => {
|
|
28
|
+
if (item.type === 'subgroup' && item.featureLocked && item.featureAvailability) {
|
|
29
|
+
const { type: _subgroup, items: _none, ...locked } = item;
|
|
30
|
+
return [{ ...locked, type: 'button' }];
|
|
31
|
+
}
|
|
32
|
+
if (item.type === 'subgroup') {
|
|
33
|
+
return item.items.filter((sub) => sub.type !== 'separator' && sub.type !== 'subgroup');
|
|
34
|
+
}
|
|
35
|
+
if (item.type === 'separator')
|
|
36
|
+
return [];
|
|
37
|
+
return [item];
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* One row's action. Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see
|
|
42
|
+
* `resolveDrawnActionVariant`); its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays.
|
|
43
|
+
*
|
|
44
|
+
* A plan-locked action shows its lock and asks for the plan prompt when chosen (`onLocked`), as in the action bar: a
|
|
45
|
+
* plain disabled button said nothing about the plan. `aria-disabled`, so the click that explains it still lands.
|
|
46
|
+
*/
|
|
47
|
+
export function DangerZoneRowAction({ row, onLocked }) {
|
|
48
|
+
const lockedAvailability = row.featureLocked ? row.featureAvailability : undefined;
|
|
49
|
+
return (_jsxs(Button, { variant: resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row)), disabled: lockedAvailability ? undefined : row.disabled, "aria-disabled": lockedAvailability ? true : undefined, "data-feature-locked": lockedAvailability ? 'true' : undefined, onClick: lockedAvailability ? () => onLocked(lockedAvailability) : row.onClick, className: "shrink-0 self-start sm:self-auto", "data-operation-id": row.operationIdentifier, children: [lockedAvailability ? _jsx(FeatureLockBadge, { missingFeatures: lockedAvailability.missingFeatures }) : null, row.label] }));
|
|
50
|
+
}
|
|
51
|
+
/** The plan prompt for a chosen plan-locked row: its billing action is needed only while it is open. */
|
|
52
|
+
function DangerZoneLockedPrompt({ availability, onClose }) {
|
|
53
|
+
const billingAction = useBillingAction();
|
|
54
|
+
return (_jsx(FeatureUnavailableDialog, { open: true, onOpenChange: (open) => { if (!open)
|
|
55
|
+
onClose(); }, behavior: availability.behavior, missingFeatures: availability.missingFeatures, limitInfo: availability.limitInfo, upgradeOptionsCount: availability.upgradeOptions?.length, customComponentRef: availability.customComponentRef, onAction: () => {
|
|
56
|
+
billingAction(availability);
|
|
57
|
+
onClose();
|
|
58
|
+
} }));
|
|
59
|
+
}
|
|
18
60
|
/**
|
|
19
61
|
* GitHub-style "Danger Zone" — a fenced section at the bottom of a resource's
|
|
20
62
|
* read view holding the destructive (`DANGER_ZONE`-placement) operations, each
|
|
@@ -46,15 +88,9 @@ export const ResourceLayoutPreset_DangerZone_Default = ({ resourceContext, navig
|
|
|
46
88
|
placementFilter: ActionPlacement.DANGER_ZONE,
|
|
47
89
|
onOperationExecuted,
|
|
48
90
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return item.items.filter((sub) => sub.type !== 'separator' && sub.type !== 'subgroup');
|
|
53
|
-
}
|
|
54
|
-
if (item.type === 'separator')
|
|
55
|
-
return [];
|
|
56
|
-
return [item];
|
|
57
|
-
}), [items]);
|
|
91
|
+
const rows = useMemo(() => flattenDangerZoneRows(items), [items]);
|
|
92
|
+
// The plan prompt of the locked row the person chose; one per zone, mounted only while open.
|
|
93
|
+
const [lockedPrompt, setLockedPrompt] = useState(null);
|
|
58
94
|
if (rows.length === 0)
|
|
59
95
|
return null;
|
|
60
96
|
// Every word here is a declared label (`ResourceLayout_DangerZone.labels.ts`); an ungenerated one
|
|
@@ -98,7 +134,7 @@ export const ResourceLayoutPreset_DangerZone_Default = ({ resourceContext, navig
|
|
|
98
134
|
// - `p-0` card + `px-card` rows — identical inset to the settings rows so the
|
|
99
135
|
// "Reset to defaults" copy lines up with the fields above; per-row dividers
|
|
100
136
|
// run full-bleed.
|
|
101
|
-
_jsxs("section", { "data-slot": "danger-zone-section", "data-inline-size-tier": responsiveMaxWidth, className: cn('mr-auto w-full flex flex-col gap-field-sm', className), style: optionalMaxInlineSizeStyle(responsiveMaxWidth), children: [_jsx(Heading, { level: headingLevel, children: heading }), _jsx(DangerZone, { className: "rounded-xl p-0 overflow-hidden divide-y divide-destructive/20", children: rows.map((row, index) => (_jsxs("div", { className: "flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between", children: [_jsxs("div", { className: "flex flex-col gap-element-xs", children: [_jsx(Strong, { children: row.label }), _jsx(Text, { variant: TextVariant.MUTED, size: TextSize.SM, children: describe(row) })] }), _jsx(
|
|
137
|
+
_jsxs("section", { "data-slot": "danger-zone-section", "data-inline-size-tier": responsiveMaxWidth, className: cn('mr-auto w-full flex flex-col gap-field-sm', className), style: optionalMaxInlineSizeStyle(responsiveMaxWidth), children: [_jsx(Heading, { level: headingLevel, children: heading }), _jsx(DangerZone, { className: "rounded-xl p-0 overflow-hidden divide-y divide-destructive/20", children: rows.map((row, index) => (_jsxs("div", { className: "flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between", children: [_jsxs("div", { className: "flex flex-col gap-element-xs", children: [_jsx(Strong, { children: row.label }), _jsx(Text, { variant: TextVariant.MUTED, size: TextSize.SM, children: describe(row) })] }), _jsx(DangerZoneRowAction, { row: row, onLocked: setLockedPrompt })] }, index))) }), lockedPrompt ? _jsx(DangerZoneLockedPrompt, { availability: lockedPrompt, onClose: () => setLockedPrompt(null) }) : null, isConfirmDialogOpen && (_jsx(OperationsConfirmCritical, { open: isConfirmDialogOpen, onOpenChange: (open) => { if (!open)
|
|
102
138
|
onCancel(); }, cancelCallback: onCancel, validationCallback: onConfirm, label: confirmDialogLabel, description: confirmDialogDescription, confirmLabel: confirmDialogConfirmLabel, requireTypedConfirmation: confirmRequiresTypedConfirmation, confirmationPhrase: confirmConfirmationPhrase }))] }));
|
|
103
139
|
};
|
|
104
140
|
export function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_DangerZone.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAwB,MAAM,mDAAmD,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AAGhG,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEjG,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,iFAAiF,CAAC;AAE1H,OAAO,EAAE,OAAO,EAAE,MAAM,mDAAmD,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kEAAkE,CAAC;AAqB3G;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,EACtD,eAAe,EACf,cAAc,EACd,aAAa,EACb,mBAAmB,E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O,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAuE;IAC3J,MAAM,SAAS,GAAG,uBAAuB,CAA+C,qBAAqB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;IAClL,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport { Button, resolveDrawnActionVariant } from '~wildo-frontend-lib/components/actions/button';\nimport { actionBarItemCannotRun, type ActionBarButton } from '~wildo-frontend-lib/components/actions/action-bar';\nimport { DangerZone } from '~wildo-frontend-lib/components/feedback/danger-zone';\nimport { Text, Strong, TextVariant, TextSize } from '~wildo-frontend-lib/components/typography/text';\nimport { OperationsConfirmCritical } from '~wildo-frontend-lib/components/feedback/operations-confirm-critical';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { optionalMaxInlineSizeStyle } from '~wildo-frontend-lib/components/sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useResourceOperationActions } from '~wildo-frontend-lib/core/resources/useResourceOperationActions';\nimport { ActionPlacement } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n\nimport { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo-ai/saas-models';\n\nimport { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper';\nimport { BaseResourcesLayoutProps } from './component-props.resources-layout.frontend.schemas';\nimport { Heading } from '~wildo-frontend-lib/components/typography/heading';\nimport { useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\n\n// --- Contract ---\nexport interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResourcesLayoutProps {\n /** The loaded record — feeds `enabledCondition` evaluation + each op's target. */\n currentObject?: Record<string, any>;\n /** Called after a destructive op executes (e.g. navigate away after delete). */\n onOperationExecuted?: (operation: FrontendResourceConfiguration_Operation) => void;\n className?: string;\n /**\n * How wide the danger zone may grow, in the framework's shared width vocabulary.\n *\n * Left unset, nothing caps it here and the host decides. The read layout does so through `className`,\n * reading the width the record body derived (`--record-body-max-inline-size`: the reading measure, or\n * no cap when the body holds a list), so the destructive actions sit on the SAME edges as the body above\n * them. They once carried a `max-w-4xl` literal — 224px wider than the stack, for no reason anyone had\n * written down — and then a fixed `'measure'`, which left them narrow under a full-width list.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n}\n\n/**\n * GitHub-style \"Danger Zone\" — a fenced section at the bottom of a resource's\n * read view holding the destructive (`DANGER_ZONE`-placement) operations, each\n * as a row: title · caution description · action button. These ops are excluded\n * from the top action bar (which requests `placementFilter: PRIMARY`); this\n * section is their home.\n *\n * Reuses the single operation pipeline via `placementFilter: DANGER_ZONE`, so\n * `enabledCondition`, role gating, the critical-confirm dialog, and `actionVariant`\n * colour all behave exactly as in the bar — only the presentation differs.\n */\nexport const ResourceLayoutPreset_DangerZone_Default = ({\n resourceContext,\n navigationZone,\n currentObject,\n onOperationExecuted,\n className,\n responsiveMaxWidth,\n}: ResourceLayoutPreset_DangerZone_DefaultProps): React.JSX.Element | null => {\n const { resourceType, operation } = resourceContext;\n // The zone's title sits beside the CARD section headings, at the same outline level as theirs (#3867).\n const headingLevel = useDocumentHeadingLevel();\n const { tComponent, tResourceOperation } = useI18n({\n component: FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE,\n resource: resourceType,\n });\n\n const {\n items,\n isConfirmDialogOpen,\n confirmDialogLabel,\n confirmDialogDescription,\n confirmDialogConfirmLabel,\n confirmRequiresTypedConfirmation,\n confirmConfirmationPhrase,\n onConfirm,\n onCancel,\n } = useResourceOperationActions({\n resourceType,\n displayMode: ResourceOperationDisplayMode.DETAIL,\n currentObject,\n contextResourceIdentifiers: resourceContext.contextResourceIdentifiers,\n parentResourcesRequirements: resourceContext.parentResourcesRequirements,\n additionalContext: resourceContext.additionalContext,\n navigationZone,\n sourceOperation: operation,\n placementFilter: ActionPlacement.DANGER_ZONE,\n onOperationExecuted,\n });\n\n // Flatten multi-variant ops (subgroups) into one row per concrete action.\n const rows = useMemo<ActionBarButton[]>(\n () =>\n items.flatMap((item) => {\n if (item.type === 'subgroup') {\n return item.items.filter(\n (sub): sub is ActionBarButton => sub.type !== 'separator' && sub.type !== 'subgroup',\n );\n }\n if (item.type === 'separator') return [];\n return [item];\n }),\n [items],\n );\n\n if (rows.length === 0) return null;\n\n // Every word here is a declared label (`ResourceLayout_DangerZone.labels.ts`); an ungenerated one\n // renders as its key path, which is what a missing label must look like. The English literals that\n // used to stand behind each key hid the gap in every locale (#1414).\n const label = (key: string): string => tComponent(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, key);\n const heading = label('title');\n // Risk-specific caution: CRITICAL emphasizes irreversibility, HIGH a significant\n // disruptive impact, everything else a generic caution.\n const describeRisk = (riskLevel: ResourceOperationRiskLevel | undefined): string => {\n switch (riskLevel) {\n case ResourceOperationRiskLevel.CRITICAL:\n return label('descriptionCritical');\n case ResourceOperationRiskLevel.HIGH:\n return label('descriptionHigh');\n default:\n return label('descriptionDefault');\n }\n };\n // Prefer an authored/generated per-operation description\n // (resources.{res}.operations.{op}.description) — accurate per action (e.g. Delete\n // \"permanent\" vs Suspend \"reversible\"). Falls back to the risk-based copy.\n // An operation DESCRIPTION is optional (few operations author one), so `tResourceOperation`\n // answers '' for a missing one and `||` chains cleanly. A missing TITLE is never empty (#1450).\n const describe = (row: ActionBarButton): string => {\n const perOp = row.operationIdentifier\n ? tResourceOperation(resourceType, row.operationIdentifier, 'description')\n : '';\n return perOp || describeRisk(row.riskLevel);\n };\n\n return (\n // Mirrors the CARD \"settings group\" shape EXACTLY so it reads as a sibling\n // of the cards above it, only tinted destructive:\n // - `flex flex-col gap-field-sm` — the SAME title↔card gap the ContentSection\n // CARD branch puts between its heading and its body (was `space-y-item-xs`,\n // a ~1px hairline that crammed the title onto the card).\n // - a heading at the outline's level, `text-base font-medium` — the same group-heading type as the CARD title.\n // - `rounded-xl` on the card — matches the CARD surface recipe radius\n // (`SurfaceVariant.CARD` = `rounded-xl`); the DangerZone primitive's own\n // base is `rounded-lg`, one tier tighter, which read as a different corner.\n // - `p-0` card + `px-card` rows — identical inset to the settings rows so the\n // \"Reset to defaults\" copy lines up with the fields above; per-row dividers\n // run full-bleed.\n <section\n data-slot=\"danger-zone-section\"\n data-inline-size-tier={responsiveMaxWidth}\n className={cn('mr-auto w-full flex flex-col gap-field-sm', className)}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n >\n <Heading level={headingLevel}>{heading}</Heading>\n <DangerZone className=\"rounded-xl p-0 overflow-hidden divide-y divide-destructive/20\">\n {rows.map((row, index) => (\n <div\n key={index}\n className=\"flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex flex-col gap-element-xs\">\n <Strong>{row.label}</Strong>\n <Text variant={TextVariant.MUTED} size={TextSize.SM}>{describe(row)}</Text>\n </div>\n {/* Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see\n `resolveDrawnActionVariant`). Its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays. */}\n <Button\n variant={resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row))}\n disabled={row.disabled}\n onClick={row.onClick}\n className=\"shrink-0 self-start sm:self-auto\"\n // The automation hook every other action surface carries (`ActionButton`, the action bar's direct and\n // overflow items): the operation, i18n-independent. A delete moved here by its risk was the one\n // action a scenario could not address without reading translated text.\n data-operation-id={row.operationIdentifier}\n >\n {row.label}\n </Button>\n </div>\n ))}\n </DangerZone>\n {isConfirmDialogOpen && (\n <OperationsConfirmCritical\n open={isConfirmDialogOpen}\n onOpenChange={(open: boolean) => { if (!open) onCancel(); }}\n cancelCallback={onCancel}\n validationCallback={onConfirm}\n label={confirmDialogLabel}\n description={confirmDialogDescription}\n confirmLabel={confirmDialogConfirmLabel}\n requireTypedConfirmation={confirmRequiresTypedConfirmation}\n confirmationPhrase={confirmConfirmationPhrase}\n />\n )}\n </section>\n );\n};\n\nexport function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }: ResourceLayoutPreset_DangerZone_DefaultProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ResourceLayoutPreset_DangerZone_DefaultProps>(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, 'ResourceLayout_DangerZone')(preset);\n return <Component {...props} />;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ResourceLayout_DangerZone.js","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_DangerZone.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAA4C,MAAM,mDAAmD,CAAC;AACrI,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAEhE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gEAAgE,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B,EACrC,YAAY,EAAE,yBAAyB,EACvC,wBAAwB,EAAE,gCAAgC,EAC1D,kBAAkB,EAAE,yBAAyB,GAC7C,CACH,IACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,EAAuE;IAC3J,MAAM,SAAS,GAAG,uBAAuB,CAA+C,qBAAqB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;IAClL,OAAO,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC;AAClC,CAAC","sourcesContent":["import React, { useMemo, useState } from 'react';\n\nimport { Button, resolveDrawnActionVariant } from '~wildo-frontend-lib/components/actions/button';\nimport { actionBarItemCannotRun, type ActionBarButton, type ActionBarItem } from '~wildo-frontend-lib/components/actions/action-bar';\nimport { DangerZone } from '~wildo-frontend-lib/components/feedback/danger-zone';\nimport { Text, Strong, TextVariant, TextSize } from '~wildo-frontend-lib/components/typography/text';\nimport { OperationsConfirmCritical } from '~wildo-frontend-lib/components/feedback/operations-confirm-critical';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { optionalMaxInlineSizeStyle } from '~wildo-frontend-lib/components/sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useResourceOperationActions } from '~wildo-frontend-lib/core/resources/useResourceOperationActions';\nimport { ActionPlacement } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResourceConfiguration_Operation } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n\nimport { ResourceOperationDisplayMode, ResourceOperationRiskLevel } from '@wildo-ai/saas-models';\n\nimport { CorePresetNames, FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ComponentPresetProps } from '~wildo-frontend-lib/core/components-registry/component-registry.frontend.schemas';\nimport { createComponentResolver } from '~wildo-frontend-lib/core/components-registry/component-resolver.frontend.helper';\nimport { BaseResourcesLayoutProps } from './component-props.resources-layout.frontend.schemas';\nimport { Heading } from '~wildo-frontend-lib/components/typography/heading';\nimport { FeatureLockBadge } from '~wildo-frontend-lib/components/feedback/features/feature-lock-badge';\nimport { FeatureUnavailableDialog } from '~wildo-frontend-lib/components/feedback/features/feature-unavailable-dialog';\nimport { useBillingAction } from '~wildo-frontend-lib/core/billing/useBillingAction';\nimport type { FeatureAvailability } from '~wildo-frontend-lib/core/features/useFeatureAvailability';\nimport { useDocumentHeadingLevel } from '~wildo-frontend-lib/components/typography/document-heading-level';\n\n// --- Contract ---\nexport interface ResourceLayoutPreset_DangerZone_DefaultProps extends BaseResourcesLayoutProps {\n /** The loaded record — feeds `enabledCondition` evaluation + each op's target. */\n currentObject?: Record<string, any>;\n /** Called after a destructive op executes (e.g. navigate away after delete). */\n onOperationExecuted?: (operation: FrontendResourceConfiguration_Operation) => void;\n className?: string;\n /**\n * How wide the danger zone may grow, in the framework's shared width vocabulary.\n *\n * Left unset, nothing caps it here and the host decides. The read layout does so through `className`,\n * reading the width the record body derived (`--record-body-max-inline-size`: the reading measure, or\n * no cap when the body holds a list), so the destructive actions sit on the SAME edges as the body above\n * them. They once carried a `max-w-4xl` literal — 224px wider than the stack, for no reason anyone had\n * written down — and then a fixed `'measure'`, which left them narrow under a full-width list.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n}\n\n/**\n * The zone's rows: one per concrete action, multi-variant operations (subgroups) flattened. A plan-locked operation is ONE\n * row whatever its variants (`useResourceOperationActions` gives a locked subgroup no items), so it keeps its place and\n * its lock instead of disappearing.\n */\nexport function flattenDangerZoneRows(items: readonly ActionBarItem[]): ActionBarButton[] {\n return items.flatMap((item): ActionBarButton[] => {\n if (item.type === 'subgroup' && item.featureLocked && item.featureAvailability) {\n const { type: _subgroup, items: _none, ...locked } = item;\n return [{ ...locked, type: 'button' }];\n }\n if (item.type === 'subgroup') {\n return item.items.filter(\n (sub): sub is ActionBarButton => sub.type !== 'separator' && sub.type !== 'subgroup',\n );\n }\n if (item.type === 'separator') return [];\n return [item];\n });\n}\n\n/**\n * One row's action. Drawn through the bar's rule: an action that cannot run never keeps authored emphasis (see\n * `resolveDrawnActionVariant`); its risk colour (DESTRUCTIVE), which is how most rows here are drawn, stays.\n *\n * A plan-locked action shows its lock and asks for the plan prompt when chosen (`onLocked`), as in the action bar: a\n * plain disabled button said nothing about the plan. `aria-disabled`, so the click that explains it still lands.\n */\nexport function DangerZoneRowAction({ row, onLocked }: { row: ActionBarButton; onLocked: (availability: FeatureAvailability) => void }): React.JSX.Element {\n const lockedAvailability = row.featureLocked ? row.featureAvailability : undefined;\n return (\n <Button\n variant={resolveDrawnActionVariant(row.variant, actionBarItemCannotRun(row))}\n disabled={lockedAvailability ? undefined : row.disabled}\n aria-disabled={lockedAvailability ? true : undefined}\n data-feature-locked={lockedAvailability ? 'true' : undefined}\n onClick={lockedAvailability ? () => onLocked(lockedAvailability) : row.onClick}\n className=\"shrink-0 self-start sm:self-auto\"\n // The automation hook every other action surface carries (`ActionButton`, the action bar's direct and\n // overflow items): the operation, i18n-independent. A delete moved here by its risk was the one\n // action a scenario could not address without reading translated text.\n data-operation-id={row.operationIdentifier}\n >\n {lockedAvailability ? <FeatureLockBadge missingFeatures={lockedAvailability.missingFeatures} /> : null}\n {row.label}\n </Button>\n );\n}\n\n/** The plan prompt for a chosen plan-locked row: its billing action is needed only while it is open. */\nfunction DangerZoneLockedPrompt({ availability, onClose }: { availability: FeatureAvailability; onClose: () => void }): React.JSX.Element {\n const billingAction = useBillingAction();\n return (\n <FeatureUnavailableDialog\n open\n onOpenChange={(open) => { if (!open) onClose(); }}\n behavior={availability.behavior}\n missingFeatures={availability.missingFeatures}\n limitInfo={availability.limitInfo}\n upgradeOptionsCount={availability.upgradeOptions?.length}\n customComponentRef={availability.customComponentRef}\n onAction={() => {\n billingAction(availability);\n onClose();\n }}\n />\n );\n}\n\n/**\n * GitHub-style \"Danger Zone\" — a fenced section at the bottom of a resource's\n * read view holding the destructive (`DANGER_ZONE`-placement) operations, each\n * as a row: title · caution description · action button. These ops are excluded\n * from the top action bar (which requests `placementFilter: PRIMARY`); this\n * section is their home.\n *\n * Reuses the single operation pipeline via `placementFilter: DANGER_ZONE`, so\n * `enabledCondition`, role gating, the critical-confirm dialog, and `actionVariant`\n * colour all behave exactly as in the bar — only the presentation differs.\n */\nexport const ResourceLayoutPreset_DangerZone_Default = ({\n resourceContext,\n navigationZone,\n currentObject,\n onOperationExecuted,\n className,\n responsiveMaxWidth,\n}: ResourceLayoutPreset_DangerZone_DefaultProps): React.JSX.Element | null => {\n const { resourceType, operation } = resourceContext;\n // The zone's title sits beside the CARD section headings, at the same outline level as theirs (#3867).\n const headingLevel = useDocumentHeadingLevel();\n const { tComponent, tResourceOperation } = useI18n({\n component: FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE,\n resource: resourceType,\n });\n\n const {\n items,\n isConfirmDialogOpen,\n confirmDialogLabel,\n confirmDialogDescription,\n confirmDialogConfirmLabel,\n confirmRequiresTypedConfirmation,\n confirmConfirmationPhrase,\n onConfirm,\n onCancel,\n } = useResourceOperationActions({\n resourceType,\n displayMode: ResourceOperationDisplayMode.DETAIL,\n currentObject,\n contextResourceIdentifiers: resourceContext.contextResourceIdentifiers,\n parentResourcesRequirements: resourceContext.parentResourcesRequirements,\n additionalContext: resourceContext.additionalContext,\n navigationZone,\n sourceOperation: operation,\n placementFilter: ActionPlacement.DANGER_ZONE,\n onOperationExecuted,\n });\n\n const rows = useMemo(() => flattenDangerZoneRows(items), [items]);\n\n // The plan prompt of the locked row the person chose; one per zone, mounted only while open.\n const [lockedPrompt, setLockedPrompt] = useState<FeatureAvailability | null>(null);\n\n if (rows.length === 0) return null;\n\n // Every word here is a declared label (`ResourceLayout_DangerZone.labels.ts`); an ungenerated one\n // renders as its key path, which is what a missing label must look like. The English literals that\n // used to stand behind each key hid the gap in every locale (#1414).\n const label = (key: string): string => tComponent(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, key);\n const heading = label('title');\n // Risk-specific caution: CRITICAL emphasizes irreversibility, HIGH a significant\n // disruptive impact, everything else a generic caution.\n const describeRisk = (riskLevel: ResourceOperationRiskLevel | undefined): string => {\n switch (riskLevel) {\n case ResourceOperationRiskLevel.CRITICAL:\n return label('descriptionCritical');\n case ResourceOperationRiskLevel.HIGH:\n return label('descriptionHigh');\n default:\n return label('descriptionDefault');\n }\n };\n // Prefer an authored/generated per-operation description\n // (resources.{res}.operations.{op}.description) — accurate per action (e.g. Delete\n // \"permanent\" vs Suspend \"reversible\"). Falls back to the risk-based copy.\n // An operation DESCRIPTION is optional (few operations author one), so `tResourceOperation`\n // answers '' for a missing one and `||` chains cleanly. A missing TITLE is never empty (#1450).\n const describe = (row: ActionBarButton): string => {\n const perOp = row.operationIdentifier\n ? tResourceOperation(resourceType, row.operationIdentifier, 'description')\n : '';\n return perOp || describeRisk(row.riskLevel);\n };\n\n return (\n // Mirrors the CARD \"settings group\" shape EXACTLY so it reads as a sibling\n // of the cards above it, only tinted destructive:\n // - `flex flex-col gap-field-sm` — the SAME title↔card gap the ContentSection\n // CARD branch puts between its heading and its body (was `space-y-item-xs`,\n // a ~1px hairline that crammed the title onto the card).\n // - a heading at the outline's level, `text-base font-medium` — the same group-heading type as the CARD title.\n // - `rounded-xl` on the card — matches the CARD surface recipe radius\n // (`SurfaceVariant.CARD` = `rounded-xl`); the DangerZone primitive's own\n // base is `rounded-lg`, one tier tighter, which read as a different corner.\n // - `p-0` card + `px-card` rows — identical inset to the settings rows so the\n // \"Reset to defaults\" copy lines up with the fields above; per-row dividers\n // run full-bleed.\n <section\n data-slot=\"danger-zone-section\"\n data-inline-size-tier={responsiveMaxWidth}\n className={cn('mr-auto w-full flex flex-col gap-field-sm', className)}\n style={optionalMaxInlineSizeStyle(responsiveMaxWidth)}\n >\n <Heading level={headingLevel}>{heading}</Heading>\n <DangerZone className=\"rounded-xl p-0 overflow-hidden divide-y divide-destructive/20\">\n {rows.map((row, index) => (\n <div\n key={index}\n className=\"flex flex-col gap-field px-card py-card sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex flex-col gap-element-xs\">\n <Strong>{row.label}</Strong>\n <Text variant={TextVariant.MUTED} size={TextSize.SM}>{describe(row)}</Text>\n </div>\n <DangerZoneRowAction row={row} onLocked={setLockedPrompt} />\n </div>\n ))}\n </DangerZone>\n {lockedPrompt ? <DangerZoneLockedPrompt availability={lockedPrompt} onClose={() => setLockedPrompt(null)} /> : null}\n {isConfirmDialogOpen && (\n <OperationsConfirmCritical\n open={isConfirmDialogOpen}\n onOpenChange={(open: boolean) => { if (!open) onCancel(); }}\n cancelCallback={onCancel}\n validationCallback={onConfirm}\n label={confirmDialogLabel}\n description={confirmDialogDescription}\n confirmLabel={confirmDialogConfirmLabel}\n requireTypedConfirmation={confirmRequiresTypedConfirmation}\n confirmationPhrase={confirmConfirmationPhrase}\n />\n )}\n </section>\n );\n};\n\nexport function ResourceLayout_DangerZone({ preset = CorePresetNames.DEFAULT, ...props }: ResourceLayoutPreset_DangerZone_DefaultProps & ComponentPresetProps): React.JSX.Element {\n const Component = createComponentResolver<ResourceLayoutPreset_DangerZone_DefaultProps>(FrontendComponentType.RESOURCES_LAYOUTS_DANGER_ZONE, 'ResourceLayout_DangerZone')(preset);\n return <Component {...props} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceLayout_InsertedViews.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ResourceLayout_InsertedViews.d.ts","sourceRoot":"","sources":["../../../../src/components/resources/ResourceLayout_InsertedViews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AA0B/E,OAAO,EAGL,KAAK,0BAA0B,EAC/B,KAAK,cAAc,EACpB,MAAM,wDAAwD,CAAC;AAahE,OAAO,KAAK,EACV,gCAAgC,EACjC,MAAM,+DAA+D,CAAC;AAqBvE;;;;;;;;;;;;;;GAcG;AACH,oBAAY,sBAAsB;IAChC,qEAAqE;IACrE,UAAU,eAAe;IACzB,sDAAsD;IACtD,iBAAiB,sBAAsB;IACvC,8EAA8E;IAC9E,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,gCAAgC,CAAC;IAClD,cAAc,EAAE,cAAc,CAAC;IAC/B,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAkDD,wBAAgB,4BAA4B,CAAC,EAC3C,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,SAAc,EACd,WAAiB,EACjB,UAAiB,EACjB,UAAuC,GACxC,EAAE,iCAAiC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAuY9D;AA4HD,eAAe,4BAA4B,CAAC"}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useCallback, useContext, useMemo } from 'react';
|
|
3
|
+
import { useViewerMayReadChartPredicate } from '../../core/navigation/useChartReadDecision.js';
|
|
3
4
|
import { RESOURCE_HEADER_NARROW_SR_ONLY_CLASS } from '../../components/resources/resource-header-geometry.js';
|
|
4
5
|
import { CoreResourceOperation, ErrorCustomMessageReference } from '@wildo-ai/saas-models';
|
|
5
6
|
import { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';
|
|
6
7
|
import { SectionLegendVoiceHost, useSectionLegendVoice } from '../../components/sections/section-legend-voice.js';
|
|
7
8
|
import { useUI } from '../../core/ui/useUI.js';
|
|
8
9
|
import { documentHeadingTag, useDocumentHeadingLevel } from '../../components/typography/document-heading-level.js';
|
|
9
|
-
import { buildResolvedInsertedChartDescriptor, buildResourceInsertedChartIdentity, } from '../../core/config/chart-view.frontend.schemas.js';
|
|
10
|
+
import { buildResolvedInsertedChartDescriptor, buildResourceInsertedChartIdentity, isChartViewInsertedIntoOperationHost, } from '../../core/config/chart-view.frontend.schemas.js';
|
|
10
11
|
import { ChartView } from '../../components/views/chart-view/ChartView.lazy.js';
|
|
11
|
-
import {
|
|
12
|
+
import { RequiredFeaturesGate } from '../../core/features/RequiredFeaturesGate.js';
|
|
13
|
+
import { RequiredFeaturesGatePresentation } from '../../core/features/required-features-gate-presentation.js';
|
|
12
14
|
import { useIconRegistry } from '../../core/icons/useIconRegistry.js';
|
|
13
15
|
import { IconCategory, IconSize, } from '../../core/icons/icon-registry.frontend.schemas.js';
|
|
14
16
|
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
@@ -130,10 +132,17 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
130
132
|
? (frontendConfiguration?.compositeViews ?? []).filter((view) => String(view.operationLike) === currentBaseOperation
|
|
131
133
|
&& areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers))
|
|
132
134
|
: []), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.compositeViews, isCurrentDefaultOperationHost]);
|
|
135
|
+
// #4252: a chart is also gated on whether the backend's chart gate would answer this viewer. The host page being
|
|
136
|
+
// readable does not settle it: a chart narrows its readers (`accessControl.roles`) and asks every resource it joins.
|
|
137
|
+
const viewerMayReadChart = useViewerMayReadChartPredicate();
|
|
133
138
|
const applicableChartViews = useMemo(() => (isCurrentDefaultOperationHost
|
|
134
|
-
? (frontendConfiguration?.chartViews ?? []).filter(
|
|
135
|
-
|
|
136
|
-
|
|
139
|
+
? (frontendConfiguration?.chartViews ?? []).filter(
|
|
140
|
+
// An EMBEDS_ONLY chart is placed by whoever embeds it, never by a host (InsertedChartSurfacing).
|
|
141
|
+
(view) => isChartViewInsertedIntoOperationHost(view)
|
|
142
|
+
&& String(view.operationLike) === currentBaseOperation
|
|
143
|
+
&& areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers)
|
|
144
|
+
&& viewerMayReadChart(view.chartDefinition))
|
|
145
|
+
: []), [contextResourceIdentifiers, currentBaseOperation, frontendConfiguration?.chartViews, isCurrentDefaultOperationHost, viewerMayReadChart]);
|
|
137
146
|
const applicableExecutionViews = useMemo(() => ((frontendConfiguration?.executionViews ?? []).filter((view) => ((view.surfaceInOperations ?? []).some((op) => serializeSurfaceOperation(op) === currentSerializedOperationKey)
|
|
138
147
|
&& areMandatoryParentRequirementsSatisfied(view.parentResourcesRequirements, contextResourceIdentifiers)))), [contextResourceIdentifiers, currentSerializedOperationKey, frontendConfiguration?.executionViews]);
|
|
139
148
|
const insertedViewSegments = useMemo(() => {
|
|
@@ -162,6 +171,7 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
162
171
|
// Nor a settings row, so there is no section visibility to filter by.
|
|
163
172
|
settingsSectionVisible: null,
|
|
164
173
|
// These are the current resource's own views, already authorized by the page that hosts them: no role filter.
|
|
174
|
+
// Its charts were filtered by the chart gate above (#4252), which the host page's authorization does not settle.
|
|
165
175
|
viewerRoles: null,
|
|
166
176
|
};
|
|
167
177
|
const resolvedSegments = [];
|
|
@@ -277,7 +287,7 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
277
287
|
// the composite's own embedded host READ) won't re-embed it.
|
|
278
288
|
_jsx(ActiveEmbeddedCompositeRefsContext.Provider, { value: new Set([...activeEmbeddedCompositeRefs, segment.ref]), children: _jsx(EmbedResourceOwnedCompositeView, { resourceContext: resourceContext, viewRef: segment.ref, navigationZone: navigationZone, navigationInitiator: navigationInitiator }) }, `embedded-composite:${segment.ref}:${segmentIndex}`))
|
|
279
289
|
: segment.type === 'chart'
|
|
280
|
-
? (_jsxs("section", { className: "rounded-lg border border-border bg-card p-field shadow-sm", children: [segment.title && (_jsx(ChartTitleTag, { className: cn('mb-element-sm', legendVoice ? getRecipe(UIBehavior.TYPOGRAPHY, legendVoice).base : 'text-sm font-medium text-foreground'), children: segment.title })), _jsx(
|
|
290
|
+
? (_jsxs("section", { className: "rounded-lg border border-border bg-card p-field shadow-sm", children: [segment.title && (_jsx(ChartTitleTag, { className: cn('mb-element-sm', legendVoice ? getRecipe(UIBehavior.TYPOGRAPHY, legendVoice).base : 'text-sm font-medium text-foreground'), children: segment.title })), _jsx(RequiredFeaturesGate, { requiredFeatures: segment.chartView.chartDefinition.requiredFeatures, presentation: RequiredFeaturesGatePresentation.TILE, lockedTileHeight: chartHeight, children: _jsx(ChartView, { viewDefinition: segment.chartView, runtimeDescriptor: buildResolvedInsertedChartDescriptor({
|
|
281
291
|
identity: buildResourceInsertedChartIdentity(resourceContext.resourceType, segment.chartView),
|
|
282
292
|
chartView: segment.chartView,
|
|
283
293
|
contextResourceIdentifiers,
|
|
@@ -304,7 +314,7 @@ export function ResourceLayout_InsertedViews({ resourceContext, navigationZone,
|
|
|
304
314
|
`RESOURCES_LAYOUTS_INSERTED_VIEWS` component label is registered and
|
|
305
315
|
generated — an ungenerated key would render as its raw path, so it
|
|
306
316
|
stays unnamed rather than mislabelled. */
|
|
307
|
-
_jsx(LauncherSlotChrome, { renderSlot: renderSlot, children: segment.views.map((view) => (_jsx(
|
|
317
|
+
_jsx(LauncherSlotChrome, { renderSlot: renderSlot, children: segment.views.map((view) => (_jsx(RequiredFeaturesGate, { requiredFeatures: view.requiredFeatures, presentation: RequiredFeaturesGatePresentation.CONTROL, children: _jsxs(Button, { "data-testid": `inserted-view-launcher-${view.ref}`, type: "button",
|
|
308
318
|
// In the record navigation strip a quiet launcher is a GHOST item, so the strip reads as
|
|
309
319
|
// navigation (see the chrome note above); elsewhere it keeps the outlined look.
|
|
310
320
|
variant: view.presentation.emphasized
|