@flanksource/clicky-ui 0.3.78 → 0.3.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/Combobox.cjs +9 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +9 -3
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +1 -1
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.js +1 -1
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.cjs +18 -9
- package/dist/data/traces/otel/OtelTraceBrowser.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.js +19 -10
- package/dist/data/traces/otel/OtelTraceBrowser.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.cjs +10 -8
- package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.js +10 -8
- package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
- package/dist/data/traces/otel/QueryBar.cjs +6 -5
- package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
- package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
- package/dist/data/traces/otel/QueryBar.js +6 -5
- package/dist/data/traces/otel/QueryBar.js.map +1 -1
- package/dist/data/traces/otel/browser-state.cjs +17 -4
- package/dist/data/traces/otel/browser-state.cjs.map +1 -1
- package/dist/data/traces/otel/browser-state.d.ts +2 -1
- package/dist/data/traces/otel/browser-state.d.ts.map +1 -1
- package/dist/data/traces/otel/browser-state.js +17 -4
- package/dist/data/traces/otel/browser-state.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.js +6 -6
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/api.cjs.map +1 -1
- package/dist/expressions/playground/api.d.ts +10 -0
- package/dist/expressions/playground/api.d.ts.map +1 -1
- package/dist/expressions/playground/api.js.map +1 -1
- package/dist/expressions/playground/hostEvaluation.cjs +67 -0
- package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
- package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
- package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
- package/dist/expressions/playground/hostEvaluation.js +63 -0
- package/dist/expressions/playground/hostEvaluation.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.js +8 -3
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.js +6 -2
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
- package/dist/expressions/playground.d.ts +1 -1
- package/dist/expressions/playground.d.ts.map +1 -1
- package/dist/hooks/use-element-height.cjs +26 -0
- package/dist/hooks/use-element-height.cjs.map +1 -0
- package/dist/hooks/use-element-height.d.ts +10 -0
- package/dist/hooks/use-element-height.d.ts.map +1 -0
- package/dist/hooks/use-element-height.js +26 -0
- package/dist/hooks/use-element-height.js.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.js +7 -7
- package/dist/jvm/classes/PatchedClassList.cjs +11 -2
- package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
- package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
- package/dist/jvm/classes/PatchedClassList.js +11 -2
- package/dist/jvm/classes/PatchedClassList.js.map +1 -1
- package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
- package/dist/jvm/model/patches.cjs +4 -2
- package/dist/jvm/model/patches.cjs.map +1 -1
- package/dist/jvm/model/patches.d.ts +3 -1
- package/dist/jvm/model/patches.d.ts.map +1 -1
- package/dist/jvm/model/patches.js +4 -2
- package/dist/jvm/model/patches.js.map +1 -1
- package/dist/jvm/protocol/client.d.ts +7 -2
- package/dist/jvm/protocol/client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.cjs +30 -11
- package/dist/jvm/protocol/operation-client.cjs.map +1 -1
- package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.js +30 -11
- package/dist/jvm/protocol/operation-client.js.map +1 -1
- package/dist/jvm/protocol/query-keys.cjs +1 -1
- package/dist/jvm/protocol/query-keys.cjs.map +1 -1
- package/dist/jvm/protocol/query-keys.d.ts +1 -1
- package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
- package/dist/jvm/protocol/query-keys.js +1 -1
- package/dist/jvm/protocol/query-keys.js.map +1 -1
- package/dist/jvm/protocol/status.cjs +38 -0
- package/dist/jvm/protocol/status.cjs.map +1 -0
- package/dist/jvm/protocol/status.d.ts +13 -0
- package/dist/jvm/protocol/status.d.ts.map +1 -0
- package/dist/jvm/protocol/status.js +38 -0
- package/dist/jvm/protocol/status.js.map +1 -0
- package/dist/jvm/protocol/types.d.ts +16 -4
- package/dist/jvm/protocol/types.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.cjs +7 -1
- package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
- package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.js +7 -1
- package/dist/jvm/runtime/GcSummary.js.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
- package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.js +12 -11
- package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
- package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.js +4 -9
- package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
- package/dist/jvm/surfaces/jvm-context.cjs +23 -4
- package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
- package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
- package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
- package/dist/jvm/surfaces/jvm-context.js +23 -5
- package/dist/jvm/surfaces/jvm-context.js.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
- package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.js +2 -2
- package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
- package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.js +3 -2
- package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
- package/dist/jvm/threads/ThreadDetail.cjs +6 -2
- package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
- package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
- package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
- package/dist/jvm/threads/ThreadDetail.js +6 -2
- package/dist/jvm/threads/ThreadDetail.js.map +1 -1
- package/dist/jvm.cjs +3 -0
- package/dist/jvm.d.ts +2 -1
- package/dist/jvm.d.ts.map +1 -1
- package/dist/jvm.js +3 -2
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +16 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +21 -2
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.js +21 -2
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/Workspace.cjs +66 -21
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +6 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +66 -21
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.model.cjs +20 -0
- package/dist/layout/Workspace.model.cjs.map +1 -1
- package/dist/layout/Workspace.model.d.ts +17 -0
- package/dist/layout/Workspace.model.d.ts.map +1 -1
- package/dist/layout/Workspace.model.js +20 -1
- package/dist/layout/Workspace.model.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +10 -6
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.d.ts +4 -1
- package/dist/layout/Workspace.regions.d.ts.map +1 -1
- package/dist/layout/Workspace.regions.js +10 -6
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/duration.cjs +20 -0
- package/dist/lib/duration.cjs.map +1 -1
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.d.ts.map +1 -1
- package/dist/lib/duration.js +19 -1
- package/dist/lib/duration.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +34 -30
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +34 -30
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/overlay/ConfirmDialog.cjs +5 -2
- package/dist/overlay/ConfirmDialog.cjs.map +1 -1
- package/dist/overlay/ConfirmDialog.d.ts +14 -2
- package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
- package/dist/overlay/ConfirmDialog.js +5 -2
- package/dist/overlay/ConfirmDialog.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +94 -285
- package/dist/profiles/cel/celEditor.cjs.map +1 -1
- package/dist/profiles/cel/celEditor.d.ts +10 -15
- package/dist/profiles/cel/celEditor.d.ts.map +1 -1
- package/dist/profiles/cel/celEditor.js +97 -287
- package/dist/profiles/cel/celEditor.js.map +1 -1
- package/dist/profiles/cel/celExpression.cjs +1 -61
- package/dist/profiles/cel/celExpression.cjs.map +1 -1
- package/dist/profiles/cel/celExpression.d.ts +2 -38
- package/dist/profiles/cel/celExpression.d.ts.map +1 -1
- package/dist/profiles/cel/celExpression.js +2 -58
- package/dist/profiles/cel/celExpression.js.map +1 -1
- package/dist/profiles/cel/celPlayground.cjs +122 -0
- package/dist/profiles/cel/celPlayground.cjs.map +1 -0
- package/dist/profiles/cel/celPlayground.d.ts +43 -0
- package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
- package/dist/profiles/cel/celPlayground.js +118 -0
- package/dist/profiles/cel/celPlayground.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.js +2 -2
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
- package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
- package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
- package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
- package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
- package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
- package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +106 -37
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +107 -38
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorModel.cjs +65 -19
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorModel.js +64 -18
- package/dist/profiles/editor/profileEditorModel.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +129 -29
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +137 -88
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +138 -90
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +23 -7
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
- package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.js +70 -0
- package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
- package/dist/profiles/editor/samplePaths.cjs +54 -0
- package/dist/profiles/editor/samplePaths.cjs.map +1 -0
- package/dist/profiles/editor/samplePaths.d.ts +27 -0
- package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
- package/dist/profiles/editor/samplePaths.js +53 -0
- package/dist/profiles/editor/samplePaths.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -1
- package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
- package/dist/profiles/fields/profileFieldControls.cjs +3 -2
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldControls.js +3 -2
- package/dist/profiles/fields/profileFieldControls.js.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.js +99 -186
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/fields/profileFieldList.cjs +23 -1
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldList.js +23 -1
- package/dist/profiles/fields/profileFieldList.js.map +1 -1
- package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
- package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.js +110 -0
- package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
- package/dist/profiles/fields/profileFieldSample.cjs +182 -0
- package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
- package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldSample.js +180 -0
- package/dist/profiles/fields/profileFieldSample.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.js +104 -0
- package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.js +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
- package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.js +59 -0
- package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +79 -79
- package/dist/profiles/processor/processorConfig.cjs.map +1 -1
- package/dist/profiles/processor/processorConfig.d.ts +30 -3
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
- package/dist/profiles/processor/processorConfig.js +78 -78
- package/dist/profiles/processor/processorConfig.js.map +1 -1
- package/dist/profiles/processor/processorPipeline.cjs +8 -6
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
- package/dist/profiles/processor/processorPipeline.d.ts +3 -3
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipeline.js +9 -7
- package/dist/profiles/processor/processorPipeline.js.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.js +39 -95
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.js +3 -2
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
- package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +10 -1
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
- package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.js +39 -0
- package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
- package/dist/profiles.cjs +9 -11
- package/dist/profiles.js +8 -8
- package/dist/rpc/EntityExplorerApp.cjs +7 -3
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +16 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +7 -3
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/InlineError.cjs +30 -10
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +10 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +30 -10
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +9 -6
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +9 -6
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/SessionHeader.cjs +3 -3
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +3 -3
- package/dist/rpc/SessionHeader.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +2 -6
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -5
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/surfaceNav.cjs +5 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -1
- package/dist/rpc/surfaceNav.d.ts.map +1 -1
- package/dist/rpc/surfaceNav.js +5 -0
- package/dist/rpc/surfaceNav.js.map +1 -1
- package/dist/runtime/barrels.json +4982 -4979
- package/dist/runtime/importmap.json +2168 -2146
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
- package/dist/profiles/cel/celEditorResults.cjs +0 -158
- package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
- package/dist/profiles/cel/celEditorResults.d.ts +0 -37
- package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
- package/dist/profiles/cel/celEditorResults.js +0 -156
- package/dist/profiles/cel/celEditorResults.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityExplorerApp.cjs","names":["useRouter","useOperations","useMemo","getClickySurfaces","buildCommandHref","surfaceNavSection","withBasePath","useState","useCallback","AppShell","ThemeSwitcher","_Fragment","makeSurfaceDefinition","OperationCatalog","OperationEntityPage","OperationCommandPage","ExplorerNavContext","trimTrailingSlash","ARG_QUERY_PREFIX"],"sources":["../../src/rpc/EntityExplorerApp.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ExplorerNavContext, type ExplorerNavSlot } from \"./explorer-nav-context\";\nimport { ThemeSwitcher } from \"../components/theme-switcher\";\nimport type { PreExtension, PostExtension } from \"../components/json-schema-form-types\";\nimport type { ClickyCommandRuntime } from \"../data/Clicky\";\nimport { AppShell, type AppShellNavSection } from \"../layout/AppShell\";\nimport { getClickySurfaces, makeSurfaceDefinition } from \"./clickyMetadata\";\nimport {\n ARG_QUERY_PREFIX,\n AUTORUN_QUERY_PARAM,\n buildCommandHref,\n trimTrailingSlash,\n withBasePath,\n} from \"./commandHref\";\nimport { useRouter } from \"./router\";\nimport { OperationCatalog } from \"./OperationCatalog\";\nimport type { ResultRenderer } from \"./OperationResultView\";\nimport { OperationCommandPage } from \"./OperationCommandPage\";\nimport {\n OperationEntityPage,\n type EntityDetailBodyRenderer,\n type EntityDetailHeaderRenderer,\n} from \"./OperationEntityPage\";\nimport type { FormActionsRenderer } from \"./SchemaActionForm\";\nimport { surfaceNavSection } from \"./surfaceNav\";\nimport type { ClickySurface } from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\nimport { useOperations } from \"./useOperations\";\n\nexport type SurfaceActionLabels = Record<string, Record<string, string>>;\n\nexport type EntityExplorerAppProps = {\n client: OperationsApiClient;\n basePath?: string;\n showApiExplorer?: boolean;\n /** Right-aligned top-bar cluster forwarded to AppShell's actions slot. */\n actions?: ReactNode;\n /**\n * Custom JsonSchemaForm field extensions applied to every create/edit form the\n * explorer renders — e.g. a SecretKeySelector widget keyed on an\n * `x-clicky-component` schema hint. `pre` transforms a resolved control; `post`\n * can replace the rendered value node with a custom component.\n */\n formExtensions?: { pre?: PreExtension[]; post?: PostExtension[] };\n /**\n * Optional extra footer actions added to every create/edit form (e.g. a\n * connection \"Test\" split-button). The renderer receives the live form value\n * and the action it submits to, so it can scope itself to a given entity.\n */\n formActions?: FormActionsRenderer;\n /** Per-surface labels keyed by x-clicky verb/actionName. */\n surfaceActionLabels?: SurfaceActionLabels;\n /**\n * @deprecated Superseded by per-surface icons emitted by the backend\n * (x-clicky-icon → ClickySurface.icon). AppShell section labels are plain\n * strings, so this group-header icon map is no longer rendered. Kept for\n * source-compatibility only.\n */\n surfaceIcons?: Record<string, ReactNode>;\n /**\n * Optional host override for the result surface. Called where an entity's\n * result table renders, with the current surface key, the raw response, and\n * the default OperationResultView element. Return `defaultView` to keep the\n * standard table, or a custom node (e.g. a LogsTable for trace/log profiles\n * flagged via x-clicky-render). Filtering/sorting policy is the host's choice.\n */\n resultRenderer?: ResultRenderer;\n /** Host override for a loaded entity's body; heading and actions remain. */\n entityDetailBodyRenderer?: EntityDetailBodyRenderer;\n /** Host override for a loaded entity's \"{title}: {id}\" heading. */\n entityDetailHeaderRenderer?: EntityDetailHeaderRenderer;\n /** Compact host controls (e.g. an edit icon) shown right after a surface's title or breadcrumb in the top bar. */\n surfaceTitleActions?: (surfaceKey: string) => ReactNode;\n /**\n * Per-surface paging presentation, forwarded to OperationCatalog's\n * `paginationMode`. Return undefined to keep automatic selection (a cursor\n * walk whenever the list declares a cursor); return \"paged\" for a surface\n * whose readers need prev/next offset controls.\n */\n surfacePaginationMode?: (surfaceKey: string) => \"paged\" | \"infinite\" | undefined;\n};\n\n// SIDEBAR_COLLAPSED_KEY persists the AppShell rail collapsed flag across reloads.\nconst SIDEBAR_COLLAPSED_KEY = \"clicky-ui:sidebar:collapsed\";\n\nexport function EntityExplorerApp({\n client,\n basePath = \"\",\n showApiExplorer = true,\n actions,\n formExtensions,\n formActions,\n surfaceActionLabels,\n resultRenderer,\n entityDetailBodyRenderer,\n entityDetailHeaderRenderer,\n surfaceTitleActions,\n surfacePaginationMode,\n}: EntityExplorerAppProps) {\n const formPre = formExtensions?.pre;\n const formPost = formExtensions?.post;\n const { pathname, renderLink, navigate } = useRouter();\n const { spec } = useOperations(client);\n const surfaces = useMemo(() => getClickySurfaces(spec), [spec]);\n const surfaceGroups = useMemo(() => groupSurfacesByParent(surfaces), [surfaces]);\n const defaultSurface = useMemo(\n () => surfaces.find((surface) => !surface.admin) ?? surfaces[0],\n [surfaces],\n );\n const relativePath = useMemo(() => stripBasePath(pathname, basePath), [basePath, pathname]);\n const route = useMemo(() => parseExplorerRoute(relativePath), [relativePath]);\n const resolvedRoute = useMemo(() => resolveRouteSurface(route, surfaces), [route, surfaces]);\n const commandRuntime = useMemo<ClickyCommandRuntime>(\n () => ({\n client,\n hrefForCommand: (resolved) => buildCommandHref(basePath, resolved),\n onNavigate: (resolved) => {\n const href = buildCommandHref(basePath, resolved);\n if (!href) return;\n navigate(href);\n },\n }),\n [basePath, client, navigate],\n );\n const { initialValues: commandInitialValues } = useMemo(\n () =>\n resolvedRoute.kind === \"command\"\n ? readCommandQueryParams()\n : { initialValues: {}, autoRun: false },\n [resolvedRoute.kind, pathname],\n );\n const explorerDefinition = useMemo(\n () => ({\n key: \"explorer\",\n title: \"API Explorer\",\n description: \"Every operation exposed by the current OpenAPI spec.\",\n }),\n [],\n );\n const navSections = useMemo<AppShellNavSection[]>(() => {\n const sections: AppShellNavSection[] = surfaceGroups.map((group) =>\n surfaceNavSection(group.label, group.surfaces, {\n isActive: (surface) => isSurfaceRouteActive(resolvedRoute, surface.key),\n hrefFor: (surface) => withBasePath(basePath, `/${surface.key}`),\n }),\n );\n if (showApiExplorer) {\n sections.push({\n items: [\n {\n key: explorerDefinition.key,\n label: explorerDefinition.title,\n active: resolvedRoute.kind === \"explorer\" || resolvedRoute.kind === \"command\",\n to: withBasePath(basePath, \"/explorer\"),\n },\n ],\n });\n }\n return sections;\n }, [surfaceGroups, basePath, resolvedRoute, showApiExplorer, explorerDefinition]);\n\n const [navContainer, setNavContainer] = useState<HTMLElement | null>(null);\n const [navClaims, setNavClaims] = useState(0);\n const claimNav = useCallback(() => {\n setNavClaims((count) => count + 1);\n return () => setNavClaims((count) => count - 1);\n }, []);\n const surface = resolvedRoute.kind === \"surface\" ? resolvedRoute.surface : undefined;\n const titleActions = surface ? surfaceTitleActions?.(surface.key) : undefined;\n const paginationMode = surface ? surfacePaginationMode?.(surface.key) : undefined;\n // The container only exists while a surface is resolved, so a portal\n // mounted before the spec loads renders nothing rather than a bare crumb.\n const navSlot = useMemo<ExplorerNavSlot>(\n () => ({\n container: surface ? navContainer : null,\n title: surface?.title ?? \"\",\n titleActions,\n claim: claimNav,\n }),\n [claimNav, navContainer, surface, titleActions],\n );\n\n useEffect(() => {\n if (defaultSurface == null || relativePath !== \"/\") return;\n navigate(withBasePath(basePath, `/${defaultSurface.key}`), { replace: true });\n }, [basePath, defaultSurface, relativePath, navigate]);\n\n const content = (\n <AppShell\n brand={\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold\">\n {spec?.info.title ?? \"Clicky Explorer\"}\n </div>\n <div className=\"truncate text-xs text-sidebar-foreground/60\">\n Metadata-driven entity explorer\n </div>\n </div>\n }\n navSections={navSections}\n sidebarFooter={<ThemeSwitcher />}\n {...(actions ? { actions } : {})}\n // The page header belongs to the host, not to OperationCatalog — the\n // catalog renders only its results. OperationEntityPage still titles\n // itself, so this covers the collection route only.\n //\n // It rides in the top bar rather than a bodyHeader row: next to the rail\n // that bar is otherwise empty, and the row it replaces cost the result\n // table ~72px of the viewport it needs to keep its sticky head and\n // pagination footer on screen without the page itself scrolling.\n {...(resolvedRoute.kind === \"surface\" && resolvedRoute.surface\n ? {\n nav: (\n <>\n {navClaims === 0 && (\n <div className=\"flex min-w-0 flex-1 items-baseline gap-density-2\">\n <h1 className=\"min-w-0 truncate text-base font-semibold tracking-tight\">\n {resolvedRoute.surface.title}\n </h1>\n {titleActions ? (\n <div className=\"flex shrink-0 items-center self-center\">{titleActions}</div>\n ) : null}\n <p className=\"hidden min-w-0 truncate text-sm text-muted-foreground lg:block\">\n {makeSurfaceDefinition(resolvedRoute.surface).description}\n </p>\n </div>\n )}\n <div ref={setNavContainer} data-slot=\"explorer-nav\" className=\"contents\" />\n </>\n ),\n }\n : {})}\n collapsedStorageKey={SIDEBAR_COLLAPSED_KEY}\n // Results are wide tables, not prose — let them use the whole workspace\n // instead of the centred reading column.\n contentWidth=\"full\"\n contentClassName=\"p-6\"\n >\n {resolvedRoute.kind === \"surface\" ? (\n resolvedRoute.surface ? (\n <OperationCatalog\n // Filter state is seeded from the URL when the catalog mounts and\n // written back to it, so one instance spanning two surfaces would\n // carry the first surface's filters onto the second's URL. Keying\n // on the surface makes each one start from its own query string.\n key={resolvedRoute.surface.key}\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(resultRenderer ? { resultRenderer } : {})}\n {...(paginationMode ? { paginationMode } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"entity\" ? (\n resolvedRoute.surface ? (\n <OperationEntityPage\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n backHref={withBasePath(basePath, `/${resolvedRoute.surface.key}`)}\n backLabel={`Back to ${resolvedRoute.surface.title}`}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(entityDetailBodyRenderer ? { entityDetailBodyRenderer } : {})}\n {...(entityDetailHeaderRenderer ? { entityDetailHeaderRenderer } : {})}\n {...(resolvedRoute.id ? { id: resolvedRoute.id } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"command\" ? (\n <OperationCommandPage\n client={client}\n backHref={withBasePath(basePath, \"/explorer\")}\n backLabel=\"Back to API Explorer\"\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n initialValues={commandInitialValues}\n autoRun={true}\n {...(resolvedRoute.operationId ? { operationId: resolvedRoute.operationId } : {})}\n />\n ) : resolvedRoute.kind === \"explorer\" ? (\n <OperationCatalog\n definition={explorerDefinition}\n entities={[]}\n allOperations\n client={client}\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n />\n ) : defaultSurface == null ? (\n <div className=\"text-sm text-muted-foreground\">Loading surfaces…</div>\n ) : (\n <div className=\"text-sm text-muted-foreground\">Redirecting…</div>\n )}\n </AppShell>\n );\n\n return <ExplorerNavContext.Provider value={navSlot}>{content}</ExplorerNavContext.Provider>;\n}\n\ntype ExplorerRoute =\n | { kind: \"root\" }\n | { kind: \"explorer\" }\n | { kind: \"command\"; operationId?: string }\n | { kind: \"surface\"; surfaceKey: string; surface?: ClickySurface }\n | {\n kind: \"entity\";\n surfaceKey: string;\n surface?: ClickySurface;\n id?: string;\n };\n\nfunction parseExplorerRoute(pathname: string): ExplorerRoute {\n const normalized = trimTrailingSlash(pathname) || \"/\";\n if (normalized === \"/\") {\n return { kind: \"root\" };\n }\n\n const segments = normalized.replace(/^\\/+/, \"\").split(\"/\");\n if (segments[0] === \"explorer\") {\n return { kind: \"explorer\" };\n }\n if (segments[0] === \"commands\") {\n return segments[1] ? { kind: \"command\", operationId: segments[1] } : { kind: \"command\" };\n }\n const surfaceKey = segments[0] ?? \"\";\n if (segments[1]) {\n return {\n kind: \"entity\",\n surfaceKey,\n id: decodeURIComponent(segments[1]),\n };\n }\n return { kind: \"surface\", surfaceKey };\n}\n\nfunction resolveRouteSurface(route: ExplorerRoute, surfaces: ClickySurface[]): ExplorerRoute {\n if (route.kind !== \"surface\" && route.kind !== \"entity\") {\n return route;\n }\n const surface = surfaces.find((item) => item.key === route.surfaceKey);\n return surface ? { ...route, surface } : route;\n}\n\nfunction isSurfaceRouteActive(route: ExplorerRoute, surfaceKey: string) {\n return (\n (route.kind === \"surface\" && route.surfaceKey === surfaceKey) ||\n (route.kind === \"entity\" && route.surfaceKey === surfaceKey)\n );\n}\n\nfunction stripBasePath(pathname: string, basePath: string) {\n const base = trimTrailingSlash(basePath);\n if (!base || base === \"/\") {\n return trimTrailingSlash(pathname) || \"/\";\n }\n if (pathname === base) {\n return \"/\";\n }\n if (pathname.startsWith(`${base}/`)) {\n return trimTrailingSlash(pathname.slice(base.length)) || \"/\";\n }\n return trimTrailingSlash(pathname) || \"/\";\n}\n\nfunction UnknownSurface({ surfaceKey }: { surfaceKey: string }) {\n return (\n <div className=\"p-6 text-sm text-muted-foreground\">\n Unknown surface: <code>{surfaceKey}</code>\n </div>\n );\n}\n\nconst LEGACY_AUTORUN_QUERY_PARAM = \"__autoRun\";\n\ntype SurfaceGroup = {\n parent: string; // the slug; \"\" for surfaces that declared no parent\n label: string; // display name in the sidebar\n surfaces: ClickySurface[];\n};\n\n// groupSurfacesByParent buckets surfaces by their ClickySurface.parent slug,\n// preserving the order surfaces appeared in the spec. Surfaces with no parent\n// fall into a trailing \"\" bucket labelled \"Other\".\nfunction groupSurfacesByParent(surfaces: ClickySurface[]): SurfaceGroup[] {\n const order: string[] = [];\n const buckets = new Map<string, ClickySurface[]>();\n for (const surface of surfaces) {\n const parent = surface.parent ?? \"\";\n if (!buckets.has(parent)) {\n buckets.set(parent, []);\n order.push(parent);\n }\n buckets.get(parent)!.push(surface);\n }\n return order.map((parent) => ({\n parent,\n label: parent === \"\" ? \"Other\" : titleCase(parent),\n surfaces: buckets.get(parent)!,\n }));\n}\n\nfunction titleCase(value: string): string {\n if (!value) return value;\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction readCommandQueryParams(): { initialValues: Record<string, string>; autoRun: boolean } {\n if (typeof window === \"undefined\") {\n return { initialValues: {}, autoRun: false };\n }\n const search = new URLSearchParams(window.location.search);\n const initialValues: Record<string, string> = {};\n let autoRun = false;\n const positional: string[] = [];\n\n for (const [key, value] of search.entries()) {\n if (key === AUTORUN_QUERY_PARAM || key === LEGACY_AUTORUN_QUERY_PARAM) {\n autoRun = value === \"1\" || value === \"true\";\n continue;\n }\n if (key.startsWith(ARG_QUERY_PREFIX)) {\n const index = Number.parseInt(key.slice(ARG_QUERY_PREFIX.length), 10);\n if (Number.isFinite(index) && index >= 0) {\n positional[index] = value;\n }\n continue;\n }\n initialValues[key] = value;\n }\n\n const packedArgs = positional.filter((value) => value !== undefined).join(\" \");\n if (packedArgs !== \"\") {\n initialValues.args = packedArgs;\n }\n\n return { initialValues, autoRun };\n}\n"],"mappings":";;;;;;;;;;;;;;AAmFA,IAAM,wBAAwB;AAE9B,SAAgB,kBAAkB,EAChC,QACA,WAAW,IACX,kBAAkB,MAClB,SACA,gBACA,aACA,qBACA,gBACA,0BACA,4BACA,qBACA,yBACyB;CACzB,MAAM,UAAU,gBAAgB;CAChC,MAAM,WAAW,gBAAgB;CACjC,MAAM,EAAE,UAAU,YAAY,aAAaA,eAAAA,UAAU;CACrD,MAAM,EAAE,SAASC,sBAAAA,cAAc,MAAM;CACrC,MAAM,YAAA,GAAWC,MAAAA,QAAAA,OAAcC,uBAAAA,kBAAkB,IAAI,GAAG,CAAC,IAAI,CAAC;CAC9D,MAAM,iBAAA,GAAgBD,MAAAA,QAAAA,OAAc,sBAAsB,QAAQ,GAAG,CAAC,QAAQ,CAAC;CAC/E,MAAM,kBAAA,GAAiBA,MAAAA,QAAAA,OACf,SAAS,MAAM,YAAY,CAAC,QAAQ,KAAK,KAAK,SAAS,IAC7D,CAAC,QAAQ,CACX;CACA,MAAM,gBAAA,GAAeA,MAAAA,QAAAA,OAAc,cAAc,UAAU,QAAQ,GAAG,CAAC,UAAU,QAAQ,CAAC;CAC1F,MAAM,SAAA,GAAQA,MAAAA,QAAAA,OAAc,mBAAmB,YAAY,GAAG,CAAC,YAAY,CAAC;CAC5E,MAAM,iBAAA,GAAgBA,MAAAA,QAAAA,OAAc,oBAAoB,OAAO,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC;CAC3F,MAAM,kBAAA,GAAiBA,MAAAA,QAAAA,QACd;EACL;EACA,iBAAiB,aAAaE,oBAAAA,iBAAiB,UAAU,QAAQ;EACjE,aAAa,aAAa;GACxB,MAAM,OAAOA,oBAAAA,iBAAiB,UAAU,QAAQ;GAChD,IAAI,CA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CACvB;CAEA,MAAM,aAAa,WAAW,QAAQ,UAAU,UAAU,KAAA,CAAS,CAAC,CAAC,KAAK,GAAG;CAC7E,IAAI,eAAe,IACjB,cAAc,OAAO;CAGvB,OAAO;EAAE;EAAe;CAAQ;AAClC"}
|
|
1
|
+
{"version":3,"file":"EntityExplorerApp.cjs","names":["useRouter","useOperations","useMemo","getClickySurfaces","buildCommandHref","surfaceNavSection","withBasePath","useState","useCallback","AppShell","ThemeSwitcher","_Fragment","makeSurfaceDefinition","OperationCatalog","OperationEntityPage","OperationCommandPage","ExplorerNavContext","trimTrailingSlash","ARG_QUERY_PREFIX"],"sources":["../../src/rpc/EntityExplorerApp.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ExplorerNavContext, type ExplorerNavSlot } from \"./explorer-nav-context\";\nimport { ThemeSwitcher } from \"../components/theme-switcher\";\nimport type { PreExtension, PostExtension } from \"../components/json-schema-form-types\";\nimport type { ClickyCommandRuntime } from \"../data/Clicky\";\nimport { AppShell, type AppShellNavSection } from \"../layout/AppShell\";\nimport { getClickySurfaces, makeSurfaceDefinition } from \"./clickyMetadata\";\nimport {\n ARG_QUERY_PREFIX,\n AUTORUN_QUERY_PARAM,\n buildCommandHref,\n trimTrailingSlash,\n withBasePath,\n} from \"./commandHref\";\nimport { useRouter } from \"./router\";\nimport { OperationCatalog } from \"./OperationCatalog\";\nimport type { ResultRenderer } from \"./OperationResultView\";\nimport { OperationCommandPage } from \"./OperationCommandPage\";\nimport {\n OperationEntityPage,\n type EntityDetailBodyRenderer,\n type EntityDetailHeaderRenderer,\n} from \"./OperationEntityPage\";\nimport type { FormActionsRenderer } from \"./SchemaActionForm\";\nimport { surfaceNavSection } from \"./surfaceNav\";\nimport type { ClickySurface } from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\nimport { useOperations } from \"./useOperations\";\n\nexport type SurfaceActionLabels = Record<string, Record<string, string>>;\n\nexport type EntityExplorerAppProps = {\n client: OperationsApiClient;\n basePath?: string;\n showApiExplorer?: boolean;\n /** Right-aligned top-bar cluster forwarded to AppShell's actions slot. */\n actions?: ReactNode;\n /**\n * Custom JsonSchemaForm field extensions applied to every create/edit form the\n * explorer renders — e.g. a SecretKeySelector widget keyed on an\n * `x-clicky-component` schema hint. `pre` transforms a resolved control; `post`\n * can replace the rendered value node with a custom component.\n */\n formExtensions?: { pre?: PreExtension[]; post?: PostExtension[] };\n /**\n * Optional extra footer actions added to every create/edit form (e.g. a\n * connection \"Test\" split-button). The renderer receives the live form value\n * and the action it submits to, so it can scope itself to a given entity.\n */\n formActions?: FormActionsRenderer;\n /** Per-surface labels keyed by x-clicky verb/actionName. */\n surfaceActionLabels?: SurfaceActionLabels;\n /**\n * @deprecated Superseded by per-surface icons emitted by the backend\n * (x-clicky-icon → ClickySurface.icon). AppShell section labels are plain\n * strings, so this group-header icon map is no longer rendered. Kept for\n * source-compatibility only.\n */\n surfaceIcons?: Record<string, ReactNode>;\n /**\n * Optional host override for the result surface. Called where an entity's\n * result table renders, with the current surface key, the raw response, and\n * the default OperationResultView element. Return `defaultView` to keep the\n * standard table, or a custom node (e.g. a LogsTable for trace/log profiles\n * flagged via x-clicky-render). Filtering/sorting policy is the host's choice.\n */\n resultRenderer?: ResultRenderer;\n /** Host override for a loaded entity's body; heading and actions remain. */\n entityDetailBodyRenderer?: EntityDetailBodyRenderer;\n /** Host override for a loaded entity's \"{title}: {id}\" heading. */\n entityDetailHeaderRenderer?: EntityDetailHeaderRenderer;\n /** Compact host controls (e.g. an edit icon) shown right after a surface's title or breadcrumb in the top bar. */\n surfaceTitleActions?: (surfaceKey: string) => ReactNode;\n /**\n * Per-surface paging presentation, forwarded to OperationCatalog's\n * `paginationMode`. Return undefined to keep automatic selection (a cursor\n * walk whenever the list declares a cursor); return \"paged\" for a surface\n * whose readers need prev/next offset controls.\n */\n surfacePaginationMode?: (surfaceKey: string) => \"paged\" | \"infinite\" | undefined;\n /**\n * Narrows which surfaces the sidebar lists (e.g. only the profiles that use a\n * chosen connection). It is navigation-only: a route that names a hidden\n * surface still resolves and renders, so a bookmark or a link never 404s\n * because of a filter the reader set elsewhere.\n */\n surfaceFilter?: (surface: ClickySurface) => boolean;\n /**\n * Parameter values the host pins on a surface's list request (and its\n * lookups and exports) — forwarded to OperationCatalog's `lockedValues`, so\n * they are never editable filters or written to the URL. Return undefined\n * for a surface that has none. A value that changes re-queries the surface.\n */\n surfaceLockedValues?: (surfaceKey: string) => Record<string, string> | undefined;\n};\n\n// SIDEBAR_COLLAPSED_KEY persists the AppShell rail collapsed flag across reloads.\nconst SIDEBAR_COLLAPSED_KEY = \"clicky-ui:sidebar:collapsed\";\n\nexport function EntityExplorerApp({\n client,\n basePath = \"\",\n showApiExplorer = true,\n actions,\n formExtensions,\n formActions,\n surfaceActionLabels,\n resultRenderer,\n entityDetailBodyRenderer,\n entityDetailHeaderRenderer,\n surfaceTitleActions,\n surfacePaginationMode,\n surfaceFilter,\n surfaceLockedValues,\n}: EntityExplorerAppProps) {\n const formPre = formExtensions?.pre;\n const formPost = formExtensions?.post;\n const { pathname, renderLink, navigate } = useRouter();\n const { spec } = useOperations(client);\n const surfaces = useMemo(() => getClickySurfaces(spec), [spec]);\n const navSurfaces = useMemo(\n () => (surfaceFilter ? surfaces.filter(surfaceFilter) : surfaces),\n [surfaces, surfaceFilter],\n );\n const surfaceGroups = useMemo(() => groupSurfacesByParent(navSurfaces), [navSurfaces]);\n const defaultSurface = useMemo(\n () => surfaces.find((surface) => !surface.admin) ?? surfaces[0],\n [surfaces],\n );\n const relativePath = useMemo(() => stripBasePath(pathname, basePath), [basePath, pathname]);\n const route = useMemo(() => parseExplorerRoute(relativePath), [relativePath]);\n const resolvedRoute = useMemo(() => resolveRouteSurface(route, surfaces), [route, surfaces]);\n const commandRuntime = useMemo<ClickyCommandRuntime>(\n () => ({\n client,\n hrefForCommand: (resolved) => buildCommandHref(basePath, resolved),\n onNavigate: (resolved) => {\n const href = buildCommandHref(basePath, resolved);\n if (!href) return;\n navigate(href);\n },\n }),\n [basePath, client, navigate],\n );\n const { initialValues: commandInitialValues } = useMemo(\n () =>\n resolvedRoute.kind === \"command\"\n ? readCommandQueryParams()\n : { initialValues: {}, autoRun: false },\n [resolvedRoute.kind, pathname],\n );\n const explorerDefinition = useMemo(\n () => ({\n key: \"explorer\",\n title: \"API Explorer\",\n description: \"Every operation exposed by the current OpenAPI spec.\",\n }),\n [],\n );\n const navSections = useMemo<AppShellNavSection[]>(() => {\n const sections: AppShellNavSection[] = surfaceGroups.map((group) =>\n surfaceNavSection(group.label, group.surfaces, {\n isActive: (surface) => isSurfaceRouteActive(resolvedRoute, surface.key),\n hrefFor: (surface) => withBasePath(basePath, `/${surface.key}`),\n }),\n );\n if (showApiExplorer) {\n sections.push({\n items: [\n {\n key: explorerDefinition.key,\n label: explorerDefinition.title,\n active: resolvedRoute.kind === \"explorer\" || resolvedRoute.kind === \"command\",\n to: withBasePath(basePath, \"/explorer\"),\n },\n ],\n });\n }\n return sections;\n }, [surfaceGroups, basePath, resolvedRoute, showApiExplorer, explorerDefinition]);\n\n const [navContainer, setNavContainer] = useState<HTMLElement | null>(null);\n const [navClaims, setNavClaims] = useState(0);\n const claimNav = useCallback(() => {\n setNavClaims((count) => count + 1);\n return () => setNavClaims((count) => count - 1);\n }, []);\n const surface = resolvedRoute.kind === \"surface\" ? resolvedRoute.surface : undefined;\n const titleActions = surface ? surfaceTitleActions?.(surface.key) : undefined;\n const paginationMode = surface ? surfacePaginationMode?.(surface.key) : undefined;\n // Keyed by content so a host function that rebuilds an equal object every\n // render does not re-query the surface.\n const lockedValuesKey = JSON.stringify((surface && surfaceLockedValues?.(surface.key)) ?? null);\n const lockedValues = useMemo(\n () => (JSON.parse(lockedValuesKey) as Record<string, string> | null) ?? undefined,\n [lockedValuesKey],\n );\n // The container only exists while a surface is resolved, so a portal\n // mounted before the spec loads renders nothing rather than a bare crumb.\n const navSlot = useMemo<ExplorerNavSlot>(\n () => ({\n container: surface ? navContainer : null,\n title: surface?.title ?? \"\",\n titleActions,\n claim: claimNav,\n }),\n [claimNav, navContainer, surface, titleActions],\n );\n\n useEffect(() => {\n if (defaultSurface == null || relativePath !== \"/\") return;\n navigate(withBasePath(basePath, `/${defaultSurface.key}`), { replace: true });\n }, [basePath, defaultSurface, relativePath, navigate]);\n\n const content = (\n <AppShell\n brand={\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold\">\n {spec?.info.title ?? \"Clicky Explorer\"}\n </div>\n <div className=\"truncate text-xs text-sidebar-foreground/60\">\n Metadata-driven entity explorer\n </div>\n </div>\n }\n navSections={navSections}\n sidebarFooter={<ThemeSwitcher />}\n {...(actions ? { actions } : {})}\n // The page header belongs to the host, not to OperationCatalog — the\n // catalog renders only its results. OperationEntityPage still titles\n // itself, so this covers the collection route only.\n //\n // It rides in the top bar rather than a bodyHeader row: next to the rail\n // that bar is otherwise empty, and the row it replaces cost the result\n // table ~72px of the viewport it needs to keep its sticky head and\n // pagination footer on screen without the page itself scrolling.\n {...(resolvedRoute.kind === \"surface\" && resolvedRoute.surface\n ? {\n nav: (\n <>\n {navClaims === 0 && (\n <div className=\"flex min-w-0 flex-1 items-baseline gap-density-2\">\n <h1 className=\"min-w-0 truncate text-base font-semibold tracking-tight\">\n {resolvedRoute.surface.title}\n </h1>\n {titleActions ? (\n <div className=\"flex shrink-0 items-center self-center\">{titleActions}</div>\n ) : null}\n <p className=\"hidden min-w-0 truncate text-sm text-muted-foreground lg:block\">\n {makeSurfaceDefinition(resolvedRoute.surface).description}\n </p>\n </div>\n )}\n <div ref={setNavContainer} data-slot=\"explorer-nav\" className=\"contents\" />\n </>\n ),\n }\n : {})}\n collapsedStorageKey={SIDEBAR_COLLAPSED_KEY}\n // Results are wide tables, not prose — let them use the whole workspace\n // instead of the centred reading column.\n contentWidth=\"full\"\n contentClassName=\"p-6\"\n >\n {resolvedRoute.kind === \"surface\" ? (\n resolvedRoute.surface ? (\n <OperationCatalog\n // Filter state is seeded from the URL when the catalog mounts and\n // written back to it, so one instance spanning two surfaces would\n // carry the first surface's filters onto the second's URL. Keying\n // on the surface makes each one start from its own query string.\n key={resolvedRoute.surface.key}\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(resultRenderer ? { resultRenderer } : {})}\n {...(paginationMode ? { paginationMode } : {})}\n {...(lockedValues ? { lockedValues } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"entity\" ? (\n resolvedRoute.surface ? (\n <OperationEntityPage\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n backHref={withBasePath(basePath, `/${resolvedRoute.surface.key}`)}\n backLabel={`Back to ${resolvedRoute.surface.title}`}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(entityDetailBodyRenderer ? { entityDetailBodyRenderer } : {})}\n {...(entityDetailHeaderRenderer ? { entityDetailHeaderRenderer } : {})}\n {...(resolvedRoute.id ? { id: resolvedRoute.id } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"command\" ? (\n <OperationCommandPage\n client={client}\n backHref={withBasePath(basePath, \"/explorer\")}\n backLabel=\"Back to API Explorer\"\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n initialValues={commandInitialValues}\n autoRun={true}\n {...(resolvedRoute.operationId ? { operationId: resolvedRoute.operationId } : {})}\n />\n ) : resolvedRoute.kind === \"explorer\" ? (\n <OperationCatalog\n definition={explorerDefinition}\n entities={[]}\n allOperations\n client={client}\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n />\n ) : defaultSurface == null ? (\n <div className=\"text-sm text-muted-foreground\">Loading surfaces…</div>\n ) : (\n <div className=\"text-sm text-muted-foreground\">Redirecting…</div>\n )}\n </AppShell>\n );\n\n return <ExplorerNavContext.Provider value={navSlot}>{content}</ExplorerNavContext.Provider>;\n}\n\ntype ExplorerRoute =\n | { kind: \"root\" }\n | { kind: \"explorer\" }\n | { kind: \"command\"; operationId?: string }\n | { kind: \"surface\"; surfaceKey: string; surface?: ClickySurface }\n | {\n kind: \"entity\";\n surfaceKey: string;\n surface?: ClickySurface;\n id?: string;\n };\n\nfunction parseExplorerRoute(pathname: string): ExplorerRoute {\n const normalized = trimTrailingSlash(pathname) || \"/\";\n if (normalized === \"/\") {\n return { kind: \"root\" };\n }\n\n const segments = normalized.replace(/^\\/+/, \"\").split(\"/\");\n if (segments[0] === \"explorer\") {\n return { kind: \"explorer\" };\n }\n if (segments[0] === \"commands\") {\n return segments[1] ? { kind: \"command\", operationId: segments[1] } : { kind: \"command\" };\n }\n const surfaceKey = segments[0] ?? \"\";\n if (segments[1]) {\n return {\n kind: \"entity\",\n surfaceKey,\n id: decodeURIComponent(segments[1]),\n };\n }\n return { kind: \"surface\", surfaceKey };\n}\n\nfunction resolveRouteSurface(route: ExplorerRoute, surfaces: ClickySurface[]): ExplorerRoute {\n if (route.kind !== \"surface\" && route.kind !== \"entity\") {\n return route;\n }\n const surface = surfaces.find((item) => item.key === route.surfaceKey);\n return surface ? { ...route, surface } : route;\n}\n\nfunction isSurfaceRouteActive(route: ExplorerRoute, surfaceKey: string) {\n return (\n (route.kind === \"surface\" && route.surfaceKey === surfaceKey) ||\n (route.kind === \"entity\" && route.surfaceKey === surfaceKey)\n );\n}\n\nfunction stripBasePath(pathname: string, basePath: string) {\n const base = trimTrailingSlash(basePath);\n if (!base || base === \"/\") {\n return trimTrailingSlash(pathname) || \"/\";\n }\n if (pathname === base) {\n return \"/\";\n }\n if (pathname.startsWith(`${base}/`)) {\n return trimTrailingSlash(pathname.slice(base.length)) || \"/\";\n }\n return trimTrailingSlash(pathname) || \"/\";\n}\n\nfunction UnknownSurface({ surfaceKey }: { surfaceKey: string }) {\n return (\n <div className=\"p-6 text-sm text-muted-foreground\">\n Unknown surface: <code>{surfaceKey}</code>\n </div>\n );\n}\n\nconst LEGACY_AUTORUN_QUERY_PARAM = \"__autoRun\";\n\ntype SurfaceGroup = {\n parent: string; // the slug; \"\" for surfaces that declared no parent\n label: string; // display name in the sidebar\n surfaces: ClickySurface[];\n};\n\n// groupSurfacesByParent buckets surfaces by their ClickySurface.parent slug,\n// preserving the order surfaces appeared in the spec. Surfaces with no parent\n// fall into a trailing \"\" bucket labelled \"Other\".\nfunction groupSurfacesByParent(surfaces: ClickySurface[]): SurfaceGroup[] {\n const order: string[] = [];\n const buckets = new Map<string, ClickySurface[]>();\n for (const surface of surfaces) {\n const parent = surface.parent ?? \"\";\n if (!buckets.has(parent)) {\n buckets.set(parent, []);\n order.push(parent);\n }\n buckets.get(parent)!.push(surface);\n }\n return order.map((parent) => ({\n parent,\n label: parent === \"\" ? \"Other\" : titleCase(parent),\n surfaces: buckets.get(parent)!,\n }));\n}\n\nfunction titleCase(value: string): string {\n if (!value) return value;\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction readCommandQueryParams(): { initialValues: Record<string, string>; autoRun: boolean } {\n if (typeof window === \"undefined\") {\n return { initialValues: {}, autoRun: false };\n }\n const search = new URLSearchParams(window.location.search);\n const initialValues: Record<string, string> = {};\n let autoRun = false;\n const positional: string[] = [];\n\n for (const [key, value] of search.entries()) {\n if (key === AUTORUN_QUERY_PARAM || key === LEGACY_AUTORUN_QUERY_PARAM) {\n autoRun = value === \"1\" || value === \"true\";\n continue;\n }\n if (key.startsWith(ARG_QUERY_PREFIX)) {\n const index = Number.parseInt(key.slice(ARG_QUERY_PREFIX.length), 10);\n if (Number.isFinite(index) && index >= 0) {\n positional[index] = value;\n }\n continue;\n }\n initialValues[key] = value;\n }\n\n const packedArgs = positional.filter((value) => value !== undefined).join(\" \");\n if (packedArgs !== \"\") {\n initialValues.args = packedArgs;\n }\n\n return { initialValues, autoRun };\n}\n"],"mappings":";;;;;;;;;;;;;;AAiGA,IAAM,wBAAwB;AAE9B,SAAgB,kBAAkB,EAChC,QACA,WAAW,IACX,kBAAkB,MAClB,SACA,gBACA,aACA,qBACA,gBACA,0BACA,4BACA,qBACA,uBACA,eACA,uBACyB;CACzB,MAAM,UAAU,gBAAgB;CAChC,MAAM,WAAW,gBAAgB;CACjC,MAAM,EAAE,UAAU,YAAY,aAAaA,eAAAA,UAAU;CACrD,MAAM,EAAE,SAASC,sBAAAA,cAAc,MAAM;CACrC,MAAM,YAAA,GAAWC,MAAAA,QAAAA,OAAcC,uBAAAA,kBAAkB,IAAI,GAAG,CAAC,IAAI,CAAC;CAC9D,MAAM,eAAA,GAAcD,MAAAA,QAAAA,OACX,gBAAgB,SAAS,OAAO,aAAa,IAAI,UACxD,CAAC,UAAU,aAAa,CAC1B;CACA,MAAM,iBAAA,GAAgBA,MAAAA,QAAAA,OAAc,sBAAsB,WAAW,GAAG,CAAC,WAAW,CAAC;CACrF,MAAM,kBAAA,GAAiBA,MAAAA,QAAAA,OACf,SAAS,MAAM,YAAY,CAAC,QAAQ,KAAK,KAAK,SAAS,IAC7D,CAAC,QAAQ,CACX;CACA,MAAM,gBAAA,GAAeA,MAAAA,QAAAA,OAAc,cAAc,UAAU,QAAQ,GAAG,CAAC,UAAU,QAAQ,CAAC;CAC1F,MAAM,SAAA,GAAQA,MAAAA,QAAAA,OAAc,mBAAmB,YAAY,GAAG,CAAC,YAAY,CAAC;C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AAO;EAAE,eAAe,CAAC;EAAG,SAAS;CAAM;CAE7C,MAAM,SAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM;CACzD,MAAM,gBAAwC,CAAC;CAC/C,IAAI,UAAU;CACd,MAAM,aAAuB,CAAC;CAE9B,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG;EAC3C,IAAI,QAAA,aAA+B,QAAQ,4BAA4B;GACrE,UAAU,UAAU,OAAO,UAAU;GACrC;EACF;EACA,IAAI,IAAI,WAAA,OAA2B,GAAG;GACpC,MAAM,QAAQ,OAAO,SAAS,IAAI,MAAMC,oBAAAA,iBAAiB,MAAM,GAAG,EAAE;GACpE,IAAI,OAAO,SAAS,KAAK,KAAK,SAAS,GACrC,WAAW,SAAS;GAEtB;EACF;EACA,cAAc,OAAO;CACvB;CAEA,MAAM,aAAa,WAAW,QAAQ,UAAU,UAAU,KAAA,CAAS,CAAC,CAAC,KAAK,GAAG;CAC7E,IAAI,eAAe,IACjB,cAAc,OAAO;CAGvB,OAAO;EAAE;EAAe;CAAQ;AAClC"}
|
|
@@ -3,6 +3,7 @@ import { PreExtension, PostExtension } from '../components/json-schema-form-type
|
|
|
3
3
|
import { ResultRenderer } from './OperationResultView.js';
|
|
4
4
|
import { EntityDetailBodyRenderer, EntityDetailHeaderRenderer } from './OperationEntityPage.js';
|
|
5
5
|
import { FormActionsRenderer } from './SchemaActionForm.js';
|
|
6
|
+
import { ClickySurface } from './types.js';
|
|
6
7
|
import { OperationsApiClient } from './useOperations.js';
|
|
7
8
|
export type SurfaceActionLabels = Record<string, Record<string, string>>;
|
|
8
9
|
export type EntityExplorerAppProps = {
|
|
@@ -57,6 +58,20 @@ export type EntityExplorerAppProps = {
|
|
|
57
58
|
* whose readers need prev/next offset controls.
|
|
58
59
|
*/
|
|
59
60
|
surfacePaginationMode?: (surfaceKey: string) => "paged" | "infinite" | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Narrows which surfaces the sidebar lists (e.g. only the profiles that use a
|
|
63
|
+
* chosen connection). It is navigation-only: a route that names a hidden
|
|
64
|
+
* surface still resolves and renders, so a bookmark or a link never 404s
|
|
65
|
+
* because of a filter the reader set elsewhere.
|
|
66
|
+
*/
|
|
67
|
+
surfaceFilter?: (surface: ClickySurface) => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Parameter values the host pins on a surface's list request (and its
|
|
70
|
+
* lookups and exports) — forwarded to OperationCatalog's `lockedValues`, so
|
|
71
|
+
* they are never editable filters or written to the URL. Return undefined
|
|
72
|
+
* for a surface that has none. A value that changes re-queries the surface.
|
|
73
|
+
*/
|
|
74
|
+
surfaceLockedValues?: (surfaceKey: string) => Record<string, string> | undefined;
|
|
60
75
|
};
|
|
61
|
-
export declare function EntityExplorerApp({ client, basePath, showApiExplorer, actions, formExtensions, formActions, surfaceActionLabels, resultRenderer, entityDetailBodyRenderer, entityDetailHeaderRenderer, surfaceTitleActions, surfacePaginationMode, }: EntityExplorerAppProps): import("react").JSX.Element;
|
|
76
|
+
export declare function EntityExplorerApp({ client, basePath, showApiExplorer, actions, formExtensions, formActions, surfaceActionLabels, resultRenderer, entityDetailBodyRenderer, entityDetailHeaderRenderer, surfaceTitleActions, surfacePaginationMode, surfaceFilter, surfaceLockedValues, }: EntityExplorerAppProps): import("react").JSX.Element;
|
|
62
77
|
//# sourceMappingURL=EntityExplorerApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityExplorerApp.d.ts","sourceRoot":"","sources":["../../src/rpc/EntityExplorerApp.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlF,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAaxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAChC,MAAM,uBAAu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AAC;IACzC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,4EAA4E;IAC5E,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,mEAAmE;IACnE,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD,kHAAkH;IAClH,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,CAAC;IACxD;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;IACjF;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;IACpD;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CAClF,CAAC;AAKF,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAa,EACb,eAAsB,EACtB,OAAO,EACP,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,mBAAmB,GACpB,EAAE,sBAAsB,+BAuOxB"}
|
|
@@ -13,13 +13,14 @@ import { useCallback, useEffect, useMemo, useState } from "react";
|
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
// src/rpc/EntityExplorerApp.tsx
|
|
15
15
|
var SIDEBAR_COLLAPSED_KEY = "clicky-ui:sidebar:collapsed";
|
|
16
|
-
function EntityExplorerApp({ client, basePath = "", showApiExplorer = true, actions, formExtensions, formActions, surfaceActionLabels, resultRenderer, entityDetailBodyRenderer, entityDetailHeaderRenderer, surfaceTitleActions, surfacePaginationMode }) {
|
|
16
|
+
function EntityExplorerApp({ client, basePath = "", showApiExplorer = true, actions, formExtensions, formActions, surfaceActionLabels, resultRenderer, entityDetailBodyRenderer, entityDetailHeaderRenderer, surfaceTitleActions, surfacePaginationMode, surfaceFilter, surfaceLockedValues }) {
|
|
17
17
|
const formPre = formExtensions?.pre;
|
|
18
18
|
const formPost = formExtensions?.post;
|
|
19
19
|
const { pathname, renderLink, navigate } = useRouter();
|
|
20
20
|
const { spec } = useOperations(client);
|
|
21
21
|
const surfaces = useMemo(() => getClickySurfaces(spec), [spec]);
|
|
22
|
-
const
|
|
22
|
+
const navSurfaces = useMemo(() => surfaceFilter ? surfaces.filter(surfaceFilter) : surfaces, [surfaces, surfaceFilter]);
|
|
23
|
+
const surfaceGroups = useMemo(() => groupSurfacesByParent(navSurfaces), [navSurfaces]);
|
|
23
24
|
const defaultSurface = useMemo(() => surfaces.find((surface) => !surface.admin) ?? surfaces[0], [surfaces]);
|
|
24
25
|
const relativePath = useMemo(() => stripBasePath(pathname, basePath), [basePath, pathname]);
|
|
25
26
|
const route = useMemo(() => parseExplorerRoute(relativePath), [relativePath]);
|
|
@@ -74,6 +75,8 @@ function EntityExplorerApp({ client, basePath = "", showApiExplorer = true, acti
|
|
|
74
75
|
const surface = resolvedRoute.kind === "surface" ? resolvedRoute.surface : void 0;
|
|
75
76
|
const titleActions = surface ? surfaceTitleActions?.(surface.key) : void 0;
|
|
76
77
|
const paginationMode = surface ? surfacePaginationMode?.(surface.key) : void 0;
|
|
78
|
+
const lockedValuesKey = JSON.stringify((surface && surfaceLockedValues?.(surface.key)) ?? null);
|
|
79
|
+
const lockedValues = useMemo(() => JSON.parse(lockedValuesKey) ?? void 0, [lockedValuesKey]);
|
|
77
80
|
const navSlot = useMemo(() => ({
|
|
78
81
|
container: surface ? navContainer : null,
|
|
79
82
|
title: surface?.title ?? "",
|
|
@@ -144,7 +147,8 @@ function EntityExplorerApp({ client, basePath = "", showApiExplorer = true, acti
|
|
|
144
147
|
...formActions ? { formActions } : {},
|
|
145
148
|
...surfaceActionLabels?.[resolvedRoute.surface.key] ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] } : {},
|
|
146
149
|
...resultRenderer ? { resultRenderer } : {},
|
|
147
|
-
...paginationMode ? { paginationMode } : {}
|
|
150
|
+
...paginationMode ? { paginationMode } : {},
|
|
151
|
+
...lockedValues ? { lockedValues } : {}
|
|
148
152
|
}, resolvedRoute.surface.key) : /* @__PURE__ */ jsx(UnknownSurface, { surfaceKey: resolvedRoute.surfaceKey }) : resolvedRoute.kind === "entity" ? resolvedRoute.surface ? /* @__PURE__ */ jsx(OperationEntityPage, {
|
|
149
153
|
definition: makeSurfaceDefinition(resolvedRoute.surface),
|
|
150
154
|
entities: [resolvedRoute.surface.entity],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityExplorerApp.js","names":["_Fragment"],"sources":["../../src/rpc/EntityExplorerApp.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ExplorerNavContext, type ExplorerNavSlot } from \"./explorer-nav-context\";\nimport { ThemeSwitcher } from \"../components/theme-switcher\";\nimport type { PreExtension, PostExtension } from \"../components/json-schema-form-types\";\nimport type { ClickyCommandRuntime } from \"../data/Clicky\";\nimport { AppShell, type AppShellNavSection } from \"../layout/AppShell\";\nimport { getClickySurfaces, makeSurfaceDefinition } from \"./clickyMetadata\";\nimport {\n ARG_QUERY_PREFIX,\n AUTORUN_QUERY_PARAM,\n buildCommandHref,\n trimTrailingSlash,\n withBasePath,\n} from \"./commandHref\";\nimport { useRouter } from \"./router\";\nimport { OperationCatalog } from \"./OperationCatalog\";\nimport type { ResultRenderer } from \"./OperationResultView\";\nimport { OperationCommandPage } from \"./OperationCommandPage\";\nimport {\n OperationEntityPage,\n type EntityDetailBodyRenderer,\n type EntityDetailHeaderRenderer,\n} from \"./OperationEntityPage\";\nimport type { FormActionsRenderer } from \"./SchemaActionForm\";\nimport { surfaceNavSection } from \"./surfaceNav\";\nimport type { ClickySurface } from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\nimport { useOperations } from \"./useOperations\";\n\nexport type SurfaceActionLabels = Record<string, Record<string, string>>;\n\nexport type EntityExplorerAppProps = {\n client: OperationsApiClient;\n basePath?: string;\n showApiExplorer?: boolean;\n /** Right-aligned top-bar cluster forwarded to AppShell's actions slot. */\n actions?: ReactNode;\n /**\n * Custom JsonSchemaForm field extensions applied to every create/edit form the\n * explorer renders — e.g. a SecretKeySelector widget keyed on an\n * `x-clicky-component` schema hint. `pre` transforms a resolved control; `post`\n * can replace the rendered value node with a custom component.\n */\n formExtensions?: { pre?: PreExtension[]; post?: PostExtension[] };\n /**\n * Optional extra footer actions added to every create/edit form (e.g. a\n * connection \"Test\" split-button). The renderer receives the live form value\n * and the action it submits to, so it can scope itself to a given entity.\n */\n formActions?: FormActionsRenderer;\n /** Per-surface labels keyed by x-clicky verb/actionName. */\n surfaceActionLabels?: SurfaceActionLabels;\n /**\n * @deprecated Superseded by per-surface icons emitted by the backend\n * (x-clicky-icon → ClickySurface.icon). AppShell section labels are plain\n * strings, so this group-header icon map is no longer rendered. Kept for\n * source-compatibility only.\n */\n surfaceIcons?: Record<string, ReactNode>;\n /**\n * Optional host override for the result surface. Called where an entity's\n * result table renders, with the current surface key, the raw response, and\n * the default OperationResultView element. Return `defaultView` to keep the\n * standard table, or a custom node (e.g. a LogsTable for trace/log profiles\n * flagged via x-clicky-render). Filtering/sorting policy is the host's choice.\n */\n resultRenderer?: ResultRenderer;\n /** Host override for a loaded entity's body; heading and actions remain. */\n entityDetailBodyRenderer?: EntityDetailBodyRenderer;\n /** Host override for a loaded entity's \"{title}: {id}\" heading. */\n entityDetailHeaderRenderer?: EntityDetailHeaderRenderer;\n /** Compact host controls (e.g. an edit icon) shown right after a surface's title or breadcrumb in the top bar. */\n surfaceTitleActions?: (surfaceKey: string) => ReactNode;\n /**\n * Per-surface paging presentation, forwarded to OperationCatalog's\n * `paginationMode`. Return undefined to keep automatic selection (a cursor\n * walk whenever the list declares a cursor); return \"paged\" for a surface\n * whose readers need prev/next offset controls.\n */\n surfacePaginationMode?: (surfaceKey: string) => \"paged\" | \"infinite\" | undefined;\n};\n\n// SIDEBAR_COLLAPSED_KEY persists the AppShell rail collapsed flag across reloads.\nconst SIDEBAR_COLLAPSED_KEY = \"clicky-ui:sidebar:collapsed\";\n\nexport function EntityExplorerApp({\n client,\n basePath = \"\",\n showApiExplorer = true,\n actions,\n formExtensions,\n formActions,\n surfaceActionLabels,\n resultRenderer,\n entityDetailBodyRenderer,\n entityDetailHeaderRenderer,\n surfaceTitleActions,\n surfacePaginationMode,\n}: EntityExplorerAppProps) {\n const formPre = formExtensions?.pre;\n const formPost = formExtensions?.post;\n const { pathname, renderLink, navigate } = useRouter();\n const { spec } = useOperations(client);\n const surfaces = useMemo(() => getClickySurfaces(spec), [spec]);\n const surfaceGroups = useMemo(() => groupSurfacesByParent(surfaces), [surfaces]);\n const defaultSurface = useMemo(\n () => surfaces.find((surface) => !surface.admin) ?? surfaces[0],\n [surfaces],\n );\n const relativePath = useMemo(() => stripBasePath(pathname, basePath), [basePath, pathname]);\n const route = useMemo(() => parseExplorerRoute(relativePath), [relativePath]);\n const resolvedRoute = useMemo(() => resolveRouteSurface(route, surfaces), [route, surfaces]);\n const commandRuntime = useMemo<ClickyCommandRuntime>(\n () => ({\n client,\n hrefForCommand: (resolved) => buildCommandHref(basePath, resolved),\n onNavigate: (resolved) => {\n const href = buildCommandHref(basePath, resolved);\n if (!href) return;\n navigate(href);\n },\n }),\n [basePath, client, navigate],\n );\n const { initialValues: commandInitialValues } = useMemo(\n () =>\n resolvedRoute.kind === \"command\"\n ? readCommandQueryParams()\n : { initialValues: {}, autoRun: false },\n [resolvedRoute.kind, pathname],\n );\n const explorerDefinition = useMemo(\n () => ({\n key: \"explorer\",\n title: \"API Explorer\",\n description: \"Every operation exposed by the current OpenAPI spec.\",\n }),\n [],\n );\n const navSections = useMemo<AppShellNavSection[]>(() => {\n const sections: AppShellNavSection[] = surfaceGroups.map((group) =>\n surfaceNavSection(group.label, group.surfaces, {\n isActive: (surface) => isSurfaceRouteActive(resolvedRoute, surface.key),\n hrefFor: (surface) => withBasePath(basePath, `/${surface.key}`),\n }),\n );\n if (showApiExplorer) {\n sections.push({\n items: [\n {\n key: explorerDefinition.key,\n label: explorerDefinition.title,\n active: resolvedRoute.kind === \"explorer\" || resolvedRoute.kind === \"command\",\n to: withBasePath(basePath, \"/explorer\"),\n },\n ],\n });\n }\n return sections;\n }, [surfaceGroups, basePath, resolvedRoute, showApiExplorer, explorerDefinition]);\n\n const [navContainer, setNavContainer] = useState<HTMLElement | null>(null);\n const [navClaims, setNavClaims] = useState(0);\n const claimNav = useCallback(() => {\n setNavClaims((count) => count + 1);\n return () => setNavClaims((count) => count - 1);\n }, []);\n const surface = resolvedRoute.kind === \"surface\" ? resolvedRoute.surface : undefined;\n const titleActions = surface ? surfaceTitleActions?.(surface.key) : undefined;\n const paginationMode = surface ? surfacePaginationMode?.(surface.key) : undefined;\n // The container only exists while a surface is resolved, so a portal\n // mounted before the spec loads renders nothing rather than a bare crumb.\n const navSlot = useMemo<ExplorerNavSlot>(\n () => ({\n container: surface ? navContainer : null,\n title: surface?.title ?? \"\",\n titleActions,\n claim: claimNav,\n }),\n [claimNav, navContainer, surface, titleActions],\n );\n\n useEffect(() => {\n if (defaultSurface == null || relativePath !== \"/\") return;\n navigate(withBasePath(basePath, `/${defaultSurface.key}`), { replace: true });\n }, [basePath, defaultSurface, relativePath, navigate]);\n\n const content = (\n <AppShell\n brand={\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold\">\n {spec?.info.title ?? \"Clicky Explorer\"}\n </div>\n <div className=\"truncate text-xs text-sidebar-foreground/60\">\n Metadata-driven entity explorer\n </div>\n </div>\n }\n navSections={navSections}\n sidebarFooter={<ThemeSwitcher />}\n {...(actions ? { actions } : {})}\n // The page header belongs to the host, not to OperationCatalog — the\n // catalog renders only its results. OperationEntityPage still titles\n // itself, so this covers the collection route only.\n //\n // It rides in the top bar rather than a bodyHeader row: next to the rail\n // that bar is otherwise empty, and the row it replaces cost the result\n // table ~72px of the viewport it needs to keep its sticky head and\n // pagination footer on screen without the page itself scrolling.\n {...(resolvedRoute.kind === \"surface\" && resolvedRoute.surface\n ? {\n nav: (\n <>\n {navClaims === 0 && (\n <div className=\"flex min-w-0 flex-1 items-baseline gap-density-2\">\n <h1 className=\"min-w-0 truncate text-base font-semibold tracking-tight\">\n {resolvedRoute.surface.title}\n </h1>\n {titleActions ? (\n <div className=\"flex shrink-0 items-center self-center\">{titleActions}</div>\n ) : null}\n <p className=\"hidden min-w-0 truncate text-sm text-muted-foreground lg:block\">\n {makeSurfaceDefinition(resolvedRoute.surface).description}\n </p>\n </div>\n )}\n <div ref={setNavContainer} data-slot=\"explorer-nav\" className=\"contents\" />\n </>\n ),\n }\n : {})}\n collapsedStorageKey={SIDEBAR_COLLAPSED_KEY}\n // Results are wide tables, not prose — let them use the whole workspace\n // instead of the centred reading column.\n contentWidth=\"full\"\n contentClassName=\"p-6\"\n >\n {resolvedRoute.kind === \"surface\" ? (\n resolvedRoute.surface ? (\n <OperationCatalog\n // Filter state is seeded from the URL when the catalog mounts and\n // written back to it, so one instance spanning two surfaces would\n // carry the first surface's filters onto the second's URL. Keying\n // on the surface makes each one start from its own query string.\n key={resolvedRoute.surface.key}\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(resultRenderer ? { resultRenderer } : {})}\n {...(paginationMode ? { paginationMode } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"entity\" ? (\n resolvedRoute.surface ? (\n <OperationEntityPage\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n backHref={withBasePath(basePath, `/${resolvedRoute.surface.key}`)}\n backLabel={`Back to ${resolvedRoute.surface.title}`}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(entityDetailBodyRenderer ? { entityDetailBodyRenderer } : {})}\n {...(entityDetailHeaderRenderer ? { entityDetailHeaderRenderer } : {})}\n {...(resolvedRoute.id ? { id: resolvedRoute.id } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"command\" ? (\n <OperationCommandPage\n client={client}\n backHref={withBasePath(basePath, \"/explorer\")}\n backLabel=\"Back to API Explorer\"\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n initialValues={commandInitialValues}\n autoRun={true}\n {...(resolvedRoute.operationId ? { operationId: resolvedRoute.operationId } : {})}\n />\n ) : resolvedRoute.kind === \"explorer\" ? (\n <OperationCatalog\n definition={explorerDefinition}\n entities={[]}\n allOperations\n client={client}\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n />\n ) : defaultSurface == null ? (\n <div className=\"text-sm text-muted-foreground\">Loading surfaces…</div>\n ) : (\n <div className=\"text-sm text-muted-foreground\">Redirecting…</div>\n )}\n </AppShell>\n );\n\n return <ExplorerNavContext.Provider value={navSlot}>{content}</ExplorerNavContext.Provider>;\n}\n\ntype ExplorerRoute =\n | { kind: \"root\" }\n | { kind: \"explorer\" }\n | { kind: \"command\"; operationId?: string }\n | { kind: \"surface\"; surfaceKey: string; surface?: ClickySurface }\n | {\n kind: \"entity\";\n surfaceKey: string;\n surface?: ClickySurface;\n id?: string;\n };\n\nfunction parseExplorerRoute(pathname: string): ExplorerRoute {\n const normalized = trimTrailingSlash(pathname) || \"/\";\n if (normalized === \"/\") {\n return { kind: \"root\" };\n }\n\n const segments = normalized.replace(/^\\/+/, \"\").split(\"/\");\n if (segments[0] === \"explorer\") {\n return { kind: \"explorer\" };\n }\n if (segments[0] === \"commands\") {\n return segments[1] ? { kind: \"command\", operationId: segments[1] } : { kind: \"command\" };\n }\n const surfaceKey = segments[0] ?? \"\";\n if (segments[1]) {\n return {\n kind: \"entity\",\n surfaceKey,\n id: decodeURIComponent(segments[1]),\n };\n }\n return { kind: \"surface\", surfaceKey };\n}\n\nfunction resolveRouteSurface(route: ExplorerRoute, surfaces: ClickySurface[]): ExplorerRoute {\n if (route.kind !== \"surface\" && route.kind !== \"entity\") {\n return route;\n }\n const surface = surfaces.find((item) => item.key === route.surfaceKey);\n return surface ? { ...route, surface } : route;\n}\n\nfunction isSurfaceRouteActive(route: ExplorerRoute, surfaceKey: string) {\n return (\n (route.kind === \"surface\" && route.surfaceKey === surfaceKey) ||\n (route.kind === \"entity\" && route.surfaceKey === surfaceKey)\n );\n}\n\nfunction stripBasePath(pathname: string, basePath: string) {\n const base = trimTrailingSlash(basePath);\n if (!base || base === \"/\") {\n return trimTrailingSlash(pathname) || \"/\";\n }\n if (pathname === base) {\n return \"/\";\n }\n if (pathname.startsWith(`${base}/`)) {\n return trimTrailingSlash(pathname.slice(base.length)) || \"/\";\n }\n return trimTrailingSlash(pathname) || \"/\";\n}\n\nfunction UnknownSurface({ surfaceKey }: { surfaceKey: string }) {\n return (\n <div className=\"p-6 text-sm text-muted-foreground\">\n Unknown surface: <code>{surfaceKey}</code>\n </div>\n );\n}\n\nconst LEGACY_AUTORUN_QUERY_PARAM = \"__autoRun\";\n\ntype SurfaceGroup = {\n parent: string; // the slug; \"\" for surfaces that declared no parent\n label: string; // display name in the sidebar\n surfaces: ClickySurface[];\n};\n\n// groupSurfacesByParent buckets surfaces by their ClickySurface.parent slug,\n// preserving the order surfaces appeared in the spec. Surfaces with no parent\n// fall into a trailing \"\" bucket labelled \"Other\".\nfunction groupSurfacesByParent(surfaces: ClickySurface[]): SurfaceGroup[] {\n const order: string[] = [];\n const buckets = new Map<string, ClickySurface[]>();\n for (const surface of surfaces) {\n const parent = surface.parent ?? \"\";\n if (!buckets.has(parent)) {\n buckets.set(parent, []);\n order.push(parent);\n }\n buckets.get(parent)!.push(surface);\n }\n return order.map((parent) => ({\n parent,\n label: parent === \"\" ? \"Other\" : titleCase(parent),\n surfaces: buckets.get(parent)!,\n }));\n}\n\nfunction titleCase(value: string): string {\n if (!value) return value;\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction readCommandQueryParams(): { initialValues: Record<string, string>; autoRun: boolean } {\n if (typeof window === \"undefined\") {\n return { initialValues: {}, autoRun: false };\n }\n const search = new URLSearchParams(window.location.search);\n const initialValues: Record<string, string> = {};\n let autoRun = false;\n const positional: string[] = [];\n\n for (const [key, value] of search.entries()) {\n if (key === AUTORUN_QUERY_PARAM || key === LEGACY_AUTORUN_QUERY_PARAM) {\n autoRun = value === \"1\" || value === \"true\";\n continue;\n }\n if (key.startsWith(ARG_QUERY_PREFIX)) {\n const index = Number.parseInt(key.slice(ARG_QUERY_PREFIX.length), 10);\n if (Number.isFinite(index) && index >= 0) {\n positional[index] = value;\n }\n continue;\n }\n initialValues[key] = value;\n }\n\n const packedArgs = positional.filter((value) => value !== undefined).join(\" \");\n if (packedArgs !== \"\") {\n initialValues.args = packedArgs;\n }\n\n return { initialValues, autoRun };\n}\n"],"mappings":";;;;;;;;;;;;;;AAmFA,IAAM,wBAAwB;AAE9B,SAAgB,kBAAkB,EAChC,QACA,WAAW,IACX,kBAAkB,MAClB,SACA,gBACA,aACA,qBACA,gBACA,0BACA,4BACA,qBACA,yBACyB;CACzB,MAAM,UAAU,gBAAgB;CAChC,MAAM,WAAW,gBAAgB;CACjC,MAAM,EAAE,UAAU,YAA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AAG;GACxB,QAAQ,IAAI,QAAQ,CAAC,CAAC;GACtB,MAAM,KAAK,MAAM;EACnB;EACA,QAAQ,IAAI,MAAM,CAAC,CAAE,KAAK,OAAO;CACnC;CACA,OAAO,MAAM,KAAK,YAAY;EAC5B;EACA,OAAO,WAAW,KAAK,UAAU,UAAU,MAAM;EACjD,UAAU,QAAQ,IAAI,MAAM;CAC9B,EAAE;AACJ;AAEA,SAAS,UAAU,OAAuB;CACxC,IAAI,CAAC,OAAO,OAAO;CACnB,OAAO,MAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,MAAM,MAAM,CAAC;AACtD;AAEA,SAAS,yBAAsF;CAC7F,IAAI,OAAO,WAAW,aACpB,OAAO;EAAE,eAAe,CAAC;EAAG,SAAS;CAAM;CAE7C,MAAM,SAAS,IAAI,gBAAgB,OAAO,SAAS,MAAM;CACzD,MAAM,gBAAwC,CAAC;CAC/C,IAAI,UAAU;CACd,MAAM,aAAuB,CAAC;CAE9B,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG;EAC3C,IAAI,QAAA,aAA+B,QAAQ,4BAA4B;GACrE,UAAU,UAAU,OAAO,UAAU;GACrC;EACF;EACA,IAAI,IAAI,WAAA,OAA2B,GAAG;GACpC,MAAM,QAAQ,OAAO,SAAS,IAAI,MAAM,iBAAiB,MAAM,GAAG,EAAE;GACpE,IAAI,OAAO,SAAS,KAAK,KAAK,SAAS,GACrC,WAAW,SAAS;GAEtB;EACF;EACA,cAAc,OAAO;CACvB;CAEA,MAAM,aAAa,WAAW,QAAQ,UAAU,UAAU,KAAA,CAAS,CAAC,CAAC,KAAK,GAAG;CAC7E,IAAI,eAAe,IACjB,cAAc,OAAO;CAGvB,OAAO;EAAE;EAAe;CAAQ;AAClC"}
|
|
1
|
+
{"version":3,"file":"EntityExplorerApp.js","names":["_Fragment"],"sources":["../../src/rpc/EntityExplorerApp.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ExplorerNavContext, type ExplorerNavSlot } from \"./explorer-nav-context\";\nimport { ThemeSwitcher } from \"../components/theme-switcher\";\nimport type { PreExtension, PostExtension } from \"../components/json-schema-form-types\";\nimport type { ClickyCommandRuntime } from \"../data/Clicky\";\nimport { AppShell, type AppShellNavSection } from \"../layout/AppShell\";\nimport { getClickySurfaces, makeSurfaceDefinition } from \"./clickyMetadata\";\nimport {\n ARG_QUERY_PREFIX,\n AUTORUN_QUERY_PARAM,\n buildCommandHref,\n trimTrailingSlash,\n withBasePath,\n} from \"./commandHref\";\nimport { useRouter } from \"./router\";\nimport { OperationCatalog } from \"./OperationCatalog\";\nimport type { ResultRenderer } from \"./OperationResultView\";\nimport { OperationCommandPage } from \"./OperationCommandPage\";\nimport {\n OperationEntityPage,\n type EntityDetailBodyRenderer,\n type EntityDetailHeaderRenderer,\n} from \"./OperationEntityPage\";\nimport type { FormActionsRenderer } from \"./SchemaActionForm\";\nimport { surfaceNavSection } from \"./surfaceNav\";\nimport type { ClickySurface } from \"./types\";\nimport type { OperationsApiClient } from \"./useOperations\";\nimport { useOperations } from \"./useOperations\";\n\nexport type SurfaceActionLabels = Record<string, Record<string, string>>;\n\nexport type EntityExplorerAppProps = {\n client: OperationsApiClient;\n basePath?: string;\n showApiExplorer?: boolean;\n /** Right-aligned top-bar cluster forwarded to AppShell's actions slot. */\n actions?: ReactNode;\n /**\n * Custom JsonSchemaForm field extensions applied to every create/edit form the\n * explorer renders — e.g. a SecretKeySelector widget keyed on an\n * `x-clicky-component` schema hint. `pre` transforms a resolved control; `post`\n * can replace the rendered value node with a custom component.\n */\n formExtensions?: { pre?: PreExtension[]; post?: PostExtension[] };\n /**\n * Optional extra footer actions added to every create/edit form (e.g. a\n * connection \"Test\" split-button). The renderer receives the live form value\n * and the action it submits to, so it can scope itself to a given entity.\n */\n formActions?: FormActionsRenderer;\n /** Per-surface labels keyed by x-clicky verb/actionName. */\n surfaceActionLabels?: SurfaceActionLabels;\n /**\n * @deprecated Superseded by per-surface icons emitted by the backend\n * (x-clicky-icon → ClickySurface.icon). AppShell section labels are plain\n * strings, so this group-header icon map is no longer rendered. Kept for\n * source-compatibility only.\n */\n surfaceIcons?: Record<string, ReactNode>;\n /**\n * Optional host override for the result surface. Called where an entity's\n * result table renders, with the current surface key, the raw response, and\n * the default OperationResultView element. Return `defaultView` to keep the\n * standard table, or a custom node (e.g. a LogsTable for trace/log profiles\n * flagged via x-clicky-render). Filtering/sorting policy is the host's choice.\n */\n resultRenderer?: ResultRenderer;\n /** Host override for a loaded entity's body; heading and actions remain. */\n entityDetailBodyRenderer?: EntityDetailBodyRenderer;\n /** Host override for a loaded entity's \"{title}: {id}\" heading. */\n entityDetailHeaderRenderer?: EntityDetailHeaderRenderer;\n /** Compact host controls (e.g. an edit icon) shown right after a surface's title or breadcrumb in the top bar. */\n surfaceTitleActions?: (surfaceKey: string) => ReactNode;\n /**\n * Per-surface paging presentation, forwarded to OperationCatalog's\n * `paginationMode`. Return undefined to keep automatic selection (a cursor\n * walk whenever the list declares a cursor); return \"paged\" for a surface\n * whose readers need prev/next offset controls.\n */\n surfacePaginationMode?: (surfaceKey: string) => \"paged\" | \"infinite\" | undefined;\n /**\n * Narrows which surfaces the sidebar lists (e.g. only the profiles that use a\n * chosen connection). It is navigation-only: a route that names a hidden\n * surface still resolves and renders, so a bookmark or a link never 404s\n * because of a filter the reader set elsewhere.\n */\n surfaceFilter?: (surface: ClickySurface) => boolean;\n /**\n * Parameter values the host pins on a surface's list request (and its\n * lookups and exports) — forwarded to OperationCatalog's `lockedValues`, so\n * they are never editable filters or written to the URL. Return undefined\n * for a surface that has none. A value that changes re-queries the surface.\n */\n surfaceLockedValues?: (surfaceKey: string) => Record<string, string> | undefined;\n};\n\n// SIDEBAR_COLLAPSED_KEY persists the AppShell rail collapsed flag across reloads.\nconst SIDEBAR_COLLAPSED_KEY = \"clicky-ui:sidebar:collapsed\";\n\nexport function EntityExplorerApp({\n client,\n basePath = \"\",\n showApiExplorer = true,\n actions,\n formExtensions,\n formActions,\n surfaceActionLabels,\n resultRenderer,\n entityDetailBodyRenderer,\n entityDetailHeaderRenderer,\n surfaceTitleActions,\n surfacePaginationMode,\n surfaceFilter,\n surfaceLockedValues,\n}: EntityExplorerAppProps) {\n const formPre = formExtensions?.pre;\n const formPost = formExtensions?.post;\n const { pathname, renderLink, navigate } = useRouter();\n const { spec } = useOperations(client);\n const surfaces = useMemo(() => getClickySurfaces(spec), [spec]);\n const navSurfaces = useMemo(\n () => (surfaceFilter ? surfaces.filter(surfaceFilter) : surfaces),\n [surfaces, surfaceFilter],\n );\n const surfaceGroups = useMemo(() => groupSurfacesByParent(navSurfaces), [navSurfaces]);\n const defaultSurface = useMemo(\n () => surfaces.find((surface) => !surface.admin) ?? surfaces[0],\n [surfaces],\n );\n const relativePath = useMemo(() => stripBasePath(pathname, basePath), [basePath, pathname]);\n const route = useMemo(() => parseExplorerRoute(relativePath), [relativePath]);\n const resolvedRoute = useMemo(() => resolveRouteSurface(route, surfaces), [route, surfaces]);\n const commandRuntime = useMemo<ClickyCommandRuntime>(\n () => ({\n client,\n hrefForCommand: (resolved) => buildCommandHref(basePath, resolved),\n onNavigate: (resolved) => {\n const href = buildCommandHref(basePath, resolved);\n if (!href) return;\n navigate(href);\n },\n }),\n [basePath, client, navigate],\n );\n const { initialValues: commandInitialValues } = useMemo(\n () =>\n resolvedRoute.kind === \"command\"\n ? readCommandQueryParams()\n : { initialValues: {}, autoRun: false },\n [resolvedRoute.kind, pathname],\n );\n const explorerDefinition = useMemo(\n () => ({\n key: \"explorer\",\n title: \"API Explorer\",\n description: \"Every operation exposed by the current OpenAPI spec.\",\n }),\n [],\n );\n const navSections = useMemo<AppShellNavSection[]>(() => {\n const sections: AppShellNavSection[] = surfaceGroups.map((group) =>\n surfaceNavSection(group.label, group.surfaces, {\n isActive: (surface) => isSurfaceRouteActive(resolvedRoute, surface.key),\n hrefFor: (surface) => withBasePath(basePath, `/${surface.key}`),\n }),\n );\n if (showApiExplorer) {\n sections.push({\n items: [\n {\n key: explorerDefinition.key,\n label: explorerDefinition.title,\n active: resolvedRoute.kind === \"explorer\" || resolvedRoute.kind === \"command\",\n to: withBasePath(basePath, \"/explorer\"),\n },\n ],\n });\n }\n return sections;\n }, [surfaceGroups, basePath, resolvedRoute, showApiExplorer, explorerDefinition]);\n\n const [navContainer, setNavContainer] = useState<HTMLElement | null>(null);\n const [navClaims, setNavClaims] = useState(0);\n const claimNav = useCallback(() => {\n setNavClaims((count) => count + 1);\n return () => setNavClaims((count) => count - 1);\n }, []);\n const surface = resolvedRoute.kind === \"surface\" ? resolvedRoute.surface : undefined;\n const titleActions = surface ? surfaceTitleActions?.(surface.key) : undefined;\n const paginationMode = surface ? surfacePaginationMode?.(surface.key) : undefined;\n // Keyed by content so a host function that rebuilds an equal object every\n // render does not re-query the surface.\n const lockedValuesKey = JSON.stringify((surface && surfaceLockedValues?.(surface.key)) ?? null);\n const lockedValues = useMemo(\n () => (JSON.parse(lockedValuesKey) as Record<string, string> | null) ?? undefined,\n [lockedValuesKey],\n );\n // The container only exists while a surface is resolved, so a portal\n // mounted before the spec loads renders nothing rather than a bare crumb.\n const navSlot = useMemo<ExplorerNavSlot>(\n () => ({\n container: surface ? navContainer : null,\n title: surface?.title ?? \"\",\n titleActions,\n claim: claimNav,\n }),\n [claimNav, navContainer, surface, titleActions],\n );\n\n useEffect(() => {\n if (defaultSurface == null || relativePath !== \"/\") return;\n navigate(withBasePath(basePath, `/${defaultSurface.key}`), { replace: true });\n }, [basePath, defaultSurface, relativePath, navigate]);\n\n const content = (\n <AppShell\n brand={\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold\">\n {spec?.info.title ?? \"Clicky Explorer\"}\n </div>\n <div className=\"truncate text-xs text-sidebar-foreground/60\">\n Metadata-driven entity explorer\n </div>\n </div>\n }\n navSections={navSections}\n sidebarFooter={<ThemeSwitcher />}\n {...(actions ? { actions } : {})}\n // The page header belongs to the host, not to OperationCatalog — the\n // catalog renders only its results. OperationEntityPage still titles\n // itself, so this covers the collection route only.\n //\n // It rides in the top bar rather than a bodyHeader row: next to the rail\n // that bar is otherwise empty, and the row it replaces cost the result\n // table ~72px of the viewport it needs to keep its sticky head and\n // pagination footer on screen without the page itself scrolling.\n {...(resolvedRoute.kind === \"surface\" && resolvedRoute.surface\n ? {\n nav: (\n <>\n {navClaims === 0 && (\n <div className=\"flex min-w-0 flex-1 items-baseline gap-density-2\">\n <h1 className=\"min-w-0 truncate text-base font-semibold tracking-tight\">\n {resolvedRoute.surface.title}\n </h1>\n {titleActions ? (\n <div className=\"flex shrink-0 items-center self-center\">{titleActions}</div>\n ) : null}\n <p className=\"hidden min-w-0 truncate text-sm text-muted-foreground lg:block\">\n {makeSurfaceDefinition(resolvedRoute.surface).description}\n </p>\n </div>\n )}\n <div ref={setNavContainer} data-slot=\"explorer-nav\" className=\"contents\" />\n </>\n ),\n }\n : {})}\n collapsedStorageKey={SIDEBAR_COLLAPSED_KEY}\n // Results are wide tables, not prose — let them use the whole workspace\n // instead of the centred reading column.\n contentWidth=\"full\"\n contentClassName=\"p-6\"\n >\n {resolvedRoute.kind === \"surface\" ? (\n resolvedRoute.surface ? (\n <OperationCatalog\n // Filter state is seeded from the URL when the catalog mounts and\n // written back to it, so one instance spanning two surfaces would\n // carry the first surface's filters onto the second's URL. Keying\n // on the surface makes each one start from its own query string.\n key={resolvedRoute.surface.key}\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(resultRenderer ? { resultRenderer } : {})}\n {...(paginationMode ? { paginationMode } : {})}\n {...(lockedValues ? { lockedValues } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"entity\" ? (\n resolvedRoute.surface ? (\n <OperationEntityPage\n definition={makeSurfaceDefinition(resolvedRoute.surface)}\n entities={[resolvedRoute.surface.entity]}\n client={client}\n renderLink={renderLink}\n surfaceKey={resolvedRoute.surface.key}\n backHref={withBasePath(basePath, `/${resolvedRoute.surface.key}`)}\n backLabel={`Back to ${resolvedRoute.surface.title}`}\n commandRuntime={commandRuntime}\n {...(formPre ? { formPre } : {})}\n {...(formPost ? { formPost } : {})}\n {...(formActions ? { formActions } : {})}\n {...(surfaceActionLabels?.[resolvedRoute.surface.key]\n ? { actionLabels: surfaceActionLabels[resolvedRoute.surface.key] }\n : {})}\n {...(entityDetailBodyRenderer ? { entityDetailBodyRenderer } : {})}\n {...(entityDetailHeaderRenderer ? { entityDetailHeaderRenderer } : {})}\n {...(resolvedRoute.id ? { id: resolvedRoute.id } : {})}\n />\n ) : (\n <UnknownSurface surfaceKey={resolvedRoute.surfaceKey} />\n )\n ) : resolvedRoute.kind === \"command\" ? (\n <OperationCommandPage\n client={client}\n backHref={withBasePath(basePath, \"/explorer\")}\n backLabel=\"Back to API Explorer\"\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n initialValues={commandInitialValues}\n autoRun={true}\n {...(resolvedRoute.operationId ? { operationId: resolvedRoute.operationId } : {})}\n />\n ) : resolvedRoute.kind === \"explorer\" ? (\n <OperationCatalog\n definition={explorerDefinition}\n entities={[]}\n allOperations\n client={client}\n renderLink={renderLink}\n commandRuntime={commandRuntime}\n />\n ) : defaultSurface == null ? (\n <div className=\"text-sm text-muted-foreground\">Loading surfaces…</div>\n ) : (\n <div className=\"text-sm text-muted-foreground\">Redirecting…</div>\n )}\n </AppShell>\n );\n\n return <ExplorerNavContext.Provider value={navSlot}>{content}</ExplorerNavContext.Provider>;\n}\n\ntype ExplorerRoute =\n | { kind: \"root\" }\n | { kind: \"explorer\" }\n | { kind: \"command\"; operationId?: string }\n | { kind: \"surface\"; surfaceKey: string; surface?: ClickySurface }\n | {\n kind: \"entity\";\n surfaceKey: string;\n surface?: ClickySurface;\n id?: string;\n };\n\nfunction parseExplorerRoute(pathname: string): ExplorerRoute {\n const normalized = trimTrailingSlash(pathname) || \"/\";\n if (normalized === \"/\") {\n return { kind: \"root\" };\n }\n\n const segments = normalized.replace(/^\\/+/, \"\").split(\"/\");\n if (segments[0] === \"explorer\") {\n return { kind: \"explorer\" };\n }\n if (segments[0] === \"commands\") {\n return segments[1] ? { kind: \"command\", operationId: segments[1] } : { kind: \"command\" };\n }\n const surfaceKey = segments[0] ?? \"\";\n if (segments[1]) {\n return {\n kind: \"entity\",\n surfaceKey,\n id: decodeURIComponent(segments[1]),\n };\n }\n return { kind: \"surface\", surfaceKey };\n}\n\nfunction resolveRouteSurface(route: ExplorerRoute, surfaces: ClickySurface[]): ExplorerRoute {\n if (route.kind !== \"surface\" && route.kind !== \"entity\") {\n return route;\n }\n const surface = surfaces.find((item) => item.key === route.surfaceKey);\n return surface ? { ...route, surface } : route;\n}\n\nfunction isSurfaceRouteActive(route: ExplorerRoute, surfaceKey: string) {\n return (\n (route.kind === \"surface\" && route.surfaceKey === surfaceKey) ||\n (route.kind === \"entity\" && route.surfaceKey === surfaceKey)\n );\n}\n\nfunction stripBasePath(pathname: string, basePath: string) {\n const base = trimTrailingSlash(basePath);\n if (!base || base === \"/\") {\n return trimTrailingSlash(pathname) || \"/\";\n }\n if (pathname === base) {\n return \"/\";\n }\n if (pathname.startsWith(`${base}/`)) {\n return trimTrailingSlash(pathname.slice(base.length)) || \"/\";\n }\n return trimTrailingSlash(pathname) || \"/\";\n}\n\nfunction UnknownSurface({ surfaceKey }: { surfaceKey: string }) {\n return (\n <div className=\"p-6 text-sm text-muted-foreground\">\n Unknown surface: <code>{surfaceKey}</code>\n </div>\n );\n}\n\nconst LEGACY_AUTORUN_QUERY_PARAM = \"__autoRun\";\n\ntype SurfaceGroup = {\n parent: string; // the slug; \"\" for surfaces that declared no parent\n label: string; // display name in the sidebar\n surfaces: ClickySurface[];\n};\n\n// groupSurfacesByParent buckets surfaces by their ClickySurface.parent slug,\n// preserving the order surfaces appeared in the spec. Surfaces with no parent\n// fall into a trailing \"\" bucket labelled \"Other\".\nfunction groupSurfacesByParent(surfaces: ClickySurface[]): SurfaceGroup[] {\n const order: string[] = [];\n const buckets = new Map<string, ClickySurface[]>();\n for (const surface of surfaces) {\n const parent = surface.parent ?? \"\";\n if (!buckets.has(parent)) {\n buckets.set(parent, []);\n order.push(parent);\n }\n buckets.get(parent)!.push(surface);\n }\n return order.map((parent) => ({\n parent,\n label: parent === \"\" ? \"Other\" : titleCase(parent),\n surfaces: buckets.get(parent)!,\n }));\n}\n\nfunction titleCase(value: string): string {\n if (!value) return value;\n return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction readCommandQueryParams(): { initialValues: Record<string, string>; autoRun: boolean } {\n if (typeof window === \"undefined\") {\n return { initialValues: {}, autoRun: false };\n }\n const search = new URLSearchParams(window.location.search);\n const initialValues: Record<string, string> = {};\n let autoRun = false;\n const positional: string[] = [];\n\n for (const [key, value] of search.entries()) {\n if (key === AUTORUN_QUERY_PARAM || key === LEGACY_AUTORUN_QUERY_PARAM) {\n autoRun = value === \"1\" || value === \"true\";\n continue;\n }\n if (key.startsWith(ARG_QUERY_PREFIX)) {\n const index = Number.parseInt(key.slice(ARG_QUERY_PREFIX.length), 10);\n if (Number.isFinite(index) && index >= 0) {\n positional[index] = value;\n }\n continue;\n }\n initialValues[key] = value;\n }\n\n const packedArgs = positional.filter((value) => value !== undefined).join(\" \");\n if (packedArgs !== \"\") {\n initialValues.args = packedArgs;\n }\n\n return { initialValues, autoRun };\n}\n"],"mappings":";;;;;;;;;;;;;;AAiGA,IAAM,wBAAwB;AAE9B,SAAgB,kBAAkB,EAChC,QACA,WAAW,IACX,kBAAkB,MAClB,SACA,gBACA,aACA,qBACA,gBACA,0BACA,4BACA,q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GACpE,IAAI,OAAO,SAAS,KAAK,KAAK,SAAS,GACrC,WAAW,SAAS;GAEtB;EACF;EACA,cAAc,OAAO;CACvB;CAEA,MAAM,aAAa,WAAW,QAAQ,UAAU,UAAU,KAAA,CAAS,CAAC,CAAC,KAAK,GAAG;CAC7E,IAAI,eAAe,IACjB,cAAc,OAAO;CAGvB,OAAO;EAAE;EAAe;CAAQ;AAClC"}
|
package/dist/rpc/InlineError.cjs
CHANGED
|
@@ -2,23 +2,43 @@ const require_button = require("../components/button.cjs");
|
|
|
2
2
|
const require_ErrorDetails = require("../data/diagnostics/ErrorDetails.cjs");
|
|
3
3
|
const require_Icon = require("../data/Icon.cjs");
|
|
4
4
|
const require_UiPlay = require("../icons/components/UiPlay.cjs");
|
|
5
|
+
const require_UiRefresh = require("../icons/components/UiRefresh.cjs");
|
|
5
6
|
const require_operationErrorDiagnostics = require("./operationErrorDiagnostics.cjs");
|
|
6
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
8
|
// src/rpc/InlineError.tsx
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* An inline failure card. Its title and message are a `role="alert"` region, so a failed load is
|
|
11
|
+
* announced once, like `ActionError`; the action row (Retry, Run now, Copy) is outside it, so a
|
|
12
|
+
* label that changes while retrying is not announced again. `className` applies to the card.
|
|
13
|
+
*/
|
|
14
|
+
function InlineError({ title, error, className, runNow, onRetry, retrying = false }) {
|
|
15
|
+
const retry = onRetry && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_button.Button, {
|
|
16
|
+
type: "button",
|
|
17
|
+
variant: "outline",
|
|
18
|
+
size: "sm",
|
|
19
|
+
onClick: onRetry,
|
|
20
|
+
loading: retrying,
|
|
21
|
+
loadingLabel: retrying ? "Retrying…" : void 0,
|
|
22
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, { icon: require_UiRefresh.UiRefresh }), "Retry"]
|
|
23
|
+
});
|
|
24
|
+
const run = runNow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_button.Button, {
|
|
25
|
+
type: "button",
|
|
26
|
+
variant: "outline",
|
|
27
|
+
size: "sm",
|
|
28
|
+
onClick: runNow.onClick,
|
|
29
|
+
loading: runNow.loading ?? false,
|
|
30
|
+
loadingLabel: runNow.loading ? "Running…" : void 0,
|
|
31
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, { icon: require_UiPlay.UiPlay }), "Run now"]
|
|
32
|
+
});
|
|
9
33
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ErrorDetails.ErrorDetails, {
|
|
34
|
+
announce: true,
|
|
10
35
|
title,
|
|
11
36
|
diagnostics: require_operationErrorDiagnostics.operationErrorDiagnostics(error),
|
|
12
37
|
...className ? { className } : {},
|
|
13
|
-
actions:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onClick: runNow.onClick,
|
|
18
|
-
loading: runNow.loading ?? false,
|
|
19
|
-
loadingLabel: runNow.loading ? "Running…" : void 0,
|
|
20
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, { icon: require_UiPlay.UiPlay }), "Run now"]
|
|
21
|
-
})
|
|
38
|
+
actions: retry && run ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
39
|
+
className: "inline-flex flex-wrap items-center gap-2",
|
|
40
|
+
children: [retry, run]
|
|
41
|
+
}) : retry || run
|
|
22
42
|
});
|
|
23
43
|
}
|
|
24
44
|
exports.InlineError = InlineError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineError.cjs","names":["
|
|
1
|
+
{"version":3,"file":"InlineError.cjs","names":["Button","Icon","UiRefresh","UiPlay","ErrorDetails","operationErrorDiagnostics"],"sources":["../../src/rpc/InlineError.tsx"],"sourcesContent":["import { Button } from \"../components/button\";\nimport { ErrorDetails } from \"../data/diagnostics/ErrorDetails\";\nimport { Icon } from \"../data/Icon\";\nimport { UiPlay, UiRefresh } from \"../icons\";\nimport { operationErrorDiagnostics } from \"./operationErrorDiagnostics\";\n\nexport type InlineErrorProps = {\n title: string;\n error: unknown;\n className?: string;\n runNow?: {\n onClick: () => void;\n loading?: boolean;\n };\n /** Shows \"Retry\" in the error's own action row, e.g. to refetch a failed load. */\n onRetry?: () => void;\n /** The retry is in flight: \"Retry\" is disabled and reads \"Retrying…\". Ignored without `onRetry`. */\n retrying?: boolean;\n};\n\n/**\n * An inline failure card. Its title and message are a `role=\"alert\"` region, so a failed load is\n * announced once, like `ActionError`; the action row (Retry, Run now, Copy) is outside it, so a\n * label that changes while retrying is not announced again. `className` applies to the card.\n */\nexport function InlineError({ title, error, className, runNow, onRetry, retrying = false }: InlineErrorProps) {\n const retry = onRetry && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={onRetry}\n loading={retrying}\n loadingLabel={retrying ? \"Retrying…\" : undefined}\n >\n <Icon icon={UiRefresh} />\n Retry\n </Button>\n );\n const run = runNow && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={runNow.onClick}\n loading={runNow.loading ?? false}\n loadingLabel={runNow.loading ? \"Running…\" : undefined}\n >\n <Icon icon={UiPlay} />\n Run now\n </Button>\n );\n return (\n <ErrorDetails\n announce\n title={title}\n diagnostics={operationErrorDiagnostics(error)}\n {...(className ? { className } : {})}\n actions={retry && run ? <span className=\"inline-flex flex-wrap items-center gap-2\">{retry}{run}</span> : retry || run}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,YAAY,EAAE,OAAO,OAAO,WAAW,QAAQ,SAAS,WAAW,SAA2B;CAC5G,MAAM,QAAQ,WACZ,iBAAA,GAAA,kBAAA,KAAA,CAACA,eAAAA,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,SAAS;EACT,SAAS;EACT,cAAc,WAAW,cAAc,KAAA;EANzC,UAAA,CAQE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD,EAAM,MAAMC,kBAAAA,UAAY,CAAA,GAAC,OAEnB;;CAEV,MAAM,MAAM,UACV,iBAAA,GAAA,kBAAA,KAAA,CAACF,eAAAA,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,SAAS,OAAO;EAChB,SAAS,OAAO,WAAW;EAC3B,cAAc,OAAO,UAAU,aAAa,KAAA;EAN9C,UAAA,CAQE,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,MAAD,EAAM,MAAME,eAAAA,OAAS,CAAA,GAAC,SAEhB;;CAEV,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,cAAD;EACE,UAAA;EACO;EACP,aAAaC,kCAAAA,0BAA0B,KAAK;EAC5C,GAAK,YAAY,EAAE,UAAU,IAAI,CAAC;EAClC,SAAS,SAAS,MAAM,iBAAA,GAAA,kBAAA,KAAA,CAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CAA4D,OAAO,GAAU;EAAI,CAAA,IAAA,SAAS;CACnH,CAAA;AAEL"}
|
|
@@ -6,6 +6,15 @@ export type InlineErrorProps = {
|
|
|
6
6
|
onClick: () => void;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
};
|
|
9
|
+
/** Shows "Retry" in the error's own action row, e.g. to refetch a failed load. */
|
|
10
|
+
onRetry?: () => void;
|
|
11
|
+
/** The retry is in flight: "Retry" is disabled and reads "Retrying…". Ignored without `onRetry`. */
|
|
12
|
+
retrying?: boolean;
|
|
9
13
|
};
|
|
10
|
-
|
|
14
|
+
/**
|
|
15
|
+
* An inline failure card. Its title and message are a `role="alert"` region, so a failed load is
|
|
16
|
+
* announced once, like `ActionError`; the action row (Retry, Run now, Copy) is outside it, so a
|
|
17
|
+
* label that changes while retrying is not announced again. `className` applies to the card.
|
|
18
|
+
*/
|
|
19
|
+
export declare function InlineError({ title, error, className, runNow, onRetry, retrying }: InlineErrorProps): import("react").JSX.Element;
|
|
11
20
|
//# sourceMappingURL=InlineError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineError.d.ts","sourceRoot":"","sources":["../../src/rpc/InlineError.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineError.d.ts","sourceRoot":"","sources":["../../src/rpc/InlineError.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oGAAoG;IACpG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAgB,EAAE,EAAE,gBAAgB,+BAoC3G"}
|
package/dist/rpc/InlineError.js
CHANGED
|
@@ -2,23 +2,43 @@ import { Button } from "../components/button.js";
|
|
|
2
2
|
import { ErrorDetails } from "../data/diagnostics/ErrorDetails.js";
|
|
3
3
|
import { Icon } from "../data/Icon.js";
|
|
4
4
|
import { UiPlay } from "../icons/components/UiPlay.js";
|
|
5
|
+
import { UiRefresh } from "../icons/components/UiRefresh.js";
|
|
5
6
|
import { operationErrorDiagnostics } from "./operationErrorDiagnostics.js";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
// src/rpc/InlineError.tsx
|
|
8
|
-
|
|
9
|
+
/**
|
|
10
|
+
* An inline failure card. Its title and message are a `role="alert"` region, so a failed load is
|
|
11
|
+
* announced once, like `ActionError`; the action row (Retry, Run now, Copy) is outside it, so a
|
|
12
|
+
* label that changes while retrying is not announced again. `className` applies to the card.
|
|
13
|
+
*/
|
|
14
|
+
function InlineError({ title, error, className, runNow, onRetry, retrying = false }) {
|
|
15
|
+
const retry = onRetry && /* @__PURE__ */ jsxs(Button, {
|
|
16
|
+
type: "button",
|
|
17
|
+
variant: "outline",
|
|
18
|
+
size: "sm",
|
|
19
|
+
onClick: onRetry,
|
|
20
|
+
loading: retrying,
|
|
21
|
+
loadingLabel: retrying ? "Retrying…" : void 0,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: UiRefresh }), "Retry"]
|
|
23
|
+
});
|
|
24
|
+
const run = runNow && /* @__PURE__ */ jsxs(Button, {
|
|
25
|
+
type: "button",
|
|
26
|
+
variant: "outline",
|
|
27
|
+
size: "sm",
|
|
28
|
+
onClick: runNow.onClick,
|
|
29
|
+
loading: runNow.loading ?? false,
|
|
30
|
+
loadingLabel: runNow.loading ? "Running…" : void 0,
|
|
31
|
+
children: [/* @__PURE__ */ jsx(Icon, { icon: UiPlay }), "Run now"]
|
|
32
|
+
});
|
|
9
33
|
return /* @__PURE__ */ jsx(ErrorDetails, {
|
|
34
|
+
announce: true,
|
|
10
35
|
title,
|
|
11
36
|
diagnostics: operationErrorDiagnostics(error),
|
|
12
37
|
...className ? { className } : {},
|
|
13
|
-
actions:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onClick: runNow.onClick,
|
|
18
|
-
loading: runNow.loading ?? false,
|
|
19
|
-
loadingLabel: runNow.loading ? "Running…" : void 0,
|
|
20
|
-
children: [/* @__PURE__ */ jsx(Icon, { icon: UiPlay }), "Run now"]
|
|
21
|
-
})
|
|
38
|
+
actions: retry && run ? /* @__PURE__ */ jsxs("span", {
|
|
39
|
+
className: "inline-flex flex-wrap items-center gap-2",
|
|
40
|
+
children: [retry, run]
|
|
41
|
+
}) : retry || run
|
|
22
42
|
});
|
|
23
43
|
}
|
|
24
44
|
export { InlineError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineError.js","names":[],"sources":["../../src/rpc/InlineError.tsx"],"sourcesContent":["import { Button } from \"../components/button\";\nimport { ErrorDetails } from \"../data/diagnostics/ErrorDetails\";\nimport { Icon } from \"../data/Icon\";\nimport { UiPlay } from \"../icons\";\nimport { operationErrorDiagnostics } from \"./operationErrorDiagnostics\";\n\nexport type InlineErrorProps = {\n title: string;\n error: unknown;\n className?: string;\n runNow?: {\n onClick: () => void;\n loading?: boolean;\n };\n};\n\nexport function InlineError({ title, error, className, runNow }: InlineErrorProps) {\n
|
|
1
|
+
{"version":3,"file":"InlineError.js","names":[],"sources":["../../src/rpc/InlineError.tsx"],"sourcesContent":["import { Button } from \"../components/button\";\nimport { ErrorDetails } from \"../data/diagnostics/ErrorDetails\";\nimport { Icon } from \"../data/Icon\";\nimport { UiPlay, UiRefresh } from \"../icons\";\nimport { operationErrorDiagnostics } from \"./operationErrorDiagnostics\";\n\nexport type InlineErrorProps = {\n title: string;\n error: unknown;\n className?: string;\n runNow?: {\n onClick: () => void;\n loading?: boolean;\n };\n /** Shows \"Retry\" in the error's own action row, e.g. to refetch a failed load. */\n onRetry?: () => void;\n /** The retry is in flight: \"Retry\" is disabled and reads \"Retrying…\". Ignored without `onRetry`. */\n retrying?: boolean;\n};\n\n/**\n * An inline failure card. Its title and message are a `role=\"alert\"` region, so a failed load is\n * announced once, like `ActionError`; the action row (Retry, Run now, Copy) is outside it, so a\n * label that changes while retrying is not announced again. `className` applies to the card.\n */\nexport function InlineError({ title, error, className, runNow, onRetry, retrying = false }: InlineErrorProps) {\n const retry = onRetry && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={onRetry}\n loading={retrying}\n loadingLabel={retrying ? \"Retrying…\" : undefined}\n >\n <Icon icon={UiRefresh} />\n Retry\n </Button>\n );\n const run = runNow && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={runNow.onClick}\n loading={runNow.loading ?? false}\n loadingLabel={runNow.loading ? \"Running…\" : undefined}\n >\n <Icon icon={UiPlay} />\n Run now\n </Button>\n );\n return (\n <ErrorDetails\n announce\n title={title}\n diagnostics={operationErrorDiagnostics(error)}\n {...(className ? { className } : {})}\n actions={retry && run ? <span className=\"inline-flex flex-wrap items-center gap-2\">{retry}{run}</span> : retry || run}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,SAAgB,YAAY,EAAE,OAAO,OAAO,WAAW,QAAQ,SAAS,WAAW,SAA2B;CAC5G,MAAM,QAAQ,WACZ,qBAAC,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,SAAS;EACT,SAAS;EACT,cAAc,WAAW,cAAc,KAAA;EANzC,UAAA,CAQE,oBAAC,MAAD,EAAM,MAAM,UAAY,CAAA,GAAC,OAEnB;;CAEV,MAAM,MAAM,UACV,qBAAC,QAAD;EACE,MAAK;EACL,SAAQ;EACR,MAAK;EACL,SAAS,OAAO;EAChB,SAAS,OAAO,WAAW;EAC3B,cAAc,OAAO,UAAU,aAAa,KAAA;EAN9C,UAAA,CAQE,oBAAC,MAAD,EAAM,MAAM,OAAS,CAAA,GAAC,SAEhB;;CAEV,OACE,oBAAC,cAAD;EACE,UAAA;EACO;EACP,aAAa,0BAA0B,KAAK;EAC5C,GAAK,YAAY,EAAE,UAAU,IAAI,CAAC;EAClC,SAAS,SAAS,MAAM,qBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA,CAA4D,OAAO,GAAU;EAAI,CAAA,IAAA,SAAS;CACnH,CAAA;AAEL"}
|
|
@@ -53,12 +53,12 @@ function SchemaActionForm({ client, action, lockedValues, initialValue, submitLa
|
|
|
53
53
|
...value,
|
|
54
54
|
[target.name]: target.current
|
|
55
55
|
} : value) ?? true;
|
|
56
|
-
const
|
|
56
|
+
const baseline = (0, react.useMemo)(() => formSchema ? require_json_schema_form_defaults.applySchemaDefaults(require_json_schema_form_refs.rehydrateRefs(formSchema), initialValue ?? {}) : initialValue ?? {}, [formSchema, initialValue]);
|
|
57
|
+
const dirty = JSON.stringify(value) !== JSON.stringify(baseline) || view === "yaml" && yamlText !== (0, yaml.stringify)(value);
|
|
58
|
+
const formErrors = uniqueBy((validate?.errors ?? []).filter((e) => e.keyword !== "if" && (dirty || e.keyword !== "required")).map((e) => ({
|
|
57
59
|
instancePath: e.keyword === "required" ? `${e.instancePath}/${e.params.missingProperty}` : e.instancePath,
|
|
58
60
|
message: e.keyword === "required" ? "Required" : (e.keyword === "not" ? e.schema.description : void 0) ?? e.message ?? "Invalid value"
|
|
59
|
-
}));
|
|
60
|
-
const baseline = (0, react.useMemo)(() => schemaQuery.data ? require_json_schema_form_defaults.applySchemaDefaults(require_json_schema_form_refs.rehydrateRefs(schemaQuery.data), initialValue ?? {}) : initialValue ?? {}, [schemaQuery.data, initialValue]);
|
|
61
|
-
const dirty = JSON.stringify(value) !== JSON.stringify(baseline) || view === "yaml" && yamlText !== (0, yaml.stringify)(value);
|
|
61
|
+
})), (e) => `${e.instancePath}\u0000${e.message}`);
|
|
62
62
|
const blocked = submitBlocker?.(value);
|
|
63
63
|
const canSubmit = validForm && !blocked && !yamlError && (view !== "yaml" || yamlValidation.status === "valid");
|
|
64
64
|
const handleValidationChange = (0, react.useCallback)((next) => {
|
|
@@ -229,12 +229,12 @@ function SchemaActionForm({ client, action, lockedValues, initialValue, submitLa
|
|
|
229
229
|
action,
|
|
230
230
|
canSubmit
|
|
231
231
|
}), target ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SplitButton.SplitButton, {
|
|
232
|
-
label: isSubmitting ? "Saving…" :
|
|
232
|
+
label: isSubmitting ? "Saving…" : "Save",
|
|
233
233
|
onClick: () => void handleSubmit(),
|
|
234
234
|
disabled: isSubmitting || !canSubmit,
|
|
235
235
|
title: "Choose where to save",
|
|
236
236
|
items: target.choices.filter((choice) => choice !== target.current).map((choice) => ({
|
|
237
|
-
label:
|
|
237
|
+
label: `Save to ${target.label(choice)}`,
|
|
238
238
|
onSelect: () => {
|
|
239
239
|
setValue((draft) => ({
|
|
240
240
|
...draft,
|
|
@@ -281,6 +281,9 @@ function withoutProperty(schema, name) {
|
|
|
281
281
|
...Array.isArray(schema.required) ? { required: schema.required.filter((field) => field !== name) } : {}
|
|
282
282
|
};
|
|
283
283
|
}
|
|
284
|
+
function uniqueBy(items, key) {
|
|
285
|
+
return [...new Map(items.map((item) => [key(item), item])).values()];
|
|
286
|
+
}
|
|
284
287
|
function isMutation(method) {
|
|
285
288
|
return method === "POST" || method === "PUT" || method === "PATCH";
|
|
286
289
|
}
|