@flanksource/clicky-ui 0.3.78 → 0.3.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.js +6 -6
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/api.cjs.map +1 -1
- package/dist/expressions/playground/api.d.ts +10 -0
- package/dist/expressions/playground/api.d.ts.map +1 -1
- package/dist/expressions/playground/api.js.map +1 -1
- package/dist/expressions/playground/hostEvaluation.cjs +67 -0
- package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
- package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
- package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
- package/dist/expressions/playground/hostEvaluation.js +63 -0
- package/dist/expressions/playground/hostEvaluation.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.js +8 -3
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.js +6 -2
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
- package/dist/expressions/playground.d.ts +1 -1
- package/dist/expressions/playground.d.ts.map +1 -1
- package/dist/hooks/use-element-height.cjs +26 -0
- package/dist/hooks/use-element-height.cjs.map +1 -0
- package/dist/hooks/use-element-height.d.ts +10 -0
- package/dist/hooks/use-element-height.d.ts.map +1 -0
- package/dist/hooks/use-element-height.js +26 -0
- package/dist/hooks/use-element-height.js.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.js +7 -7
- package/dist/jvm/classes/PatchedClassList.cjs +11 -2
- package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
- package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
- package/dist/jvm/classes/PatchedClassList.js +11 -2
- package/dist/jvm/classes/PatchedClassList.js.map +1 -1
- package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
- package/dist/jvm/model/patches.cjs +4 -2
- package/dist/jvm/model/patches.cjs.map +1 -1
- package/dist/jvm/model/patches.d.ts +3 -1
- package/dist/jvm/model/patches.d.ts.map +1 -1
- package/dist/jvm/model/patches.js +4 -2
- package/dist/jvm/model/patches.js.map +1 -1
- package/dist/jvm/protocol/client.d.ts +7 -2
- package/dist/jvm/protocol/client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.cjs +30 -11
- package/dist/jvm/protocol/operation-client.cjs.map +1 -1
- package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.js +30 -11
- package/dist/jvm/protocol/operation-client.js.map +1 -1
- package/dist/jvm/protocol/query-keys.cjs +1 -1
- package/dist/jvm/protocol/query-keys.cjs.map +1 -1
- package/dist/jvm/protocol/query-keys.d.ts +1 -1
- package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
- package/dist/jvm/protocol/query-keys.js +1 -1
- package/dist/jvm/protocol/query-keys.js.map +1 -1
- package/dist/jvm/protocol/status.cjs +38 -0
- package/dist/jvm/protocol/status.cjs.map +1 -0
- package/dist/jvm/protocol/status.d.ts +13 -0
- package/dist/jvm/protocol/status.d.ts.map +1 -0
- package/dist/jvm/protocol/status.js +38 -0
- package/dist/jvm/protocol/status.js.map +1 -0
- package/dist/jvm/protocol/types.d.ts +16 -4
- package/dist/jvm/protocol/types.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.cjs +7 -1
- package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
- package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.js +7 -1
- package/dist/jvm/runtime/GcSummary.js.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
- package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.js +12 -11
- package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
- package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.js +4 -9
- package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
- package/dist/jvm/surfaces/jvm-context.cjs +23 -4
- package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
- package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
- package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
- package/dist/jvm/surfaces/jvm-context.js +23 -5
- package/dist/jvm/surfaces/jvm-context.js.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
- package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.js +2 -2
- package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
- package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.js +3 -2
- package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
- package/dist/jvm/threads/ThreadDetail.cjs +6 -2
- package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
- package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
- package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
- package/dist/jvm/threads/ThreadDetail.js +6 -2
- package/dist/jvm/threads/ThreadDetail.js.map +1 -1
- package/dist/jvm.cjs +3 -0
- package/dist/jvm.d.ts +2 -1
- package/dist/jvm.d.ts.map +1 -1
- package/dist/jvm.js +3 -2
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +16 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +21 -2
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.js +21 -2
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/Workspace.cjs +66 -21
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +6 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +66 -21
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.model.cjs +20 -0
- package/dist/layout/Workspace.model.cjs.map +1 -1
- package/dist/layout/Workspace.model.d.ts +17 -0
- package/dist/layout/Workspace.model.d.ts.map +1 -1
- package/dist/layout/Workspace.model.js +20 -1
- package/dist/layout/Workspace.model.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +10 -6
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.d.ts +4 -1
- package/dist/layout/Workspace.regions.d.ts.map +1 -1
- package/dist/layout/Workspace.regions.js +10 -6
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/duration.cjs +20 -0
- package/dist/lib/duration.cjs.map +1 -1
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.d.ts.map +1 -1
- package/dist/lib/duration.js +19 -1
- package/dist/lib/duration.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +34 -30
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +34 -30
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/overlay/ConfirmDialog.cjs +5 -2
- package/dist/overlay/ConfirmDialog.cjs.map +1 -1
- package/dist/overlay/ConfirmDialog.d.ts +14 -2
- package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
- package/dist/overlay/ConfirmDialog.js +5 -2
- package/dist/overlay/ConfirmDialog.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +94 -285
- package/dist/profiles/cel/celEditor.cjs.map +1 -1
- package/dist/profiles/cel/celEditor.d.ts +10 -15
- package/dist/profiles/cel/celEditor.d.ts.map +1 -1
- package/dist/profiles/cel/celEditor.js +97 -287
- package/dist/profiles/cel/celEditor.js.map +1 -1
- package/dist/profiles/cel/celExpression.cjs +1 -61
- package/dist/profiles/cel/celExpression.cjs.map +1 -1
- package/dist/profiles/cel/celExpression.d.ts +2 -38
- package/dist/profiles/cel/celExpression.d.ts.map +1 -1
- package/dist/profiles/cel/celExpression.js +2 -58
- package/dist/profiles/cel/celExpression.js.map +1 -1
- package/dist/profiles/cel/celPlayground.cjs +122 -0
- package/dist/profiles/cel/celPlayground.cjs.map +1 -0
- package/dist/profiles/cel/celPlayground.d.ts +43 -0
- package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
- package/dist/profiles/cel/celPlayground.js +118 -0
- package/dist/profiles/cel/celPlayground.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.js +2 -2
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
- package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
- package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
- package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
- package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
- package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
- package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +106 -37
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +107 -38
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorModel.cjs +65 -19
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorModel.js +64 -18
- package/dist/profiles/editor/profileEditorModel.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +129 -29
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +137 -88
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +138 -90
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +23 -7
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
- package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.js +70 -0
- package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
- package/dist/profiles/editor/samplePaths.cjs +54 -0
- package/dist/profiles/editor/samplePaths.cjs.map +1 -0
- package/dist/profiles/editor/samplePaths.d.ts +27 -0
- package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
- package/dist/profiles/editor/samplePaths.js +53 -0
- package/dist/profiles/editor/samplePaths.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -1
- package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
- package/dist/profiles/fields/profileFieldControls.cjs +3 -2
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldControls.js +3 -2
- package/dist/profiles/fields/profileFieldControls.js.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.js +99 -186
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/fields/profileFieldList.cjs +23 -1
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldList.js +23 -1
- package/dist/profiles/fields/profileFieldList.js.map +1 -1
- package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
- package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.js +110 -0
- package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
- package/dist/profiles/fields/profileFieldSample.cjs +182 -0
- package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
- package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldSample.js +180 -0
- package/dist/profiles/fields/profileFieldSample.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.js +104 -0
- package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.js +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
- package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.js +59 -0
- package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +79 -79
- package/dist/profiles/processor/processorConfig.cjs.map +1 -1
- package/dist/profiles/processor/processorConfig.d.ts +30 -3
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
- package/dist/profiles/processor/processorConfig.js +78 -78
- package/dist/profiles/processor/processorConfig.js.map +1 -1
- package/dist/profiles/processor/processorPipeline.cjs +8 -6
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
- package/dist/profiles/processor/processorPipeline.d.ts +3 -3
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipeline.js +9 -7
- package/dist/profiles/processor/processorPipeline.js.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.js +39 -95
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.js +3 -2
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
- package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +10 -1
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
- package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.js +39 -0
- package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
- package/dist/profiles.cjs +9 -11
- package/dist/profiles.js +8 -8
- package/dist/rpc/EntityExplorerApp.cjs +7 -3
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +16 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +7 -3
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/InlineError.cjs +30 -10
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +10 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +30 -10
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +9 -6
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +9 -6
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/SessionHeader.cjs +3 -3
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +3 -3
- package/dist/rpc/SessionHeader.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +2 -6
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -5
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/surfaceNav.cjs +5 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -1
- package/dist/rpc/surfaceNav.d.ts.map +1 -1
- package/dist/rpc/surfaceNav.js +5 -0
- package/dist/rpc/surfaceNav.js.map +1 -1
- package/dist/runtime/barrels.json +4982 -4979
- package/dist/runtime/importmap.json +2168 -2146
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
- package/dist/profiles/cel/celEditorResults.cjs +0 -158
- package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
- package/dist/profiles/cel/celEditorResults.d.ts +0 -37
- package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
- package/dist/profiles/cel/celEditorResults.js +0 -156
- package/dist/profiles/cel/celEditorResults.js.map +0 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { serverFiltersToFilterBar } from "../../data/data-table-server-filters.js";
|
|
1
2
|
import { OtelTraceTable } from "../../data/traces/otel/OtelTraceTable.js";
|
|
2
3
|
import { profileSpans } from "../../data/traces/otel/profile-spans.js";
|
|
3
4
|
import { profileTraceListing } from "../../data/traces/otel/profile-listing.js";
|
|
4
5
|
import { Clicky } from "../../data/Clicky.js";
|
|
5
6
|
import { profileApiPath } from "../profileApi.js";
|
|
6
|
-
import { useEffect, useRef, useState } from "react";
|
|
7
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
// src/profiles/editor/profileMappingPreview.tsx
|
|
9
|
-
function ProfileMappingPreview({ profile, rows, onNormalized }) {
|
|
10
|
+
function ProfileMappingPreview({ profile, rows, onNormalized, filters }) {
|
|
10
11
|
const normalizedCallback = useRef(onNormalized);
|
|
11
12
|
normalizedCallback.current = onNormalized;
|
|
12
13
|
const [result, setResult] = useState();
|
|
14
|
+
const filtersRef = useRef(filters);
|
|
15
|
+
filtersRef.current = filters;
|
|
16
|
+
const filterConfig = useMemo(() => filters && result?.resultColumns ? serverFiltersToFilterBar(result.resultColumns, filters.selection, filters.onChange, filters.lookupValues ? { lookupValues: filters.lookupValues } : {}) : void 0, [filters, result]);
|
|
17
|
+
const idle = rows.length === 0 && !filters;
|
|
13
18
|
const [error, setError] = useState("");
|
|
14
19
|
const [pending, setPending] = useState(false);
|
|
15
20
|
const [trace, setTrace] = useState();
|
|
@@ -29,7 +34,7 @@ function ProfileMappingPreview({ profile, rows, onNormalized }) {
|
|
|
29
34
|
rows
|
|
30
35
|
});
|
|
31
36
|
useEffect(() => {
|
|
32
|
-
if (
|
|
37
|
+
if (idle) return;
|
|
33
38
|
const controller = new AbortController();
|
|
34
39
|
setPending(true);
|
|
35
40
|
setError("");
|
|
@@ -44,6 +49,8 @@ function ProfileMappingPreview({ profile, rows, onNormalized }) {
|
|
|
44
49
|
});
|
|
45
50
|
if (!response.ok) throw new Error(await response.text());
|
|
46
51
|
const next = await response.json();
|
|
52
|
+
if (!next.document?.node) throw new Error("the mapping response carried no rendered document");
|
|
53
|
+
if (filtersRef.current && !Array.isArray(next.resultColumns)) throw new Error("the mapping response carried no resultColumns to build filters from");
|
|
47
54
|
if (!controller.signal.aborted) {
|
|
48
55
|
setResult(next);
|
|
49
56
|
normalizedCallback.current?.(next.normalizedRows, next.availableColumns);
|
|
@@ -59,17 +66,26 @@ function ProfileMappingPreview({ profile, rows, onNormalized }) {
|
|
|
59
66
|
clearTimeout(timer);
|
|
60
67
|
controller.abort();
|
|
61
68
|
};
|
|
62
|
-
}, [body,
|
|
63
|
-
if (
|
|
69
|
+
}, [body, idle]);
|
|
70
|
+
if (idle) return /* @__PURE__ */ jsx("p", { children: "Run a sample in Query to preview mappings." });
|
|
64
71
|
if (error) return /* @__PURE__ */ jsxs("p", {
|
|
65
72
|
role: "alert",
|
|
66
73
|
children: ["Cannot preview mappings: ", error]
|
|
67
74
|
});
|
|
68
|
-
if (
|
|
75
|
+
if (!result || pending && profile.render === "traces") return /* @__PURE__ */ jsx("p", {
|
|
69
76
|
role: "status",
|
|
70
77
|
children: "Updating mapping preview…"
|
|
71
78
|
});
|
|
72
|
-
if (profile.render !== "traces") return /* @__PURE__ */ jsx(
|
|
79
|
+
if (profile.render !== "traces") return /* @__PURE__ */ jsx("div", {
|
|
80
|
+
"aria-busy": pending,
|
|
81
|
+
className: "flex h-full min-h-0 flex-col",
|
|
82
|
+
children: /* @__PURE__ */ jsx(Clicky, {
|
|
83
|
+
data: result.document.node,
|
|
84
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
85
|
+
...filterConfig?.filters.length ? { externalFilters: filterConfig.filters } : {},
|
|
86
|
+
...filterConfig?.timeRange ? { timeRange: filterConfig.timeRange } : {}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
73
89
|
try {
|
|
74
90
|
return /* @__PURE__ */ jsx(OtelTraceTable, {
|
|
75
91
|
spans: profileSpans(result.rows),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileMappingPreview.js","names":[],"sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"sourcesContent":["import { useEffect, useState, useRef } from \"react\";\nimport type { ProfileColumn } from \"../wizard/profileWizardModel\";\nimport { OtelTraceTable } from \"../../data/traces/otel/OtelTraceTable\";\nimport { profileSpans } from \"../../data/traces/otel/profile-spans\";\nimport { profileTraceListing } from \"../../data/traces/otel/profile-listing\";\nimport { Clicky, type ClickyNode } from \"../../data/Clicky\";\nimport { profileApiPath } from \"../profileApi\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\nexport function ProfileMappingPreview({\n profile,\n rows,\n onNormalized,\n}: {\n profile: ProfileWizardDraft;\n rows: Record<string, unknown>[];\n onNormalized?: (rows: Record<string, unknown>[], columns: ProfileColumn[]) => void;\n}) {\n const normalizedCallback = useRef(onNormalized);\n normalizedCallback.current = onNormalized;\n const [result, setResult] = useState<{\n rows: Record<string, unknown>[];\n document: { node: ClickyNode };\n }>();\n const [error, setError] = useState(\"\");\n const [pending, setPending] = useState(false);\n const [trace, setTrace] = useState<string>();\n const [span, setSpan] = useState<string>();\n const body = JSON.stringify({\n profile: {\n profile: profile.profile,\n provider: profile.provider,\n spans: profile.spans,\n search:profile.search,\n render: profile.render,\n columns: profile.columns,\n aliases: profile.aliases,\n ignore: profile.ignore,\n filters: profile.filters,\n },\n rows,\n });\n useEffect(() => {\n if (
|
|
1
|
+
{"version":3,"file":"profileMappingPreview.js","names":[],"sources":["../../../src/profiles/editor/profileMappingPreview.tsx"],"sourcesContent":["import { useEffect, useMemo, useState, useRef, type Dispatch, type SetStateAction } from \"react\";\nimport type { ProfileColumn } from \"../wizard/profileWizardModel\";\nimport type { DataTableFilterSelection } from \"../../data/data-table-filter-values\";\nimport {\n serverFiltersToFilterBar,\n type DataTableFilterLookup,\n type DataTableServerColumn,\n} from \"../../data/data-table-server-filters\";\nimport { OtelTraceTable } from \"../../data/traces/otel/OtelTraceTable\";\nimport { profileSpans } from \"../../data/traces/otel/profile-spans\";\nimport { profileTraceListing } from \"../../data/traces/otel/profile-listing\";\nimport { Clicky, type ClickyNode } from \"../../data/Clicky\";\nimport { profileApiPath } from \"../profileApi\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * The filters a table preview offers. The controls are the ones the service\n * describes for the draft's columns (the result columns of the mapping\n * response), built by the same serverFiltersToFilterBar the profile query\n * results use; applying one is the caller's to do, server-side, by sampling\n * again — the table never filters the rows it was given.\n */\nexport type ProfileMappingFilters = {\n selection: DataTableFilterSelection;\n onChange: Dispatch<SetStateAction<DataTableFilterSelection>>;\n lookupValues?: DataTableFilterLookup;\n};\n\nexport function ProfileMappingPreview({\n profile,\n rows,\n onNormalized,\n filters,\n}: {\n profile: ProfileWizardDraft;\n rows: Record<string, unknown>[];\n onNormalized?: (rows: Record<string, unknown>[], columns: ProfileColumn[]) => void;\n filters?: ProfileMappingFilters;\n}) {\n const normalizedCallback = useRef(onNormalized);\n normalizedCallback.current = onNormalized;\n const [result, setResult] = useState<{\n rows: Record<string, unknown>[];\n resultColumns?: DataTableServerColumn[];\n document: { node: ClickyNode };\n }>();\n const filtersRef = useRef(filters);\n filtersRef.current = filters;\n const filterConfig = useMemo(\n () =>\n filters && result?.resultColumns\n ? serverFiltersToFilterBar(\n result.resultColumns,\n filters.selection,\n filters.onChange,\n filters.lookupValues ? { lookupValues: filters.lookupValues } : {},\n )\n : undefined,\n [filters, result],\n );\n // A filtered sample may legitimately be empty, and its filter bar is how the\n // filter is cleared, so a preview that offers filters renders zero rows too.\n const idle = rows.length === 0 && !filters;\n const [error, setError] = useState(\"\");\n const [pending, setPending] = useState(false);\n const [trace, setTrace] = useState<string>();\n const [span, setSpan] = useState<string>();\n const body = JSON.stringify({\n profile: {\n profile: profile.profile,\n provider: profile.provider,\n spans: profile.spans,\n search:profile.search,\n render: profile.render,\n columns: profile.columns,\n aliases: profile.aliases,\n ignore: profile.ignore,\n filters: profile.filters,\n },\n rows,\n });\n useEffect(() => {\n if (idle) return;\n const controller = new AbortController();\n setPending(true);\n setError(\"\");\n const timer = setTimeout(() => {\n void (async () => {\n try {\n const response = await fetch(\n profileApiPath(\"profile/sample/mapping\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body,\n signal: controller.signal,\n },\n );\n if (!response.ok) throw new Error(await response.text());\n const next = (await response.json()) as {\n normalizedRows: Record<string, unknown>[];\n availableColumns: ProfileColumn[];\n rows: Record<string, unknown>[];\n resultColumns?: DataTableServerColumn[];\n document: { node: ClickyNode };\n };\n if (!next.document?.node)\n throw new Error(\"the mapping response carried no rendered document\");\n if (filtersRef.current && !Array.isArray(next.resultColumns))\n throw new Error(\"the mapping response carried no resultColumns to build filters from\");\n if (!controller.signal.aborted) {\n setResult(next);\n normalizedCallback.current?.(next.normalizedRows, next.availableColumns);\n }\n } catch (error) {\n if (!controller.signal.aborted)\n setError(error instanceof Error ? error.message : String(error));\n } finally {\n if (!controller.signal.aborted) setPending(false);\n }\n })();\n }, 250);\n return () => {\n clearTimeout(timer);\n controller.abort();\n };\n }, [body, idle]);\n if (idle) return <p>Run a sample in Query to preview mappings.</p>;\n if (error) return <p role=\"alert\">Cannot preview mappings: {error}</p>;\n // A table keeps showing the last rendering while an edit is remapped, so the\n // preview updates in place instead of blinking to a status line per keystroke.\n if (!result || (pending && profile.render === \"traces\"))\n return <p role=\"status\">Updating mapping preview…</p>;\n if (profile.render !== \"traces\")\n return (\n <div aria-busy={pending} className=\"flex h-full min-h-0 flex-col\">\n <Clicky\n data={result.document.node}\n className=\"flex min-h-0 flex-1 flex-col\"\n {...(filterConfig?.filters.length ? { externalFilters: filterConfig.filters } : {})}\n {...(filterConfig?.timeRange ? { timeRange: filterConfig.timeRange } : {})}\n />\n </div>\n );\n try {\n return (\n <OtelTraceTable\n spans={profileSpans(result.rows)}\n listing={{\n ...profileTraceListing(result.rows, result.document.node),\n linkRows: false,\n }}\n onSelectTrace={(id) => {\n setTrace(id);\n setSpan(undefined);\n }}\n onSelectSpan={setSpan}\n traceHref={(id) => `#trace=${encodeURIComponent(id)}`}\n {...(trace ? { selectedTraceId: trace } : {})}\n {...(span ? { selectedSpanId: span } : {})}\n />\n );\n } catch (error) {\n return (\n <p role=\"alert\">\n Cannot preview traces:{\" \"}\n {error instanceof Error ? error.message : String(error)}\n </p>\n );\n }\n}\n"],"mappings":";;;;;;;;;AA4BA,SAAgB,sBAAsB,EACpC,SACA,MACA,cACA,WAMC;CACD,MAAM,qBAAqB,OAAO,YAAY;CAC9C,mB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;GAClD,GAAK,QAAQ,EAAE,iBAAiB,MAAM,IAAI,CAAC;GAC3C,GAAK,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;EACzC,CAAA;CAEL,SAAS,OAAO;EACd,OACE,qBAAC,KAAD;GAAG,MAAK;GAAR,UAAA;IAAgB;IACS;IACtB,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;GACrD;;CAEP;AACF"}
|
|
@@ -12,25 +12,29 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
*/
|
|
13
13
|
function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
14
14
|
const [name, setName] = (0, react.useState)(`${draft.profile ?? "profile"}-copy`);
|
|
15
|
+
const [createdName, setCreatedName] = (0, react.useState)(null);
|
|
15
16
|
const [saving, setSaving] = (0, react.useState)(false);
|
|
16
17
|
const [error, setError] = (0, react.useState)("");
|
|
17
18
|
const trimmed = name.trim();
|
|
18
19
|
const save = async () => {
|
|
19
|
-
if (!client.submitForm) {
|
|
20
|
-
setError("Profile creation is unavailable");
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
20
|
setSaving(true);
|
|
24
21
|
setError("");
|
|
22
|
+
let savedName = createdName;
|
|
25
23
|
try {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
if (savedName === null) {
|
|
25
|
+
if (!client.submitForm) throw new Error("Profile creation is unavailable");
|
|
26
|
+
const response = await client.submitForm(action.path, action.method, {
|
|
27
|
+
...draft,
|
|
28
|
+
profile: trimmed
|
|
29
|
+
});
|
|
30
|
+
if (!response.success) throw new Error(response.error || response.message || "Profile creation failed");
|
|
31
|
+
savedName = trimmed;
|
|
32
|
+
setCreatedName(savedName);
|
|
33
|
+
}
|
|
34
|
+
await onSaved(savedName);
|
|
32
35
|
} catch (saveError) {
|
|
33
|
-
|
|
36
|
+
const detail = saveError instanceof Error ? saveError.message : void 0;
|
|
37
|
+
setError(savedName === null ? detail ?? "Profile creation failed" : `Profile "${savedName}" was created. ${detail ?? "Could not complete the action."}`);
|
|
34
38
|
} finally {
|
|
35
39
|
setSaving(false);
|
|
36
40
|
}
|
|
@@ -38,6 +42,8 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
38
42
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Modal.Modal, {
|
|
39
43
|
open: true,
|
|
40
44
|
onClose: onCancel,
|
|
45
|
+
closeOnEsc: !saving,
|
|
46
|
+
hideClose: saving,
|
|
41
47
|
title: "Save as a new profile",
|
|
42
48
|
size: "sm",
|
|
43
49
|
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -45,13 +51,14 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
45
51
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
46
52
|
type: "button",
|
|
47
53
|
variant: "ghost",
|
|
54
|
+
disabled: saving,
|
|
48
55
|
onClick: onCancel,
|
|
49
|
-
children: "Cancel"
|
|
56
|
+
children: createdName === null ? "Cancel" : "Close"
|
|
50
57
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_button.Button, {
|
|
51
58
|
type: "button",
|
|
52
59
|
disabled: saving || !trimmed,
|
|
53
60
|
onClick: () => void save(),
|
|
54
|
-
children: saving ? "Saving…" : "Save as new profile"
|
|
61
|
+
children: saving ? "Saving…" : createdName === null ? "Save as new profile" : "Retry"
|
|
55
62
|
})]
|
|
56
63
|
}),
|
|
57
64
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -69,6 +76,7 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
69
76
|
"aria-label": "New profile name",
|
|
70
77
|
value: name,
|
|
71
78
|
onChange: setName,
|
|
79
|
+
disabled: saving || createdName !== null,
|
|
72
80
|
autoFocus: true
|
|
73
81
|
}),
|
|
74
82
|
error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileSaveAsDialog.cjs","names":["useState","Modal","Button","InputField"],"sources":["../../../src/profiles/editor/profileSaveAsDialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Button } from \"../../components/button\";\nimport { InputField } from \"../../components/InputField\";\nimport { Modal } from \"../../overlay/Modal\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * Saves the editor's draft as a new profile through the profiles collection's\n * create operation, leaving the profile being edited as it was. The server\n * refuses a name already in use, and the refusal stays in the dialog so the\n * user can pick another.\n */\nexport function ProfileSaveAsDialog({\n client,\n action,\n draft,\n onCancel,\n onSaved,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n draft: ProfileWizardDraft;\n onCancel: () => void;\n onSaved: (name: string) => void | Promise<void>;\n}) {\n const [name, setName] = useState(`${draft.profile ?? \"profile\"}-copy`);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const trimmed = name.trim();\n\n const save = async () => {\n
|
|
1
|
+
{"version":3,"file":"profileSaveAsDialog.cjs","names":["useState","Modal","Button","InputField"],"sources":["../../../src/profiles/editor/profileSaveAsDialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Button } from \"../../components/button\";\nimport { InputField } from \"../../components/InputField\";\nimport { Modal } from \"../../overlay/Modal\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * Saves the editor's draft as a new profile through the profiles collection's\n * create operation, leaving the profile being edited as it was. The server\n * refuses a name already in use, and the refusal stays in the dialog so the\n * user can pick another.\n */\nexport function ProfileSaveAsDialog({\n client,\n action,\n draft,\n onCancel,\n onSaved,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n draft: ProfileWizardDraft;\n onCancel: () => void;\n onSaved: (name: string) => void | Promise<void>;\n}) {\n const [name, setName] = useState(`${draft.profile ?? \"profile\"}-copy`);\n const [createdName, setCreatedName] = useState<string | null>(null);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const trimmed = name.trim();\n\n const save = async () => {\n setSaving(true);\n setError(\"\");\n let savedName = createdName;\n try {\n if (savedName === null) {\n if (!client.submitForm) throw new Error(\"Profile creation is unavailable\");\n const response = await client.submitForm(action.path, action.method, { ...draft, profile: trimmed });\n if (!response.success) throw new Error(response.error || response.message || \"Profile creation failed\");\n savedName = trimmed;\n setCreatedName(savedName);\n }\n await onSaved(savedName);\n } catch (saveError) {\n const detail = saveError instanceof Error ? saveError.message : undefined;\n setError(savedName === null\n ? detail ?? \"Profile creation failed\"\n : `Profile \"${savedName}\" was created. ${detail ?? \"Could not complete the action.\"}`);\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Modal\n open\n onClose={onCancel}\n closeOnEsc={!saving}\n hideClose={saving}\n title=\"Save as a new profile\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button type=\"button\" variant=\"ghost\" disabled={saving} onClick={onCancel}>\n {createdName === null ? \"Cancel\" : \"Close\"}\n </Button>\n <Button type=\"button\" disabled={saving || !trimmed} onClick={() => void save()}>\n {saving ? \"Saving…\" : createdName === null ? \"Save as new profile\" : \"Retry\"}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n Your changes are saved under the new name. {draft.profile ?? \"This profile\"} stays as it was.\n </p>\n <InputField aria-label=\"New profile name\" value={name} onChange={setName} disabled={saving || createdName !== null} autoFocus />\n {error ? (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {error}\n </p>\n ) : null}\n </div>\n </Modal>\n );\n}\n"],"mappings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C;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD,+
|
|
1
|
+
{"version":3,"file":"profileSaveAsDialog.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/profileSaveAsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,MAAM,EACN,KAAK,EACL,QAAQ,EACR,OAAO,GACR,EAAE;IACD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD,+BA8DA"}
|
|
@@ -12,25 +12,29 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
*/
|
|
13
13
|
function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
14
14
|
const [name, setName] = useState(`${draft.profile ?? "profile"}-copy`);
|
|
15
|
+
const [createdName, setCreatedName] = useState(null);
|
|
15
16
|
const [saving, setSaving] = useState(false);
|
|
16
17
|
const [error, setError] = useState("");
|
|
17
18
|
const trimmed = name.trim();
|
|
18
19
|
const save = async () => {
|
|
19
|
-
if (!client.submitForm) {
|
|
20
|
-
setError("Profile creation is unavailable");
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
20
|
setSaving(true);
|
|
24
21
|
setError("");
|
|
22
|
+
let savedName = createdName;
|
|
25
23
|
try {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
if (savedName === null) {
|
|
25
|
+
if (!client.submitForm) throw new Error("Profile creation is unavailable");
|
|
26
|
+
const response = await client.submitForm(action.path, action.method, {
|
|
27
|
+
...draft,
|
|
28
|
+
profile: trimmed
|
|
29
|
+
});
|
|
30
|
+
if (!response.success) throw new Error(response.error || response.message || "Profile creation failed");
|
|
31
|
+
savedName = trimmed;
|
|
32
|
+
setCreatedName(savedName);
|
|
33
|
+
}
|
|
34
|
+
await onSaved(savedName);
|
|
32
35
|
} catch (saveError) {
|
|
33
|
-
|
|
36
|
+
const detail = saveError instanceof Error ? saveError.message : void 0;
|
|
37
|
+
setError(savedName === null ? detail ?? "Profile creation failed" : `Profile "${savedName}" was created. ${detail ?? "Could not complete the action."}`);
|
|
34
38
|
} finally {
|
|
35
39
|
setSaving(false);
|
|
36
40
|
}
|
|
@@ -38,6 +42,8 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
38
42
|
return /* @__PURE__ */ jsx(Modal, {
|
|
39
43
|
open: true,
|
|
40
44
|
onClose: onCancel,
|
|
45
|
+
closeOnEsc: !saving,
|
|
46
|
+
hideClose: saving,
|
|
41
47
|
title: "Save as a new profile",
|
|
42
48
|
size: "sm",
|
|
43
49
|
footer: /* @__PURE__ */ jsxs("div", {
|
|
@@ -45,13 +51,14 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
45
51
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
46
52
|
type: "button",
|
|
47
53
|
variant: "ghost",
|
|
54
|
+
disabled: saving,
|
|
48
55
|
onClick: onCancel,
|
|
49
|
-
children: "Cancel"
|
|
56
|
+
children: createdName === null ? "Cancel" : "Close"
|
|
50
57
|
}), /* @__PURE__ */ jsx(Button, {
|
|
51
58
|
type: "button",
|
|
52
59
|
disabled: saving || !trimmed,
|
|
53
60
|
onClick: () => void save(),
|
|
54
|
-
children: saving ? "Saving…" : "Save as new profile"
|
|
61
|
+
children: saving ? "Saving…" : createdName === null ? "Save as new profile" : "Retry"
|
|
55
62
|
})]
|
|
56
63
|
}),
|
|
57
64
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -69,6 +76,7 @@ function ProfileSaveAsDialog({ client, action, draft, onCancel, onSaved }) {
|
|
|
69
76
|
"aria-label": "New profile name",
|
|
70
77
|
value: name,
|
|
71
78
|
onChange: setName,
|
|
79
|
+
disabled: saving || createdName !== null,
|
|
72
80
|
autoFocus: true
|
|
73
81
|
}),
|
|
74
82
|
error ? /* @__PURE__ */ jsx("p", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profileSaveAsDialog.js","names":[],"sources":["../../../src/profiles/editor/profileSaveAsDialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Button } from \"../../components/button\";\nimport { InputField } from \"../../components/InputField\";\nimport { Modal } from \"../../overlay/Modal\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * Saves the editor's draft as a new profile through the profiles collection's\n * create operation, leaving the profile being edited as it was. The server\n * refuses a name already in use, and the refusal stays in the dialog so the\n * user can pick another.\n */\nexport function ProfileSaveAsDialog({\n client,\n action,\n draft,\n onCancel,\n onSaved,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n draft: ProfileWizardDraft;\n onCancel: () => void;\n onSaved: (name: string) => void | Promise<void>;\n}) {\n const [name, setName] = useState(`${draft.profile ?? \"profile\"}-copy`);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const trimmed = name.trim();\n\n const save = async () => {\n
|
|
1
|
+
{"version":3,"file":"profileSaveAsDialog.js","names":[],"sources":["../../../src/profiles/editor/profileSaveAsDialog.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { Button } from \"../../components/button\";\nimport { InputField } from \"../../components/InputField\";\nimport { Modal } from \"../../overlay/Modal\";\nimport type { ResolvedOperation } from \"../../rpc/types\";\nimport type { OperationsApiClient } from \"../../rpc/useOperations\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\n\n/**\n * Saves the editor's draft as a new profile through the profiles collection's\n * create operation, leaving the profile being edited as it was. The server\n * refuses a name already in use, and the refusal stays in the dialog so the\n * user can pick another.\n */\nexport function ProfileSaveAsDialog({\n client,\n action,\n draft,\n onCancel,\n onSaved,\n}: {\n client: OperationsApiClient;\n action: ResolvedOperation;\n draft: ProfileWizardDraft;\n onCancel: () => void;\n onSaved: (name: string) => void | Promise<void>;\n}) {\n const [name, setName] = useState(`${draft.profile ?? \"profile\"}-copy`);\n const [createdName, setCreatedName] = useState<string | null>(null);\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState(\"\");\n const trimmed = name.trim();\n\n const save = async () => {\n setSaving(true);\n setError(\"\");\n let savedName = createdName;\n try {\n if (savedName === null) {\n if (!client.submitForm) throw new Error(\"Profile creation is unavailable\");\n const response = await client.submitForm(action.path, action.method, { ...draft, profile: trimmed });\n if (!response.success) throw new Error(response.error || response.message || \"Profile creation failed\");\n savedName = trimmed;\n setCreatedName(savedName);\n }\n await onSaved(savedName);\n } catch (saveError) {\n const detail = saveError instanceof Error ? saveError.message : undefined;\n setError(savedName === null\n ? detail ?? \"Profile creation failed\"\n : `Profile \"${savedName}\" was created. ${detail ?? \"Could not complete the action.\"}`);\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Modal\n open\n onClose={onCancel}\n closeOnEsc={!saving}\n hideClose={saving}\n title=\"Save as a new profile\"\n size=\"sm\"\n footer={\n <div className=\"flex w-full justify-end gap-2\">\n <Button type=\"button\" variant=\"ghost\" disabled={saving} onClick={onCancel}>\n {createdName === null ? \"Cancel\" : \"Close\"}\n </Button>\n <Button type=\"button\" disabled={saving || !trimmed} onClick={() => void save()}>\n {saving ? \"Saving…\" : createdName === null ? \"Save as new profile\" : \"Retry\"}\n </Button>\n </div>\n }\n >\n <div className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n Your changes are saved under the new name. {draft.profile ?? \"This profile\"} stays as it was.\n </p>\n <InputField aria-label=\"New profile name\" value={name} onChange={setName} disabled={saving || createdName !== null} autoFocus />\n {error ? (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {error}\n </p>\n ) : null}\n </div>\n </Modal>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAcA,SAAgB,oBAAoB,EAClC,QACA,QACA,OACA,UACA,WAOC;CACD,MAAM,CAAC,MAAM,WAAW,SAAS,GAAG,MAAM,WAAW,UAAU,MAAM;CACrE,MAAM,CAAC,aAAa,kBAAkB,SAAwB,IAAI;CAClE,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,CAAC,OAAO,YAAY,SAAS,EAAE;CACrC,MAAM,UAAU,KAAK,KAAK;CAE1B,MAAM,OAAO,YAAY;EACvB,UAAU,IAAI;EACd,SAAS,EAAE;EACX,IAAI,YAAY;EAChB,IAAI;GACF,IAAI,cAAc,MAAM;IACtB,IAAI,CAAC,OAAO,YAAY,MAAM,IAAI,MAAM,iCAAiC;IACzE,MAAM,WAAW,MAAM,OAAO,WAAW,OAAO,MAAM,OAAO,QAAQ;KAAE,GAAG;KAAO,SAAS;IAAQ,CAAC;IACnG,IAAI,CAAC,SAAS,SAAS,MAAM,IAAI,MAAM,SAAS,SAAS,SAAS,WAAW,yBAAyB;IACtG,YAAY;IACZ,eAAe,SAAS;GAC1B;GACA,MAAM,QAAQ,SAAS;EACzB,SAAS,WAAW;GAClB,MAAM,SAAS,qBAAqB,QAAQ,UAAU,UAAU,KAAA;GAChE,SAAS,cAAc,OACnB,UAAU,4BACV,YAAY,UAAU,iBAAiB,UAAU,kCAAkC;EACzF,UAAU;GACR,UAAU,KAAK;EACjB;CACF;CAEA,OACE,oBAAC,OAAD;EACE,MAAA;EACA,SAAS;EACT,YAAY,CAAC;EACb,WAAW;EACX,OAAM;EACN,MAAK;EACL,QACE,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,QAAD;IAAQ,MAAK;IAAS,SAAQ;IAAQ,UAAU;IAAQ,SAAS;IAC9D,UAAA,gBAAgB,OAAO,WAAW;GAC7B,CAAA,GACR,oBAAC,QAAD;IAAQ,MAAK;IAAS,UAAU,UAAU,CAAC;IAAS,eAAe,KAAK,KAAK;IAC1E,UAAA,SAAS,YAAY,gBAAgB,OAAO,wBAAwB;GAC/D,CAAA,CACL;;EAGP,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,qBAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAA6C;MACC,MAAM,WAAW;MAAe;KAC3E;;IACH,oBAAC,YAAD;KAAY,cAAW;KAAmB,OAAO;KAAM,UAAU;KAAS,UAAU,UAAU,gBAAgB;KAAM,WAAA;IAAW,CAAA;IAC9H,QACC,oBAAC,KAAD;KAAG,MAAK;KAAQ,WAAU;KACvB,UAAA;IACA,CAAA,IACD;GACD;;CACA,CAAA;AAEX"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const require_samplePaths = require("./samplePaths.cjs");
|
|
2
|
+
const require_UnwrapPreviewList = require("./UnwrapPreviewList.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
// src/profiles/editor/profileSourceExtensions.tsx
|
|
5
|
+
var NO_INDEX_FIELDS_HINT = "Index fields fill in once a connection and index are chosen.";
|
|
6
|
+
/**
|
|
7
|
+
* sourceFieldNames turns every field marked `x-clicky-field-names` — a single
|
|
8
|
+
* name or a list, at any depth — into a picker of the index's mapped fields with
|
|
9
|
+
* their types, merged with the dotted paths the sampled documents carry (a
|
|
10
|
+
* Jaeger `tags` list is not always a mapped leaf). The index's type wins where
|
|
11
|
+
* both know a path. Typed values still commit: a wildcard (`process.*`) or a
|
|
12
|
+
* field neither knows is legitimate. Until the index is known the field stays the
|
|
13
|
+
* plain text control its schema describes, with a hint saying why.
|
|
14
|
+
*/
|
|
15
|
+
function sourceFieldNames({ indexFields, rows }) {
|
|
16
|
+
const byName = /* @__PURE__ */ new Map();
|
|
17
|
+
for (const { path, types } of require_samplePaths.sampleFieldPaths(rows)) byName.set(path, {
|
|
18
|
+
value: path,
|
|
19
|
+
label: path,
|
|
20
|
+
description: `${types.join(", ")} · sampled`
|
|
21
|
+
});
|
|
22
|
+
for (const { name, types } of indexFields) byName.set(name, {
|
|
23
|
+
value: name,
|
|
24
|
+
label: name,
|
|
25
|
+
description: (types ?? []).join(", ")
|
|
26
|
+
});
|
|
27
|
+
const options = [...byName.values()].sort((a, b) => a.value.localeCompare(b.value));
|
|
28
|
+
return (field, ctx) => {
|
|
29
|
+
if (ctx.prop["x-clicky-field-names"] !== true) return field;
|
|
30
|
+
const hint = indexFields.length === 0 ? [field.helper ?? field.description, NO_INDEX_FIELDS_HINT].filter(Boolean).join(" ") : void 0;
|
|
31
|
+
const hinted = hint ? {
|
|
32
|
+
...field,
|
|
33
|
+
helper: hint
|
|
34
|
+
} : field;
|
|
35
|
+
if (options.length === 0) return hinted;
|
|
36
|
+
return field.kind === "array" ? {
|
|
37
|
+
...hinted,
|
|
38
|
+
options,
|
|
39
|
+
allowCustomValue: true
|
|
40
|
+
} : {
|
|
41
|
+
...hinted,
|
|
42
|
+
kind: "enum",
|
|
43
|
+
options,
|
|
44
|
+
allowCustomValue: true
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* unwrapPreviews shows, under a list marked `x-clicky-preview: "unwrap"`, what
|
|
50
|
+
* each rule does to its field: the value as the backend holds it and the value
|
|
51
|
+
* after unwrapping, or the error unwrap raised. Both come from the server (see
|
|
52
|
+
* useUnwrapPreviews); nothing here unwraps.
|
|
53
|
+
*/
|
|
54
|
+
function unwrapPreviews(draft) {
|
|
55
|
+
return (field, nodes) => {
|
|
56
|
+
if (field.schema["x-clicky-preview"] !== "unwrap") return nodes;
|
|
57
|
+
const rules = Array.isArray(field.value) ? field.value : [];
|
|
58
|
+
if (rules.length === 0) return nodes;
|
|
59
|
+
return {
|
|
60
|
+
...nodes,
|
|
61
|
+
value: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [nodes.value, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_UnwrapPreviewList.UnwrapPreviewList, {
|
|
62
|
+
draft,
|
|
63
|
+
rules
|
|
64
|
+
})] })
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
exports.sourceFieldNames = sourceFieldNames;
|
|
69
|
+
exports.unwrapPreviews = unwrapPreviews;
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=profileSourceExtensions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileSourceExtensions.cjs","names":["sampleFieldPaths","_Fragment","UnwrapPreviewList"],"sources":["../../../src/profiles/editor/profileSourceExtensions.tsx"],"sourcesContent":["import type { PostExtension, PreExtension } from \"../../components/json-schema-form-runtime-types\";\nimport type { QueryBrowserCompletionField } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\nimport { sampleFieldPaths } from \"./samplePaths\";\nimport { UnwrapPreviewList } from \"./UnwrapPreviewList\";\nimport type { UnwrapRuleDraft } from \"./useUnwrapPreviews\";\n\ntype Row = Record<string, unknown>;\n\nconst NO_INDEX_FIELDS_HINT = \"Index fields fill in once a connection and index are chosen.\";\n\n/**\n * sourceFieldNames turns every field marked `x-clicky-field-names` — a single\n * name or a list, at any depth — into a picker of the index's mapped fields with\n * their types, merged with the dotted paths the sampled documents carry (a\n * Jaeger `tags` list is not always a mapped leaf). The index's type wins where\n * both know a path. Typed values still commit: a wildcard (`process.*`) or a\n * field neither knows is legitimate. Until the index is known the field stays the\n * plain text control its schema describes, with a hint saying why.\n */\nexport function sourceFieldNames({\n indexFields,\n rows,\n}: {\n indexFields: QueryBrowserCompletionField[];\n rows: Row[];\n}): PreExtension {\n const byName = new Map<string, { value: string; label: string; description: string }>();\n for (const { path, types } of sampleFieldPaths(rows)) {\n byName.set(path, { value: path, label: path, description: `${types.join(\", \")} · sampled` });\n }\n for (const { name, types } of indexFields) {\n byName.set(name, { value: name, label: name, description: (types ?? []).join(\", \") });\n }\n const options = [...byName.values()].sort((a, b) => a.value.localeCompare(b.value));\n return (field, ctx) => {\n if (ctx.prop[\"x-clicky-field-names\"] !== true) return field;\n const hint = indexFields.length === 0 ? [field.helper ?? field.description, NO_INDEX_FIELDS_HINT].filter(Boolean).join(\" \") : undefined;\n const hinted = hint ? { ...field, helper: hint } : field;\n if (options.length === 0) return hinted;\n return field.kind === \"array\"\n ? { ...hinted, options, allowCustomValue: true }\n : { ...hinted, kind: \"enum\", options, allowCustomValue: true };\n };\n}\n\n/**\n * unwrapPreviews shows, under a list marked `x-clicky-preview: \"unwrap\"`, what\n * each rule does to its field: the value as the backend holds it and the value\n * after unwrapping, or the error unwrap raised. Both come from the server (see\n * useUnwrapPreviews); nothing here unwraps.\n */\nexport function unwrapPreviews(draft: ProfileWizardDraft): PostExtension {\n return (field, nodes) => {\n if (field.schema[\"x-clicky-preview\"] !== \"unwrap\") return nodes;\n const rules = Array.isArray(field.value) ? field.value : [];\n if (rules.length === 0) return nodes;\n return {\n ...nodes,\n value: (\n <>\n {nodes.value}\n <UnwrapPreviewList draft={draft} rules={rules as UnwrapRuleDraft[]} />\n </>\n ),\n };\n };\n}\n"],"mappings":";;;;AASA,IAAM,uBAAuB;;;;;;;;;;AAW7B,SAAgB,iBAAiB,EAC/B,aACA,QAIe;CACf,MAAM,yBAAS,IAAI,IAAmE;CACtF,KAAK,MAAM,EAAE,MAAM,WAAWA,oBAAAA,iBAAiB,IAAI,GACjD,OAAO,IAAI,MAAM;EAAE,OAAO;EAAM,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1
|
+
import { PostExtension, PreExtension } from '../../components/json-schema-form-runtime-types.js';
|
|
2
|
+
import { QueryBrowserCompletionField } from '../../data/query-browser/QueryBrowser.completion.js';
|
|
3
|
+
import { ProfileWizardDraft } from '../wizard/profileWizardModel.js';
|
|
4
|
+
type Row = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* sourceFieldNames turns every field marked `x-clicky-field-names` — a single
|
|
7
|
+
* name or a list, at any depth — into a picker of the index's mapped fields with
|
|
8
|
+
* their types, merged with the dotted paths the sampled documents carry (a
|
|
9
|
+
* Jaeger `tags` list is not always a mapped leaf). The index's type wins where
|
|
10
|
+
* both know a path. Typed values still commit: a wildcard (`process.*`) or a
|
|
11
|
+
* field neither knows is legitimate. Until the index is known the field stays the
|
|
12
|
+
* plain text control its schema describes, with a hint saying why.
|
|
13
|
+
*/
|
|
14
|
+
export declare function sourceFieldNames({ indexFields, rows, }: {
|
|
15
|
+
indexFields: QueryBrowserCompletionField[];
|
|
16
|
+
rows: Row[];
|
|
17
|
+
}): PreExtension;
|
|
18
|
+
/**
|
|
19
|
+
* unwrapPreviews shows, under a list marked `x-clicky-preview: "unwrap"`, what
|
|
20
|
+
* each rule does to its field: the value as the backend holds it and the value
|
|
21
|
+
* after unwrapping, or the error unwrap raised. Both come from the server (see
|
|
22
|
+
* useUnwrapPreviews); nothing here unwraps.
|
|
23
|
+
*/
|
|
24
|
+
export declare function unwrapPreviews(draft: ProfileWizardDraft): PostExtension;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=profileSourceExtensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileSourceExtensions.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/profileSourceExtensions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AACpG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAKvE,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAInC;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,WAAW,EACX,IAAI,GACL,EAAE;IACD,WAAW,EAAE,2BAA2B,EAAE,CAAC;IAC3C,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,GAAG,YAAY,CAkBf;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAevE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { sampleFieldPaths } from "./samplePaths.js";
|
|
2
|
+
import { UnwrapPreviewList } from "./UnwrapPreviewList.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
// src/profiles/editor/profileSourceExtensions.tsx
|
|
5
|
+
var NO_INDEX_FIELDS_HINT = "Index fields fill in once a connection and index are chosen.";
|
|
6
|
+
/**
|
|
7
|
+
* sourceFieldNames turns every field marked `x-clicky-field-names` — a single
|
|
8
|
+
* name or a list, at any depth — into a picker of the index's mapped fields with
|
|
9
|
+
* their types, merged with the dotted paths the sampled documents carry (a
|
|
10
|
+
* Jaeger `tags` list is not always a mapped leaf). The index's type wins where
|
|
11
|
+
* both know a path. Typed values still commit: a wildcard (`process.*`) or a
|
|
12
|
+
* field neither knows is legitimate. Until the index is known the field stays the
|
|
13
|
+
* plain text control its schema describes, with a hint saying why.
|
|
14
|
+
*/
|
|
15
|
+
function sourceFieldNames({ indexFields, rows }) {
|
|
16
|
+
const byName = /* @__PURE__ */ new Map();
|
|
17
|
+
for (const { path, types } of sampleFieldPaths(rows)) byName.set(path, {
|
|
18
|
+
value: path,
|
|
19
|
+
label: path,
|
|
20
|
+
description: `${types.join(", ")} · sampled`
|
|
21
|
+
});
|
|
22
|
+
for (const { name, types } of indexFields) byName.set(name, {
|
|
23
|
+
value: name,
|
|
24
|
+
label: name,
|
|
25
|
+
description: (types ?? []).join(", ")
|
|
26
|
+
});
|
|
27
|
+
const options = [...byName.values()].sort((a, b) => a.value.localeCompare(b.value));
|
|
28
|
+
return (field, ctx) => {
|
|
29
|
+
if (ctx.prop["x-clicky-field-names"] !== true) return field;
|
|
30
|
+
const hint = indexFields.length === 0 ? [field.helper ?? field.description, NO_INDEX_FIELDS_HINT].filter(Boolean).join(" ") : void 0;
|
|
31
|
+
const hinted = hint ? {
|
|
32
|
+
...field,
|
|
33
|
+
helper: hint
|
|
34
|
+
} : field;
|
|
35
|
+
if (options.length === 0) return hinted;
|
|
36
|
+
return field.kind === "array" ? {
|
|
37
|
+
...hinted,
|
|
38
|
+
options,
|
|
39
|
+
allowCustomValue: true
|
|
40
|
+
} : {
|
|
41
|
+
...hinted,
|
|
42
|
+
kind: "enum",
|
|
43
|
+
options,
|
|
44
|
+
allowCustomValue: true
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* unwrapPreviews shows, under a list marked `x-clicky-preview: "unwrap"`, what
|
|
50
|
+
* each rule does to its field: the value as the backend holds it and the value
|
|
51
|
+
* after unwrapping, or the error unwrap raised. Both come from the server (see
|
|
52
|
+
* useUnwrapPreviews); nothing here unwraps.
|
|
53
|
+
*/
|
|
54
|
+
function unwrapPreviews(draft) {
|
|
55
|
+
return (field, nodes) => {
|
|
56
|
+
if (field.schema["x-clicky-preview"] !== "unwrap") return nodes;
|
|
57
|
+
const rules = Array.isArray(field.value) ? field.value : [];
|
|
58
|
+
if (rules.length === 0) return nodes;
|
|
59
|
+
return {
|
|
60
|
+
...nodes,
|
|
61
|
+
value: /* @__PURE__ */ jsxs(Fragment, { children: [nodes.value, /* @__PURE__ */ jsx(UnwrapPreviewList, {
|
|
62
|
+
draft,
|
|
63
|
+
rules
|
|
64
|
+
})] })
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export { sourceFieldNames, unwrapPreviews };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=profileSourceExtensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileSourceExtensions.js","names":["_Fragment"],"sources":["../../../src/profiles/editor/profileSourceExtensions.tsx"],"sourcesContent":["import type { PostExtension, PreExtension } from \"../../components/json-schema-form-runtime-types\";\nimport type { QueryBrowserCompletionField } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\nimport { sampleFieldPaths } from \"./samplePaths\";\nimport { UnwrapPreviewList } from \"./UnwrapPreviewList\";\nimport type { UnwrapRuleDraft } from \"./useUnwrapPreviews\";\n\ntype Row = Record<string, unknown>;\n\nconst NO_INDEX_FIELDS_HINT = \"Index fields fill in once a connection and index are chosen.\";\n\n/**\n * sourceFieldNames turns every field marked `x-clicky-field-names` — a single\n * name or a list, at any depth — into a picker of the index's mapped fields with\n * their types, merged with the dotted paths the sampled documents carry (a\n * Jaeger `tags` list is not always a mapped leaf). The index's type wins where\n * both know a path. Typed values still commit: a wildcard (`process.*`) or a\n * field neither knows is legitimate. Until the index is known the field stays the\n * plain text control its schema describes, with a hint saying why.\n */\nexport function sourceFieldNames({\n indexFields,\n rows,\n}: {\n indexFields: QueryBrowserCompletionField[];\n rows: Row[];\n}): PreExtension {\n const byName = new Map<string, { value: string; label: string; description: string }>();\n for (const { path, types } of sampleFieldPaths(rows)) {\n byName.set(path, { value: path, label: path, description: `${types.join(\", \")} · sampled` });\n }\n for (const { name, types } of indexFields) {\n byName.set(name, { value: name, label: name, description: (types ?? []).join(\", \") });\n }\n const options = [...byName.values()].sort((a, b) => a.value.localeCompare(b.value));\n return (field, ctx) => {\n if (ctx.prop[\"x-clicky-field-names\"] !== true) return field;\n const hint = indexFields.length === 0 ? [field.helper ?? field.description, NO_INDEX_FIELDS_HINT].filter(Boolean).join(\" \") : undefined;\n const hinted = hint ? { ...field, helper: hint } : field;\n if (options.length === 0) return hinted;\n return field.kind === \"array\"\n ? { ...hinted, options, allowCustomValue: true }\n : { ...hinted, kind: \"enum\", options, allowCustomValue: true };\n };\n}\n\n/**\n * unwrapPreviews shows, under a list marked `x-clicky-preview: \"unwrap\"`, what\n * each rule does to its field: the value as the backend holds it and the value\n * after unwrapping, or the error unwrap raised. Both come from the server (see\n * useUnwrapPreviews); nothing here unwraps.\n */\nexport function unwrapPreviews(draft: ProfileWizardDraft): PostExtension {\n return (field, nodes) => {\n if (field.schema[\"x-clicky-preview\"] !== \"unwrap\") return nodes;\n const rules = Array.isArray(field.value) ? field.value : [];\n if (rules.length === 0) return nodes;\n return {\n ...nodes,\n value: (\n <>\n {nodes.value}\n <UnwrapPreviewList draft={draft} rules={rules as UnwrapRuleDraft[]} />\n </>\n ),\n };\n };\n}\n"],"mappings":";;;;AASA,IAAM,uBAAuB;;;;;;;;;;AAW7B,SAAgB,iBAAiB,EAC/B,aACA,QAIe;CACf,MAAM,yBAAS,IAAI,IAAmE;CACtF,KAAK,MAAM,EAAE,MAAM,WAAW,iBAAiB,IAAI,GACjD,OAAO,IAAI,MAAM;EAAE,OAAO;EAAM,OAAO;EAAM,aAAa,GAAG,MAAM,KAAK,IAAI,EAAE;CAAY,CAAC;CAE7F,KAAK,MAAM,EAAE,MAAM,WAAW,aAC5B,OAAO,IAAI,MAAM;EAAE,OAAO;EAAM,OAAO;EAAM,cAAc,SAAS,CAAC,EAAA,CAAG,KAAK,IAAI;CAAE,CAAC;CAEtF,MAAM,UAAU,CAAC,GAAG,OAAO,OAAO,CAAC,CAAC,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,cAAc,EAAE,KAAK,CAAC;CAClF,QAAQ,OAAO,QAAQ;EACrB,IAAI,IAAI,KAAK,4BAA4B,MAAM,OAAO;EACtD,MAAM,OAAO,YAAY,WAAW,IAAI,CAAC,MAAM,UAAU,MAAM,aAAa,oBAAoB,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,IAAI,KAAA;EAC9H,MAAM,SAAS,OAAO;GAAE,GAAG;GAAO,QAAQ;EAAK,IAAI;EACnD,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,OAAO,MAAM,SAAS,UAClB;GAAE,GAAG;GAAQ;GAAS,kBAAkB;EAAK,IAC7C;GAAE,GAAG;GAAQ,MAAM;GAAQ;GAAS,kBAAkB;EAAK;CACjE;AACF;;;;;;;AAQA,SAAgB,eAAe,OAA0C;CACvE,QAAQ,OAAO,UAAU;EACvB,IAAI,MAAM,OAAO,wBAAwB,UAAU,OAAO;EAC1D,MAAM,QAAQ,MAAM,QAAQ,MAAM,KAAK,IAAI,MAAM,QAAQ,CAAC;EAC1D,IAAI,MAAM,WAAW,GAAG,OAAO;EAC/B,OAAO;GACL,GAAG;GACH,OACE,qBAAAA,UAAA,EAAA,UAAA,CACG,MAAM,OACP,oBAAC,mBAAD;IAA0B;IAAc;GAA6B,CAAA,CACrE,EAAA,CAAA;EAEN;CACF;AACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/profiles/editor/samplePaths.ts
|
|
2
|
+
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3
|
+
/**
|
|
4
|
+
* Reads a dotted path out of a sampled row the way the query engine resolves a
|
|
5
|
+
* column's source (commons-db query/row_path.go lookupRowPath): a literal key
|
|
6
|
+
* wins over splitting, at every level. After a key_values unwrap a document holds
|
|
7
|
+
* keys that contain dots themselves (`process.tags` is `{"host.name": …}`), so
|
|
8
|
+
* `process.tags.host.name` is `process` → `tags` → the literal `host.name`.
|
|
9
|
+
* Keep it in step with that function.
|
|
10
|
+
*/
|
|
11
|
+
function lookupSamplePath(document, path) {
|
|
12
|
+
if (!isObject(document)) return { found: false };
|
|
13
|
+
if (Object.hasOwn(document, path)) return {
|
|
14
|
+
found: true,
|
|
15
|
+
value: document[path]
|
|
16
|
+
};
|
|
17
|
+
for (let dot = path.indexOf("."); dot !== -1; dot = path.indexOf(".", dot + 1)) {
|
|
18
|
+
const head = path.slice(0, dot);
|
|
19
|
+
const nested = Object.hasOwn(document, head) ? document[head] : void 0;
|
|
20
|
+
if (!isObject(nested)) continue;
|
|
21
|
+
const found = lookupSamplePath(nested, path.slice(dot + 1));
|
|
22
|
+
if (found.found) return found;
|
|
23
|
+
}
|
|
24
|
+
return { found: false };
|
|
25
|
+
}
|
|
26
|
+
function jsType(value) {
|
|
27
|
+
if (value === null) return "null";
|
|
28
|
+
if (Array.isArray(value)) return "array";
|
|
29
|
+
return typeof value;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Every field path the sampled rows carry: nested objects contribute their keys
|
|
33
|
+
* as dotted paths, arrays and scalars are leaves. Each path lists the types it
|
|
34
|
+
* held, since rows disagree (a list in one, JSON text in another).
|
|
35
|
+
*/
|
|
36
|
+
function sampleFieldPaths(rows) {
|
|
37
|
+
const types = /* @__PURE__ */ new Map();
|
|
38
|
+
const visit = (value, prefix) => {
|
|
39
|
+
for (const [key, child] of Object.entries(value)) {
|
|
40
|
+
const path = prefix ? `${prefix}.${key}` : key;
|
|
41
|
+
if (isObject(child)) visit(child, path);
|
|
42
|
+
else types.set(path, (types.get(path) ?? /* @__PURE__ */ new Set()).add(jsType(child)));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
for (const row of rows) visit(row, "");
|
|
46
|
+
return [...types].sort(([a], [b]) => a.localeCompare(b)).map(([path, held]) => ({
|
|
47
|
+
path,
|
|
48
|
+
types: [...held].sort()
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
exports.lookupSamplePath = lookupSamplePath;
|
|
52
|
+
exports.sampleFieldPaths = sampleFieldPaths;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=samplePaths.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplePaths.cjs","names":[],"sources":["../../../src/profiles/editor/samplePaths.ts"],"sourcesContent":["// Reading field paths out of sampled rows. Nothing here changes a row: unwrap\n// rules are applied by the server alone, and the rows the editor holds are\n// already what it produced.\n\ntype Row = Record<string, unknown>;\n\nconst isObject = (value: unknown): value is Row =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nexport type SamplePathLookup = { found: true; value: unknown } | { found: false };\n\n/**\n * Reads a dotted path out of a sampled row the way the query engine resolves a\n * column's source (commons-db query/row_path.go lookupRowPath): a literal key\n * wins over splitting, at every level. After a key_values unwrap a document holds\n * keys that contain dots themselves (`process.tags` is `{\"host.name\": …}`), so\n * `process.tags.host.name` is `process` → `tags` → the literal `host.name`.\n * Keep it in step with that function.\n */\nexport function lookupSamplePath(document: unknown, path: string): SamplePathLookup {\n if (!isObject(document)) return { found: false };\n if (Object.hasOwn(document, path)) return { found: true, value: document[path] };\n for (let dot = path.indexOf(\".\"); dot !== -1; dot = path.indexOf(\".\", dot + 1)) {\n const head = path.slice(0, dot);\n const nested = Object.hasOwn(document, head) ? document[head] : undefined;\n if (!isObject(nested)) continue;\n const found = lookupSamplePath(nested, path.slice(dot + 1));\n if (found.found) return found;\n }\n return { found: false };\n}\n\nfunction jsType(value: unknown): string {\n if (value === null) return \"null\";\n if (Array.isArray(value)) return \"array\";\n return typeof value;\n}\n\n/**\n * Every field path the sampled rows carry: nested objects contribute their keys\n * as dotted paths, arrays and scalars are leaves. Each path lists the types it\n * held, since rows disagree (a list in one, JSON text in another).\n */\nexport function sampleFieldPaths(rows: Row[]): { path: string; types: string[] }[] {\n const types = new Map<string, Set<string>>();\n const visit = (value: Row, prefix: string) => {\n for (const [key, child] of Object.entries(value)) {\n const path = prefix ? `${prefix}.${key}` : key;\n if (isObject(child)) visit(child, path);\n else types.set(path, (types.get(path) ?? new Set()).add(jsType(child)));\n }\n };\n for (const row of rows) visit(row, \"\");\n return [...types]\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([path, held]) => ({ path, types: [...held].sort() }));\n}\n"],"mappings":";AAMA,IAAM,YAAY,UAChB,OAAO,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CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CACtC,KAAK,CAAC,MAAM,WAAW;EAAE;EAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK;CAAE,EAAE;AAC9D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type Row = Record<string, unknown>;
|
|
2
|
+
export type SamplePathLookup = {
|
|
3
|
+
found: true;
|
|
4
|
+
value: unknown;
|
|
5
|
+
} | {
|
|
6
|
+
found: false;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Reads a dotted path out of a sampled row the way the query engine resolves a
|
|
10
|
+
* column's source (commons-db query/row_path.go lookupRowPath): a literal key
|
|
11
|
+
* wins over splitting, at every level. After a key_values unwrap a document holds
|
|
12
|
+
* keys that contain dots themselves (`process.tags` is `{"host.name": …}`), so
|
|
13
|
+
* `process.tags.host.name` is `process` → `tags` → the literal `host.name`.
|
|
14
|
+
* Keep it in step with that function.
|
|
15
|
+
*/
|
|
16
|
+
export declare function lookupSamplePath(document: unknown, path: string): SamplePathLookup;
|
|
17
|
+
/**
|
|
18
|
+
* Every field path the sampled rows carry: nested objects contribute their keys
|
|
19
|
+
* as dotted paths, arrays and scalars are leaves. Each path lists the types it
|
|
20
|
+
* held, since rows disagree (a list in one, JSON text in another).
|
|
21
|
+
*/
|
|
22
|
+
export declare function sampleFieldPaths(rows: Row[]): {
|
|
23
|
+
path: string;
|
|
24
|
+
types: string[];
|
|
25
|
+
}[];
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=samplePaths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"samplePaths.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/samplePaths.ts"],"names":[],"mappings":"AAIA,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAKnC,MAAM,MAAM,gBAAgB,GAAG;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AAElF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAWlF;AAQD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,CAajF"}
|