@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":"DisplayFieldEditable.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditable.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0EAA0E,CAAC;AAE5G,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC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,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * DisplayFieldEditable — inline-editable display field.\n *\n * Renders as a clickable trigger in display mode, switches to an inline\n * form when activated. Manages all editing state: useForm, RMM subscription,\n * focus management, save/cancel callbacks.\n *\n * Display mode: DisplayFieldChrome → inline edit trigger (wrapping DisplayValueDispatcher)\n * Edit mode: DisplayFieldChrome → FormField with embedded FormFieldChrome\n */\n\nimport React, { useState, useCallback, useMemo, useRef, useEffect, useSyncExternalStore } from 'react';\nimport { z } from 'zod';\nimport { useForm } from 'react-hook-form';\nimport { zodIssueResolver } from '~wildo-frontend-lib/components/form/validation-errors/zod-issue-resolver';\n\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { Text, Code } from '~wildo-frontend-lib/components/typography/text';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { FrontendComponentType, UIBehavior, InteractiveVariant, IndicatorVariant, TypographyVariant } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { CoreResourceOperation, type ResourceType } from '@wildo-ai/saas-models';\nimport {\n FieldSchemaType,\n getInlineEditableParams,\n isMultilineEditField,\n isTemplatableFileField,\n} from '@wildo-ai/zod-decorators';\n\nimport { rmmFieldPathIsDescendant, rmmReadPathValue } from '~wildo-frontend-lib/core/resources/rmm/field-path.utils';\nimport { NOOP_GET_SNAPSHOT, NOOP_SUBSCRIBE } from '~wildo-frontend-lib/core/resources/rmm/rmm-noop-snapshot';\nimport { RMMEventType, MutationErrorType, MutationSourceType } from '~wildo-frontend-lib/core/resources/rmm/types';\nimport type { ResourceMutationManager } from '~wildo-frontend-lib/core/resources/rmm/ResourceMutationManager';\nimport { FormSchemaProvider } from '~wildo-frontend-lib/components/form/form-context';\nimport { FormSchemaKind } from '~wildo-frontend-lib/components/form/form-field-types';\nimport { FormField } from '~wildo-frontend-lib/components/form/automated/FormField';\nimport { SwitchRoot } from '~wildo-frontend-lib/components/form/controls/boolean/switch';\nimport { DEFAULT_VALIDATION_MODE, InlineEditState } from '~wildo-frontend-lib/core/automated-layout/automated-layout.frontend.schemas';\nimport { AutomatedLayoutFrontendUtils } from '~wildo-frontend-lib/core/automated-layout/automated-layout.frontend.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\nimport type { DisplayFieldResolvedProps } from './display-field-resolved-props';\nimport { DisplayFieldChrome } from './chromes/DisplayFieldChrome';\nimport { DisplayValueDispatcher } from './DisplayValueDispatcher';\nimport { InlineEditMutationError, useResourceDisplayContext } from './automatic-displayer.utils';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { resolveRelationshipInlineEditSurface } from '~wildo-frontend-lib/core/resources/relationship-surface-runtime.frontend.utils';\n\nconst logger = LoggerFrontendService.getLogger();\nconst logDebug = logger.debugByType('DisplayFieldEditable');\nlogger.setDebugTypeLogging('DisplayFieldEditable', false);\n\n// =============================================================================\n// HELPERS\n// =============================================================================\n\n/**\n * Check if a field name matches any entry in changedFields/savedFields.\n * Handles nested dot-paths: a change to `address` matches `address.city`.\n */\nfunction fieldMatchesEvent(fieldName: string, eventFields: string[]): boolean {\n return eventFields.some(\n (f) => fieldName === f || fieldName.startsWith(f + '[') || rmmFieldPathIsDescendant(f, fieldName),\n );\n}\n\nfunction hasActionableFileEndpoints(\n endpoints: { upload?: string; override?: string } | undefined,\n): boolean {\n return !!(endpoints?.upload || endpoints?.override);\n}\n\nconst DEFAULT_INLINE_EDIT_PARAMS = {\n mode: 'direct' as const,\n saveOn: 'blur' as const,\n showSaveButton: false,\n showCancelButton: true,\n} as const;\n\n// =============================================================================\n// PROPS\n// =============================================================================\n\nexport interface DisplayFieldEditableProps extends DisplayFieldResolvedProps {\n /** Callback to save an inline edit. From ResourceDisplayContext. */\n doInlineUpdate: (fieldName: string, value: unknown) => Promise<void>;\n /** RMM instance for reacting to external mutations. */\n rmm?: ResourceMutationManager | null;\n}\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nexport function DisplayFieldEditable(props: DisplayFieldEditableProps): React.JSX.Element | null {\n const {\n schema,\n schemaType,\n value,\n fieldName,\n label,\n description,\n tooltip,\n enumLabels,\n displayComponent,\n parentData,\n resourceLinkTrail,\n className,\n hideLabel,\n hideDescription,\n resolvedChromeMode,\n resolvedLabelPlacement,\n resolvedEmptyValue,\n fileUploadContext,\n doInlineUpdate,\n rmm,\n } = props;\n\n const { tComponent, isReady } = useI18n({\n component: [FrontendComponentType.LOW_LEVEL_FORM_FIELD, FrontendComponentType.LOW_LEVEL_BUTTON],\n });\n const { getRecipe } = useUI();\n const { renderIcon } = useIconRegistry();\n const resourceDisplayContext = useResourceDisplayContext();\n const { registry } = useResourceRegistry();\n\n const successIndicatorRecipe = getRecipe(UIBehavior.INDICATOR, IndicatorVariant.SUCCESS);\n\n // ── Inline editing state ──\n const [editState, setEditState] = useState<InlineEditState>(InlineEditState.DISPLAY);\n const [saveErrorMessage, setSaveErrorMessage] = useState<string | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const retryButtonRef = useRef<HTMLButtonElement>(null);\n const savedTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const lastProcessedEventIdRef = useRef<number | null>(null);\n\n // ── Boolean toggle-in-place state (T4b) ──\n // An inline-editable boolean renders a LIVE Switch that persists immediately on\n // toggle (no click-to-edit overlay). `optimisticBool` gives instant feedback and\n // is cleared when the authoritative `value` arrives (or on error → revert).\n const [booleanSaving, setBooleanSaving] = useState(false);\n const [optimisticBool, setOptimisticBool] = useState<boolean | null>(null);\n\n // Truncation state for arrays/objects (ROBUST-03)\n const [showAllArrayItems, setShowAllArrayItems] = useState(false);\n const [showAllObjectFields, setShowAllObjectFields] = useState(false);\n const prevValueRef = useRef(value);\n useEffect(() => {\n if (prevValueRef.current !== value) {\n setShowAllArrayItems(false);\n setShowAllObjectFields(false);\n // Authoritative value arrived (RMM update / conflict reset) → drop optimism.\n setOptimisticBool(null);\n prevValueRef.current = value;\n }\n }, [value]);\n\n const isInEditMode = editState !== InlineEditState.DISPLAY;\n const isSaving = editState === InlineEditState.SAVING;\n\n // ── RMM subscription ──\n const rmmForField = rmm ?? null;\n const rmmSnapshot = useSyncExternalStore(\n rmmForField?.subscribe ?? NOOP_SUBSCRIBE,\n rmmForField?.getSnapshot ?? NOOP_GET_SNAPSHOT,\n );\n\n // ── Inline edit params from decorator ──\n const inlineEditParams = getInlineEditableParams(schema);\n const params = inlineEditParams ?? DEFAULT_INLINE_EDIT_PARAMS;\n const relationshipInlineEditSurface = useMemo(() => {\n if (!fieldName || !resourceDisplayContext.resourceType) {\n return undefined;\n }\n\n return resolveRelationshipInlineEditSurface({\n resourceType: resourceDisplayContext.resourceType as ResourceType,\n fieldName,\n operationType: CoreResourceOperation.UPDATE,\n registry,\n });\n }, [fieldName, registry, resourceDisplayContext.resourceType]);\n const inlineFileEndpoints = useMemo(() => {\n if (!fieldName) {\n return undefined;\n }\n\n return fileUploadContext?.[AutomatedLayoutFrontendUtils.normalizeSchemaFieldPath(fieldName)];\n }, [fieldName, fileUploadContext]);\n const supportsInlineFileEditing = schemaType !== FieldSchemaType.FILE\n || (!isTemplatableFileField(schema) && hasActionableFileEndpoints(inlineFileEndpoints));\n\n // ── Isolated form for inline editing ──\n // PERF: useForm() is unconditionally instantiated due to Rules of Hooks.\n // In a future refactor, extract the edit form into a child component\n // (DisplayFieldInlineEditForm) that mounts only when editing, so useForm()\n // is lazy. The cost is ~1 useForm per editable field even in display mode.\n const fieldKey = useMemo(() => {\n return fieldName?.includes('.') ? fieldName.split('.').pop()! : (fieldName ?? 'value');\n }, [fieldName]);\n\n const formSchema = useMemo(() => {\n return z.object({ [fieldKey]: schema });\n }, [fieldKey, schema]);\n\n const form = useForm({\n // The resolver that keeps the issue code, so an inline edit's error translates like a form's (#995).\n resolver: zodIssueResolver(formSchema),\n defaultValues: { [fieldKey]: value },\n mode: DEFAULT_VALIDATION_MODE,\n });\n\n // Reset form when value or schema changes externally (schema may change\n // for discriminated unions; resetting ensures the resolver stays in sync)\n useEffect(() => {\n if (editState === InlineEditState.DISPLAY) {\n form.reset({ [fieldKey]: value });\n setSaveErrorMessage(null);\n }\n }, [value, editState, form, fieldKey, schema]);\n\n // Auto-focus when entering edit mode\n useEffect(() => {\n if (isInEditMode && containerRef.current) {\n const timer = setTimeout(() => {\n const firstInput = containerRef.current?.querySelector<HTMLElement>(\n 'input, textarea, select, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (firstInput) {\n firstInput.focus();\n }\n }, 0);\n return () => clearTimeout(timer);\n }\n }, [isInEditMode]);\n\n // Auto-focus retry button on error\n useEffect(() => {\n if (editState === InlineEditState.ERROR) {\n retryButtonRef.current?.focus();\n }\n }, [editState]);\n\n // Cleanup SAVED→DISPLAY timeout on unmount to prevent state updates on unmounted component\n useEffect(() => {\n return () => {\n if (savedTimeoutRef.current != null) {\n clearTimeout(savedTimeoutRef.current);\n }\n };\n }, []);\n\n // ── Callbacks ──\n\n const handleSave = useCallback(async () => {\n if (!fieldName) return;\n\n const isValid = await form.trigger(fieldKey);\n if (!isValid) {\n setEditState(InlineEditState.EDITING);\n return;\n }\n setSaveErrorMessage(null);\n\n setEditState(InlineEditState.SAVING);\n try {\n const formValue = form.getValues(fieldKey);\n await doInlineUpdate(fieldName, formValue);\n logDebug('inline edit save', { fieldName, value: formValue });\n setEditState(InlineEditState.SAVED);\n savedTimeoutRef.current = setTimeout(() => {\n setEditState(InlineEditState.DISPLAY);\n savedTimeoutRef.current = null;\n }, 500);\n } catch (err) {\n if (err instanceof InlineEditMutationError && err.mutationError?.type === MutationErrorType.CONFLICT) {\n return;\n }\n setSaveErrorMessage(tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'save_failed'));\n setEditState(InlineEditState.ERROR);\n }\n }, [form, fieldKey, fieldName, doInlineUpdate, tComponent]);\n\n const handleCancel = useCallback(() => {\n if (fieldName) {\n logDebug('inline edit cancel', { fieldName });\n }\n form.reset({ [fieldKey]: value });\n setSaveErrorMessage(null);\n setEditState(InlineEditState.DISPLAY);\n }, [form, fieldKey, value, fieldName]);\n\n // ── Boolean toggle-in-place handler (T4b) ──\n // Persists immediately via the same RMM `doInlineUpdate` path used by the\n // click-to-edit flow. Optimistic flip for responsiveness; reverts on error\n // (a CONFLICT is authoritative — RMM re-syncs `value`, so leave the revert to\n // the value-change effect and surface no error message).\n const handleBooleanToggle = useCallback(async (next: boolean) => {\n if (!fieldName) return;\n setOptimisticBool(next);\n setSaveErrorMessage(null);\n setBooleanSaving(true);\n try {\n await doInlineUpdate(fieldName, next);\n logDebug('inline boolean toggle', { fieldName, value: next });\n } catch (err) {\n setOptimisticBool(null);\n if (!(err instanceof InlineEditMutationError && err.mutationError?.type === MutationErrorType.CONFLICT)) {\n setSaveErrorMessage(tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'save_failed'));\n }\n } finally {\n setBooleanSaving(false);\n }\n }, [fieldName, doInlineUpdate, tComponent]);\n\n // ── RMM event handler ──\n // Read the translator through a ref: listing it in the effect below would re-run its CONFLICT_RESET branch\n // (`form.reset`) on every provider render, while omitting it would keep a stale translator after a locale change.\n const tComponentRef = useRef(tComponent);\n tComponentRef.current = tComponent;\n\n // Cancel inline edit when an external mutation changes this field.\n // Tracks last-processed event ID to prevent re-processing the same event\n // when other deps change (e.g., editState transitions from DISPLAY→EDITING).\n useEffect(() => {\n if (!rmmForField || !rmmSnapshot?.lastEvent || !fieldName) return;\n const event = rmmSnapshot.lastEvent;\n\n if (event.id === lastProcessedEventIdRef.current) return;\n lastProcessedEventIdRef.current = event.id;\n\n switch (event.type) {\n case RMMEventType.REMOTE_UPDATE: {\n if (fieldMatchesEvent(fieldName, event.changedFields) && editState === InlineEditState.EDITING) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n case RMMEventType.CONFLICT_RESET: {\n const authoritativeValue = rmmReadPathValue(event.currentData, fieldName);\n form.reset({ [fieldKey]: authoritativeValue });\n\n if (editState !== InlineEditState.DISPLAY) {\n logDebug('RMM event resetting inline edit after conflict', { fieldName, eventType: event.type });\n setSaveErrorMessage(tComponentRef.current(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'field_reset_after_conflict'));\n setEditState(InlineEditState.ERROR);\n }\n break;\n }\n case RMMEventType.MUTATION_RESULT: {\n if (\n event.result.success &&\n event.source.type !== MutationSourceType.DISPLAY &&\n event.result.savedFields &&\n fieldMatchesEvent(fieldName, event.result.savedFields) &&\n editState === InlineEditState.EDITING\n ) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n case RMMEventType.RESOURCE_DELETED: {\n if (editState === InlineEditState.EDITING) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n }\n }, [rmmSnapshot?.lastEvent?.id, rmmForField, fieldName, editState, fieldKey, form, handleCancel]);\n\n // ── Blur & keyboard handlers ──\n\n const handleContainerBlur = useCallback((e: React.FocusEvent) => {\n if (params.saveOn === 'blur' && containerRef.current) {\n const relatedTarget = e.relatedTarget as HTMLElement | null;\n if (!containerRef.current.contains(relatedTarget)) {\n handleSave();\n }\n }\n }, [params.saveOn, handleSave]);\n\n // `isMultilineEditField`, not `isFormTextarea`: the latter read ONLY the\n // cross-cutting `edit.component` axis, so a field declaring the per-type\n // `edit.editMode: TEXTAREA` — the axis the renderer honors — was treated as\n // single-line here and Enter saved instead of inserting a newline.\n const isMultilineField = schemaType === FieldSchemaType.CODE || isMultilineEditField(schema);\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n return;\n }\n if (e.key === 'Enter') {\n if (isMultilineField) {\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n handleSave();\n }\n } else if (!e.shiftKey) {\n e.preventDefault();\n handleSave();\n }\n }\n }, [handleSave, handleCancel, isMultilineField]);\n\n // ── Content rendering ──\n\n function renderDisplayValue(): React.JSX.Element {\n return (\n <DisplayValueDispatcher\n schema={schema}\n schemaType={schemaType}\n value={value}\n fieldName={fieldName}\n label={label}\n className={className}\n enumLabels={enumLabels}\n displayComponent={displayComponent}\n parentData={parentData}\n resourceLinkTrail={resourceLinkTrail}\n emptyValue={resolvedEmptyValue}\n fileUploadContext={fileUploadContext}\n showAllArrayItems={showAllArrayItems}\n onExpandArrayItems={() => setShowAllArrayItems(true)}\n showAllObjectFields={showAllObjectFields}\n onExpandObjectFields={() => setShowAllObjectFields(true)}\n />\n );\n }\n\n // Boolean toggle-in-place (T4b): a live Switch, right-pinned in the settings row,\n // that writes immediately on toggle. No click-to-edit overlay, no ✓/✕ glyph.\n function renderBooleanToggle(): React.JSX.Element {\n const checked = optimisticBool ?? !!value;\n return (\n <div className=\"inline-flex items-center gap-element\">\n {booleanSaving && (\n <span className=\"text-muted-foreground\" aria-hidden=\"true\">\n {renderIcon(StandardIconReference.LOADER_2, {\n size: IconSize.SM,\n className: 'animate-spin motion-reduce:animate-none',\n })}\n </span>\n )}\n {saveErrorMessage && !booleanSaving && (\n <span className=\"text-destructive text-xs\" role=\"alert\">{saveErrorMessage}</span>\n )}\n <SwitchRoot\n checked={checked}\n onCheckedChange={handleBooleanToggle}\n disabled={booleanSaving}\n aria-label={label || fieldName || undefined}\n />\n </div>\n );\n }\n\n function renderInlineEditTrigger(): React.JSX.Element {\n return (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n className={cn(\"group relative inline-flex items-center gap-element h-auto px-card-sm py-item-xs\")}\n onClick={() => {\n if (fieldName) {\n logDebug('inline edit start', { fieldName });\n }\n setEditState(InlineEditState.EDITING);\n }}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'editField', { label: label || fieldName || '' })}\n >\n <span className=\"flex-1\">{renderDisplayValue()}</span>\n <span className=\"text-muted-foreground opacity-0 group-hover:opacity-100 motion-safe:transition-opacity\">\n {renderIcon(StandardIconReference.EDIT, { size: IconSize.SM })}\n </span>\n </Button>\n );\n }\n\n function renderInlineEditForm(): React.JSX.Element {\n const errorAlertId = fieldName ? `inline-edit-error-${fieldName.replace(/\\./g, '-')}` : undefined;\n const hasError = editState === InlineEditState.ERROR && !!saveErrorMessage;\n\n return (\n <FormSchemaProvider\n schema={formSchema}\n // This surface wraps a single field from the resource's MAIN schema, not an operation\n // request DTO. Declaring it is what lets `FormField` ask the right clearability question:\n // on a main schema an ordinary `.optional()` field does not accept `null`, so the\n // request-DTO question would report every clearable field un-clearable — which left\n // refined optional fields (colour, email, url) impossible to empty inline.\n schemaKind={FormSchemaKind.MAIN_SCHEMA}\n form={form}\n resourceType={resourceDisplayContext.resourceType}\n resourceId={resourceDisplayContext.resourceId}\n operationType={CoreResourceOperation.UPDATE}\n contextResourceIdentifiers={resourceDisplayContext.contextResourceIdentifiers}\n navigationZone={resourceDisplayContext.navigationZone}\n >\n <div\n ref={containerRef}\n className=\"inline-flex flex-col gap-item-xs min-w-[200px]\"\n onBlur={handleContainerBlur}\n onKeyDown={handleKeyDown}\n aria-describedby={hasError ? errorAlertId : undefined}\n >\n <div className=\"flex items-start gap-element\">\n <div className=\"flex-1\">\n <FormField\n name={fieldKey}\n quickCreateSourceFieldName={relationshipInlineEditSurface?.sourceFieldName}\n schema={schema}\n label=\"\"\n description=\"\"\n disabled={isSaving}\n placeholder={label}\n enumLabels={enumLabels}\n respectSurfaceErrorPlacement={false}\n fileUploadContext={inlineFileEndpoints\n ? { [fieldKey]: inlineFileEndpoints }\n : undefined}\n className=\"inline-edit-field\"\n />\n </div>\n\n <div className=\"flex items-center gap-item-xs shrink-0 pt-item-xs\">\n {editState === InlineEditState.SAVED && (\n <div className={successIndicatorRecipe.base} aria-hidden=\"true\">\n {renderIcon(StandardIconReference.CHECK, { size: IconSize.SM })}\n </div>\n )}\n\n {params.showSaveButton && editState !== InlineEditState.SAVED && (\n <Button\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.DEFAULT}\n onClick={handleSave}\n disabled={isSaving}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'save')}\n >\n {editState === InlineEditState.SAVING\n ? renderIcon(StandardIconReference.LOADER_2, {\n size: IconSize.SM,\n className: 'animate-spin motion-reduce:animate-none'\n })\n : renderIcon(StandardIconReference.CHECK, { size: IconSize.SM })\n }\n </Button>\n )}\n\n {params.showCancelButton && (\n <Button\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.GHOST}\n onClick={handleCancel}\n disabled={isSaving}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'cancel')}\n >\n {renderIcon(StandardIconReference.CLOSE, { size: IconSize.SM })}\n </Button>\n )}\n </div>\n </div>\n\n {hasError && (\n <Alert id={errorAlertId} variant=\"destructive\" role=\"alert\" className=\"flex items-center gap-element py-card-sm\">\n {renderIcon(StandardIconReference.ERROR, {\n size: IconSize.SM,\n className: 'shrink-0'\n })}\n <AlertDescription className=\"flex-1 m-0\">\n <Text>{saveErrorMessage}</Text>\n </AlertDescription>\n {(() => {\n const retryLabel = tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'retry');\n return (\n <Button\n ref={retryButtonRef}\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.GHOST}\n onClick={handleSave}\n disabled={isSaving}\n aria-label={retryLabel}\n title={retryLabel}\n >\n {renderIcon(StandardIconReference.TRY_AGAIN, { size: IconSize.SM })}\n </Button>\n );\n })()}\n </Alert>\n )}\n </div>\n </FormSchemaProvider>\n );\n }\n\n if (!isReady) return null;\n\n // ── Determine content based on edit state ──\n let content: React.JSX.Element;\n if (schemaType === FieldSchemaType.BOOLEAN && fieldName) {\n // Inline-editable boolean → live toggle-in-place Switch (T4b), no overlay.\n content = renderBooleanToggle();\n } else if (isInEditMode && fieldName && supportsInlineFileEditing) {\n content = renderInlineEditForm();\n } else if (!supportsInlineFileEditing) {\n content = renderDisplayValue();\n } else {\n content = renderInlineEditTrigger();\n }\n\n return (\n <DisplayFieldChrome\n mode={resolvedChromeMode}\n label={label}\n description={description}\n tooltip={tooltip}\n name={fieldName}\n labelPlacement={resolvedLabelPlacement}\n hideLabel={hideLabel}\n hideDescription={hideDescription}\n className={className}\n >\n {content}\n </DisplayFieldChrome>\n );\n}\n\nDisplayFieldEditable.displayName = 'DisplayFieldEditable';\n"]}
|
|
1
|
+
{"version":3,"file":"DisplayFieldEditable.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditable.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AAEH,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACvG,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0EAA0E,CAAC;AAE5G,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+DAA+D,CAAC;AAChH,OAAO,EAAE,IAAI,EAAQ,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;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,QAAQ,gBACN,UAAU,EACtB,KAAK,EAAE,UAAU,YAEhB,UAAU,CAAC,qBAAqB,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,GAC5D,CACV,CAAC;4BACJ,CAAC,CAAC,EAAE,IACE,CACT,IACG,GACa,CACtB,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,8CAA8C;IAC9C,IAAI,OAA0B,CAAC;IAC/B,IAAI,UAAU,KAAK,eAAe,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;QACxD,2EAA2E;QAC3E,OAAO,GAAG,mBAAmB,EAAE,CAAC;IAClC,CAAC;SAAM,IAAI,YAAY,IAAI,SAAS,IAAI,yBAAyB,EAAE,CAAC;QAClE,OAAO,GAAG,oBAAoB,EAAE,CAAC;IACnC,CAAC;SAAM,IAAI,CAAC,yBAAyB,EAAE,CAAC;QACtC,OAAO,GAAG,kBAAkB,EAAE,CAAC;IACjC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,uBAAuB,EAAE,CAAC;IACtC,CAAC;IAED,OAAO,CACL,KAAC,kBAAkB,IACjB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,SAAS,EACf,cAAc,EAAE,sBAAsB,EACtC,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,YAEnB,OAAO,GACW,CACtB,CAAC;AACJ,CAAC;AAED,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * DisplayFieldEditable — inline-editable display field.\n *\n * Renders as a clickable trigger in display mode, switches to an inline\n * form when activated. Manages all editing state: useForm, RMM subscription,\n * focus management, save/cancel callbacks.\n *\n * Display mode: DisplayFieldChrome → inline edit trigger (wrapping DisplayValueDispatcher)\n * Edit mode: DisplayFieldChrome → FormField with embedded FormFieldChrome\n */\n\nimport React, { useState, useCallback, useMemo, useRef, useEffect, useSyncExternalStore } from 'react';\nimport { z } from 'zod';\nimport { useForm } from 'react-hook-form';\nimport { zodIssueResolver } from '~wildo-frontend-lib/components/form/validation-errors/zod-issue-resolver';\n\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { useIconRegistry } from '~wildo-frontend-lib/core/icons/useIconRegistry';\nimport { IconSize, StandardIconReference } from '~wildo-frontend-lib/core/icons/icon-registry.frontend.schemas';\nimport { Text, Code } from '~wildo-frontend-lib/components/typography/text';\nimport { Button, ButtonVariants_Variant } from '~wildo-frontend-lib/components/actions/button';\nimport { ButtonSize } from '@wildo-ai/presets-components-models';\nimport { Alert, AlertDescription } from '~wildo-frontend-lib/components/overlays/containers/alert';\nimport { FrontendComponentType, UIBehavior, InteractiveVariant, IndicatorVariant, TypographyVariant } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { CoreResourceOperation, type ResourceType } from '@wildo-ai/saas-models';\nimport {\n FieldSchemaType,\n getInlineEditableParams,\n isMultilineEditField,\n isTemplatableFileField,\n} from '@wildo-ai/zod-decorators';\n\nimport { rmmFieldPathIsDescendant, rmmReadPathValue } from '~wildo-frontend-lib/core/resources/rmm/field-path.utils';\nimport { NOOP_GET_SNAPSHOT, NOOP_SUBSCRIBE } from '~wildo-frontend-lib/core/resources/rmm/rmm-noop-snapshot';\nimport { RMMEventType, MutationErrorType, MutationSourceType } from '~wildo-frontend-lib/core/resources/rmm/types';\nimport type { ResourceMutationManager } from '~wildo-frontend-lib/core/resources/rmm/ResourceMutationManager';\nimport { FormSchemaProvider } from '~wildo-frontend-lib/components/form/form-context';\nimport { FormSchemaKind } from '~wildo-frontend-lib/components/form/form-field-types';\nimport { FormField } from '~wildo-frontend-lib/components/form/automated/FormField';\nimport { SwitchRoot } from '~wildo-frontend-lib/components/form/controls/boolean/switch';\nimport { DEFAULT_VALIDATION_MODE, InlineEditState } from '~wildo-frontend-lib/core/automated-layout/automated-layout.frontend.schemas';\nimport { AutomatedLayoutFrontendUtils } from '~wildo-frontend-lib/core/automated-layout/automated-layout.frontend.utils';\nimport { LoggerFrontendService } from '~wildo-frontend-lib/core/monitoring/logger.frontend.service';\n\nimport type { DisplayFieldResolvedProps } from './display-field-resolved-props';\nimport { DisplayFieldChrome } from './chromes/DisplayFieldChrome';\nimport { DisplayValueDispatcher } from './DisplayValueDispatcher';\nimport { InlineEditMutationError, useResourceDisplayContext } from './automatic-displayer.utils';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\nimport { resolveRelationshipInlineEditSurface } from '~wildo-frontend-lib/core/resources/relationship-surface-runtime.frontend.utils';\n\nconst logger = LoggerFrontendService.getLogger();\nconst logDebug = logger.debugByType('DisplayFieldEditable');\nlogger.setDebugTypeLogging('DisplayFieldEditable', false);\n\n// =============================================================================\n// HELPERS\n// =============================================================================\n\n/**\n * Check if a field name matches any entry in changedFields/savedFields.\n * Handles nested dot-paths: a change to `address` matches `address.city`.\n */\nfunction fieldMatchesEvent(fieldName: string, eventFields: string[]): boolean {\n return eventFields.some(\n (f) => fieldName === f || fieldName.startsWith(f + '[') || rmmFieldPathIsDescendant(f, fieldName),\n );\n}\n\nfunction hasActionableFileEndpoints(\n endpoints: { upload?: string; override?: string } | undefined,\n): boolean {\n return !!(endpoints?.upload || endpoints?.override);\n}\n\nconst DEFAULT_INLINE_EDIT_PARAMS = {\n mode: 'direct' as const,\n saveOn: 'blur' as const,\n showSaveButton: false,\n showCancelButton: true,\n} as const;\n\n// =============================================================================\n// PROPS\n// =============================================================================\n\nexport interface DisplayFieldEditableProps extends DisplayFieldResolvedProps {\n /** Callback to save an inline edit. From ResourceDisplayContext. */\n doInlineUpdate: (fieldName: string, value: unknown) => Promise<void>;\n /** RMM instance for reacting to external mutations. */\n rmm?: ResourceMutationManager | null;\n}\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nexport function DisplayFieldEditable(props: DisplayFieldEditableProps): React.JSX.Element | null {\n const {\n schema,\n schemaType,\n value,\n fieldName,\n label,\n description,\n tooltip,\n provenance,\n enumLabels,\n displayComponent,\n parentData,\n resourceLinkTrail,\n className,\n hideLabel,\n hideDescription,\n resolvedChromeMode,\n resolvedLabelPlacement,\n resolvedEmptyValue,\n fileUploadContext,\n doInlineUpdate,\n rmm,\n } = props;\n\n const { tComponent, isReady } = useI18n({\n component: [FrontendComponentType.LOW_LEVEL_FORM_FIELD, FrontendComponentType.LOW_LEVEL_BUTTON],\n });\n const { getRecipe } = useUI();\n const { renderIcon } = useIconRegistry();\n const resourceDisplayContext = useResourceDisplayContext();\n const { registry } = useResourceRegistry();\n\n const successIndicatorRecipe = getRecipe(UIBehavior.INDICATOR, IndicatorVariant.SUCCESS);\n\n // ── Inline editing state ──\n const [editState, setEditState] = useState<InlineEditState>(InlineEditState.DISPLAY);\n const [saveErrorMessage, setSaveErrorMessage] = useState<string | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const retryButtonRef = useRef<HTMLButtonElement>(null);\n const savedTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const lastProcessedEventIdRef = useRef<number | null>(null);\n\n // ── Boolean toggle-in-place state (T4b) ──\n // An inline-editable boolean renders a LIVE Switch that persists immediately on\n // toggle (no click-to-edit overlay). `optimisticBool` gives instant feedback and\n // is cleared when the authoritative `value` arrives (or on error → revert).\n const [booleanSaving, setBooleanSaving] = useState(false);\n const [optimisticBool, setOptimisticBool] = useState<boolean | null>(null);\n\n // Truncation state for arrays/objects (ROBUST-03)\n const [showAllArrayItems, setShowAllArrayItems] = useState(false);\n const [showAllObjectFields, setShowAllObjectFields] = useState(false);\n const prevValueRef = useRef(value);\n useEffect(() => {\n if (prevValueRef.current !== value) {\n setShowAllArrayItems(false);\n setShowAllObjectFields(false);\n // Authoritative value arrived (RMM update / conflict reset) → drop optimism.\n setOptimisticBool(null);\n prevValueRef.current = value;\n }\n }, [value]);\n\n const isInEditMode = editState !== InlineEditState.DISPLAY;\n const isSaving = editState === InlineEditState.SAVING;\n\n // ── RMM subscription ──\n const rmmForField = rmm ?? null;\n const rmmSnapshot = useSyncExternalStore(\n rmmForField?.subscribe ?? NOOP_SUBSCRIBE,\n rmmForField?.getSnapshot ?? NOOP_GET_SNAPSHOT,\n );\n\n // ── Inline edit params from decorator ──\n const inlineEditParams = getInlineEditableParams(schema);\n const params = inlineEditParams ?? DEFAULT_INLINE_EDIT_PARAMS;\n const relationshipInlineEditSurface = useMemo(() => {\n if (!fieldName || !resourceDisplayContext.resourceType) {\n return undefined;\n }\n\n return resolveRelationshipInlineEditSurface({\n resourceType: resourceDisplayContext.resourceType as ResourceType,\n fieldName,\n operationType: CoreResourceOperation.UPDATE,\n registry,\n });\n }, [fieldName, registry, resourceDisplayContext.resourceType]);\n const inlineFileEndpoints = useMemo(() => {\n if (!fieldName) {\n return undefined;\n }\n\n return fileUploadContext?.[AutomatedLayoutFrontendUtils.normalizeSchemaFieldPath(fieldName)];\n }, [fieldName, fileUploadContext]);\n const supportsInlineFileEditing = schemaType !== FieldSchemaType.FILE\n || (!isTemplatableFileField(schema) && hasActionableFileEndpoints(inlineFileEndpoints));\n\n // ── Isolated form for inline editing ──\n // PERF: useForm() is unconditionally instantiated due to Rules of Hooks.\n // In a future refactor, extract the edit form into a child component\n // (DisplayFieldInlineEditForm) that mounts only when editing, so useForm()\n // is lazy. The cost is ~1 useForm per editable field even in display mode.\n const fieldKey = useMemo(() => {\n return fieldName?.includes('.') ? fieldName.split('.').pop()! : (fieldName ?? 'value');\n }, [fieldName]);\n\n const formSchema = useMemo(() => {\n return z.object({ [fieldKey]: schema });\n }, [fieldKey, schema]);\n\n const form = useForm({\n // The resolver that keeps the issue code, so an inline edit's error translates like a form's (#995).\n resolver: zodIssueResolver(formSchema),\n defaultValues: { [fieldKey]: value },\n mode: DEFAULT_VALIDATION_MODE,\n });\n\n // Reset form when value or schema changes externally (schema may change\n // for discriminated unions; resetting ensures the resolver stays in sync)\n useEffect(() => {\n if (editState === InlineEditState.DISPLAY) {\n form.reset({ [fieldKey]: value });\n setSaveErrorMessage(null);\n }\n }, [value, editState, form, fieldKey, schema]);\n\n // Auto-focus when entering edit mode\n useEffect(() => {\n if (isInEditMode && containerRef.current) {\n const timer = setTimeout(() => {\n const firstInput = containerRef.current?.querySelector<HTMLElement>(\n 'input, textarea, select, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (firstInput) {\n firstInput.focus();\n }\n }, 0);\n return () => clearTimeout(timer);\n }\n }, [isInEditMode]);\n\n // Auto-focus retry button on error\n useEffect(() => {\n if (editState === InlineEditState.ERROR) {\n retryButtonRef.current?.focus();\n }\n }, [editState]);\n\n // Cleanup SAVED→DISPLAY timeout on unmount to prevent state updates on unmounted component\n useEffect(() => {\n return () => {\n if (savedTimeoutRef.current != null) {\n clearTimeout(savedTimeoutRef.current);\n }\n };\n }, []);\n\n // ── Callbacks ──\n\n const handleSave = useCallback(async () => {\n if (!fieldName) return;\n\n const isValid = await form.trigger(fieldKey);\n if (!isValid) {\n setEditState(InlineEditState.EDITING);\n return;\n }\n setSaveErrorMessage(null);\n\n setEditState(InlineEditState.SAVING);\n try {\n const formValue = form.getValues(fieldKey);\n await doInlineUpdate(fieldName, formValue);\n logDebug('inline edit save', { fieldName, value: formValue });\n setEditState(InlineEditState.SAVED);\n savedTimeoutRef.current = setTimeout(() => {\n setEditState(InlineEditState.DISPLAY);\n savedTimeoutRef.current = null;\n }, 500);\n } catch (err) {\n if (err instanceof InlineEditMutationError && err.mutationError?.type === MutationErrorType.CONFLICT) {\n return;\n }\n setSaveErrorMessage(tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'save_failed'));\n setEditState(InlineEditState.ERROR);\n }\n }, [form, fieldKey, fieldName, doInlineUpdate, tComponent]);\n\n const handleCancel = useCallback(() => {\n if (fieldName) {\n logDebug('inline edit cancel', { fieldName });\n }\n form.reset({ [fieldKey]: value });\n setSaveErrorMessage(null);\n setEditState(InlineEditState.DISPLAY);\n }, [form, fieldKey, value, fieldName]);\n\n // ── Boolean toggle-in-place handler (T4b) ──\n // Persists immediately via the same RMM `doInlineUpdate` path used by the\n // click-to-edit flow. Optimistic flip for responsiveness; reverts on error\n // (a CONFLICT is authoritative — RMM re-syncs `value`, so leave the revert to\n // the value-change effect and surface no error message).\n const handleBooleanToggle = useCallback(async (next: boolean) => {\n if (!fieldName) return;\n setOptimisticBool(next);\n setSaveErrorMessage(null);\n setBooleanSaving(true);\n try {\n await doInlineUpdate(fieldName, next);\n logDebug('inline boolean toggle', { fieldName, value: next });\n } catch (err) {\n setOptimisticBool(null);\n if (!(err instanceof InlineEditMutationError && err.mutationError?.type === MutationErrorType.CONFLICT)) {\n setSaveErrorMessage(tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'save_failed'));\n }\n } finally {\n setBooleanSaving(false);\n }\n }, [fieldName, doInlineUpdate, tComponent]);\n\n // ── RMM event handler ──\n // Read the translator through a ref: listing it in the effect below would re-run its CONFLICT_RESET branch\n // (`form.reset`) on every provider render, while omitting it would keep a stale translator after a locale change.\n const tComponentRef = useRef(tComponent);\n tComponentRef.current = tComponent;\n\n // Cancel inline edit when an external mutation changes this field.\n // Tracks last-processed event ID to prevent re-processing the same event\n // when other deps change (e.g., editState transitions from DISPLAY→EDITING).\n useEffect(() => {\n if (!rmmForField || !rmmSnapshot?.lastEvent || !fieldName) return;\n const event = rmmSnapshot.lastEvent;\n\n if (event.id === lastProcessedEventIdRef.current) return;\n lastProcessedEventIdRef.current = event.id;\n\n switch (event.type) {\n case RMMEventType.REMOTE_UPDATE: {\n if (fieldMatchesEvent(fieldName, event.changedFields) && editState === InlineEditState.EDITING) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n case RMMEventType.CONFLICT_RESET: {\n const authoritativeValue = rmmReadPathValue(event.currentData, fieldName);\n form.reset({ [fieldKey]: authoritativeValue });\n\n if (editState !== InlineEditState.DISPLAY) {\n logDebug('RMM event resetting inline edit after conflict', { fieldName, eventType: event.type });\n setSaveErrorMessage(tComponentRef.current(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'field_reset_after_conflict'));\n setEditState(InlineEditState.ERROR);\n }\n break;\n }\n case RMMEventType.MUTATION_RESULT: {\n if (\n event.result.success &&\n event.source.type !== MutationSourceType.DISPLAY &&\n event.result.savedFields &&\n fieldMatchesEvent(fieldName, event.result.savedFields) &&\n editState === InlineEditState.EDITING\n ) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n case RMMEventType.RESOURCE_DELETED: {\n if (editState === InlineEditState.EDITING) {\n logDebug('RMM event cancelling inline edit', { fieldName, eventType: event.type });\n handleCancel();\n }\n break;\n }\n }\n }, [rmmSnapshot?.lastEvent?.id, rmmForField, fieldName, editState, fieldKey, form, handleCancel]);\n\n // ── Blur & keyboard handlers ──\n\n const handleContainerBlur = useCallback((e: React.FocusEvent) => {\n if (params.saveOn === 'blur' && containerRef.current) {\n const relatedTarget = e.relatedTarget as HTMLElement | null;\n if (!containerRef.current.contains(relatedTarget)) {\n handleSave();\n }\n }\n }, [params.saveOn, handleSave]);\n\n // `isMultilineEditField`, not `isFormTextarea`: the latter read ONLY the\n // cross-cutting `edit.component` axis, so a field declaring the per-type\n // `edit.editMode: TEXTAREA` — the axis the renderer honors — was treated as\n // single-line here and Enter saved instead of inserting a newline.\n const isMultilineField = schemaType === FieldSchemaType.CODE || isMultilineEditField(schema);\n const handleKeyDown = useCallback((e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n handleCancel();\n return;\n }\n if (e.key === 'Enter') {\n if (isMultilineField) {\n if (e.ctrlKey || e.metaKey) {\n e.preventDefault();\n handleSave();\n }\n } else if (!e.shiftKey) {\n e.preventDefault();\n handleSave();\n }\n }\n }, [handleSave, handleCancel, isMultilineField]);\n\n // ── Content rendering ──\n\n function renderDisplayValue(): React.JSX.Element {\n return (\n <DisplayValueDispatcher\n schema={schema}\n schemaType={schemaType}\n value={value}\n fieldName={fieldName}\n label={label}\n className={className}\n enumLabels={enumLabels}\n displayComponent={displayComponent}\n parentData={parentData}\n resourceLinkTrail={resourceLinkTrail}\n emptyValue={resolvedEmptyValue}\n fileUploadContext={fileUploadContext}\n showAllArrayItems={showAllArrayItems}\n onExpandArrayItems={() => setShowAllArrayItems(true)}\n showAllObjectFields={showAllObjectFields}\n onExpandObjectFields={() => setShowAllObjectFields(true)}\n />\n );\n }\n\n // Boolean toggle-in-place (T4b): a live Switch, right-pinned in the settings row,\n // that writes immediately on toggle. No click-to-edit overlay, no ✓/✕ glyph.\n function renderBooleanToggle(): React.JSX.Element {\n const checked = optimisticBool ?? !!value;\n return (\n <div className=\"inline-flex items-center gap-element\">\n {booleanSaving && (\n <span className=\"text-muted-foreground\" aria-hidden=\"true\">\n {renderIcon(StandardIconReference.LOADER_2, {\n size: IconSize.SM,\n className: 'animate-spin motion-reduce:animate-none',\n })}\n </span>\n )}\n {saveErrorMessage && !booleanSaving && (\n <span className=\"text-destructive text-xs\" role=\"alert\">{saveErrorMessage}</span>\n )}\n <SwitchRoot\n checked={checked}\n onCheckedChange={handleBooleanToggle}\n disabled={booleanSaving}\n aria-label={label || fieldName || undefined}\n />\n </div>\n );\n }\n\n function renderInlineEditTrigger(): React.JSX.Element {\n return (\n <Button\n type=\"button\"\n variant={ButtonVariants_Variant.GHOST}\n className={cn(\"group relative inline-flex items-center gap-element h-auto px-card-sm py-item-xs\")}\n onClick={() => {\n if (fieldName) {\n logDebug('inline edit start', { fieldName });\n }\n setEditState(InlineEditState.EDITING);\n }}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_FORM_FIELD, 'editField', { label: label || fieldName || '' })}\n >\n <span className=\"flex-1\">{renderDisplayValue()}</span>\n <span className=\"text-muted-foreground opacity-0 group-hover:opacity-100 motion-safe:transition-opacity\">\n {renderIcon(StandardIconReference.EDIT, { size: IconSize.SM })}\n </span>\n </Button>\n );\n }\n\n function renderInlineEditForm(): React.JSX.Element {\n const errorAlertId = fieldName ? `inline-edit-error-${fieldName.replace(/\\./g, '-')}` : undefined;\n const hasError = editState === InlineEditState.ERROR && !!saveErrorMessage;\n\n return (\n <FormSchemaProvider\n schema={formSchema}\n // This surface wraps a single field from the resource's MAIN schema, not an operation\n // request DTO. Declaring it is what lets `FormField` ask the right clearability question:\n // on a main schema an ordinary `.optional()` field does not accept `null`, so the\n // request-DTO question would report every clearable field un-clearable — which left\n // refined optional fields (colour, email, url) impossible to empty inline.\n schemaKind={FormSchemaKind.MAIN_SCHEMA}\n form={form}\n resourceType={resourceDisplayContext.resourceType}\n resourceId={resourceDisplayContext.resourceId}\n operationType={CoreResourceOperation.UPDATE}\n contextResourceIdentifiers={resourceDisplayContext.contextResourceIdentifiers}\n navigationZone={resourceDisplayContext.navigationZone}\n >\n <div\n ref={containerRef}\n className=\"inline-flex flex-col gap-item-xs min-w-[200px]\"\n onBlur={handleContainerBlur}\n onKeyDown={handleKeyDown}\n aria-describedby={hasError ? errorAlertId : undefined}\n >\n <div className=\"flex items-start gap-element\">\n <div className=\"flex-1\">\n <FormField\n name={fieldKey}\n quickCreateSourceFieldName={relationshipInlineEditSurface?.sourceFieldName}\n schema={schema}\n label=\"\"\n description=\"\"\n disabled={isSaving}\n placeholder={label}\n enumLabels={enumLabels}\n respectSurfaceErrorPlacement={false}\n fileUploadContext={inlineFileEndpoints\n ? { [fieldKey]: inlineFileEndpoints }\n : undefined}\n className=\"inline-edit-field\"\n />\n </div>\n\n <div className=\"flex items-center gap-item-xs shrink-0 pt-item-xs\">\n {editState === InlineEditState.SAVED && (\n <div className={successIndicatorRecipe.base} aria-hidden=\"true\">\n {renderIcon(StandardIconReference.CHECK, { size: IconSize.SM })}\n </div>\n )}\n\n {params.showSaveButton && editState !== InlineEditState.SAVED && (\n <Button\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.DEFAULT}\n onClick={handleSave}\n disabled={isSaving}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'save')}\n >\n {editState === InlineEditState.SAVING\n ? renderIcon(StandardIconReference.LOADER_2, {\n size: IconSize.SM,\n className: 'animate-spin motion-reduce:animate-none'\n })\n : renderIcon(StandardIconReference.CHECK, { size: IconSize.SM })\n }\n </Button>\n )}\n\n {params.showCancelButton && (\n <Button\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.GHOST}\n onClick={handleCancel}\n disabled={isSaving}\n aria-label={tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'cancel')}\n >\n {renderIcon(StandardIconReference.CLOSE, { size: IconSize.SM })}\n </Button>\n )}\n </div>\n </div>\n\n {hasError && (\n <Alert id={errorAlertId} variant=\"destructive\" role=\"alert\" className=\"flex items-center gap-element py-card-sm\">\n {renderIcon(StandardIconReference.ERROR, {\n size: IconSize.SM,\n className: 'shrink-0'\n })}\n <AlertDescription className=\"flex-1 m-0\">\n <Text>{saveErrorMessage}</Text>\n </AlertDescription>\n {(() => {\n const retryLabel = tComponent(FrontendComponentType.LOW_LEVEL_BUTTON, 'retry');\n return (\n <Button\n ref={retryButtonRef}\n type=\"button\"\n size={ButtonSize.SM}\n variant={ButtonVariants_Variant.GHOST}\n onClick={handleSave}\n disabled={isSaving}\n aria-label={retryLabel}\n title={retryLabel}\n >\n {renderIcon(StandardIconReference.TRY_AGAIN, { size: IconSize.SM })}\n </Button>\n );\n })()}\n </Alert>\n )}\n </div>\n </FormSchemaProvider>\n );\n }\n\n if (!isReady) return null;\n\n // ── Determine content based on edit state ──\n let content: React.JSX.Element;\n if (schemaType === FieldSchemaType.BOOLEAN && fieldName) {\n // Inline-editable boolean → live toggle-in-place Switch (T4b), no overlay.\n content = renderBooleanToggle();\n } else if (isInEditMode && fieldName && supportsInlineFileEditing) {\n content = renderInlineEditForm();\n } else if (!supportsInlineFileEditing) {\n content = renderDisplayValue();\n } else {\n content = renderInlineEditTrigger();\n }\n\n return (\n <DisplayFieldChrome\n mode={resolvedChromeMode}\n label={label}\n description={description}\n tooltip={tooltip}\n provenance={provenance}\n name={fieldName}\n labelPlacement={resolvedLabelPlacement}\n hideLabel={hideLabel}\n hideDescription={hideDescription}\n className={className}\n >\n {content}\n </DisplayFieldChrome>\n );\n}\n\nDisplayFieldEditable.displayName = 'DisplayFieldEditable';\n"]}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import React from 'react';
|
|
31
31
|
import { z } from 'zod';
|
|
32
|
-
import { ArrayObjectItemLayout, type SoloSectionMode } from '@wildo-ai/zod-decorators';
|
|
32
|
+
import { ArrayObjectItemLayout, DisplayChromeMode, type SoloSectionMode } from '@wildo-ai/zod-decorators';
|
|
33
33
|
export interface DisplayFieldEditableArrayProps {
|
|
34
34
|
/** The array field name (dot path) — also the PATCH key for the whole-array update. */
|
|
35
35
|
name: string;
|
|
@@ -54,10 +54,20 @@ export interface DisplayFieldEditableArrayProps {
|
|
|
54
54
|
renderField?: (name: string, schema: z.ZodTypeAny) => React.ReactNode;
|
|
55
55
|
/** Array section-frame appearance — forwarded to `AutomatedArrayField`. */
|
|
56
56
|
sectionAppearance?: SoloSectionMode;
|
|
57
|
+
/**
|
|
58
|
+
* The display chrome the read pane resolved for this field. A settings-row pane (`SETTINGS_ROW`) edits the
|
|
59
|
+
* array as one row of that list — its edit-mode counterpart — instead of a section between the rows.
|
|
60
|
+
*/
|
|
61
|
+
displayChromeMode?: DisplayChromeMode;
|
|
57
62
|
/** Per-placement item-layout override — forwarded to `AutomatedArrayField`. */
|
|
58
63
|
objectItemLayout?: ArrayObjectItemLayout;
|
|
64
|
+
/**
|
|
65
|
+
* Words for an enum array's options, keyed by value — the dictionary `DisplayField` resolved for this field.
|
|
66
|
+
* Forwarded to `AutomatedArrayField`, whose checkbox group otherwise named each option by its raw value.
|
|
67
|
+
*/
|
|
68
|
+
enumLabels?: Record<string, string>;
|
|
59
69
|
}
|
|
60
|
-
declare function DisplayFieldEditableArrayComponent({ name, schema, value, label, description, doInlineUpdate, renderField, sectionAppearance, objectItemLayout, }: DisplayFieldEditableArrayProps): React.JSX.Element;
|
|
70
|
+
declare function DisplayFieldEditableArrayComponent({ name, schema, value, label, description, doInlineUpdate, renderField, sectionAppearance, displayChromeMode, objectItemLayout, enumLabels, }: DisplayFieldEditableArrayProps): React.JSX.Element;
|
|
61
71
|
declare namespace DisplayFieldEditableArrayComponent {
|
|
62
72
|
var displayName: string;
|
|
63
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldEditableArray.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditableArray.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DisplayFieldEditableArray.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditableArray.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAkB,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAS1H,MAAM,WAAW,8BAA8B;IAC7C,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,2EAA2E;IAC3E,KAAK,EAAE,OAAO,CAAC;IACf,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,UAAU,KAAK,KAAK,CAAC,SAAS,CAAC;IACtE,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,eAAe,CAAC;IACpC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;IACzC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,iBAAS,kCAAkC,CAAC,EAC1C,IAAI,EACJ,MAAM,EACN,KAAK,EACL,KAAK,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GACX,EAAE,8BAA8B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAuIpD;kBAnJQ,kCAAkC;;;AAuJ3C,eAAO,MAAM,yBAAyB,2CAAqC,CAAC"}
|
|
@@ -32,13 +32,14 @@ import { useMemo, useCallback, useEffect, useRef } from 'react';
|
|
|
32
32
|
import { z } from 'zod';
|
|
33
33
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
34
34
|
import { FrontendComponentType } from '@wildo-ai/presets-components-models';
|
|
35
|
+
import { DisplayChromeMode, EditChromeMode } from '@wildo-ai/zod-decorators';
|
|
35
36
|
import { CoreResourceOperation } from '@wildo-ai/saas-models';
|
|
36
37
|
import { AutomatedArrayField } from '../form/automated/AutomatedArrayField.js';
|
|
37
38
|
import { AutosaveProvider } from '../form/automated/AutosaveContext.js';
|
|
38
39
|
import { FormSchemaProvider } from '../../components/form/form-context.js';
|
|
39
40
|
import { useResourceDisplayContext } from './automatic-displayer.utils.js';
|
|
40
41
|
import { useI18n } from '../../core/i18n/useI18n.js';
|
|
41
|
-
function DisplayFieldEditableArrayComponent({ name, schema, value, label, description, doInlineUpdate, renderField, sectionAppearance, objectItemLayout, }) {
|
|
42
|
+
function DisplayFieldEditableArrayComponent({ name, schema, value, label, description, doInlineUpdate, renderField, sectionAppearance, displayChromeMode, objectItemLayout, enumLabels, }) {
|
|
42
43
|
// The local editing form is a single-field object wrapping the array, keyed by the field's
|
|
43
44
|
// LAST path segment (`fieldKey`) — mirroring `DisplayFieldEditable`. This keeps the form
|
|
44
45
|
// schema (`z.object({ [fieldKey]: schema })`), the seeded value, and `AutomatedArrayField`'s
|
|
@@ -129,7 +130,7 @@ function DisplayFieldEditableArrayComponent({ name, schema, value, label, descri
|
|
|
129
130
|
// quick-add row) call `useFormSchemaContext()` to resolve item sub-schemas + labels.
|
|
130
131
|
// Without it they throw "must be used within a FormSchemaProvider". This mirrors the
|
|
131
132
|
// scalar `DisplayFieldEditable`, which wraps its inline `FormField` the same way.
|
|
132
|
-
return (_jsx(FormProvider, { ...form, children: _jsx(FormSchemaProvider, { schema: formSchema, form: form, resourceType: resourceDisplayContext.resourceType, resourceId: resourceDisplayContext.resourceId, operationType: CoreResourceOperation.UPDATE, contextResourceIdentifiers: resourceDisplayContext.contextResourceIdentifiers, navigationZone: resourceDisplayContext.navigationZone, children: _jsx(AutosaveProvider, { onSave: handleSave, labels: autosaveLabels, config: autosaveConfig, children: _jsx("div", { ref: editorRef, children: _jsx(AutomatedArrayField, { name: fieldKey, schema: schema, label: label, description: description, renderField: renderField, sectionAppearance: sectionAppearance, objectItemLayout: objectItemLayout }) }) }) }) }));
|
|
133
|
+
return (_jsx(FormProvider, { ...form, children: _jsx(FormSchemaProvider, { schema: formSchema, form: form, resourceType: resourceDisplayContext.resourceType, resourceId: resourceDisplayContext.resourceId, operationType: CoreResourceOperation.UPDATE, contextResourceIdentifiers: resourceDisplayContext.contextResourceIdentifiers, navigationZone: resourceDisplayContext.navigationZone, children: _jsx(AutosaveProvider, { onSave: handleSave, labels: autosaveLabels, config: autosaveConfig, children: _jsx("div", { ref: editorRef, children: _jsx(AutomatedArrayField, { name: fieldKey, schema: schema, label: label, description: description, renderField: renderField, sectionAppearance: sectionAppearance, objectItemLayout: objectItemLayout, enumLabels: enumLabels, chromeMode: displayChromeMode === DisplayChromeMode.SETTINGS_ROW ? EditChromeMode.SETTINGS_ROW : undefined }) }) }) }) }));
|
|
133
134
|
}
|
|
134
135
|
DisplayFieldEditableArrayComponent.displayName = 'DisplayFieldEditableArray';
|
|
135
136
|
export const DisplayFieldEditableArray = DisplayFieldEditableArrayComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldEditableArray.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditableArray.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAc,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAyD,MAAM,mCAAmC,CAAC;AAC5H,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,EAA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AqF;IACrF,kFAAkF;IAClF,OAAO,CACL,KAAC,YAAY,OAAK,IAAI,YACpB,KAAC,kBAAkB,IACjB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,sBAAsB,CAAC,YAAY,EACjD,UAAU,EAAE,sBAAsB,CAAC,UAAU,EAC7C,aAAa,EAAE,qBAAqB,CAAC,MAAM,EAC3C,0BAA0B,EAAE,sBAAsB,CAAC,0BAA0B,EAC7E,cAAc,EAAE,sBAAsB,CAAC,cAAc,YAErD,KAAC,gBAAgB,IAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,YAIlF,cAAK,GAAG,EAAE,SAAS,YACjB,KAAC,mBAAmB,IAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,GAC/L,GACW,GACA,GACR,CAChB,CAAC;AACJ,CAAC;AAED,kCAAkC,CAAC,WAAW,GAAG,2BAA2B,CAAC;AAE7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,CAAC","sourcesContent":["/**\n * DisplayFieldEditableArray — read-side inline editor for an `@inlineEditable()` ARRAY\n * field (the checklist case).\n *\n * Unlike {@link DisplayFieldEditable} (a click-to-edit overlay for a single scalar\n * value), an array needs a PERSISTENT inline editor: add a row, edit items in place,\n * remove, and reorder — every change autosaved as the WHOLE array in one PATCH. Rather\n * than rebuild that surface, this component **reuses `AutomatedArrayField` verbatim** (its\n * quick-add row, per-item cards, drag-and-drop, primary-field summary header, and the\n * validate-before-add flow) by mounting it inside a LOCAL form context on a read view:\n *\n * - `useForm` seeds a local RHF form with `{ [name]: serverArrayValue }`. The form is\n * the editing source of truth; `AutomatedArrayField` drives it through `useFieldArray`.\n * - `AutosaveProvider onSave` bridges the form's whole-array autosave\n * (`AutomatedArrayField.afterArrayMutation` → `triggerSave(name, array, DEBOUNCE)`) to the\n * read-side {@link ResourceDisplayContextValue.doInlineUpdate}, which PATCHes\n * `{ [name]: array }` via the resource mutation manager (no form/AutosaveProvider\n * exists on read surfaces — `useOptionalAutosave()` would otherwise return null).\n *\n * The form is seeded on mount from the server value (DisplayField gates this behind its\n * loading skeleton, so the value is present). **External changes re-sync into the editor:**\n * the `value` prop is RMM-backed (`ResourceAutomaticDisplayer` renders from\n * `rmmSnapshot.optimisticData`), so a remote UPDATE (another tab / another user, delivered\n * via `RMMWebSocketBridge` → `applyRemoteUpdate`) flows in as a new `value`. RHF ignores\n * post-mount `defaultValues` changes, so we reconcile explicitly with `form.reset` — but\n * NOT while the user is typing inside this editor (focus guard), so remote updates never\n * clobber in-progress keystrokes. A window that is actively editing reconciles once it is\n * idle and the next `value` change lands (the ACCEPT_REMOTE conflict cycle drives that).\n */\n\nimport React, { useMemo, useCallback, useEffect, useRef } from 'react';\nimport { z } from 'zod';\nimport { useForm, FormProvider } from 'react-hook-form';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ArrayObjectItemLayout, type SoloSectionMode } from '@wildo-ai/zod-decorators';\nimport { CoreResourceOperation } from '@wildo-ai/saas-models';\n\nimport { AutomatedArrayField } from '../form/automated/AutomatedArrayField';\nimport { AutosaveProvider, type AutosaveSaveHandler, type AutosaveProviderLabels } from '../form/automated/AutosaveContext';\nimport { FormSchemaProvider } from '~wildo-frontend-lib/components/form/form-context';\nimport { useResourceDisplayContext } from './automatic-displayer.utils';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\n\nexport interface DisplayFieldEditableArrayProps {\n /** The array field name (dot path) — also the PATCH key for the whole-array update. */\n name: string;\n /** The array field schema (`z.array(...)`) — carries item schema + arrayUI config. */\n schema: z.ZodTypeAny;\n /** The current server value (the array). Seeds the local form on mount. */\n value: unknown;\n /** Field label — rendered as the array section legend by `AutomatedArrayField`. */\n label: string;\n description?: string;\n /**\n * Read-side persistence: PATCHes `{ [fieldName]: value }` via the resource mutation\n * manager (`type: INLINE`). Supplied by `DisplayField` from `ResourceDisplayContext`.\n */\n doInlineUpdate: (fieldName: string, value: unknown) => Promise<void>;\n /**\n * Optional per-item TEMPLATE (the `renderItem` render-prop). Forwarded verbatim\n * to `AutomatedArrayField.renderField` so an authored item template drives the\n * inline-editable rows too (the item path it receives is scoped to the local\n * single-field form, e.g. `checklist.0`).\n */\n renderField?: (name: string, schema: z.ZodTypeAny) => React.ReactNode;\n /** Array section-frame appearance — forwarded to `AutomatedArrayField`. */\n sectionAppearance?: SoloSectionMode;\n /** Per-placement item-layout override — forwarded to `AutomatedArrayField`. */\n objectItemLayout?: ArrayObjectItemLayout;\n}\n\nfunction DisplayFieldEditableArrayComponent({\n name,\n schema,\n value,\n label,\n description,\n doInlineUpdate,\n renderField,\n sectionAppearance,\n objectItemLayout,\n}: DisplayFieldEditableArrayProps): React.JSX.Element {\n // The local editing form is a single-field object wrapping the array, keyed by the field's\n // LAST path segment (`fieldKey`) — mirroring `DisplayFieldEditable`. This keeps the form\n // schema (`z.object({ [fieldKey]: schema })`), the seeded value, and `AutomatedArrayField`'s\n // own `useFieldArray(fieldKey)` in agreement. The FULL `name` stays the PATCH key used by\n // `doInlineUpdate` (the whole-array update target on the resource). A dot-pathed nested array\n // (`exportProjection.disclosedTiers`, inside an `ObjectScope`) is queued under that dotted\n // path and shaped into the resource's own nesting — whole parent, siblings kept — where the\n // body is built: `buildWireRequestData` in the RMM, `buildInlineUpdateRequestData` on the\n // direct fallback. It used to go out as a flat dotted key that the server dropped with a 200\n // (#1395).\n const fieldKey = useMemo(\n () => (name.includes('.') ? name.split('.').pop()! : name),\n [name],\n );\n\n const formSchema = useMemo(() => z.object({ [fieldKey]: schema }), [fieldKey, schema]);\n\n // Seed the local form from the server array. Memoised on (fieldKey, value) so a re-render\n // with the SAME value doesn't churn the default values object.\n const defaultValues = useMemo(\n () => ({ [fieldKey]: Array.isArray(value) ? value : [] }),\n [fieldKey, value],\n );\n\n // `mode: 'onChange'` so item-field edits validate live (mirrors inline-edit\n // responsiveness); AutomatedArrayField additionally re-validates the whole array after every\n // add/remove/move via `trigger(fieldKey)`.\n //\n // NO form-level `resolver`: validation is owned by `AutomatedArrayField`'s quick-add\n // validate-before-add (which reads the item schema from the FormSchemaProvider below).\n // Attaching a schema resolver (`zodIssueResolver(formSchema)`) here makes `AutosaveContext.executeSave`'s\n // `formContext.trigger(fieldKey)` gate fail — it validates form INPUT against the\n // **responseDto** field schema (a response/parse contract, not an input contract) and\n // spuriously rejects valid items, silently swallowing the whole-array autosave PATCH.\n const form = useForm({ defaultValues, mode: 'onChange' });\n\n // ── Remote re-sync ──\n // RHF only applies `defaultValues` at mount, so a changed `value` prop (a\n // remote RMM update from another tab / user) would otherwise be ignored and\n // the editor would show stale rows. Reconcile with `form.reset`, keyed by a\n // serialized snapshot of the last-seeded array so we only reset on a REAL\n // change (not on every re-render or the identity churn of the user's own\n // optimistic echo). The focus guard is the \"don't reset mid-edit\" rule from\n // the scalar `DisplayFieldEditable`: if the caret is inside this editor we\n // skip — reconciliation rides the next `value` change that lands while the\n // editor is idle (e.g. after the editing window's autosave + ACCEPT_REMOTE\n // re-broadcast), so live keystrokes are never yanked out from under the user.\n const editorRef = useRef<HTMLDivElement>(null);\n const lastSeededSerializedRef = useRef<string>(JSON.stringify(Array.isArray(value) ? value : []));\n useEffect(() => {\n const nextArray = Array.isArray(value) ? value : [];\n const serialized = JSON.stringify(nextArray);\n if (serialized === lastSeededSerializedRef.current) {\n return;\n }\n const active = typeof document !== 'undefined' ? document.activeElement : null;\n if (active && editorRef.current?.contains(active)) {\n return;\n }\n form.reset({ [fieldKey]: nextArray });\n lastSeededSerializedRef.current = serialized;\n }, [value, form, fieldKey]);\n\n // Read-side resource context — forwarded to FormSchemaProvider so item FormFields resolve\n // i18n labels / FK context exactly as they do inside a full resource form.\n const resourceDisplayContext = useResourceDisplayContext();\n\n // Autosave config — MUST be `enabled: true`. `AutosaveProvider`'s default config is\n // `{ enabled: false }`, and `triggerSave` no-ops when disabled — so without this the\n // whole-array PATCH never fires after a quick-add/edit/remove/reorder. Memoised so the\n // provider's merged-config useMemo doesn't churn every render. (debounceMs defaults to 500.)\n const autosaveConfig = useMemo(() => ({ enabled: true }), []);\n\n // Autosave feedback labels (error states). Reuses the canonical create-layout autosave\n // error i18n keys — the same strings the form's AutosaveProvider shows.\n const { tComponent } = useI18n({ component: FrontendComponentType.RESOURCES_LAYOUTS_CREATE });\n const autosaveLabels = useMemo<AutosaveProviderLabels>(\n () => ({\n errorNetwork: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorNetwork'),\n errorValidation: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorValidation'),\n errorGeneric: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorGeneric'),\n errorConflict: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorConflict'),\n errorResourceDeleted: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorResourceDeleted'),\n }),\n [tComponent],\n );\n\n // Bridge the form-side autosave to the read-side inline-update path. The read-inline editor\n // persists the WHOLE array ATOMICALLY (`doInlineUpdate(name, wholeArray)` → one PATCH).\n //\n // The bridged autosave fires from TWO sources, and we must treat both identically:\n // 1. `AutomatedArrayField.afterArrayMutation` (add / remove / reorder) — passes the whole array.\n // 2. An item's own `FormField` per-field autosave (toggling `done`, editing a `label`) —\n // passes the INDIVIDUAL field path + value (e.g. `checklist.0.done` = `true`).\n // Forwarding case (2)'s raw value would PATCH `{ checklist: true }` — a boolean where the\n // resource expects an array (400 `expected array, received boolean`). So we IGNORE the\n // per-call `fieldName`/`fieldValue` and always read + send the current WHOLE array from the\n // form, under the array field `name`. (The field-level edit is already committed to the form\n // by the time its autosave fires, so `getValues` reflects it.)\n const handleSave = useCallback<AutosaveSaveHandler>(\n async () => {\n const wholeArray = form.getValues(fieldKey);\n await doInlineUpdate(name, wholeArray);\n },\n [doInlineUpdate, name, form, fieldKey],\n );\n\n // `FormSchemaProvider` is REQUIRED: `AutomatedArrayField`'s item `FormField`s (and the\n // quick-add row) call `useFormSchemaContext()` to resolve item sub-schemas + labels.\n // Without it they throw \"must be used within a FormSchemaProvider\". This mirrors the\n // scalar `DisplayFieldEditable`, which wraps its inline `FormField` the same way.\n return (\n <FormProvider {...form}>\n <FormSchemaProvider\n schema={formSchema}\n form={form}\n resourceType={resourceDisplayContext.resourceType}\n resourceId={resourceDisplayContext.resourceId}\n operationType={CoreResourceOperation.UPDATE}\n contextResourceIdentifiers={resourceDisplayContext.contextResourceIdentifiers}\n navigationZone={resourceDisplayContext.navigationZone}\n >\n <AutosaveProvider onSave={handleSave} labels={autosaveLabels} config={autosaveConfig}>\n {/* `editorRef` scopes the remote-re-sync focus guard: a `form.reset`\n from an incoming remote update is skipped while the caret is inside\n this subtree (see the reconcile effect above). */}\n <div ref={editorRef}>\n <AutomatedArrayField name={fieldKey} schema={schema} label={label} description={description} renderField={renderField} sectionAppearance={sectionAppearance} objectItemLayout={objectItemLayout} />\n </div>\n </AutosaveProvider>\n </FormSchemaProvider>\n </FormProvider>\n );\n}\n\nDisplayFieldEditableArrayComponent.displayName = 'DisplayFieldEditableArray';\n\nexport const DisplayFieldEditableArray = DisplayFieldEditableArrayComponent;\n"]}
|
|
1
|
+
{"version":3,"file":"DisplayFieldEditableArray.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldEditableArray.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAc,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,YA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AC,YAAY,CAAC,CAAC,CAAC,SAAS,GAAI,GAC5G,GACW,GACA,GACR,CAChB,CAAC;AACJ,CAAC;AAED,kCAAkC,CAAC,WAAW,GAAG,2BAA2B,CAAC;AAE7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,kCAAkC,CAAC","sourcesContent":["/**\n * DisplayFieldEditableArray — read-side inline editor for an `@inlineEditable()` ARRAY\n * field (the checklist case).\n *\n * Unlike {@link DisplayFieldEditable} (a click-to-edit overlay for a single scalar\n * value), an array needs a PERSISTENT inline editor: add a row, edit items in place,\n * remove, and reorder — every change autosaved as the WHOLE array in one PATCH. Rather\n * than rebuild that surface, this component **reuses `AutomatedArrayField` verbatim** (its\n * quick-add row, per-item cards, drag-and-drop, primary-field summary header, and the\n * validate-before-add flow) by mounting it inside a LOCAL form context on a read view:\n *\n * - `useForm` seeds a local RHF form with `{ [name]: serverArrayValue }`. The form is\n * the editing source of truth; `AutomatedArrayField` drives it through `useFieldArray`.\n * - `AutosaveProvider onSave` bridges the form's whole-array autosave\n * (`AutomatedArrayField.afterArrayMutation` → `triggerSave(name, array, DEBOUNCE)`) to the\n * read-side {@link ResourceDisplayContextValue.doInlineUpdate}, which PATCHes\n * `{ [name]: array }` via the resource mutation manager (no form/AutosaveProvider\n * exists on read surfaces — `useOptionalAutosave()` would otherwise return null).\n *\n * The form is seeded on mount from the server value (DisplayField gates this behind its\n * loading skeleton, so the value is present). **External changes re-sync into the editor:**\n * the `value` prop is RMM-backed (`ResourceAutomaticDisplayer` renders from\n * `rmmSnapshot.optimisticData`), so a remote UPDATE (another tab / another user, delivered\n * via `RMMWebSocketBridge` → `applyRemoteUpdate`) flows in as a new `value`. RHF ignores\n * post-mount `defaultValues` changes, so we reconcile explicitly with `form.reset` — but\n * NOT while the user is typing inside this editor (focus guard), so remote updates never\n * clobber in-progress keystrokes. A window that is actively editing reconciles once it is\n * idle and the next `value` change lands (the ACCEPT_REMOTE conflict cycle drives that).\n */\n\nimport React, { useMemo, useCallback, useEffect, useRef } from 'react';\nimport { z } from 'zod';\nimport { useForm, FormProvider } from 'react-hook-form';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { ArrayObjectItemLayout, DisplayChromeMode, EditChromeMode, type SoloSectionMode } from '@wildo-ai/zod-decorators';\nimport { CoreResourceOperation } from '@wildo-ai/saas-models';\n\nimport { AutomatedArrayField } from '../form/automated/AutomatedArrayField';\nimport { AutosaveProvider, type AutosaveSaveHandler, type AutosaveProviderLabels } from '../form/automated/AutosaveContext';\nimport { FormSchemaProvider } from '~wildo-frontend-lib/components/form/form-context';\nimport { useResourceDisplayContext } from './automatic-displayer.utils';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\n\nexport interface DisplayFieldEditableArrayProps {\n /** The array field name (dot path) — also the PATCH key for the whole-array update. */\n name: string;\n /** The array field schema (`z.array(...)`) — carries item schema + arrayUI config. */\n schema: z.ZodTypeAny;\n /** The current server value (the array). Seeds the local form on mount. */\n value: unknown;\n /** Field label — rendered as the array section legend by `AutomatedArrayField`. */\n label: string;\n description?: string;\n /**\n * Read-side persistence: PATCHes `{ [fieldName]: value }` via the resource mutation\n * manager (`type: INLINE`). Supplied by `DisplayField` from `ResourceDisplayContext`.\n */\n doInlineUpdate: (fieldName: string, value: unknown) => Promise<void>;\n /**\n * Optional per-item TEMPLATE (the `renderItem` render-prop). Forwarded verbatim\n * to `AutomatedArrayField.renderField` so an authored item template drives the\n * inline-editable rows too (the item path it receives is scoped to the local\n * single-field form, e.g. `checklist.0`).\n */\n renderField?: (name: string, schema: z.ZodTypeAny) => React.ReactNode;\n /** Array section-frame appearance — forwarded to `AutomatedArrayField`. */\n sectionAppearance?: SoloSectionMode;\n /**\n * The display chrome the read pane resolved for this field. A settings-row pane (`SETTINGS_ROW`) edits the\n * array as one row of that list — its edit-mode counterpart — instead of a section between the rows.\n */\n displayChromeMode?: DisplayChromeMode;\n /** Per-placement item-layout override — forwarded to `AutomatedArrayField`. */\n objectItemLayout?: ArrayObjectItemLayout;\n /**\n * Words for an enum array's options, keyed by value — the dictionary `DisplayField` resolved for this field.\n * Forwarded to `AutomatedArrayField`, whose checkbox group otherwise named each option by its raw value.\n */\n enumLabels?: Record<string, string>;\n}\n\nfunction DisplayFieldEditableArrayComponent({\n name,\n schema,\n value,\n label,\n description,\n doInlineUpdate,\n renderField,\n sectionAppearance,\n displayChromeMode,\n objectItemLayout,\n enumLabels,\n}: DisplayFieldEditableArrayProps): React.JSX.Element {\n // The local editing form is a single-field object wrapping the array, keyed by the field's\n // LAST path segment (`fieldKey`) — mirroring `DisplayFieldEditable`. This keeps the form\n // schema (`z.object({ [fieldKey]: schema })`), the seeded value, and `AutomatedArrayField`'s\n // own `useFieldArray(fieldKey)` in agreement. The FULL `name` stays the PATCH key used by\n // `doInlineUpdate` (the whole-array update target on the resource). A dot-pathed nested array\n // (`exportProjection.disclosedTiers`, inside an `ObjectScope`) is queued under that dotted\n // path and shaped into the resource's own nesting — whole parent, siblings kept — where the\n // body is built: `buildWireRequestData` in the RMM, `buildInlineUpdateRequestData` on the\n // direct fallback. It used to go out as a flat dotted key that the server dropped with a 200\n // (#1395).\n const fieldKey = useMemo(\n () => (name.includes('.') ? name.split('.').pop()! : name),\n [name],\n );\n\n const formSchema = useMemo(() => z.object({ [fieldKey]: schema }), [fieldKey, schema]);\n\n // Seed the local form from the server array. Memoised on (fieldKey, value) so a re-render\n // with the SAME value doesn't churn the default values object.\n const defaultValues = useMemo(\n () => ({ [fieldKey]: Array.isArray(value) ? value : [] }),\n [fieldKey, value],\n );\n\n // `mode: 'onChange'` so item-field edits validate live (mirrors inline-edit\n // responsiveness); AutomatedArrayField additionally re-validates the whole array after every\n // add/remove/move via `trigger(fieldKey)`.\n //\n // NO form-level `resolver`: validation is owned by `AutomatedArrayField`'s quick-add\n // validate-before-add (which reads the item schema from the FormSchemaProvider below).\n // Attaching a schema resolver (`zodIssueResolver(formSchema)`) here makes `AutosaveContext.executeSave`'s\n // `formContext.trigger(fieldKey)` gate fail — it validates form INPUT against the\n // **responseDto** field schema (a response/parse contract, not an input contract) and\n // spuriously rejects valid items, silently swallowing the whole-array autosave PATCH.\n const form = useForm({ defaultValues, mode: 'onChange' });\n\n // ── Remote re-sync ──\n // RHF only applies `defaultValues` at mount, so a changed `value` prop (a\n // remote RMM update from another tab / user) would otherwise be ignored and\n // the editor would show stale rows. Reconcile with `form.reset`, keyed by a\n // serialized snapshot of the last-seeded array so we only reset on a REAL\n // change (not on every re-render or the identity churn of the user's own\n // optimistic echo). The focus guard is the \"don't reset mid-edit\" rule from\n // the scalar `DisplayFieldEditable`: if the caret is inside this editor we\n // skip — reconciliation rides the next `value` change that lands while the\n // editor is idle (e.g. after the editing window's autosave + ACCEPT_REMOTE\n // re-broadcast), so live keystrokes are never yanked out from under the user.\n const editorRef = useRef<HTMLDivElement>(null);\n const lastSeededSerializedRef = useRef<string>(JSON.stringify(Array.isArray(value) ? value : []));\n useEffect(() => {\n const nextArray = Array.isArray(value) ? value : [];\n const serialized = JSON.stringify(nextArray);\n if (serialized === lastSeededSerializedRef.current) {\n return;\n }\n const active = typeof document !== 'undefined' ? document.activeElement : null;\n if (active && editorRef.current?.contains(active)) {\n return;\n }\n form.reset({ [fieldKey]: nextArray });\n lastSeededSerializedRef.current = serialized;\n }, [value, form, fieldKey]);\n\n // Read-side resource context — forwarded to FormSchemaProvider so item FormFields resolve\n // i18n labels / FK context exactly as they do inside a full resource form.\n const resourceDisplayContext = useResourceDisplayContext();\n\n // Autosave config — MUST be `enabled: true`. `AutosaveProvider`'s default config is\n // `{ enabled: false }`, and `triggerSave` no-ops when disabled — so without this the\n // whole-array PATCH never fires after a quick-add/edit/remove/reorder. Memoised so the\n // provider's merged-config useMemo doesn't churn every render. (debounceMs defaults to 500.)\n const autosaveConfig = useMemo(() => ({ enabled: true }), []);\n\n // Autosave feedback labels (error states). Reuses the canonical create-layout autosave\n // error i18n keys — the same strings the form's AutosaveProvider shows.\n const { tComponent } = useI18n({ component: FrontendComponentType.RESOURCES_LAYOUTS_CREATE });\n const autosaveLabels = useMemo<AutosaveProviderLabels>(\n () => ({\n errorNetwork: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorNetwork'),\n errorValidation: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorValidation'),\n errorGeneric: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorGeneric'),\n errorConflict: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorConflict'),\n errorResourceDeleted: tComponent(FrontendComponentType.RESOURCES_LAYOUTS_CREATE, 'autosaveErrorResourceDeleted'),\n }),\n [tComponent],\n );\n\n // Bridge the form-side autosave to the read-side inline-update path. The read-inline editor\n // persists the WHOLE array ATOMICALLY (`doInlineUpdate(name, wholeArray)` → one PATCH).\n //\n // The bridged autosave fires from TWO sources, and we must treat both identically:\n // 1. `AutomatedArrayField.afterArrayMutation` (add / remove / reorder) — passes the whole array.\n // 2. An item's own `FormField` per-field autosave (toggling `done`, editing a `label`) —\n // passes the INDIVIDUAL field path + value (e.g. `checklist.0.done` = `true`).\n // Forwarding case (2)'s raw value would PATCH `{ checklist: true }` — a boolean where the\n // resource expects an array (400 `expected array, received boolean`). So we IGNORE the\n // per-call `fieldName`/`fieldValue` and always read + send the current WHOLE array from the\n // form, under the array field `name`. (The field-level edit is already committed to the form\n // by the time its autosave fires, so `getValues` reflects it.)\n const handleSave = useCallback<AutosaveSaveHandler>(\n async () => {\n const wholeArray = form.getValues(fieldKey);\n await doInlineUpdate(name, wholeArray);\n },\n [doInlineUpdate, name, form, fieldKey],\n );\n\n // `FormSchemaProvider` is REQUIRED: `AutomatedArrayField`'s item `FormField`s (and the\n // quick-add row) call `useFormSchemaContext()` to resolve item sub-schemas + labels.\n // Without it they throw \"must be used within a FormSchemaProvider\". This mirrors the\n // scalar `DisplayFieldEditable`, which wraps its inline `FormField` the same way.\n return (\n <FormProvider {...form}>\n <FormSchemaProvider\n schema={formSchema}\n form={form}\n resourceType={resourceDisplayContext.resourceType}\n resourceId={resourceDisplayContext.resourceId}\n operationType={CoreResourceOperation.UPDATE}\n contextResourceIdentifiers={resourceDisplayContext.contextResourceIdentifiers}\n navigationZone={resourceDisplayContext.navigationZone}\n >\n <AutosaveProvider onSave={handleSave} labels={autosaveLabels} config={autosaveConfig}>\n {/* `editorRef` scopes the remote-re-sync focus guard: a `form.reset`\n from an incoming remote update is skipped while the caret is inside\n this subtree (see the reconcile effect above). */}\n <div ref={editorRef}>\n <AutomatedArrayField name={fieldKey} schema={schema} label={label} description={description} renderField={renderField} sectionAppearance={sectionAppearance} objectItemLayout={objectItemLayout} enumLabels={enumLabels}\n chromeMode={displayChromeMode === DisplayChromeMode.SETTINGS_ROW ? EditChromeMode.SETTINGS_ROW : undefined} />\n </div>\n </AutosaveProvider>\n </FormSchemaProvider>\n </FormProvider>\n );\n}\n\nDisplayFieldEditableArrayComponent.displayName = 'DisplayFieldEditableArray';\n\nexport const DisplayFieldEditableArray = DisplayFieldEditableArrayComponent;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldReadOnly.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAQhF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"DisplayFieldReadOnly.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAQhF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwExF;yBAxEe,oBAAoB"}
|
|
@@ -13,7 +13,7 @@ import { DisplayValueDispatcher } from './DisplayValueDispatcher.js';
|
|
|
13
13
|
// COMPONENT
|
|
14
14
|
// =============================================================================
|
|
15
15
|
export function DisplayFieldReadOnly(props) {
|
|
16
|
-
const { schema, schemaType, value, fieldName, label, description, tooltip, enumLabels, displayComponent, parentData, resourceLinkTrail, renderItem, className, hideLabel, hideDescription, resolvedChromeMode, resolvedLabelPlacement, resolvedLabelStyle, resolvedEmptyValue, fileUploadContext, } = props;
|
|
16
|
+
const { schema, schemaType, value, fieldName, label, description, tooltip, provenance, enumLabels, displayComponent, parentData, resourceLinkTrail, renderItem, className, hideLabel, hideDescription, resolvedChromeMode, resolvedLabelPlacement, resolvedLabelStyle, resolvedEmptyValue, fileUploadContext, } = props;
|
|
17
17
|
// Truncation state for arrays/objects (ROBUST-03)
|
|
18
18
|
const [showAllArrayItems, setShowAllArrayItems] = useState(false);
|
|
19
19
|
const [showAllObjectFields, setShowAllObjectFields] = useState(false);
|
|
@@ -25,7 +25,7 @@ export function DisplayFieldReadOnly(props) {
|
|
|
25
25
|
prevValueRef.current = value;
|
|
26
26
|
}
|
|
27
27
|
}, [value]);
|
|
28
|
-
return (_jsx(DisplayFieldChrome, { mode: resolvedChromeMode, label: label, labelStyle: resolvedLabelStyle, description: description, tooltip: tooltip, name: fieldName, labelPlacement: resolvedLabelPlacement, hideLabel: hideLabel, hideDescription: hideDescription, className: className, children: _jsx(DisplayValueDispatcher, { schema: schema, schemaType: schemaType, value: value, fieldName: fieldName, label: label, className: className, enumLabels: enumLabels, displayComponent: displayComponent, parentData: parentData, resourceLinkTrail: resourceLinkTrail, renderItem: renderItem, emptyValue: resolvedEmptyValue, fileUploadContext: fileUploadContext, showAllArrayItems: showAllArrayItems, onExpandArrayItems: () => setShowAllArrayItems(true), showAllObjectFields: showAllObjectFields, onExpandObjectFields: () => setShowAllObjectFields(true) }) }));
|
|
28
|
+
return (_jsx(DisplayFieldChrome, { mode: resolvedChromeMode, label: label, labelStyle: resolvedLabelStyle, description: description, tooltip: tooltip, provenance: provenance, name: fieldName, labelPlacement: resolvedLabelPlacement, hideLabel: hideLabel, hideDescription: hideDescription, className: className, children: _jsx(DisplayValueDispatcher, { schema: schema, schemaType: schemaType, value: value, fieldName: fieldName, label: label, className: className, enumLabels: enumLabels, displayComponent: displayComponent, parentData: parentData, resourceLinkTrail: resourceLinkTrail, renderItem: renderItem, emptyValue: resolvedEmptyValue, fileUploadContext: fileUploadContext, showAllArrayItems: showAllArrayItems, onExpandArrayItems: () => setShowAllArrayItems(true), showAllObjectFields: showAllObjectFields, onExpandObjectFields: () => setShowAllObjectFields(true) }) }));
|
|
29
29
|
}
|
|
30
30
|
DisplayFieldReadOnly.displayName = 'DisplayFieldReadOnly';
|
|
31
31
|
//# sourceMappingURL=DisplayFieldReadOnly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldReadOnly.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnly.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EACJ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,SAAS,EACT,eAAe,EACf,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AAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EACpD,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,GACxD,GACiB,CACtB,CAAC;AACJ,CAAC;AAED,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * DisplayFieldReadOnly — read-only display field with chrome wrapping.\n *\n * Owns truncation state (array/object \"show more\") and delegates value\n * rendering to DisplayValueDispatcher. No inline editing hooks — all\n * editing concerns live in DisplayFieldEditable.\n */\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nimport type { DisplayFieldResolvedProps } from './display-field-resolved-props';\nimport { DisplayFieldChrome } from './chromes/DisplayFieldChrome';\nimport { DisplayValueDispatcher } from './DisplayValueDispatcher';\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nexport function DisplayFieldReadOnly(props: DisplayFieldResolvedProps): React.JSX.Element {\n const {\n schema,\n schemaType,\n value,\n fieldName,\n label,\n description,\n tooltip,\n enumLabels,\n displayComponent,\n parentData,\n resourceLinkTrail,\n renderItem,\n className,\n hideLabel,\n hideDescription,\n resolvedChromeMode,\n resolvedLabelPlacement,\n resolvedLabelStyle,\n resolvedEmptyValue,\n fileUploadContext,\n } = props;\n\n // Truncation state for arrays/objects (ROBUST-03)\n const [showAllArrayItems, setShowAllArrayItems] = useState(false);\n const [showAllObjectFields, setShowAllObjectFields] = useState(false);\n const prevValueRef = useRef(value);\n useEffect(() => {\n if (prevValueRef.current !== value) {\n setShowAllArrayItems(false);\n setShowAllObjectFields(false);\n prevValueRef.current = value;\n }\n }, [value]);\n\n return (\n <DisplayFieldChrome\n mode={resolvedChromeMode}\n label={label}\n labelStyle={resolvedLabelStyle}\n description={description}\n tooltip={tooltip}\n name={fieldName}\n labelPlacement={resolvedLabelPlacement}\n hideLabel={hideLabel}\n hideDescription={hideDescription}\n className={className}\n >\n <DisplayValueDispatcher\n schema={schema}\n schemaType={schemaType}\n value={value}\n fieldName={fieldName}\n label={label}\n className={className}\n enumLabels={enumLabels}\n displayComponent={displayComponent}\n parentData={parentData}\n resourceLinkTrail={resourceLinkTrail}\n renderItem={renderItem}\n emptyValue={resolvedEmptyValue}\n fileUploadContext={fileUploadContext}\n showAllArrayItems={showAllArrayItems}\n onExpandArrayItems={() => setShowAllArrayItems(true)}\n showAllObjectFields={showAllObjectFields}\n onExpandObjectFields={() => setShowAllObjectFields(true)}\n />\n </DisplayFieldChrome>\n );\n}\n\nDisplayFieldReadOnly.displayName = 'DisplayFieldReadOnly';\n"]}
|
|
1
|
+
{"version":3,"file":"DisplayFieldReadOnly.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnly.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF,MAAM,UAAU,oBAAoB,CAAC,KAAgC;IACnE,MAAM,EACJ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,GAAG,KAAK,CAAC;IAEV,kDAAkD;IAClD,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,C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,CAAC;AAED,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["/**\n * DisplayFieldReadOnly — read-only display field with chrome wrapping.\n *\n * Owns truncation state (array/object \"show more\") and delegates value\n * rendering to DisplayValueDispatcher. No inline editing hooks — all\n * editing concerns live in DisplayFieldEditable.\n */\n\nimport React, { useState, useRef, useEffect } from 'react';\n\nimport type { DisplayFieldResolvedProps } from './display-field-resolved-props';\nimport { DisplayFieldChrome } from './chromes/DisplayFieldChrome';\nimport { DisplayValueDispatcher } from './DisplayValueDispatcher';\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nexport function DisplayFieldReadOnly(props: DisplayFieldResolvedProps): React.JSX.Element {\n const {\n schema,\n schemaType,\n value,\n fieldName,\n label,\n description,\n tooltip,\n provenance,\n enumLabels,\n displayComponent,\n parentData,\n resourceLinkTrail,\n renderItem,\n className,\n hideLabel,\n hideDescription,\n resolvedChromeMode,\n resolvedLabelPlacement,\n resolvedLabelStyle,\n resolvedEmptyValue,\n fileUploadContext,\n } = props;\n\n // Truncation state for arrays/objects (ROBUST-03)\n const [showAllArrayItems, setShowAllArrayItems] = useState(false);\n const [showAllObjectFields, setShowAllObjectFields] = useState(false);\n const prevValueRef = useRef(value);\n useEffect(() => {\n if (prevValueRef.current !== value) {\n setShowAllArrayItems(false);\n setShowAllObjectFields(false);\n prevValueRef.current = value;\n }\n }, [value]);\n\n return (\n <DisplayFieldChrome\n mode={resolvedChromeMode}\n label={label}\n labelStyle={resolvedLabelStyle}\n description={description}\n tooltip={tooltip}\n provenance={provenance}\n name={fieldName}\n labelPlacement={resolvedLabelPlacement}\n hideLabel={hideLabel}\n hideDescription={hideDescription}\n className={className}\n >\n <DisplayValueDispatcher\n schema={schema}\n schemaType={schemaType}\n value={value}\n fieldName={fieldName}\n label={label}\n className={className}\n enumLabels={enumLabels}\n displayComponent={displayComponent}\n parentData={parentData}\n resourceLinkTrail={resourceLinkTrail}\n renderItem={renderItem}\n emptyValue={resolvedEmptyValue}\n fileUploadContext={fileUploadContext}\n showAllArrayItems={showAllArrayItems}\n onExpandArrayItems={() => setShowAllArrayItems(true)}\n showAllObjectFields={showAllObjectFields}\n onExpandObjectFields={() => setShowAllObjectFields(true)}\n />\n </DisplayFieldChrome>\n );\n}\n\nDisplayFieldReadOnly.displayName = 'DisplayFieldReadOnly';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldReadOnlyArraySection.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnlyArraySection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"DisplayFieldReadOnlyArraySection.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnlyArraySection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAUhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAGhF,MAAM,MAAM,qCAAqC,GAAG,yBAAyB,GAAG;IAC9E,iBAAiB,CAAC,EAAE,eAAe,CAAC;CACrC,CAAC;AAEF,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,qCAAqC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoEhH;yBApEe,gCAAgC"}
|
|
@@ -17,11 +17,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
*/
|
|
18
18
|
import { DisplayLabelStyle } from '@wildo-ai/zod-decorators';
|
|
19
19
|
import { useState, useRef, useEffect } from 'react';
|
|
20
|
+
import { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';
|
|
21
|
+
import { cn } from '../../core/ui/cn.js';
|
|
22
|
+
import { useUI } from '../../core/ui/useUI.js';
|
|
20
23
|
import { ContentSection, ContentSectionLegend, } from '../../components/sections/content-section.js';
|
|
21
24
|
import { FieldDescription as ContentSectionDescription } from '../../components/form/chromes/field.js';
|
|
22
25
|
import { DisplayValueDispatcher } from './DisplayValueDispatcher.js';
|
|
23
26
|
export function DisplayFieldReadOnlyArraySection(props) {
|
|
24
27
|
const { schema, schemaType, value, fieldName, label, description, enumLabels, displayComponent, parentData, resourceLinkTrail, renderItem, className, hideLabel, hideDescription, resolvedLabelStyle, resolvedEmptyValue, fileUploadContext, sectionAppearance, } = props;
|
|
28
|
+
const { getRecipe } = useUI();
|
|
29
|
+
const eyebrowRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.EYEBROW);
|
|
25
30
|
// "Show more" truncation for the array list — mirrors DisplayFieldReadOnly.
|
|
26
31
|
const [showAllArrayItems, setShowAllArrayItems] = useState(false);
|
|
27
32
|
const [showAllObjectFields, setShowAllObjectFields] = useState(false);
|
|
@@ -35,8 +40,9 @@ export function DisplayFieldReadOnlyArraySection(props) {
|
|
|
35
40
|
}, [value]);
|
|
36
41
|
return (_jsxs(ContentSection, { appearance: sectionAppearance, className: className, "data-field": fieldName, children: [label != null && !hideLabel && (resolvedLabelStyle === DisplayLabelStyle.TITLE
|
|
37
42
|
// TITLE label style — see DisplayFieldChrome: a small title above the list, for a
|
|
38
|
-
// collection acting as a mini-section inside a prose flow.
|
|
39
|
-
|
|
43
|
+
// collection acting as a mini-section inside a prose flow. Its voice is the theme's EYEBROW
|
|
44
|
+
// recipe, so every theme styles it the way it styles every other label above a section.
|
|
45
|
+
? _jsx("div", { className: cn('pt-item-xs', eyebrowRecipe.base), children: label })
|
|
40
46
|
: _jsx(ContentSectionLegend, { children: label })), description != null && !hideDescription && _jsx(ContentSectionDescription, { children: description }), _jsx(DisplayValueDispatcher, { schema: schema, schemaType: schemaType, value: value, fieldName: fieldName, label: label, enumLabels: enumLabels, displayComponent: displayComponent, parentData: parentData, resourceLinkTrail: resourceLinkTrail, renderItem: renderItem, emptyValue: resolvedEmptyValue, fileUploadContext: fileUploadContext, showAllArrayItems: showAllArrayItems, onExpandArrayItems: () => setShowAllArrayItems(true), showAllObjectFields: showAllObjectFields, onExpandObjectFields: () => setShowAllObjectFields(true) })] }));
|
|
41
47
|
}
|
|
42
48
|
DisplayFieldReadOnlyArraySection.displayName = 'DisplayFieldReadOnlyArraySection';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayFieldReadOnlyArraySection.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnlyArraySection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,gBAAgB,IAAI,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAGlH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,MAAM,UAAU,gCAAgC,CAAC,KAA4C;IAC3F,MAAM,EACJ,MAAM,EACN,UAAU,EACV,KAAK,EACL,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,GAAG,KAAK,CAAC;IAEV,4EAA4E;IAC5E,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClE,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtE,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;YACnC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5B,sBAAsB,CAAC,KAAK,CAAC,CAAC;YAC9B,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,MAAC,cAAc,IAAC,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,gBAAc,SAAS,aACvF,KAAK,IAAI,IAAI,IAAI,CAAC,SAAS,IAAI,CAC9B,kBAAkB,KAAK,iBAAiB,CAAC,KAAK;gBAC5C,kFAAkF;gBAClF,
|
|
1
|
+
{"version":3,"file":"DisplayFieldReadOnlyArraySection.js","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayFieldReadOnlyArraySection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EACL,cAAc,EACd,oBAAoB,GACrB,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,gBAAgB,IAAI,yBAAyB,EAAE,MAAM,mDAAmD,CAAC;AAGlH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAMlE,MAAM,UAAU,gCA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AI,CAAC,YAAG,KAAK,GAAO;gBACrE,CAAC,CAAC,KAAC,oBAAoB,cAAE,KAAK,GAAwB,CACzD,EACA,WAAW,IAAI,IAAI,IAAI,CAAC,eAAe,IAAI,KAAC,yBAAyB,cAAE,WAAW,GAA6B,EAChH,KAAC,sBAAsB,IACrB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,kBAAkB,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,iBAAiB,EAAE,iBAAiB,EACpC,kBAAkB,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EACpD,mBAAmB,EAAE,mBAAmB,EACxC,oBAAoB,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,GACxD,IACa,CAClB,CAAC;AACJ,CAAC;AAED,gCAAgC,CAAC,WAAW,GAAG,kCAAkC,CAAC","sourcesContent":["/**\n * DisplayFieldReadOnlyArraySection — read-only array rendered inside a\n * controllable SECTION container (legend + `sectionAppearance`), mirroring the\n * editable path (`AutomatedArrayField` also renders a `ContentSection`).\n *\n * This is the read-only half of \"section containerization of FieldArray\": a\n * NON-inline-editable array authored via `DisplayFieldArray` renders as a quiet\n * GHOST section by default (opt into CARD/COLLAPSIBLE), instead of the bare\n * `role=\"list\"` the default chrome produces. The section's legend IS the field\n * label, so — unlike `DisplayFieldReadOnly` — we do NOT wrap in\n * `DisplayFieldChrome` (that would render the label twice).\n *\n * `renderItem` is intentionally NOT honored here: item templates bind to a form\n * (`useFormContext`), which does not exist in a read-only context. Items render\n * through `DisplayValueDispatcher` (display-only) as usual.\n */\n\nimport { DisplayLabelStyle } from '@wildo-ai/zod-decorators';\nimport React, { useState, useRef, useEffect } from 'react';\n\nimport type { SoloSectionMode } from '@wildo-ai/zod-decorators';\nimport { TypographyVariant, UIBehavior } from '@wildo-ai/presets-components-models';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport {\n ContentSection,\n ContentSectionLegend,\n} from '~wildo-frontend-lib/components/sections/content-section';\nimport { FieldDescription as ContentSectionDescription } from '~wildo-frontend-lib/components/form/chromes/field';\n\nimport type { DisplayFieldResolvedProps } from './display-field-resolved-props';\nimport { DisplayValueDispatcher } from './DisplayValueDispatcher';\n\nexport type DisplayFieldReadOnlyArraySectionProps = DisplayFieldResolvedProps & {\n sectionAppearance?: SoloSectionMode;\n};\n\nexport function DisplayFieldReadOnlyArraySection(props: DisplayFieldReadOnlyArraySectionProps): React.JSX.Element {\n const {\n schema,\n schemaType,\n value,\n fieldName,\n label,\n description,\n enumLabels,\n displayComponent,\n parentData,\n resourceLinkTrail,\n renderItem,\n className,\n hideLabel,\n hideDescription,\n resolvedLabelStyle,\n resolvedEmptyValue,\n fileUploadContext,\n sectionAppearance,\n } = props;\n\n const { getRecipe } = useUI();\n const eyebrowRecipe = getRecipe(UIBehavior.TYPOGRAPHY, TypographyVariant.EYEBROW);\n\n // \"Show more\" truncation for the array list — mirrors DisplayFieldReadOnly.\n const [showAllArrayItems, setShowAllArrayItems] = useState(false);\n const [showAllObjectFields, setShowAllObjectFields] = useState(false);\n const prevValueRef = useRef(value);\n useEffect(() => {\n if (prevValueRef.current !== value) {\n setShowAllArrayItems(false);\n setShowAllObjectFields(false);\n prevValueRef.current = value;\n }\n }, [value]);\n\n return (\n <ContentSection appearance={sectionAppearance} className={className} data-field={fieldName}>\n {label != null && !hideLabel && (\n resolvedLabelStyle === DisplayLabelStyle.TITLE\n // TITLE label style — see DisplayFieldChrome: a small title above the list, for a\n // collection acting as a mini-section inside a prose flow. Its voice is the theme's EYEBROW\n // recipe, so every theme styles it the way it styles every other label above a section.\n ? <div className={cn('pt-item-xs', eyebrowRecipe.base)}>{label}</div>\n : <ContentSectionLegend>{label}</ContentSectionLegend>\n )}\n {description != null && !hideDescription && <ContentSectionDescription>{description}</ContentSectionDescription>}\n <DisplayValueDispatcher\n schema={schema}\n schemaType={schemaType}\n value={value}\n fieldName={fieldName}\n label={label}\n enumLabels={enumLabels}\n displayComponent={displayComponent}\n parentData={parentData}\n resourceLinkTrail={resourceLinkTrail}\n renderItem={renderItem}\n emptyValue={resolvedEmptyValue}\n fileUploadContext={fileUploadContext}\n showAllArrayItems={showAllArrayItems}\n onExpandArrayItems={() => setShowAllArrayItems(true)}\n showAllObjectFields={showAllObjectFields}\n onExpandObjectFields={() => setShowAllObjectFields(true)}\n />\n </ContentSection>\n );\n}\n\nDisplayFieldReadOnlyArraySection.displayName = 'DisplayFieldReadOnlyArraySection';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayValueDispatcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayValueDispatcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAKtF,OAAO,EAGL,eAAe,
|
|
1
|
+
{"version":3,"file":"DisplayValueDispatcher.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DisplayValueDispatcher.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAKtF,OAAO,EAGL,eAAe,EAsBf,KAAK,kBAAkB,EACvB,KA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,GACrB,EAAE,2BAA2B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAo7BxD;yBAt8Be,sBAAsB"}
|
|
@@ -25,11 +25,11 @@ import { ResourceRegistryContext } from '../../core/resources/ResourceRegistryCo
|
|
|
25
25
|
import { Text, Code } from '../../components/typography/text.js';
|
|
26
26
|
import { Button, ButtonVariants_Variant } from '../../components/actions/button.js';
|
|
27
27
|
import { ButtonSize } from '@wildo-ai/presets-components-models';
|
|
28
|
-
import { FrontendComponentType, UIBehavior, IndicatorVariant, TypographyVariant } from '@wildo-ai/presets-components-models';
|
|
28
|
+
import { FrontendComponentType, UIBehavior, IndicatorVariant, TypographyVariant, resolveVocabularyWordKey } from '@wildo-ai/presets-components-models';
|
|
29
29
|
import { cn } from '../../core/ui/cn.js';
|
|
30
30
|
import { Skeleton } from '../../components/feedback/skeleton.js';
|
|
31
31
|
import { resolveContextualDisplayParams, useDisplayContextKind } from './DisplayContextKindContext.js';
|
|
32
|
-
import { ArrayListStyle, ArrayObjectItemLayout, DisplayChromeMode, FieldSchemaType, getFieldUIDisplayConfig, getObjectKeys, getObjectShape, getRecordValueSchema, getSetValueSchema, getTupleItemSchemas, getMapSchemas, resolveDiscriminatedUnionVariant, getSchemaType, inferFieldSchemaTypeFromValue, getArrayUI, getObjectUI, isForeignKey, resolveDisplayEmptyReason, resolveForeignKeyLabelFallback, DISPLAY_EMPTY_REASON_LABEL_KEYS, getForeignKeyUIDisplay, getDiscriminatedPolymorphicForeignKey, unwrapSchema, } from '@wildo-ai/zod-decorators';
|
|
32
|
+
import { ArrayListStyle, ArrayObjectItemLayout, DisplayChromeMode, FieldSchemaType, getFieldUIDisplayConfig, getObjectKeys, getObjectShape, getRecordValueSchema, getRecordKeySchema, getSystemEnumName, getSetValueSchema, getTupleItemSchemas, getMapSchemas, resolveDiscriminatedUnionVariant, getSchemaType, inferFieldSchemaTypeFromValue, getArrayUI, getObjectUI, isForeignKey, resolveDisplayEmptyReason, resolveForeignKeyLabelFallback, DISPLAY_EMPTY_REASON_LABEL_KEYS, getForeignKeyUIDisplay, getDiscriminatedPolymorphicForeignKey, unwrapSchema, } from '@wildo-ai/zod-decorators';
|
|
33
33
|
import { ResourcesConfigNamingUtils } from '@wildo-ai/saas-models';
|
|
34
34
|
import { resolveResourceRelativeFieldName, } from './display-resource-link-trail.js';
|
|
35
35
|
import { AutomatedLayoutFrontendUtils } from '../../core/automated-layout/automated-layout.frontend.utils.js';
|
|
@@ -254,7 +254,7 @@ function renderEmptyDisplayValue(strategy, noValueLabel) {
|
|
|
254
254
|
// COMPONENT
|
|
255
255
|
// =============================================================================
|
|
256
256
|
export function DisplayValueDispatcher({ schema, schemaType: declaredSchemaType, value, fieldName, label, className, enumLabels, displayComponent, parentData, resourceLinkTrail, renderItem, emptyValue, fileUploadContext, showAllArrayItems, onExpandArrayItems, showAllObjectFields, onExpandObjectFields, }) {
|
|
257
|
-
const { tComponent, isReady } = useI18n({
|
|
257
|
+
const { tComponent, t, isReady } = useI18n({
|
|
258
258
|
component: [FrontendComponentType.LOW_LEVEL_FORM_FIELD, FrontendComponentType.LOW_LEVEL_BUTTON],
|
|
259
259
|
});
|
|
260
260
|
const resourceRegistryContext = React.useContext(ResourceRegistryContext);
|
|
@@ -763,7 +763,21 @@ export function DisplayValueDispatcher({ schema, schemaType: declaredSchemaType,
|
|
|
763
763
|
return renderEmptyDisplayValue(emptyValue, emptyLabelFor(true));
|
|
764
764
|
}
|
|
765
765
|
const recordValueSchema = getRecordValueSchema(schema);
|
|
766
|
-
|
|
766
|
+
/*
|
|
767
|
+
* A key that belongs to a named vocabulary (`z.record(z.string().systemEnum('Limit'), …)`, #1851) is shown as its
|
|
768
|
+
* word — `max_projects` read as an identifier on the Entitlements screen. An undeclared key, or a key with no
|
|
769
|
+
* word yet, shows itself: a missing label that looks missing.
|
|
770
|
+
*/
|
|
771
|
+
const recordKeySchema = getRecordKeySchema(schema);
|
|
772
|
+
const keyVocabulary = recordKeySchema ? getSystemEnumName(recordKeySchema) : undefined;
|
|
773
|
+
const keyWord = (entryKey) => {
|
|
774
|
+
if (!keyVocabulary)
|
|
775
|
+
return entryKey;
|
|
776
|
+
const wordKey = resolveVocabularyWordKey(keyVocabulary, entryKey);
|
|
777
|
+
const word = t(wordKey);
|
|
778
|
+
return word === wordKey ? entryKey : word;
|
|
779
|
+
};
|
|
780
|
+
return (_jsxs("div", { className: cn('ps-card relative flex flex-col gap-element', className), children: [_jsx("div", { className: cn('absolute start-0 top-0 bottom-0 w-0.5', dividerRecipe.base), "aria-hidden": "true" }), recordEntries.map(([entryKey, entryValue]) => (_jsxs("div", { className: "flex flex-wrap items-baseline gap-x-item-sm gap-y-element-xs", children: [_jsx(Text, { className: cn(labelTypographyRecipe.base, 'shrink-0'), children: keyWord(entryKey) }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx(DisplayField, { schema: recordValueSchema ?? undefined, schemaType: recordValueSchema ? getSchemaType(recordValueSchema) : undefined, value: entryValue, name: fieldName ? `${fieldName}.${entryKey}` : entryKey, hideLabel: true, parentData: value, resourceLinkTrail: childResourceLinkTrail }) })] }, entryKey)))] }));
|
|
767
781
|
}
|
|
768
782
|
/*
|
|
769
783
|
* ── SET ──
|