@wildo-ai/saas-frontend-lib 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/actions/action-bar.d.ts +15 -0
- package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +15 -0
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.d.ts +97 -7
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.d.ts.map +1 -1
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js +8 -3
- package/dist/esm/components/app/AppLayout_AuthenticatedRoute.js.map +1 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.js +5 -1
- package/dist/esm/components/auth/Auth_EnrollmentRequired.js.map +1 -1
- package/dist/esm/components/auth/Auth_Main.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Main.js +1 -4
- package/dist/esm/components/auth/Auth_Main.js.map +1 -1
- package/dist/esm/components/auth/Auth_Register.d.ts.map +1 -1
- package/dist/esm/components/auth/Auth_Register.js +1 -3
- package/dist/esm/components/auth/Auth_Register.js.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts +7 -0
- package/dist/esm/components/auth/StepUpAuthDialog.d.ts.map +1 -1
- package/dist/esm/components/auth/StepUpAuthDialog.js +13 -7
- package/dist/esm/components/auth/StepUpAuthDialog.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js +32 -33
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.js.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.d.ts.map +1 -1
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js +18 -20
- package/dist/esm/components/auth/admin-config/AppPage_SecuritySettings.labels.js.map +1 -1
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.d.ts.map +1 -1
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js +2 -3
- package/dist/esm/components/auth/methods/ExternalOAuth2AuthMethod.js.map +1 -1
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts +13 -16
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.d.ts.map +1 -1
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js +18 -15
- package/dist/esm/components/auth/utils/oauth-provider-display-label.frontend.utils.js.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.js +2 -2
- package/dist/esm/components/billing/billing-invoice-history.js.map +1 -1
- package/dist/esm/components/billing/billing-portal-link.js +2 -2
- package/dist/esm/components/billing/billing-portal-link.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts +33 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +34 -5
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +2 -2
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts +2 -0
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +1 -0
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/data-display/DisplayField.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayField.js +15 -1
- package/dist/esm/components/data-display/DisplayField.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldArray.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldArray.js +11 -0
- package/dist/esm/components/data-display/DisplayFieldArray.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditable.js +2 -2
- package/dist/esm/components/data-display/DisplayFieldEditable.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts +12 -2
- package/dist/esm/components/data-display/DisplayFieldEditableArray.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js +3 -2
- package/dist/esm/components/data-display/DisplayFieldEditableArray.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js +2 -2
- package/dist/esm/components/data-display/DisplayFieldReadOnly.js.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js +8 -2
- package/dist/esm/components/data-display/DisplayFieldReadOnlyArraySection.js.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.d.ts.map +1 -1
- package/dist/esm/components/data-display/DisplayValueDispatcher.js +18 -4
- 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 +61 -3
- package/dist/esm/components/data-display/ResourceAutomaticDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts +7 -5
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.d.ts.map +1 -1
- package/dist/esm/components/data-display/ResourceSummaryDisplayer.js.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts +11 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js +36 -11
- package/dist/esm/components/data-display/chromes/DisplayFieldChrome.js.map +1 -1
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts +6 -0
- package/dist/esm/components/data-display/display-field-resolved-props.d.ts.map +1 -1
- package/dist/esm/components/data-display/display-field-resolved-props.js.map +1 -1
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts +23 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js +35 -0
- package/dist/esm/components/data-display/external-data-provenance/DisplayFieldProvenanceNote.js.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts +47 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js +124 -0
- package/dist/esm/components/data-display/external-data-provenance/external-data-provenance.frontend.js.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts +8 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.d.ts.map +1 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js +46 -0
- package/dist/esm/components/data-display/external-data-provenance/useExternalDataFieldProvenance.js.map +1 -0
- package/dist/esm/components/feedback/resource-empty-state.d.ts +21 -8
- package/dist/esm/components/feedback/resource-empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/resource-empty-state.js +56 -26
- package/dist/esm/components/feedback/resource-empty-state.js.map +1 -1
- package/dist/esm/components/flows-actors/approval.d.ts +29 -7
- package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/approval.js +231 -101
- 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 +57 -0
- package/dist/esm/components/flows-actors/approval.labels.js.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.js +4 -4
- package/dist/esm/components/flows-actors/system-catalog.js.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.d.ts.map +1 -1
- package/dist/esm/components/flows-actors/system-catalog.labels.js +0 -5
- package/dist/esm/components/flows-actors/system-catalog.labels.js.map +1 -1
- package/dist/esm/components/form/Form.d.ts +2 -2
- package/dist/esm/components/form/Form.js +2 -2
- package/dist/esm/components/form/Form.js.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts +28 -3
- package/dist/esm/components/form/automated/AutomatedArrayField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/AutomatedArrayField.js +43 -14
- package/dist/esm/components/form/automated/AutomatedArrayField.js.map +1 -1
- package/dist/esm/components/form/automated/FormField.d.ts +3 -0
- package/dist/esm/components/form/automated/FormField.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormField.js +60 -21
- package/dist/esm/components/form/automated/FormField.js.map +1 -1
- package/dist/esm/components/form/automated/FormFieldArray.d.ts +6 -3
- package/dist/esm/components/form/automated/FormFieldArray.d.ts.map +1 -1
- package/dist/esm/components/form/automated/FormFieldArray.js +3 -2
- package/dist/esm/components/form/automated/FormFieldArray.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts +5 -4
- package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js +148 -55
- package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts +30 -0
- package/dist/esm/components/form/automated/ResourceFormActionsContext.d.ts.map +1 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.js +30 -1
- package/dist/esm/components/form/automated/ResourceFormActionsContext.js.map +1 -1
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts +79 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.d.ts.map +1 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js +203 -0
- package/dist/esm/components/form/automated/TemplatePlacedFieldsContext.js.map +1 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts +12 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.d.ts.map +1 -1
- package/dist/esm/components/form/automated/automated-form-submit.utils.js +11 -0
- package/dist/esm/components/form/automated/automated-form-submit.utils.js.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/FormFieldChrome.js +2 -2
- package/dist/esm/components/form/chromes/FormFieldChrome.js.map +1 -1
- package/dist/esm/components/form/combobox.d.ts +7 -0
- package/dist/esm/components/form/combobox.d.ts.map +1 -1
- package/dist/esm/components/form/combobox.js.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.js +13 -0
- package/dist/esm/components/form/controls/form-field-checkbox-group.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.d.ts +58 -0
- package/dist/esm/components/form/fields/form-field-address.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.js +34 -6
- package/dist/esm/components/form/fields/form-field-address.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js +60 -1
- package/dist/esm/components/form/fields/form-field-address.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.d.ts +0 -12
- package/dist/esm/components/form/fields/form-field-file.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.js +34 -13
- package/dist/esm/components/form/fields/form-field-file.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-file.labels.js +46 -0
- package/dist/esm/components/form/fields/form-field-file.labels.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts +73 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.d.ts.map +1 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.js +64 -0
- package/dist/esm/components/form/fields/form-field-string-organization-role.js.map +1 -0
- package/dist/esm/components/form/fields/form-field-string.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.js +8 -1
- package/dist/esm/components/form/fields/form-field-string.js.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.labels.d.ts.map +1 -1
- package/dist/esm/components/form/fields/form-field-string.labels.js +4 -0
- package/dist/esm/components/form/fields/form-field-string.labels.js.map +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js +1 -1
- package/dist/esm/components/form/validation-errors/FormErrorSummary.js.map +1 -1
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts +31 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.d.ts.map +1 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.js +81 -0
- package/dist/esm/components/form/validation-errors/resolver-error-nesting.js.map +1 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.d.ts +14 -1
- 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 +14 -0
- package/dist/esm/components/form/validation-errors/resource-error-notification-context.utils.js.map +1 -1
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts +22 -0
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.d.ts.map +1 -1
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js +1 -22
- package/dist/esm/components/form/validation-errors/zod-issue-resolver.js.map +1 -1
- package/dist/esm/components/layout/resizable.d.ts +11 -0
- package/dist/esm/components/layout/resizable.d.ts.map +1 -1
- package/dist/esm/components/layout/resizable.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +11 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +15 -3
- package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/ApplicationLevel_StatusBar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js +2 -2
- package/dist/esm/components/navigation/app-level/HostedComponentInteractionsProvider.js.map +1 -1
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +18 -20
- package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +7 -1
- package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.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 +4 -1
- package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +18 -2
- package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js +82 -10
- package/dist/esm/components/navigation/app-level/useSidebarBehavior.js.map +1 -1
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts +2 -2
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/useStatusBarBehavior.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js +8 -1
- package/dist/esm/components/resources/ResourceCollectionQuickFilterTabs.js.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts +8 -2
- package/dist/esm/components/resources/ResourceCollectionToolbar.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceCollectionToolbar.js +6 -2
- package/dist/esm/components/resources/ResourceCollectionToolbar.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js +31 -16
- package/dist/esm/components/resources/ResourceLayout_Breadcrumb.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js +23 -8
- package/dist/esm/components/resources/ResourceLayout_ContainerDialogs.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_ContainerNested.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.d.ts +13 -0
- package/dist/esm/components/resources/ResourceLayout_Header.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Header.js +55 -28
- package/dist/esm/components/resources/ResourceLayout_Header.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.js +41 -20
- package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_List.labels.js +1 -2
- package/dist/esm/components/resources/ResourceLayout_List.labels.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts +9 -4
- package/dist/esm/components/resources/ResourceLayout_Read.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Read.js +30 -11
- package/dist/esm/components/resources/ResourceLayout_Read.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js +4 -2
- package/dist/esm/components/resources/ResourceLayout_ReadSummary.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js +6 -2
- package/dist/esm/components/resources/ResourceLayout_ReadSummary_TableRow.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Search.js +30 -14
- package/dist/esm/components/resources/ResourceLayout_Search.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js +14 -198
- package/dist/esm/components/resources/ResourceLayout_SemanticOperationFallback.js.map +1 -1
- package/dist/esm/components/resources/ResourceLayout_Update.d.ts +2 -2
- package/dist/esm/components/resources/ResourceLayout_Update.js +2 -2
- package/dist/esm/components/resources/ResourceLayout_Update.js.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.d.ts.map +1 -1
- package/dist/esm/components/resources/ResourceListItemRenderer.js +69 -39
- package/dist/esm/components/resources/ResourceListItemRenderer.js.map +1 -1
- package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts +32 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.d.ts.map +1 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.js +130 -0
- package/dist/esm/components/resources/ResourceOperationActionDropdown.js.map +1 -0
- package/dist/esm/components/resources/collection-create-placement.utils.d.ts +32 -0
- package/dist/esm/components/resources/collection-create-placement.utils.d.ts.map +1 -0
- package/dist/esm/components/resources/collection-create-placement.utils.js +37 -0
- package/dist/esm/components/resources/collection-create-placement.utils.js.map +1 -0
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.js +5 -1
- package/dist/esm/components/resources/embeds/RelatedResourcePreview.js.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts +8 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js +49 -2
- package/dist/esm/components/resources/embeds/RelatedResourceSections.js.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts +22 -0
- package/dist/esm/components/resources/embeds/ResourceEmbeds.d.ts.map +1 -1
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js +85 -2
- package/dist/esm/components/resources/embeds/ResourceEmbeds.js.map +1 -1
- package/dist/esm/components/resources/resourceLayout.utils.d.ts +14 -0
- package/dist/esm/components/resources/resourceLayout.utils.d.ts.map +1 -1
- package/dist/esm/components/resources/resourceLayout.utils.js +22 -0
- package/dist/esm/components/resources/resourceLayout.utils.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ArrayField.js +3 -0
- package/dist/esm/components/resources/skeleton/ArrayField.js.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js +33 -1
- package/dist/esm/components/resources/skeleton/FormLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/ObjectScope.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/ObjectScope.js +3 -0
- package/dist/esm/components/resources/skeleton/ObjectScope.js.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.d.ts +12 -0
- package/dist/esm/components/resources/skeleton/Section.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/Section.js +28 -2
- package/dist/esm/components/resources/skeleton/Section.js.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts +70 -0
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js +157 -1
- package/dist/esm/components/resources/skeleton/SectionFieldsContext.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts +6 -0
- package/dist/esm/components/resources/skeleton/WizardLayout.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardLayout.js +13 -2
- package/dist/esm/components/resources/skeleton/WizardLayout.js.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.d.ts.map +1 -1
- package/dist/esm/components/resources/skeleton/WizardStep.js +2 -1
- package/dist/esm/components/resources/skeleton/WizardStep.js.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js +61 -15
- package/dist/esm/components/resources-fields/_presets/resource-reference/ResourceFieldDisplayPreset_ResourceReference_Default.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts +24 -2
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js +69 -1
- package/dist/esm/components/resources-fields/resource-reference/resource-reference.shared.utils.js.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.d.ts.map +1 -1
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js +18 -19
- package/dist/esm/components/resources-fields/resource-reference/useResourceSearch.js.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
- package/dist/esm/components/sections/ContentSectionContainer.js +5 -4
- package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
- package/dist/esm/components/sections/stepper.d.ts +5 -0
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/components/sections/surface.d.ts.map +1 -1
- package/dist/esm/components/sections/surface.js +12 -3
- package/dist/esm/components/sections/surface.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts +43 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js +129 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts +3 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.d.ts.map +1 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js +34 -0
- package/dist/esm/components/settings/AppPage_AgentWorkOverrideRateSettings.labels.js.map +1 -0
- package/dist/esm/components/settings/AppPage_AppearanceSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.js +9 -11
- package/dist/esm/components/settings/AppPage_AppearanceSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js +3 -2
- package/dist/esm/components/settings/AppPage_AppearanceSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.d.ts +4 -2
- package/dist/esm/components/settings/AppPage_BillingSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.js +21 -3
- package/dist/esm/components/settings/AppPage_BillingSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.js +5 -10
- package/dist/esm/components/settings/AppPage_BillingSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +58 -0
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +243 -40
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js +67 -6
- package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js +19 -11
- package/dist/esm/components/settings/AppPage_InvitationsSettings.js.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.d.ts.map +1 -1
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js +4 -2
- package/dist/esm/components/settings/AppPage_InvitationsSettings.labels.js.map +1 -1
- package/dist/esm/components/settings/SettingsHub.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsHub.js +3 -0
- package/dist/esm/components/settings/SettingsHub.js.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.d.ts.map +1 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js +16 -1
- package/dist/esm/components/settings/SettingsResourceOperationPanel.js.map +1 -1
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts +59 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.d.ts.map +1 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.js +136 -0
- package/dist/esm/components/settings/useOwnerProviderConnections.js.map +1 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.d.ts +5 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.d.ts.map +1 -1
- package/dist/esm/components/views/chart-view/chart-view.utils.js +5 -0
- package/dist/esm/components/views/chart-view/chart-view.utils.js.map +1 -1
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts +50 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.d.ts.map +1 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.js +72 -0
- package/dist/esm/components/views/chart-view/useResourceChartData.js.map +1 -0
- package/dist/esm/components/views/composite-view/CompositeLayout.d.ts.map +1 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.js +2 -1
- package/dist/esm/components/views/composite-view/CompositeLayout.js.map +1 -1
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts +86 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.d.ts.map +1 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js +187 -0
- package/dist/esm/core/app-shell/AppShellBuildingBlocks.js.map +1 -0
- package/dist/esm/core/app-shell/PortalContainerContext.d.ts +5 -2
- package/dist/esm/core/app-shell/PortalContainerContext.d.ts.map +1 -1
- package/dist/esm/core/app-shell/PortalContainerContext.js +5 -2
- package/dist/esm/core/app-shell/PortalContainerContext.js.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts +18 -9
- package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
- package/dist/esm/core/app-shell/app-shell.schemas.js +1 -0
- package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
- package/dist/esm/core/app-shell/useAppShellLayout.d.ts +10 -0
- package/dist/esm/core/app-shell/useAppShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/useAppShellLayout.js +28 -5
- package/dist/esm/core/app-shell/useAppShellLayout.js.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.d.ts.map +1 -1
- package/dist/esm/core/app-shell/usePublicShellLayout.js +38 -0
- package/dist/esm/core/app-shell/usePublicShellLayout.js.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts +15 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js +47 -13
- package/dist/esm/core/automated-layout/automated-layout.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/BillingContext.d.ts +25 -2
- package/dist/esm/core/billing/BillingContext.d.ts.map +1 -1
- package/dist/esm/core/billing/BillingContext.js +16 -25
- package/dist/esm/core/billing/BillingContext.js.map +1 -1
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts +11 -3
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.js +14 -8
- package/dist/esm/core/billing/billing-provider-display.frontend.utils.js.map +1 -1
- package/dist/esm/core/billing/useBillingPlanChange.d.ts.map +1 -1
- package/dist/esm/core/billing/useBillingPlanChange.js +2 -0
- package/dist/esm/core/billing/useBillingPlanChange.js.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.d.ts.map +1 -1
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js +1 -0
- package/dist/esm/core/components-registry/assert-registry-completeness.frontend.helper.js.map +1 -1
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts +29 -229
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js +29 -327
- package/dist/esm/core/components-registry/provider-component-registry.frontend.service.js.map +1 -1
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts +17 -27
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.d.ts.map +1 -1
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js +28 -48
- package/dist/esm/core/components-registry/useProviderComponent.frontend.hooks.js.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts +21 -11
- package/dist/esm/core/config/app-configuration-frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-configuration-frontend.schemas.js +4 -4
- 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 +17 -0
- package/dist/esm/core/config/app-level-components.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/app-level-components.frontend.schemas.js +17 -0
- 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 +10 -10
- package/dist/esm/core/config/engine-settings-destinations.d.ts.map +1 -1
- package/dist/esm/core/config/engine-settings-destinations.js +221 -6
- package/dist/esm/core/config/engine-settings-destinations.js.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts +8 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/launcher-items.frontend.schemas.js +1 -0
- package/dist/esm/core/config/launcher-items.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts +10 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/config/settings-hub.frontend.schemas.js +9 -0
- package/dist/esm/core/config/settings-hub.frontend.schemas.js.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.d.ts.map +1 -1
- package/dist/esm/core/config/verify-launcher-content.js +30 -19
- package/dist/esm/core/config/verify-launcher-content.js.map +1 -1
- package/dist/esm/core/errors/ErrorContext.d.ts.map +1 -1
- package/dist/esm/core/errors/ErrorContext.js +9 -1
- package/dist/esm/core/errors/ErrorContext.js.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.d.ts.map +1 -1
- package/dist/esm/core/errors/GlobalErrorHandler.js +5 -4
- package/dist/esm/core/errors/GlobalErrorHandler.js.map +1 -1
- package/dist/esm/core/errors/RouterErrorBoundary.js +1 -1
- package/dist/esm/core/errors/RouterErrorBoundary.js.map +1 -1
- package/dist/esm/core/errors/errors-builder.frontend.services.d.ts +2 -2
- package/dist/esm/core/errors/errors-builder.frontend.services.d.ts.map +1 -1
- package/dist/esm/core/errors/errors-builder.frontend.services.js +4 -4
- package/dist/esm/core/errors/errors-builder.frontend.services.js.map +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js +1 -1
- package/dist/esm/core/errors/user-facing-error-message.frontend.utils.js.map +1 -1
- package/dist/esm/core/events/NotificationContext.d.ts.map +1 -1
- package/dist/esm/core/events/NotificationContext.js +23 -5
- package/dist/esm/core/events/NotificationContext.js.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.d.ts +110 -43
- package/dist/esm/core/events/events.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/events/events.frontend.schemas.js +89 -15
- package/dist/esm/core/events/events.frontend.schemas.js.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts +2 -0
- package/dist/esm/core/execution/useExecutionParticipationRMM.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.js +2 -1
- package/dist/esm/core/execution/useExecutionParticipationRMM.js.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js +5 -2
- package/dist/esm/core/execution/useExecutionResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts +63 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js +131 -0
- package/dist/esm/core/external-providers/ConsentBasedProviderSdks.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts +61 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js +178 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupCombobox.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts +52 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.d.ts.map +1 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.js +144 -0
- package/dist/esm/core/external-providers/ProviderAddressLookupHost.js.map +1 -0
- package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts +22 -1
- package/dist/esm/core/external-providers/ProviderFilePickerHost.d.ts.map +1 -1
- package/dist/esm/core/external-providers/ProviderFilePickerHost.js +23 -3
- package/dist/esm/core/external-providers/ProviderFilePickerHost.js.map +1 -1
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts +55 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.d.ts.map +1 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js +65 -0
- package/dist/esm/core/external-providers/provider-address-lookup-selection.frontend.utils.js.map +1 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts +63 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.d.ts.map +1 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js +100 -0
- package/dist/esm/core/external-providers/provider-scope-reauthorization-offers.frontend.js.map +1 -0
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts +45 -7
- package/dist/esm/core/flows-actors/FlowsActorsContext.d.ts.map +1 -1
- package/dist/esm/core/flows-actors/FlowsActorsContext.js +112 -28
- package/dist/esm/core/flows-actors/FlowsActorsContext.js.map +1 -1
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts +32 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.d.ts.map +1 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.js +91 -0
- package/dist/esm/core/flows-actors/usePendingDecisions.js.map +1 -0
- package/dist/esm/core/guidance/GuidanceRenderer.d.ts.map +1 -1
- package/dist/esm/core/guidance/GuidanceRenderer.js +3 -2
- package/dist/esm/core/guidance/GuidanceRenderer.js.map +1 -1
- package/dist/esm/core/i18n/I18nContext.d.ts +22 -8
- package/dist/esm/core/i18n/I18nContext.d.ts.map +1 -1
- package/dist/esm/core/i18n/I18nContext.js +21 -9
- package/dist/esm/core/i18n/I18nContext.js.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts +5 -3
- package/dist/esm/core/i18n/component-label-resolution.utils.d.ts.map +1 -1
- package/dist/esm/core/i18n/component-label-resolution.utils.js +5 -3
- package/dist/esm/core/i18n/component-label-resolution.utils.js.map +1 -1
- package/dist/esm/core/i18n/useI18n.d.ts +2 -1
- package/dist/esm/core/i18n/useI18n.d.ts.map +1 -1
- package/dist/esm/core/i18n/useI18n.js +2 -1
- package/dist/esm/core/i18n/useI18n.js.map +1 -1
- package/dist/esm/core/loading/LoadingContext.d.ts.map +1 -1
- package/dist/esm/core/loading/LoadingContext.js +7 -1
- package/dist/esm/core/loading/LoadingContext.js.map +1 -1
- package/dist/esm/core/loading/LoadingGate.d.ts.map +1 -1
- package/dist/esm/core/loading/LoadingGate.js +19 -1
- package/dist/esm/core/loading/LoadingGate.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts +15 -2
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js +183 -20
- package/dist/esm/core/monitoring/analytics/AnalyticsContext.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js +2 -2
- package/dist/esm/core/monitoring/analytics/AnalyticsEventBridge.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts +7 -15
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js +8 -26
- package/dist/esm/core/monitoring/analytics/analytics-provider-registry.frontend.service.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts +12 -3
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js +3 -2
- package/dist/esm/core/monitoring/analytics/analytics-provider.frontend.interface.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts +42 -0
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js +89 -5
- package/dist/esm/core/monitoring/analytics/providers/backend-proxy-analytics.provider.js.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts +2 -0
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.d.ts.map +1 -1
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js +2 -0
- package/dist/esm/core/monitoring/analytics/providers/console-analytics.provider.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts +78 -0
- package/dist/esm/core/navigation/NavigationContentAreas.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContentAreas.js +264 -16
- package/dist/esm/core/navigation/NavigationContentAreas.js.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.d.ts +8 -0
- package/dist/esm/core/navigation/NavigationContext.d.ts.map +1 -1
- package/dist/esm/core/navigation/NavigationContext.js +137 -30
- package/dist/esm/core/navigation/NavigationContext.js.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.d.ts +2 -0
- package/dist/esm/core/navigation/launcher-resolution.d.ts.map +1 -1
- package/dist/esm/core/navigation/launcher-resolution.js +1 -0
- package/dist/esm/core/navigation/launcher-resolution.js.map +1 -1
- package/dist/esm/core/navigation/navigation-cascade.d.ts +46 -0
- package/dist/esm/core/navigation/navigation-cascade.d.ts.map +1 -0
- package/dist/esm/core/navigation/navigation-cascade.js +222 -0
- package/dist/esm/core/navigation/navigation-cascade.js.map +1 -0
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js +21 -2
- package/dist/esm/core/navigation/navigation-clean-break.frontend.utils.js.map +1 -1
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts +71 -0
- package/dist/esm/core/navigation/navigation-controller-internals.d.ts.map +1 -0
- package/dist/esm/core/navigation/navigation-controller-internals.js +84 -0
- package/dist/esm/core/navigation/navigation-controller-internals.js.map +1 -0
- package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts +86 -2
- package/dist/esm/core/navigation/navigation-policy-resolver.service.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js +242 -124
- package/dist/esm/core/navigation/navigation-policy-resolver.service.js.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.d.ts +170 -8
- package/dist/esm/core/navigation/navigation.schemas.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.schemas.js +121 -2
- package/dist/esm/core/navigation/navigation.schemas.js.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.d.ts +102 -6
- package/dist/esm/core/navigation/navigation.utils.d.ts.map +1 -1
- package/dist/esm/core/navigation/navigation.utils.js +283 -34
- package/dist/esm/core/navigation/navigation.utils.js.map +1 -1
- package/dist/esm/core/navigation/useIsStackEntryActive.d.ts +0 -10
- package/dist/esm/core/navigation/useIsStackEntryActive.d.ts.map +0 -1
- package/dist/esm/core/navigation/useIsStackEntryActive.js.map +0 -1
- package/dist/esm/core/navigation/useNavigationController.d.ts +28 -157
- package/dist/esm/core/navigation/useNavigationController.d.ts.map +1 -1
- package/dist/esm/core/navigation/useNavigationController.js +211 -1189
- package/dist/esm/core/navigation/useNavigationController.js.map +1 -1
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts +174 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.d.ts.map +1 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.js +977 -0
- package/dist/esm/core/navigation/useNavigationRouterSync.js.map +1 -0
- package/dist/esm/core/navigation/useOverlayTitle.d.ts +13 -1
- package/dist/esm/core/navigation/useOverlayTitle.d.ts.map +1 -1
- package/dist/esm/core/navigation/useOverlayTitle.js +15 -10
- package/dist/esm/core/navigation/useOverlayTitle.js.map +1 -1
- package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts +43 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.d.ts.map +1 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.js +44 -0
- package/dist/esm/core/navigation/useResponsiveZoneMigration.js.map +1 -0
- package/dist/esm/core/navigation/zone-collapse-migration.d.ts +83 -0
- package/dist/esm/core/navigation/zone-collapse-migration.d.ts.map +1 -0
- package/dist/esm/core/navigation/zone-collapse-migration.js +116 -0
- package/dist/esm/core/navigation/zone-collapse-migration.js.map +1 -0
- package/dist/esm/core/navigation/zone-collapse.d.ts +51 -0
- package/dist/esm/core/navigation/zone-collapse.d.ts.map +1 -0
- package/dist/esm/core/navigation/zone-collapse.js +59 -0
- package/dist/esm/core/navigation/zone-collapse.js.map +1 -0
- package/dist/esm/core/navigation/zone-emphasis.d.ts +3 -0
- package/dist/esm/core/navigation/zone-emphasis.d.ts.map +1 -1
- package/dist/esm/core/navigation/zone-emphasis.js +26 -4
- package/dist/esm/core/navigation/zone-emphasis.js.map +1 -1
- package/dist/esm/core/navigation/zone-visible-entry.d.ts +22 -0
- package/dist/esm/core/navigation/zone-visible-entry.d.ts.map +1 -1
- package/dist/esm/core/navigation/zone-visible-entry.js +25 -0
- package/dist/esm/core/navigation/zone-visible-entry.js.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketContext.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketContext.js +53 -18
- package/dist/esm/core/requests/websockets/WebSocketContext.js.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js +3 -1
- package/dist/esm/core/requests/websockets/WebSocketEventBridge.js.map +1 -1
- package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts +22 -0
- package/dist/esm/core/requests/websockets/useNotificationBadges.d.ts.map +1 -1
- package/dist/esm/core/requests/websockets/useNotificationBadges.js +72 -3
- package/dist/esm/core/requests/websockets/useNotificationBadges.js.map +1 -1
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts +28 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.d.ts.map +1 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js +86 -0
- package/dist/esm/core/requests/websockets/usePublishNotificationBadgeCount.js.map +1 -0
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +38 -3
- 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 +57 -2
- package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js +4 -2
- package/dist/esm/core/requests/wildo-http-client-resources.frontend.service.js.map +1 -1
- package/dist/esm/core/requests/wildo-http-client.frontend.service.d.ts +30 -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 +47 -4
- package/dist/esm/core/requests/wildo-http-client.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/ResourceRegistryContext.d.ts.map +1 -1
- package/dist/esm/core/resources/ResourceRegistryContext.js +22 -1
- package/dist/esm/core/resources/ResourceRegistryContext.js.map +1 -1
- package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js +1 -1
- package/dist/esm/core/resources/context-resource-identifiers.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/frontend-resource.utils.d.ts +22 -1
- package/dist/esm/core/resources/frontend-resource.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/frontend-resource.utils.js +25 -2
- package/dist/esm/core/resources/frontend-resource.utils.js.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts +113 -13
- package/dist/esm/core/resources/operation-semantics.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js +173 -20
- package/dist/esm/core/resources/operation-semantics.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts +11 -0
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js +7 -0
- package/dist/esm/core/resources/relationship-surface-runtime.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts +3 -2
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js +13 -5
- package/dist/esm/core/resources/resource-label-field-paths.frontend.utils.js.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts +6 -0
- package/dist/esm/core/resources/resources-repository.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js +90 -1
- package/dist/esm/core/resources/resources-repository.frontend.service.js.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts +139 -16
- package/dist/esm/core/resources/resources.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/resources/resources.frontend.schemas.js +110 -11
- 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 +3 -1
- package/dist/esm/core/resources/rmm/ResourceMutationManager.js.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts +10 -0
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js +8 -0
- package/dist/esm/core/resources/rmm/update-like-mutation-fallback.frontend.js.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts +7 -0
- package/dist/esm/core/resources/rmm/useResourceRMM.d.ts.map +1 -1
- package/dist/esm/core/resources/rmm/useResourceRMM.js +9 -2
- package/dist/esm/core/resources/rmm/useResourceRMM.js.map +1 -1
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts +59 -0
- package/dist/esm/core/resources/useOperationDirectExecution.d.ts.map +1 -0
- package/dist/esm/core/resources/useOperationDirectExecution.js +278 -0
- package/dist/esm/core/resources/useOperationDirectExecution.js.map +1 -0
- package/dist/esm/core/resources/useResourceOperationActions.d.ts +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationActions.js +69 -22
- package/dist/esm/core/resources/useResourceOperationActions.js.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts +8 -6
- package/dist/esm/core/resources/useResourceOperationSurface.d.ts.map +1 -1
- package/dist/esm/core/resources/useResourceOperationSurface.js +3 -2
- package/dist/esm/core/resources/useResourceOperationSurface.js.map +1 -1
- package/dist/esm/core/runtime/AppRouter.d.ts.map +1 -1
- package/dist/esm/core/runtime/AppRouter.js +23 -2
- package/dist/esm/core/runtime/AppRouter.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationContext.shared.d.ts +4 -2
- package/dist/esm/core/runtime/ApplicationContext.shared.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationContext.shared.js.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts +12 -2
- package/dist/esm/core/runtime/ApplicationMainContext.d.ts.map +1 -1
- package/dist/esm/core/runtime/ApplicationMainContext.js +5 -2
- package/dist/esm/core/runtime/ApplicationMainContext.js.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts +25 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.d.ts.map +1 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js +37 -1
- package/dist/esm/core/runtime/domain-module.frontend.definitions.js.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts +21 -2
- package/dist/esm/core/runtime/start-application.frontend.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/start-application.frontend.service.js +51 -4
- package/dist/esm/core/runtime/start-application.frontend.service.js.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.d.ts +11 -0
- package/dist/esm/core/security/AuthSessionContext.d.ts.map +1 -1
- package/dist/esm/core/security/AuthSessionContext.js +70 -22
- package/dist/esm/core/security/AuthSessionContext.js.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.d.ts.map +1 -1
- package/dist/esm/core/security/StepUpAuthContext.js +10 -2
- package/dist/esm/core/security/StepUpAuthContext.js.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.d.ts.map +1 -1
- package/dist/esm/core/security/UserOrgsContext.js +72 -8
- package/dist/esm/core/security/UserOrgsContext.js.map +1 -1
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts +7 -0
- package/dist/esm/core/security/route-organization-access.frontend.utils.d.ts.map +1 -1
- package/dist/esm/core/security/route-organization-access.frontend.utils.js +8 -2
- package/dist/esm/core/security/route-organization-access.frontend.utils.js.map +1 -1
- package/dist/esm/core/security/useGrantedConsentPurposes.d.ts +30 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.d.ts.map +1 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.js +38 -0
- package/dist/esm/core/security/useGrantedConsentPurposes.js.map +1 -0
- package/dist/esm/core/ui/UIContext.d.ts.map +1 -1
- package/dist/esm/core/ui/UIContext.js +10 -6
- package/dist/esm/core/ui/UIContext.js.map +1 -1
- package/dist/esm/core/ui/color-conversion.utils.d.ts +20 -0
- package/dist/esm/core/ui/color-conversion.utils.d.ts.map +1 -1
- package/dist/esm/core/ui/color-conversion.utils.js +39 -5
- package/dist/esm/core/ui/color-conversion.utils.js.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.d.ts.map +1 -1
- package/dist/esm/core/ui/themes/default.theme.js +22 -2
- package/dist/esm/core/ui/themes/default.theme.js.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts +6 -6
- package/dist/esm/core/ui/ui.frontend.schemas.d.ts.map +1 -1
- package/dist/esm/core/ui/ui.frontend.schemas.js +3 -3
- package/dist/esm/core/ui/ui.frontend.schemas.js.map +1 -1
- package/dist/esm/index.d.ts +10 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +19 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/testing/app-shell-placement-coverage.d.ts +43 -0
- package/dist/esm/testing/app-shell-placement-coverage.d.ts.map +1 -0
- package/dist/esm/testing/app-shell-placement-coverage.js +114 -0
- package/dist/esm/testing/app-shell-placement-coverage.js.map +1 -0
- package/dist/esm/testing/mock-builders.d.ts.map +1 -1
- package/dist/esm/testing/mock-builders.js +5 -0
- package/dist/esm/testing/mock-builders.js.map +1 -1
- package/dist/esm/testing.d.ts +1 -0
- package/dist/esm/testing.d.ts.map +1 -1
- package/dist/esm/testing.js +1 -0
- package/dist/esm/testing.js.map +1 -1
- package/package.json +9 -7
- package/dist/esm/core/navigation/useIsStackEntryActive.js +0 -15
- package/dist/tsconfig.build.tsbuildinfo +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceEmbeds.js","sourceRoot":"","sources":["../../../../../../src/components/resources/embeds/ResourceEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAE5B,MAAM,uBAAuB,CAAC;AAE/B,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,gEAAgE,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,mEAAmE,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,qEAAqE,CAAC;AAErG,OAAO,EAAE,wBAAwB,EAAE,MAAM,mEAAmE,CAAC;AAC7G,OAAO,EAAE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AAiF;IACjF,iFAAiF;IACjF,yDAAyD;IACzD,MAAM,cAAc,GAAG,iCAAiC,CAAC,wBAAwB,CAAC,CAAC;IAEnF,MAAM,gBAAgB,GAAG,sCAAsC,CAC7D,wBAAwB,CAAC,gBAAgB,EACzC,EAAE,GAAG,EAAE,OAAO,EAAE,CACjB,CAAC;IAEF,OAAO,uBAAuB,CAC5B,gBAAgB,CAAC,eAAe,EAChC,cAAc,EACd,6BAA6B,CAC3B,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,0BAA0B,CAAC,EAC3F,cAAc,CACf,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,EACpC,YAAY,EACZ,OAAO,EACP,SAAS,EACT,GAAG,MAAM,EACkB;IAC3B,MAAM,EAAE,cAAc,EAAE,GAAG,8BAA8B,EAAE,CAAC;IAC5D,MAAM,wBAAwB,GAAG,0BAA0B,EAAE,CAAC;IAE9D,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,oCAAoC,CACxC,yDAAyD,EACzD,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAAE,CACjD,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,wBAAwB,CAAC,qBAAqB,CAAC;QACrE,GAAG,MAAM;QACT,YAAY;QACZ,aAAa,EAAE,qBAAqB,CAAC,IAAI;KAC1C,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,sCAAsC,CAC7D,YAAY,EACZ,EAAE,GAAG,EAAE,OAAO,EAAE,CACjB,CAAC;IAEF,OAAO,uBAAuB,CAC5B,gBAAgB,CAAC,eAAe,EAChC,cAAc,EACd,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,0BAA0B,CAAC,EAC3F,SAAS,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport {\n CoreResourceOperation,\n ErrorCustomMessageReference,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n// ChartView MUST come from the `.lazy` wrapper — a static import of the real\n// module merges the whole ECharts payload into the entry chunk (Rollup merges\n// a module that is both statically and dynamically imported; no warning).\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { ExecutionView } from '~wildo-frontend-lib/components/views/execution-view/ExecutionView';\nimport { OnboardingView } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport type { OnboardingViewProps } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport { ResourceOperationSurface } from '~wildo-frontend-lib/components/resources/ResourceOperationSurface';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { buildResourceInsertedExecutionIdentity } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { SectionHostHeadingContext } from '~wildo-frontend-lib/components/resources/skeleton/SectionHostHeadingContext';\nimport { EmbeddedResourceDescentBoundary } from './EmbeddedResourceDescent';\nimport { useRegisterComposedChild } from './ComposedChildrenRegistry';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\nimport {\n useEmbeddedResourceHostContext,\n useOptionalEmbeddedResourceHostContext,\n} from '~wildo-frontend-lib/components/resources/embeds/EmbeddedResourceHostContext';\nimport {\n useEmbeddedResourceContext,\n type EmbeddedResourceOperationTarget,\n type EmbeddedResourceOperationTargetSelector,\n} from './useEmbeddedResourceContext';\nimport {\n useHostRecordDerivedParentContext,\n mergeDerivedParentIdentifiers,\n} from '~wildo-frontend-lib/components/views/composite-view/useHostRecordDerivedParentContext';\n\ninterface EmbeddedSurfaceProps {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedChartProps extends EmbeddedSurfaceProps {\n resourceType: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n /**\n * Explicit chart canvas height (`ChartView` default is 400). Needed because\n * `ChartView` sizes its ECharts canvas by this prop, not by its wrapper — a\n * height utility on the embed's `className` cannot shrink the chart. Pass a\n * number (px) or a CSS length for compact dashboard tiles.\n */\n height?: string | number;\n}\n\nfunction EmbeddedChartRenderer(params: {\n resourceType: string;\n viewRef: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n height?: string | number;\n}): React.JSX.Element {\n const { registry } = useResourceRegistry();\n const chartView = registry.resourceConfigurations[params.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === params.viewRef);\n if (!chartView) {\n throw buildResourceEmbedConfigurationError(\n `Composite chart runtime cannot resolve chart view \"${params.viewRef}\" on resource \"${params.resourceType}\".`,\n {\n resourceType: params.resourceType,\n viewRef: params.viewRef,\n },\n );\n }\n\n const identity = buildResourceInsertedChartIdentity(params.resourceType, { ref: params.viewRef });\n\n return (\n <div className={params.className}>\n <FeatureRouteGuard requiredFeatures={chartView.chartDefinition.requiredFeatures}>\n <ChartView\n viewRef={identity.insertedViewRef}\n viewDefinition={chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity,\n chartView,\n contextResourceIdentifiers: params.contextResourceIdentifiers ?? {},\n })}\n contextResourceIdentifiers={params.contextResourceIdentifiers}\n inputs={params.inputs}\n urlParamValues={params.urlParamValues}\n {...(params.height != null ? { height: params.height } : {})}\n // Embedded composite tile → a data-fetch failure degrades locally in the\n // card, no page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </FeatureRouteGuard>\n </div>\n );\n}\n\nexport function EmbedChart({\n resourceType,\n viewRef,\n contextResourceIdentifiers,\n inputs,\n urlParamValues,\n className,\n height,\n}: EmbedChartProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={{\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n }}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n height={height}\n />\n );\n}\n\n/**\n * @wildo_source:part:start saas.frontend.onboarding-view\n *\n * Places an onboarding document on a screen. Import from `@wildo-ai/saas-frontend-lib`.\n */\nexport interface EmbedOnboardingProps {\n /** The document to show — list it on the module's `onboardingViews` too, or its progress is not saved. */\n document: OnboardingViewProps['document'];\n /** Label namespace override, when the document is rendered as part of a larger view. Usually omitted. */\n viewRef?: string;\n /** Save this document's progress under a registered guidance flow's ref instead of its own. Usually omitted. */\n guidanceFlowRef?: string;\n className?: string;\n}\n/** @wildo_source:part:end saas.frontend.onboarding-view */\n\nexport function EmbedOnboarding({\n document,\n viewRef,\n guidanceFlowRef,\n className,\n}: EmbedOnboardingProps): React.JSX.Element {\n return (\n <div className={className}>\n <OnboardingView\n document={document}\n viewRef={viewRef}\n guidanceFlowRef={guidanceFlowRef}\n />\n </div>\n );\n}\n\nexport function EmbedComposite({\n viewRef,\n className,\n}: EmbeddedSurfaceProps): React.JSX.Element {\n // The host record this composite hangs off — used to key the descent, so the\n // SAME composite over a different record still nests while a genuine revisit\n // is refused. Optional context: a composite embedded outside a resource host\n // keys on the view alone, which still catches direct self-embedding.\n const host = useOptionalEmbeddedResourceHostContext();\n const hostRow = host?.hostResourceType\n ? host.contextResourceIdentifiers?.[host.hostResourceType] ?? 'no-row'\n : 'no-host';\n\n return (\n <div className={className}>\n {/*\n D9 — a composite view is the THIRD descent path, and the one most likely\n to recurse in practice: composites in this repository already embed\n `EmbedHostResourceOperation` with `operationLike: READ`, which mounts a\n full record surface that composes its own children. A composite that\n reaches itself again — directly, or through a second composite that links\n back — has no resource embed in the loop to stop it.\n */}\n <EmbeddedResourceDescentBoundary descentKey={`composite:${viewRef}::${hostRow}`}>\n <CompositeView viewRef={viewRef} />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedExecutionProps extends EmbeddedSurfaceProps {\n contextResourceIdentifiers?: Record<string, string>;\n}\n\nfunction renderEmbeddedExecution(\n viewRef: string,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n contextResourceIdentifiers?: Record<string, string>,\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D9 — an execution view is a DESCENT PATH in its own right, and closing it\n is not redundant with bounding resource embeds. A resource-operation embed\n inside an execution view is already bounded, so a mixed chain terminates;\n but an execution view that embeds ITSELF (`EmbedHostExecution` with its own\n `viewRef`) recurses with no resource embed anywhere in the loop, so nothing\n else would ever stop it.\n Keyed on `(viewRef, host row)` for the same reason resource descents are:\n the same view over a DIFFERENT record is legitimate nesting, the same view\n over the same record is a cycle.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`execution:${viewRef}::${Object.values(contextResourceIdentifiers ?? {}).join(',') || 'no-row'}`}\n >\n <ExecutionView\n viewRef={viewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport function EmbedExecution({\n viewRef,\n contextResourceIdentifiers,\n className,\n}: EmbedExecutionProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return renderEmbeddedExecution(\n viewRef,\n compositeContext.navigationZone,\n {\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n },\n className,\n );\n}\n\nfunction buildResourceEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n message,\n component: 'ResourceEmbeds',\n ...context,\n },\n );\n}\n\nfunction renderEmbeddedResourceOperation(\n resourceContext: FrontendResourceOperationContext,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n navigationInitiator: ReturnType<typeof useEmbeddedResourceHostContext>['navigationInitiator'],\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D7 — the HOST owns the framing, the embed never brings its own.\n `SectionHostHeadingContext` makes the embedded surface suppress its generic\n resource heading (and the page chrome that trails it), so a child placed in\n a template renders as CONTENT rather than as a second page inside the first.\n Without it an embed dropped straight into a display flow stacks its own\n heading, description, parent breadcrumb and back-arrow under the host's —\n the exact defect that had to be fixed in the nested container, arriving\n again through this door because the embed suppressed nothing.\n It is set unconditionally rather than only inside a titled <Section>: an\n author who placed the child decided where it goes, and a surface that\n injects a page header into someone else's flow depending on its ancestors\n is the context-dependent behaviour that made the original defect so hard\n to see. A record-specific `displayLabel` is data, not a duplicate heading,\n and is never suppressed by this context.\n */}\n {/*\n D9 — every embedded surface is one level of DESCENT and must be bounded.\n An embed may mount a full READ surface, which composes its own children,\n which may embed again; on a self-referencing or mutually-recursive edge\n that does not terminate. The key is `(target resource, host row)` so a\n legitimate hierarchy over distinct rows keeps descending while a genuine\n revisit of the same record is refused at the moment it happens.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`embed:${resourceContext.resourceType}::${FrontendResourceUtils.getInstance().getResourceId(\n resourceContext.contextResourceIdentifiers?.[resourceContext.resourceType],\n ) || 'no-row'}`}\n >\n <SectionHostHeadingContext.Provider value={true}>\n <ResourceOperationSurface\n resourceContext={resourceContext}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </SectionHostHeadingContext.Provider>\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedResourceOperationProps {\n resourceContext: FrontendResourceOperationContext;\n className?: string;\n}\n\nexport type EmbedHostResourceOperationProps = EmbeddedResourceOperationTarget\n & EmbeddedResourceOperationTargetSelector\n & {\n className?: string;\n };\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\nexport type EmbedRelatedResourceOperationProps = EmbeddedResourceOperationTargetSelector\n & {\n resourceType: string;\n resourceId?: string;\n relationshipFieldOverrides?: Record<string, string>;\n additionalContext?: Record<string, unknown>;\n className?: string;\n };\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport function EmbedResourceOperation({\n resourceContext,\n className,\n}: EmbedResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport function EmbedHostResourceOperation({\n className,\n ...target\n}: EmbedHostResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = useMemo(\n () => compositeResourceContext.buildOperationContext(target),\n // Keyed by the target's *value*, not the fresh-every-render rest-object identity.\n // buildOperationContext clones resource configs to assemble the context; calling it\n // inline each render churns those clones (the 603-config heap growth) and hands a new\n // `resourceContext` identity to the operation surface, re-firing its context-keyed\n // effects — the composite re-render loop. Recomputes only on a real target / context change.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport type EmbedRelatedResourceOperationTarget = Omit<EmbedRelatedResourceOperationProps, 'className'>;\n\nexport function EmbedRelatedResourceOperation({\n className,\n ...target\n}: EmbedRelatedResourceOperationProps): React.JSX.Element {\n // D1 — claim this child for the template that placed it, so the host's\n // automatic composition skips it instead of rendering a second copy below.\n // A no-op outside a registry host, so composite views are unaffected.\n useRegisterComposedChild(target.resourceType);\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = useMemo(\n () => {\n if (!target.resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedResourceOperation() requires a target resourceType.',\n { target },\n );\n }\n return compositeResourceContext.buildOperationContext(target);\n },\n // Keyed by target value, not the fresh rest-object identity — see EmbedHostResourceOperation.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\n/**\n * Which EDGE to embed, when the host has more than one relationship to the same\n * target resource — two lists of todos, an assignee and a reviewer both pointing\n * at users. Keyed by the HOST resource type, valued with the foreign-key field\n * that identifies the edge.\n *\n * `resourceType` alone is ambiguous in that case, and the ambiguity is silent:\n * the resolver picks an edge and renders a plausible-looking wrong collection.\n */\nexport type EmbedRelatedResourceEdgeSelector = Record<string, string>;\n\nexport interface EmbedRelatedResourceListProps {\n /** Target child resource type. */\n resourceType: string;\n /** Disambiguates WHICH edge when the host has several to this target. */\n viaForeignKey?: EmbedRelatedResourceEdgeSelector;\n className?: string;\n}\n\n/**\n * Embed a related resource's LIST — the common case, spelled directly.\n *\n * A pure delegation to {@link EmbedRelatedResourceOperation}: no resolution,\n * addressability or context logic lives here. The operation embed stays the one\n * place that code exists, so a shortcut can never drift from it.\n */\nexport function EmbedRelatedResourceList({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceListProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.LIST}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n\nexport interface EmbedRelatedResourceSearchProps extends EmbedRelatedResourceListProps {}\n\n/**\n * Embed a related resource's SEARCH surface. Same delegation contract as\n * {@link EmbedRelatedResourceList} — only the semantic operation differs.\n */\nexport function EmbedRelatedResourceSearch({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceSearchProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.SEARCH}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport interface EmbedHostExecutionProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedRelatedExecutionProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedHostChartProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport interface EmbedRelatedChartProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedHostChart({\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedHostChartProps): React.JSX.Element {\n const compositeResourceContext = useEmbeddedResourceContext();\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned chart may require the host's PARENT scope (e.g. a\n // `todo-task-status` chart mandating `todos` when the host is a `task`). Derive\n // the parent id off the host record and merge it UNDER the URL context so the\n // chart's `parentResourcesRequirements` resolve.\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n return (\n <EmbeddedChartRenderer\n resourceType={compositeResourceContext.hostResourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedRelatedChart({\n resourceType,\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedRelatedChartProps): React.JSX.Element {\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedChart() requires a target resourceType.',\n { target },\n );\n }\n\n const compositeResourceContext = useEmbeddedResourceContext();\n // A RELATED chart aggregates a COLLECTION of `resourceType` scoped by the host\n // record (e.g. the tasks of the current todo) — there is no single addressable\n // related-record id, so it must resolve a collection operation (LIST), NOT READ.\n // Resolving READ here required an addressable related id that never exists in a\n // host→related context and threw a composite configuration error (caught by\n // SurfaceErrorBoundary, degrading the surface). The host context (the parent\n // record's id) is still threaded into the related context via\n // `deriveChildResourceContext`, so the chart stays scoped to the host record.\n // (`EmbedHostChart` keeps READ: the host IS a single addressable record.)\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.LIST,\n });\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={FrontendResourceUtils.flattenContextIdentifiers(\n resourceContext.contextResourceIdentifiers,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedHostExecution({\n viewRef,\n className,\n ...target\n}: EmbedHostExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned execution may anchor on the host's PARENT (e.g. a\n // `task-workspace` execution binding `todoId` when the host is a `task`). Derive\n // the parent id off the host record so the anchor resolves instead of \"No anchor\n // resolved\". Merged UNDER the URL context (URL ids win).\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n compositeResourceContext.hostResourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n ),\n className,\n );\n}\n\nexport function EmbedRelatedExecution({\n resourceType,\n viewRef,\n className,\n ...target\n}: EmbedRelatedExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedExecution() requires a target resourceType.',\n { target: { resourceType, viewRef, ...target } },\n );\n }\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.READ,\n });\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n resourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n className,\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ResourceEmbeds.js","sourceRoot":"","sources":["../../../../../../src/components/resources/embeds/ResourceEmbeds.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,0CAA0C,EAC1C,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,EAC3B,8BAA8B,GAE/B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oCAAoC,EAAE,MAAM,gFAAgF,CAAC;AAGtI,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,gEAAgE,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,mEAAmE,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,qEAAqE,CAAC;AAErG,OAAO,EAAE,wBAAwB,EAAE,MAAM,mEAAmE,CAAC;AAC7G,OAAO,EAAE,qBAAqB,EAAE,MAAM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AgB,CAAC,eAAe,EAChC,cAAc,EACd,qBAAqB,CAAC,yBAAyB,CAAC,eAAe,CAAC,0BAA0B,CAAC,EAC3F,SAAS,CACV,CAAC;AACJ,CAAC","sourcesContent":["import React, { useMemo } from 'react';\n\nimport {\n CONVERSATION_THREAD_LINKED_RESOURCE_FILTER,\n CoreResourceOperation,\n CoreResourceType,\n ErrorCustomMessageReference,\n getChildDirectionRelationships,\n type ChartInputValues,\n} from '@wildo-ai/saas-models';\nimport { resolveRelationshipNestedReadSurface } from '~wildo-frontend-lib/core/resources/relationship-surface-runtime.frontend.utils';\nimport type { NavigationSourceRelationship } from '~wildo-frontend-lib/core/navigation/navigation.schemas';\nimport type { FrontendResourceOperationContext } from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\n// ChartView MUST come from the `.lazy` wrapper — a static import of the real\n// module merges the whole ECharts payload into the entry chunk (Rollup merges\n// a module that is both statically and dynamically imported; no warning).\nimport { ChartView } from '~wildo-frontend-lib/components/views/chart-view/ChartView.lazy';\nimport { ExecutionView } from '~wildo-frontend-lib/components/views/execution-view/ExecutionView';\nimport { OnboardingView } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport type { OnboardingViewProps } from '~wildo-frontend-lib/components/views/onboarding-view/OnboardingView';\nimport { ResourceOperationSurface } from '~wildo-frontend-lib/components/resources/ResourceOperationSurface';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\nimport { buildResourceInsertedExecutionIdentity } from '~wildo-frontend-lib/core/config/execution-view.schemas';\nimport {\n buildResolvedInsertedChartDescriptor,\n buildResourceInsertedChartIdentity,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { FeatureRouteGuard } from '~wildo-frontend-lib/core/features/FeatureRouteGuard';\nimport { SectionHostHeadingContext } from '~wildo-frontend-lib/components/resources/skeleton/SectionHostHeadingContext';\nimport { EmbeddedResourceDescentBoundary } from './EmbeddedResourceDescent';\nimport { useRegisterComposedChild } from './ComposedChildrenRegistry';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\nimport { CompositeView } from '~wildo-frontend-lib/components/views/composite-view/CompositeView';\nimport {\n useEmbeddedResourceHostContext,\n useOptionalEmbeddedResourceHostContext,\n} from '~wildo-frontend-lib/components/resources/embeds/EmbeddedResourceHostContext';\nimport {\n useEmbeddedResourceContext,\n type EmbeddedResourceOperationTarget,\n type EmbeddedResourceOperationTargetSelector,\n} from './useEmbeddedResourceContext';\nimport {\n useHostRecordDerivedParentContext,\n mergeDerivedParentIdentifiers,\n} from '~wildo-frontend-lib/components/views/composite-view/useHostRecordDerivedParentContext';\n\ninterface EmbeddedSurfaceProps {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedChartProps extends EmbeddedSurfaceProps {\n resourceType: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n /**\n * Explicit chart canvas height (`ChartView` default is 400). Needed because\n * `ChartView` sizes its ECharts canvas by this prop, not by its wrapper — a\n * height utility on the embed's `className` cannot shrink the chart. Pass a\n * number (px) or a CSS length for compact dashboard tiles.\n */\n height?: string | number;\n}\n\nfunction EmbeddedChartRenderer(params: {\n resourceType: string;\n viewRef: string;\n contextResourceIdentifiers?: Record<string, string>;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n height?: string | number;\n}): React.JSX.Element {\n const { registry } = useResourceRegistry();\n const chartView = registry.resourceConfigurations[params.resourceType]\n ?.frontendConfiguration\n ?.chartViews\n ?.find((candidate) => candidate.ref === params.viewRef);\n if (!chartView) {\n throw buildResourceEmbedConfigurationError(\n `Composite chart runtime cannot resolve chart view \"${params.viewRef}\" on resource \"${params.resourceType}\".`,\n {\n resourceType: params.resourceType,\n viewRef: params.viewRef,\n },\n );\n }\n\n const identity = buildResourceInsertedChartIdentity(params.resourceType, { ref: params.viewRef });\n\n return (\n <div className={params.className}>\n <FeatureRouteGuard requiredFeatures={chartView.chartDefinition.requiredFeatures}>\n <ChartView\n viewRef={identity.insertedViewRef}\n viewDefinition={chartView}\n runtimeDescriptor={buildResolvedInsertedChartDescriptor({\n identity,\n chartView,\n contextResourceIdentifiers: params.contextResourceIdentifiers ?? {},\n })}\n contextResourceIdentifiers={params.contextResourceIdentifiers}\n inputs={params.inputs}\n urlParamValues={params.urlParamValues}\n {...(params.height != null ? { height: params.height } : {})}\n // Embedded composite tile → a data-fetch failure degrades locally in the\n // card, no page-level toast (per-widget error isolation).\n localErrorOnly\n />\n </FeatureRouteGuard>\n </div>\n );\n}\n\nexport function EmbedChart({\n resourceType,\n viewRef,\n contextResourceIdentifiers,\n inputs,\n urlParamValues,\n className,\n height,\n}: EmbedChartProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={{\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n }}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n height={height}\n />\n );\n}\n\n/**\n * @wildo_source:part:start saas.frontend.onboarding-view\n *\n * Places an onboarding document on a screen. Import from `@wildo-ai/saas-frontend-lib`.\n */\nexport interface EmbedOnboardingProps {\n /** The document to show — list it on the module's `onboardingViews` too, or its progress is not saved. */\n document: OnboardingViewProps['document'];\n /** Label namespace override, when the document is rendered as part of a larger view. Usually omitted. */\n viewRef?: string;\n /** Save this document's progress under a registered guidance flow's ref instead of its own. Usually omitted. */\n guidanceFlowRef?: string;\n className?: string;\n}\n/** @wildo_source:part:end saas.frontend.onboarding-view */\n\nexport function EmbedOnboarding({\n document,\n viewRef,\n guidanceFlowRef,\n className,\n}: EmbedOnboardingProps): React.JSX.Element {\n return (\n <div className={className}>\n <OnboardingView\n document={document}\n viewRef={viewRef}\n guidanceFlowRef={guidanceFlowRef}\n />\n </div>\n );\n}\n\nexport function EmbedComposite({\n viewRef,\n className,\n}: EmbeddedSurfaceProps): React.JSX.Element {\n // The host record this composite hangs off — used to key the descent, so the\n // SAME composite over a different record still nests while a genuine revisit\n // is refused. Optional context: a composite embedded outside a resource host\n // keys on the view alone, which still catches direct self-embedding.\n const host = useOptionalEmbeddedResourceHostContext();\n const hostRow = host?.hostResourceType\n ? host.contextResourceIdentifiers?.[host.hostResourceType] ?? 'no-row'\n : 'no-host';\n\n return (\n <div className={className}>\n {/*\n D9 — a composite view is the THIRD descent path, and the one most likely\n to recurse in practice: composites in this repository already embed\n `EmbedHostResourceOperation` with `operationLike: READ`, which mounts a\n full record surface that composes its own children. A composite that\n reaches itself again — directly, or through a second composite that links\n back — has no resource embed in the loop to stop it.\n */}\n <EmbeddedResourceDescentBoundary descentKey={`composite:${viewRef}::${hostRow}`}>\n <CompositeView viewRef={viewRef} />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedExecutionProps extends EmbeddedSurfaceProps {\n contextResourceIdentifiers?: Record<string, string>;\n}\n\nfunction renderEmbeddedExecution(\n viewRef: string,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n contextResourceIdentifiers?: Record<string, string>,\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D9 — an execution view is a DESCENT PATH in its own right, and closing it\n is not redundant with bounding resource embeds. A resource-operation embed\n inside an execution view is already bounded, so a mixed chain terminates;\n but an execution view that embeds ITSELF (`EmbedHostExecution` with its own\n `viewRef`) recurses with no resource embed anywhere in the loop, so nothing\n else would ever stop it.\n Keyed on `(viewRef, host row)` for the same reason resource descents are:\n the same view over a DIFFERENT record is legitimate nesting, the same view\n over the same record is a cycle.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`execution:${viewRef}::${Object.values(contextResourceIdentifiers ?? {}).join(',') || 'no-row'}`}\n >\n <ExecutionView\n viewRef={viewRef}\n navigationZone={navigationZone}\n contextResourceIdentifiers={contextResourceIdentifiers}\n />\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport function EmbedExecution({\n viewRef,\n contextResourceIdentifiers,\n className,\n}: EmbedExecutionProps): React.JSX.Element {\n const compositeContext = useEmbeddedResourceHostContext();\n\n return renderEmbeddedExecution(\n viewRef,\n compositeContext.navigationZone,\n {\n ...(compositeContext.contextResourceIdentifiers ?? {}),\n ...(contextResourceIdentifiers ?? {}),\n },\n className,\n );\n}\n\nfunction buildResourceEmbedConfigurationError(\n message: string,\n context?: Record<string, unknown>,\n): Error {\n return FrontendResourceUtils.buildConfigurationError(\n ErrorCustomMessageReference.CONFIGURATION,\n {\n message,\n component: 'ResourceEmbeds',\n ...context,\n },\n );\n}\n\nfunction renderEmbeddedResourceOperation(\n resourceContext: FrontendResourceOperationContext,\n navigationZone: ReturnType<typeof useEmbeddedResourceHostContext>['navigationZone'],\n navigationInitiator: ReturnType<typeof useEmbeddedResourceHostContext>['navigationInitiator'],\n className?: string,\n): React.JSX.Element {\n return (\n <div className={className}>\n {/*\n D7 — the HOST owns the framing, the embed never brings its own.\n `SectionHostHeadingContext` makes the embedded surface suppress its generic\n resource heading (and the page chrome that trails it), so a child placed in\n a template renders as CONTENT rather than as a second page inside the first.\n Without it an embed dropped straight into a display flow stacks its own\n heading, description, parent breadcrumb and back-arrow under the host's —\n the exact defect that had to be fixed in the nested container, arriving\n again through this door because the embed suppressed nothing.\n It is set unconditionally rather than only inside a titled <Section>: an\n author who placed the child decided where it goes, and a surface that\n injects a page header into someone else's flow depending on its ancestors\n is the context-dependent behaviour that made the original defect so hard\n to see. A record-specific `displayLabel` is data, not a duplicate heading,\n and is never suppressed by this context.\n */}\n {/*\n D9 — every embedded surface is one level of DESCENT and must be bounded.\n An embed may mount a full READ surface, which composes its own children,\n which may embed again; on a self-referencing or mutually-recursive edge\n that does not terminate. The key is `(target resource, host row)` so a\n legitimate hierarchy over distinct rows keeps descending while a genuine\n revisit of the same record is refused at the moment it happens.\n */}\n <EmbeddedResourceDescentBoundary\n descentKey={`embed:${resourceContext.resourceType}::${FrontendResourceUtils.getInstance().getResourceId(\n resourceContext.contextResourceIdentifiers?.[resourceContext.resourceType],\n ) || 'no-row'}`}\n >\n <SectionHostHeadingContext.Provider value={true}>\n <ResourceOperationSurface\n resourceContext={resourceContext}\n navigationZone={navigationZone}\n navigationInitiator={navigationInitiator}\n />\n </SectionHostHeadingContext.Provider>\n </EmbeddedResourceDescentBoundary>\n </div>\n );\n}\n\nexport interface EmbedResourceOperationProps {\n resourceContext: FrontendResourceOperationContext;\n className?: string;\n}\n\nexport type EmbedHostResourceOperationProps = EmbeddedResourceOperationTarget\n & EmbeddedResourceOperationTargetSelector\n & {\n className?: string;\n };\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\nexport type EmbedRelatedResourceOperationProps = EmbeddedResourceOperationTargetSelector\n & {\n resourceType: string;\n resourceId?: string;\n relationshipFieldOverrides?: Record<string, string>;\n additionalContext?: Record<string, unknown>;\n className?: string;\n };\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport function EmbedResourceOperation({\n resourceContext,\n className,\n}: EmbedResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport function EmbedHostResourceOperation({\n className,\n ...target\n}: EmbedHostResourceOperationProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = useMemo(\n () => compositeResourceContext.buildOperationContext(target),\n // Keyed by the target's *value*, not the fresh-every-render rest-object identity.\n // buildOperationContext clones resource configs to assemble the context; calling it\n // inline each render churns those clones (the 603-config heap growth) and hands a new\n // `resourceContext` identity to the operation surface, re-firing its context-keyed\n // effects — the composite re-render loop. Recomputes only on a real target / context change.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\nexport type EmbedRelatedResourceOperationTarget = Omit<EmbedRelatedResourceOperationProps, 'className'>;\n\nexport function EmbedRelatedResourceOperation({\n className,\n ...target\n}: EmbedRelatedResourceOperationProps): React.JSX.Element {\n // D1 — claim this child for the template that placed it, so the host's\n // automatic composition skips it instead of rendering a second copy below.\n // A no-op outside a registry host, so composite views are unaffected.\n useRegisterComposedChild(target.resourceType);\n const { navigationZone, navigationInitiator: hostNavigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { registry } = useResourceRegistry();\n\n /*\n * The EDGE this child sits on, carried on every navigation it starts — what the automatic composition\n * (`ResourceLayout_ContainerNested`) already attaches as `sourceRelationship`.\n *\n * Without it a record opened from a TEMPLATE-placed relation never learnt its parent: the READ derives\n * its parent reference from `sourceRelationship`, so the child's declared `inChildView` presentation\n * could not apply. Wonder Todos declares a todo read inside its list as a linked BADGE back to the\n * list; its list page places the todos through `RelatedResourceSections`, and the badge never\n * appeared (#1945). Placing a child yourself must not cost the child its relationship.\n *\n * Resolved through `resolveRelationshipNestedReadSurface`, the same predicate the automatic\n * composition uses, so the two paths cannot disagree about which edge a child sits on. An edge the\n * target does not single out (no match, or several with no `viaForeignKey`) attaches nothing — the\n * behaviour before this, rather than a guess.\n */\n const sourceRelationship = useMemo<NavigationSourceRelationship | undefined>(() => {\n const { hostResourceType, hostResourceId, hostResourceConfig } = compositeResourceContext;\n if (!target.resourceType || target.resourceType === hostResourceType || !hostResourceConfig?.resourceRelationships) {\n return undefined;\n }\n const selectedForeignKey = target.relationshipFieldOverrides?.[hostResourceType];\n const edges = getChildDirectionRelationships(hostResourceConfig.resourceRelationships)\n .map((relationship) => resolveRelationshipNestedReadSurface({ parentResourceType: hostResourceType, relationship, registry }))\n .filter((edge): edge is NonNullable<typeof edge> => edge !== undefined)\n .filter((edge) => edge.childResourceType === target.resourceType)\n .filter((edge) => selectedForeignKey === undefined || edge.foreignKeyField === selectedForeignKey);\n if (edges.length !== 1) return undefined;\n const edge = edges[0]!;\n return {\n parentResourceType: hostResourceType,\n parentResourceId: hostResourceId || undefined,\n childResourceType: edge.childResourceType,\n foreignKeyField: edge.foreignKeyField,\n relationshipEdgeKey: edge.relationshipEdgeKey,\n inChildView: edge.inChildView,\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- keyed by the target's value, like the context below\n }, [compositeResourceContext, registry, JSON.stringify(target)]);\n const navigationInitiator = useMemo(\n () => (sourceRelationship\n ? { ...(hostNavigationInitiator ?? { sourceZone: navigationZone }), sourceRelationship }\n : hostNavigationInitiator),\n [hostNavigationInitiator, navigationZone, sourceRelationship],\n );\n\n const resourceContext = useMemo(\n () => {\n if (!target.resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedResourceOperation() requires a target resourceType.',\n { target },\n );\n }\n return compositeResourceContext.buildOperationContext(target);\n },\n // Keyed by target value, not the fresh rest-object identity — see EmbedHostResourceOperation.\n // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally keyed by JSON value of `target`\n [compositeResourceContext, JSON.stringify(target)],\n );\n\n return renderEmbeddedResourceOperation(\n resourceContext,\n navigationZone,\n navigationInitiator,\n className,\n );\n}\n\n/** @wildo_source:part:start saas.frontend.related-resource-embeds facet:layer:frontend facet:family:component */\n/**\n * Which EDGE to embed, when the host has more than one relationship to the same\n * target resource — two lists of todos, an assignee and a reviewer both pointing\n * at users. Keyed by the HOST resource type, valued with the foreign-key field\n * that identifies the edge.\n *\n * `resourceType` alone is ambiguous in that case, and the ambiguity is silent:\n * the resolver picks an edge and renders a plausible-looking wrong collection.\n */\nexport type EmbedRelatedResourceEdgeSelector = Record<string, string>;\n\nexport interface EmbedRelatedResourceListProps {\n /** Target child resource type. */\n resourceType: string;\n /** Disambiguates WHICH edge when the host has several to this target. */\n viaForeignKey?: EmbedRelatedResourceEdgeSelector;\n className?: string;\n}\n\n/**\n * Embed a related resource's LIST — the common case, spelled directly.\n *\n * A pure delegation to {@link EmbedRelatedResourceOperation}: no resolution,\n * addressability or context logic lives here. The operation embed stays the one\n * place that code exists, so a shortcut can never drift from it.\n */\nexport function EmbedRelatedResourceList({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceListProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.LIST}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n\n/** @wildo_source:part:start saas.frontend.linked-conversations-embed facet:layer:frontend facet:family:component facet:audience:app-developer */\nexport interface EmbedLinkedConversationsProps {\n className?: string;\n}\n\n/**\n * The conversations linked to the host record (#1630) — email threads an inbound channel handler tied to this\n * record with `ctx.thread.link`, newest first. Each opens to its messages in both directions, and an organization\n * administrator can close it.\n *\n * Place it in a READ template or a record composite of the resource your threads are linked to. It is the\n * `conversationThreads` LIST, pinned to this record through `pinnedFilters`: the reader cannot widen it to another\n * record, and it shows only what the reader's own roles may read (organization members read their organization's\n * conversations).\n *\n * @example\n * // frontend/src/modules/<slug>/resources/matters/MatterReadCustomView.tsx\n * <ResourceLayoutPreset_Read_Default {...props}>\n * <Section name=\"conversations\"><EmbedLinkedConversations /></Section>\n * </ResourceLayoutPreset_Read_Default>\n */\nexport function EmbedLinkedConversations({ className }: EmbedLinkedConversationsProps): React.JSX.Element {\n const { navigationZone, navigationInitiator } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n const { hostResourceType, hostResourceId } = compositeResourceContext;\n\n const resourceContext = useMemo((): FrontendResourceOperationContext => {\n if (!hostResourceId) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedLinkedConversations() needs a host RECORD: place it on a READ surface, where the record it lists conversations for exists.',\n { hostResourceType },\n );\n }\n const threads = compositeResourceContext.buildOperationContext({\n resourceType: CoreResourceType.CONVERSATION_THREADS,\n operationLike: CoreResourceOperation.LIST,\n requireAddressable: false,\n });\n return {\n ...threads,\n pinnedFilters: {\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_TYPE]: hostResourceType,\n [CONVERSATION_THREAD_LINKED_RESOURCE_FILTER.RESOURCE_ID]: hostResourceId,\n },\n };\n }, [compositeResourceContext, hostResourceType, hostResourceId]);\n\n return renderEmbeddedResourceOperation(resourceContext, navigationZone, navigationInitiator, className);\n}\n/** @wildo_source:part:end saas.frontend.linked-conversations-embed */\n\nexport interface EmbedRelatedResourceSearchProps extends EmbedRelatedResourceListProps {}\n\n/**\n * Embed a related resource's SEARCH surface. Same delegation contract as\n * {@link EmbedRelatedResourceList} — only the semantic operation differs.\n */\nexport function EmbedRelatedResourceSearch({\n resourceType,\n viaForeignKey,\n className,\n}: EmbedRelatedResourceSearchProps): React.JSX.Element {\n return (\n <EmbedRelatedResourceOperation\n resourceType={resourceType}\n operationLike={CoreResourceOperation.SEARCH}\n relationshipFieldOverrides={viaForeignKey}\n className={className}\n />\n );\n}\n/** @wildo_source:part:end saas.frontend.related-resource-embeds */\n\nexport interface EmbedHostExecutionProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedRelatedExecutionProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n className?: string;\n}\n\nexport interface EmbedHostChartProps extends EmbeddedResourceOperationTarget {\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport interface EmbedRelatedChartProps extends EmbeddedResourceOperationTarget {\n resourceType: string;\n viewRef: string;\n inputs?: ChartInputValues;\n urlParamValues?: Record<string, string>;\n className?: string;\n}\n\nexport function EmbedHostChart({\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedHostChartProps): React.JSX.Element {\n const compositeResourceContext = useEmbeddedResourceContext();\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned chart may require the host's PARENT scope (e.g. a\n // `todo-task-status` chart mandating `todos` when the host is a `task`). Derive\n // the parent id off the host record and merge it UNDER the URL context so the\n // chart's `parentResourcesRequirements` resolve.\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n return (\n <EmbeddedChartRenderer\n resourceType={compositeResourceContext.hostResourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedRelatedChart({\n resourceType,\n viewRef,\n inputs,\n urlParamValues,\n className,\n ...target\n}: EmbedRelatedChartProps): React.JSX.Element {\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedChart() requires a target resourceType.',\n { target },\n );\n }\n\n const compositeResourceContext = useEmbeddedResourceContext();\n // A RELATED chart aggregates a COLLECTION of `resourceType` scoped by the host\n // record (e.g. the tasks of the current todo) — there is no single addressable\n // related-record id, so it must resolve a collection operation (LIST), NOT READ.\n // Resolving READ here required an addressable related id that never exists in a\n // host→related context and threw a composite configuration error (caught by\n // SurfaceErrorBoundary, degrading the surface). The host context (the parent\n // record's id) is still threaded into the related context via\n // `deriveChildResourceContext`, so the chart stays scoped to the host record.\n // (`EmbedHostChart` keeps READ: the host IS a single addressable record.)\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.LIST,\n });\n\n return (\n <EmbeddedChartRenderer\n resourceType={resourceType}\n viewRef={viewRef}\n contextResourceIdentifiers={FrontendResourceUtils.flattenContextIdentifiers(\n resourceContext.contextResourceIdentifiers,\n )}\n inputs={inputs}\n urlParamValues={urlParamValues}\n className={className}\n />\n );\n}\n\nexport function EmbedHostExecution({\n viewRef,\n className,\n ...target\n}: EmbedHostExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n operationLike: CoreResourceOperation.READ,\n });\n\n // D2: a host-owned execution may anchor on the host's PARENT (e.g. a\n // `task-workspace` execution binding `todoId` when the host is a `task`). Derive\n // the parent id off the host record so the anchor resolves instead of \"No anchor\n // resolved\". Merged UNDER the URL context (URL ids win).\n const derivedParents = useHostRecordDerivedParentContext(compositeResourceContext);\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n compositeResourceContext.hostResourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n mergeDerivedParentIdentifiers(\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n derivedParents,\n ),\n className,\n );\n}\n\nexport function EmbedRelatedExecution({\n resourceType,\n viewRef,\n className,\n ...target\n}: EmbedRelatedExecutionProps): React.JSX.Element {\n const { navigationZone } = useEmbeddedResourceHostContext();\n const compositeResourceContext = useEmbeddedResourceContext();\n\n if (!resourceType) {\n throw buildResourceEmbedConfigurationError(\n 'EmbedRelatedExecution() requires a target resourceType.',\n { target: { resourceType, viewRef, ...target } },\n );\n }\n\n const resourceContext = compositeResourceContext.buildOperationContext({\n ...target,\n resourceType,\n operationLike: CoreResourceOperation.READ,\n });\n\n const insertedIdentity = buildResourceInsertedExecutionIdentity(\n resourceType,\n { ref: viewRef },\n );\n\n return renderEmbeddedExecution(\n insertedIdentity.insertedViewRef,\n navigationZone,\n FrontendResourceUtils.flattenContextIdentifiers(resourceContext.contextResourceIdentifiers),\n className,\n );\n}\n"]}
|
|
@@ -54,6 +54,20 @@ export declare class ResourceLayoutUtils {
|
|
|
54
54
|
* this name, and the name is right for them.
|
|
55
55
|
*/
|
|
56
56
|
static detectSummaryFields(resourceConfig: AnyFrontendResourceConfiguration | undefined): string[];
|
|
57
|
+
/**
|
|
58
|
+
* The filter fields a READER may set, given the host's pins (#1630): a field the host pinned through
|
|
59
|
+
* `FrontendResourceOperationContext.pinnedFilters` is fixed on every fetch, so offering it in the panel would
|
|
60
|
+
* offer a choice that changes nothing. The one definition both collection layouts (LIST, SEARCH) use.
|
|
61
|
+
*/
|
|
62
|
+
static withoutPinnedFilterFields<T extends {
|
|
63
|
+
fieldName: string;
|
|
64
|
+
}>(fields: readonly T[], pinnedFilters: Readonly<Record<string, string>> | undefined): T[];
|
|
65
|
+
/**
|
|
66
|
+
* The filters a collection fetch sends: the reader's, then the host's pins on top (#1630). A pin wins over a
|
|
67
|
+
* reader's value for the same key, so an embed pinned to one record can never be widened to another. The one
|
|
68
|
+
* definition both collection layouts use, for SEARCH filters and LIST query parameters alike.
|
|
69
|
+
*/
|
|
70
|
+
static withPinnedFilters<V>(readerFilters: Readonly<Record<string, V>>, pinnedFilters: Readonly<Record<string, string>> | undefined): Record<string, V | string>;
|
|
57
71
|
/**
|
|
58
72
|
* Compute the set of filter-field names that the transport already pins for
|
|
59
73
|
* the given operation in the current context. See
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceLayout.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/resourceLayout.utils.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACvC,yBAAyB,EAC1B,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,mEAAmE,CAAC;AACpI,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAG7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,cAAc,EAAE,gCAAgC,CAAC;IACjD,SAAS,EAAE,uCAAuC,CAAC;IACnD,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAC7E,2BAA2B,CAAC,EAAE,0CAA0C,EAAE,CAAC;CAC5E;AAED;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B,OAAO;IAEP;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,mBAAmB,CACxB,cAAc,EAAE,gCAAgC,GAAG,SAAS,GAC3D,MAAM,EAAE;IAIX;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,gCAAgC;IAwC/C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,2BAA2B,CAChC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,gBAAgB,CAAC,EAAE,2BAA2B,GAC7C,SAAS,qBAAqB,EAAE;
|
|
1
|
+
{"version":3,"file":"resourceLayout.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/resources/resourceLayout.utils.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACvC,yBAAyB,EAC1B,MAAM,+DAA+D,CAAC;AACvE,OAAO,KAAK,EAAE,0CAA0C,EAAE,MAAM,mEAAmE,CAAC;AACpI,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAG7E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,yBAAyB,CAAC;IACpC,cAAc,EAAE,gCAAgC,CAAC;IACjD,SAAS,EAAE,uCAAuC,CAAC;IACnD,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;IAC7E,2BAA2B,CAAC,EAAE,0CAA0C,EAAE,CAAC;CAC5E;AAED;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B,OAAO;IAEP;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,mBAAmB,CACxB,cAAc,EAAE,gCAAgC,GAAG,SAAS,GAC3D,MAAM,EAAE;IAIX;;;;OAIG;IACH,MAAM,CAAC,yBAAyB,CAAC,CAAC,SAAS;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,EAC9D,MAAM,EAAE,SAAS,CAAC,EAAE,EACpB,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GAC1D,CAAC,EAAE;IAKN;;;;OAIG;IACH,MAAM,CAAC,iBAAiB,CAAC,CAAC,EACxB,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAC1C,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GAC1D,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC;IAI7B;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,gCAAgC;IAwC/C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,2BAA2B,CAChC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EACpD,gBAAgB,CAAC,EAAE,2BAA2B,GAC7C,SAAS,qBAAqB,EAAE;CAiFpC"}
|
|
@@ -25,6 +25,24 @@ export class ResourceLayoutUtils {
|
|
|
25
25
|
static detectSummaryFields(resourceConfig) {
|
|
26
26
|
return FrontendResourceUtils.detectSummaryFields(resourceConfig);
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The filter fields a READER may set, given the host's pins (#1630): a field the host pinned through
|
|
30
|
+
* `FrontendResourceOperationContext.pinnedFilters` is fixed on every fetch, so offering it in the panel would
|
|
31
|
+
* offer a choice that changes nothing. The one definition both collection layouts (LIST, SEARCH) use.
|
|
32
|
+
*/
|
|
33
|
+
static withoutPinnedFilterFields(fields, pinnedFilters) {
|
|
34
|
+
if (!pinnedFilters)
|
|
35
|
+
return [...fields];
|
|
36
|
+
return fields.filter((field) => !Object.prototype.hasOwnProperty.call(pinnedFilters, field.fieldName));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The filters a collection fetch sends: the reader's, then the host's pins on top (#1630). A pin wins over a
|
|
40
|
+
* reader's value for the same key, so an embed pinned to one record can never be widened to another. The one
|
|
41
|
+
* definition both collection layouts use, for SEARCH filters and LIST query parameters alike.
|
|
42
|
+
*/
|
|
43
|
+
static withPinnedFilters(readerFilters, pinnedFilters) {
|
|
44
|
+
return { ...readerFilters, ...(pinnedFilters ?? {}) };
|
|
45
|
+
}
|
|
28
46
|
/**
|
|
29
47
|
* Compute the set of filter-field names that the transport already pins for
|
|
30
48
|
* the given operation in the current context. See
|
|
@@ -97,6 +115,10 @@ export class ResourceLayoutUtils {
|
|
|
97
115
|
continue;
|
|
98
116
|
if (pinnedFieldNames?.has(fieldName))
|
|
99
117
|
continue;
|
|
118
|
+
// A raw primary key is a MACHINE filter — how the framework resolves one referenced record's
|
|
119
|
+
// label through a scoped search (#1661) — never something a person narrows a list by.
|
|
120
|
+
if (fieldName === '_id')
|
|
121
|
+
continue;
|
|
100
122
|
const schema = rawSchema;
|
|
101
123
|
const schemaType = getSchemaType(schema);
|
|
102
124
|
let fieldType = 'unknown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resourceLayout.utils.js","sourceRoot":"","sources":["../../../../../src/components/resources/resourceLayout.utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,EAGjC,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AAkCnG;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC9B,gBAAuB,CAAC;IAExB;;;;;;;;;;;;;OAaG;IACH,MAA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'@wildo-ai/zod-decorators';\nimport {\n PRIMARY_SCOPE_TO_FIELD_IDENTIFIER,\n type ResourceConfiguration_Operation_UrlInitiatorInfo,\n type ResourceType,\n isResourcesFilterNumberRangeSchema,\n} from '@wildo-ai/saas-models';\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResource_ParentResourceRequirement } from '~wildo-frontend-lib/core/resources/resource-path.frontend.schemas';\nimport type { FilterFieldDefinition } from './ResourceLayout_FiltersControl';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\n\n/**\n * Transport context for filter-field parsing.\n *\n * When provided, `parseFilterFieldDefinitions` derives two transport truths\n * that a bare `filterFields` record cannot express:\n *\n * 1. **Pinned fields** — fields whose value the transport already fixes for\n * this operation in the current context. A user-facing filter on a pinned\n * field is meaningless (the constraint applies before any filter could),\n * so pinned fields are excluded from the returned definitions. The pinned\n * set is the union of:\n * - parameters consumed by the URL route the transport will select\n * (computed via `FrontendResourceUtils.selectOperationUrlInitiatorInfo`\n * — the same deterministic selection the HTTP client performs), and\n * - the resource's primary-scope field identifier (backend authorization\n * scope-filters the collection by it regardless of route shape, so a\n * user-supplied value could never widen the result set).\n *\n * 2. **Reference fields** — string-typed filter fields whose name resolves to\n * a resource type through the registry's relationship-enriched\n * `fieldIdentifierToResourceType` map are foreign keys. They carry\n * `fieldType: 'reference'` plus the resolved target so the filter UI can\n * render a resource-reference selector instead of a raw ID text input.\n */\nexport interface FilterFieldTransportContext {\n registry: FrontendResourcesRegistry;\n resourceConfig: AnyFrontendResourceConfiguration;\n operation: FrontendResourceConfiguration_Operation;\n contextualParameters: Record<string, string | number | string[] | undefined>;\n parentResourcesRequirements?: FrontendResource_ParentResourceRequirement[];\n}\n\n/**\n * Static utility class for ResourceLayout non-component logic.\n * Centralises filter field parsing and summary field extraction used across\n * ResourceLayout_Search, ResourceLayout_List, ResourceLayout_List_Table, etc.\n */\nexport class ResourceLayoutUtils {\n private constructor() {}\n\n /**\n * Detect summary fields from resource configuration via `isSummaryField()` decorator scan.\n * Returns only explicitly annotated fields — no config overrides, no heuristic fallbacks.\n *\n * MOVED to {@link FrontendResourceUtils.detectSummaryFields} and delegated to from here.\n * The scan is no longer a layout concern alone: the record-label fallback\n * (`getResourceLabel`) needs the same answer, and it lives one layer down in\n * `frontend-resource.utils`, which this module already imports. Defining it there and\n * delegating up keeps ONE definition without an import cycle; a second copy would have\n * drifted the moment either set of exclusions changed.\n *\n * Kept as a member of this class because three layout call sites and a test address it by\n * this name, and the name is right for them.\n */\n static detectSummaryFields(\n resourceConfig: AnyFrontendResourceConfiguration | undefined,\n ): string[] {\n return FrontendResourceUtils.detectSummaryFields(resourceConfig);\n }\n\n /**\n * Compute the set of filter-field names that the transport already pins for\n * the given operation in the current context. See\n * {@link FilterFieldTransportContext} for the semantics of each component.\n *\n * Returns an empty set when the operation carries no URL surface (e.g.\n * non-URL variants) — primary-scope pinning still applies because backend\n * authorization enforces it independently of routing.\n */\n private static computeTransportPinnedFieldNames(\n context: FilterFieldTransportContext,\n ): Set<string> {\n const pinned = new Set<string>();\n\n // Primary-scope FK: always pinned. The backend injects the scope filter\n // from the authenticated execution context — a user-supplied filter value\n // either duplicates it or gets rejected; neither is a real filter.\n const primaryScope = context.resourceConfig.resourcePrimaryScope;\n const primaryScopeFieldIdentifier = primaryScope\n ? PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[primaryScope]\n : undefined;\n if (primaryScopeFieldIdentifier) {\n pinned.add(primaryScopeFieldIdentifier);\n }\n\n // URL-route parameters: pinned when the deterministically selected route\n // consumes them. Mirrors the HTTP client's selection exactly — both call\n // FrontendResourceUtils.selectOperationUrlInitiatorInfo.\n const initiatorInfos = ('initiatorInfos' in context.operation\n ? (context.operation as { initiatorInfos?: ResourceConfiguration_Operation_UrlInitiatorInfo[] }).initiatorInfos\n : undefined) ?? [];\n\n if (initiatorInfos.length > 0) {\n const selected = FrontendResourceUtils.selectOperationUrlInitiatorInfo({\n initiatorInfos,\n contextualParameters: context.contextualParameters,\n targetResourceType: context.resourceConfig.resourceIdentifier as ResourceType,\n targetDefaultFieldIdentifier: String(context.resourceConfig.resourceFieldIdentifier ?? ''),\n parentResourcesRequirements: context.parentResourcesRequirements,\n });\n\n for (const parameter of selected?.parameters ?? []) {\n pinned.add(parameter.fieldIdentifier);\n }\n }\n\n return pinned;\n }\n\n /**\n * Parse raw filterFields (Record) into FilterFieldDefinition[].\n * Used when reading directly from an operation object (LIST or SEARCH).\n * Skips function-typed entries (filter references) and maps each field's\n * Zod schema to a UI-friendly type.\n *\n * When `transportContext` is provided, the definitions are additionally:\n * - reduced to fields the user can actually act on (transport-pinned\n * fields are excluded — see {@link FilterFieldTransportContext}), and\n * - enriched with foreign-key classification (`fieldType: 'reference'` +\n * `referenceTargetResourceType`) so the filter UI renders reference\n * selectors for FK fields instead of raw ID inputs.\n *\n * Without `transportContext` the parse is purely structural (schema-type\n * mapping only) — callers that have no operation/registry at hand keep the\n * legacy behavior.\n */\n static parseFilterFieldDefinitions(\n rawFilterFields: Record<string, unknown> | undefined,\n transportContext?: FilterFieldTransportContext,\n ): readonly FilterFieldDefinition[] {\n if (!rawFilterFields || typeof rawFilterFields !== 'object') return [];\n\n const pinnedFieldNames = transportContext\n ? ResourceLayoutUtils.computeTransportPinnedFieldNames(transportContext)\n : undefined;\n\n const definitions: FilterFieldDefinition[] = [];\n\n for (const [fieldName, rawSchema] of Object.entries(rawFilterFields)) {\n if (typeof rawSchema === 'function') continue;\n if (!rawSchema || typeof rawSchema !== 'object') continue;\n if (pinnedFieldNames?.has(fieldName)) continue;\n\n const schema = rawSchema as z.ZodTypeAny;\n const schemaType = getSchemaType(schema);\n let fieldType: FilterFieldDefinition['fieldType'] = 'unknown';\n\n // The NUMERIC RANGE is recognised before the type switch, because `getSchemaType` sees an\n // object and answers with whatever it answers for objects. It is not a shape the switch\n // could classify anyway: the vocabulary is what identifies it, not the type of its members.\n if (isResourcesFilterNumberRangeSchema(schema)) {\n definitions.push({ fieldName, schema, fieldType: 'numberRange', enumValues: undefined, referenceTargetResourceType: undefined });\n continue;\n }\n let enumValues: readonly string[] | undefined;\n let referenceTargetResourceType: string | undefined;\n\n switch (schemaType) {\n case FieldSchemaType.STRING:\n fieldType = 'string';\n break;\n case FieldSchemaType.NUMBER:\n case FieldSchemaType.BIGDECIMAL:\n fieldType = 'number';\n break;\n case FieldSchemaType.BOOLEAN:\n fieldType = 'boolean';\n break;\n case FieldSchemaType.ENUM:\n fieldType = 'enum';\n try {\n enumValues = getEnumValues(unwrapSchema(schema));\n } catch {\n enumValues = [];\n }\n break;\n case FieldSchemaType.DATE:\n case FieldSchemaType.DATETIME:\n fieldType = 'date';\n break;\n default:\n fieldType = 'string';\n }\n\n // FK classification: a string filter whose field name resolves through\n // the relationship-enriched registry map IS a reference filter — the\n // value space is \"ids of the target resource\", not free text.\n if (fieldType === 'string' && transportContext) {\n const targetResourceType =\n transportContext.registry.fieldIdentifierToResourceType?.[fieldName];\n if (targetResourceType) {\n // A string filter whose field name resolves through the\n // relationship-enriched registry map IS a reference filter — the value\n // space is \"ids of the target resource\", not free text. The picker\n // searches the target (scope-required scoping is inferred at fetch time\n // from `registry.manyToManyScopeJunctions`; no surface declaration).\n fieldType = 'reference';\n referenceTargetResourceType = targetResourceType as string;\n }\n }\n\n definitions.push({ fieldName, schema, fieldType, enumValues, referenceTargetResourceType });\n }\n\n return definitions;\n }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"resourceLayout.utils.js","sourceRoot":"","sources":["../../../../../src/components/resources/resourceLayout.utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,iCAAiC,EAGjC,kCAAkC,GACnC,MAAM,uBAAuB,CAAC;AAQ/B,OAAO,EAAE,qBAA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E,SAAS,GAAG,QAAQ,CAAC;YACzB,CAAC;YAED,uEAAuE;YACvE,qEAAqE;YACrE,8DAA8D;YAC9D,IAAI,SAAS,KAAK,QAAQ,IAAI,gBAAgB,EAAE,CAAC;gBAC/C,MAAM,kBAAkB,GACtB,gBAAgB,CAAC,QAAQ,CAAC,6BAA6B,EAAE,CAAC,SAAS,CAAC,CAAC;gBACvE,IAAI,kBAAkB,EAAE,CAAC;oBACvB,wDAAwD;oBACxD,uEAAuE;oBACvE,mEAAmE;oBACnE,wEAAwE;oBACxE,qEAAqE;oBACrE,SAAS,GAAG,WAAW,CAAC;oBACxB,2BAA2B,GAAG,kBAA4B,CAAC;gBAC7D,CAAC;YACH,CAAC;YAED,WAAW,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,2BAA2B,EAAE,CAAC,CAAC;QAC9F,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CAEF","sourcesContent":["import { z } from 'zod';\nimport {\n getSchemaType,\n FieldSchemaType,\n getEnumValues,\n unwrapSchema,\n} from '@wildo-ai/zod-decorators';\nimport {\n PRIMARY_SCOPE_TO_FIELD_IDENTIFIER,\n type ResourceConfiguration_Operation_UrlInitiatorInfo,\n type ResourceType,\n isResourcesFilterNumberRangeSchema,\n} from '@wildo-ai/saas-models';\nimport type {\n AnyFrontendResourceConfiguration,\n FrontendResourceConfiguration_Operation,\n FrontendResourcesRegistry,\n} from '~wildo-frontend-lib/core/resources/resources.frontend.schemas';\nimport type { FrontendResource_ParentResourceRequirement } from '~wildo-frontend-lib/core/resources/resource-path.frontend.schemas';\nimport type { FilterFieldDefinition } from './ResourceLayout_FiltersControl';\nimport { FrontendResourceUtils } from '~wildo-frontend-lib/core/resources/frontend-resource.utils';\n\n/**\n * Transport context for filter-field parsing.\n *\n * When provided, `parseFilterFieldDefinitions` derives two transport truths\n * that a bare `filterFields` record cannot express:\n *\n * 1. **Pinned fields** — fields whose value the transport already fixes for\n * this operation in the current context. A user-facing filter on a pinned\n * field is meaningless (the constraint applies before any filter could),\n * so pinned fields are excluded from the returned definitions. The pinned\n * set is the union of:\n * - parameters consumed by the URL route the transport will select\n * (computed via `FrontendResourceUtils.selectOperationUrlInitiatorInfo`\n * — the same deterministic selection the HTTP client performs), and\n * - the resource's primary-scope field identifier (backend authorization\n * scope-filters the collection by it regardless of route shape, so a\n * user-supplied value could never widen the result set).\n *\n * 2. **Reference fields** — string-typed filter fields whose name resolves to\n * a resource type through the registry's relationship-enriched\n * `fieldIdentifierToResourceType` map are foreign keys. They carry\n * `fieldType: 'reference'` plus the resolved target so the filter UI can\n * render a resource-reference selector instead of a raw ID text input.\n */\nexport interface FilterFieldTransportContext {\n registry: FrontendResourcesRegistry;\n resourceConfig: AnyFrontendResourceConfiguration;\n operation: FrontendResourceConfiguration_Operation;\n contextualParameters: Record<string, string | number | string[] | undefined>;\n parentResourcesRequirements?: FrontendResource_ParentResourceRequirement[];\n}\n\n/**\n * Static utility class for ResourceLayout non-component logic.\n * Centralises filter field parsing and summary field extraction used across\n * ResourceLayout_Search, ResourceLayout_List, ResourceLayout_List_Table, etc.\n */\nexport class ResourceLayoutUtils {\n private constructor() {}\n\n /**\n * Detect summary fields from resource configuration via `isSummaryField()` decorator scan.\n * Returns only explicitly annotated fields — no config overrides, no heuristic fallbacks.\n *\n * MOVED to {@link FrontendResourceUtils.detectSummaryFields} and delegated to from here.\n * The scan is no longer a layout concern alone: the record-label fallback\n * (`getResourceLabel`) needs the same answer, and it lives one layer down in\n * `frontend-resource.utils`, which this module already imports. Defining it there and\n * delegating up keeps ONE definition without an import cycle; a second copy would have\n * drifted the moment either set of exclusions changed.\n *\n * Kept as a member of this class because three layout call sites and a test address it by\n * this name, and the name is right for them.\n */\n static detectSummaryFields(\n resourceConfig: AnyFrontendResourceConfiguration | undefined,\n ): string[] {\n return FrontendResourceUtils.detectSummaryFields(resourceConfig);\n }\n\n /**\n * The filter fields a READER may set, given the host's pins (#1630): a field the host pinned through\n * `FrontendResourceOperationContext.pinnedFilters` is fixed on every fetch, so offering it in the panel would\n * offer a choice that changes nothing. The one definition both collection layouts (LIST, SEARCH) use.\n */\n static withoutPinnedFilterFields<T extends { fieldName: string }>(\n fields: readonly T[],\n pinnedFilters: Readonly<Record<string, string>> | undefined,\n ): T[] {\n if (!pinnedFilters) return [...fields];\n return fields.filter((field) => !Object.prototype.hasOwnProperty.call(pinnedFilters, field.fieldName));\n }\n\n /**\n * The filters a collection fetch sends: the reader's, then the host's pins on top (#1630). A pin wins over a\n * reader's value for the same key, so an embed pinned to one record can never be widened to another. The one\n * definition both collection layouts use, for SEARCH filters and LIST query parameters alike.\n */\n static withPinnedFilters<V>(\n readerFilters: Readonly<Record<string, V>>,\n pinnedFilters: Readonly<Record<string, string>> | undefined,\n ): Record<string, V | string> {\n return { ...readerFilters, ...(pinnedFilters ?? {}) };\n }\n\n /**\n * Compute the set of filter-field names that the transport already pins for\n * the given operation in the current context. See\n * {@link FilterFieldTransportContext} for the semantics of each component.\n *\n * Returns an empty set when the operation carries no URL surface (e.g.\n * non-URL variants) — primary-scope pinning still applies because backend\n * authorization enforces it independently of routing.\n */\n private static computeTransportPinnedFieldNames(\n context: FilterFieldTransportContext,\n ): Set<string> {\n const pinned = new Set<string>();\n\n // Primary-scope FK: always pinned. The backend injects the scope filter\n // from the authenticated execution context — a user-supplied filter value\n // either duplicates it or gets rejected; neither is a real filter.\n const primaryScope = context.resourceConfig.resourcePrimaryScope;\n const primaryScopeFieldIdentifier = primaryScope\n ? PRIMARY_SCOPE_TO_FIELD_IDENTIFIER[primaryScope]\n : undefined;\n if (primaryScopeFieldIdentifier) {\n pinned.add(primaryScopeFieldIdentifier);\n }\n\n // URL-route parameters: pinned when the deterministically selected route\n // consumes them. Mirrors the HTTP client's selection exactly — both call\n // FrontendResourceUtils.selectOperationUrlInitiatorInfo.\n const initiatorInfos = ('initiatorInfos' in context.operation\n ? (context.operation as { initiatorInfos?: ResourceConfiguration_Operation_UrlInitiatorInfo[] }).initiatorInfos\n : undefined) ?? [];\n\n if (initiatorInfos.length > 0) {\n const selected = FrontendResourceUtils.selectOperationUrlInitiatorInfo({\n initiatorInfos,\n contextualParameters: context.contextualParameters,\n targetResourceType: context.resourceConfig.resourceIdentifier as ResourceType,\n targetDefaultFieldIdentifier: String(context.resourceConfig.resourceFieldIdentifier ?? ''),\n parentResourcesRequirements: context.parentResourcesRequirements,\n });\n\n for (const parameter of selected?.parameters ?? []) {\n pinned.add(parameter.fieldIdentifier);\n }\n }\n\n return pinned;\n }\n\n /**\n * Parse raw filterFields (Record) into FilterFieldDefinition[].\n * Used when reading directly from an operation object (LIST or SEARCH).\n * Skips function-typed entries (filter references) and maps each field's\n * Zod schema to a UI-friendly type.\n *\n * When `transportContext` is provided, the definitions are additionally:\n * - reduced to fields the user can actually act on (transport-pinned\n * fields are excluded — see {@link FilterFieldTransportContext}), and\n * - enriched with foreign-key classification (`fieldType: 'reference'` +\n * `referenceTargetResourceType`) so the filter UI renders reference\n * selectors for FK fields instead of raw ID inputs.\n *\n * Without `transportContext` the parse is purely structural (schema-type\n * mapping only) — callers that have no operation/registry at hand keep the\n * legacy behavior.\n */\n static parseFilterFieldDefinitions(\n rawFilterFields: Record<string, unknown> | undefined,\n transportContext?: FilterFieldTransportContext,\n ): readonly FilterFieldDefinition[] {\n if (!rawFilterFields || typeof rawFilterFields !== 'object') return [];\n\n const pinnedFieldNames = transportContext\n ? ResourceLayoutUtils.computeTransportPinnedFieldNames(transportContext)\n : undefined;\n\n const definitions: FilterFieldDefinition[] = [];\n\n for (const [fieldName, rawSchema] of Object.entries(rawFilterFields)) {\n if (typeof rawSchema === 'function') continue;\n if (!rawSchema || typeof rawSchema !== 'object') continue;\n if (pinnedFieldNames?.has(fieldName)) continue;\n // A raw primary key is a MACHINE filter — how the framework resolves one referenced record's\n // label through a scoped search (#1661) — never something a person narrows a list by.\n if (fieldName === '_id') continue;\n\n const schema = rawSchema as z.ZodTypeAny;\n const schemaType = getSchemaType(schema);\n let fieldType: FilterFieldDefinition['fieldType'] = 'unknown';\n\n // The NUMERIC RANGE is recognised before the type switch, because `getSchemaType` sees an\n // object and answers with whatever it answers for objects. It is not a shape the switch\n // could classify anyway: the vocabulary is what identifies it, not the type of its members.\n if (isResourcesFilterNumberRangeSchema(schema)) {\n definitions.push({ fieldName, schema, fieldType: 'numberRange', enumValues: undefined, referenceTargetResourceType: undefined });\n continue;\n }\n let enumValues: readonly string[] | undefined;\n let referenceTargetResourceType: string | undefined;\n\n switch (schemaType) {\n case FieldSchemaType.STRING:\n fieldType = 'string';\n break;\n case FieldSchemaType.NUMBER:\n case FieldSchemaType.BIGDECIMAL:\n fieldType = 'number';\n break;\n case FieldSchemaType.BOOLEAN:\n fieldType = 'boolean';\n break;\n case FieldSchemaType.ENUM:\n fieldType = 'enum';\n try {\n enumValues = getEnumValues(unwrapSchema(schema));\n } catch {\n enumValues = [];\n }\n break;\n case FieldSchemaType.DATE:\n case FieldSchemaType.DATETIME:\n fieldType = 'date';\n break;\n default:\n fieldType = 'string';\n }\n\n // FK classification: a string filter whose field name resolves through\n // the relationship-enriched registry map IS a reference filter — the\n // value space is \"ids of the target resource\", not free text.\n if (fieldType === 'string' && transportContext) {\n const targetResourceType =\n transportContext.registry.fieldIdentifierToResourceType?.[fieldName];\n if (targetResourceType) {\n // A string filter whose field name resolves through the\n // relationship-enriched registry map IS a reference filter — the value\n // space is \"ids of the target resource\", not free text. The picker\n // searches the target (scope-required scoping is inferred at fetch time\n // from `registry.manyToManyScopeJunctions`; no surface declaration).\n fieldType = 'reference';\n referenceTargetResourceType = targetResourceType as string;\n }\n }\n\n definitions.push({ fieldName, schema, fieldType, enumValues, referenceTargetResourceType });\n }\n\n return definitions;\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ArrayField.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ArrayField.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS9C,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,eAAe,GAAG,SAAS,CAyD7B"}
|
|
@@ -7,6 +7,7 @@ import { Button, ButtonVariants_Variant } from '../../../components/actions/butt
|
|
|
7
7
|
import { useI18n } from '../../../core/i18n/useI18n.js';
|
|
8
8
|
import { FieldScopeProvider, useResolvedFieldName } from './FieldScopeContext.js';
|
|
9
9
|
import { ArrayItemTemplate } from './ArrayItemTemplate.js';
|
|
10
|
+
import { declarePlacesNamedField } from '../../form/automated/TemplatePlacedFieldsContext.js';
|
|
10
11
|
/**
|
|
11
12
|
* Array container for array-of-object fields.
|
|
12
13
|
*
|
|
@@ -66,4 +67,6 @@ function findItemTemplate(children) {
|
|
|
66
67
|
});
|
|
67
68
|
return template;
|
|
68
69
|
}
|
|
70
|
+
// Edits the field named by `name` without being a `FormField` slot, and has no item slots while empty.
|
|
71
|
+
declarePlacesNamedField(ArrayField);
|
|
69
72
|
//# sourceMappingURL=ArrayField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayField.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ArrayField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayField.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ArrayField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAsB3F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI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,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,GACpC,EACpB,SAAS,IAAI,CACZ,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,sBAAsB,CAAC,KAAK,EACrC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAC5B,SAAS,EAAC,MAAM,YAEf,WAAW;+BACP,UAAU,CAAC,qBAAqB,CAAC,sBAAsB,EAAE,iBAAiB,EAAE;gCAC7E,KAAK,EAAE,GAAG,aAAa,IAAI,KAAK,GAAG,CAAC,EAAE;6BACvC,CAAC,GACG,CACV,KAhBO,KAAK,CAAC,EAAE,CAiBZ,CACP,CAAC,EAED,MAAM,IAAI,CACT,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,sBAAsB,CAAC,OAAO,EACvC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EACzB,SAAS,EAAC,MAAM,YAEf,iBAAiB,GACX,CACV,IACG,CACP,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,QAAmB;IAC3C,IAAI,QAAQ,GAA8B,IAAI,CAAC;IAC/C,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QACzC,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACjF,QAAQ,GAAG,KAAK,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,uGAAuG;AACvG,uBAAuB,CAAC,UAAU,CAAC,CAAC","sourcesContent":["'use client';\n\nimport React, { type ReactNode } from 'react';\nimport { useFieldArray, useFormContext } from 'react-hook-form';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { FieldScopeProvider, useResolvedFieldName } from './FieldScopeContext';\nimport { ArrayItemTemplate } from './ArrayItemTemplate';\nimport { declarePlacesNamedField } from '../../form/automated/TemplatePlacedFieldsContext';\n\nexport interface ArrayFieldProps {\n /**\n * Name of the array field in the parent schema.\n * The component iterates over items and renders `<ArrayItemTemplate>`\n * children for each item, with scoped field names.\n */\n name: string;\n /** Additional CSS classes for the array container. */\n className?: string;\n /** Label for the \"Add\" button. Falls back to i18n default. */\n addLabel?: string;\n /** Label for each \"Remove\" button. Falls back to i18n default. */\n removeLabel?: string;\n /** Minimum number of items (disables remove when at minimum). */\n minItems?: number;\n /** Maximum number of items (disables add when at maximum). */\n maxItems?: number;\n children: ReactNode;\n}\n\n/**\n * Array container for array-of-object fields.\n *\n * Iterates over current items (from RHF field array state),\n * rendering `<ArrayItemTemplate>` children for each item with\n * a scoped `FieldScopeContext` (`\"{name}.{index}\"`).\n *\n * Provides add/remove infrastructure. For arrays of primitives\n * (e.g., `z.array(z.string())`), use `<FormField name=\"tags\" />`\n * directly — no `<ArrayField>` needed.\n *\n * @example\n * ```tsx\n * <ArrayField name=\"addresses\" className=\"space-y-4\">\n * <ArrayItemTemplate>\n * <div className=\"grid grid-cols-2 gap-4\">\n * <FormField name=\"street\" className=\"col-span-2\" />\n * <FormField name=\"city\" />\n * <FormField name=\"zipCode\" />\n * </div>\n * </ArrayItemTemplate>\n * </ArrayField>\n * ```\n */\nexport function ArrayField({\n name,\n className,\n addLabel,\n removeLabel,\n minItems,\n maxItems,\n children,\n}: ArrayFieldProps): ReactNode {\n const resolvedName = useResolvedFieldName(name);\n const { control } = useFormContext();\n const { fields, append, remove } = useFieldArray({ control, name: resolvedName });\n\n const { tComponent, isReady } = useI18n({\n component: FrontendComponentType.LOW_LEVEL_FORM_MESSAGE,\n });\n\n if (!isReady) return null;\n\n const itemTemplate = findItemTemplate(children);\n\n const canAdd = maxItems === undefined || fields.length < maxItems;\n const canRemove = minItems === undefined || fields.length > minItems;\n\n // Shared LOW_LEVEL_FORM_MESSAGE vocabulary with the automated AutomatedArrayField —\n // one key per concept (arrayAddItem / arrayItemLabel / arrayRemoveItem), so\n // handwritten and generated array UIs stay wording-consistent.\n const effectiveAddLabel = addLabel ?? tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'arrayAddItem');\n const itemBaseLabel = tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'arrayItemLabel');\n\n return (\n <div className={className} data-guidance-array={name}>\n {fields.map((field, index) => (\n <div key={field.id} className=\"relative\" data-guidance-array-item={index}>\n <FieldScopeProvider pathPrefix={`${resolvedName}[${index}]`}>\n {itemTemplate ? React.cloneElement(itemTemplate) : null}\n </FieldScopeProvider>\n {canRemove && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n onClick={() => remove(index)}\n className=\"mt-1\"\n >\n {removeLabel\n ?? tComponent(FrontendComponentType.LOW_LEVEL_FORM_MESSAGE, 'arrayRemoveItem', {\n label: `${itemBaseLabel} ${index + 1}`,\n })}\n </Button>\n )}\n </div>\n ))}\n\n {canAdd && (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.OUTLINE}\n onClick={() => append({})}\n className=\"mt-2\"\n >\n {effectiveAddLabel}\n </Button>\n )}\n </div>\n );\n}\n\n/**\n * Extracts the first `<ArrayItemTemplate>` from children.\n * This is the template that gets cloned for each array item.\n */\nfunction findItemTemplate(children: ReactNode): React.ReactElement | null {\n let template: React.ReactElement | null = null;\n React.Children.forEach(children, (child) => {\n if (!template && React.isValidElement(child) && child.type === ArrayItemTemplate) {\n template = child;\n }\n });\n return template;\n}\n\n// Edits the field named by `name` without being a `FormField` slot, and has no item slots while empty.\ndeclarePlacesNamedField(ArrayField);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"AAGA,OAAc,EAA2D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAyB9E,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C;;;;;;;;;;;;OAYG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAAE,mBAAmB,EACvC,sBAA6B,EAC7B,kBAA8B,GAC/B,EAAE,eAAe,GAAG,SAAS,CA2F7B"}
|
|
@@ -13,6 +13,9 @@ import { useOptionalResourceFormActions } from '../../form/automated/ResourceFor
|
|
|
13
13
|
import { ContentSectionContainer } from '../../sections/ContentSectionContainer.js';
|
|
14
14
|
import { groupSectionsByAppearance, buildSectionConfigFromGroup, } from './section-consolidation.utils.js';
|
|
15
15
|
import { GroupedSectionBody } from './Section.js';
|
|
16
|
+
import { listPlacedFieldSlots } from './SectionFieldsContext.js';
|
|
17
|
+
import { useTemplatePlacedFieldsOf } from '../../form/automated/TemplatePlacedFieldsContext.js';
|
|
18
|
+
import { AutomatedLayoutFrontendUtils } from '../../../core/automated-layout/automated-layout.frontend.utils.js';
|
|
16
19
|
import { GroupedSectionHostKind } from './Section.shared.js';
|
|
17
20
|
/**
|
|
18
21
|
* Root wrapper for edit layout templates.
|
|
@@ -76,9 +79,33 @@ export function FormLayout({ className, children, contextFieldValues: _contextFi
|
|
|
76
79
|
return () => cancelAnimationFrame(frame);
|
|
77
80
|
}, [autoInjectSubmitButton, hostOwnsSubmitRow]);
|
|
78
81
|
const formCtx = useOptionalFormTemplateContext();
|
|
82
|
+
// Every slot among this layout's children, read from the elements: a tab's panel, a later wizard step
|
|
83
|
+
// or an unchosen variant is not mounted, so its fields cannot report themselves (see
|
|
84
|
+
// `TemplatePlacedFieldsContext`). From an empty prefix: this layout resets its children's scope to "".
|
|
85
|
+
useTemplatePlacedFieldsOf(children, '');
|
|
79
86
|
const renderedChildren = useMemo(() => renderGroupedChildren(children, formCtx), [children, formCtx]);
|
|
80
87
|
return (_jsx(FormLayoutSlotContext.Provider, { value: slotContextValue, children: _jsx(FieldScopeProvider, { pathPrefix: "", children: _jsx("div", { className: cn('mr-auto w-full', className), style: { maxInlineSize: responsiveMaxWidthToCssValue(responsiveMaxWidth) }, "data-inline-size-tier": responsiveMaxWidth, "data-guidance-form": "", children: _jsxs(ErrorBoundary, { children: [autoSlots.errorSummary ? _jsx(FormErrorSummarySlot, { className: "mb-4" }) : null, _jsx("div", { className: "space-y-section [&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0", children: renderedChildren }), autoSlots.submitButton ? _jsx(SubmitButton, { className: "mt-6" }) : null] }) }) }) }));
|
|
81
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Whether a GROUPED section (grid, tabs, accordion, …) has nothing to show for this form's operation.
|
|
91
|
+
*
|
|
92
|
+
* One template serves several operations, and a `FormField` whose field the operation's schema lacks
|
|
93
|
+
* renders nothing. A solo `Section` hides itself from what its fields report once mounted; a grouped
|
|
94
|
+
* section cannot, because its container draws its title and panel and a tab's panel is not even mounted
|
|
95
|
+
* until it is chosen. So the host decides from the section's elements: when they are only field slots
|
|
96
|
+
* (`listPlacedFieldSlots`) and none of their paths resolves in the form's schema, the section is dropped.
|
|
97
|
+
*
|
|
98
|
+
* This reads the SCHEMA, not visibility: a field hidden by a condition is still in the schema, so its
|
|
99
|
+
* section stays. Dropping a section there would take it out of its container on a value change.
|
|
100
|
+
*/
|
|
101
|
+
function groupedSectionShowsNoField(children, schema) {
|
|
102
|
+
if (!schema)
|
|
103
|
+
return false;
|
|
104
|
+
const placed = listPlacedFieldSlots(children);
|
|
105
|
+
return placed !== null
|
|
106
|
+
&& placed.length > 0
|
|
107
|
+
&& placed.every((slot) => !slot.hasOwnSchema && AutomatedLayoutFrontendUtils.resolveFieldSchemaPath(schema, slot.path) === undefined);
|
|
108
|
+
}
|
|
82
109
|
/**
|
|
83
110
|
* Introspects children for `<Section>` elements with container-mode `appearance`.
|
|
84
111
|
* Groups sections sharing the same container mode into a `ContentSectionContainer`.
|
|
@@ -90,7 +117,12 @@ function renderGroupedChildren(children, formCtx) {
|
|
|
90
117
|
if (item.type === 'node') {
|
|
91
118
|
return _jsx(React.Fragment, { children: item.node }, idx);
|
|
92
119
|
}
|
|
93
|
-
|
|
120
|
+
// A grouped section none of whose fields this operation has is dropped from its container, and a
|
|
121
|
+
// container left with no section renders nothing (see `groupedSectionShowsNoField`).
|
|
122
|
+
const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(el.props.children, formCtx?.schema));
|
|
123
|
+
if (shownSections.length === 0)
|
|
124
|
+
return null;
|
|
125
|
+
const group = { ...item.group, sections: shownSections };
|
|
94
126
|
const config = buildSectionConfigFromGroup(group);
|
|
95
127
|
const sectionLabels = formCtx?.sectionLabels ?? {};
|
|
96
128
|
const sectionDescriptions = formCtx?.sectionDescriptions ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLayout.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,E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aAAa,GAAG,OAAO,EAAE,aAAa,IAAI,EAAE,CAAC;YACnD,MAAM,mBAAmB,GAAG,OAAO,EAAE,mBAAmB,IAAI,EAAE,CAAC;YAE/D,MAAM,eAAe,GAA+B,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC9E,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI;gBACjB,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;gBACnC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC/C,OAAO,EAAE,CACP,KAAC,qBAAqB,IACpB,YAAY,EAAE,EAAE,CAAC,KAAK,EACtB,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAC/C,CACH;aACF,CAAC,CAAC,CAAC;YAEJ,OAAO,CACL,KAAC,uBAAuB,IAEtB,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,MAAM,IAFT,SAAS,KAAK,CAAC,IAAI,IAAI,GAAG,EAAE,CAGjC,CACH,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,EAC7B,YAAY,EACZ,eAAe,GAIhB;IACC,OAAO,CACL,KAAC,kBAAkB,IACjB,QAAQ,EAAE,sBAAsB,CAAC,IAAI,EACrC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { responsiveMaxWidthToCssValue } from '../../sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { ErrorBoundary } from '~wildo-frontend-lib/core/errors/ErrorBoundary';\nimport { FieldScopeProvider } from './FieldScopeContext';\nimport {\n FormLayoutSlotContext,\n type FormLayoutSlotType,\n} from './FormLayoutSlotContext';\nimport { FormErrorSummarySlot } from './FormErrorSummarySlot';\nimport { SubmitButton } from './SubmitButton';\nimport { useOptionalFormTemplateContext } from '../../form/automated/FormTemplateContext';\nimport { useOptionalResourceFormActions } from '../../form/automated/ResourceFormActionsContext';\nimport { ContentSectionContainer } from '../../sections/ContentSectionContainer';\nimport type { ContentSectionDescriptor } from '../../sections/ContentSectionContainer';\nimport {\n groupSectionsByAppearance,\n buildSectionConfigFromGroup,\n} from './section-consolidation.utils';\nimport { GroupedSectionBody, type SectionProps } from './Section';\nimport { GroupedSectionHostKind } from './Section.shared';\n\nexport interface FormLayoutProps {\n /** Additional CSS classes for the root container. */\n className?: string;\n /**\n * How wide the form column lets its content grow, named in the framework's own vocabulary.\n *\n * Defaults to `'measure'` — the reading-measure cap (~42rem, themeable via `--measure-max-width`)\n * that keeps a single-column form readable rather than stretched edge to edge. That default is the\n * long-standing behaviour and is what almost every form wants.\n *\n * The prop exists so the tier is REACHABLE. It was previously a literal Tailwind class spelling the\n * same value the `'measure'` tier already names, which meant a host could not select a different one\n * — see {@link DisplayLayout}'s twin, where a composed template needed `'none'` and had no way to\n * ask for it.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n /**\n * Context field values to inject into form state.\n * Fields present here are hidden from rendering but populate\n * the form state for validation and submission (e.g., parent IDs).\n */\n contextFieldValues?: Record<string, unknown>;\n /**\n * When `false`, suppresses automatic `<SubmitButton>` injection even if no\n * submit slot is registered by children. The generated-template path sets\n * this via `generateDefaultFormTemplate({ includeSubmitButton: false })`.\n *\n * Note: under `ResourceAutomatedForm`, suppression is automatic regardless\n * of this prop — the host provides `ResourceFormActionsContext` and renders\n * its own operation-aware submit row after the template, so developer-\n * authored templates can use a bare `<FormLayout>` without ending up with\n * two submit buttons. This prop only matters for standalone usage\n * (direct `AutomatedForm` callers outside a resource form host).\n * @default true\n */\n autoInjectSubmitButton?: boolean;\n children?: ReactNode;\n}\n\ninterface AutoSlotsState {\n errorSummary: boolean;\n submitButton: boolean;\n}\n\n/**\n * Root wrapper for edit layout templates.\n *\n * Renders inside `<Form>` (RHF provider). Handles:\n * - Root `FieldScopeContext` with empty prefix\n * - Slot auto-detection: default error summary / submit when omitted (DT-6); no default submit under wizard,\n * nor when a resource-form host owns the submit row (`ResourceFormActionsContext` present —\n * `ResourceAutomatedForm` appends its operation-aware buttons after the template)\n * - Guidance marker for automated testing (DT-9)\n *\n * TODO(F-10): AutoFocus resolution — scan children for first focusable FormField and call focus().\n * Note: `contextFieldValues` are injected upstream by `AutomatedForm`; generated\n * templates hide those fields before rendering, while handwritten templates can\n * still opt into custom treatment when needed.\n *\n * @example\n * ```tsx\n * <FormLayout>\n * <Section name=\"general\">\n * <FormField name=\"title\" />\n * </Section>\n * <SubmitButton />\n * </FormLayout>\n * ```\n */\nexport function FormLayout({\n className,\n children,\n contextFieldValues: _contextFieldValues,\n autoInjectSubmitButton = true,\n responsiveMaxWidth = 'measure',\n}: FormLayoutProps): ReactNode {\n const registeredSlots = useRef(new Set<FormLayoutSlotType>());\n const wizardRootRegistered = useRef(false);\n const [autoSlots, setAutoSlots] = useState<AutoSlotsState>({\n errorSummary: false,\n submitButton: false,\n });\n\n // A non-null ResourceFormActionsContext means a resource-form host\n // (ResourceAutomatedForm) renders its own operation-aware submit row after\n // the template — auto-injecting a generic SubmitButton here would produce a\n // second submit button. Explicit templates authored app-side use a bare\n // <FormLayout>, so this suppression cannot be a prop on the call site.\n const hostOwnsSubmitRow = useOptionalResourceFormActions() !== null;\n\n const registerSlot = useCallback((slot: FormLayoutSlotType) => {\n registeredSlots.current.add(slot);\n }, []);\n\n const registerWizardRoot = useCallback(() => {\n wizardRootRegistered.current = true;\n }, []);\n\n const slotContextValue = useMemo(\n () => ({ registerSlot, registerWizardRoot }),\n [registerSlot, registerWizardRoot],\n );\n\n // After children mount and register their slots, detect missing ones (next frame so layout effects have run).\n useLayoutEffect(() => {\n const frame = requestAnimationFrame(() => {\n const missing: AutoSlotsState = {\n errorSummary: !registeredSlots.current.has('errorSummary'),\n submitButton:\n autoInjectSubmitButton &&\n !hostOwnsSubmitRow &&\n !wizardRootRegistered.current &&\n !registeredSlots.current.has('submitButton'),\n };\n if (missing.errorSummary || missing.submitButton) {\n setAutoSlots(missing);\n }\n });\n return () => cancelAnimationFrame(frame);\n }, [autoInjectSubmitButton, hostOwnsSubmitRow]);\n\n const formCtx = useOptionalFormTemplateContext();\n const renderedChildren = useMemo(\n () => renderGroupedChildren(children, formCtx),\n [children, formCtx],\n );\n\n return (\n <FormLayoutSlotContext.Provider value={slotContextValue}>\n <FieldScopeProvider pathPrefix=\"\">\n {/*\n T4c — reading-measure cap. A single-column form column caps at\n `--measure-max-width` (~42rem) and aligns to the LEFT of the content\n zone, so detail/settings forms stop stretching edge-to-edge while\n staying flush with the left-aligned resource header (no centred\n gutter). `max-w` only engages when the container is wider than the\n measure, so a form inside a narrow dialog / panel is unaffected.\n Retune/opt-out via the CSS var or by overriding `className`.\n */}\n <div\n className={cn('mr-auto w-full', className)}\n style={{ maxInlineSize: responsiveMaxWidthToCssValue(responsiveMaxWidth) }}\n data-inline-size-tier={responsiveMaxWidth}\n data-guidance-form=\"\"\n >\n <ErrorBoundary>\n {autoSlots.errorSummary ? <FormErrorSummarySlot className=\"mb-4\" /> : null}\n {/* `space-y-section` separates stacked SECTIONS with a clear gap (see\n DisplayLayout for the rationale). Wrapped separately from the\n error-summary / submit slots so it never compounds their own\n margins. Bare SETTINGS_ROW field rows are self-delimiting list\n items (`py-card-sm` + `border-b`), so consecutive rows stack\n FLUSH — same pairwise rule as DisplayLayout (see its comment for\n why the attribute match must be `^=settings`, never the\n underscore-carrying `=settings_row`). */}\n <div className=\"space-y-section [&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0\">{renderedChildren}</div>\n {autoSlots.submitButton ? <SubmitButton className=\"mt-6\" /> : null}\n </ErrorBoundary>\n </div>\n </FieldScopeProvider>\n </FormLayoutSlotContext.Provider>\n );\n}\n\n/**\n * Introspects children for `<Section>` elements with container-mode `appearance`.\n * Groups sections sharing the same container mode into a `ContentSectionContainer`.\n * Solo-mode sections and non-Section children render in place.\n */\nfunction renderGroupedChildren(\n children: ReactNode,\n formCtx: ReturnType<typeof useOptionalFormTemplateContext>,\n): ReactNode {\n const grouped = groupSectionsByAppearance(children);\n\n return (\n <>\n {grouped.items.map((item, idx) => {\n if (item.type === 'node') {\n return <React.Fragment key={idx}>{item.node}</React.Fragment>;\n }\n\n const { group } = item;\n const config = buildSectionConfigFromGroup(group);\n const sectionLabels = formCtx?.sectionLabels ?? {};\n const sectionDescriptions = formCtx?.sectionDescriptions ?? {};\n\n const contentSections: ContentSectionDescriptor[] = group.sections.map((el) => ({\n id: el.props.name,\n title: sectionLabels[el.props.name],\n description: sectionDescriptions[el.props.name],\n content: (\n <GroupedSectionContent\n sectionProps={el.props}\n providesHeading={!!sectionLabels[el.props.name]}\n />\n ),\n }));\n\n return (\n <ContentSectionContainer\n key={`group-${group.mode}-${idx}`}\n sections={contentSections}\n config={config}\n />\n );\n })}\n </>\n );\n}\n\n/**\n * Wraps an individual grouped section's content with section-level behaviors\n * (chromeMode, saveable) when rendered inside a container.\n */\nfunction GroupedSectionContent({\n sectionProps,\n providesHeading,\n}: {\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'saveable' | 'className' | 'disabled'>;\n providesHeading?: boolean;\n}): ReactNode {\n return (\n <GroupedSectionBody\n hostKind={GroupedSectionHostKind.FORM}\n sectionProps={sectionProps}\n providesHeading={providesHeading}\n />\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FormLayout.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/FormLayout.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,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;gBAC9E,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI;gBACjB,KAAK,EAAE,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;gBACnC,WAAW,EAAE,mBAAmB,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;gBAC/C,OAAO,EAAE,CACP,KAAC,qBAAqB,IACpB,YAAY,EAAE,EAAE,CAAC,KAAK,EACtB,eAAe,EAAE,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAC/C,CACH;aACF,CAAC,CAAC,CAAC;YAEJ,OAAO,CACL,KAAC,uBAAuB,IAEtB,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,MAAM,IAFT,SAAS,KAAK,CAAC,IAAI,IAAI,GAAG,EAAE,CAGjC,CACH,CAAC;QACJ,CAAC,CAAC,GACD,CACJ,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,EAC7B,YAAY,EACZ,eAAe,GAIhB;IACC,OAAO,CACL,KAAC,kBAAkB,IACjB,QAAQ,EAAE,sBAAsB,CAAC,IAAI,EACrC,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport type { z } from 'zod';\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react';\nimport type { ResponsiveMaxWidth } from '@wildo-ai/presets-components-models';\nimport { responsiveMaxWidthToCssValue } from '../../sections/surface';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { ErrorBoundary } from '~wildo-frontend-lib/core/errors/ErrorBoundary';\nimport { FieldScopeProvider } from './FieldScopeContext';\nimport {\n FormLayoutSlotContext,\n type FormLayoutSlotType,\n} from './FormLayoutSlotContext';\nimport { FormErrorSummarySlot } from './FormErrorSummarySlot';\nimport { SubmitButton } from './SubmitButton';\nimport { useOptionalFormTemplateContext } from '../../form/automated/FormTemplateContext';\nimport { useOptionalResourceFormActions } from '../../form/automated/ResourceFormActionsContext';\nimport { ContentSectionContainer } from '../../sections/ContentSectionContainer';\nimport type { ContentSectionDescriptor } from '../../sections/ContentSectionContainer';\nimport {\n groupSectionsByAppearance,\n buildSectionConfigFromGroup,\n} from './section-consolidation.utils';\nimport { GroupedSectionBody, type SectionProps } from './Section';\nimport { listPlacedFieldSlots } from './SectionFieldsContext';\nimport { useTemplatePlacedFieldsOf } from '../../form/automated/TemplatePlacedFieldsContext';\nimport { AutomatedLayoutFrontendUtils } from '~wildo-frontend-lib/core/automated-layout/automated-layout.frontend.utils';\nimport { GroupedSectionHostKind } from './Section.shared';\n\nexport interface FormLayoutProps {\n /** Additional CSS classes for the root container. */\n className?: string;\n /**\n * How wide the form column lets its content grow, named in the framework's own vocabulary.\n *\n * Defaults to `'measure'` — the reading-measure cap (~42rem, themeable via `--measure-max-width`)\n * that keeps a single-column form readable rather than stretched edge to edge. That default is the\n * long-standing behaviour and is what almost every form wants.\n *\n * The prop exists so the tier is REACHABLE. It was previously a literal Tailwind class spelling the\n * same value the `'measure'` tier already names, which meant a host could not select a different one\n * — see {@link DisplayLayout}'s twin, where a composed template needed `'none'` and had no way to\n * ask for it.\n */\n responsiveMaxWidth?: ResponsiveMaxWidth;\n /**\n * Context field values to inject into form state.\n * Fields present here are hidden from rendering but populate\n * the form state for validation and submission (e.g., parent IDs).\n */\n contextFieldValues?: Record<string, unknown>;\n /**\n * When `false`, suppresses automatic `<SubmitButton>` injection even if no\n * submit slot is registered by children. The generated-template path sets\n * this via `generateDefaultFormTemplate({ includeSubmitButton: false })`.\n *\n * Note: under `ResourceAutomatedForm`, suppression is automatic regardless\n * of this prop — the host provides `ResourceFormActionsContext` and renders\n * its own operation-aware submit row after the template, so developer-\n * authored templates can use a bare `<FormLayout>` without ending up with\n * two submit buttons. This prop only matters for standalone usage\n * (direct `AutomatedForm` callers outside a resource form host).\n * @default true\n */\n autoInjectSubmitButton?: boolean;\n children?: ReactNode;\n}\n\ninterface AutoSlotsState {\n errorSummary: boolean;\n submitButton: boolean;\n}\n\n/**\n * Root wrapper for edit layout templates.\n *\n * Renders inside `<Form>` (RHF provider). Handles:\n * - Root `FieldScopeContext` with empty prefix\n * - Slot auto-detection: default error summary / submit when omitted (DT-6); no default submit under wizard,\n * nor when a resource-form host owns the submit row (`ResourceFormActionsContext` present —\n * `ResourceAutomatedForm` appends its operation-aware buttons after the template)\n * - Guidance marker for automated testing (DT-9)\n *\n * TODO(F-10): AutoFocus resolution — scan children for first focusable FormField and call focus().\n * Note: `contextFieldValues` are injected upstream by `AutomatedForm`; generated\n * templates hide those fields before rendering, while handwritten templates can\n * still opt into custom treatment when needed.\n *\n * @example\n * ```tsx\n * <FormLayout>\n * <Section name=\"general\">\n * <FormField name=\"title\" />\n * </Section>\n * <SubmitButton />\n * </FormLayout>\n * ```\n */\nexport function FormLayout({\n className,\n children,\n contextFieldValues: _contextFieldValues,\n autoInjectSubmitButton = true,\n responsiveMaxWidth = 'measure',\n}: FormLayoutProps): ReactNode {\n const registeredSlots = useRef(new Set<FormLayoutSlotType>());\n const wizardRootRegistered = useRef(false);\n const [autoSlots, setAutoSlots] = useState<AutoSlotsState>({\n errorSummary: false,\n submitButton: false,\n });\n\n // A non-null ResourceFormActionsContext means a resource-form host\n // (ResourceAutomatedForm) renders its own operation-aware submit row after\n // the template — auto-injecting a generic SubmitButton here would produce a\n // second submit button. Explicit templates authored app-side use a bare\n // <FormLayout>, so this suppression cannot be a prop on the call site.\n const hostOwnsSubmitRow = useOptionalResourceFormActions() !== null;\n\n const registerSlot = useCallback((slot: FormLayoutSlotType) => {\n registeredSlots.current.add(slot);\n }, []);\n\n const registerWizardRoot = useCallback(() => {\n wizardRootRegistered.current = true;\n }, []);\n\n const slotContextValue = useMemo(\n () => ({ registerSlot, registerWizardRoot }),\n [registerSlot, registerWizardRoot],\n );\n\n // After children mount and register their slots, detect missing ones (next frame so layout effects have run).\n useLayoutEffect(() => {\n const frame = requestAnimationFrame(() => {\n const missing: AutoSlotsState = {\n errorSummary: !registeredSlots.current.has('errorSummary'),\n submitButton:\n autoInjectSubmitButton &&\n !hostOwnsSubmitRow &&\n !wizardRootRegistered.current &&\n !registeredSlots.current.has('submitButton'),\n };\n if (missing.errorSummary || missing.submitButton) {\n setAutoSlots(missing);\n }\n });\n return () => cancelAnimationFrame(frame);\n }, [autoInjectSubmitButton, hostOwnsSubmitRow]);\n\n const formCtx = useOptionalFormTemplateContext();\n // Every slot among this layout's children, read from the elements: a tab's panel, a later wizard step\n // or an unchosen variant is not mounted, so its fields cannot report themselves (see\n // `TemplatePlacedFieldsContext`). From an empty prefix: this layout resets its children's scope to \"\".\n useTemplatePlacedFieldsOf(children, '');\n const renderedChildren = useMemo(\n () => renderGroupedChildren(children, formCtx),\n [children, formCtx],\n );\n\n return (\n <FormLayoutSlotContext.Provider value={slotContextValue}>\n <FieldScopeProvider pathPrefix=\"\">\n {/*\n T4c — reading-measure cap. A single-column form column caps at\n `--measure-max-width` (~42rem) and aligns to the LEFT of the content\n zone, so detail/settings forms stop stretching edge-to-edge while\n staying flush with the left-aligned resource header (no centred\n gutter). `max-w` only engages when the container is wider than the\n measure, so a form inside a narrow dialog / panel is unaffected.\n Retune/opt-out via the CSS var or by overriding `className`.\n */}\n <div\n className={cn('mr-auto w-full', className)}\n style={{ maxInlineSize: responsiveMaxWidthToCssValue(responsiveMaxWidth) }}\n data-inline-size-tier={responsiveMaxWidth}\n data-guidance-form=\"\"\n >\n <ErrorBoundary>\n {autoSlots.errorSummary ? <FormErrorSummarySlot className=\"mb-4\" /> : null}\n {/* `space-y-section` separates stacked SECTIONS with a clear gap (see\n DisplayLayout for the rationale). Wrapped separately from the\n error-summary / submit slots so it never compounds their own\n margins. Bare SETTINGS_ROW field rows are self-delimiting list\n items (`py-card-sm` + `border-b`), so consecutive rows stack\n FLUSH — same pairwise rule as DisplayLayout (see its comment for\n why the attribute match must be `^=settings`, never the\n underscore-carrying `=settings_row`). */}\n <div className=\"space-y-section [&>[data-chrome-mode^=settings]:has(+[data-chrome-mode^=settings])]:mb-0\">{renderedChildren}</div>\n {autoSlots.submitButton ? <SubmitButton className=\"mt-6\" /> : null}\n </ErrorBoundary>\n </div>\n </FieldScopeProvider>\n </FormLayoutSlotContext.Provider>\n );\n}\n\n/**\n * Whether a GROUPED section (grid, tabs, accordion, …) has nothing to show for this form's operation.\n *\n * One template serves several operations, and a `FormField` whose field the operation's schema lacks\n * renders nothing. A solo `Section` hides itself from what its fields report once mounted; a grouped\n * section cannot, because its container draws its title and panel and a tab's panel is not even mounted\n * until it is chosen. So the host decides from the section's elements: when they are only field slots\n * (`listPlacedFieldSlots`) and none of their paths resolves in the form's schema, the section is dropped.\n *\n * This reads the SCHEMA, not visibility: a field hidden by a condition is still in the schema, so its\n * section stays. Dropping a section there would take it out of its container on a value change.\n */\nfunction groupedSectionShowsNoField(children: ReactNode, schema: z.ZodTypeAny | undefined): boolean {\n if (!schema) return false;\n const placed = listPlacedFieldSlots(children);\n return placed !== null\n && placed.length > 0\n && placed.every((slot) => !slot.hasOwnSchema && AutomatedLayoutFrontendUtils.resolveFieldSchemaPath(schema, slot.path) === undefined);\n}\n\n/**\n * Introspects children for `<Section>` elements with container-mode `appearance`.\n * Groups sections sharing the same container mode into a `ContentSectionContainer`.\n * Solo-mode sections and non-Section children render in place.\n */\nfunction renderGroupedChildren(\n children: ReactNode,\n formCtx: ReturnType<typeof useOptionalFormTemplateContext>,\n): ReactNode {\n const grouped = groupSectionsByAppearance(children);\n\n return (\n <>\n {grouped.items.map((item, idx) => {\n if (item.type === 'node') {\n return <React.Fragment key={idx}>{item.node}</React.Fragment>;\n }\n\n // A grouped section none of whose fields this operation has is dropped from its container, and a\n // container left with no section renders nothing (see `groupedSectionShowsNoField`).\n const shownSections = item.group.sections.filter((el) => !groupedSectionShowsNoField(el.props.children, formCtx?.schema));\n if (shownSections.length === 0) return null;\n const group = { ...item.group, sections: shownSections };\n const config = buildSectionConfigFromGroup(group);\n const sectionLabels = formCtx?.sectionLabels ?? {};\n const sectionDescriptions = formCtx?.sectionDescriptions ?? {};\n\n const contentSections: ContentSectionDescriptor[] = group.sections.map((el) => ({\n id: el.props.name,\n title: sectionLabels[el.props.name],\n description: sectionDescriptions[el.props.name],\n content: (\n <GroupedSectionContent\n sectionProps={el.props}\n providesHeading={!!sectionLabels[el.props.name]}\n />\n ),\n }));\n\n return (\n <ContentSectionContainer\n key={`group-${group.mode}-${idx}`}\n sections={contentSections}\n config={config}\n />\n );\n })}\n </>\n );\n}\n\n/**\n * Wraps an individual grouped section's content with section-level behaviors\n * (chromeMode, saveable) when rendered inside a container.\n */\nfunction GroupedSectionContent({\n sectionProps,\n providesHeading,\n}: {\n sectionProps: Pick<SectionProps, 'name' | 'children' | 'chromeMode' | 'saveable' | 'className' | 'disabled'>;\n providesHeading?: boolean;\n}): ReactNode {\n return (\n <GroupedSectionBody\n hostKind={GroupedSectionHostKind.FORM}\n sectionProps={sectionProps}\n providesHeading={providesHeading}\n />\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectScope.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ObjectScope.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectScope.d.ts","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ObjectScope.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CActF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { FieldScopeProvider, useFieldScope } from './FieldScopeContext.js';
|
|
4
|
+
import { declareSectionContentRole, SectionContentRole } from './SectionFieldsContext.js';
|
|
4
5
|
/**
|
|
5
6
|
* Establishes a `FieldScopeContext` for nested object fields.
|
|
6
7
|
*
|
|
@@ -39,4 +40,6 @@ export function ObjectScope({ name, className, children }) {
|
|
|
39
40
|
}
|
|
40
41
|
return content;
|
|
41
42
|
}
|
|
43
|
+
// Scopes field names and adds no content of its own: a section judges its children in its place.
|
|
44
|
+
declareSectionContentRole(ObjectScope, SectionContentRole.FIELD_SLOT_CONTAINER);
|
|
42
45
|
//# sourceMappingURL=ObjectScope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectScope.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ObjectScope.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectScope.js","sourceRoot":"","sources":["../../../../../../src/components/resources/skeleton/ObjectScope.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAavF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAoB;IACzE,MAAM,EAAE,UAAU,EAAE,GAAG,aAAa,EAAE,CAAC;IACvC,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAEnE,MAAM,OAAO,GAAG,CACd,KAAC,kBAAkB,IAAC,UAAU,EAAE,cAAc,YAC3C,QAAQ,GACU,CACtB,CAAC;IAEF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,cAAK,SAAS,EAAE,SAAS,YAAG,OAAO,GAAO,CAAC;IACpD,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,iGAAiG;AACjG,yBAAyB,CAAC,WAAW,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["'use client';\n\nimport type { ReactNode } from 'react';\nimport { FieldScopeProvider, useFieldScope } from './FieldScopeContext';\nimport { declareSectionContentRole, SectionContentRole } from './SectionFieldsContext';\n\nexport interface ObjectScopeProps {\n /**\n * Name of the nested object field in the parent schema.\n * Children use relative field names that resolve against this scope.\n */\n name: string;\n /** Additional CSS classes for the scope container (rendered only when provided). */\n className?: string;\n children: ReactNode;\n}\n\n/**\n * Establishes a `FieldScopeContext` for nested object fields.\n *\n * Children use **relative** field names that compose with the scope:\n * `<ObjectScope name=\"address\">` + `<FormField name=\"street\" />` → `\"address.street\"`\n *\n * Scopes compose naturally for deep nesting:\n * ```\n * <ObjectScope name=\"company\">\n * <ObjectScope name=\"address\">\n * <FormField name=\"street\" /> → \"company.address.street\"\n * </ObjectScope>\n * </ObjectScope>\n * ```\n *\n * @example\n * ```tsx\n * <Section name=\"shipping\">\n * <ObjectScope name=\"address\">\n * <div className=\"grid grid-cols-2 gap-4\">\n * <FormField name=\"street\" className=\"col-span-2\" />\n * <FormField name=\"city\" />\n * <FormField name=\"zipCode\" />\n * </div>\n * <FormField name=\"country\" />\n * </ObjectScope>\n * </Section>\n * ```\n */\nexport function ObjectScope({ name, className, children }: ObjectScopeProps): ReactNode {\n const { pathPrefix } = useFieldScope();\n const composedPrefix = pathPrefix ? `${pathPrefix}.${name}` : name;\n\n const content = (\n <FieldScopeProvider pathPrefix={composedPrefix}>\n {children}\n </FieldScopeProvider>\n );\n\n if (className) {\n return <div className={className}>{content}</div>;\n }\n return content;\n}\n\n// Scopes field names and adds no content of its own: a section judges its children in its place.\ndeclareSectionContentRole(ObjectScope, SectionContentRole.FIELD_SLOT_CONTAINER);\n"]}
|