@flanksource/clicky-ui 0.3.78 → 0.3.80
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/Combobox.cjs +9 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +9 -3
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +1 -1
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.js +1 -1
- package/dist/components/ComboboxMenu.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/traces/otel/OtelTraceBrowser.cjs +18 -9
- package/dist/data/traces/otel/OtelTraceBrowser.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.js +19 -10
- package/dist/data/traces/otel/OtelTraceBrowser.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.cjs +10 -8
- package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.js +10 -8
- package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
- package/dist/data/traces/otel/QueryBar.cjs +6 -5
- package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
- package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
- package/dist/data/traces/otel/QueryBar.js +6 -5
- package/dist/data/traces/otel/QueryBar.js.map +1 -1
- package/dist/data/traces/otel/browser-state.cjs +17 -4
- package/dist/data/traces/otel/browser-state.cjs.map +1 -1
- package/dist/data/traces/otel/browser-state.d.ts +2 -1
- package/dist/data/traces/otel/browser-state.d.ts.map +1 -1
- package/dist/data/traces/otel/browser-state.js +17 -4
- package/dist/data/traces/otel/browser-state.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
|
@@ -4,10 +4,18 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
4
4
|
// src/components/FormLookupProvider.tsx
|
|
5
5
|
var NO_HANDLERS = /* @__PURE__ */ new Map();
|
|
6
6
|
function FormLookupProvider({ fetcher, handlers = NO_HANDLERS, children }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const parent = (0, react.useContext)(require_form_lookup_context.FormLookupContext);
|
|
8
|
+
const value = (0, react.useMemo)(() => {
|
|
9
|
+
const inherited = fetcher ?? parent.fetcher;
|
|
10
|
+
return {
|
|
11
|
+
...inherited ? { fetcher: inherited } : {},
|
|
12
|
+
handlers: handlers.size === 0 ? parent.handlers : new Map([...parent.handlers, ...handlers])
|
|
13
|
+
};
|
|
14
|
+
}, [
|
|
15
|
+
fetcher,
|
|
16
|
+
handlers,
|
|
17
|
+
parent
|
|
18
|
+
]);
|
|
11
19
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_form_lookup_context.FormLookupContext.Provider, {
|
|
12
20
|
value,
|
|
13
21
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLookupProvider.cjs","names":["
|
|
1
|
+
{"version":3,"file":"FormLookupProvider.cjs","names":["useContext","FormLookupContext","useMemo"],"sources":["../../src/components/FormLookupProvider.tsx"],"sourcesContent":["import { useContext, useMemo, type ReactNode } from \"react\";\nimport type { LookupFetcher } from \"./json-schema-form-types\";\nimport { FormLookupContext } from \"./form-lookup-context\";\n\nconst NO_HANDLERS: ReadonlyMap<string, LookupFetcher> = new Map();\n\n// `handlers` are per-url lookup handlers (FormExtension.lookups): a lookup whose\n// `x-clicky-lookup.url` is registered goes to its handler, every other one to\n// `fetcher`. A provider nested in another — a sub-form an extension renders —\n// inherits the enclosing fetcher and handlers, overriding only what it sets.\nexport function FormLookupProvider({\n fetcher,\n handlers = NO_HANDLERS,\n children,\n}: {\n fetcher?: LookupFetcher;\n handlers?: ReadonlyMap<string, LookupFetcher>;\n children: ReactNode;\n}) {\n const parent = useContext(FormLookupContext);\n const value = useMemo(() => {\n const inherited = fetcher ?? parent.fetcher;\n return {\n ...(inherited ? { fetcher: inherited } : {}),\n handlers: handlers.size === 0 ? parent.handlers : new Map([...parent.handlers, ...handlers]),\n };\n }, [fetcher, handlers, parent]);\n return <FormLookupContext.Provider value={value}>{children}</FormLookupContext.Provider>;\n}\n"],"mappings":";;;;AAIA,IAAM,8BAAkD,IAAI,IAAI;AAMhE,SAAgB,mBAAmB,EACjC,SACA,WAAW,aACX,YAKC;CACD,MAAM,UAAA,GAASA,MAAAA,WAAAA,CAAWC,4BAAAA,iBAAiB;CAC3C,MAAM,SAAA,GAAQC,MAAAA,QAAAA,OAAc;EAC1B,MAAM,YAAY,WAAW,OAAO;EACpC,OAAO;GACL,GAAI,YAAY,EAAE,SAAS,UAAU,IAAI,CAAC;GAC1C,UAAU,SAAS,SAAS,IAAI,OAAO,WAAW,IAAI,IAAI,CAAC,GAAG,OAAO,UAAU,GAAG,QAAQ,CAAC;EAC7F;CACF,GAAG;EAAC;EAAS;EAAU;CAAM,CAAC;CAC9B,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,kBAAkB,UAAnB;EAAmC;EAAQ;CAAqC,CAAA;AACzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLookupProvider.d.ts","sourceRoot":"","sources":["../../src/components/FormLookupProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"FormLookupProvider.d.ts","sourceRoot":"","sources":["../../src/components/FormLookupProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAS9D,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAsB,EACtB,QAAQ,GACT,EAAE;IACD,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC9C,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAUA"}
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { FormLookupContext } from "./form-lookup-context.js";
|
|
2
|
-
import { useMemo } from "react";
|
|
2
|
+
import { useContext, useMemo } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
// src/components/FormLookupProvider.tsx
|
|
5
5
|
var NO_HANDLERS = /* @__PURE__ */ new Map();
|
|
6
6
|
function FormLookupProvider({ fetcher, handlers = NO_HANDLERS, children }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const parent = useContext(FormLookupContext);
|
|
8
|
+
const value = useMemo(() => {
|
|
9
|
+
const inherited = fetcher ?? parent.fetcher;
|
|
10
|
+
return {
|
|
11
|
+
...inherited ? { fetcher: inherited } : {},
|
|
12
|
+
handlers: handlers.size === 0 ? parent.handlers : new Map([...parent.handlers, ...handlers])
|
|
13
|
+
};
|
|
14
|
+
}, [
|
|
15
|
+
fetcher,
|
|
16
|
+
handlers,
|
|
17
|
+
parent
|
|
18
|
+
]);
|
|
11
19
|
return /* @__PURE__ */ jsx(FormLookupContext.Provider, {
|
|
12
20
|
value,
|
|
13
21
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLookupProvider.js","names":[],"sources":["../../src/components/FormLookupProvider.tsx"],"sourcesContent":["import { useMemo, type ReactNode } from \"react\";\nimport type { LookupFetcher } from \"./json-schema-form-types\";\nimport { FormLookupContext } from \"./form-lookup-context\";\n\nconst NO_HANDLERS: ReadonlyMap<string, LookupFetcher> = new Map();\n\n// `handlers` are per-url lookup handlers (FormExtension.lookups): a lookup whose\n// `x-clicky-lookup.url` is registered goes to its handler, every other one to\n// `fetcher
|
|
1
|
+
{"version":3,"file":"FormLookupProvider.js","names":[],"sources":["../../src/components/FormLookupProvider.tsx"],"sourcesContent":["import { useContext, useMemo, type ReactNode } from \"react\";\nimport type { LookupFetcher } from \"./json-schema-form-types\";\nimport { FormLookupContext } from \"./form-lookup-context\";\n\nconst NO_HANDLERS: ReadonlyMap<string, LookupFetcher> = new Map();\n\n// `handlers` are per-url lookup handlers (FormExtension.lookups): a lookup whose\n// `x-clicky-lookup.url` is registered goes to its handler, every other one to\n// `fetcher`. A provider nested in another — a sub-form an extension renders —\n// inherits the enclosing fetcher and handlers, overriding only what it sets.\nexport function FormLookupProvider({\n fetcher,\n handlers = NO_HANDLERS,\n children,\n}: {\n fetcher?: LookupFetcher;\n handlers?: ReadonlyMap<string, LookupFetcher>;\n children: ReactNode;\n}) {\n const parent = useContext(FormLookupContext);\n const value = useMemo(() => {\n const inherited = fetcher ?? parent.fetcher;\n return {\n ...(inherited ? { fetcher: inherited } : {}),\n handlers: handlers.size === 0 ? parent.handlers : new Map([...parent.handlers, ...handlers]),\n };\n }, [fetcher, handlers, parent]);\n return <FormLookupContext.Provider value={value}>{children}</FormLookupContext.Provider>;\n}\n"],"mappings":";;;;AAIA,IAAM,8BAAkD,IAAI,IAAI;AAMhE,SAAgB,mBAAmB,EACjC,SACA,WAAW,aACX,YAKC;CACD,MAAM,SAAS,WAAW,iBAAiB;CAC3C,MAAM,QAAQ,cAAc;EAC1B,MAAM,YAAY,WAAW,OAAO;EACpC,OAAO;GACL,GAAI,YAAY,EAAE,SAAS,UAAU,IAAI,CAAC;GAC1C,UAAU,SAAS,SAAS,IAAI,OAAO,WAAW,IAAI,IAAI,CAAC,GAAG,OAAO,UAAU,GAAG,QAAQ,CAAC;EAC7F;CACF,GAAG;EAAC;EAAS;EAAU;CAAM,CAAC;CAC9B,OAAO,oBAAC,kBAAkB,UAAnB;EAAmC;EAAQ;CAAqC,CAAA;AACzF"}
|
|
@@ -1,96 +1,58 @@
|
|
|
1
1
|
const require_utils = require("../lib/utils.cjs");
|
|
2
2
|
const require_Icon = require("../data/Icon.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const require_hostEvaluation = require("../expressions/playground/hostEvaluation.cjs");
|
|
4
|
+
const require_LazyEmbeddedPlayground = require("../expressions/playground/LazyEmbeddedPlayground.cjs");
|
|
5
5
|
const require_UiInfo = require("../icons/components/UiInfo.cjs");
|
|
6
6
|
const require_UiWarningTriangle = require("../icons/components/UiWarningTriangle.cjs");
|
|
7
7
|
const require_Modal = require("../overlay/Modal.cjs");
|
|
8
8
|
const require_button = require("./button.cjs");
|
|
9
|
-
const
|
|
10
|
-
const require_jsonPathTree = require("./jsonPathTree.cjs");
|
|
9
|
+
const require_jsonPathPlaygroundEvaluator = require("./jsonPathPlaygroundEvaluator.cjs");
|
|
11
10
|
let react = require("react");
|
|
12
11
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
12
|
// src/components/JSONPathPlayground.tsx
|
|
14
|
-
var EVALUATE_DEBOUNCE_MS = 250;
|
|
15
13
|
/**
|
|
16
|
-
* The full-size counterpart to the inline JSONPath dropdown
|
|
14
|
+
* The full-size counterpart to the inline JSONPath dropdown: the expression
|
|
15
|
+
* playground, run on the backend that will read the path.
|
|
17
16
|
*
|
|
18
|
-
* The dropdown is a preview and caps its walk to stay instant;
|
|
19
|
-
* row with no depth limit, every array element
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* The dropdown is a preview and caps its walk to stay instant; the playground's
|
|
18
|
+
* object graph browses the row with no depth limit, every array element and
|
|
19
|
+
* every property, and descends into a column that holds JSON as text. Picking a
|
|
20
|
+
* node out of one records the column the path is rooted at, which the backend
|
|
21
|
+
* needs alongside the path.
|
|
22
22
|
*/
|
|
23
|
-
function JSONPathPlayground(
|
|
23
|
+
function JSONPathPlayground(props) {
|
|
24
|
+
return props.open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OpenPlayground, { ...props }) : null;
|
|
25
|
+
}
|
|
26
|
+
function OpenPlayground({ onClose, rows, value, onCommit, assignsRoot, source, evaluate, title = "JSONPath playground" }) {
|
|
24
27
|
const [draft, setDraft] = (0, react.useState)(value);
|
|
25
|
-
const [
|
|
26
|
-
const [
|
|
27
|
-
const
|
|
28
|
-
const [evaluating, setEvaluating] = (0, react.useState)(false);
|
|
29
|
-
(0, react.useEffect)(() => {
|
|
30
|
-
if (open) {
|
|
31
|
-
setDraft(value);
|
|
32
|
-
setRowIndex((current) => current < rows.length ? current : 0);
|
|
33
|
-
}
|
|
34
|
-
}, [
|
|
35
|
-
open,
|
|
36
|
-
value,
|
|
37
|
-
rows.length
|
|
38
|
-
]);
|
|
39
|
-
const row = rows[rowIndex];
|
|
40
|
-
const browsed = (0, react.useMemo)(() => decodeSource(row, source), [row, source]);
|
|
41
|
-
const tree = (0, react.useMemo)(() => require_jsonPathTree.createLazyJSONPathTree(browsed, { keyPrefix: `row${rowIndex}:${source ?? ""}:` }), [
|
|
42
|
-
browsed,
|
|
43
|
-
rowIndex,
|
|
44
|
-
source
|
|
45
|
-
]);
|
|
46
|
-
(0, react.useEffect)(() => {
|
|
47
|
-
if (!open) return;
|
|
48
|
-
setSelected(tree.materializePath(draft) ?? null);
|
|
49
|
-
}, [open, tree]);
|
|
50
|
-
const root = selected?.root ?? source;
|
|
28
|
+
const [picked, setPicked] = (0, react.useState)(null);
|
|
29
|
+
const [lastResult, setLastResult] = (0, react.useState)(null);
|
|
30
|
+
const root = picked ? picked.root : source;
|
|
51
31
|
const rootPending = root !== void 0 && root !== source && !assignsRoot;
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const timer = setTimeout(() => {
|
|
58
|
-
const payload = {
|
|
59
|
-
jsonpath: draft,
|
|
60
|
-
row
|
|
61
|
-
};
|
|
62
|
-
if (root !== void 0) payload.source = root;
|
|
63
|
-
evaluate(payload).then((next) => {
|
|
64
|
-
if (latestRequest.current === request) setResult(next);
|
|
65
|
-
}).catch((error) => {
|
|
66
|
-
if (latestRequest.current === request) setResult({
|
|
67
|
-
matches: [],
|
|
68
|
-
count: 0,
|
|
69
|
-
error: String(error)
|
|
70
|
-
});
|
|
71
|
-
}).finally(() => {
|
|
72
|
-
if (latestRequest.current === request) setEvaluating(false);
|
|
73
|
-
});
|
|
74
|
-
}, EVALUATE_DEBOUNCE_MS);
|
|
75
|
-
return () => clearTimeout(timer);
|
|
76
|
-
}, [
|
|
77
|
-
open,
|
|
32
|
+
const rootRef = (0, react.useRef)(root);
|
|
33
|
+
rootRef.current = root;
|
|
34
|
+
const samples = (0, react.useMemo)(() => require_hostEvaluation.rowSamples(rows), [rows]);
|
|
35
|
+
const input = require_hostEvaluation.initialInput(samples);
|
|
36
|
+
const run = (0, react.useMemo)(() => require_jsonPathPlaygroundEvaluator.jsonPathPlaygroundEvaluator({
|
|
78
37
|
evaluate,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
38
|
+
root: () => rootRef.current,
|
|
39
|
+
onEvaluated: (result) => setLastResult(result.error ? null : result)
|
|
40
|
+
}), [evaluate]);
|
|
41
|
+
const formatPath = (0, react.useCallback)((_segments, node) => {
|
|
42
|
+
setPicked({ root: node.root });
|
|
43
|
+
return node.path;
|
|
44
|
+
}, []);
|
|
83
45
|
const commit = () => {
|
|
84
46
|
onCommit(draft, root === void 0 ? {} : { root });
|
|
85
47
|
onClose();
|
|
86
48
|
};
|
|
87
49
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Modal.Modal, {
|
|
88
|
-
open,
|
|
50
|
+
open: true,
|
|
89
51
|
onClose,
|
|
90
52
|
title,
|
|
91
|
-
size: "
|
|
53
|
+
size: "full",
|
|
92
54
|
scrollBody: false,
|
|
93
|
-
className: "h-[
|
|
55
|
+
className: "h-[85vh]",
|
|
94
56
|
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
95
57
|
className: "flex items-center justify-end gap-2",
|
|
96
58
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
@@ -100,187 +62,116 @@ function JSONPathPlayground({ open, onClose, rows, value, onCommit, assignsRoot,
|
|
|
100
62
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
101
63
|
onClick: commit,
|
|
102
64
|
disabled: draft.trim() === "",
|
|
103
|
-
children: "
|
|
65
|
+
children: "Apply"
|
|
104
66
|
})]
|
|
105
67
|
}),
|
|
106
68
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
107
|
-
className: "flex h-full min-h-0 flex-col gap-
|
|
108
|
-
children: [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"Sample row",
|
|
112
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
113
|
-
"aria-label": "Sample row",
|
|
114
|
-
value: rowIndex,
|
|
115
|
-
onChange: (event) => setRowIndex(Number(event.target.value)),
|
|
116
|
-
className: "h-7 rounded-md border border-input bg-background px-2 text-xs text-foreground",
|
|
117
|
-
children: rows.map((_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("option", {
|
|
118
|
-
value: index,
|
|
119
|
-
children: [
|
|
120
|
-
index + 1,
|
|
121
|
-
" of ",
|
|
122
|
-
rows.length
|
|
123
|
-
]
|
|
124
|
-
}, index))
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Fields absent from the first row are only visible in the one that carries them." })
|
|
127
|
-
]
|
|
128
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
129
|
-
className: "grid min-h-0 flex-1 gap-3 md:grid-cols-2",
|
|
130
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
131
|
-
className: "flex min-h-0 flex-col overflow-hidden rounded-md border border-border",
|
|
132
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Tree.Tree, {
|
|
133
|
-
className: "min-h-0 flex-1",
|
|
134
|
-
ariaLabel: "JSON paths",
|
|
135
|
-
roots: tree.roots,
|
|
136
|
-
getKey: (node) => node.key,
|
|
137
|
-
getChildren: tree.getChildren,
|
|
138
|
-
hasMoreChildren: tree.hasMoreChildren,
|
|
139
|
-
loadChildren: tree.loadChildren,
|
|
140
|
-
getSearchText: (node) => `${node.path} ${node.summary}`,
|
|
141
|
-
defaultOpen: (_node, depth) => depth < 2,
|
|
142
|
-
selected,
|
|
143
|
-
revealSelected: true,
|
|
144
|
-
onSelect: (node) => {
|
|
145
|
-
if (node.kind === "more") return;
|
|
146
|
-
setSelected(node);
|
|
147
|
-
setDraft(node.path);
|
|
148
|
-
},
|
|
149
|
-
renderRow: ({ node }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
150
|
-
className: "flex min-w-0 flex-1 items-center gap-density-2 font-mono text-xs",
|
|
151
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
152
|
-
className: require_utils.cn("shrink-0", node.kind === "more" ? "text-muted-foreground" : "text-primary"),
|
|
153
|
-
children: node.kind === "more" ? "…" : node.path
|
|
154
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
155
|
-
className: "truncate text-muted-foreground",
|
|
156
|
-
title: node.summary,
|
|
157
|
-
children: node.summary
|
|
158
|
-
})]
|
|
159
|
-
})
|
|
160
|
-
})
|
|
161
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
162
|
-
className: "flex min-h-0 flex-col gap-2",
|
|
69
|
+
className: "flex h-full min-h-0 flex-col gap-2",
|
|
70
|
+
children: [
|
|
71
|
+
rows.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
72
|
+
className: "shrink-0 text-xs text-muted-foreground",
|
|
163
73
|
children: [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
onChange: setDraft,
|
|
168
|
-
inputClassName: "font-mono text-xs",
|
|
169
|
-
placeholder: "$.messages[0].payload"
|
|
170
|
-
}),
|
|
171
|
-
root !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
172
|
-
className: require_utils.cn("flex shrink-0 items-start gap-1.5 rounded-md border px-2 py-1.5 text-xs text-foreground", rootPending ? "border-amber-600/40 bg-amber-500/10" : "border-border bg-muted/40"),
|
|
173
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
174
|
-
icon: rootPending ? require_UiWarningTriangle.UiWarningTriangle : require_UiInfo.UiInfo,
|
|
175
|
-
className: require_utils.cn("mt-0.5 shrink-0", rootPending ? "text-amber-600" : "text-muted-foreground")
|
|
176
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
177
|
-
"This path is rooted inside ",
|
|
178
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
179
|
-
className: "font-mono",
|
|
180
|
-
children: root
|
|
181
|
-
}),
|
|
182
|
-
", a column holding JSON as text.",
|
|
183
|
-
" ",
|
|
184
|
-
root === source ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
185
|
-
"That is already the column's ",
|
|
186
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
187
|
-
className: "font-mono",
|
|
188
|
-
children: "Source"
|
|
189
|
-
}),
|
|
190
|
-
"."
|
|
191
|
-
] }) : assignsRoot ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
192
|
-
"Applying it sets the column's ",
|
|
193
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
194
|
-
className: "font-mono",
|
|
195
|
-
children: "Source"
|
|
196
|
-
}),
|
|
197
|
-
" to",
|
|
198
|
-
" ",
|
|
199
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
200
|
-
className: "font-mono",
|
|
201
|
-
children: root
|
|
202
|
-
}),
|
|
203
|
-
"."
|
|
204
|
-
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
205
|
-
"The column's ",
|
|
206
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
207
|
-
className: "font-mono",
|
|
208
|
-
children: "Source"
|
|
209
|
-
}),
|
|
210
|
-
" must be set to",
|
|
211
|
-
" ",
|
|
212
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
213
|
-
className: "font-mono",
|
|
214
|
-
children: root
|
|
215
|
-
}),
|
|
216
|
-
" for it to resolve."
|
|
217
|
-
] })
|
|
218
|
-
] })]
|
|
219
|
-
}),
|
|
220
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResultPane, {
|
|
221
|
-
evaluating,
|
|
222
|
-
result,
|
|
223
|
-
selected,
|
|
224
|
-
evaluated: Boolean(evaluate)
|
|
225
|
-
})
|
|
74
|
+
"Nothing sampled yet — the input starts as ",
|
|
75
|
+
"{}",
|
|
76
|
+
". Run a sample to browse a real row."
|
|
226
77
|
]
|
|
227
|
-
})
|
|
228
|
-
|
|
78
|
+
}),
|
|
79
|
+
root !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RootBanner, {
|
|
80
|
+
root,
|
|
81
|
+
source,
|
|
82
|
+
assignsRoot,
|
|
83
|
+
pending: rootPending
|
|
84
|
+
}),
|
|
85
|
+
evaluate && lastResult && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MatchLine, { result: lastResult }),
|
|
86
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
87
|
+
className: "min-h-0 flex-1 overflow-hidden rounded-md border border-border",
|
|
88
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_LazyEmbeddedPlayground.LazyEmbeddedPlayground, {
|
|
89
|
+
language: "jsonpath",
|
|
90
|
+
source: value,
|
|
91
|
+
input,
|
|
92
|
+
onSourceChange: setDraft,
|
|
93
|
+
evaluate: run,
|
|
94
|
+
samples,
|
|
95
|
+
formatPath,
|
|
96
|
+
...evaluate ? {} : { executionMode: "explicit" }
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
]
|
|
229
100
|
})
|
|
230
101
|
});
|
|
231
102
|
}
|
|
232
103
|
/**
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
104
|
+
* A path rooted inside a column that holds JSON as text cannot be read from the
|
|
105
|
+
* row directly: the backend reaches it by way of the column's `source`, so the
|
|
106
|
+
* two are committed together. This says which column, and whose job it is to
|
|
107
|
+
* record it.
|
|
236
108
|
*/
|
|
237
|
-
function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
109
|
+
function RootBanner({ root, source, assignsRoot, pending }) {
|
|
110
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
111
|
+
className: require_utils.cn("flex shrink-0 items-start gap-1.5 rounded-md border px-2 py-1.5 text-xs text-foreground", pending ? "border-amber-600/40 bg-amber-500/10" : "border-border bg-muted/40"),
|
|
112
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
|
|
113
|
+
icon: pending ? require_UiWarningTriangle.UiWarningTriangle : require_UiInfo.UiInfo,
|
|
114
|
+
className: require_utils.cn("mt-0.5 shrink-0", pending ? "text-amber-600" : "text-muted-foreground")
|
|
115
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
116
|
+
"This path is rooted inside ",
|
|
117
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
118
|
+
className: "font-mono",
|
|
119
|
+
children: root
|
|
120
|
+
}),
|
|
121
|
+
", a column holding JSON as text.",
|
|
122
|
+
" ",
|
|
123
|
+
root === source ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
124
|
+
"That is already the column's ",
|
|
125
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
126
|
+
className: "font-mono",
|
|
127
|
+
children: "Source"
|
|
128
|
+
}),
|
|
129
|
+
"."
|
|
130
|
+
] }) : assignsRoot ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
131
|
+
"Applying it sets the column's ",
|
|
132
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
133
|
+
className: "font-mono",
|
|
134
|
+
children: "Source"
|
|
135
|
+
}),
|
|
136
|
+
" to",
|
|
137
|
+
" ",
|
|
138
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
139
|
+
className: "font-mono",
|
|
140
|
+
children: root
|
|
141
|
+
}),
|
|
142
|
+
"."
|
|
143
|
+
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
144
|
+
"The column's ",
|
|
145
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
146
|
+
className: "font-mono",
|
|
147
|
+
children: "Source"
|
|
148
|
+
}),
|
|
149
|
+
" must be set to",
|
|
150
|
+
" ",
|
|
151
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
152
|
+
className: "font-mono",
|
|
153
|
+
children: root
|
|
154
|
+
}),
|
|
155
|
+
" for it to resolve."
|
|
156
|
+
] })
|
|
157
|
+
] })]
|
|
258
158
|
});
|
|
259
|
-
|
|
159
|
+
}
|
|
160
|
+
/** What the playground's result cannot say: how many matches, and whether the path can drive a filter. */
|
|
161
|
+
function MatchLine({ result }) {
|
|
162
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
260
163
|
className: "flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs",
|
|
261
|
-
children: [
|
|
262
|
-
className: "
|
|
263
|
-
children: result.
|
|
264
|
-
})
|
|
265
|
-
className: require_utils.cn(result && result.count === 0 && "text-muted-foreground"),
|
|
266
|
-
children: evaluating && result === null ? "Evaluating…" : `${result?.count ?? 0} match${result?.count === 1 ? "" : "es"}`
|
|
267
|
-
}), result && !result.error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
164
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
165
|
+
className: require_utils.cn(result.count === 0 && "text-muted-foreground"),
|
|
166
|
+
children: `${result.count} match${result.count === 1 ? "" : "es"}`
|
|
167
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
268
168
|
className: "text-muted-foreground",
|
|
269
169
|
children: result.filterField ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: ["Filterable as ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
|
|
270
170
|
className: "font-mono text-foreground",
|
|
271
171
|
children: result.filterField
|
|
272
172
|
})] }) : "Selects a set — not filterable unless the column declares filter.field"
|
|
273
173
|
})]
|
|
274
|
-
})
|
|
275
|
-
className: "min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/20 p-2 text-xs",
|
|
276
|
-
children: result && !result.error && result.count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_JsonView.JsonView, {
|
|
277
|
-
data: result.count === 1 ? result.matches[0] : result.matches,
|
|
278
|
-
defaultOpenDepth: 1
|
|
279
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
280
|
-
className: "text-muted-foreground",
|
|
281
|
-
children: result?.error ? "Fix the expression to see what it selects." : "This path selects nothing in this row."
|
|
282
|
-
})
|
|
283
|
-
})] });
|
|
174
|
+
});
|
|
284
175
|
}
|
|
285
176
|
exports.JSONPathPlayground = JSONPathPlayground;
|
|
286
177
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSONPathPlayground.cjs","names":["useState","useMemo","createLazyJSONPathTree","useRef","Modal","Button","Tree","cn","InputField","Icon","UiWarningTriangle","UiInfo","_Fragment","JsonView"],"sources":["../../src/components/JSONPathPlayground.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { JsonView } from \"../data/JsonView\";\nimport { Tree } from \"../data/Tree\";\nimport { UiInfo, UiWarningTriangle } from \"../icons\";\nimport { Modal } from \"../overlay/Modal\";\nimport { Button } from \"./button\";\nimport { InputField } from \"./InputField\";\nimport { createLazyJSONPathTree, type JSONPathNode } from \"./jsonPathTree\";\n\n/** What evaluating an expression against one row reports back. */\nexport interface JSONPathEvalResult {\n matches: unknown[];\n count: number;\n /** Why the expression could not be evaluated — a parse error is an answer, not a failure. */\n error?: string;\n /** Backend field the expression addresses, when it addresses one rather than selecting a set. */\n filterField?: string;\n}\n\nexport interface JSONPathEvalRequest {\n jsonpath: string;\n /** Column the path is rooted at, when it addresses a decoded JSON-encoded column. */\n source?: string;\n row: unknown;\n}\n\nexport interface JSONPathPlaygroundProps {\n open: boolean;\n onClose: () => void;\n /** Sampled rows to browse. A row switcher appears once there is more than one. */\n rows: unknown[];\n /** The expression the field currently holds. */\n value: string;\n /** Commits the drafted expression, along with the column it must be rooted at. */\n onCommit: (path: string, context: { root?: string }) => void;\n /**\n * True when `onCommit` writes the root itself. It only changes what the\n * dialog says about a path that descends into an encoded column: that the\n * root will be recorded, rather than instructing the author to go and record\n * it. Consumers that drop the root leave this unset and keep the warning.\n */\n assignsRoot?: boolean;\n /**\n * The column the field's path is *already* rooted at — its saved `source`.\n *\n * Without it the dialog browses and evaluates from the row while the value it\n * was opened with is written against a decoded column, so a column that works\n * perfectly well reports no matches and an author is invited to fix it.\n */\n source?: string;\n /**\n * Evaluates the draft against the selected row. Without it the dialog is a\n * browser only — it shows the selected node's own value instead of a match\n * set, which is all an offline demo can honestly claim.\n */\n evaluate?: (request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>;\n title?: string;\n}\n\nconst EVALUATE_DEBOUNCE_MS = 250;\n\n/**\n * The full-size counterpart to the inline JSONPath dropdown.\n *\n * The dropdown is a preview and caps its walk to stay instant; this browses the\n * row with no depth limit, every array element, and every property — and pairs\n * the tree with what the expression actually selects, evaluated by the backend\n * that will run it, so an author stops finding out at query time.\n */\nexport function JSONPathPlayground({\n open,\n onClose,\n rows,\n value,\n onCommit,\n assignsRoot,\n source,\n evaluate,\n title = \"JSONPath playground\",\n}: JSONPathPlaygroundProps) {\n const [draft, setDraft] = useState(value);\n const [rowIndex, setRowIndex] = useState(0);\n const [selected, setSelected] = useState<JSONPathNode | null>(null);\n const [result, setResult] = useState<JSONPathEvalResult | null>(null);\n const [evaluating, setEvaluating] = useState(false);\n\n // Reopening starts from whatever the field holds now, not from the last\n // session's draft — the operator may have typed over it in between.\n useEffect(() => {\n if (open) {\n setDraft(value);\n setRowIndex((current) => (current < rows.length ? current : 0));\n }\n }, [open, value, rows.length]);\n\n const row = rows[rowIndex];\n // A column with a `source` has its paths written against that column decoded,\n // not against the row, so that is what the tree has to browse — otherwise the\n // paths it offers and the path the field holds are in two different languages.\n const browsed = useMemo(() => decodeSource(row, source), [row, source]);\n const tree = useMemo(\n () => createLazyJSONPathTree(browsed, { keyPrefix: `row${rowIndex}:${source ?? \"\"}:` }),\n [browsed, rowIndex, source],\n );\n\n // Reveal the branch the current expression addresses, so the dialog opens\n // showing the value rather than a collapsed root.\n useEffect(() => {\n if (!open) return;\n setSelected(tree.materializePath(draft) ?? null);\n // Only on (re)open and row change: re-running this per keystroke would yank\n // the tree around while the operator is typing.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open, tree]);\n\n // The root belongs to the selection, and hand-editing the expression keeps it:\n // an operator who descended into an encoded column and is now tuning the path\n // inside it still means that column. It is never silent — the banner below\n // names it — and selecting any node outside that subtree clears it. A column\n // that already declares a source starts there rather than at nothing.\n const root = selected?.root ?? source;\n // Only a root nobody has recorded yet is a warning: one the column already\n // declares, or one this dialog is about to write, is just context.\n const rootPending = root !== undefined && root !== source && !assignsRoot;\n\n const latestRequest = useRef(0);\n useEffect(() => {\n if (!open || !evaluate) return;\n const request = (latestRequest.current += 1);\n setEvaluating(true);\n const timer = setTimeout(() => {\n const payload: JSONPathEvalRequest = { jsonpath: draft, row };\n if (root !== undefined) payload.source = root;\n void evaluate(payload)\n .then((next) => {\n if (latestRequest.current === request) setResult(next);\n })\n .catch((error: unknown) => {\n if (latestRequest.current === request) {\n setResult({ matches: [], count: 0, error: String(error) });\n }\n })\n .finally(() => {\n if (latestRequest.current === request) setEvaluating(false);\n });\n }, EVALUATE_DEBOUNCE_MS);\n return () => clearTimeout(timer);\n }, [open, evaluate, draft, row, root]);\n\n const commit = () => {\n onCommit(draft, root === undefined ? {} : { root });\n onClose();\n };\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n title={title}\n size=\"2xl\"\n scrollBody={false}\n className=\"h-[80vh]\"\n footer={(\n <div className=\"flex items-center justify-end gap-2\">\n <Button variant=\"outline\" onClick={onClose}>Cancel</Button>\n <Button onClick={commit} disabled={draft.trim() === \"\"}>Use path</Button>\n </div>\n )}\n >\n <div className=\"flex h-full min-h-0 flex-col gap-3\">\n {rows.length > 1 && (\n <label className=\"flex shrink-0 items-center gap-2 text-xs text-muted-foreground\">\n Sample row\n <select\n aria-label=\"Sample row\"\n value={rowIndex}\n onChange={(event) => setRowIndex(Number(event.target.value))}\n className=\"h-7 rounded-md border border-input bg-background px-2 text-xs text-foreground\"\n >\n {rows.map((_, index) => (\n <option key={index} value={index}>{index + 1} of {rows.length}</option>\n ))}\n </select>\n <span>Fields absent from the first row are only visible in the one that carries them.</span>\n </label>\n )}\n\n <div className=\"grid min-h-0 flex-1 gap-3 md:grid-cols-2\">\n <div className=\"flex min-h-0 flex-col overflow-hidden rounded-md border border-border\">\n <Tree<JSONPathNode>\n className=\"min-h-0 flex-1\"\n ariaLabel=\"JSON paths\"\n roots={tree.roots}\n getKey={(node) => node.key}\n getChildren={tree.getChildren}\n hasMoreChildren={tree.hasMoreChildren}\n loadChildren={tree.loadChildren}\n getSearchText={(node) => `${node.path} ${node.summary}`}\n defaultOpen={(_node, depth) => depth < 2}\n selected={selected}\n revealSelected\n onSelect={(node) => {\n if (node.kind === \"more\") return;\n setSelected(node);\n setDraft(node.path);\n }}\n renderRow={({ node }) => (\n <span className=\"flex min-w-0 flex-1 items-center gap-density-2 font-mono text-xs\">\n <span className={cn(\"shrink-0\", node.kind === \"more\" ? \"text-muted-foreground\" : \"text-primary\")}>\n {node.kind === \"more\" ? \"…\" : node.path}\n </span>\n <span className=\"truncate text-muted-foreground\" title={node.summary}>{node.summary}</span>\n </span>\n )}\n />\n </div>\n\n <div className=\"flex min-h-0 flex-col gap-2\">\n <InputField\n aria-label=\"JSONPath expression\"\n value={draft}\n onChange={setDraft}\n inputClassName=\"font-mono text-xs\"\n placeholder=\"$.messages[0].payload\"\n />\n\n {root !== undefined && (\n <p\n className={cn(\n \"flex shrink-0 items-start gap-1.5 rounded-md border px-2 py-1.5 text-xs text-foreground\",\n rootPending\n ? \"border-amber-600/40 bg-amber-500/10\"\n : \"border-border bg-muted/40\",\n )}\n >\n <Icon\n icon={rootPending ? UiWarningTriangle : UiInfo}\n className={cn(\"mt-0.5 shrink-0\", rootPending ? \"text-amber-600\" : \"text-muted-foreground\")}\n />\n <span>\n This path is rooted inside <code className=\"font-mono\">{root}</code>, a column holding JSON\n as text.{\" \"}\n {root === source ? (\n <>\n That is already the column's <code className=\"font-mono\">Source</code>.\n </>\n ) : assignsRoot ? (\n <>\n Applying it sets the column's <code className=\"font-mono\">Source</code> to{\" \"}\n <code className=\"font-mono\">{root}</code>.\n </>\n ) : (\n <>\n The column's <code className=\"font-mono\">Source</code> must be set to{\" \"}\n <code className=\"font-mono\">{root}</code> for it to resolve.\n </>\n )}\n </span>\n </p>\n )}\n\n <ResultPane evaluating={evaluating} result={result} selected={selected} evaluated={Boolean(evaluate)} />\n </div>\n </div>\n </div>\n </Modal>\n );\n}\n\n/**\n * The value a `source` column's paths are written against: the column itself,\n * decoded when it carries JSON as text — which mirrors what the backend does\n * before it applies the path.\n */\nfunction decodeSource(row: unknown, source: string | undefined): unknown {\n if (!source) return row;\n if (row === null || typeof row !== \"object\") return undefined;\n const value = (row as Record<string, unknown>)[source];\n if (typeof value !== \"string\") return value;\n try {\n return JSON.parse(value) as unknown;\n } catch {\n return value;\n }\n}\n\nfunction ResultPane({\n evaluating,\n result,\n selected,\n evaluated,\n}: {\n evaluating: boolean;\n result: JSONPathEvalResult | null;\n selected: JSONPathNode | null;\n evaluated: boolean;\n}) {\n if (!evaluated) {\n return (\n <div className=\"min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/20 p-2 text-xs\">\n {selected ? (\n <JsonView data={selected.value} defaultOpenDepth={1} />\n ) : (\n <p className=\"text-muted-foreground\">Select a node to see its value.</p>\n )}\n </div>\n );\n }\n\n return (\n <>\n <div className=\"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs\">\n {result?.error ? (\n <span className=\"font-mono text-destructive\">{result.error}</span>\n ) : (\n <span className={cn(result && result.count === 0 && \"text-muted-foreground\")}>\n {evaluating && result === null\n ? \"Evaluating…\"\n : `${result?.count ?? 0} match${result?.count === 1 ? \"\" : \"es\"}`}\n </span>\n )}\n {result && !result.error && (\n <span className=\"text-muted-foreground\">\n {result.filterField\n ? <>Filterable as <code className=\"font-mono text-foreground\">{result.filterField}</code></>\n : \"Selects a set — not filterable unless the column declares filter.field\"}\n </span>\n )}\n </div>\n <div className=\"min-h-0 flex-1 overflow-auto rounded-md border border-border bg-muted/20 p-2 text-xs\">\n {result && !result.error && result.count > 0 ? (\n <JsonView data={result.count === 1 ? result.matches[0] : result.matches} defaultOpenDepth={1} />\n ) : (\n <p className=\"text-muted-foreground\">\n {result?.error ? \"Fix the expression to see what it selects.\" : \"This path selects nothing in this row.\"}\n </p>\n )}\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA6DA,IAAM,uBAAuB;;;;;;;;;AAU7B,SAAgB,mBAAmB,EACjC,MACA,SACA,MACA,OACA,UACA,aACA,QACA,UACA,QAAQ,yBACkB;CAC1B,MAAM,CAAC,OAAO,aAAA,GAAYA,MAAAA,SAAAA,CAAS,KAAK;CACxC,MAAM,CAAC,UAAU,gBAAA,GAAeA,MAAAA,SAAAA,CAAS,CAAC;CAC1C,MAAM,CAAC,UAAU,gBAAA,GAAeA,MAAAA,SAAAA,CAA8B,IAAI;CAClE,MAAM,CAAC,QAAQ,cAAA,GAAaA,MAAAA,SAAAA,CAAo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AA,CAAE,kBAAc,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IAA6B,UAAA,OAAO;GAAkB,CAAA,CAAG,EAAA,CAAA,IACzF;EACA,CAAA,CAEL;CACL,CAAA,GAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAU;EACZ,UAAA,UAAU,CAAC,OAAO,SAAS,OAAO,QAAQ,IACzC,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,UAAD;GAAU,MAAM,OAAO,UAAU,IAAI,OAAO,QAAQ,KAAK,OAAO;GAAS,kBAAkB;EAAI,CAAA,IAE/F,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;GAAG,WAAU;GACV,UAAA,QAAQ,QAAQ,+CAA+C;EAC/D,CAAA;CAEF,CAAA,CACL,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"JSONPathPlayground.cjs","names":["useState","useRef","useMemo","rowSamples","initialInput","jsonPathPlaygroundEvaluator","useCallback","Modal","Button","LazyEmbeddedPlayground","cn","Icon","UiWarningTriangle","UiInfo","_Fragment"],"sources":["../../src/components/JSONPathPlayground.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { Icon } from \"../data/Icon\";\nimport { initialInput, rowSamples } from \"../expressions/playground/hostEvaluation\";\nimport { LazyEmbeddedPlayground } from \"../expressions/playground/LazyEmbeddedPlayground\";\nimport type { FormatPath } from \"../expressions/playground/api\";\nimport { UiInfo, UiWarningTriangle } from \"../icons\";\nimport { Modal } from \"../overlay/Modal\";\nimport { Button } from \"./button\";\nimport { jsonPathPlaygroundEvaluator } from \"./jsonPathPlaygroundEvaluator\";\n\n/** What evaluating an expression against one row reports back. */\nexport interface JSONPathEvalResult {\n matches: unknown[];\n count: number;\n /** Why the expression could not be evaluated — a parse error is an answer, not a failure. */\n error?: string;\n /** Backend field the expression addresses, when it addresses one rather than selecting a set. */\n filterField?: string;\n}\n\nexport interface JSONPathEvalRequest {\n jsonpath: string;\n /** Column the path is rooted at, when it addresses a decoded JSON-encoded column. */\n source?: string;\n row: unknown;\n}\n\nexport interface JSONPathPlaygroundProps {\n open: boolean;\n onClose: () => void;\n /** Sampled rows to browse. \"All samples\" appears once there is more than one. */\n rows: unknown[];\n /** The expression the field currently holds. */\n value: string;\n /** Commits the drafted expression, along with the column it must be rooted at. */\n onCommit: (path: string, context: { root?: string }) => void;\n /**\n * True when `onCommit` writes the root itself. It only changes what the\n * dialog says about a path that descends into an encoded column: that the\n * root will be recorded, rather than instructing the author to go and record\n * it. Consumers that drop the root leave this unset and keep the warning.\n */\n assignsRoot?: boolean;\n /**\n * The column the field's path is *already* rooted at — its saved `source`.\n *\n * Without it the dialog evaluates from the row while the value it was opened\n * with is written against a decoded column, so a column that works perfectly\n * well reports no matches and an author is invited to fix it.\n */\n source?: string;\n /**\n * Evaluates the draft against the input row, on the backend that will run it.\n * Without it the dialog can pick a path from the object graph but not preview\n * what it selects, and says so instead of guessing.\n */\n evaluate?: (request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>;\n title?: string;\n}\n\n/**\n * The full-size counterpart to the inline JSONPath dropdown: the expression\n * playground, run on the backend that will read the path.\n *\n * The dropdown is a preview and caps its walk to stay instant; the playground's\n * object graph browses the row with no depth limit, every array element and\n * every property, and descends into a column that holds JSON as text. Picking a\n * node out of one records the column the path is rooted at, which the backend\n * needs alongside the path.\n */\nexport function JSONPathPlayground(props: JSONPathPlaygroundProps) {\n return props.open ? <OpenPlayground {...props} /> : null;\n}\n\nfunction OpenPlayground({\n onClose,\n rows,\n value,\n onCommit,\n assignsRoot,\n source,\n evaluate,\n title = \"JSONPath playground\",\n}: JSONPathPlaygroundProps) {\n // Mounted only while open, so reopening starts from whatever the field holds\n // now rather than from the last session's draft.\n const [draft, setDraft] = useState(value);\n // What the author last picked from the object graph. Nothing picked leaves the\n // path rooted where the column already says it is; a node outside an encoded\n // column is rooted nowhere, and a node inside one at that column.\n const [picked, setPicked] = useState<{ root: string | undefined } | null>(null);\n const [lastResult, setLastResult] = useState<JSONPathEvalResult | null>(null);\n\n // Hand-editing the expression keeps the pick: an author who descended into an\n // encoded column and is now tuning the path inside it still means that column.\n // It is never silent — the banner below names it.\n const root = picked ? picked.root : source;\n // Only a root nobody has recorded yet is a warning: one the column already\n // declares, or one this dialog is about to write, is just context.\n const rootPending = root !== undefined && root !== source && !assignsRoot;\n\n // Read when each evaluation starts, not when the evaluator is built: the pick\n // that changes it lands between two runs.\n const rootRef = useRef(root);\n rootRef.current = root;\n\n const samples = useMemo(() => rowSamples(rows), [rows]);\n const input = initialInput(samples);\n const run = useMemo(\n () =>\n jsonPathPlaygroundEvaluator({\n evaluate,\n root: () => rootRef.current,\n onEvaluated: (result) => setLastResult(result.error ? null : result),\n }),\n [evaluate],\n );\n const formatPath = useCallback<FormatPath>((_segments, node) => {\n setPicked({ root: node.root });\n return node.path;\n }, []);\n\n const commit = () => {\n onCommit(draft, root === undefined ? {} : { root });\n onClose();\n };\n\n return (\n <Modal\n open\n onClose={onClose}\n title={title}\n size=\"full\"\n scrollBody={false}\n className=\"h-[85vh]\"\n footer={\n <div className=\"flex items-center justify-end gap-2\">\n <Button variant=\"outline\" onClick={onClose}>\n Cancel\n </Button>\n <Button onClick={commit} disabled={draft.trim() === \"\"}>\n Apply\n </Button>\n </div>\n }\n >\n <div className=\"flex h-full min-h-0 flex-col gap-2\">\n {rows.length === 0 && (\n <p className=\"shrink-0 text-xs text-muted-foreground\">\n Nothing sampled yet — the input starts as {\"{}\"}. Run a sample to browse a real row.\n </p>\n )}\n {root !== undefined && <RootBanner root={root} source={source} assignsRoot={assignsRoot} pending={rootPending} />}\n {evaluate && lastResult && <MatchLine result={lastResult} />}\n <div className=\"min-h-0 flex-1 overflow-hidden rounded-md border border-border\">\n <LazyEmbeddedPlayground\n language=\"jsonpath\"\n source={value}\n input={input}\n onSourceChange={setDraft}\n evaluate={run}\n samples={samples}\n formatPath={formatPath}\n {...(evaluate ? {} : { executionMode: \"explicit\" as const })}\n />\n </div>\n </div>\n </Modal>\n );\n}\n\n/**\n * A path rooted inside a column that holds JSON as text cannot be read from the\n * row directly: the backend reaches it by way of the column's `source`, so the\n * two are committed together. This says which column, and whose job it is to\n * record it.\n */\nfunction RootBanner({\n root,\n source,\n assignsRoot,\n pending,\n}: {\n root: string;\n source: string | undefined;\n assignsRoot: boolean | undefined;\n pending: boolean;\n}) {\n return (\n <p\n className={cn(\n \"flex shrink-0 items-start gap-1.5 rounded-md border px-2 py-1.5 text-xs text-foreground\",\n pending ? \"border-amber-600/40 bg-amber-500/10\" : \"border-border bg-muted/40\",\n )}\n >\n <Icon\n icon={pending ? UiWarningTriangle : UiInfo}\n className={cn(\"mt-0.5 shrink-0\", pending ? \"text-amber-600\" : \"text-muted-foreground\")}\n />\n <span>\n This path is rooted inside <code className=\"font-mono\">{root}</code>, a column holding JSON as text.{\" \"}\n {root === source ? (\n <>\n That is already the column's <code className=\"font-mono\">Source</code>.\n </>\n ) : assignsRoot ? (\n <>\n Applying it sets the column's <code className=\"font-mono\">Source</code> to{\" \"}\n <code className=\"font-mono\">{root}</code>.\n </>\n ) : (\n <>\n The column's <code className=\"font-mono\">Source</code> must be set to{\" \"}\n <code className=\"font-mono\">{root}</code> for it to resolve.\n </>\n )}\n </span>\n </p>\n );\n}\n\n/** What the playground's result cannot say: how many matches, and whether the path can drive a filter. */\nfunction MatchLine({ result }: { result: JSONPathEvalResult }) {\n return (\n <div className=\"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs\">\n <span className={cn(result.count === 0 && \"text-muted-foreground\")}>\n {`${result.count} match${result.count === 1 ? \"\" : \"es\"}`}\n </span>\n <span className=\"text-muted-foreground\">\n {result.filterField ? (\n <>\n Filterable as <code className=\"font-mono text-foreground\">{result.filterField}</code>\n </>\n ) : (\n \"Selects a set — not filterable unless the column declares filter.field\"\n )}\n </span>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;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AAU,IAAI,KAAK;EAC/C,CAAA,GACN,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;GACb,UAAA,OAAO,cACN,iBAAA,GAAA,kBAAA,KAAA,CAAAI,kBAAAA,UAAA,EAAA,UAAA,CAAE,kBACc,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IAA6B,UAAA,OAAO;GAAkB,CAAA,CACpF,EAAA,CAAA,IAEF;EAEE,CAAA,CACH;;AAET"}
|
|
@@ -16,7 +16,7 @@ export interface JSONPathEvalRequest {
|
|
|
16
16
|
export interface JSONPathPlaygroundProps {
|
|
17
17
|
open: boolean;
|
|
18
18
|
onClose: () => void;
|
|
19
|
-
/** Sampled rows to browse.
|
|
19
|
+
/** Sampled rows to browse. "All samples" appears once there is more than one. */
|
|
20
20
|
rows: unknown[];
|
|
21
21
|
/** The expression the field currently holds. */
|
|
22
22
|
value: string;
|
|
@@ -34,26 +34,28 @@ export interface JSONPathPlaygroundProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* The column the field's path is *already* rooted at — its saved `source`.
|
|
36
36
|
*
|
|
37
|
-
* Without it the dialog
|
|
38
|
-
*
|
|
39
|
-
*
|
|
37
|
+
* Without it the dialog evaluates from the row while the value it was opened
|
|
38
|
+
* with is written against a decoded column, so a column that works perfectly
|
|
39
|
+
* well reports no matches and an author is invited to fix it.
|
|
40
40
|
*/
|
|
41
41
|
source?: string;
|
|
42
42
|
/**
|
|
43
|
-
* Evaluates the draft against the
|
|
44
|
-
*
|
|
45
|
-
*
|
|
43
|
+
* Evaluates the draft against the input row, on the backend that will run it.
|
|
44
|
+
* Without it the dialog can pick a path from the object graph but not preview
|
|
45
|
+
* what it selects, and says so instead of guessing.
|
|
46
46
|
*/
|
|
47
47
|
evaluate?: (request: JSONPathEvalRequest) => Promise<JSONPathEvalResult>;
|
|
48
48
|
title?: string;
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* The full-size counterpart to the inline JSONPath dropdown
|
|
51
|
+
* The full-size counterpart to the inline JSONPath dropdown: the expression
|
|
52
|
+
* playground, run on the backend that will read the path.
|
|
52
53
|
*
|
|
53
|
-
* The dropdown is a preview and caps its walk to stay instant;
|
|
54
|
-
* row with no depth limit, every array element
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* The dropdown is a preview and caps its walk to stay instant; the playground's
|
|
55
|
+
* object graph browses the row with no depth limit, every array element and
|
|
56
|
+
* every property, and descends into a column that holds JSON as text. Picking a
|
|
57
|
+
* node out of one records the column the path is rooted at, which the backend
|
|
58
|
+
* needs alongside the path.
|
|
57
59
|
*/
|
|
58
|
-
export declare function JSONPathPlayground(
|
|
60
|
+
export declare function JSONPathPlayground(props: JSONPathPlaygroundProps): import("react").JSX.Element | null;
|
|
59
61
|
//# sourceMappingURL=JSONPathPlayground.d.ts.map
|