@flanksource/clicky-ui 0.3.78 → 0.3.79
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/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.js +6 -6
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/api.cjs.map +1 -1
- package/dist/expressions/playground/api.d.ts +10 -0
- package/dist/expressions/playground/api.d.ts.map +1 -1
- package/dist/expressions/playground/api.js.map +1 -1
- package/dist/expressions/playground/hostEvaluation.cjs +67 -0
- package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
- package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
- package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
- package/dist/expressions/playground/hostEvaluation.js +63 -0
- package/dist/expressions/playground/hostEvaluation.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.js +8 -3
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.js +6 -2
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
- package/dist/expressions/playground.d.ts +1 -1
- package/dist/expressions/playground.d.ts.map +1 -1
- package/dist/hooks/use-element-height.cjs +26 -0
- package/dist/hooks/use-element-height.cjs.map +1 -0
- package/dist/hooks/use-element-height.d.ts +10 -0
- package/dist/hooks/use-element-height.d.ts.map +1 -0
- package/dist/hooks/use-element-height.js +26 -0
- package/dist/hooks/use-element-height.js.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.js +7 -7
- package/dist/jvm/classes/PatchedClassList.cjs +11 -2
- package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
- package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
- package/dist/jvm/classes/PatchedClassList.js +11 -2
- package/dist/jvm/classes/PatchedClassList.js.map +1 -1
- package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
- package/dist/jvm/model/patches.cjs +4 -2
- package/dist/jvm/model/patches.cjs.map +1 -1
- package/dist/jvm/model/patches.d.ts +3 -1
- package/dist/jvm/model/patches.d.ts.map +1 -1
- package/dist/jvm/model/patches.js +4 -2
- package/dist/jvm/model/patches.js.map +1 -1
- package/dist/jvm/protocol/client.d.ts +7 -2
- package/dist/jvm/protocol/client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.cjs +30 -11
- package/dist/jvm/protocol/operation-client.cjs.map +1 -1
- package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.js +30 -11
- package/dist/jvm/protocol/operation-client.js.map +1 -1
- package/dist/jvm/protocol/query-keys.cjs +1 -1
- package/dist/jvm/protocol/query-keys.cjs.map +1 -1
- package/dist/jvm/protocol/query-keys.d.ts +1 -1
- package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
- package/dist/jvm/protocol/query-keys.js +1 -1
- package/dist/jvm/protocol/query-keys.js.map +1 -1
- package/dist/jvm/protocol/status.cjs +38 -0
- package/dist/jvm/protocol/status.cjs.map +1 -0
- package/dist/jvm/protocol/status.d.ts +13 -0
- package/dist/jvm/protocol/status.d.ts.map +1 -0
- package/dist/jvm/protocol/status.js +38 -0
- package/dist/jvm/protocol/status.js.map +1 -0
- package/dist/jvm/protocol/types.d.ts +16 -4
- package/dist/jvm/protocol/types.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.cjs +7 -1
- package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
- package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.js +7 -1
- package/dist/jvm/runtime/GcSummary.js.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
- package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.js +12 -11
- package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
- package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.js +4 -9
- package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
- package/dist/jvm/surfaces/jvm-context.cjs +23 -4
- package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
- package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
- package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
- package/dist/jvm/surfaces/jvm-context.js +23 -5
- package/dist/jvm/surfaces/jvm-context.js.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
- package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.js +2 -2
- package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
- package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.js +3 -2
- package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
- package/dist/jvm/threads/ThreadDetail.cjs +6 -2
- package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
- package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
- package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
- package/dist/jvm/threads/ThreadDetail.js +6 -2
- package/dist/jvm/threads/ThreadDetail.js.map +1 -1
- package/dist/jvm.cjs +3 -0
- package/dist/jvm.d.ts +2 -1
- package/dist/jvm.d.ts.map +1 -1
- package/dist/jvm.js +3 -2
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +16 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +21 -2
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.js +21 -2
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/Workspace.cjs +66 -21
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +6 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +66 -21
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.model.cjs +20 -0
- package/dist/layout/Workspace.model.cjs.map +1 -1
- package/dist/layout/Workspace.model.d.ts +17 -0
- package/dist/layout/Workspace.model.d.ts.map +1 -1
- package/dist/layout/Workspace.model.js +20 -1
- package/dist/layout/Workspace.model.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +10 -6
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.d.ts +4 -1
- package/dist/layout/Workspace.regions.d.ts.map +1 -1
- package/dist/layout/Workspace.regions.js +10 -6
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/duration.cjs +20 -0
- package/dist/lib/duration.cjs.map +1 -1
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.d.ts.map +1 -1
- package/dist/lib/duration.js +19 -1
- package/dist/lib/duration.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +34 -30
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +34 -30
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/overlay/ConfirmDialog.cjs +5 -2
- package/dist/overlay/ConfirmDialog.cjs.map +1 -1
- package/dist/overlay/ConfirmDialog.d.ts +14 -2
- package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
- package/dist/overlay/ConfirmDialog.js +5 -2
- package/dist/overlay/ConfirmDialog.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +94 -285
- package/dist/profiles/cel/celEditor.cjs.map +1 -1
- package/dist/profiles/cel/celEditor.d.ts +10 -15
- package/dist/profiles/cel/celEditor.d.ts.map +1 -1
- package/dist/profiles/cel/celEditor.js +97 -287
- package/dist/profiles/cel/celEditor.js.map +1 -1
- package/dist/profiles/cel/celExpression.cjs +1 -61
- package/dist/profiles/cel/celExpression.cjs.map +1 -1
- package/dist/profiles/cel/celExpression.d.ts +2 -38
- package/dist/profiles/cel/celExpression.d.ts.map +1 -1
- package/dist/profiles/cel/celExpression.js +2 -58
- package/dist/profiles/cel/celExpression.js.map +1 -1
- package/dist/profiles/cel/celPlayground.cjs +122 -0
- package/dist/profiles/cel/celPlayground.cjs.map +1 -0
- package/dist/profiles/cel/celPlayground.d.ts +43 -0
- package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
- package/dist/profiles/cel/celPlayground.js +118 -0
- package/dist/profiles/cel/celPlayground.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.js +2 -2
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
- package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
- package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
- package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
- package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
- package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
- package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +106 -37
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +107 -38
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorModel.cjs +65 -19
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorModel.js +64 -18
- package/dist/profiles/editor/profileEditorModel.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +129 -29
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +137 -88
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +138 -90
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +23 -7
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
- package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.js +70 -0
- package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
- package/dist/profiles/editor/samplePaths.cjs +54 -0
- package/dist/profiles/editor/samplePaths.cjs.map +1 -0
- package/dist/profiles/editor/samplePaths.d.ts +27 -0
- package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
- package/dist/profiles/editor/samplePaths.js +53 -0
- package/dist/profiles/editor/samplePaths.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -1
- package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
- package/dist/profiles/fields/profileFieldControls.cjs +3 -2
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldControls.js +3 -2
- package/dist/profiles/fields/profileFieldControls.js.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.js +99 -186
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/fields/profileFieldList.cjs +23 -1
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldList.js +23 -1
- package/dist/profiles/fields/profileFieldList.js.map +1 -1
- package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
- package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.js +110 -0
- package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
- package/dist/profiles/fields/profileFieldSample.cjs +182 -0
- package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
- package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldSample.js +180 -0
- package/dist/profiles/fields/profileFieldSample.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.js +104 -0
- package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.js +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
- package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.js +59 -0
- package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +79 -79
- package/dist/profiles/processor/processorConfig.cjs.map +1 -1
- package/dist/profiles/processor/processorConfig.d.ts +30 -3
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
- package/dist/profiles/processor/processorConfig.js +78 -78
- package/dist/profiles/processor/processorConfig.js.map +1 -1
- package/dist/profiles/processor/processorPipeline.cjs +8 -6
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
- package/dist/profiles/processor/processorPipeline.d.ts +3 -3
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipeline.js +9 -7
- package/dist/profiles/processor/processorPipeline.js.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.js +39 -95
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.js +3 -2
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
- package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +10 -1
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
- package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.js +39 -0
- package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
- package/dist/profiles.cjs +9 -11
- package/dist/profiles.js +8 -8
- package/dist/rpc/EntityExplorerApp.cjs +7 -3
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +16 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +7 -3
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/InlineError.cjs +30 -10
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +10 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +30 -10
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +9 -6
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +9 -6
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/SessionHeader.cjs +3 -3
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +3 -3
- package/dist/rpc/SessionHeader.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +2 -6
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -5
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/surfaceNav.cjs +5 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -1
- package/dist/rpc/surfaceNav.d.ts.map +1 -1
- package/dist/rpc/surfaceNav.js +5 -0
- package/dist/rpc/surfaceNav.js.map +1 -1
- package/dist/runtime/barrels.json +4982 -4979
- package/dist/runtime/importmap.json +2168 -2146
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
- package/dist/profiles/cel/celEditorResults.cjs +0 -158
- package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
- package/dist/profiles/cel/celEditorResults.d.ts +0 -37
- package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
- package/dist/profiles/cel/celEditorResults.js +0 -156
- package/dist/profiles/cel/celEditorResults.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-item-summary.cjs","names":["isPlainObject","effectiveProperties","normalizeTone"],"sources":["../../src/components/json-schema-form-item-summary.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { normalizeTone } from \"./json-schema-form-tone\";\nimport type {\n ArrayItemAction,\n ArrayItemSpec,\n ArrayItemSummary,\n ArrayItemSummaryPart,\n JsonSchemaObject,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Property names worth trying for a row title when the schema does not say.\n// Ordered most-human-readable first.\nconst DEFAULT_TITLE_KEYS = [\"title\", \"name\", \"label\", \"id\", \"key\"];\n\nconst SUMMARY_SEPARATOR = \" · \";\nconst VALUE_SEPARATOR = \", \";\n\n// resolveItemSpec reads the array's `x-item` and fills in every default, so the\n// renderer never has to ask whether a key was supplied. With no `x-item` at all\n// the result reproduces today's behaviour exactly: an `Item <n>` title and an\n// \"Add item\" button.\nexport function resolveItemSpec(\n arraySchema: JsonSchemaProperty,\n itemSchema: JsonSchemaProperty | undefined,\n): ArrayItemSpec {\n const raw = isPlainObject(arraySchema[\"x-item\"])\n ? (arraySchema[\"x-item\"] as ArrayItemSpec)\n : {};\n const title = stringArray(raw.title);\n const summary = summaryParts(raw.summary);\n const badges = summaryParts(raw.badges);\n const glyph = typeof raw.glyph === \"string\" ? raw.glyph : autoGlyphKey(itemSchema);\n return {\n title: title.length > 0 ? title : DEFAULT_TITLE_KEYS,\n ...(typeof raw.fallback === \"string\" && raw.fallback ? { fallback: raw.fallback } : {}),\n ...(summary.length > 0 ? { summary } : {}),\n ...(glyph ? { glyph } : {}),\n ...(typeof raw.badge === \"string\" && raw.badge ? { badge: raw.badge } : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(raw.count === false ? { count: false } : {}),\n ...(typeof raw.flag === \"string\" && raw.flag ? { flag: raw.flag } : {}),\n // Only carried when the schema actually said something: an absent key means\n // every action, while an explicit empty list means none, and those two\n // cannot be told apart once the default has been filled in.\n ...(Array.isArray(raw.actions) ? { actions: itemActions(raw.actions) } : {}),\n noun: firstNonEmpty([raw.noun, itemSchema?.title]) ?? \"item\",\n nounPlural: firstNonEmpty([raw.nounPlural, arraySchema.title]) ?? \"items\",\n ...(typeof raw.empty === \"string\" && raw.empty ? { empty: raw.empty } : {}),\n };\n}\n\nconst ITEM_ACTIONS: ArrayItemAction[] = [\"reorder\", \"duplicate\", \"remove\"];\n\nfunction itemActions(value: unknown[]): ArrayItemAction[] {\n return value.filter((entry): entry is ArrayItemAction =>\n ITEM_ACTIONS.includes(entry as ArrayItemAction),\n );\n}\n\n// itemActionsAllow is the one question every array display asks of `x-item`, so\n// the accordion and the cards never disagree about what a schema permitted.\nexport function itemActionsAllow(spec: ArrayItemSpec, action: ArrayItemAction): boolean {\n return spec.actions ? spec.actions.includes(action) : true;\n}\n\n// itemProperties is the item schema's effective properties — `allOf` members\n// included, so items composed of flattened `$ref`s summarize like any other —\n// resolved against `value`.\nfunction itemProperties(\n itemSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): Record<string, JsonSchemaProperty> {\n return itemSchema ? effectiveProperties(itemSchema as JsonSchemaObject, value).properties : {};\n}\n\n// autoGlyphKey picks the item property that can colour a row without being told:\n// the first enum carrying per-value icons. Keeps a schema that already declares\n// x-enum-icons from having to repeat itself in x-item. The spec is one per\n// array, so there is no item value to select a conditional branch: only base\n// and unconditional properties (and `else` branches, which `{}` selects) count.\nfunction autoGlyphKey(itemSchema: JsonSchemaProperty | undefined): string | undefined {\n for (const [key, prop] of Object.entries(itemProperties(itemSchema, {}))) {\n const icons = prop[\"x-enum-icons\"];\n if (Array.isArray(prop.enum) && icons && Object.keys(icons).length > 0) return key;\n }\n return undefined;\n}\n\n// itemSummaryFor derives one collapsed row from the item's raw VALUE — never\n// from its rendered fields. A consumer pre-extension may hide a property's\n// control entirely (returning null) and still have it appear in the summary.\nexport function itemSummaryFor({\n item,\n index,\n spec,\n itemSchema,\n}: {\n item: unknown;\n index: number;\n spec: ArrayItemSpec;\n itemSchema: JsonSchemaProperty | undefined;\n}): ArrayItemSummary {\n const obj = isPlainObject(item) ? item : {};\n // Resolved against this item's own value, as the item's body is rendered,\n // so a property a matching `then`/`else` branch declares labels its chip.\n const props = itemProperties(itemSchema, obj);\n\n const title =\n firstNonEmpty(\n (spec.title ?? DEFAULT_TITLE_KEYS).map((key) => {\n const value = text(obj[key]);\n return value && enumLabel(props[key], value);\n }),\n ) ??\n spec.fallback ??\n `Item ${index + 1}`;\n\n const summary = (spec.summary ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s)\n .join(SUMMARY_SEPARATOR);\n\n const badges = (spec.badges ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s);\n\n const glyphValue = spec.glyph ? text(obj[spec.glyph]) : \"\";\n const glyphProp = spec.glyph ? props[spec.glyph] : undefined;\n const badgeValue = spec.badge ? text(obj[spec.badge]) : \"\";\n const badgeProp = spec.badge ? props[spec.badge] : undefined;\n const badgeIcon = badgeProp?.[\"x-enum-icons\"]?.[badgeValue];\n\n return {\n title,\n ...(summary ? { summary } : {}),\n ...(spec.glyph\n ? {\n glyph: {\n ...(glyphProp?.[\"x-enum-icons\"]?.[glyphValue]\n ? { icon: glyphProp[\"x-enum-icons\"][glyphValue] }\n : {}),\n tone: normalizeTone(glyphProp?.[\"x-enum-tones\"]?.[glyphValue]),\n ...(glyphValue ? { label: enumLabel(glyphProp, glyphValue) } : {}),\n },\n }\n : {}),\n ...(badgeValue\n ? {\n badge: {\n ...(badgeIcon ? { icon: badgeIcon } : {}),\n label: enumLabel(badgeProp, badgeValue),\n },\n }\n : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(spec.flag && obj[spec.flag] === true ? { flagged: true } : {}),\n };\n}\n\n// The add row's button text — \"Add parameter\" when the schema names its noun,\n// and the historical \"Add item\" when it does not.\nexport function addItemLabel(spec: ArrayItemSpec): string {\n return `Add ${spec.noun ?? \"item\"}`;\n}\n\nexport function itemCountLabel(spec: ArrayItemSpec, count: number): string {\n return count === 1\n ? `1 ${spec.noun ?? \"item\"}`\n : `${count} ${spec.nounPlural ?? \"items\"}`;\n}\n\n// The line above a list: \"No items yet\" when it is empty, else the count, which\n// `x-item.count: false` drops for a list whose rows say enough.\nexport function itemCountLine(spec: ArrayItemSpec, count: number): string | undefined {\n if (count === 0) return noItemsLabel(spec);\n return spec.count === false ? undefined : itemCountLabel(spec, count);\n}\n\n// The zero-item explanation. Falls back to the array's own description, so a\n// schema that already documents the field gets the empty state for free.\nexport function emptyItemsCopy(\n spec: ArrayItemSpec,\n arraySchema: JsonSchemaProperty,\n): string | undefined {\n if (spec.empty) return spec.empty;\n const description = typeof arraySchema.description === \"string\" ? arraySchema.description.trim() : \"\";\n return description || undefined;\n}\n\nexport function noItemsLabel(spec: ArrayItemSpec): string {\n return `No ${spec.nounPlural ?? \"items\"} yet`;\n}\n\n// summaryPart renders one part, substituting the value into a single literal\n// `{}` in the pattern. A pattern without `{}` renders as-is (it is a literal),\n// and a missing value drops the part rather than leaving a dangling separator.\nfunction summaryPart(\n obj: Record<string, unknown>,\n part: string | ArrayItemSummaryPart,\n): string | undefined {\n const { property, pattern } = typeof part === \"string\" ? { property: part, pattern: undefined } : part;\n const value = text(obj[property]);\n if (!value) return undefined;\n return pattern ? pattern.replace(\"{}\", value) : value;\n}\n\n// enumLabel prefers the human label the schema declares for a code, falling back\n// to the code itself. Unlike the combobox option list this does NOT render\n// \"Label (code)\" — a chip has room for one of the two, and the label is the one\n// worth reading.\nfunction enumLabel(prop: JsonSchemaProperty | undefined, value: string): string {\n const label = prop?.[\"x-enum-labels\"]?.[value];\n return typeof label === \"string\" && label ? label : value;\n}\n\n// text flattens a value to its display string. Arrays join, so a list-valued\n// property still reads as one line.\nfunction text(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (Array.isArray(value)) return value.map(text).filter(Boolean).join(VALUE_SEPARATOR);\n if (typeof value === \"object\") return \"\";\n return String(value).trim();\n}\n\nfunction stringArray(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (!Array.isArray(value)) return [];\n return value.filter((v): v is string => typeof v === \"string\" && !!v);\n}\n\nfunction summaryParts(value: unknown): Array<string | ArrayItemSummaryPart> {\n if (!Array.isArray(value)) return [];\n return (value as unknown[]).flatMap((part): Array<string | ArrayItemSummaryPart> => {\n if (typeof part === \"string\" && part) return [part];\n if (isPlainObject(part) && typeof part.property === \"string\" && part.property) {\n return [\n {\n property: part.property,\n ...(typeof part.pattern === \"string\" && part.pattern ? { pattern: part.pattern } : {}),\n } satisfies ArrayItemSummaryPart,\n ];\n }\n return [];\n });\n}\n\nfunction firstNonEmpty(values: Array<string | undefined>): string | undefined {\n for (const value of values) {\n const trimmed = typeof value === \"string\" ? value.trim() : \"\";\n if (trimmed) return trimmed;\n }\n return undefined;\n}\n"],"mappings":";;;;AAcA,IAAM,qBAAqB;CAAC;CAAS;CAAQ;CAAS;CAAM;AAAK;AAEjE,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAMxB,SAAgB,gBACd,aACA,YACe;CACf,MAAM,MAAMA,oBAAAA,cAAc,YAAY,SAAS,IAC1C,YAAY,YACb,CAAC;CACL,MAAM,QAAQ,YAAY,IAAI,KAAK;CACnC,MAAM,UAAU,aAAa,IAAI,OAAO;CACxC,MAAM,SAAS,aAAa,IAAI,MAAM;CACtC,MAAM,QAAQ,OAAO,IAAI,UAAU,WAAW,IAAI,QAAQ,aAAa,UAAU;CACjF,OAAO;EACL,OAAO,MAAM,SAAS,IAAI,QAAQ;EAClC,GAAI,OAAO,IAAI,aAAa,YAAY,IAAI,WAAW,EAAE,UAAU,IAAI,SAAS,IAAI,CAAC;EACrF,GAAI,QAAQ,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;EACxC,GAAI,QAAQ,EAAE,MAAM,IAAI,CAAC;EACzB,GAAI,OAAO,IAAI,UAAU,YAAY,IAAI,QAAQ,EAAE,OAAO,IAAI,MAAM,IAAI,CAAC;EACzE,GAAI,OAAO,SAAS,IAAI,EAAE,OAAO,IAAI,CAAC;EACtC,GAAI,IAAI,UAAU,QAAQ,EAAE,OAAO,MAAM,IAAI,CAAC;EAC9C,GAAI,OAAO,IAAI,SAAS,YAAY,IAAI,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;EAIrE,GAAI,MAAM,QAAQ,IAAI,OAAO,IAAI,EAAE,SAAS,YAAY,IAAI,OAAO,EAAE,IAAI,CAAC;EAC1E,MAAM,cAAc,CAAC,IAAI,MAAM,YAAY,KAAK,CAAC,KAAK;EACtD,YA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OAAQ,MAAoB,SAAS,SAA+C;EAClF,IAAI,OAAO,SAAS,YAAY,MAAM,OAAO,CAAC,IAAI;EAClD,IAAIF,oBAAAA,cAAc,IAAI,KAAK,OAAO,KAAK,aAAa,YAAY,KAAK,UACnE,OAAO,CACL;GACE,UAAU,KAAK;GACf,GAAI,OAAO,KAAK,YAAY,YAAY,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;EACtF,CACF;EAEF,OAAO,CAAC;CACV,CAAC;AACH;AAEA,SAAS,cAAc,QAAuD;CAC5E,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,UAAU,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;EAC3D,IAAI,SAAS,OAAO;CACtB;AAEF"}
|
|
1
|
+
{"version":3,"file":"json-schema-form-item-summary.cjs","names":["isPlainObject","effectiveProperties","normalizeTone"],"sources":["../../src/components/json-schema-form-item-summary.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { normalizeTone } from \"./json-schema-form-tone\";\nimport type {\n ArrayItemAction,\n ArrayItemSpec,\n ArrayItemSummary,\n ArrayItemSummaryPart,\n JsonSchemaObject,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Property names worth trying for a row title when the schema does not say.\n// Ordered most-human-readable first.\nconst DEFAULT_TITLE_KEYS = [\"title\", \"name\", \"label\", \"id\", \"key\"];\n\nconst SUMMARY_SEPARATOR = \" · \";\nconst VALUE_SEPARATOR = \", \";\n\n// resolveItemSpec reads the array's `x-item` and fills in every default, so the\n// renderer never has to ask whether a key was supplied. With no `x-item` at all\n// the result reproduces today's behaviour exactly: an `Item <n>` title and an\n// \"Add item\" button.\nexport function resolveItemSpec(\n arraySchema: JsonSchemaProperty,\n itemSchema: JsonSchemaProperty | undefined,\n): ArrayItemSpec {\n const raw = isPlainObject(arraySchema[\"x-item\"])\n ? (arraySchema[\"x-item\"] as ArrayItemSpec)\n : {};\n const title = stringArray(raw.title);\n const summary = summaryParts(raw.summary);\n const badges = summaryParts(raw.badges);\n const glyph = typeof raw.glyph === \"string\" ? raw.glyph : autoGlyphKey(itemSchema);\n return {\n title: title.length > 0 ? title : DEFAULT_TITLE_KEYS,\n ...(typeof raw.fallback === \"string\" && raw.fallback ? { fallback: raw.fallback } : {}),\n ...(summary.length > 0 ? { summary } : {}),\n ...(glyph ? { glyph } : {}),\n ...(typeof raw.badge === \"string\" && raw.badge ? { badge: raw.badge } : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(typeof raw.flag === \"string\" && raw.flag ? { flag: raw.flag } : {}),\n // Only carried when the schema actually said something: an absent key means\n // every action, while an explicit empty list means none, and those two\n // cannot be told apart once the default has been filled in.\n ...(Array.isArray(raw.actions) ? { actions: itemActions(raw.actions) } : {}),\n noun: firstNonEmpty([raw.noun, itemSchema?.title]) ?? \"item\",\n nounPlural: firstNonEmpty([raw.nounPlural, arraySchema.title]) ?? \"items\",\n ...(typeof raw.empty === \"string\" && raw.empty ? { empty: raw.empty } : {}),\n };\n}\n\nconst ITEM_ACTIONS: ArrayItemAction[] = [\"reorder\", \"duplicate\", \"remove\"];\n\nfunction itemActions(value: unknown[]): ArrayItemAction[] {\n return value.filter((entry): entry is ArrayItemAction =>\n ITEM_ACTIONS.includes(entry as ArrayItemAction),\n );\n}\n\n// itemActionsAllow is the one question every array display asks of `x-item`, so\n// the accordion and the cards never disagree about what a schema permitted.\nexport function itemActionsAllow(spec: ArrayItemSpec, action: ArrayItemAction): boolean {\n return spec.actions ? spec.actions.includes(action) : true;\n}\n\n// itemProperties is the item schema's effective properties — `allOf` members\n// included, so items composed of flattened `$ref`s summarize like any other —\n// resolved against `value`.\nfunction itemProperties(\n itemSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): Record<string, JsonSchemaProperty> {\n return itemSchema ? effectiveProperties(itemSchema as JsonSchemaObject, value).properties : {};\n}\n\n// autoGlyphKey picks the item property that can colour a row without being told:\n// the first enum carrying per-value icons. Keeps a schema that already declares\n// x-enum-icons from having to repeat itself in x-item. The spec is one per\n// array, so there is no item value to select a conditional branch: only base\n// and unconditional properties (and `else` branches, which `{}` selects) count.\nfunction autoGlyphKey(itemSchema: JsonSchemaProperty | undefined): string | undefined {\n for (const [key, prop] of Object.entries(itemProperties(itemSchema, {}))) {\n const icons = prop[\"x-enum-icons\"];\n if (Array.isArray(prop.enum) && icons && Object.keys(icons).length > 0) return key;\n }\n return undefined;\n}\n\n// itemSummaryFor derives one collapsed row from the item's raw VALUE — never\n// from its rendered fields. A consumer pre-extension may hide a property's\n// control entirely (returning null) and still have it appear in the summary.\nexport function itemSummaryFor({\n item,\n index,\n spec,\n itemSchema,\n}: {\n item: unknown;\n index: number;\n spec: ArrayItemSpec;\n itemSchema: JsonSchemaProperty | undefined;\n}): ArrayItemSummary {\n const obj = isPlainObject(item) ? item : {};\n // Resolved against this item's own value, as the item's body is rendered,\n // so a property a matching `then`/`else` branch declares labels its chip.\n const props = itemProperties(itemSchema, obj);\n\n const title =\n firstNonEmpty(\n (spec.title ?? DEFAULT_TITLE_KEYS).map((key) => {\n const value = text(obj[key]);\n return value && enumLabel(props[key], value);\n }),\n ) ??\n spec.fallback ??\n `Item ${index + 1}`;\n\n const summary = (spec.summary ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s)\n .join(SUMMARY_SEPARATOR);\n\n const badges = (spec.badges ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s);\n\n const glyphValue = spec.glyph ? text(obj[spec.glyph]) : \"\";\n const glyphProp = spec.glyph ? props[spec.glyph] : undefined;\n const badgeValue = spec.badge ? text(obj[spec.badge]) : \"\";\n const badgeProp = spec.badge ? props[spec.badge] : undefined;\n const badgeIcon = badgeProp?.[\"x-enum-icons\"]?.[badgeValue];\n\n return {\n title,\n ...(summary ? { summary } : {}),\n ...(spec.glyph\n ? {\n glyph: {\n ...(glyphProp?.[\"x-enum-icons\"]?.[glyphValue]\n ? { icon: glyphProp[\"x-enum-icons\"][glyphValue] }\n : {}),\n tone: normalizeTone(glyphProp?.[\"x-enum-tones\"]?.[glyphValue]),\n ...(glyphValue ? { label: enumLabel(glyphProp, glyphValue) } : {}),\n },\n }\n : {}),\n ...(badgeValue\n ? {\n badge: {\n ...(badgeIcon ? { icon: badgeIcon } : {}),\n label: enumLabel(badgeProp, badgeValue),\n },\n }\n : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(spec.flag && obj[spec.flag] === true ? { flagged: true } : {}),\n };\n}\n\n// The add row's button text — \"Add parameter\" when the schema names its noun,\n// and the historical \"Add item\" when it does not.\nexport function addItemLabel(spec: ArrayItemSpec): string {\n return `Add ${spec.noun ?? \"item\"}`;\n}\n\nexport function itemCountLabel(spec: ArrayItemSpec, count: number): string {\n return count === 1\n ? `1 ${spec.noun ?? \"item\"}`\n : `${count} ${spec.nounPlural ?? \"items\"}`;\n}\n\n// The line above a list: \"No items yet\" when it is empty, else none — the rows\n// themselves show how many there are.\nexport function emptyListLine(spec: ArrayItemSpec, count: number): string | undefined {\n return count === 0 ? noItemsLabel(spec) : undefined;\n}\n\n// The zero-item explanation. Falls back to the array's own description, so a\n// schema that already documents the field gets the empty state for free.\nexport function emptyItemsCopy(\n spec: ArrayItemSpec,\n arraySchema: JsonSchemaProperty,\n): string | undefined {\n if (spec.empty) return spec.empty;\n const description = typeof arraySchema.description === \"string\" ? arraySchema.description.trim() : \"\";\n return description || undefined;\n}\n\nexport function noItemsLabel(spec: ArrayItemSpec): string {\n return `No ${spec.nounPlural ?? \"items\"} yet`;\n}\n\n// summaryPart renders one part, substituting the value into a single literal\n// `{}` in the pattern. A pattern without `{}` renders as-is (it is a literal),\n// and a missing value drops the part rather than leaving a dangling separator.\nfunction summaryPart(\n obj: Record<string, unknown>,\n part: string | ArrayItemSummaryPart,\n): string | undefined {\n const { property, pattern } = typeof part === \"string\" ? { property: part, pattern: undefined } : part;\n const value = text(obj[property]);\n if (!value) return undefined;\n return pattern ? pattern.replace(\"{}\", value) : value;\n}\n\n// enumLabel prefers the human label the schema declares for a code, falling back\n// to the code itself. Unlike the combobox option list this does NOT render\n// \"Label (code)\" — a chip has room for one of the two, and the label is the one\n// worth reading.\nfunction enumLabel(prop: JsonSchemaProperty | undefined, value: string): string {\n const label = prop?.[\"x-enum-labels\"]?.[value];\n return typeof label === \"string\" && label ? label : value;\n}\n\n// text flattens a value to its display string. Arrays join, so a list-valued\n// property still reads as one line.\nfunction text(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (Array.isArray(value)) return value.map(text).filter(Boolean).join(VALUE_SEPARATOR);\n if (typeof value === \"object\") return \"\";\n return String(value).trim();\n}\n\nfunction stringArray(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (!Array.isArray(value)) return [];\n return value.filter((v): v is string => typeof v === \"string\" && !!v);\n}\n\nfunction summaryParts(value: unknown): Array<string | ArrayItemSummaryPart> {\n if (!Array.isArray(value)) return [];\n return (value as unknown[]).flatMap((part): Array<string | ArrayItemSummaryPart> => {\n if (typeof part === \"string\" && part) return [part];\n if (isPlainObject(part) && typeof part.property === \"string\" && part.property) {\n return [\n {\n property: part.property,\n ...(typeof part.pattern === \"string\" && part.pattern ? { pattern: part.pattern } : {}),\n } satisfies ArrayItemSummaryPart,\n ];\n }\n return [];\n });\n}\n\nfunction firstNonEmpty(values: Array<string | undefined>): string | undefined {\n for (const value of values) {\n const trimmed = typeof value === \"string\" ? value.trim() : \"\";\n if (trimmed) return trimmed;\n }\n return undefined;\n}\n"],"mappings":";;;;AAcA,IAAM,qBAAqB;CAAC;CAAS;CAAQ;CAAS;CAAM;AAAK;AAEjE,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAMxB,SAAgB,gBACd,aACA,YACe;CACf,MAAM,MAAMA,oBAAAA,cAAc,YAAY,SAAS,IAC1C,YAAY,YACb,CAAC;CACL,MAAM,QAAQ,YAAY,IAAI,KAAK;CACnC,MAAM,UAAU,aAAa,I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Summary;
|
|
10
10
|
export declare function addItemLabel(spec: ArrayItemSpec): string;
|
|
11
11
|
export declare function itemCountLabel(spec: ArrayItemSpec, count: number): string;
|
|
12
|
-
export declare function
|
|
12
|
+
export declare function emptyListLine(spec: ArrayItemSpec, count: number): string | undefined;
|
|
13
13
|
export declare function emptyItemsCopy(spec: ArrayItemSpec, arraySchema: JsonSchemaProperty): string | undefined;
|
|
14
14
|
export declare function noItemsLabel(spec: ArrayItemSpec): string;
|
|
15
15
|
//# sourceMappingURL=json-schema-form-item-summary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-item-summary.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-item-summary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAalC,wBAAgB,eAAe,CAC7B,WAAW,EAAE,kBAAkB,EAC/B,UAAU,EAAE,kBAAkB,GAAG,SAAS,GACzC,aAAa,
|
|
1
|
+
{"version":3,"file":"json-schema-form-item-summary.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-item-summary.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAalC,wBAAgB,eAAe,CAC7B,WAAW,EAAE,kBAAkB,EAC/B,UAAU,EAAE,kBAAkB,GAAG,SAAS,GACzC,aAAa,CAwBf;AAYD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAEtF;AA4BD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,UAAU,GACX,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,kBAAkB,GAAG,SAAS,CAAC;CAC5C,GAAG,gBAAgB,CAwDnB;AAID,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAExD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzE;AAID,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpF;AAID,wBAAgB,cAAc,CAC5B,IAAI,EAAE,aAAa,EACnB,WAAW,EAAE,kBAAkB,GAC9B,MAAM,GAAG,SAAS,CAIpB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAExD"}
|
|
@@ -24,7 +24,6 @@ function resolveItemSpec(arraySchema, itemSchema) {
|
|
|
24
24
|
...glyph ? { glyph } : {},
|
|
25
25
|
...typeof raw.badge === "string" && raw.badge ? { badge: raw.badge } : {},
|
|
26
26
|
...badges.length > 0 ? { badges } : {},
|
|
27
|
-
...raw.count === false ? { count: false } : {},
|
|
28
27
|
...typeof raw.flag === "string" && raw.flag ? { flag: raw.flag } : {},
|
|
29
28
|
...Array.isArray(raw.actions) ? { actions: itemActions(raw.actions) } : {},
|
|
30
29
|
noun: firstNonEmpty([raw.noun, itemSchema?.title]) ?? "item",
|
|
@@ -88,9 +87,8 @@ function addItemLabel(spec) {
|
|
|
88
87
|
function itemCountLabel(spec, count) {
|
|
89
88
|
return count === 1 ? `1 ${spec.noun ?? "item"}` : `${count} ${spec.nounPlural ?? "items"}`;
|
|
90
89
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
return spec.count === false ? void 0 : itemCountLabel(spec, count);
|
|
90
|
+
function emptyListLine(spec, count) {
|
|
91
|
+
return count === 0 ? noItemsLabel(spec) : void 0;
|
|
94
92
|
}
|
|
95
93
|
function emptyItemsCopy(spec, arraySchema) {
|
|
96
94
|
if (spec.empty) return spec.empty;
|
|
@@ -140,6 +138,6 @@ function firstNonEmpty(values) {
|
|
|
140
138
|
if (trimmed) return trimmed;
|
|
141
139
|
}
|
|
142
140
|
}
|
|
143
|
-
export { addItemLabel, emptyItemsCopy, itemActionsAllow, itemCountLabel,
|
|
141
|
+
export { addItemLabel, emptyItemsCopy, emptyListLine, itemActionsAllow, itemCountLabel, itemSummaryFor, noItemsLabel, resolveItemSpec };
|
|
144
142
|
|
|
145
143
|
//# sourceMappingURL=json-schema-form-item-summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-item-summary.js","names":[],"sources":["../../src/components/json-schema-form-item-summary.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { normalizeTone } from \"./json-schema-form-tone\";\nimport type {\n ArrayItemAction,\n ArrayItemSpec,\n ArrayItemSummary,\n ArrayItemSummaryPart,\n JsonSchemaObject,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Property names worth trying for a row title when the schema does not say.\n// Ordered most-human-readable first.\nconst DEFAULT_TITLE_KEYS = [\"title\", \"name\", \"label\", \"id\", \"key\"];\n\nconst SUMMARY_SEPARATOR = \" · \";\nconst VALUE_SEPARATOR = \", \";\n\n// resolveItemSpec reads the array's `x-item` and fills in every default, so the\n// renderer never has to ask whether a key was supplied. With no `x-item` at all\n// the result reproduces today's behaviour exactly: an `Item <n>` title and an\n// \"Add item\" button.\nexport function resolveItemSpec(\n arraySchema: JsonSchemaProperty,\n itemSchema: JsonSchemaProperty | undefined,\n): ArrayItemSpec {\n const raw = isPlainObject(arraySchema[\"x-item\"])\n ? (arraySchema[\"x-item\"] as ArrayItemSpec)\n : {};\n const title = stringArray(raw.title);\n const summary = summaryParts(raw.summary);\n const badges = summaryParts(raw.badges);\n const glyph = typeof raw.glyph === \"string\" ? raw.glyph : autoGlyphKey(itemSchema);\n return {\n title: title.length > 0 ? title : DEFAULT_TITLE_KEYS,\n ...(typeof raw.fallback === \"string\" && raw.fallback ? { fallback: raw.fallback } : {}),\n ...(summary.length > 0 ? { summary } : {}),\n ...(glyph ? { glyph } : {}),\n ...(typeof raw.badge === \"string\" && raw.badge ? { badge: raw.badge } : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(raw.count === false ? { count: false } : {}),\n ...(typeof raw.flag === \"string\" && raw.flag ? { flag: raw.flag } : {}),\n // Only carried when the schema actually said something: an absent key means\n // every action, while an explicit empty list means none, and those two\n // cannot be told apart once the default has been filled in.\n ...(Array.isArray(raw.actions) ? { actions: itemActions(raw.actions) } : {}),\n noun: firstNonEmpty([raw.noun, itemSchema?.title]) ?? \"item\",\n nounPlural: firstNonEmpty([raw.nounPlural, arraySchema.title]) ?? \"items\",\n ...(typeof raw.empty === \"string\" && raw.empty ? { empty: raw.empty } : {}),\n };\n}\n\nconst ITEM_ACTIONS: ArrayItemAction[] = [\"reorder\", \"duplicate\", \"remove\"];\n\nfunction itemActions(value: unknown[]): ArrayItemAction[] {\n return value.filter((entry): entry is ArrayItemAction =>\n ITEM_ACTIONS.includes(entry as ArrayItemAction),\n );\n}\n\n// itemActionsAllow is the one question every array display asks of `x-item`, so\n// the accordion and the cards never disagree about what a schema permitted.\nexport function itemActionsAllow(spec: ArrayItemSpec, action: ArrayItemAction): boolean {\n return spec.actions ? spec.actions.includes(action) : true;\n}\n\n// itemProperties is the item schema's effective properties — `allOf` members\n// included, so items composed of flattened `$ref`s summarize like any other —\n// resolved against `value`.\nfunction itemProperties(\n itemSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): Record<string, JsonSchemaProperty> {\n return itemSchema ? effectiveProperties(itemSchema as JsonSchemaObject, value).properties : {};\n}\n\n// autoGlyphKey picks the item property that can colour a row without being told:\n// the first enum carrying per-value icons. Keeps a schema that already declares\n// x-enum-icons from having to repeat itself in x-item. The spec is one per\n// array, so there is no item value to select a conditional branch: only base\n// and unconditional properties (and `else` branches, which `{}` selects) count.\nfunction autoGlyphKey(itemSchema: JsonSchemaProperty | undefined): string | undefined {\n for (const [key, prop] of Object.entries(itemProperties(itemSchema, {}))) {\n const icons = prop[\"x-enum-icons\"];\n if (Array.isArray(prop.enum) && icons && Object.keys(icons).length > 0) return key;\n }\n return undefined;\n}\n\n// itemSummaryFor derives one collapsed row from the item's raw VALUE — never\n// from its rendered fields. A consumer pre-extension may hide a property's\n// control entirely (returning null) and still have it appear in the summary.\nexport function itemSummaryFor({\n item,\n index,\n spec,\n itemSchema,\n}: {\n item: unknown;\n index: number;\n spec: ArrayItemSpec;\n itemSchema: JsonSchemaProperty | undefined;\n}): ArrayItemSummary {\n const obj = isPlainObject(item) ? item : {};\n // Resolved against this item's own value, as the item's body is rendered,\n // so a property a matching `then`/`else` branch declares labels its chip.\n const props = itemProperties(itemSchema, obj);\n\n const title =\n firstNonEmpty(\n (spec.title ?? DEFAULT_TITLE_KEYS).map((key) => {\n const value = text(obj[key]);\n return value && enumLabel(props[key], value);\n }),\n ) ??\n spec.fallback ??\n `Item ${index + 1}`;\n\n const summary = (spec.summary ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s)\n .join(SUMMARY_SEPARATOR);\n\n const badges = (spec.badges ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s);\n\n const glyphValue = spec.glyph ? text(obj[spec.glyph]) : \"\";\n const glyphProp = spec.glyph ? props[spec.glyph] : undefined;\n const badgeValue = spec.badge ? text(obj[spec.badge]) : \"\";\n const badgeProp = spec.badge ? props[spec.badge] : undefined;\n const badgeIcon = badgeProp?.[\"x-enum-icons\"]?.[badgeValue];\n\n return {\n title,\n ...(summary ? { summary } : {}),\n ...(spec.glyph\n ? {\n glyph: {\n ...(glyphProp?.[\"x-enum-icons\"]?.[glyphValue]\n ? { icon: glyphProp[\"x-enum-icons\"][glyphValue] }\n : {}),\n tone: normalizeTone(glyphProp?.[\"x-enum-tones\"]?.[glyphValue]),\n ...(glyphValue ? { label: enumLabel(glyphProp, glyphValue) } : {}),\n },\n }\n : {}),\n ...(badgeValue\n ? {\n badge: {\n ...(badgeIcon ? { icon: badgeIcon } : {}),\n label: enumLabel(badgeProp, badgeValue),\n },\n }\n : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(spec.flag && obj[spec.flag] === true ? { flagged: true } : {}),\n };\n}\n\n// The add row's button text — \"Add parameter\" when the schema names its noun,\n// and the historical \"Add item\" when it does not.\nexport function addItemLabel(spec: ArrayItemSpec): string {\n return `Add ${spec.noun ?? \"item\"}`;\n}\n\nexport function itemCountLabel(spec: ArrayItemSpec, count: number): string {\n return count === 1\n ? `1 ${spec.noun ?? \"item\"}`\n : `${count} ${spec.nounPlural ?? \"items\"}`;\n}\n\n// The line above a list: \"No items yet\" when it is empty, else the count, which\n// `x-item.count: false` drops for a list whose rows say enough.\nexport function itemCountLine(spec: ArrayItemSpec, count: number): string | undefined {\n if (count === 0) return noItemsLabel(spec);\n return spec.count === false ? undefined : itemCountLabel(spec, count);\n}\n\n// The zero-item explanation. Falls back to the array's own description, so a\n// schema that already documents the field gets the empty state for free.\nexport function emptyItemsCopy(\n spec: ArrayItemSpec,\n arraySchema: JsonSchemaProperty,\n): string | undefined {\n if (spec.empty) return spec.empty;\n const description = typeof arraySchema.description === \"string\" ? arraySchema.description.trim() : \"\";\n return description || undefined;\n}\n\nexport function noItemsLabel(spec: ArrayItemSpec): string {\n return `No ${spec.nounPlural ?? \"items\"} yet`;\n}\n\n// summaryPart renders one part, substituting the value into a single literal\n// `{}` in the pattern. A pattern without `{}` renders as-is (it is a literal),\n// and a missing value drops the part rather than leaving a dangling separator.\nfunction summaryPart(\n obj: Record<string, unknown>,\n part: string | ArrayItemSummaryPart,\n): string | undefined {\n const { property, pattern } = typeof part === \"string\" ? { property: part, pattern: undefined } : part;\n const value = text(obj[property]);\n if (!value) return undefined;\n return pattern ? pattern.replace(\"{}\", value) : value;\n}\n\n// enumLabel prefers the human label the schema declares for a code, falling back\n// to the code itself. Unlike the combobox option list this does NOT render\n// \"Label (code)\" — a chip has room for one of the two, and the label is the one\n// worth reading.\nfunction enumLabel(prop: JsonSchemaProperty | undefined, value: string): string {\n const label = prop?.[\"x-enum-labels\"]?.[value];\n return typeof label === \"string\" && label ? label : value;\n}\n\n// text flattens a value to its display string. Arrays join, so a list-valued\n// property still reads as one line.\nfunction text(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (Array.isArray(value)) return value.map(text).filter(Boolean).join(VALUE_SEPARATOR);\n if (typeof value === \"object\") return \"\";\n return String(value).trim();\n}\n\nfunction stringArray(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (!Array.isArray(value)) return [];\n return value.filter((v): v is string => typeof v === \"string\" && !!v);\n}\n\nfunction summaryParts(value: unknown): Array<string | ArrayItemSummaryPart> {\n if (!Array.isArray(value)) return [];\n return (value as unknown[]).flatMap((part): Array<string | ArrayItemSummaryPart> => {\n if (typeof part === \"string\" && part) return [part];\n if (isPlainObject(part) && typeof part.property === \"string\" && part.property) {\n return [\n {\n property: part.property,\n ...(typeof part.pattern === \"string\" && part.pattern ? { pattern: part.pattern } : {}),\n } satisfies ArrayItemSummaryPart,\n ];\n }\n return [];\n });\n}\n\nfunction firstNonEmpty(values: Array<string | undefined>): string | undefined {\n for (const value of values) {\n const trimmed = typeof value === \"string\" ? value.trim() : \"\";\n if (trimmed) return trimmed;\n }\n return undefined;\n}\n"],"mappings":";;;;AAcA,IAAM,qBAAqB;CAAC;CAAS;CAAQ;CAAS;CAAM;AAAK;AAEjE,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAMxB,SAAgB,gBACd,aACA,YACe;CACf,MAAM,MAAM,cAAc,YAAY,SAAS,IAC1C,YAAY,YACb,CAAC;CACL,MAAM,QAAQ,YAAY,IAAI,KAAK;CACnC,MAAM,UAAU,aAAa,IAAI,OAAO;CACxC,MAAM,SAAS,aAAa,IAAI,MAAM;CACtC,MAAM,QAAQ,OAAO,IAAI,UAAU,WAAW,IAAI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UAAU,MAAsC,OAAuB;CAC9E,MAAM,QAAQ,OAAO,gBAAgB,GAAG;CACxC,OAAO,OAAO,UAAU,YAAY,QAAQ,QAAQ;AACtD;AAIA,SAAS,KAAK,OAAwB;CACpC,IAAI,UAAU,KAAA,KAAa,UAAU,MAAM,OAAO;CAClD,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,IAAI,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,eAAe;CACrF,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,OAAO,KAAK,CAAC,CAAC,KAAK;AAC5B;AAEA,SAAS,YAAY,OAA0B;CAC7C,IAAI,OAAO,UAAU,UAAU,OAAO,CAAC,KAAK;CAC5C,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;CACnC,OAAO,MAAM,QAAQ,MAAmB,OAAO,MAAM,YAAY,CAAC,CAAC,CAAC;AACtE;AAEA,SAAS,aAAa,OAAsD;CAC1E,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;CACnC,OAAQ,MAAoB,SAAS,SAA+C;EAClF,IAAI,OAAO,SAAS,YAAY,MAAM,OAAO,CAAC,IAAI;EAClD,IAAI,cAAc,IAAI,KAAK,OAAO,KAAK,aAAa,YAAY,KAAK,UACnE,OAAO,CACL;GACE,UAAU,KAAK;GACf,GAAI,OAAO,KAAK,YAAY,YAAY,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;EACtF,CACF;EAEF,OAAO,CAAC;CACV,CAAC;AACH;AAEA,SAAS,cAAc,QAAuD;CAC5E,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,UAAU,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;EAC3D,IAAI,SAAS,OAAO;CACtB;AAEF"}
|
|
1
|
+
{"version":3,"file":"json-schema-form-item-summary.js","names":[],"sources":["../../src/components/json-schema-form-item-summary.ts"],"sourcesContent":["import { isPlainObject } from \"../lib/collections\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { normalizeTone } from \"./json-schema-form-tone\";\nimport type {\n ArrayItemAction,\n ArrayItemSpec,\n ArrayItemSummary,\n ArrayItemSummaryPart,\n JsonSchemaObject,\n JsonSchemaProperty,\n} from \"./json-schema-form-types\";\n\n// Property names worth trying for a row title when the schema does not say.\n// Ordered most-human-readable first.\nconst DEFAULT_TITLE_KEYS = [\"title\", \"name\", \"label\", \"id\", \"key\"];\n\nconst SUMMARY_SEPARATOR = \" · \";\nconst VALUE_SEPARATOR = \", \";\n\n// resolveItemSpec reads the array's `x-item` and fills in every default, so the\n// renderer never has to ask whether a key was supplied. With no `x-item` at all\n// the result reproduces today's behaviour exactly: an `Item <n>` title and an\n// \"Add item\" button.\nexport function resolveItemSpec(\n arraySchema: JsonSchemaProperty,\n itemSchema: JsonSchemaProperty | undefined,\n): ArrayItemSpec {\n const raw = isPlainObject(arraySchema[\"x-item\"])\n ? (arraySchema[\"x-item\"] as ArrayItemSpec)\n : {};\n const title = stringArray(raw.title);\n const summary = summaryParts(raw.summary);\n const badges = summaryParts(raw.badges);\n const glyph = typeof raw.glyph === \"string\" ? raw.glyph : autoGlyphKey(itemSchema);\n return {\n title: title.length > 0 ? title : DEFAULT_TITLE_KEYS,\n ...(typeof raw.fallback === \"string\" && raw.fallback ? { fallback: raw.fallback } : {}),\n ...(summary.length > 0 ? { summary } : {}),\n ...(glyph ? { glyph } : {}),\n ...(typeof raw.badge === \"string\" && raw.badge ? { badge: raw.badge } : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(typeof raw.flag === \"string\" && raw.flag ? { flag: raw.flag } : {}),\n // Only carried when the schema actually said something: an absent key means\n // every action, while an explicit empty list means none, and those two\n // cannot be told apart once the default has been filled in.\n ...(Array.isArray(raw.actions) ? { actions: itemActions(raw.actions) } : {}),\n noun: firstNonEmpty([raw.noun, itemSchema?.title]) ?? \"item\",\n nounPlural: firstNonEmpty([raw.nounPlural, arraySchema.title]) ?? \"items\",\n ...(typeof raw.empty === \"string\" && raw.empty ? { empty: raw.empty } : {}),\n };\n}\n\nconst ITEM_ACTIONS: ArrayItemAction[] = [\"reorder\", \"duplicate\", \"remove\"];\n\nfunction itemActions(value: unknown[]): ArrayItemAction[] {\n return value.filter((entry): entry is ArrayItemAction =>\n ITEM_ACTIONS.includes(entry as ArrayItemAction),\n );\n}\n\n// itemActionsAllow is the one question every array display asks of `x-item`, so\n// the accordion and the cards never disagree about what a schema permitted.\nexport function itemActionsAllow(spec: ArrayItemSpec, action: ArrayItemAction): boolean {\n return spec.actions ? spec.actions.includes(action) : true;\n}\n\n// itemProperties is the item schema's effective properties — `allOf` members\n// included, so items composed of flattened `$ref`s summarize like any other —\n// resolved against `value`.\nfunction itemProperties(\n itemSchema: JsonSchemaProperty | undefined,\n value: Record<string, unknown>,\n): Record<string, JsonSchemaProperty> {\n return itemSchema ? effectiveProperties(itemSchema as JsonSchemaObject, value).properties : {};\n}\n\n// autoGlyphKey picks the item property that can colour a row without being told:\n// the first enum carrying per-value icons. Keeps a schema that already declares\n// x-enum-icons from having to repeat itself in x-item. The spec is one per\n// array, so there is no item value to select a conditional branch: only base\n// and unconditional properties (and `else` branches, which `{}` selects) count.\nfunction autoGlyphKey(itemSchema: JsonSchemaProperty | undefined): string | undefined {\n for (const [key, prop] of Object.entries(itemProperties(itemSchema, {}))) {\n const icons = prop[\"x-enum-icons\"];\n if (Array.isArray(prop.enum) && icons && Object.keys(icons).length > 0) return key;\n }\n return undefined;\n}\n\n// itemSummaryFor derives one collapsed row from the item's raw VALUE — never\n// from its rendered fields. A consumer pre-extension may hide a property's\n// control entirely (returning null) and still have it appear in the summary.\nexport function itemSummaryFor({\n item,\n index,\n spec,\n itemSchema,\n}: {\n item: unknown;\n index: number;\n spec: ArrayItemSpec;\n itemSchema: JsonSchemaProperty | undefined;\n}): ArrayItemSummary {\n const obj = isPlainObject(item) ? item : {};\n // Resolved against this item's own value, as the item's body is rendered,\n // so a property a matching `then`/`else` branch declares labels its chip.\n const props = itemProperties(itemSchema, obj);\n\n const title =\n firstNonEmpty(\n (spec.title ?? DEFAULT_TITLE_KEYS).map((key) => {\n const value = text(obj[key]);\n return value && enumLabel(props[key], value);\n }),\n ) ??\n spec.fallback ??\n `Item ${index + 1}`;\n\n const summary = (spec.summary ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s)\n .join(SUMMARY_SEPARATOR);\n\n const badges = (spec.badges ?? [])\n .map((part) => summaryPart(obj, part))\n .filter((s): s is string => !!s);\n\n const glyphValue = spec.glyph ? text(obj[spec.glyph]) : \"\";\n const glyphProp = spec.glyph ? props[spec.glyph] : undefined;\n const badgeValue = spec.badge ? text(obj[spec.badge]) : \"\";\n const badgeProp = spec.badge ? props[spec.badge] : undefined;\n const badgeIcon = badgeProp?.[\"x-enum-icons\"]?.[badgeValue];\n\n return {\n title,\n ...(summary ? { summary } : {}),\n ...(spec.glyph\n ? {\n glyph: {\n ...(glyphProp?.[\"x-enum-icons\"]?.[glyphValue]\n ? { icon: glyphProp[\"x-enum-icons\"][glyphValue] }\n : {}),\n tone: normalizeTone(glyphProp?.[\"x-enum-tones\"]?.[glyphValue]),\n ...(glyphValue ? { label: enumLabel(glyphProp, glyphValue) } : {}),\n },\n }\n : {}),\n ...(badgeValue\n ? {\n badge: {\n ...(badgeIcon ? { icon: badgeIcon } : {}),\n label: enumLabel(badgeProp, badgeValue),\n },\n }\n : {}),\n ...(badges.length > 0 ? { badges } : {}),\n ...(spec.flag && obj[spec.flag] === true ? { flagged: true } : {}),\n };\n}\n\n// The add row's button text — \"Add parameter\" when the schema names its noun,\n// and the historical \"Add item\" when it does not.\nexport function addItemLabel(spec: ArrayItemSpec): string {\n return `Add ${spec.noun ?? \"item\"}`;\n}\n\nexport function itemCountLabel(spec: ArrayItemSpec, count: number): string {\n return count === 1\n ? `1 ${spec.noun ?? \"item\"}`\n : `${count} ${spec.nounPlural ?? \"items\"}`;\n}\n\n// The line above a list: \"No items yet\" when it is empty, else none — the rows\n// themselves show how many there are.\nexport function emptyListLine(spec: ArrayItemSpec, count: number): string | undefined {\n return count === 0 ? noItemsLabel(spec) : undefined;\n}\n\n// The zero-item explanation. Falls back to the array's own description, so a\n// schema that already documents the field gets the empty state for free.\nexport function emptyItemsCopy(\n spec: ArrayItemSpec,\n arraySchema: JsonSchemaProperty,\n): string | undefined {\n if (spec.empty) return spec.empty;\n const description = typeof arraySchema.description === \"string\" ? arraySchema.description.trim() : \"\";\n return description || undefined;\n}\n\nexport function noItemsLabel(spec: ArrayItemSpec): string {\n return `No ${spec.nounPlural ?? \"items\"} yet`;\n}\n\n// summaryPart renders one part, substituting the value into a single literal\n// `{}` in the pattern. A pattern without `{}` renders as-is (it is a literal),\n// and a missing value drops the part rather than leaving a dangling separator.\nfunction summaryPart(\n obj: Record<string, unknown>,\n part: string | ArrayItemSummaryPart,\n): string | undefined {\n const { property, pattern } = typeof part === \"string\" ? { property: part, pattern: undefined } : part;\n const value = text(obj[property]);\n if (!value) return undefined;\n return pattern ? pattern.replace(\"{}\", value) : value;\n}\n\n// enumLabel prefers the human label the schema declares for a code, falling back\n// to the code itself. Unlike the combobox option list this does NOT render\n// \"Label (code)\" — a chip has room for one of the two, and the label is the one\n// worth reading.\nfunction enumLabel(prop: JsonSchemaProperty | undefined, value: string): string {\n const label = prop?.[\"x-enum-labels\"]?.[value];\n return typeof label === \"string\" && label ? label : value;\n}\n\n// text flattens a value to its display string. Arrays join, so a list-valued\n// property still reads as one line.\nfunction text(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (Array.isArray(value)) return value.map(text).filter(Boolean).join(VALUE_SEPARATOR);\n if (typeof value === \"object\") return \"\";\n return String(value).trim();\n}\n\nfunction stringArray(value: unknown): string[] {\n if (typeof value === \"string\") return [value];\n if (!Array.isArray(value)) return [];\n return value.filter((v): v is string => typeof v === \"string\" && !!v);\n}\n\nfunction summaryParts(value: unknown): Array<string | ArrayItemSummaryPart> {\n if (!Array.isArray(value)) return [];\n return (value as unknown[]).flatMap((part): Array<string | ArrayItemSummaryPart> => {\n if (typeof part === \"string\" && part) return [part];\n if (isPlainObject(part) && typeof part.property === \"string\" && part.property) {\n return [\n {\n property: part.property,\n ...(typeof part.pattern === \"string\" && part.pattern ? { pattern: part.pattern } : {}),\n } satisfies ArrayItemSummaryPart,\n ];\n }\n return [];\n });\n}\n\nfunction firstNonEmpty(values: Array<string | undefined>): string | undefined {\n for (const value of values) {\n const trimmed = typeof value === \"string\" ? value.trim() : \"\";\n if (trimmed) return trimmed;\n }\n return undefined;\n}\n"],"mappings":";;;;AAcA,IAAM,qBAAqB;CAAC;CAAS;CAAQ;CAAS;CAAM;AAAK;AAEjE,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AAMxB,SAAgB,gBACd,aACA,YACe;CACf,MAAM,MAAM,cAAc,YAAY,SAAS,IAC1C,YAAY,YACb,CAAC;CACL,MAAM,QAAQ,YAAY,IAAI,KAAK;CACnC,MAAM,UAAU,aAAa,IAAI,OAAO;CACxC,MAAM,SAAS,aAAa,IAAI,MAAM;CACtC,MAAM,QAAQ,OAAO,IAAI,UAAU,WAAW,IAAI,QAAQ,aAAa,UAAU;CACjF,OAAO;EACL,OAAO,MAAM,SAAS,IAAI,QAAQ;EAClC,GAAI,OAAO,IAAI,aAAa,YAAY,IAAI,WAAW,EAAE,UAAU,IAAI,SAAS,IAAI,CAAC;EACrF,GAAI,QAAQ,SAAS,IAAI,EAAE,QAAQ,IAAI,CAAC;EACxC,GAAI,QAAQ,EAAE,MAAM,IAAI,CAAC;EACzB,GAAI,OAAO,IAAI,UAAU,YAAY,IAAI,QAAQ,EAAE,OAAO,IAAI,MAAM,IAAI,CAAC;EACzE,GAAI,OAAO,SAAS,IAAI,EAAE,OAAO,IAAI,CAAC;EACtC,GAAI,OAAO,IAAI,SAAS,YAAY,IAAI,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;EAIrE,GAAI,MAAM,QAAQ,IAAI,OA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C,MAAM,QAAQ,KAAK,GAAG,OAAO,CAAC;CACnC,OAAQ,MAAoB,SAAS,SAA+C;EAClF,IAAI,OAAO,SAAS,YAAY,MAAM,OAAO,CAAC,IAAI;EAClD,IAAI,cAAc,IAAI,KAAK,OAAO,KAAK,aAAa,YAAY,KAAK,UACnE,OAAO,CACL;GACE,UAAU,KAAK;GACf,GAAI,OAAO,KAAK,YAAY,YAAY,KAAK,UAAU,EAAE,SAAS,KAAK,QAAQ,IAAI,CAAC;EACtF,CACF;EAEF,OAAO,CAAC;CACV,CAAC;AACH;AAEA,SAAS,cAAc,QAAuD;CAC5E,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,UAAU,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;EAC3D,IAAI,SAAS,OAAO;CACtB;AAEF"}
|
|
@@ -504,6 +504,7 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
504
504
|
const rowDisplay = schema["x-object-display"] === "row" && ctx.layout.mode !== "properties";
|
|
505
505
|
const exclusive = require_json_schema_form_exclusive_keys.exclusiveKeys(schema)?.filter((key) => !hidden.has(key) && entries.some(([entry]) => entry === key));
|
|
506
506
|
const exclusiveAt = exclusive && exclusive.length > 1 ? entries.find(([key]) => exclusive.includes(key))?.[0] : void 0;
|
|
507
|
+
const isRevealed = (key) => ctx.revealedLists.paths.has(require_json_schema_form_errors.appendInstancePath(ctx.instancePath, key));
|
|
507
508
|
const rows = entries.flatMap(([key, prop]) => {
|
|
508
509
|
if (hidden.has(key)) return [];
|
|
509
510
|
if (exclusive && exclusiveAt !== void 0 && exclusive.includes(key)) {
|
|
@@ -534,7 +535,7 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
534
535
|
}, `exclusive:${exclusive.join("|")}`)] : [];
|
|
535
536
|
}
|
|
536
537
|
if (rowDisplay) return renderRowCell(fieldArgs(key, prop), ctx);
|
|
537
|
-
if (compactArrays && prop.type === "array" && prop["x-hidden"] !== false && (!Array.isArray(value[key]) || value[key].length === 0)) return [];
|
|
538
|
+
if (compactArrays && prop.type === "array" && prop["x-hidden"] !== false && !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0)) return [];
|
|
538
539
|
const row = renderFieldRow(fieldArgs(key, prop), ctx);
|
|
539
540
|
if (!row) return [];
|
|
540
541
|
if (columns === "auto" || columns > 1) {
|
|
@@ -556,12 +557,20 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
556
557
|
if (!prop || prop.type !== "array") throw new Error(`cannot add item to ${key}`);
|
|
557
558
|
const items = value[key];
|
|
558
559
|
if (items !== void 0 && !Array.isArray(items)) throw new Error(`${key} is not an array`);
|
|
560
|
+
if (require_json_schema_form_resolve.isFlatTagList(prop)) {
|
|
561
|
+
ctx.revealedLists.reveal(require_json_schema_form_errors.appendInstancePath(ctx.instancePath, key));
|
|
562
|
+
onChange({
|
|
563
|
+
...value,
|
|
564
|
+
[key]: items ?? []
|
|
565
|
+
});
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
559
568
|
onChange({
|
|
560
569
|
...value,
|
|
561
570
|
[key]: [...items ?? [], require_json_schema_form_utils.seedFromSchema(prop.items ?? { type: "string" })]
|
|
562
571
|
});
|
|
563
572
|
};
|
|
564
|
-
const offered = available.filter(([key]) => !Array.isArray(value[key]) || value[key].length === 0);
|
|
573
|
+
const offered = available.filter(([key]) => !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0));
|
|
565
574
|
if (offered.length > 0) {
|
|
566
575
|
const menu = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_json_schema_form_array_add_menu.ArrayAddMenu, {
|
|
567
576
|
owner: ctx.instancePath ?? "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-render.cjs","names":["fieldInputId","NullableControl","PropertyValuePreview","ReadOnlyValue","UnionControl","JsonControl","EnumControl","LookupControl","BooleanControl","NumberControl","DateControl","TextareaControl","MarkdownControl","DisplayControl","LinkControl","ArrayControl","ObjectControl","StringMapControl","CustomControl","StringControl","resolveControl","UiText","UiCalendar","UiToggleOff","UiListNumbers","UiArray","UiCode2","UiListDashes","isEmptyValue","appendInstancePath","errorsAtInstancePath","softError","SectionHeading","rowLayoutEngine","rendersAsSection","FieldLabel","propertyControlSize","nullableGroupClearable","FieldClearButton","applyPostExtensions","PropertyValueEditor","withFieldDebug","FieldErrorText","fieldErrorId","PropertiesFieldRow","FormObjectSection","ObjectSection","hasFormHelp","FormHelp","cn","labelSizeClass","LabelIcon","HelpHint","FieldErrorMessages","FieldWrapper","applyListenerState","hoistNestedFields","isHoisted","applyChangeEffects","orderByClickyOrder","orderByXOrder","orderRequiredFirst","orderByPriority","matchesFieldFilter","normalizeColumns","isBuiltInFormLayout","exclusiveKeys","ExclusiveKeySelect","switchExclusiveKey","normalizeColSpan","seedFromSchema","ArrayAddMenu","effectiveProperties","schemaRendersAsObject","hasObjectItemProperties"],"sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { withFieldDebug } from \"./json-schema-form-debug\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { CustomControl } from \"./json-schema-form-custom-control\";\nimport { isBuiltInFormLayout, rowLayoutEngine, type BuiltFieldRow, type LayoutEngine } from \"./json-schema-form-extension-api\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport { hoistNestedFields, isHoisted } from \"./json-schema-form-hoist\";\nimport type {\n FieldArgs,\n FieldControl,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n nullableGroupClearable,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { UnionControl } from \"./json-schema-form-union\";\nimport { ArrayAddMenu } from \"./json-schema-form-array-add-menu\";\nimport { exclusiveKeys, switchExclusiveKey } from \"./json-schema-form-exclusive-keys\";\nimport { ExclusiveKeySelect } from \"./json-schema-form-exclusive-key-select\";\nimport { JsonControl } from \"./json-schema-form-json\";\nimport { NullableControl } from \"./json-schema-form-nullable\";\nimport { FormObjectSection } from \"./json-schema-form-section\";\nimport { FieldClearButton } from \"./field-clear-button\";\nimport { UiText, UiCalendar, UiToggleOff, UiListNumbers, UiArray, UiCode2, UiListDashes } from \"../icons\";\nimport { FormHelp } from \"./json-schema-form-help-links\";\nimport { hasFormHelp } from \"./json-schema-form-help-model\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(\n field: FieldControl,\n ctx: RenderContext,\n opts?: { clearInHeader?: boolean },\n): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (field.nullable && !ctx.presentation) {\n const nonNull = { ...field, onChange: (next: unknown) => field.onChange(field.kind === \"date\" && next === \"\" ? null : next) };\n return <NullableControl field={field} fieldId={fieldId} ctx={ctx} clearInHeader={opts?.clearInHeader === true}>{renderNonNullableControl(nonNull, ctx)}</NullableControl>;\n }\n return renderNonNullableControl(field, ctx);\n}\n\nfunction renderNonNullableControl(field: FieldControl, ctx: RenderContext): ReactNode {\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"union\":\n return <UnionControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"json\":\n return <JsonControl field={field} fieldId={fieldId} readOnly={readOnly} />;\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n case \"custom\":\n return <CustomControl field={field} fieldId={fieldId} readOnly={readOnly} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, textarea/display/link have bespoke read-only\n// output, and a custom control is handed `readOnly` to present itself.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\" ||\n kind === \"custom\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\n// `row` is set by renderFieldRow: a section row's header can then carry a\n// nullable value's clear action (headerClear) in place of a bordered wrapper.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n row?: { labelOverride?: string | undefined },\n): (BuiltFieldRow & { engine: LayoutEngine | undefined }) | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n // hide says whether to drop the field; in debug mode it keeps it and records\n // the first reason it would have gone.\n let hiddenReason: string | undefined;\n const hide = (reason: string) => {\n if (!ctx.debug) return true;\n hiddenReason ??= reason;\n return false;\n };\n const hiddenBy = args.prop[\"x-hidden-by\"];\n if (args.prop[\"x-hidden\"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : \"hidden by the schema (x-hidden)\")) return null;\n // A const already holding its value is a fixed discriminator (the union\n // selector chose it); there is nothing to edit, so it is not shown.\n if (args.prop.const !== undefined && args.prop[\"x-hidden\"] !== false && args.value === args.prop.const && hide(\"hidden: const discriminator\")) return null;\n const base = resolveControl({ ...args, extensions: ctx.extensions });\n if (ctx.showTypeIcons && base.labelIcon == null) {\n const icons = { string: UiText, textarea: UiText, markdown: UiText, date: UiCalendar, boolean: UiToggleOff, number: UiListNumbers, array: UiArray, object: UiCode2, \"string-map\": UiCode2, enum: UiListDashes };\n if (base.kind in icons) {\n const Glyph = icons[base.kind as keyof typeof icons];\n base.labelIcon = <Glyph />;\n }\n }\n let field: FieldControl | null = base;\n let beforeDrop: FieldControl = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n beforeDrop = field;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n ...(args.parent ? { parent: args.parent } : {}),\n });\n }\n // Debug mode keeps a dropped field for inspection, as its control alone: the\n // extension that dropped it may own its rendering elsewhere (a post-extension\n // drawing it beside another field), so post-extensions never see it.\n const keptForDebug = !field;\n if (!field) {\n if (hide(\"dropped by a form extension\")) return null;\n field = beforeDrop;\n }\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly && hide(\"hidden: read-only\")) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide(\"hidden: write-only\")) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value) && hide(\"hidden: empty\")) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, ...soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n const Heading = ctx.extensions.slots.SectionHeading ?? SectionHeading;\n // Throws for an x-layout / layout.mode no extension registered, before any\n // control renders against it.\n const engine = rowLayoutEngine({\n fieldKey: args.key,\n fieldLayout: field.layout,\n formMode: ctx.layout.mode,\n layouts: ctx.extensions.layouts,\n });\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <Heading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n const clearInHeader =\n row !== undefined &&\n field.nullable === true &&\n !ctx.presentation &&\n rendersAsSection(field, ctx.layout.mode) &&\n (row.labelOverride ?? field.label) !== \"\";\n const nullField = field;\n const headerClear = clearInHeader && nullableGroupClearable(field, valueCtx.readOnly || field.readOnly === true) ? (\n <FieldClearButton clearLabel={`Clear ${field.label} to null`} onClear={() => nullField.onChange(null)} />\n ) : null;\n let value: ReactNode = renderValueControl(field, valueCtx, { clearInHeader });\n const postCtx = {\n fieldId,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n valueCtx.readOnly ? { ...field, readOnly: true } : field,\n { label, value },\n keptForDebug ? [] : ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n keptForDebug ? [] : ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n keptForDebug ? [] : draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n if (ctx.debug && field.kind !== \"display\") {\n const source = field.kind === \"custom\" ? ctx.extensions.formats.get(field.format ?? \"\")?.extension : undefined;\n ({ label, value } = withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason, ...(source ? { source } : {}) }));\n }\n return { field, fieldId, label, value, headerClear, messages, help, engine };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const FieldError = ctx.extensions.slots.FieldError ?? FieldErrorText;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string; labelNode?: ReactNode },\n): ReactNode | null {\n const buildResult = buildField(args, ctx, { labelOverride: opts?.labelOverride });\n if (!buildResult) return null;\n const { engine, ...built } = buildResult;\n const { field } = built;\n const FieldError = ctx.extensions.slots.FieldError ?? FieldErrorText;\n const Heading = ctx.extensions.slots.SectionHeading ?? SectionHeading;\n if (engine) {\n return engine.Row(opts?.labelOverride === undefined ? built : { ...built, label: opts.labelOverride }, ctx);\n }\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n if (field.kind === \"object\" && field.label !== \"\" && (field.schema[\"x-object-display\"] ?? ctx.objectDisplay) === \"accordion\") {\n const path = args.instancePath ?? appendInstancePath(ctx.instancePath, field.key);\n const hasErrors = built.messages.length > 0 || ctx.errors.some(error => error.instancePath.startsWith(`${path}/`));\n return <FormObjectSection title={built.label} actions={built.headerClear} hasErrors={hasErrors}>\n {built.messages.length > 0 && <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} />}{built.value}\n </FormObjectSection>;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <Heading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n actions={built.headerClear}\n actionsOwner={args.instancePath ?? appendInstancePath(ctx.instancePath, args.key)}\n size={ctx.size}\n helpDisplay={built.help}\n {...(hasFormHelp(field) ? { helper: <FormHelp field={field} /> } : {})}\n >\n {built.messages.length > 0 && (\n <FieldError\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n )}\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelNode !== undefined ? opts.labelNode : opts?.labelOverride ? (\n <label htmlFor={built.fieldId} className={cn(\"flex items-center gap-2 whitespace-nowrap font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && hasFormHelp(field) && (\n <HelpHint label={opts.labelOverride} helper={<FormHelp field={field} />} />\n )}\n </label>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const hasMessages = built.messages.length > 0;\n const customError = ctx.extensions.slots.FieldError;\n const err =\n hasMessages && !customError ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(hasFormHelp(field) && built.help !== \"hover\" ? { helper: <FormHelp field={field} /> } : {})}\n {...(err ? { error: err } : {})}\n {...(hasMessages && customError ? { errorElement: <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} /> } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // A nested object's `x-clicky-hoist` fields render in this grid instead of\n // its section; at depth > 0 this object's own hoisted fields belong to the parent.\n const hoisted = hoistNestedFields({\n properties, value, onChange, schema, listenerOptions, instancePath: ctx.instancePath,\n });\n const own = Object.entries(properties).filter(\n ([key, prop]) => !hoisted.emptied.has(key) && !(ctx.depth > 0 && isHoisted(prop)),\n );\n const parent = { schema: { ...schema, properties }, value, onChange };\n const fieldArgs = (key: string, prop: JsonSchemaProperty): FieldArgs =>\n hoisted.rows.get(key) ?? {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n parent,\n };\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(\n orderByXOrder([...own, ...Array.from(hoisted.rows, ([key, args]) => [key, args.prop] as [string, JsonSchemaProperty])], schema[\"x-order\"]),\n );\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: fieldArgs(key, prop).value }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const addMenu = ctx.layout.emptyArrays === \"add-menu\";\n // Collapsing empty arrays is the built-in layouts' arrangement; a registered\n // layout engine owns its rows, so it is handed every array row instead.\n const compactArrays = isBuiltInFormLayout(ctx.layout.mode) && ctx.layout.mode !== \"properties\" && arrayEntries.length > (addMenu ? 0 : 3);\n const rowDisplay = schema[\"x-object-display\"] === \"row\" && ctx.layout.mode !== \"properties\";\n const exclusive = exclusiveKeys(schema)?.filter((key) => !hidden.has(key) && entries.some(([entry]) => entry === key));\n const exclusiveAt = exclusive && exclusive.length > 1 ? entries.find(([key]) => exclusive.includes(key))?.[0] : undefined;\n const rows = entries.flatMap(([key, prop]): ReactNode[] => {\n if (hidden.has(key)) return [];\n if (exclusive && exclusiveAt !== undefined && exclusive.includes(key)) {\n if (key !== exclusiveAt) return [];\n // The keys' one row sits where the first of them is ordered, as the chosen key's control.\n const chosen = exclusive.find((candidate) => value[candidate] !== undefined) ?? exclusive[0]!;\n const chosenProp = properties[chosen]!;\n const row = renderFieldRow({ ...fieldArgs(chosen, chosenProp), required: true }, ctx, {\n labelNode: (\n <ExclusiveKeySelect\n keys={exclusive.map((candidate) => ({ key: candidate, label: properties[candidate]?.title || candidate }))}\n value={chosen}\n fieldId={fieldInputId(appendInstancePath(ctx.instancePath, chosen), ctx.idPrefix)}\n disabled={ctx.readOnly || ctx.presentation === true}\n onChange={(next) => onChange(switchExclusiveKey({ value, keys: exclusive, next }))}\n />\n ),\n });\n return row ? [<div key={`exclusive:${exclusive.join(\"|\")}`} className=\"contents\" data-jsf-exclusive-keys=\"\">{row}</div>] : [];\n }\n if (rowDisplay) return renderRowCell(fieldArgs(key, prop), ctx);\n if (compactArrays && prop.type === \"array\" && prop[\"x-hidden\"] !== false && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(fieldArgs(key, prop), ctx);\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !rowDisplay && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && prop[\"x-hidden\"] === undefined && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n const addItem = (key: string) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n };\n // The Add menu offers only the arrays it hid; an array with items is shown and adds inline.\n const offered = available.filter(([key]) => !Array.isArray(value[key]) || value[key].length === 0);\n if (offered.length > 0) {\n // One Add menu: a plus button in the object's section header, or an Add button at the top (add-menu) or foot of its grid.\n const menu = <ArrayAddMenu key=\"keyed-array-add\" owner={ctx.instancePath ?? \"\"}\n items={offered.map(([key, prop]) => ({ key, label: prop.title || key, onSelect: () => addItem(key) }))} />;\n if (addMenu) rows.unshift(menu);\n else rows.push(menu);\n }\n }\n return rows;\n}\n\n// renderRowCell renders one field of an `x-object-display: \"row\"` object as a\n// flex cell: the control (plus its error) with a screen-reader-only label, so\n// the fields read as one compact control under the object's own label.\nfunction renderRowCell(args: FieldArgs, ctx: RenderContext): ReactNode[] {\n const nodes = renderFieldNodes(args, ctx);\n if (!nodes) return [];\n const label = args.prop.title || args.key;\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n return [\n <div key={args.key} data-jsf-row-cell={args.key} title={label} className=\"min-w-0 flex-1 basis-0\">\n <label htmlFor={fieldInputId(instancePath, ctx.idPrefix)} className=\"sr-only\">\n {label}\n {args.required ? \" (required)\" : \"\"}\n </label>\n {nodes.value}\n </div>,\n ];\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,SAAgB,mBACd,OACA,KAC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AA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;GAAO,SAAS7B,+BAAAA,aAAa,cAAc,IAAI,QAAQ;GAAG,WAAU;GAApE,UAAA,CACG,OACA,KAAK,WAAW,gBAAgB,EAC5B;EACN,CAAA,GAAA,MAAM,KACJ;CANK,GAAA,KAAK,GAMV,CACP;AACF;AAKA,SAAS,iBAAiB,MAAmC;CAC3D,MAAM,kBAAkBwE,sCAAAA,oBAAoB,MAA0B,CAAC,CAAC,CAAC,CAAC;CAC1E,IAAIC,iCAAAA,sBAAsB,IAAI,MAAM,KAAK,eAAe,KAAA,KAAa,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,IACzG,OAAO;CAKT,IAAIC,+BAAAA,wBAAwB,KAAK,KAAK,KAAK,KAAK,uBAAuB,WACrE,OAAO;CAET,OAAO,KAAK,gBAAgB;AAC9B;AAIA,IAAa,YAAuB;CAClC;CACA;CACA;AACF"}
|
|
1
|
+
{"version":3,"file":"json-schema-form-render.cjs","names":["fieldInputId","NullableControl","PropertyValuePreview","ReadOnlyValue","UnionControl","JsonControl","EnumControl","LookupControl","BooleanControl","NumberControl","DateControl","TextareaControl","MarkdownControl","DisplayControl","LinkControl","ArrayControl","ObjectControl","StringMapControl","CustomControl","StringControl","resolveControl","UiText","UiCalendar","UiToggleOff","UiListNumbers","UiArray","UiCode2","UiListDashes","isEmptyValue","appendInstancePath","errorsAtInstancePath","softError","SectionHeading","rowLayoutEngine","rendersAsSection","FieldLabel","propertyControlSize","nullableGroupClearable","FieldClearButton","applyPostExtensions","PropertyValueEditor","withFieldDebug","FieldErrorText","fieldErrorId","PropertiesFieldRow","FormObjectSection","ObjectSection","hasFormHelp","FormHelp","cn","labelSizeClass","LabelIcon","HelpHint","FieldErrorMessages","FieldWrapper","applyListenerState","hoistNestedFields","isHoisted","applyChangeEffects","orderByClickyOrder","orderByXOrder","orderRequiredFirst","orderByPriority","matchesFieldFilter","normalizeColumns","isBuiltInFormLayout","exclusiveKeys","ExclusiveKeySelect","switchExclusiveKey","normalizeColSpan","isFlatTagList","seedFromSchema","ArrayAddMenu","effectiveProperties","schemaRendersAsObject","hasObjectItemProperties"],"sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { withFieldDebug } from \"./json-schema-form-debug\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { CustomControl } from \"./json-schema-form-custom-control\";\nimport { isBuiltInFormLayout, rowLayoutEngine, type BuiltFieldRow, type LayoutEngine } from \"./json-schema-form-extension-api\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { isFlatTagList, resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport { hoistNestedFields, isHoisted } from \"./json-schema-form-hoist\";\nimport type {\n FieldArgs,\n FieldControl,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n nullableGroupClearable,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { UnionControl } from \"./json-schema-form-union\";\nimport { ArrayAddMenu } from \"./json-schema-form-array-add-menu\";\nimport { exclusiveKeys, switchExclusiveKey } from \"./json-schema-form-exclusive-keys\";\nimport { ExclusiveKeySelect } from \"./json-schema-form-exclusive-key-select\";\nimport { JsonControl } from \"./json-schema-form-json\";\nimport { NullableControl } from \"./json-schema-form-nullable\";\nimport { FormObjectSection } from \"./json-schema-form-section\";\nimport { FieldClearButton } from \"./field-clear-button\";\nimport { UiText, UiCalendar, UiToggleOff, UiListNumbers, UiArray, UiCode2, UiListDashes } from \"../icons\";\nimport { FormHelp } from \"./json-schema-form-help-links\";\nimport { hasFormHelp } from \"./json-schema-form-help-model\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(\n field: FieldControl,\n ctx: RenderContext,\n opts?: { clearInHeader?: boolean },\n): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (field.nullable && !ctx.presentation) {\n const nonNull = { ...field, onChange: (next: unknown) => field.onChange(field.kind === \"date\" && next === \"\" ? null : next) };\n return <NullableControl field={field} fieldId={fieldId} ctx={ctx} clearInHeader={opts?.clearInHeader === true}>{renderNonNullableControl(nonNull, ctx)}</NullableControl>;\n }\n return renderNonNullableControl(field, ctx);\n}\n\nfunction renderNonNullableControl(field: FieldControl, ctx: RenderContext): ReactNode {\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"union\":\n return <UnionControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"json\":\n return <JsonControl field={field} fieldId={fieldId} readOnly={readOnly} />;\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n case \"custom\":\n return <CustomControl field={field} fieldId={fieldId} readOnly={readOnly} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, textarea/display/link have bespoke read-only\n// output, and a custom control is handed `readOnly` to present itself.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\" ||\n kind === \"custom\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\n// `row` is set by renderFieldRow: a section row's header can then carry a\n// nullable value's clear action (headerClear) in place of a bordered wrapper.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n row?: { labelOverride?: string | undefined },\n): (BuiltFieldRow & { engine: LayoutEngine | undefined }) | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n // hide says whether to drop the field; in debug mode it keeps it and records\n // the first reason it would have gone.\n let hiddenReason: string | undefined;\n const hide = (reason: string) => {\n if (!ctx.debug) return true;\n hiddenReason ??= reason;\n return false;\n };\n const hiddenBy = args.prop[\"x-hidden-by\"];\n if (args.prop[\"x-hidden\"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : \"hidden by the schema (x-hidden)\")) return null;\n // A const already holding its value is a fixed discriminator (the union\n // selector chose it); there is nothing to edit, so it is not shown.\n if (args.prop.const !== undefined && args.prop[\"x-hidden\"] !== false && args.value === args.prop.const && hide(\"hidden: const discriminator\")) return null;\n const base = resolveControl({ ...args, extensions: ctx.extensions });\n if (ctx.showTypeIcons && base.labelIcon == null) {\n const icons = { string: UiText, textarea: UiText, markdown: UiText, date: UiCalendar, boolean: UiToggleOff, number: UiListNumbers, array: UiArray, object: UiCode2, \"string-map\": UiCode2, enum: UiListDashes };\n if (base.kind in icons) {\n const Glyph = icons[base.kind as keyof typeof icons];\n base.labelIcon = <Glyph />;\n }\n }\n let field: FieldControl | null = base;\n let beforeDrop: FieldControl = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n beforeDrop = field;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n ...(args.parent ? { parent: args.parent } : {}),\n });\n }\n // Debug mode keeps a dropped field for inspection, as its control alone: the\n // extension that dropped it may own its rendering elsewhere (a post-extension\n // drawing it beside another field), so post-extensions never see it.\n const keptForDebug = !field;\n if (!field) {\n if (hide(\"dropped by a form extension\")) return null;\n field = beforeDrop;\n }\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly && hide(\"hidden: read-only\")) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide(\"hidden: write-only\")) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value) && hide(\"hidden: empty\")) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, ...soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n const Heading = ctx.extensions.slots.SectionHeading ?? SectionHeading;\n // Throws for an x-layout / layout.mode no extension registered, before any\n // control renders against it.\n const engine = rowLayoutEngine({\n fieldKey: args.key,\n fieldLayout: field.layout,\n formMode: ctx.layout.mode,\n layouts: ctx.extensions.layouts,\n });\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <Heading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n const clearInHeader =\n row !== undefined &&\n field.nullable === true &&\n !ctx.presentation &&\n rendersAsSection(field, ctx.layout.mode) &&\n (row.labelOverride ?? field.label) !== \"\";\n const nullField = field;\n const headerClear = clearInHeader && nullableGroupClearable(field, valueCtx.readOnly || field.readOnly === true) ? (\n <FieldClearButton clearLabel={`Clear ${field.label} to null`} onClear={() => nullField.onChange(null)} />\n ) : null;\n let value: ReactNode = renderValueControl(field, valueCtx, { clearInHeader });\n const postCtx = {\n fieldId,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n valueCtx.readOnly ? { ...field, readOnly: true } : field,\n { label, value },\n keptForDebug ? [] : ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n keptForDebug ? [] : ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n keptForDebug ? [] : draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n if (ctx.debug && field.kind !== \"display\") {\n const source = field.kind === \"custom\" ? ctx.extensions.formats.get(field.format ?? \"\")?.extension : undefined;\n ({ label, value } = withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason, ...(source ? { source } : {}) }));\n }\n return { field, fieldId, label, value, headerClear, messages, help, engine };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const FieldError = ctx.extensions.slots.FieldError ?? FieldErrorText;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string; labelNode?: ReactNode },\n): ReactNode | null {\n const buildResult = buildField(args, ctx, { labelOverride: opts?.labelOverride });\n if (!buildResult) return null;\n const { engine, ...built } = buildResult;\n const { field } = built;\n const FieldError = ctx.extensions.slots.FieldError ?? FieldErrorText;\n const Heading = ctx.extensions.slots.SectionHeading ?? SectionHeading;\n if (engine) {\n return engine.Row(opts?.labelOverride === undefined ? built : { ...built, label: opts.labelOverride }, ctx);\n }\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n if (field.kind === \"object\" && field.label !== \"\" && (field.schema[\"x-object-display\"] ?? ctx.objectDisplay) === \"accordion\") {\n const path = args.instancePath ?? appendInstancePath(ctx.instancePath, field.key);\n const hasErrors = built.messages.length > 0 || ctx.errors.some(error => error.instancePath.startsWith(`${path}/`));\n return <FormObjectSection title={built.label} actions={built.headerClear} hasErrors={hasErrors}>\n {built.messages.length > 0 && <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} />}{built.value}\n </FormObjectSection>;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <Heading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n actions={built.headerClear}\n actionsOwner={args.instancePath ?? appendInstancePath(ctx.instancePath, args.key)}\n size={ctx.size}\n helpDisplay={built.help}\n {...(hasFormHelp(field) ? { helper: <FormHelp field={field} /> } : {})}\n >\n {built.messages.length > 0 && (\n <FieldError\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n )}\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelNode !== undefined ? opts.labelNode : opts?.labelOverride ? (\n <label htmlFor={built.fieldId} className={cn(\"flex items-center gap-2 whitespace-nowrap font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && hasFormHelp(field) && (\n <HelpHint label={opts.labelOverride} helper={<FormHelp field={field} />} />\n )}\n </label>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const hasMessages = built.messages.length > 0;\n const customError = ctx.extensions.slots.FieldError;\n const err =\n hasMessages && !customError ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(hasFormHelp(field) && built.help !== \"hover\" ? { helper: <FormHelp field={field} /> } : {})}\n {...(err ? { error: err } : {})}\n {...(hasMessages && customError ? { errorElement: <FieldError id={fieldErrorId(built.fieldId)} errors={built.messages} /> } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // A nested object's `x-clicky-hoist` fields render in this grid instead of\n // its section; at depth > 0 this object's own hoisted fields belong to the parent.\n const hoisted = hoistNestedFields({\n properties, value, onChange, schema, listenerOptions, instancePath: ctx.instancePath,\n });\n const own = Object.entries(properties).filter(\n ([key, prop]) => !hoisted.emptied.has(key) && !(ctx.depth > 0 && isHoisted(prop)),\n );\n const parent = { schema: { ...schema, properties }, value, onChange };\n const fieldArgs = (key: string, prop: JsonSchemaProperty): FieldArgs =>\n hoisted.rows.get(key) ?? {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n parent,\n };\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(\n orderByXOrder([...own, ...Array.from(hoisted.rows, ([key, args]) => [key, args.prop] as [string, JsonSchemaProperty])], schema[\"x-order\"]),\n );\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: fieldArgs(key, prop).value }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const addMenu = ctx.layout.emptyArrays === \"add-menu\";\n // Collapsing empty arrays is the built-in layouts' arrangement; a registered\n // layout engine owns its rows, so it is handed every array row instead.\n const compactArrays = isBuiltInFormLayout(ctx.layout.mode) && ctx.layout.mode !== \"properties\" && arrayEntries.length > (addMenu ? 0 : 3);\n const rowDisplay = schema[\"x-object-display\"] === \"row\" && ctx.layout.mode !== \"properties\";\n const exclusive = exclusiveKeys(schema)?.filter((key) => !hidden.has(key) && entries.some(([entry]) => entry === key));\n const exclusiveAt = exclusive && exclusive.length > 1 ? entries.find(([key]) => exclusive.includes(key))?.[0] : undefined;\n const isRevealed = (key: string) => ctx.revealedLists.paths.has(appendInstancePath(ctx.instancePath, key));\n const rows = entries.flatMap(([key, prop]): ReactNode[] => {\n if (hidden.has(key)) return [];\n if (exclusive && exclusiveAt !== undefined && exclusive.includes(key)) {\n if (key !== exclusiveAt) return [];\n // The keys' one row sits where the first of them is ordered, as the chosen key's control.\n const chosen = exclusive.find((candidate) => value[candidate] !== undefined) ?? exclusive[0]!;\n const chosenProp = properties[chosen]!;\n const row = renderFieldRow({ ...fieldArgs(chosen, chosenProp), required: true }, ctx, {\n labelNode: (\n <ExclusiveKeySelect\n keys={exclusive.map((candidate) => ({ key: candidate, label: properties[candidate]?.title || candidate }))}\n value={chosen}\n fieldId={fieldInputId(appendInstancePath(ctx.instancePath, chosen), ctx.idPrefix)}\n disabled={ctx.readOnly || ctx.presentation === true}\n onChange={(next) => onChange(switchExclusiveKey({ value, keys: exclusive, next }))}\n />\n ),\n });\n return row ? [<div key={`exclusive:${exclusive.join(\"|\")}`} className=\"contents\" data-jsf-exclusive-keys=\"\">{row}</div>] : [];\n }\n if (rowDisplay) return renderRowCell(fieldArgs(key, prop), ctx);\n if (compactArrays && prop.type === \"array\" && prop[\"x-hidden\"] !== false && !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(fieldArgs(key, prop), ctx);\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !rowDisplay && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && prop[\"x-hidden\"] === undefined && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n const addItem = (key: string) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n // A flat tag list takes its tags from its own control, so opening it adds nothing: seeding a\n // first item would show a blank tag. It is revealed empty instead.\n if (isFlatTagList(prop)) {\n ctx.revealedLists.reveal(appendInstancePath(ctx.instancePath, key));\n onChange({ ...value, [key]: items ?? [] });\n return;\n }\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n };\n // The Add menu offers only the arrays it hid; an array with items is shown and adds inline.\n const offered = available.filter(([key]) => !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0));\n if (offered.length > 0) {\n // One Add menu: a plus button in the object's section header, or an Add button at the top (add-menu) or foot of its grid.\n const menu = <ArrayAddMenu key=\"keyed-array-add\" owner={ctx.instancePath ?? \"\"}\n items={offered.map(([key, prop]) => ({ key, label: prop.title || key, onSelect: () => addItem(key) }))} />;\n if (addMenu) rows.unshift(menu);\n else rows.push(menu);\n }\n }\n return rows;\n}\n\n// renderRowCell renders one field of an `x-object-display: \"row\"` object as a\n// flex cell: the control (plus its error) with a screen-reader-only label, so\n// the fields read as one compact control under the object's own label.\nfunction renderRowCell(args: FieldArgs, ctx: RenderContext): ReactNode[] {\n const nodes = renderFieldNodes(args, ctx);\n if (!nodes) return [];\n const label = args.prop.title || args.key;\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n return [\n <div key={args.key} data-jsf-row-cell={args.key} title={label} className=\"min-w-0 flex-1 basis-0\">\n <label htmlFor={fieldInputId(instancePath, ctx.idPrefix)} className=\"sr-only\">\n {label}\n {args.required ? \" (required)\" : \"\"}\n </label>\n {nodes.value}\n </div>,\n ];\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFA,SAAgB,mBACd,OACA,KACA,MACW;CAGX,MAAM,UAAUA,+BAAAA,aAAa,IAAI,cAAc,IAAI,QAAQ;CAC3D,IAAI,MAAM,YAAY,CAAC,IAAI,cAAc;EACvC,MAAM,UAAU;GAAE,GAAG;GAAO,WAAW,SAAkB,MAAM,SAAS,MAAM,SAAS,UAAU,SAAS,KAAK,OAAO,IA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CACvF,OAAO,CACL,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAoB,qBAAmB,KAAK;EAAK,OAAO;EAAO,WAAU;EAAzE,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;GAAO,SAAS7B,+BAAAA,aAAa,cAAc,IAAI,QAAQ;GAAG,WAAU;GAApE,UAAA,CACG,OACA,KAAK,WAAW,gBAAgB,EAC5B;EACN,CAAA,GAAA,MAAM,KACJ;CANK,GAAA,KAAK,GAMV,CACP;AACF;AAKA,SAAS,iBAAiB,MAAmC;CAC3D,MAAM,kBAAkByE,sCAAAA,oBAAoB,MAA0B,CAAC,CAAC,CAAC,CAAC;CAC1E,IAAIC,iCAAAA,sBAAsB,IAAI,MAAM,KAAK,eAAe,KAAA,KAAa,OAAO,KAAK,eAAe,CAAC,CAAC,SAAS,IACzG,OAAO;CAKT,IAAIC,+BAAAA,wBAAwB,KAAK,KAAK,KAAK,KAAK,uBAAuB,WACrE,OAAO;CAET,OAAO,KAAK,gBAAgB;AAC9B;AAIA,IAAa,YAAuB;CAClC;CACA;CACA;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-render.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoCvC,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAEhB,SAAS,EACT,aAAa,EACd,MAAM,0BAA0B,CAAC;AA0ClC,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,SAAS,CASX;AA2PD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,GACjB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAgB/C;AAKD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,GACvD,SAAS,GAAG,IAAI,CAoGlB;AAMD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,EACjD,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC/B,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"json-schema-form-render.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoCvC,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAEhB,SAAS,EACT,aAAa,EACd,MAAM,0BAA0B,CAAC;AA0ClC,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,SAAS,CASX;AA2PD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,GACjB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAgB/C;AAKD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAA;CAAE,GACvD,SAAS,GAAG,IAAI,CAoGlB;AAMD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,EACjD,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC/B,SAAS,EAAE,CAmIb;AAwCD,eAAO,MAAM,SAAS,EAAE,SAIvB,CAAC"}
|
|
@@ -10,7 +10,7 @@ import { CustomControl } from "./json-schema-form-custom-control.js";
|
|
|
10
10
|
import { isBuiltInFormLayout, rowLayoutEngine } from "./json-schema-form-extension-api.js";
|
|
11
11
|
import { appendInstancePath, errorsAtInstancePath } from "./json-schema-form-errors.js";
|
|
12
12
|
import { applyPostExtensions } from "./json-schema-form-extensions.js";
|
|
13
|
-
import { resolveControl, schemaRendersAsObject } from "./json-schema-form-resolve.js";
|
|
13
|
+
import { isFlatTagList, resolveControl, schemaRendersAsObject } from "./json-schema-form-resolve.js";
|
|
14
14
|
import { effectiveProperties } from "./json-schema-form-conditionals.js";
|
|
15
15
|
import { applyChangeEffects, applyListenerState } from "./json-schema-form-listeners.js";
|
|
16
16
|
import { hoistNestedFields, isHoisted } from "./json-schema-form-hoist.js";
|
|
@@ -504,6 +504,7 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
504
504
|
const rowDisplay = schema["x-object-display"] === "row" && ctx.layout.mode !== "properties";
|
|
505
505
|
const exclusive = exclusiveKeys(schema)?.filter((key) => !hidden.has(key) && entries.some(([entry]) => entry === key));
|
|
506
506
|
const exclusiveAt = exclusive && exclusive.length > 1 ? entries.find(([key]) => exclusive.includes(key))?.[0] : void 0;
|
|
507
|
+
const isRevealed = (key) => ctx.revealedLists.paths.has(appendInstancePath(ctx.instancePath, key));
|
|
507
508
|
const rows = entries.flatMap(([key, prop]) => {
|
|
508
509
|
if (hidden.has(key)) return [];
|
|
509
510
|
if (exclusive && exclusiveAt !== void 0 && exclusive.includes(key)) {
|
|
@@ -534,7 +535,7 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
534
535
|
}, `exclusive:${exclusive.join("|")}`)] : [];
|
|
535
536
|
}
|
|
536
537
|
if (rowDisplay) return renderRowCell(fieldArgs(key, prop), ctx);
|
|
537
|
-
if (compactArrays && prop.type === "array" && prop["x-hidden"] !== false && (!Array.isArray(value[key]) || value[key].length === 0)) return [];
|
|
538
|
+
if (compactArrays && prop.type === "array" && prop["x-hidden"] !== false && !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0)) return [];
|
|
538
539
|
const row = renderFieldRow(fieldArgs(key, prop), ctx);
|
|
539
540
|
if (!row) return [];
|
|
540
541
|
if (columns === "auto" || columns > 1) {
|
|
@@ -556,12 +557,20 @@ function renderObjectFields(schema, value, onChange, ctx, opts) {
|
|
|
556
557
|
if (!prop || prop.type !== "array") throw new Error(`cannot add item to ${key}`);
|
|
557
558
|
const items = value[key];
|
|
558
559
|
if (items !== void 0 && !Array.isArray(items)) throw new Error(`${key} is not an array`);
|
|
560
|
+
if (isFlatTagList(prop)) {
|
|
561
|
+
ctx.revealedLists.reveal(appendInstancePath(ctx.instancePath, key));
|
|
562
|
+
onChange({
|
|
563
|
+
...value,
|
|
564
|
+
[key]: items ?? []
|
|
565
|
+
});
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
559
568
|
onChange({
|
|
560
569
|
...value,
|
|
561
570
|
[key]: [...items ?? [], seedFromSchema(prop.items ?? { type: "string" })]
|
|
562
571
|
});
|
|
563
572
|
};
|
|
564
|
-
const offered = available.filter(([key]) => !Array.isArray(value[key]) || value[key].length === 0);
|
|
573
|
+
const offered = available.filter(([key]) => !isRevealed(key) && (!Array.isArray(value[key]) || value[key].length === 0));
|
|
565
574
|
if (offered.length > 0) {
|
|
566
575
|
const menu = /* @__PURE__ */ jsx(ArrayAddMenu, {
|
|
567
576
|
owner: ctx.instancePath ?? "",
|