@flanksource/clicky-ui 0.3.77 → 0.3.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +16 -0
- package/dist/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +33 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +18 -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/icons/components/UiGlobeShare.cjs +33 -0
- package/dist/icons/components/UiGlobeShare.cjs.map +1 -0
- package/dist/icons/components/UiGlobeShare.d.ts +9 -0
- package/dist/icons/components/UiGlobeShare.d.ts.map +1 -0
- package/dist/icons/components/UiGlobeShare.js +31 -0
- package/dist/icons/components/UiGlobeShare.js.map +1 -0
- package/dist/icons/components/UiKubernetesLink.cjs +38 -0
- package/dist/icons/components/UiKubernetesLink.cjs.map +1 -0
- package/dist/icons/components/UiKubernetesLink.d.ts +9 -0
- package/dist/icons/components/UiKubernetesLink.d.ts.map +1 -0
- package/dist/icons/components/UiKubernetesLink.js +36 -0
- package/dist/icons/components/UiKubernetesLink.js.map +1 -0
- package/dist/icons/components/UiLogoAws.cjs +29 -0
- package/dist/icons/components/UiLogoAws.cjs.map +1 -0
- package/dist/icons/components/UiLogoAws.d.ts +9 -0
- package/dist/icons/components/UiLogoAws.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAws.js +27 -0
- package/dist/icons/components/UiLogoAws.js.map +1 -0
- package/dist/icons/components/UiLogoAzure.cjs +29 -0
- package/dist/icons/components/UiLogoAzure.cjs.map +1 -0
- package/dist/icons/components/UiLogoAzure.d.ts +9 -0
- package/dist/icons/components/UiLogoAzure.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAzure.js +27 -0
- package/dist/icons/components/UiLogoAzure.js.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.cjs +29 -0
- package/dist/icons/components/UiLogoAzureDevops.cjs.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.d.ts +9 -0
- package/dist/icons/components/UiLogoAzureDevops.d.ts.map +1 -0
- package/dist/icons/components/UiLogoAzureDevops.js +27 -0
- package/dist/icons/components/UiLogoAzureDevops.js.map +1 -0
- package/dist/icons/components/UiLogoGit.cjs +29 -0
- package/dist/icons/components/UiLogoGit.cjs.map +1 -0
- package/dist/icons/components/UiLogoGit.d.ts +9 -0
- package/dist/icons/components/UiLogoGit.d.ts.map +1 -0
- package/dist/icons/components/UiLogoGit.js +27 -0
- package/dist/icons/components/UiLogoGit.js.map +1 -0
- package/dist/icons/components/UiLogoGithub.cjs +29 -0
- package/dist/icons/components/UiLogoGithub.cjs.map +1 -0
- package/dist/icons/components/UiLogoGithub.d.ts +9 -0
- package/dist/icons/components/UiLogoGithub.d.ts.map +1 -0
- package/dist/icons/components/UiLogoGithub.js +27 -0
- package/dist/icons/components/UiLogoGithub.js.map +1 -0
- package/dist/icons/components/UiLogoJava.cjs +29 -0
- package/dist/icons/components/UiLogoJava.cjs.map +1 -0
- package/dist/icons/components/UiLogoJava.d.ts +9 -0
- package/dist/icons/components/UiLogoJava.d.ts.map +1 -0
- package/dist/icons/components/UiLogoJava.js +27 -0
- package/dist/icons/components/UiLogoJava.js.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.cjs +29 -0
- package/dist/icons/components/UiLogoKubernetes.cjs.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.d.ts +9 -0
- package/dist/icons/components/UiLogoKubernetes.d.ts.map +1 -0
- package/dist/icons/components/UiLogoKubernetes.js +27 -0
- package/dist/icons/components/UiLogoKubernetes.js.map +1 -0
- package/dist/icons/components/UiLogoMssql.cjs +29 -0
- package/dist/icons/components/UiLogoMssql.cjs.map +1 -0
- package/dist/icons/components/UiLogoMssql.d.ts +9 -0
- package/dist/icons/components/UiLogoMssql.d.ts.map +1 -0
- package/dist/icons/components/UiLogoMssql.js +27 -0
- package/dist/icons/components/UiLogoMssql.js.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.cjs +29 -0
- package/dist/icons/components/UiLogoOpenjdk.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.d.ts +9 -0
- package/dist/icons/components/UiLogoOpenjdk.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpenjdk.js +27 -0
- package/dist/icons/components/UiLogoOpenjdk.js.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.cjs +29 -0
- package/dist/icons/components/UiLogoOpensearch.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.d.ts +9 -0
- package/dist/icons/components/UiLogoOpensearch.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpensearch.js +27 -0
- package/dist/icons/components/UiLogoOpensearch.js.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.cjs +29 -0
- package/dist/icons/components/UiLogoOpentelemetry.cjs.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.d.ts +9 -0
- package/dist/icons/components/UiLogoOpentelemetry.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOpentelemetry.js +27 -0
- package/dist/icons/components/UiLogoOpentelemetry.js.map +1 -0
- package/dist/icons/components/UiLogoPostgres.cjs +29 -0
- package/dist/icons/components/UiLogoPostgres.cjs.map +1 -0
- package/dist/icons/components/UiLogoPostgres.d.ts +9 -0
- package/dist/icons/components/UiLogoPostgres.d.ts.map +1 -0
- package/dist/icons/components/UiLogoPostgres.js +27 -0
- package/dist/icons/components/UiLogoPostgres.js.map +1 -0
- package/dist/icons/components/UiLogoSqlite.cjs +29 -0
- package/dist/icons/components/UiLogoSqlite.cjs.map +1 -0
- package/dist/icons/components/UiLogoSqlite.d.ts +9 -0
- package/dist/icons/components/UiLogoSqlite.d.ts.map +1 -0
- package/dist/icons/components/UiLogoSqlite.js +27 -0
- package/dist/icons/components/UiLogoSqlite.js.map +1 -0
- package/dist/icons/components/UiWebLink.cjs +40 -0
- package/dist/icons/components/UiWebLink.cjs.map +1 -0
- package/dist/icons/components/UiWebLink.d.ts +9 -0
- package/dist/icons/components/UiWebLink.d.ts.map +1 -0
- package/dist/icons/components/UiWebLink.js +38 -0
- package/dist/icons/components/UiWebLink.js.map +1 -0
- package/dist/icons/index.d.ts +16 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +32 -0
- package/dist/icons/registry.cjs.map +1 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +32 -0
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons.cjs +32 -0
- package/dist/icons.js +17 -1
- package/dist/index.cjs +38 -5
- package/dist/index.js +23 -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 +126 -38
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts +5 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +127 -39
- 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 +93 -0
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -0
- package/dist/profiles/editor/profileSaveAsDialog.d.ts +17 -0
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -0
- package/dist/profiles/editor/profileSaveAsDialog.js +93 -0
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -0
- 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 +24 -8
- 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 +25 -9
- 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 +117 -111
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts +3 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +117 -111
- 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 +8944 -8877
- package/dist/runtime/importmap.json +2168 -2129
- 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
|
@@ -2,42 +2,90 @@ import { Badge } from "../../data/Badge.js";
|
|
|
2
2
|
import { Button } from "../../components/button.js";
|
|
3
3
|
import { Icon } from "../../data/Icon.js";
|
|
4
4
|
import { Modal } from "../../overlay/Modal.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { UiArrowRight } from "../../icons/components/UiArrowRight.js";
|
|
5
|
+
import { initialInput, rowSamples } from "../../expressions/playground/hostEvaluation.js";
|
|
6
|
+
import { LazyEmbeddedPlayground } from "../../expressions/playground/LazyEmbeddedPlayground.js";
|
|
8
7
|
import { UiCheck } from "../../icons/components/UiCheck.js";
|
|
9
8
|
import { UiCode2 } from "../../icons/components/UiCode2.js";
|
|
10
|
-
import { UiWarningTriangle } from "../../icons/components/UiWarningTriangle.js";
|
|
11
9
|
import { useJsonPathSample } from "../query/jsonPathSample.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { coverage, isClean, nextBarren, profileCelEnvironment } from "./celExpression.js";
|
|
16
|
-
import { useMemo, useRef, useState } from "react";
|
|
10
|
+
import { celPlaygroundEvaluator, celPlaygroundExamples, celPlaygroundExpectation, celPlaygroundFormatPath, celScopeBindings } from "./celPlayground.js";
|
|
11
|
+
import { profileCelEnvironment } from "./celExpression.js";
|
|
12
|
+
import { useMemo, useState } from "react";
|
|
17
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
-
import { useQuery } from "@tanstack/react-query";
|
|
19
14
|
// src/profiles/cel/celEditor.tsx
|
|
20
15
|
function scopeOf(schema) {
|
|
21
16
|
const declared = schema["x-clicky-cel-scope"];
|
|
22
17
|
return declared === "batch" || declared === "boundary" ? declared : "row";
|
|
23
18
|
}
|
|
24
19
|
/**
|
|
25
|
-
* The expression editor
|
|
20
|
+
* The expression editor: the full expression playground, run on the engine that
|
|
21
|
+
* runs the column.
|
|
26
22
|
*
|
|
27
|
-
* Its subject is coverage, not syntax. An expression is written against
|
|
28
|
-
* on screen and the rows it reads nothing from are the ones the author
|
|
29
|
-
* looked at — and because this engine folds a missing field into null
|
|
30
|
-
* throwing, a wrong expression comes back clean. So
|
|
31
|
-
*
|
|
32
|
-
*
|
|
23
|
+
* Its subject is still coverage, not syntax. An expression is written against
|
|
24
|
+
* the rows on screen and the rows it reads nothing from are the ones the author
|
|
25
|
+
* has not looked at — and because this engine folds a missing field into null
|
|
26
|
+
* instead of throwing, a wrong expression comes back clean. So every sampled row
|
|
27
|
+
* is a playground sample: "All samples" runs the expression against each and
|
|
28
|
+
* walks the ones that produce nothing. The playground's own editors, object
|
|
29
|
+
* graph and function catalogue are what the input already had.
|
|
33
30
|
*/
|
|
34
|
-
function CelEditorDialog(
|
|
31
|
+
function CelEditorDialog({ value, scope, rows, title, onChange, onClose }) {
|
|
32
|
+
const environment = useMemo(() => typeof scope === "string" ? profileCelEnvironment(scope) : scope, [scope]);
|
|
33
|
+
const [draft, setDraft] = useState(value);
|
|
34
|
+
const samples = useMemo(() => rowSamples(rows, environment.rowLabel), [rows, environment]);
|
|
35
|
+
const input = initialInput(samples);
|
|
36
|
+
const evaluate = useMemo(() => celPlaygroundEvaluator(environment), [environment]);
|
|
37
|
+
const formatPath = useMemo(() => celPlaygroundFormatPath(environment), [environment]);
|
|
38
|
+
const expectation = useMemo(() => celPlaygroundExpectation(environment), [environment]);
|
|
39
|
+
const examples = useMemo(() => celPlaygroundExamples(environment, rows, input), [
|
|
40
|
+
environment,
|
|
41
|
+
rows,
|
|
42
|
+
input
|
|
43
|
+
]);
|
|
35
44
|
return /* @__PURE__ */ jsx(Modal, {
|
|
36
45
|
open: true,
|
|
37
|
-
onClose
|
|
38
|
-
title: `Expression — ${
|
|
39
|
-
size: "
|
|
40
|
-
|
|
46
|
+
onClose,
|
|
47
|
+
title: `Expression — ${title}`,
|
|
48
|
+
size: "full",
|
|
49
|
+
scrollBody: false,
|
|
50
|
+
className: "h-[85vh]",
|
|
51
|
+
footer: /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "flex items-center justify-end gap-2",
|
|
53
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
54
|
+
variant: "outline",
|
|
55
|
+
onClick: onClose,
|
|
56
|
+
children: "Cancel"
|
|
57
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
58
|
+
className: "gap-1.5",
|
|
59
|
+
onClick: () => {
|
|
60
|
+
onChange(draft);
|
|
61
|
+
onClose();
|
|
62
|
+
},
|
|
63
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
64
|
+
icon: UiCheck,
|
|
65
|
+
className: "text-[12px]"
|
|
66
|
+
}), "Apply"]
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
69
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: "flex h-full min-h-0 flex-col gap-2",
|
|
71
|
+
children: [/* @__PURE__ */ jsx(ScopeLine, {
|
|
72
|
+
environment,
|
|
73
|
+
rows
|
|
74
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
75
|
+
className: "min-h-0 flex-1 overflow-hidden rounded-md border border-border",
|
|
76
|
+
children: /* @__PURE__ */ jsx(LazyEmbeddedPlayground, {
|
|
77
|
+
language: "cel",
|
|
78
|
+
source: value,
|
|
79
|
+
input,
|
|
80
|
+
onSourceChange: setDraft,
|
|
81
|
+
evaluate,
|
|
82
|
+
samples,
|
|
83
|
+
examples,
|
|
84
|
+
expectation,
|
|
85
|
+
formatPath
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
41
89
|
});
|
|
42
90
|
}
|
|
43
91
|
/** "3 users", "1 user" — the header's count, in the environment's own noun. */
|
|
@@ -45,278 +93,39 @@ function countOf(count, noun) {
|
|
|
45
93
|
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
46
94
|
}
|
|
47
95
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* The split exists so this can be rendered and asserted without a DOM: Modal
|
|
51
|
-
* portals, and a portal renders to nothing server-side.
|
|
96
|
+
* What the playground cannot know: which scope this is, how many rows back it,
|
|
97
|
+
* and the variables other than the row that the expression may name.
|
|
52
98
|
*/
|
|
53
|
-
function
|
|
54
|
-
const environment = useMemo(() => typeof scope === "string" ? profileCelEnvironment(scope) : scope, [scope]);
|
|
55
|
-
const [draft, setDraft] = useState(value);
|
|
56
|
-
const [focused, setFocused] = useState(0);
|
|
57
|
-
const [picked, setPicked] = useState(void 0);
|
|
58
|
-
const input = useRef(null);
|
|
59
|
-
const insert = (text) => {
|
|
60
|
-
const element = input.current;
|
|
61
|
-
setDraft((current) => {
|
|
62
|
-
const start = element?.selectionStart ?? current.length;
|
|
63
|
-
const end = element?.selectionEnd ?? current.length;
|
|
64
|
-
return current.slice(0, start) + text + current.slice(end);
|
|
65
|
-
});
|
|
66
|
-
queueMicrotask(() => {
|
|
67
|
-
element?.focus();
|
|
68
|
-
const at = (element?.selectionStart ?? 0) + text.length;
|
|
69
|
-
element?.setSelectionRange(at, at);
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
const { data, isFetching, error } = useQuery({
|
|
73
|
-
queryKey: [
|
|
74
|
-
"cel-expression",
|
|
75
|
-
environment.id,
|
|
76
|
-
draft,
|
|
77
|
-
rows.length
|
|
78
|
-
],
|
|
79
|
-
enabled: draft.trim() !== "" && rows.length > 0,
|
|
80
|
-
staleTime: Infinity,
|
|
81
|
-
retry: false,
|
|
82
|
-
refetchOnWindowFocus: false,
|
|
83
|
-
queryFn: () => environment.evaluate(draft, rows)
|
|
84
|
-
});
|
|
85
|
-
const results = data?.results ?? [];
|
|
86
|
-
const found = useMemo(() => coverage(results), [results]);
|
|
87
|
-
const focusedResult = results.find((result) => result.index === focused) ?? results[0];
|
|
88
|
-
const jump = nextBarren(found, focused);
|
|
89
|
-
const row = rows[focused];
|
|
90
|
-
const bindings = environment.bindings(row);
|
|
91
|
-
const unreachable = environment.unreachable?.(row) ?? [];
|
|
99
|
+
function ScopeLine({ environment, rows }) {
|
|
92
100
|
const noun = environment.rowNoun ?? "sampled row";
|
|
93
|
-
const
|
|
94
|
-
const target = rows[index];
|
|
95
|
-
return environment.rowLabel && target ? environment.rowLabel(target, index) : `row ${index + 1}`;
|
|
96
|
-
};
|
|
97
|
-
const tree = useMemo(() => createLazyJSONPathTree(row, { keyPrefix: `row${focused}:` }), [row, focused]);
|
|
98
|
-
const pickedPath = picked ? celPathFor(picked, environment.rowName) : void 0;
|
|
101
|
+
const bindings = celScopeBindings(environment, rows[0]);
|
|
99
102
|
return /* @__PURE__ */ jsxs("div", {
|
|
100
|
-
className: "
|
|
103
|
+
className: "flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs",
|
|
101
104
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
size: "md",
|
|
108
|
-
children: environment.label
|
|
109
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
110
|
-
className: "text-xs text-muted-foreground",
|
|
111
|
-
children: rows.length === 0 ? environment.rowNoun ? `no ${noun}s` : "nothing sampled yet" : countOf(rows.length, noun)
|
|
112
|
-
})]
|
|
105
|
+
/* @__PURE__ */ jsx(Badge, {
|
|
106
|
+
tone: "info",
|
|
107
|
+
variant: "soft",
|
|
108
|
+
size: "md",
|
|
109
|
+
children: environment.label
|
|
113
110
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
className: "
|
|
116
|
-
children:
|
|
117
|
-
className: "space-y-2",
|
|
118
|
-
children: [
|
|
119
|
-
/* @__PURE__ */ jsx("textarea", {
|
|
120
|
-
ref: input,
|
|
121
|
-
className: "h-24 w-full resize-none rounded border border-border bg-background p-2 font-mono text-xs",
|
|
122
|
-
value: draft,
|
|
123
|
-
onChange: (event) => setDraft(event.target.value),
|
|
124
|
-
"aria-label": "CEL expression"
|
|
125
|
-
}),
|
|
126
|
-
data?.error && /* @__PURE__ */ jsxs("p", {
|
|
127
|
-
className: "flex gap-1.5 rounded border border-amber-500/40 bg-amber-500/[0.06] px-2 py-1 text-[11px] text-amber-700 [[data-theme=dark]_&]:text-amber-300",
|
|
128
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
129
|
-
icon: UiWarningTriangle,
|
|
130
|
-
className: "mt-0.5 shrink-0 text-[12px]"
|
|
131
|
-
}), data.error]
|
|
132
|
-
}),
|
|
133
|
-
error instanceof Error && /* @__PURE__ */ jsx("p", {
|
|
134
|
-
className: "rounded border border-destructive/40 bg-destructive/[0.06] px-2 py-1 text-[11px] text-destructive",
|
|
135
|
-
children: error.message
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ jsx(ResultStrip, {
|
|
138
|
-
result: focusedResult,
|
|
139
|
-
label: nameRow(focused),
|
|
140
|
-
pending: isFetching,
|
|
141
|
-
draft,
|
|
142
|
-
onFix: setDraft
|
|
143
|
-
}),
|
|
144
|
-
pickedPath && /* @__PURE__ */ jsxs("div", {
|
|
145
|
-
className: "space-y-1.5 rounded border border-border bg-muted/30 p-2",
|
|
146
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
147
|
-
className: "flex items-center gap-1.5",
|
|
148
|
-
children: [/* @__PURE__ */ jsx("code", {
|
|
149
|
-
className: "min-w-0 flex-1 truncate font-mono text-[11px] text-primary",
|
|
150
|
-
children: pickedPath
|
|
151
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
152
|
-
size: "sm",
|
|
153
|
-
variant: "outline",
|
|
154
|
-
onClick: () => insert(pickedPath),
|
|
155
|
-
children: "Insert"
|
|
156
|
-
})]
|
|
157
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
158
|
-
className: "flex flex-wrap gap-1",
|
|
159
|
-
children: celExamplesFor(pickedPath, picked?.value, { predicate: environment.predicate }).map((example) => /* @__PURE__ */ jsx("button", {
|
|
160
|
-
type: "button",
|
|
161
|
-
title: example.expression,
|
|
162
|
-
className: "rounded-full border border-border px-2 py-0.5 text-[10px] hover:bg-muted",
|
|
163
|
-
onClick: () => setDraft(example.expression),
|
|
164
|
-
children: example.label
|
|
165
|
-
}, example.label))
|
|
166
|
-
})]
|
|
167
|
-
}),
|
|
168
|
-
/* @__PURE__ */ jsxs("div", {
|
|
169
|
-
className: "flex flex-wrap items-center gap-2",
|
|
170
|
-
children: [
|
|
171
|
-
/* @__PURE__ */ jsx(Tally, {
|
|
172
|
-
found,
|
|
173
|
-
results,
|
|
174
|
-
predicate: environment.predicate
|
|
175
|
-
}),
|
|
176
|
-
jump !== void 0 && /* @__PURE__ */ jsxs(Button, {
|
|
177
|
-
size: "sm",
|
|
178
|
-
variant: "outline",
|
|
179
|
-
className: "gap-1.5",
|
|
180
|
-
onClick: () => setFocused(jump),
|
|
181
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
182
|
-
icon: UiArrowRight,
|
|
183
|
-
className: "text-[12px]"
|
|
184
|
-
}), "Next empty row"]
|
|
185
|
-
}),
|
|
186
|
-
found.types.length > 1 && /* @__PURE__ */ jsxs(Badge, {
|
|
187
|
-
tone: "warning",
|
|
188
|
-
variant: "soft",
|
|
189
|
-
size: "md",
|
|
190
|
-
children: ["returns ", found.types.join(" | ")]
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ jsx(Coverage, {
|
|
195
|
-
results,
|
|
196
|
-
rowCount: rows.length,
|
|
197
|
-
focused,
|
|
198
|
-
onFocus: setFocused,
|
|
199
|
-
rowLabel: environment.rowLabel ? nameRow : void 0,
|
|
200
|
-
predicate: environment.predicate
|
|
201
|
-
})
|
|
202
|
-
]
|
|
203
|
-
}), /* @__PURE__ */ jsxs("section", {
|
|
204
|
-
className: "space-y-2 rounded-lg border border-border bg-muted/20 p-2",
|
|
205
|
-
children: [
|
|
206
|
-
/* @__PURE__ */ jsxs("div", {
|
|
207
|
-
className: "flex items-center justify-between gap-2",
|
|
208
|
-
children: [/* @__PURE__ */ jsx("h4", {
|
|
209
|
-
className: "text-xs font-semibold",
|
|
210
|
-
children: "In scope"
|
|
211
|
-
}), rows.length > 0 && /* @__PURE__ */ jsx(Badge, {
|
|
212
|
-
tone: "neutral",
|
|
213
|
-
variant: "soft",
|
|
214
|
-
size: "md",
|
|
215
|
-
children: nameRow(focused)
|
|
216
|
-
})]
|
|
217
|
-
}),
|
|
218
|
-
/* @__PURE__ */ jsx("ul", {
|
|
219
|
-
className: "space-y-0.5",
|
|
220
|
-
children: bindings.filter((binding) => binding.value === void 0).map((binding) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("button", {
|
|
221
|
-
type: "button",
|
|
222
|
-
className: "flex w-full items-baseline gap-1.5 rounded px-1 py-0.5 text-left hover:bg-muted",
|
|
223
|
-
onClick: () => insert(binding.name),
|
|
224
|
-
children: [/* @__PURE__ */ jsx("code", {
|
|
225
|
-
className: "shrink-0 font-mono text-[11px] text-primary",
|
|
226
|
-
children: binding.name
|
|
227
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
228
|
-
className: "min-w-0 flex-1 truncate text-[10px] text-muted-foreground",
|
|
229
|
-
children: binding.detail
|
|
230
|
-
})]
|
|
231
|
-
}) }, binding.name))
|
|
232
|
-
}),
|
|
233
|
-
row && /* @__PURE__ */ jsx("div", {
|
|
234
|
-
className: "flex h-72 min-h-0 flex-col overflow-hidden rounded border border-border bg-background",
|
|
235
|
-
children: /* @__PURE__ */ jsx(Tree, {
|
|
236
|
-
className: "min-h-0 flex-1",
|
|
237
|
-
ariaLabel: environment.rowNoun ? `${environment.rowNoun} values` : "Row values",
|
|
238
|
-
showControls: false,
|
|
239
|
-
roots: tree.roots,
|
|
240
|
-
getKey: (node) => node.key,
|
|
241
|
-
getChildren: tree.getChildren,
|
|
242
|
-
hasMoreChildren: tree.hasMoreChildren,
|
|
243
|
-
loadChildren: tree.loadChildren,
|
|
244
|
-
defaultOpen: (_, depth) => depth < 1,
|
|
245
|
-
selected: picked ?? null,
|
|
246
|
-
onSelect: setPicked,
|
|
247
|
-
getSearchText: (node) => `${node.key} ${node.summary}`,
|
|
248
|
-
renderRow: ({ node }) => /* @__PURE__ */ jsxs("span", {
|
|
249
|
-
className: "flex min-w-0 items-baseline gap-1.5",
|
|
250
|
-
title: node.path,
|
|
251
|
-
children: [/* @__PURE__ */ jsx("code", {
|
|
252
|
-
className: "shrink-0 font-mono text-[11px] text-primary",
|
|
253
|
-
children: node.path === "$" ? environment.rowName || nameRow(focused) : lastSegment(node.path)
|
|
254
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
255
|
-
className: "min-w-0 flex-1 truncate text-[10px] text-muted-foreground",
|
|
256
|
-
children: node.summary
|
|
257
|
-
})]
|
|
258
|
-
})
|
|
259
|
-
})
|
|
260
|
-
}),
|
|
261
|
-
unreachable.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
262
|
-
className: "border-t border-border/60 pt-1 text-[10px] text-muted-foreground",
|
|
263
|
-
children: [
|
|
264
|
-
"Reachable only through ",
|
|
265
|
-
/* @__PURE__ */ jsx("code", {
|
|
266
|
-
className: "font-mono",
|
|
267
|
-
children: environment.rowName
|
|
268
|
-
}),
|
|
269
|
-
", not as a bare name:",
|
|
270
|
-
" ",
|
|
271
|
-
unreachable.map((key) => /* @__PURE__ */ jsxs("code", {
|
|
272
|
-
className: "font-mono",
|
|
273
|
-
children: [key, " "]
|
|
274
|
-
}, key))
|
|
275
|
-
]
|
|
276
|
-
})
|
|
277
|
-
]
|
|
278
|
-
})]
|
|
111
|
+
/* @__PURE__ */ jsx("span", {
|
|
112
|
+
className: "text-muted-foreground",
|
|
113
|
+
children: rows.length > 0 ? countOf(rows.length, noun) : environment.rowNoun ? `no ${noun}s — the input starts as {}` : "nothing sampled yet — the input starts as {}"
|
|
279
114
|
}),
|
|
280
|
-
/* @__PURE__ */ jsxs("
|
|
281
|
-
className: "flex
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
icon: UiCheck,
|
|
292
|
-
className: "text-[12px]"
|
|
293
|
-
}), "Apply"]
|
|
294
|
-
}),
|
|
295
|
-
/* @__PURE__ */ jsx(Button, {
|
|
296
|
-
size: "sm",
|
|
297
|
-
variant: "ghost",
|
|
298
|
-
onClick: onClose,
|
|
299
|
-
children: "Cancel"
|
|
300
|
-
}),
|
|
301
|
-
!isClean(found) && results.length > 0 && /* @__PURE__ */ jsxs("span", {
|
|
302
|
-
className: "text-[11px] text-muted-foreground",
|
|
303
|
-
children: [
|
|
304
|
-
found.empty + found.failed,
|
|
305
|
-
" of ",
|
|
306
|
-
countOf(results.length, noun),
|
|
307
|
-
" produce nothing — applying anyway is a choice, not a mistake, but it should be one you make on purpose."
|
|
308
|
-
]
|
|
309
|
-
})
|
|
310
|
-
]
|
|
311
|
-
})
|
|
115
|
+
bindings.map((binding) => /* @__PURE__ */ jsxs("span", {
|
|
116
|
+
className: "flex items-baseline gap-1",
|
|
117
|
+
title: binding.detail,
|
|
118
|
+
children: [/* @__PURE__ */ jsx("code", {
|
|
119
|
+
className: "font-mono text-[11px] text-primary",
|
|
120
|
+
children: binding.name
|
|
121
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: "text-muted-foreground",
|
|
123
|
+
children: binding.detail
|
|
124
|
+
})]
|
|
125
|
+
}, binding.name))
|
|
312
126
|
]
|
|
313
127
|
});
|
|
314
128
|
}
|
|
315
|
-
/** The trailing key or index of a path, which is what a tree row is named by. */
|
|
316
|
-
function lastSegment(path) {
|
|
317
|
-
const match = /\.([^.[\]]+)$|\[([^[\]]+)\]$/.exec(path);
|
|
318
|
-
return match?.[1] ?? match?.[2]?.replace(/^"|"$/g, "") ?? path;
|
|
319
|
-
}
|
|
320
129
|
/**
|
|
321
130
|
* The button that opens the editor for an expression already on screen.
|
|
322
131
|
*
|
|
@@ -327,6 +136,7 @@ function lastSegment(path) {
|
|
|
327
136
|
*/
|
|
328
137
|
function CelTestButton({ value, scope, rows, title, disabled, onChange }) {
|
|
329
138
|
const [open, setOpen] = useState(false);
|
|
139
|
+
const records = useMemo(() => rows.filter(isRecord), [rows]);
|
|
330
140
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Button, {
|
|
331
141
|
size: "sm",
|
|
332
142
|
variant: "outline",
|
|
@@ -340,7 +150,7 @@ function CelTestButton({ value, scope, rows, title, disabled, onChange }) {
|
|
|
340
150
|
}), open && /* @__PURE__ */ jsx(CelEditorDialog, {
|
|
341
151
|
value,
|
|
342
152
|
scope,
|
|
343
|
-
rows:
|
|
153
|
+
rows: records,
|
|
344
154
|
title,
|
|
345
155
|
onChange,
|
|
346
156
|
onClose: () => setOpen(false)
|
|
@@ -371,6 +181,6 @@ function CelField({ field, ctx }) {
|
|
|
371
181
|
function isRecord(value) {
|
|
372
182
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
373
183
|
}
|
|
374
|
-
export { CelEditorDialog,
|
|
184
|
+
export { CelEditorDialog, CelField, CelTestButton };
|
|
375
185
|
|
|
376
186
|
//# sourceMappingURL=celEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"celEditor.js","names":["_Fragment"],"sources":["../../../src/profiles/cel/celEditor.tsx"],"sourcesContent":["import { useMemo, useRef, useState } from \"react\";\nimport { useQuery } from \"@tanstack/react-query\";\nimport { Badge } from \"../../data/Badge\";\nimport { Button } from \"../../components/button\";\nimport { Icon } from \"../../data/Icon\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { Tree } from \"../../data/Tree\";\nimport { createLazyJSONPathTree, type JSONPathNode } from \"../../components/jsonPathTree\";\nimport type {\n FieldControl,\n PostExtensionContext,\n} from \"../../components/json-schema-form-types\";\nimport { UiArrowRight, UiCheck, UiCode2, UiWarningTriangle } from \"../../icons\";\nimport { useJsonPathSample } from \"../query/jsonPathSample\";\nimport { celPathFor } from \"./celPath\";\nimport { Coverage, ResultStrip, Tally } from \"./celEditorResults\";\nimport { celExamplesFor } from \"./celExamples\";\n\nimport {\n coverage,\n isClean,\n nextBarren,\n profileCelEnvironment,\n type CelEnvironment,\n type CelScope,\n} from \"./celExpression\";\n\nfunction scopeOf(schema: Record<string, unknown>): CelScope {\n const declared = schema[\"x-clicky-cel-scope\"];\n return declared === \"batch\" || declared === \"boundary\" ? declared : \"row\";\n}\n\n/**\n * The expression editor.\n *\n * Its subject is coverage, not syntax. An expression is written against the rows\n * on screen and the rows it reads nothing from are the ones the author has not\n * looked at — and because this engine folds a missing field into null instead of\n * throwing, a wrong expression comes back clean. So the strip of per-row\n * outcomes and the jump to the next barren row are the point; highlighting and\n * completion are what the input already had.\n */\nexport function CelEditorDialog(props: CelEditorProps) {\n return (\n <Modal open onClose={props.onClose} title={`Expression — ${props.title}`} size=\"xl\">\n <CelEditorPanel {...props} />\n </Modal>\n );\n}\n\ntype CelEditorProps = {\n value: string;\n /** A profile scope, or the host's own environment for CEL that is not a profile's. */\n scope: CelScope | CelEnvironment;\n rows: Record<string, unknown>[];\n title: string;\n onChange: (next: string) => void;\n onClose: () => void;\n};\n\n/** \"3 users\", \"1 user\" — the header's count, in the environment's own noun. */\nfunction countOf(count: number, noun: string): string {\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}`;\n}\n\n/**\n * The dialog's contents, separated from the Modal that carries them.\n *\n * The split exists so this can be rendered and asserted without a DOM: Modal\n * portals, and a portal renders to nothing server-side.\n */\nexport function CelEditorPanel({ value, scope, rows, onChange, onClose }: CelEditorProps) {\n const environment = useMemo(\n () => (typeof scope === \"string\" ? profileCelEnvironment(scope) : scope),\n [scope],\n );\n const [draft, setDraft] = useState(value);\n const [focused, setFocused] = useState(0);\n const [picked, setPicked] = useState<JSONPathNode | undefined>(undefined);\n const input = useRef<HTMLTextAreaElement>(null);\n\n // Written where the caret is rather than appended: an accessor pasted onto\n // the end of a half-written expression concatenates into nonsense, and the\n // useful gesture is completing `…filter(e, e.key == ` from the tree.\n const insert = (text: string) => {\n const element = input.current;\n setDraft((current) => {\n const start = element?.selectionStart ?? current.length;\n const end = element?.selectionEnd ?? current.length;\n return current.slice(0, start) + text + current.slice(end);\n });\n queueMicrotask(() => {\n element?.focus();\n const at = (element?.selectionStart ?? 0) + text.length;\n element?.setSelectionRange(at, at);\n });\n };\n\n // Evaluated by the environment's own engine, debounced by react-query's key\n // rather than a timer: the rows are already in the browser, so a keystroke\n // costs one small request and no backend query.\n const { data, isFetching, error } = useQuery({\n queryKey: [\"cel-expression\", environment.id, draft, rows.length],\n enabled: draft.trim() !== \"\" && rows.length > 0,\n staleTime: Infinity,\n retry: false,\n refetchOnWindowFocus: false,\n queryFn: () => environment.evaluate(draft, rows),\n });\n\n const results = data?.results ?? [];\n const found = useMemo(() => coverage(results), [results]);\n const focusedResult = results.find((result) => result.index === focused) ?? results[0];\n const jump = nextBarren(found, focused);\n const row = rows[focused];\n const bindings = environment.bindings(row);\n const unreachable = environment.unreachable?.(row) ?? [];\n const noun = environment.rowNoun ?? \"sampled row\";\n const nameRow = (index: number) => {\n const target = rows[index];\n return environment.rowLabel && target ? environment.rowLabel(target, index) : `row ${index + 1}`;\n };\n\n // Rebuilt per focused row: the tree caches nodes by key, so without a prefix\n // that changes with the row, row 2 would show row 1's loaded branches.\n const tree = useMemo(\n () => createLazyJSONPathTree(row, { keyPrefix: `row${focused}:` }),\n [row, focused],\n );\n const pickedPath = picked ? celPathFor(picked, environment.rowName) : undefined;\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <Badge tone=\"info\" variant=\"soft\" size=\"md\">\n {environment.label}\n </Badge>\n <span className=\"text-xs text-muted-foreground\">\n {rows.length === 0\n ? environment.rowNoun\n ? `no ${noun}s`\n : \"nothing sampled yet\"\n : countOf(rows.length, noun)}\n </span>\n </div>\n\n <div className=\"grid gap-3 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,0.7fr)]\">\n <section className=\"space-y-2\">\n <textarea\n ref={input}\n className=\"h-24 w-full resize-none rounded border border-border bg-background p-2 font-mono text-xs\"\n value={draft}\n onChange={(event) => setDraft(event.target.value)}\n aria-label=\"CEL expression\"\n />\n\n {data?.error && (\n <p className=\"flex gap-1.5 rounded border border-amber-500/40 bg-amber-500/[0.06] px-2 py-1 text-[11px] text-amber-700 [[data-theme=dark]_&]:text-amber-300\">\n <Icon icon={UiWarningTriangle} className=\"mt-0.5 shrink-0 text-[12px]\" />\n {data.error}\n </p>\n )}\n {error instanceof Error && (\n <p className=\"rounded border border-destructive/40 bg-destructive/[0.06] px-2 py-1 text-[11px] text-destructive\">\n {error.message}\n </p>\n )}\n\n <ResultStrip\n result={focusedResult}\n label={nameRow(focused)}\n pending={isFetching}\n draft={draft}\n onFix={setDraft}\n />\n\n {pickedPath && (\n <div className=\"space-y-1.5 rounded border border-border bg-muted/30 p-2\">\n <div className=\"flex items-center gap-1.5\">\n <code className=\"min-w-0 flex-1 truncate font-mono text-[11px] text-primary\">\n {pickedPath}\n </code>\n <Button size=\"sm\" variant=\"outline\" onClick={() => insert(pickedPath)}>\n Insert\n </Button>\n </div>\n <div className=\"flex flex-wrap gap-1\">\n {celExamplesFor(pickedPath, picked?.value, { predicate: environment.predicate }).map((example) => (\n <button\n key={example.label}\n type=\"button\"\n title={example.expression}\n className=\"rounded-full border border-border px-2 py-0.5 text-[10px] hover:bg-muted\"\n onClick={() => setDraft(example.expression)}\n >\n {example.label}\n </button>\n ))}\n </div>\n </div>\n )}\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Tally found={found} results={results} predicate={environment.predicate} />\n {jump !== undefined && (\n <Button size=\"sm\" variant=\"outline\" className=\"gap-1.5\" onClick={() => setFocused(jump)}>\n <Icon icon={UiArrowRight} className=\"text-[12px]\" />\n Next empty row\n </Button>\n )}\n {found.types.length > 1 && (\n <Badge tone=\"warning\" variant=\"soft\" size=\"md\">\n returns {found.types.join(\" | \")}\n </Badge>\n )}\n </div>\n\n <Coverage\n results={results}\n rowCount={rows.length}\n focused={focused}\n onFocus={setFocused}\n rowLabel={environment.rowLabel ? nameRow : undefined}\n predicate={environment.predicate}\n />\n </section>\n\n <section className=\"space-y-2 rounded-lg border border-border bg-muted/20 p-2\">\n <div className=\"flex items-center justify-between gap-2\">\n <h4 className=\"text-xs font-semibold\">In scope</h4>\n {rows.length > 0 && (\n <Badge tone=\"neutral\" variant=\"soft\" size=\"md\">\n {nameRow(focused)}\n </Badge>\n )}\n </div>\n {/* The names that are variables rather than data. Only these are\n bare: every row key is reached through the tree below, which\n spells the ones a bare name could not. */}\n <ul className=\"space-y-0.5\">\n {bindings\n .filter((binding) => binding.value === undefined)\n .map((binding) => (\n <li key={binding.name}>\n <button\n type=\"button\"\n className=\"flex w-full items-baseline gap-1.5 rounded px-1 py-0.5 text-left hover:bg-muted\"\n onClick={() => insert(binding.name)}\n >\n <code className=\"shrink-0 font-mono text-[11px] text-primary\">{binding.name}</code>\n <span className=\"min-w-0 flex-1 truncate text-[10px] text-muted-foreground\">\n {binding.detail}\n </span>\n </button>\n </li>\n ))}\n </ul>\n\n {row && (\n // Tree sizes to its parent and has no height of its own, so the\n // box has to bound it or the panel grows with the document.\n <div className=\"flex h-72 min-h-0 flex-col overflow-hidden rounded border border-border bg-background\">\n <Tree<JSONPathNode>\n className=\"min-h-0 flex-1\"\n ariaLabel={environment.rowNoun ? `${environment.rowNoun} values` : \"Row values\"}\n // Expand-all only walks children already loaded, so on a lazy\n // tree it is a button that appears to do nothing. The filter\n // box still appears on its own once the row is wide enough.\n showControls={false}\n roots={tree.roots}\n getKey={(node) => node.key}\n getChildren={tree.getChildren}\n hasMoreChildren={tree.hasMoreChildren}\n loadChildren={tree.loadChildren}\n defaultOpen={(_, depth) => depth < 1}\n selected={picked ?? null}\n onSelect={setPicked}\n // The default walker stringifies every field of a node, and\n // `value` is the payload — a row with an embedded megabyte\n // would be re-serialized on each keystroke.\n getSearchText={(node) => `${node.key} ${node.summary}`}\n renderRow={({ node }) => (\n <span className=\"flex min-w-0 items-baseline gap-1.5\" title={node.path}>\n <code className=\"shrink-0 font-mono text-[11px] text-primary\">\n {node.path === \"$\" ? environment.rowName || nameRow(focused) : lastSegment(node.path)}\n </code>\n <span className=\"min-w-0 flex-1 truncate text-[10px] text-muted-foreground\">\n {node.summary}\n </span>\n </span>\n )}\n />\n </div>\n )}\n {unreachable.length > 0 && (\n <p className=\"border-t border-border/60 pt-1 text-[10px] text-muted-foreground\">\n Reachable only through <code className=\"font-mono\">{environment.rowName}</code>, not as a bare\n name:{\" \"}\n {unreachable.map((key) => (\n <code key={key} className=\"font-mono\">\n {key}{\" \"}\n </code>\n ))}\n </p>\n )}\n </section>\n </div>\n\n <footer className=\"flex flex-wrap items-center gap-2 border-t border-border pt-2\">\n <Button\n size=\"sm\"\n className=\"gap-1.5\"\n onClick={() => {\n onChange(draft);\n onClose();\n }}\n >\n <Icon icon={UiCheck} className=\"text-[12px]\" />\n Apply\n </Button>\n <Button size=\"sm\" variant=\"ghost\" onClick={onClose}>\n Cancel\n </Button>\n {!isClean(found) && results.length > 0 && (\n <span className=\"text-[11px] text-muted-foreground\">\n {found.empty + found.failed} of {countOf(results.length, noun)} produce nothing — applying anyway is a\n choice, not a mistake, but it should be one you make on purpose.\n </span>\n )}\n </footer>\n </div>\n );\n}\n\n/** The trailing key or index of a path, which is what a tree row is named by. */\nfunction lastSegment(path: string): string {\n const match = /\\.([^.[\\]]+)$|\\[([^[\\]]+)\\]$/.exec(path);\n return match?.[1] ?? match?.[2]?.replace(/^\"|\"$/g, \"\") ?? path;\n}\n\n/**\n * The button that opens the editor for an expression already on screen.\n *\n * Separate from the input it sits beside, because the two surfaces that own a\n * CEL string disagree about the input: a schema-rendered field is one line, and\n * the column editor gives it a textarea. What they agree on is that testing it\n * is a click away from wherever it is typed.\n */\nexport function CelTestButton({\n value,\n scope,\n rows,\n title,\n disabled,\n onChange,\n}: {\n value: string;\n scope: CelScope | CelEnvironment;\n rows: unknown[];\n title: string;\n disabled?: boolean;\n onChange: (next: string) => void;\n}) {\n const [open, setOpen] = useState(false);\n return (\n <>\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"shrink-0 gap-1\"\n onClick={() => setOpen(true)}\n {...(disabled === undefined ? {} : { disabled })}\n >\n <Icon icon={UiCode2} className=\"text-[12px]\" />\n Test\n </Button>\n {open && (\n <CelEditorDialog\n value={value}\n scope={scope}\n rows={rows.filter(isRecord)}\n title={title}\n onChange={onChange}\n onClose={() => setOpen(false)}\n />\n )}\n </>\n );\n}\n\n/** The schema-rendered field: the current expression, with the editor a click away. */\nexport function CelField({ field, ctx }: { field: FieldControl; ctx?: PostExtensionContext }) {\n const rows = useJsonPathSample(ctx?.rootValue);\n const value = (field.value as string) ?? \"\";\n\n return (\n <div className=\"flex items-center gap-1.5\">\n <input\n className=\"w-full rounded border border-border bg-card px-2 py-1 font-mono text-xs\"\n value={value}\n onChange={(event) => field.onChange(event.target.value)}\n aria-label=\"CEL expression\"\n {...(field.readOnly === undefined ? {} : { disabled: field.readOnly })}\n />\n <CelTestButton\n value={value}\n scope={scopeOf(field.schema)}\n rows={rows}\n title={String(field.schema.title ?? \"CEL\")}\n disabled={field.readOnly === true}\n onChange={(next) => field.onChange(next)}\n />\n </div>\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAS,QAAQ,QAA2C;CAC1D,MAAM,WAAW,OAAO;CACxB,OAAO,aAAa,WAAW,aAAa,aAAa,WAAW;AACtE;;;;;;;;;;;AAYA,SAAgB,gBAAgB,OAAuB;CACrD,OACE,oBAAC,OAAD;EAAO,MAAA;EAAK,SAAS,MAAM;EAAS,OAAO,gBAAgB,MAAM;EAAS,MAAK;EAC7E,UAAA,oBAAC,gBAAD,EAAgB,GAAI,MAAQ,CAAA;CACvB,CAAA;AAEX;;AAaA,SAAS,QAAQ,OAAe,MAAsB;CACpD,OAAO,GAAG,MAAM,GAAG,OAAO,UAAU,IAAI,KAAK;AAC/C;;;;;;;AAQA,SAAgB,eAAe,EAAE,OAAO,OAAO,MAAM,UAAU,WAA2B;CACxF,MAAM,cAAc,cACX,OAAO,UAAU,WAAW,sBAAsB,KAAK,IAAI,OAClE,CAAC,KAAK,CACR;CACA,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CACxC,MAAM,CAAC,SAAS,cA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cAAW;GACX,GAAK,MAAM,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,UAAU,MAAM,SAAS;EACrE,CAAA,GACD,oBAAC,eAAD;GACS;GACP,OAAO,QAAQ,MAAM,MAAM;GACrB;GACN,OAAO,OAAO,MAAM,OAAO,SAAS,KAAK;GACzC,UAAU,MAAM,aAAa;GAC7B,WAAW,SAAS,MAAM,SAAS,IAAI;EACxC,CAAA,CACE;;AAET;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,QAAQ,KAAK,KAAK,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
|
|
1
|
+
{"version":3,"file":"celEditor.js","names":["_Fragment"],"sources":["../../../src/profiles/cel/celEditor.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { Badge } from \"../../data/Badge\";\nimport { Button } from \"../../components/button\";\nimport { Icon } from \"../../data/Icon\";\nimport { Modal } from \"../../overlay/Modal\";\nimport type {\n FieldControl,\n PostExtensionContext,\n} from \"../../components/json-schema-form-types\";\nimport { initialInput, rowSamples } from \"../../expressions/playground/hostEvaluation\";\nimport { LazyEmbeddedPlayground } from \"../../expressions/playground/LazyEmbeddedPlayground\";\nimport { UiCheck, UiCode2 } from \"../../icons\";\nimport { useJsonPathSample } from \"../query/jsonPathSample\";\nimport {\n celPlaygroundEvaluator,\n celPlaygroundExamples,\n celPlaygroundExpectation,\n celPlaygroundFormatPath,\n celScopeBindings,\n} from \"./celPlayground\";\nimport { profileCelEnvironment, type CelEnvironment, type CelScope } from \"./celExpression\";\n\nfunction scopeOf(schema: Record<string, unknown>): CelScope {\n const declared = schema[\"x-clicky-cel-scope\"];\n return declared === \"batch\" || declared === \"boundary\" ? declared : \"row\";\n}\n\ntype CelEditorProps = {\n value: string;\n /** A profile scope, or the host's own environment for CEL that is not a profile's. */\n scope: CelScope | CelEnvironment;\n rows: Record<string, unknown>[];\n title: string;\n onChange: (next: string) => void;\n onClose: () => void;\n};\n\n/**\n * The expression editor: the full expression playground, run on the engine that\n * runs the column.\n *\n * Its subject is still coverage, not syntax. An expression is written against\n * the rows on screen and the rows it reads nothing from are the ones the author\n * has not looked at — and because this engine folds a missing field into null\n * instead of throwing, a wrong expression comes back clean. So every sampled row\n * is a playground sample: \"All samples\" runs the expression against each and\n * walks the ones that produce nothing. The playground's own editors, object\n * graph and function catalogue are what the input already had.\n */\nexport function CelEditorDialog({ value, scope, rows, title, onChange, onClose }: CelEditorProps) {\n const environment = useMemo(\n () => (typeof scope === \"string\" ? profileCelEnvironment(scope) : scope),\n [scope],\n );\n const [draft, setDraft] = useState(value);\n const samples = useMemo(() => rowSamples(rows, environment.rowLabel), [rows, environment]);\n const input = initialInput(samples);\n const evaluate = useMemo(() => celPlaygroundEvaluator(environment), [environment]);\n const formatPath = useMemo(() => celPlaygroundFormatPath(environment), [environment]);\n const expectation = useMemo(() => celPlaygroundExpectation(environment), [environment]);\n const examples = useMemo(\n () => celPlaygroundExamples(environment, rows, input),\n [environment, rows, input],\n );\n\n return (\n <Modal\n open\n onClose={onClose}\n title={`Expression — ${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\n className=\"gap-1.5\"\n onClick={() => {\n onChange(draft);\n onClose();\n }}\n >\n <Icon icon={UiCheck} className=\"text-[12px]\" />\n Apply\n </Button>\n </div>\n }\n >\n <div className=\"flex h-full min-h-0 flex-col gap-2\">\n <ScopeLine environment={environment} rows={rows} />\n <div className=\"min-h-0 flex-1 overflow-hidden rounded-md border border-border\">\n <LazyEmbeddedPlayground\n language=\"cel\"\n source={value}\n input={input}\n onSourceChange={setDraft}\n evaluate={evaluate}\n samples={samples}\n examples={examples}\n expectation={expectation}\n formatPath={formatPath}\n />\n </div>\n </div>\n </Modal>\n );\n}\n\n/** \"3 users\", \"1 user\" — the header's count, in the environment's own noun. */\nfunction countOf(count: number, noun: string): string {\n return `${count} ${noun}${count === 1 ? \"\" : \"s\"}`;\n}\n\n/**\n * What the playground cannot know: which scope this is, how many rows back it,\n * and the variables other than the row that the expression may name.\n */\nfunction ScopeLine({ environment, rows }: { environment: CelEnvironment; rows: Record<string, unknown>[] }) {\n const noun = environment.rowNoun ?? \"sampled row\";\n const bindings = celScopeBindings(environment, rows[0]);\n return (\n <div className=\"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs\">\n <Badge tone=\"info\" variant=\"soft\" size=\"md\">\n {environment.label}\n </Badge>\n <span className=\"text-muted-foreground\">\n {rows.length > 0\n ? countOf(rows.length, noun)\n : environment.rowNoun\n ? `no ${noun}s — the input starts as {}`\n : \"nothing sampled yet — the input starts as {}\"}\n </span>\n {bindings.map((binding) => (\n <span key={binding.name} className=\"flex items-baseline gap-1\" title={binding.detail}>\n <code className=\"font-mono text-[11px] text-primary\">{binding.name}</code>\n <span className=\"text-muted-foreground\">{binding.detail}</span>\n </span>\n ))}\n </div>\n );\n}\n\n/**\n * The button that opens the editor for an expression already on screen.\n *\n * Separate from the input it sits beside, because the two surfaces that own a\n * CEL string disagree about the input: a schema-rendered field is one line, and\n * the column editor gives it a textarea. What they agree on is that testing it\n * is a click away from wherever it is typed.\n */\nexport function CelTestButton({\n value,\n scope,\n rows,\n title,\n disabled,\n onChange,\n}: {\n value: string;\n scope: CelScope | CelEnvironment;\n rows: unknown[];\n title: string;\n disabled?: boolean;\n onChange: (next: string) => void;\n}) {\n const [open, setOpen] = useState(false);\n const records = useMemo(() => rows.filter(isRecord), [rows]);\n return (\n <>\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"shrink-0 gap-1\"\n onClick={() => setOpen(true)}\n {...(disabled === undefined ? {} : { disabled })}\n >\n <Icon icon={UiCode2} className=\"text-[12px]\" />\n Test\n </Button>\n {open && (\n <CelEditorDialog\n value={value}\n scope={scope}\n rows={records}\n title={title}\n onChange={onChange}\n onClose={() => setOpen(false)}\n />\n )}\n </>\n );\n}\n\n/** The schema-rendered field: the current expression, with the editor a click away. */\nexport function CelField({ field, ctx }: { field: FieldControl; ctx?: PostExtensionContext }) {\n const rows = useJsonPathSample(ctx?.rootValue);\n const value = (field.value as string) ?? \"\";\n\n return (\n <div className=\"flex items-center gap-1.5\">\n <input\n className=\"w-full rounded border border-border bg-card px-2 py-1 font-mono text-xs\"\n value={value}\n onChange={(event) => field.onChange(event.target.value)}\n aria-label=\"CEL expression\"\n {...(field.readOnly === undefined ? {} : { disabled: field.readOnly })}\n />\n <CelTestButton\n value={value}\n scope={scopeOf(field.schema)}\n rows={rows}\n title={String(field.schema.title ?? \"CEL\")}\n disabled={field.readOnly === true}\n onChange={(next) => field.onChange(next)}\n />\n </div>\n );\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === \"object\" && !Array.isArray(value);\n}\n"],"mappings":";;;;;;;;;;;;;;AAsBA,SAAS,QAAQ,QAA2C;CAC1D,MAAM,WAAW,OAAO;CACxB,OAAO,aAAa,WAAW,aAAa,aAAa,WAAW;AACtE;;;;;;;;;;;;;AAwBA,SAAgB,gBAAgB,EAAE,OAAO,OAAO,MAAM,OAAO,UAAU,WAA2B;CAChG,MAAM,cAAc,cACX,OAAO,UAAU,WAAW,sBAAsB,KAAK,IAAI,OAClE,CAAC,KAAK,CACR;CACA,MAAM,CAAC,OAAO,YAAY,SAAS,KAAK;CACxC,MAAM,UAAU,cAAc,WAAW,MAAM,YAAY,QAAQ,GAAG,CAAC,MAAM,WAAW,CAAC;CACzF,MAAM,QAAQ,aAAa,OAAO;CAClC,MAAM,WAAW,cAAc,uBAAuB,WAAW,GAAG,CAAC,WAAW,CAAC;CACjF,MAAM,aAAa,cAAc,wBAAwB,WAAW,GAAG,CAAC,WAAW,CAAC;CACpF,MAAM,cAAc,cAAc,yBAAyB,WAAW,GAAG,CAAC,WAAW,CAAC;CACtF,MAAM,WAAW,cACT,sBAAsB,aAAa,MAAM,KAAK,GACpD;EAAC;EAAa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ET;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,QAAQ,KAAK,KAAK,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E"}
|
|
@@ -30,57 +30,6 @@ function evaluateCel(request) {
|
|
|
30
30
|
body: JSON.stringify(request)
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* What an expression did across the whole sample.
|
|
35
|
-
*
|
|
36
|
-
* `empty` is deliberately not folded into `ok`. An out-of-range index or a
|
|
37
|
-
* missing field does not throw in this engine — it reads as null — so the
|
|
38
|
-
* expression that is wrong about most of the data still returns cleanly, and
|
|
39
|
-
* counting those rows as successes is exactly the mistake this view exists to
|
|
40
|
-
* prevent.
|
|
41
|
-
*/
|
|
42
|
-
function coverage(results) {
|
|
43
|
-
const types = /* @__PURE__ */ new Set();
|
|
44
|
-
const barren = [];
|
|
45
|
-
let ok = 0;
|
|
46
|
-
let empty = 0;
|
|
47
|
-
let failed = 0;
|
|
48
|
-
for (const result of results) {
|
|
49
|
-
if (result.error) {
|
|
50
|
-
failed += 1;
|
|
51
|
-
barren.push(result.index);
|
|
52
|
-
continue;
|
|
53
|
-
}
|
|
54
|
-
if (result.value === null || result.value === void 0) {
|
|
55
|
-
empty += 1;
|
|
56
|
-
barren.push(result.index);
|
|
57
|
-
continue;
|
|
58
|
-
}
|
|
59
|
-
ok += 1;
|
|
60
|
-
if (result.type) types.add(result.type);
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
ok,
|
|
64
|
-
empty,
|
|
65
|
-
failed,
|
|
66
|
-
barren,
|
|
67
|
-
types: [...types].sort()
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* The next row worth looking at after `from`, wrapping.
|
|
72
|
-
*
|
|
73
|
-
* An author works from the rows on screen and the rows an expression reads
|
|
74
|
-
* nothing from are, by definition, ones they have not looked at — so the editor
|
|
75
|
-
* has to be able to go and find them.
|
|
76
|
-
*/
|
|
77
|
-
function nextBarren(coverageResult, from) {
|
|
78
|
-
return coverageResult.barren.find((index) => index > from) ?? coverageResult.barren[0];
|
|
79
|
-
}
|
|
80
|
-
/** True when the expression is safe to apply: every sampled row evaluated. */
|
|
81
|
-
function isClean(coverageResult) {
|
|
82
|
-
return coverageResult.failed === 0 && coverageResult.empty === 0;
|
|
83
|
-
}
|
|
84
33
|
/** `^[A-Za-z_][A-Za-z0-9_]*$` — the rule the engine flattens a row key by. */
|
|
85
34
|
function isIdentifier(key) {
|
|
86
35
|
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);
|
|
@@ -146,10 +95,6 @@ function bindingsFor(scope, row) {
|
|
|
146
95
|
}));
|
|
147
96
|
return [...fixed, ...flattened];
|
|
148
97
|
}
|
|
149
|
-
/** Row keys that exist but cannot be named directly. */
|
|
150
|
-
function unreachableKeys(row) {
|
|
151
|
-
return Object.keys(row ?? {}).filter((key) => !isIdentifier(key));
|
|
152
|
-
}
|
|
153
98
|
var SCOPE_LABEL = {
|
|
154
99
|
row: "Row",
|
|
155
100
|
batch: "Batch",
|
|
@@ -166,8 +111,7 @@ function profileCelEnvironment(scope) {
|
|
|
166
111
|
cel,
|
|
167
112
|
scope,
|
|
168
113
|
rows
|
|
169
|
-
})
|
|
170
|
-
...scope === "row" ? {} : { unreachable: unreachableKeys }
|
|
114
|
+
})
|
|
171
115
|
};
|
|
172
116
|
}
|
|
173
117
|
/** How much of an error is worth showing before it buries the dialog. */
|
|
@@ -218,13 +162,9 @@ function explainCelError(error, draft) {
|
|
|
218
162
|
}
|
|
219
163
|
exports.CEL_EDITOR_WIDGET = CEL_EDITOR_WIDGET;
|
|
220
164
|
exports.bindingsFor = bindingsFor;
|
|
221
|
-
exports.coverage = coverage;
|
|
222
165
|
exports.evaluateCel = evaluateCel;
|
|
223
166
|
exports.explainCelError = explainCelError;
|
|
224
|
-
exports.isClean = isClean;
|
|
225
167
|
exports.isIdentifier = isIdentifier;
|
|
226
|
-
exports.nextBarren = nextBarren;
|
|
227
168
|
exports.profileCelEnvironment = profileCelEnvironment;
|
|
228
|
-
exports.unreachableKeys = unreachableKeys;
|
|
229
169
|
|
|
230
170
|
//# sourceMappingURL=celExpression.cjs.map
|