@flanksource/clicky-ui 0.3.77 → 0.3.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (854) hide show
  1. package/NOTICE.md +16 -0
  2. package/dist/ai.cjs +2 -2
  3. package/dist/ai.js +2 -2
  4. package/dist/comments/CommentThreadList.cjs +13 -14
  5. package/dist/comments/CommentThreadList.cjs.map +1 -1
  6. package/dist/comments/CommentThreadList.d.ts.map +1 -1
  7. package/dist/comments/CommentThreadList.js +13 -14
  8. package/dist/comments/CommentThreadList.js.map +1 -1
  9. package/dist/components/EndpointSelector.cjs +7 -1
  10. package/dist/components/EndpointSelector.cjs.map +1 -1
  11. package/dist/components/EndpointSelector.d.ts.map +1 -1
  12. package/dist/components/EndpointSelector.js +7 -1
  13. package/dist/components/EndpointSelector.js.map +1 -1
  14. package/dist/components/FilterBar.cjs +36 -12
  15. package/dist/components/FilterBar.cjs.map +1 -1
  16. package/dist/components/FilterBar.d.ts +14 -2
  17. package/dist/components/FilterBar.d.ts.map +1 -1
  18. package/dist/components/FilterBar.js +36 -12
  19. package/dist/components/FilterBar.js.map +1 -1
  20. package/dist/components/FormLookupProvider.cjs +12 -4
  21. package/dist/components/FormLookupProvider.cjs.map +1 -1
  22. package/dist/components/FormLookupProvider.d.ts.map +1 -1
  23. package/dist/components/FormLookupProvider.js +13 -5
  24. package/dist/components/FormLookupProvider.js.map +1 -1
  25. package/dist/components/JSONPathPlayground.cjs +124 -233
  26. package/dist/components/JSONPathPlayground.cjs.map +1 -1
  27. package/dist/components/JSONPathPlayground.d.ts +15 -13
  28. package/dist/components/JSONPathPlayground.d.ts.map +1 -1
  29. package/dist/components/JSONPathPlayground.js +125 -234
  30. package/dist/components/JSONPathPlayground.js.map +1 -1
  31. package/dist/components/JsonSchemaForm.cjs +6 -0
  32. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  33. package/dist/components/JsonSchemaForm.js +6 -0
  34. package/dist/components/JsonSchemaForm.js.map +1 -1
  35. package/dist/components/SegmentedControl.cjs +1 -1
  36. package/dist/components/SegmentedControl.cjs.map +1 -1
  37. package/dist/components/SegmentedControl.d.ts.map +1 -1
  38. package/dist/components/SegmentedControl.js +1 -1
  39. package/dist/components/SegmentedControl.js.map +1 -1
  40. package/dist/components/TimeRange.cjs +133 -60
  41. package/dist/components/TimeRange.cjs.map +1 -1
  42. package/dist/components/TimeRange.d.ts +8 -1
  43. package/dist/components/TimeRange.d.ts.map +1 -1
  44. package/dist/components/TimeRange.js +133 -60
  45. package/dist/components/TimeRange.js.map +1 -1
  46. package/dist/components/json-schema-form-accordion-array.cjs +8 -6
  47. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  48. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  49. package/dist/components/json-schema-form-accordion-array.js +9 -7
  50. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  51. package/dist/components/json-schema-form-array-rows.cjs +45 -0
  52. package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
  53. package/dist/components/json-schema-form-array-rows.d.ts +10 -0
  54. package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
  55. package/dist/components/json-schema-form-array-rows.js +45 -0
  56. package/dist/components/json-schema-form-array-rows.js.map +1 -0
  57. package/dist/components/json-schema-form-item-summary.cjs +3 -5
  58. package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
  59. package/dist/components/json-schema-form-item-summary.d.ts +1 -1
  60. package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
  61. package/dist/components/json-schema-form-item-summary.js +3 -5
  62. package/dist/components/json-schema-form-item-summary.js.map +1 -1
  63. package/dist/components/json-schema-form-render.cjs +11 -2
  64. package/dist/components/json-schema-form-render.cjs.map +1 -1
  65. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  66. package/dist/components/json-schema-form-render.js +12 -3
  67. package/dist/components/json-schema-form-render.js.map +1 -1
  68. package/dist/components/json-schema-form-resolve.cjs +10 -0
  69. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  70. package/dist/components/json-schema-form-resolve.d.ts +1 -0
  71. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  72. package/dist/components/json-schema-form-resolve.js +10 -1
  73. package/dist/components/json-schema-form-resolve.js.map +1 -1
  74. package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
  75. package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
  76. package/dist/components/json-schema-form-table-array.cjs +25 -16
  77. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  78. package/dist/components/json-schema-form-table-array.d.ts +1 -1
  79. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  80. package/dist/components/json-schema-form-table-array.js +26 -17
  81. package/dist/components/json-schema-form-table-array.js.map +1 -1
  82. package/dist/components/json-schema-form-types.d.ts +0 -2
  83. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  84. package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
  85. package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
  86. package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
  87. package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
  88. package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
  89. package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
  90. package/dist/components/jsonPathTree.cjs +1 -0
  91. package/dist/components/jsonPathTree.cjs.map +1 -1
  92. package/dist/components/jsonPathTree.d.ts +6 -0
  93. package/dist/components/jsonPathTree.d.ts.map +1 -1
  94. package/dist/components/jsonPathTree.js +1 -0
  95. package/dist/components/jsonPathTree.js.map +1 -1
  96. package/dist/data/Clicky.cjs +37 -18
  97. package/dist/data/Clicky.cjs.map +1 -1
  98. package/dist/data/Clicky.d.ts +5 -0
  99. package/dist/data/Clicky.d.ts.map +1 -1
  100. package/dist/data/Clicky.js +37 -18
  101. package/dist/data/Clicky.js.map +1 -1
  102. package/dist/data/DataTable.cjs +49 -12
  103. package/dist/data/DataTable.cjs.map +1 -1
  104. package/dist/data/DataTable.d.ts +17 -2
  105. package/dist/data/DataTable.d.ts.map +1 -1
  106. package/dist/data/DataTable.js +49 -12
  107. package/dist/data/DataTable.js.map +1 -1
  108. package/dist/data/TaskPoolUsage.cjs +2 -1
  109. package/dist/data/TaskPoolUsage.cjs.map +1 -1
  110. package/dist/data/TaskPoolUsage.d.ts.map +1 -1
  111. package/dist/data/TaskPoolUsage.js +2 -1
  112. package/dist/data/TaskPoolUsage.js.map +1 -1
  113. package/dist/data/TimeseriesPanel.axes.cjs +18 -3
  114. package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
  115. package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
  116. package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
  117. package/dist/data/TimeseriesPanel.axes.js +17 -4
  118. package/dist/data/TimeseriesPanel.axes.js.map +1 -1
  119. package/dist/data/TimeseriesPanel.cjs +57 -23
  120. package/dist/data/TimeseriesPanel.cjs.map +1 -1
  121. package/dist/data/TimeseriesPanel.d.ts.map +1 -1
  122. package/dist/data/TimeseriesPanel.js +59 -25
  123. package/dist/data/TimeseriesPanel.js.map +1 -1
  124. package/dist/data/TimeseriesPanel.model.cjs +10 -7
  125. package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
  126. package/dist/data/TimeseriesPanel.model.d.ts +7 -4
  127. package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
  128. package/dist/data/TimeseriesPanel.model.js +11 -8
  129. package/dist/data/TimeseriesPanel.model.js.map +1 -1
  130. package/dist/data/TimeseriesPanel.readout.cjs +11 -0
  131. package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
  132. package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
  133. package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
  134. package/dist/data/TimeseriesPanel.readout.js +10 -0
  135. package/dist/data/TimeseriesPanel.readout.js.map +1 -0
  136. package/dist/data/TimeseriesPanel.segments.cjs +67 -0
  137. package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
  138. package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
  139. package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
  140. package/dist/data/TimeseriesPanel.segments.js +67 -0
  141. package/dist/data/TimeseriesPanel.segments.js.map +1 -0
  142. package/dist/data/TreeDataTable.cjs +12 -3
  143. package/dist/data/TreeDataTable.cjs.map +1 -1
  144. package/dist/data/TreeDataTable.d.ts +15 -3
  145. package/dist/data/TreeDataTable.d.ts.map +1 -1
  146. package/dist/data/TreeDataTable.js +12 -3
  147. package/dist/data/TreeDataTable.js.map +1 -1
  148. package/dist/data/TreeNode.cjs +18 -3
  149. package/dist/data/TreeNode.cjs.map +1 -1
  150. package/dist/data/TreeNode.d.ts +7 -1
  151. package/dist/data/TreeNode.d.ts.map +1 -1
  152. package/dist/data/TreeNode.js +18 -3
  153. package/dist/data/TreeNode.js.map +1 -1
  154. package/dist/data/ai/SessionChatComposer.cjs +2 -0
  155. package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
  156. package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
  157. package/dist/data/ai/SessionChatComposer.js +2 -0
  158. package/dist/data/ai/SessionChatComposer.js.map +1 -1
  159. package/dist/data/ai/SessionInspector.panels.cjs +47 -1
  160. package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
  161. package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
  162. package/dist/data/ai/SessionInspector.panels.js +48 -2
  163. package/dist/data/ai/SessionInspector.panels.js.map +1 -1
  164. package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
  165. package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
  166. package/dist/data/ai/index.d.ts +2 -2
  167. package/dist/data/ai/index.d.ts.map +1 -1
  168. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
  169. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
  170. package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
  171. package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
  172. package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
  173. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
  174. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
  175. package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
  176. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
  177. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
  178. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
  179. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
  180. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
  181. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
  182. package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
  183. package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
  184. package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
  185. package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
  186. package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
  187. package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
  188. package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
  189. package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
  190. package/dist/data/ai/sessionSubmitVariant.js +30 -0
  191. package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
  192. package/dist/data/cells/Timestamp.cjs +15 -4
  193. package/dist/data/cells/Timestamp.cjs.map +1 -1
  194. package/dist/data/cells/Timestamp.d.ts.map +1 -1
  195. package/dist/data/cells/Timestamp.js +15 -4
  196. package/dist/data/cells/Timestamp.js.map +1 -1
  197. package/dist/data/cells/timestamp-format.cjs +28 -8
  198. package/dist/data/cells/timestamp-format.cjs.map +1 -1
  199. package/dist/data/cells/timestamp-format.d.ts +3 -1
  200. package/dist/data/cells/timestamp-format.d.ts.map +1 -1
  201. package/dist/data/cells/timestamp-format.js +28 -8
  202. package/dist/data/cells/timestamp-format.js.map +1 -1
  203. package/dist/data/charts/TrendChart.cjs +65 -31
  204. package/dist/data/charts/TrendChart.cjs.map +1 -1
  205. package/dist/data/charts/TrendChart.d.ts +12 -3
  206. package/dist/data/charts/TrendChart.d.ts.map +1 -1
  207. package/dist/data/charts/TrendChart.js +67 -33
  208. package/dist/data/charts/TrendChart.js.map +1 -1
  209. package/dist/data/charts/index.d.ts +1 -1
  210. package/dist/data/charts/index.d.ts.map +1 -1
  211. package/dist/data/chat/PromptInput.cjs +11 -2
  212. package/dist/data/chat/PromptInput.cjs.map +1 -1
  213. package/dist/data/chat/PromptInput.d.ts +15 -1
  214. package/dist/data/chat/PromptInput.d.ts.map +1 -1
  215. package/dist/data/chat/PromptInput.js +11 -2
  216. package/dist/data/chat/PromptInput.js.map +1 -1
  217. package/dist/data/chat/index.d.ts +1 -1
  218. package/dist/data/chat/index.d.ts.map +1 -1
  219. package/dist/data/data-table-filter-values.cjs.map +1 -1
  220. package/dist/data/data-table-filter-values.d.ts +1 -1
  221. package/dist/data/data-table-filter-values.d.ts.map +1 -1
  222. package/dist/data/data-table-filter-values.js.map +1 -1
  223. package/dist/data/data-table-server-filters.cjs +2 -6
  224. package/dist/data/data-table-server-filters.cjs.map +1 -1
  225. package/dist/data/data-table-server-filters.d.ts +1 -1
  226. package/dist/data/data-table-server-filters.d.ts.map +1 -1
  227. package/dist/data/data-table-server-filters.js +1 -5
  228. package/dist/data/data-table-server-filters.js.map +1 -1
  229. package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
  230. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  231. package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
  232. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  233. package/dist/data/diagnostics/ErrorDetails.js +2 -1
  234. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  235. package/dist/data/gauge-stats.cjs +7 -3
  236. package/dist/data/gauge-stats.cjs.map +1 -1
  237. package/dist/data/gauge-stats.d.ts.map +1 -1
  238. package/dist/data/gauge-stats.js +7 -3
  239. package/dist/data/gauge-stats.js.map +1 -1
  240. package/dist/data/query-browser/QueryBrowser.cjs +41 -17
  241. package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
  242. package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
  243. package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
  244. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
  245. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
  246. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
  247. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
  248. package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
  249. package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
  250. package/dist/data/query-browser/QueryBrowser.js +41 -17
  251. package/dist/data/query-browser/QueryBrowser.js.map +1 -1
  252. package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
  253. package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
  254. package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
  255. package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
  256. package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
  257. package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
  258. package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
  259. package/dist/data/runtime/RuntimeBarLayout.js +3 -2
  260. package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
  261. package/dist/data/test-runner/TestRunner.cjs +3 -1
  262. package/dist/data/test-runner/TestRunner.cjs.map +1 -1
  263. package/dist/data/test-runner/TestRunner.d.ts +8 -1
  264. package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
  265. package/dist/data/test-runner/TestRunner.js +3 -1
  266. package/dist/data/test-runner/TestRunner.js.map +1 -1
  267. package/dist/data/test-runner/TestTree.cjs +1 -0
  268. package/dist/data/test-runner/TestTree.cjs.map +1 -1
  269. package/dist/data/test-runner/TestTree.d.ts.map +1 -1
  270. package/dist/data/test-runner/TestTree.js +1 -0
  271. package/dist/data/test-runner/TestTree.js.map +1 -1
  272. package/dist/data/test-runner/context.cjs.map +1 -1
  273. package/dist/data/test-runner/context.d.ts +2 -0
  274. package/dist/data/test-runner/context.d.ts.map +1 -1
  275. package/dist/data/test-runner/context.js.map +1 -1
  276. package/dist/data/timeseries-query.cjs +2 -2
  277. package/dist/data/timeseries-query.cjs.map +1 -1
  278. package/dist/data/timeseries-query.d.ts +1 -1
  279. package/dist/data/timeseries-query.d.ts.map +1 -1
  280. package/dist/data/timeseries-query.js +2 -2
  281. package/dist/data/timeseries-query.js.map +1 -1
  282. package/dist/data/version-info.cjs +3 -3
  283. package/dist/data/version-info.js +3 -3
  284. package/dist/data.cjs +33 -0
  285. package/dist/data.d.ts +1 -1
  286. package/dist/data.d.ts.map +1 -1
  287. package/dist/data.js +18 -2
  288. package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
  289. package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
  290. package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
  291. package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
  292. package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
  293. package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
  294. package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
  295. package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
  296. package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
  297. package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
  298. package/dist/expressions/playground/ExpressionPlayground.js +6 -6
  299. package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
  300. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
  301. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
  302. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
  303. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
  304. package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
  305. package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
  306. package/dist/expressions/playground/api.cjs.map +1 -1
  307. package/dist/expressions/playground/api.d.ts +10 -0
  308. package/dist/expressions/playground/api.d.ts.map +1 -1
  309. package/dist/expressions/playground/api.js.map +1 -1
  310. package/dist/expressions/playground/hostEvaluation.cjs +67 -0
  311. package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
  312. package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
  313. package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
  314. package/dist/expressions/playground/hostEvaluation.js +63 -0
  315. package/dist/expressions/playground/hostEvaluation.js.map +1 -0
  316. package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
  317. package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
  318. package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
  319. package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
  320. package/dist/expressions/playground/panels/GraphPanel.js +8 -3
  321. package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
  322. package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
  323. package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
  324. package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
  325. package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
  326. package/dist/expressions/playground/panels/graphNodes.js +6 -2
  327. package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
  328. package/dist/expressions/playground.d.ts +1 -1
  329. package/dist/expressions/playground.d.ts.map +1 -1
  330. package/dist/hooks/use-element-height.cjs +26 -0
  331. package/dist/hooks/use-element-height.cjs.map +1 -0
  332. package/dist/hooks/use-element-height.d.ts +10 -0
  333. package/dist/hooks/use-element-height.d.ts.map +1 -0
  334. package/dist/hooks/use-element-height.js +26 -0
  335. package/dist/hooks/use-element-height.js.map +1 -0
  336. package/dist/icons/components/UiGlobeShare.cjs +33 -0
  337. package/dist/icons/components/UiGlobeShare.cjs.map +1 -0
  338. package/dist/icons/components/UiGlobeShare.d.ts +9 -0
  339. package/dist/icons/components/UiGlobeShare.d.ts.map +1 -0
  340. package/dist/icons/components/UiGlobeShare.js +31 -0
  341. package/dist/icons/components/UiGlobeShare.js.map +1 -0
  342. package/dist/icons/components/UiKubernetesLink.cjs +38 -0
  343. package/dist/icons/components/UiKubernetesLink.cjs.map +1 -0
  344. package/dist/icons/components/UiKubernetesLink.d.ts +9 -0
  345. package/dist/icons/components/UiKubernetesLink.d.ts.map +1 -0
  346. package/dist/icons/components/UiKubernetesLink.js +36 -0
  347. package/dist/icons/components/UiKubernetesLink.js.map +1 -0
  348. package/dist/icons/components/UiLogoAws.cjs +29 -0
  349. package/dist/icons/components/UiLogoAws.cjs.map +1 -0
  350. package/dist/icons/components/UiLogoAws.d.ts +9 -0
  351. package/dist/icons/components/UiLogoAws.d.ts.map +1 -0
  352. package/dist/icons/components/UiLogoAws.js +27 -0
  353. package/dist/icons/components/UiLogoAws.js.map +1 -0
  354. package/dist/icons/components/UiLogoAzure.cjs +29 -0
  355. package/dist/icons/components/UiLogoAzure.cjs.map +1 -0
  356. package/dist/icons/components/UiLogoAzure.d.ts +9 -0
  357. package/dist/icons/components/UiLogoAzure.d.ts.map +1 -0
  358. package/dist/icons/components/UiLogoAzure.js +27 -0
  359. package/dist/icons/components/UiLogoAzure.js.map +1 -0
  360. package/dist/icons/components/UiLogoAzureDevops.cjs +29 -0
  361. package/dist/icons/components/UiLogoAzureDevops.cjs.map +1 -0
  362. package/dist/icons/components/UiLogoAzureDevops.d.ts +9 -0
  363. package/dist/icons/components/UiLogoAzureDevops.d.ts.map +1 -0
  364. package/dist/icons/components/UiLogoAzureDevops.js +27 -0
  365. package/dist/icons/components/UiLogoAzureDevops.js.map +1 -0
  366. package/dist/icons/components/UiLogoGit.cjs +29 -0
  367. package/dist/icons/components/UiLogoGit.cjs.map +1 -0
  368. package/dist/icons/components/UiLogoGit.d.ts +9 -0
  369. package/dist/icons/components/UiLogoGit.d.ts.map +1 -0
  370. package/dist/icons/components/UiLogoGit.js +27 -0
  371. package/dist/icons/components/UiLogoGit.js.map +1 -0
  372. package/dist/icons/components/UiLogoGithub.cjs +29 -0
  373. package/dist/icons/components/UiLogoGithub.cjs.map +1 -0
  374. package/dist/icons/components/UiLogoGithub.d.ts +9 -0
  375. package/dist/icons/components/UiLogoGithub.d.ts.map +1 -0
  376. package/dist/icons/components/UiLogoGithub.js +27 -0
  377. package/dist/icons/components/UiLogoGithub.js.map +1 -0
  378. package/dist/icons/components/UiLogoJava.cjs +29 -0
  379. package/dist/icons/components/UiLogoJava.cjs.map +1 -0
  380. package/dist/icons/components/UiLogoJava.d.ts +9 -0
  381. package/dist/icons/components/UiLogoJava.d.ts.map +1 -0
  382. package/dist/icons/components/UiLogoJava.js +27 -0
  383. package/dist/icons/components/UiLogoJava.js.map +1 -0
  384. package/dist/icons/components/UiLogoKubernetes.cjs +29 -0
  385. package/dist/icons/components/UiLogoKubernetes.cjs.map +1 -0
  386. package/dist/icons/components/UiLogoKubernetes.d.ts +9 -0
  387. package/dist/icons/components/UiLogoKubernetes.d.ts.map +1 -0
  388. package/dist/icons/components/UiLogoKubernetes.js +27 -0
  389. package/dist/icons/components/UiLogoKubernetes.js.map +1 -0
  390. package/dist/icons/components/UiLogoMssql.cjs +29 -0
  391. package/dist/icons/components/UiLogoMssql.cjs.map +1 -0
  392. package/dist/icons/components/UiLogoMssql.d.ts +9 -0
  393. package/dist/icons/components/UiLogoMssql.d.ts.map +1 -0
  394. package/dist/icons/components/UiLogoMssql.js +27 -0
  395. package/dist/icons/components/UiLogoMssql.js.map +1 -0
  396. package/dist/icons/components/UiLogoOpenjdk.cjs +29 -0
  397. package/dist/icons/components/UiLogoOpenjdk.cjs.map +1 -0
  398. package/dist/icons/components/UiLogoOpenjdk.d.ts +9 -0
  399. package/dist/icons/components/UiLogoOpenjdk.d.ts.map +1 -0
  400. package/dist/icons/components/UiLogoOpenjdk.js +27 -0
  401. package/dist/icons/components/UiLogoOpenjdk.js.map +1 -0
  402. package/dist/icons/components/UiLogoOpensearch.cjs +29 -0
  403. package/dist/icons/components/UiLogoOpensearch.cjs.map +1 -0
  404. package/dist/icons/components/UiLogoOpensearch.d.ts +9 -0
  405. package/dist/icons/components/UiLogoOpensearch.d.ts.map +1 -0
  406. package/dist/icons/components/UiLogoOpensearch.js +27 -0
  407. package/dist/icons/components/UiLogoOpensearch.js.map +1 -0
  408. package/dist/icons/components/UiLogoOpentelemetry.cjs +29 -0
  409. package/dist/icons/components/UiLogoOpentelemetry.cjs.map +1 -0
  410. package/dist/icons/components/UiLogoOpentelemetry.d.ts +9 -0
  411. package/dist/icons/components/UiLogoOpentelemetry.d.ts.map +1 -0
  412. package/dist/icons/components/UiLogoOpentelemetry.js +27 -0
  413. package/dist/icons/components/UiLogoOpentelemetry.js.map +1 -0
  414. package/dist/icons/components/UiLogoPostgres.cjs +29 -0
  415. package/dist/icons/components/UiLogoPostgres.cjs.map +1 -0
  416. package/dist/icons/components/UiLogoPostgres.d.ts +9 -0
  417. package/dist/icons/components/UiLogoPostgres.d.ts.map +1 -0
  418. package/dist/icons/components/UiLogoPostgres.js +27 -0
  419. package/dist/icons/components/UiLogoPostgres.js.map +1 -0
  420. package/dist/icons/components/UiLogoSqlite.cjs +29 -0
  421. package/dist/icons/components/UiLogoSqlite.cjs.map +1 -0
  422. package/dist/icons/components/UiLogoSqlite.d.ts +9 -0
  423. package/dist/icons/components/UiLogoSqlite.d.ts.map +1 -0
  424. package/dist/icons/components/UiLogoSqlite.js +27 -0
  425. package/dist/icons/components/UiLogoSqlite.js.map +1 -0
  426. package/dist/icons/components/UiWebLink.cjs +40 -0
  427. package/dist/icons/components/UiWebLink.cjs.map +1 -0
  428. package/dist/icons/components/UiWebLink.d.ts +9 -0
  429. package/dist/icons/components/UiWebLink.d.ts.map +1 -0
  430. package/dist/icons/components/UiWebLink.js +38 -0
  431. package/dist/icons/components/UiWebLink.js.map +1 -0
  432. package/dist/icons/index.d.ts +16 -0
  433. package/dist/icons/index.d.ts.map +1 -1
  434. package/dist/icons/registry.cjs +32 -0
  435. package/dist/icons/registry.cjs.map +1 -1
  436. package/dist/icons/registry.d.ts.map +1 -1
  437. package/dist/icons/registry.js +32 -0
  438. package/dist/icons/registry.js.map +1 -1
  439. package/dist/icons.cjs +32 -0
  440. package/dist/icons.js +17 -1
  441. package/dist/index.cjs +38 -5
  442. package/dist/index.js +23 -7
  443. package/dist/jvm/classes/PatchedClassList.cjs +11 -2
  444. package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
  445. package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
  446. package/dist/jvm/classes/PatchedClassList.js +11 -2
  447. package/dist/jvm/classes/PatchedClassList.js.map +1 -1
  448. package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
  449. package/dist/jvm/model/patches.cjs +4 -2
  450. package/dist/jvm/model/patches.cjs.map +1 -1
  451. package/dist/jvm/model/patches.d.ts +3 -1
  452. package/dist/jvm/model/patches.d.ts.map +1 -1
  453. package/dist/jvm/model/patches.js +4 -2
  454. package/dist/jvm/model/patches.js.map +1 -1
  455. package/dist/jvm/protocol/client.d.ts +7 -2
  456. package/dist/jvm/protocol/client.d.ts.map +1 -1
  457. package/dist/jvm/protocol/operation-client.cjs +30 -11
  458. package/dist/jvm/protocol/operation-client.cjs.map +1 -1
  459. package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
  460. package/dist/jvm/protocol/operation-client.js +30 -11
  461. package/dist/jvm/protocol/operation-client.js.map +1 -1
  462. package/dist/jvm/protocol/query-keys.cjs +1 -1
  463. package/dist/jvm/protocol/query-keys.cjs.map +1 -1
  464. package/dist/jvm/protocol/query-keys.d.ts +1 -1
  465. package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
  466. package/dist/jvm/protocol/query-keys.js +1 -1
  467. package/dist/jvm/protocol/query-keys.js.map +1 -1
  468. package/dist/jvm/protocol/status.cjs +38 -0
  469. package/dist/jvm/protocol/status.cjs.map +1 -0
  470. package/dist/jvm/protocol/status.d.ts +13 -0
  471. package/dist/jvm/protocol/status.d.ts.map +1 -0
  472. package/dist/jvm/protocol/status.js +38 -0
  473. package/dist/jvm/protocol/status.js.map +1 -0
  474. package/dist/jvm/protocol/types.d.ts +16 -4
  475. package/dist/jvm/protocol/types.d.ts.map +1 -1
  476. package/dist/jvm/runtime/GcSummary.cjs +7 -1
  477. package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
  478. package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
  479. package/dist/jvm/runtime/GcSummary.js +7 -1
  480. package/dist/jvm/runtime/GcSummary.js.map +1 -1
  481. package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
  482. package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
  483. package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
  484. package/dist/jvm/surfaces/ClassesSurface.js +12 -11
  485. package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
  486. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
  487. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
  488. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
  489. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
  490. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
  491. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
  492. package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
  493. package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
  494. package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
  495. package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
  496. package/dist/jvm/surfaces/PatchesSurface.js +4 -9
  497. package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
  498. package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
  499. package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
  500. package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
  501. package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
  502. package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
  503. package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
  504. package/dist/jvm/surfaces/jvm-context.cjs +23 -4
  505. package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
  506. package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
  507. package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
  508. package/dist/jvm/surfaces/jvm-context.js +23 -5
  509. package/dist/jvm/surfaces/jvm-context.js.map +1 -1
  510. package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
  511. package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
  512. package/dist/jvm/surfaces/use-patch-actions.js +2 -2
  513. package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
  514. package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
  515. package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
  516. package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
  517. package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
  518. package/dist/jvm/threads/FoldedStackTrace.js +3 -2
  519. package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
  520. package/dist/jvm/threads/ThreadDetail.cjs +6 -2
  521. package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
  522. package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
  523. package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
  524. package/dist/jvm/threads/ThreadDetail.js +6 -2
  525. package/dist/jvm/threads/ThreadDetail.js.map +1 -1
  526. package/dist/jvm.cjs +3 -0
  527. package/dist/jvm.d.ts +2 -1
  528. package/dist/jvm.d.ts.map +1 -1
  529. package/dist/jvm.js +3 -2
  530. package/dist/layout/AppShell.cjs.map +1 -1
  531. package/dist/layout/AppShell.d.ts +16 -0
  532. package/dist/layout/AppShell.d.ts.map +1 -1
  533. package/dist/layout/AppShell.js.map +1 -1
  534. package/dist/layout/AppShell.nav.cjs +21 -2
  535. package/dist/layout/AppShell.nav.cjs.map +1 -1
  536. package/dist/layout/AppShell.nav.js +21 -2
  537. package/dist/layout/AppShell.nav.js.map +1 -1
  538. package/dist/layout/Workspace.cjs +66 -21
  539. package/dist/layout/Workspace.cjs.map +1 -1
  540. package/dist/layout/Workspace.d.ts +6 -1
  541. package/dist/layout/Workspace.d.ts.map +1 -1
  542. package/dist/layout/Workspace.js +66 -21
  543. package/dist/layout/Workspace.js.map +1 -1
  544. package/dist/layout/Workspace.model.cjs +20 -0
  545. package/dist/layout/Workspace.model.cjs.map +1 -1
  546. package/dist/layout/Workspace.model.d.ts +17 -0
  547. package/dist/layout/Workspace.model.d.ts.map +1 -1
  548. package/dist/layout/Workspace.model.js +20 -1
  549. package/dist/layout/Workspace.model.js.map +1 -1
  550. package/dist/layout/Workspace.regions.cjs +10 -6
  551. package/dist/layout/Workspace.regions.cjs.map +1 -1
  552. package/dist/layout/Workspace.regions.d.ts +4 -1
  553. package/dist/layout/Workspace.regions.d.ts.map +1 -1
  554. package/dist/layout/Workspace.regions.js +10 -6
  555. package/dist/layout/Workspace.regions.js.map +1 -1
  556. package/dist/lib/duration.cjs +20 -0
  557. package/dist/lib/duration.cjs.map +1 -1
  558. package/dist/lib/duration.d.ts +8 -0
  559. package/dist/lib/duration.d.ts.map +1 -1
  560. package/dist/lib/duration.js +19 -1
  561. package/dist/lib/duration.js.map +1 -1
  562. package/dist/monaco/MonacoEditor.cjs +34 -30
  563. package/dist/monaco/MonacoEditor.cjs.map +1 -1
  564. package/dist/monaco/MonacoEditor.d.ts.map +1 -1
  565. package/dist/monaco/MonacoEditor.js +34 -30
  566. package/dist/monaco/MonacoEditor.js.map +1 -1
  567. package/dist/overlay/ConfirmDialog.cjs +5 -2
  568. package/dist/overlay/ConfirmDialog.cjs.map +1 -1
  569. package/dist/overlay/ConfirmDialog.d.ts +14 -2
  570. package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
  571. package/dist/overlay/ConfirmDialog.js +5 -2
  572. package/dist/overlay/ConfirmDialog.js.map +1 -1
  573. package/dist/profiles/cel/celEditor.cjs +94 -285
  574. package/dist/profiles/cel/celEditor.cjs.map +1 -1
  575. package/dist/profiles/cel/celEditor.d.ts +10 -15
  576. package/dist/profiles/cel/celEditor.d.ts.map +1 -1
  577. package/dist/profiles/cel/celEditor.js +97 -287
  578. package/dist/profiles/cel/celEditor.js.map +1 -1
  579. package/dist/profiles/cel/celExpression.cjs +1 -61
  580. package/dist/profiles/cel/celExpression.cjs.map +1 -1
  581. package/dist/profiles/cel/celExpression.d.ts +2 -38
  582. package/dist/profiles/cel/celExpression.d.ts.map +1 -1
  583. package/dist/profiles/cel/celExpression.js +2 -58
  584. package/dist/profiles/cel/celExpression.js.map +1 -1
  585. package/dist/profiles/cel/celPlayground.cjs +122 -0
  586. package/dist/profiles/cel/celPlayground.cjs.map +1 -0
  587. package/dist/profiles/cel/celPlayground.d.ts +43 -0
  588. package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
  589. package/dist/profiles/cel/celPlayground.js +118 -0
  590. package/dist/profiles/cel/celPlayground.js.map +1 -0
  591. package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
  592. package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
  593. package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
  594. package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
  595. package/dist/profiles/connections/connectionBrowserModel.js +2 -2
  596. package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
  597. package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
  598. package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
  599. package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
  600. package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
  601. package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
  602. package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
  603. package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
  604. package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
  605. package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
  606. package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
  607. package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
  608. package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
  609. package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
  610. package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
  611. package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
  612. package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
  613. package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
  614. package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
  615. package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
  616. package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
  617. package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
  618. package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
  619. package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
  620. package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
  621. package/dist/profiles/editor/profileEditor.cjs +126 -38
  622. package/dist/profiles/editor/profileEditor.cjs.map +1 -1
  623. package/dist/profiles/editor/profileEditor.d.ts +5 -1
  624. package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
  625. package/dist/profiles/editor/profileEditor.js +127 -39
  626. package/dist/profiles/editor/profileEditor.js.map +1 -1
  627. package/dist/profiles/editor/profileEditorModel.cjs +65 -19
  628. package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
  629. package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
  630. package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
  631. package/dist/profiles/editor/profileEditorModel.js +64 -18
  632. package/dist/profiles/editor/profileEditorModel.js.map +1 -1
  633. package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
  634. package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
  635. package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
  636. package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
  637. package/dist/profiles/editor/profileEditorPreview.js +129 -29
  638. package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
  639. package/dist/profiles/editor/profileEditorSections.cjs +137 -88
  640. package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
  641. package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
  642. package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
  643. package/dist/profiles/editor/profileEditorSections.js +138 -90
  644. package/dist/profiles/editor/profileEditorSections.js.map +1 -1
  645. package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
  646. package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
  647. package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
  648. package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
  649. package/dist/profiles/editor/profileMappingPreview.js +23 -7
  650. package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
  651. package/dist/profiles/editor/profileSaveAsDialog.cjs +93 -0
  652. package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -0
  653. package/dist/profiles/editor/profileSaveAsDialog.d.ts +17 -0
  654. package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -0
  655. package/dist/profiles/editor/profileSaveAsDialog.js +93 -0
  656. package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -0
  657. package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
  658. package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
  659. package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
  660. package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
  661. package/dist/profiles/editor/profileSourceExtensions.js +70 -0
  662. package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
  663. package/dist/profiles/editor/samplePaths.cjs +54 -0
  664. package/dist/profiles/editor/samplePaths.cjs.map +1 -0
  665. package/dist/profiles/editor/samplePaths.d.ts +27 -0
  666. package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
  667. package/dist/profiles/editor/samplePaths.js +53 -0
  668. package/dist/profiles/editor/samplePaths.js.map +1 -0
  669. package/dist/profiles/editor/testSchema.d.ts.map +1 -1
  670. package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
  671. package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
  672. package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
  673. package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
  674. package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
  675. package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
  676. package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
  677. package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
  678. package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
  679. package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
  680. package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
  681. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
  682. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
  683. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
  684. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
  685. package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
  686. package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
  687. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
  688. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
  689. package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
  690. package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
  691. package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
  692. package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
  693. package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
  694. package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
  695. package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
  696. package/dist/profiles/fields/profileFieldControls.cjs +3 -2
  697. package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
  698. package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
  699. package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
  700. package/dist/profiles/fields/profileFieldControls.js +3 -2
  701. package/dist/profiles/fields/profileFieldControls.js.map +1 -1
  702. package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
  703. package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
  704. package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
  705. package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
  706. package/dist/profiles/fields/profileFieldEditor.js +99 -186
  707. package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
  708. package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
  709. package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
  710. package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
  711. package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
  712. package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
  713. package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
  714. package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
  715. package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
  716. package/dist/profiles/fields/profileFieldIcons.js +2 -0
  717. package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
  718. package/dist/profiles/fields/profileFieldList.cjs +23 -1
  719. package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
  720. package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
  721. package/dist/profiles/fields/profileFieldList.js +23 -1
  722. package/dist/profiles/fields/profileFieldList.js.map +1 -1
  723. package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
  724. package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
  725. package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
  726. package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
  727. package/dist/profiles/fields/profileFieldPreview.js +110 -0
  728. package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
  729. package/dist/profiles/fields/profileFieldSample.cjs +182 -0
  730. package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
  731. package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
  732. package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
  733. package/dist/profiles/fields/profileFieldSample.js +180 -0
  734. package/dist/profiles/fields/profileFieldSample.js.map +1 -0
  735. package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
  736. package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
  737. package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
  738. package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
  739. package/dist/profiles/fields/profileFieldTypeField.js +104 -0
  740. package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
  741. package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
  742. package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
  743. package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
  744. package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
  745. package/dist/profiles/fields/profileFieldTypes.js +1 -0
  746. package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
  747. package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
  748. package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
  749. package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
  750. package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
  751. package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
  752. package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
  753. package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
  754. package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
  755. package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
  756. package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
  757. package/dist/profiles/fields/profileFieldValueMode.js +59 -0
  758. package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
  759. package/dist/profiles/processor/processorConfig.cjs +79 -79
  760. package/dist/profiles/processor/processorConfig.cjs.map +1 -1
  761. package/dist/profiles/processor/processorConfig.d.ts +30 -3
  762. package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
  763. package/dist/profiles/processor/processorConfig.js +78 -78
  764. package/dist/profiles/processor/processorConfig.js.map +1 -1
  765. package/dist/profiles/processor/processorPipeline.cjs +24 -8
  766. package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
  767. package/dist/profiles/processor/processorPipeline.d.ts +3 -3
  768. package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
  769. package/dist/profiles/processor/processorPipeline.js +25 -9
  770. package/dist/profiles/processor/processorPipeline.js.map +1 -1
  771. package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
  772. package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
  773. package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
  774. package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
  775. package/dist/profiles/processor/processorPipelineEditor.js +39 -95
  776. package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
  777. package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
  778. package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
  779. package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
  780. package/dist/profiles/processor/processorPipelineExtension.js +3 -2
  781. package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
  782. package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
  783. package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
  784. package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
  785. package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
  786. package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
  787. package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
  788. package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
  789. package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
  790. package/dist/profiles/wizard/profileWizardModel.js +10 -1
  791. package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
  792. package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
  793. package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
  794. package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
  795. package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
  796. package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
  797. package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
  798. package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
  799. package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
  800. package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
  801. package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
  802. package/dist/profiles/wizard/useProfileInspection.js +39 -0
  803. package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
  804. package/dist/profiles.cjs +9 -11
  805. package/dist/profiles.js +8 -8
  806. package/dist/rpc/EntityExplorerApp.cjs +7 -3
  807. package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
  808. package/dist/rpc/EntityExplorerApp.d.ts +16 -1
  809. package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
  810. package/dist/rpc/EntityExplorerApp.js +7 -3
  811. package/dist/rpc/EntityExplorerApp.js.map +1 -1
  812. package/dist/rpc/InlineError.cjs +30 -10
  813. package/dist/rpc/InlineError.cjs.map +1 -1
  814. package/dist/rpc/InlineError.d.ts +10 -1
  815. package/dist/rpc/InlineError.d.ts.map +1 -1
  816. package/dist/rpc/InlineError.js +30 -10
  817. package/dist/rpc/InlineError.js.map +1 -1
  818. package/dist/rpc/SchemaActionForm.cjs +9 -6
  819. package/dist/rpc/SchemaActionForm.cjs.map +1 -1
  820. package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
  821. package/dist/rpc/SchemaActionForm.js +9 -6
  822. package/dist/rpc/SchemaActionForm.js.map +1 -1
  823. package/dist/rpc/SessionHeader.cjs +117 -111
  824. package/dist/rpc/SessionHeader.cjs.map +1 -1
  825. package/dist/rpc/SessionHeader.d.ts +3 -1
  826. package/dist/rpc/SessionHeader.d.ts.map +1 -1
  827. package/dist/rpc/SessionHeader.js +117 -111
  828. package/dist/rpc/SessionHeader.js.map +1 -1
  829. package/dist/rpc/formMetadata.cjs +2 -6
  830. package/dist/rpc/formMetadata.cjs.map +1 -1
  831. package/dist/rpc/formMetadata.d.ts.map +1 -1
  832. package/dist/rpc/formMetadata.js +1 -5
  833. package/dist/rpc/formMetadata.js.map +1 -1
  834. package/dist/rpc/surfaceNav.cjs +5 -0
  835. package/dist/rpc/surfaceNav.cjs.map +1 -1
  836. package/dist/rpc/surfaceNav.d.ts.map +1 -1
  837. package/dist/rpc/surfaceNav.js +5 -0
  838. package/dist/rpc/surfaceNav.js.map +1 -1
  839. package/dist/runtime/barrels.json +8944 -8877
  840. package/dist/runtime/importmap.json +2168 -2129
  841. package/dist/styles.css +1 -1
  842. package/package.json +1 -1
  843. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
  844. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
  845. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
  846. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
  847. package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
  848. package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
  849. package/dist/profiles/cel/celEditorResults.cjs +0 -158
  850. package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
  851. package/dist/profiles/cel/celEditorResults.d.ts +0 -37
  852. package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
  853. package/dist/profiles/cel/celEditorResults.js +0 -156
  854. package/dist/profiles/cel/celEditorResults.js.map +0 -1
@@ -104,9 +104,9 @@ function withTarget(options, target) {
104
104
  * the builder owns both the search and the limit it returns, so none of the
105
105
  * three is rendered a second time as a generic field.
106
106
  */
107
- function queryBrowserOptionsSchema(descriptor) {
107
+ function queryBrowserOptionsSchema(descriptor, { omitKeys = [] } = {}) {
108
108
  if (!descriptor.optionsSchema) return void 0;
109
- const properties = { ...descriptor.optionsSchema.properties };
109
+ const properties = Object.fromEntries(Object.entries(descriptor.optionsSchema.properties ?? {}).filter(([key]) => !omitKeys.includes(key)));
110
110
  if (properties.search) {
111
111
  delete properties.search;
112
112
  delete properties.limit;
@@ -1 +1 @@
1
- {"version":3,"file":"connectionBrowserModel.cjs","names":["profileApiPath","normalizeErrorDiagnostics","QueryBrowserExecutionError"],"sources":["../../../src/profiles/connections/connectionBrowserModel.ts"],"sourcesContent":["/**\n * The data layer behind every query browser: the descriptor and inspection\n * shapes the server serves, and the hook that turns a selection (database,\n * index) into the catalog and completion a browser renders. All three hosts —\n * the connection browser, the profile wizard and the profile builder — drive\n * the same plumbing from here so the surfaces cannot drift apart.\n */\n\nimport type { ComboboxOption } from \"../../components/Combobox\";\nimport type { WorkloadKind } from \"../../components/workload-picker-utils\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { normalizeErrorDiagnostics } from \"../../data/diagnostics/error-diagnostics\";\nimport type { QueryBrowserCompletion } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { QueryBrowserDiagnostics } from \"../../data/query-browser/QueryBrowser.types\";\nimport { profileApiPath } from \"../profileApi\";\nimport { QueryBrowserExecutionError } from \"../../data/query-browser/QueryBrowser.types\";\nimport type { ReactNode } from \"react\";\n\nexport type BrowserDescriptor = {\n kind: \"query\" | \"cache\";\n provider?: string;\n language?: \"sql\" | \"json\" | \"text\";\n queryLabel?: string;\n defaultQuery?: string;\n resultView?: \"table\" | \"logs\" | \"timeseries\";\n optionsSchema?: JsonSchemaObject;\n initialOptions?: Record<string, unknown>;\n catalog?: boolean;\n /** Allows providers whose request is entirely structural to run without editor text. */\n allowEmptyQuery?: boolean;\n /** The typed resource a query runs against instead of a catalog tree. */\n target?: BrowserTarget;\n /**\n * The row caps that apply when a profile declares none of its own: the page a\n * caller gets by default, the largest page it may ask for, and where an\n * all-row export stops. The query's own `limit` option is none of them.\n */\n rowLimits?: BrowserRowLimits;\n /**\n * The order the provider already returned these rows in.\n *\n * A browser query is a bounded top-N rather than a whole result, so the cut\n * and the order are the same decision: re-sorting the rows the server chose\n * shows them as though the cut had been made the other way round. Kubernetes\n * is the case that proves it — its API only resumes forward, so a limit\n * returns the oldest lines, and newest-first would read as \"the latest logs\".\n */\n resultSort?: BrowserResultSort;\n};\n\n/** A column a result is already ordered by, and which way. */\nexport type BrowserResultSort = { key: string; dir: \"asc\" | \"desc\" };\n\nexport type BrowserTarget =\n | { kind: \"index\"; label: string; option: string }\n | {\n kind: \"kubernetes-workload\";\n label: string;\n kinds: WorkloadKind[];\n };\n\n/** The defaults the server serves, shown as what an unset cap inherits. */\nexport type BrowserRowLimits = {\n pageSize: number;\n maxPageSize: number;\n maxExportRows: number;\n};\n\n/** The caps a profile sets for itself; each unset one takes its default. */\nexport type ProfileRowLimits = {\n pageSize?: number;\n maxPageSize?: number;\n maxExportRows?: number;\n};\n\nexport type TargetKind =\n | \"group\"\n | \"index\"\n | \"alias\"\n | \"data_stream\"\n | \"pattern\";\n\nexport type InspectionTarget = {\n name: string;\n kind: TargetKind;\n /** The rotation wildcard this concrete index rolls up into. */\n pattern?: string;\n /** How many rotations a `pattern` target covers. */\n count?: number;\n members?: string[];\n};\n\nexport type InspectionCache = {\n policy: string;\n state: \"fresh\" | \"stale\";\n cached: boolean;\n refreshing?: boolean;\n loadedAt: string;\n freshUntil: string;\n lastChangedAt: string;\n lastRefreshAttempt?: string;\n lastRefreshError?: string;\n ageMs: number;\n retryAfterMs?: number;\n unchangedRefreshes?: number;\n};\n\nexport type CatalogNode = {\n id: string;\n label: string;\n kind: string;\n query?: string;\n options?: Record<string, unknown>;\n children?: CatalogNode[];\n};\n\nexport type InspectionField = {\n name: string;\n dataType?: string;\n types?: string[];\n searchable?: boolean;\n aggregatable?: boolean;\n conflicting?: boolean;\n};\n\nexport type BrowserInspection = {\n kind: \"sql\" | \"opensearch\";\n dialect?: \"postgresql\" | \"mysql\" | \"mssql\" | \"standard\";\n database?: string;\n databases?: string[];\n defaultSchema?: string;\n schemas?: {\n name: string;\n relations: {\n name: string;\n type?: \"table\" | \"view\";\n columns: InspectionField[];\n }[];\n }[];\n targets?: InspectionTarget[];\n nodes?: CatalogNode[];\n selected?: {\n target: InspectionTarget;\n fields: InspectionField[];\n };\n truncated?: boolean;\n truncateReason?: string;\n cache?: InspectionCache;\n};\n\nexport type ConnectionProfileActionRenderer = (context: {\n connectionName: string;\n providerType: string;\n providerOptions?: Record<string, unknown>;\n profileQuery?: string;\n}) => ReactNode;\n\n/**\n * savedConnectionID reads the id out of a `connection://<id>` reference. An\n * inline URL has no id, and so no catalog to browse — hence null rather than a\n * guess.\n */\nexport function savedConnectionID(value: string | undefined): string | null {\n const prefix = \"connection://\";\n if (!value?.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function browserBaseUrl(connectionID: string): string {\n return profileApiPath(\n `connection/${encodeURIComponent(connectionID)}/browser`,\n );\n}\n\nexport async function fetchJSON<T>(\n url: string,\n init?: RequestInit,\n): Promise<T> {\n const response = await fetch(url, init);\n if (!response.ok) {\n const body = await response.text();\n const fallback = body.trim() || `request failed: ${response.status}`;\n try {\n const parsed = JSON.parse(body) as {\n error?: unknown;\n diagnostics?: QueryBrowserDiagnostics;\n };\n if (typeof parsed.error === \"string\") {\n const errorDetails = normalizeErrorDiagnostics(parsed, parsed.error);\n throw new QueryBrowserExecutionError(\n errorDetails?.message ?? parsed.error,\n parsed.diagnostics,\n errorDetails ?? undefined,\n );\n }\n } catch (error) {\n if (error instanceof QueryBrowserExecutionError) throw error;\n }\n throw new Error(fallback);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * Rotations lead: a cluster with fifty-three daily jaeger indexes has one\n * target an author actually means, and it is `jaeger-span-*`. The concrete\n * indexes stay listed last so a single day is still reachable.\n */\nconst targetGroups: { kind: TargetKind; label: string }[] = [\n { kind: \"group\", label: \"Index groups\" },\n { kind: \"pattern\", label: \"Index patterns\" },\n { kind: \"alias\", label: \"Aliases\" },\n { kind: \"data_stream\", label: \"Data streams\" },\n { kind: \"index\", label: \"Indexes\" },\n];\n\nexport function openSearchIndexOptions(\n inspection?: BrowserInspection,\n): ComboboxOption[] {\n if (inspection?.kind !== \"opensearch\") return [];\n const targets = inspection.targets ?? [];\n return targetGroups.flatMap(({ kind, label }) =>\n targets\n .filter((target) => target.kind === kind)\n .map((target) => ({\n value: target.name,\n label: target.count\n ? `${target.pattern ?? target.name} · ${target.count} indexes`\n : target.name,\n selectedLabel: target.pattern ?? target.name,\n group: label,\n title: target.count\n ? `${target.name} · ${target.count} rotated indexes`\n : `${target.name} · ${target.kind.replace(\"_\", \" \")}`,\n })),\n );\n}\n\n/**\n * openSearchTargetKind resolves how to inspect a picked target. An undiscovered\n * name containing a wildcard is a pattern by construction — the server inspects\n * it without requiring it to have been enumerated.\n */\nexport function openSearchTargetKind(\n inspection: BrowserInspection | undefined,\n name: string,\n): string {\n const discovered = (inspection?.targets ?? []).find(\n (target) => target.name === name,\n );\n if (discovered) return discovered.kind;\n return name.includes(\"*\") ? \"pattern\" : \"\";\n}\n\n/**\n * withTarget applies a picked target over a host's options, clearing both keys\n * when the picker is emptied so a stale index cannot survive the selection.\n */\nexport function withTarget(\n options: Record<string, unknown>,\n target: { option: string; value: string; targetKind: string } | undefined,\n): Record<string, unknown> {\n if (!target) return options;\n const next = { ...options };\n if (target.value) {\n next[target.option] = target.value;\n if (target.targetKind) next.targetKind = target.targetKind;\n else delete next.targetKind;\n } else {\n delete next[target.option];\n delete next.targetKind;\n }\n return next;\n}\n\n/**\n * queryBrowserOptionsSchema is what the inline options form edits — the leftover\n * options, once the navigator has claimed the ones that belong with the query.\n * The target has its own combobox, and where the source has a structured search\n * the builder owns both the search and the limit it returns, so none of the\n * three is rendered a second time as a generic field.\n */\nexport function queryBrowserOptionsSchema(\n descriptor: BrowserDescriptor,\n): JsonSchemaObject | undefined {\n if (!descriptor.optionsSchema) return undefined;\n const properties = { ...descriptor.optionsSchema.properties };\n if (properties.search) {\n delete properties.search;\n delete properties.limit;\n }\n if (descriptor.target?.kind === \"index\") {\n delete properties[descriptor.target.option];\n }\n if (descriptor.target?.kind === \"kubernetes-workload\") {\n delete properties.kind;\n delete properties.namespace;\n delete properties.name;\n }\n return { ...descriptor.optionsSchema, properties };\n}\n\nexport function completionForInspection(\n inspection?: BrowserInspection,\n selectedInspection?: BrowserInspection,\n): QueryBrowserCompletion | undefined {\n if (inspection?.kind === \"sql\" && inspection.dialect) {\n return {\n kind: \"sql\",\n dialect: inspection.dialect,\n ...(inspection.defaultSchema\n ? { defaultSchema: inspection.defaultSchema }\n : {}),\n schemas: (inspection.schemas ?? []).map((schema) => ({\n name: schema.name,\n relations: schema.relations.map((relation) => ({\n name: relation.name,\n ...(relation.type ? { type: relation.type } : {}),\n columns: relation.columns.map((column) => ({\n name: column.name,\n types: column.dataType ? [column.dataType] : [],\n })),\n })),\n })),\n };\n }\n if (\n selectedInspection?.kind === \"opensearch\" &&\n selectedInspection.selected\n ) {\n return {\n kind: \"json-fields\",\n vocabulary: \"opensearch\",\n fields: selectedInspection.selected.fields,\n };\n }\n return undefined;\n}\n\n/**\n * mergeProviderOptions layers the option sources a browser draws on, in\n * increasing precedence, and pins the active database when there is one.\n * `targetKind` only tells the inspection endpoint which field mappings to\n * fetch, so it is dropped unless the caller is feeding the browser itself.\n */\nexport function mergeProviderOptions(input: {\n layers: Array<Record<string, unknown> | undefined>;\n database?: string;\n keepTargetKind?: boolean;\n}): Record<string, unknown> {\n const merged: Record<string, unknown> = {};\n for (const layer of input.layers) Object.assign(merged, layer ?? {});\n if (input.database) merged.database = input.database;\n if (!input.keepTargetKind) delete merged.targetKind;\n return merged;\n}\n"],"mappings":";;;;;;;;;AAkKA,SAAgB,kBAAkB,OAA0C;CAE1E,IAAI,CAAC,OAAO,WAAW,eAAM,GAAG,OAAO;CACvC,OAAO,MAAM,MAAM,EAAa,CAAC,CAAC,KAAK,KAAK;AAC9C;AAEA,SAAgB,eAAe,cAA8B;CAC3D,OAAOA,mBAAAA,eACL,cAAc,mBAAmB,YAAY,EAAE,SACjD;AACF;AAEA,eAAsB,UACpB,KACA,MACY;CACZ,MAAM,WAAW,MAAM,MAAM,KAAK,IAAI;CACtC,IAAI,CAAC,SAAS,IAAI;EAChB,MAAM,OAAO,MAAM,SAAS,KAAK;EACjC,MAAM,WAAW,KAAK,KAAK,KAAK,mBAAmB,SAAS;EAC5D,IAAI;GACF,MAAM,SAAS,KAAK,MAAM,IAAI;GAI9B,IAAI,OAAO,OAAO,UAAU,UAAU;IACpC,MAAM,eAAeC,0BAAAA,0BAA0B,QAAQ,OAAO,KAAK;IACnE,MAAM,IAAIC,2BAAAA,2BACR,cAA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,CAAC;CACzC,KAAK,MAAM,SAAS,MAAM,QAAQ,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC;CACnE,IAAI,MAAM,UAAU,OAAO,WAAW,MAAM;CAC5C,IAAI,CAAC,MAAM,gBAAgB,OAAO,OAAO;CACzC,OAAO;AACT"}
1
+ {"version":3,"file":"connectionBrowserModel.cjs","names":["profileApiPath","normalizeErrorDiagnostics","QueryBrowserExecutionError"],"sources":["../../../src/profiles/connections/connectionBrowserModel.ts"],"sourcesContent":["/**\n * The data layer behind every query browser: the descriptor and inspection\n * shapes the server serves, and the hook that turns a selection (database,\n * index) into the catalog and completion a browser renders. All three hosts —\n * the connection browser, the profile wizard and the profile builder — drive\n * the same plumbing from here so the surfaces cannot drift apart.\n */\n\nimport type { ComboboxOption } from \"../../components/Combobox\";\nimport type { WorkloadKind } from \"../../components/workload-picker-utils\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { normalizeErrorDiagnostics } from \"../../data/diagnostics/error-diagnostics\";\nimport type { QueryBrowserCompletion } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { QueryBrowserDiagnostics } from \"../../data/query-browser/QueryBrowser.types\";\nimport { profileApiPath } from \"../profileApi\";\nimport { QueryBrowserExecutionError } from \"../../data/query-browser/QueryBrowser.types\";\nimport type { ReactNode } from \"react\";\n\nexport type BrowserDescriptor = {\n kind: \"query\" | \"cache\";\n provider?: string;\n language?: \"sql\" | \"json\" | \"text\";\n queryLabel?: string;\n defaultQuery?: string;\n resultView?: \"table\" | \"logs\" | \"timeseries\";\n optionsSchema?: JsonSchemaObject;\n initialOptions?: Record<string, unknown>;\n catalog?: boolean;\n /** Allows providers whose request is entirely structural to run without editor text. */\n allowEmptyQuery?: boolean;\n /** The typed resource a query runs against instead of a catalog tree. */\n target?: BrowserTarget;\n /**\n * The row caps that apply when a profile declares none of its own: the page a\n * caller gets by default, the largest page it may ask for, and where an\n * all-row export stops. The query's own `limit` option is none of them.\n */\n rowLimits?: BrowserRowLimits;\n /**\n * The order the provider already returned these rows in.\n *\n * A browser query is a bounded top-N rather than a whole result, so the cut\n * and the order are the same decision: re-sorting the rows the server chose\n * shows them as though the cut had been made the other way round. Kubernetes\n * is the case that proves it — its API only resumes forward, so a limit\n * returns the oldest lines, and newest-first would read as \"the latest logs\".\n */\n resultSort?: BrowserResultSort;\n};\n\n/** A column a result is already ordered by, and which way. */\nexport type BrowserResultSort = { key: string; dir: \"asc\" | \"desc\" };\n\nexport type BrowserTarget =\n | { kind: \"index\"; label: string; option: string }\n | {\n kind: \"kubernetes-workload\";\n label: string;\n kinds: WorkloadKind[];\n };\n\n/** The defaults the server serves, shown as what an unset cap inherits. */\nexport type BrowserRowLimits = {\n pageSize: number;\n maxPageSize: number;\n maxExportRows: number;\n};\n\n/** The caps a profile sets for itself; each unset one takes its default. */\nexport type ProfileRowLimits = {\n pageSize?: number;\n maxPageSize?: number;\n maxExportRows?: number;\n};\n\nexport type TargetKind =\n | \"group\"\n | \"index\"\n | \"alias\"\n | \"data_stream\"\n | \"pattern\";\n\nexport type InspectionTarget = {\n name: string;\n kind: TargetKind;\n /** The rotation wildcard this concrete index rolls up into. */\n pattern?: string;\n /** How many rotations a `pattern` target covers. */\n count?: number;\n members?: string[];\n};\n\nexport type InspectionCache = {\n policy: string;\n state: \"fresh\" | \"stale\";\n cached: boolean;\n refreshing?: boolean;\n loadedAt: string;\n freshUntil: string;\n lastChangedAt: string;\n lastRefreshAttempt?: string;\n lastRefreshError?: string;\n ageMs: number;\n retryAfterMs?: number;\n unchangedRefreshes?: number;\n};\n\nexport type CatalogNode = {\n id: string;\n label: string;\n kind: string;\n query?: string;\n options?: Record<string, unknown>;\n children?: CatalogNode[];\n};\n\nexport type InspectionField = {\n name: string;\n dataType?: string;\n types?: string[];\n searchable?: boolean;\n aggregatable?: boolean;\n conflicting?: boolean;\n};\n\nexport type BrowserInspection = {\n kind: \"sql\" | \"opensearch\";\n dialect?: \"postgresql\" | \"mysql\" | \"mssql\" | \"standard\";\n database?: string;\n databases?: string[];\n defaultSchema?: string;\n schemas?: {\n name: string;\n relations: {\n name: string;\n type?: \"table\" | \"view\";\n columns: InspectionField[];\n }[];\n }[];\n targets?: InspectionTarget[];\n nodes?: CatalogNode[];\n selected?: {\n target: InspectionTarget;\n fields: InspectionField[];\n };\n truncated?: boolean;\n truncateReason?: string;\n cache?: InspectionCache;\n};\n\nexport type ConnectionProfileActionRenderer = (context: {\n connectionName: string;\n providerType: string;\n providerOptions?: Record<string, unknown>;\n profileQuery?: string;\n}) => ReactNode;\n\n/**\n * savedConnectionID reads the id out of a `connection://<id>` reference. An\n * inline URL has no id, and so no catalog to browse — hence null rather than a\n * guess.\n */\nexport function savedConnectionID(value: string | undefined): string | null {\n const prefix = \"connection://\";\n if (!value?.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function browserBaseUrl(connectionID: string): string {\n return profileApiPath(\n `connection/${encodeURIComponent(connectionID)}/browser`,\n );\n}\n\nexport async function fetchJSON<T>(\n url: string,\n init?: RequestInit,\n): Promise<T> {\n const response = await fetch(url, init);\n if (!response.ok) {\n const body = await response.text();\n const fallback = body.trim() || `request failed: ${response.status}`;\n try {\n const parsed = JSON.parse(body) as {\n error?: unknown;\n diagnostics?: QueryBrowserDiagnostics;\n };\n if (typeof parsed.error === \"string\") {\n const errorDetails = normalizeErrorDiagnostics(parsed, parsed.error);\n throw new QueryBrowserExecutionError(\n errorDetails?.message ?? parsed.error,\n parsed.diagnostics,\n errorDetails ?? undefined,\n );\n }\n } catch (error) {\n if (error instanceof QueryBrowserExecutionError) throw error;\n }\n throw new Error(fallback);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * Rotations lead: a cluster with fifty-three daily jaeger indexes has one\n * target an author actually means, and it is `jaeger-span-*`. The concrete\n * indexes stay listed last so a single day is still reachable.\n */\nconst targetGroups: { kind: TargetKind; label: string }[] = [\n { kind: \"group\", label: \"Index groups\" },\n { kind: \"pattern\", label: \"Index patterns\" },\n { kind: \"alias\", label: \"Aliases\" },\n { kind: \"data_stream\", label: \"Data streams\" },\n { kind: \"index\", label: \"Indexes\" },\n];\n\nexport function openSearchIndexOptions(\n inspection?: BrowserInspection,\n): ComboboxOption[] {\n if (inspection?.kind !== \"opensearch\") return [];\n const targets = inspection.targets ?? [];\n return targetGroups.flatMap(({ kind, label }) =>\n targets\n .filter((target) => target.kind === kind)\n .map((target) => ({\n value: target.name,\n label: target.count\n ? `${target.pattern ?? target.name} · ${target.count} indexes`\n : target.name,\n selectedLabel: target.pattern ?? target.name,\n group: label,\n title: target.count\n ? `${target.name} · ${target.count} rotated indexes`\n : `${target.name} · ${target.kind.replace(\"_\", \" \")}`,\n })),\n );\n}\n\n/**\n * openSearchTargetKind resolves how to inspect a picked target. An undiscovered\n * name containing a wildcard is a pattern by construction — the server inspects\n * it without requiring it to have been enumerated.\n */\nexport function openSearchTargetKind(\n inspection: BrowserInspection | undefined,\n name: string,\n): string {\n const discovered = (inspection?.targets ?? []).find(\n (target) => target.name === name,\n );\n if (discovered) return discovered.kind;\n return name.includes(\"*\") ? \"pattern\" : \"\";\n}\n\n/**\n * withTarget applies a picked target over a host's options, clearing both keys\n * when the picker is emptied so a stale index cannot survive the selection.\n */\nexport function withTarget(\n options: Record<string, unknown>,\n target: { option: string; value: string; targetKind: string } | undefined,\n): Record<string, unknown> {\n if (!target) return options;\n const next = { ...options };\n if (target.value) {\n next[target.option] = target.value;\n if (target.targetKind) next.targetKind = target.targetKind;\n else delete next.targetKind;\n } else {\n delete next[target.option];\n delete next.targetKind;\n }\n return next;\n}\n\n/**\n * queryBrowserOptionsSchema is what the inline options form edits — the leftover\n * options, once the navigator has claimed the ones that belong with the query.\n * The target has its own combobox, and where the source has a structured search\n * the builder owns both the search and the limit it returns, so none of the\n * three is rendered a second time as a generic field.\n */\nexport function queryBrowserOptionsSchema(\n descriptor: BrowserDescriptor,\n /** The option keys the host renders elsewhere, such as the profile editor's Source card. */\n { omitKeys = [] }: { omitKeys?: string[] } = {},\n): JsonSchemaObject | undefined {\n if (!descriptor.optionsSchema) return undefined;\n const properties = Object.fromEntries(\n Object.entries(descriptor.optionsSchema.properties ?? {}).filter(\n ([key]) => !omitKeys.includes(key),\n ),\n );\n if (properties.search) {\n delete properties.search;\n delete properties.limit;\n }\n if (descriptor.target?.kind === \"index\") {\n delete properties[descriptor.target.option];\n }\n if (descriptor.target?.kind === \"kubernetes-workload\") {\n delete properties.kind;\n delete properties.namespace;\n delete properties.name;\n }\n return { ...descriptor.optionsSchema, properties };\n}\n\nexport function completionForInspection(\n inspection?: BrowserInspection,\n selectedInspection?: BrowserInspection,\n): QueryBrowserCompletion | undefined {\n if (inspection?.kind === \"sql\" && inspection.dialect) {\n return {\n kind: \"sql\",\n dialect: inspection.dialect,\n ...(inspection.defaultSchema\n ? { defaultSchema: inspection.defaultSchema }\n : {}),\n schemas: (inspection.schemas ?? []).map((schema) => ({\n name: schema.name,\n relations: schema.relations.map((relation) => ({\n name: relation.name,\n ...(relation.type ? { type: relation.type } : {}),\n columns: relation.columns.map((column) => ({\n name: column.name,\n types: column.dataType ? [column.dataType] : [],\n })),\n })),\n })),\n };\n }\n if (\n selectedInspection?.kind === \"opensearch\" &&\n selectedInspection.selected\n ) {\n return {\n kind: \"json-fields\",\n vocabulary: \"opensearch\",\n fields: selectedInspection.selected.fields,\n };\n }\n return undefined;\n}\n\n/**\n * mergeProviderOptions layers the option sources a browser draws on, in\n * increasing precedence, and pins the active database when there is one.\n * `targetKind` only tells the inspection endpoint which field mappings to\n * fetch, so it is dropped unless the caller is feeding the browser itself.\n */\nexport function mergeProviderOptions(input: {\n layers: Array<Record<string, unknown> | undefined>;\n database?: string;\n keepTargetKind?: boolean;\n}): Record<string, unknown> {\n const merged: Record<string, unknown> = {};\n for (const layer of input.layers) Object.assign(merged, layer ?? {});\n if (input.database) merged.database = input.database;\n if (!input.keepTargetKind) delete merged.targetKind;\n return merged;\n}\n"],"mappings":";;;;;;;;;AAkKA,SAAgB,k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AG,WAAW;EAAe;CAAW;AACnD;AAEA,SAAgB,wBACd,YACA,oBACoC;CACpC,IAAI,YAAY,SAAS,SAAS,WAAW,SAC3C,OAAO;EACL,MAAM;EACN,SAAS,WAAW;EACpB,GAAI,WAAW,gBACX,EAAE,eAAe,WAAW,cAAc,IAC1C,CAAC;EACL,UAAU,WAAW,WAAW,CAAC,EAAA,CAAG,KAAK,YAAY;GACnD,MAAM,OAAO;GACb,WAAW,OAAO,UAAU,KAAK,cAAc;IAC7C,MAAM,SAAS;IACf,GAAI,SAAS,OAAO,EAAE,MAAM,SAAS,KAAK,IAAI,CAAC;IAC/C,SAAS,SAAS,QAAQ,KAAK,YAAY;KACzC,MAAM,OAAO;KACb,OAAO,OAAO,WAAW,CAAC,OAAO,QAAQ,IAAI,CAAC;IAChD,EAAE;GACJ,EAAE;EACJ,EAAE;CACJ;CAEF,IACE,oBAAoB,SAAS,gBAC7B,mBAAmB,UAEnB,OAAO;EACL,MAAM;EACN,YAAY;EACZ,QAAQ,mBAAmB,SAAS;CACtC;AAGJ;;;;;;;AAQA,SAAgB,qBAAqB,OAIT;CAC1B,MAAM,SAAkC,CAAC;CACzC,KAAK,MAAM,SAAS,MAAM,QAAQ,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC;CACnE,IAAI,MAAM,UAAU,OAAO,WAAW,MAAM;CAC5C,IAAI,CAAC,MAAM,gBAAgB,OAAO,OAAO;CACzC,OAAO;AACT"}
@@ -161,7 +161,11 @@ export declare function withTarget(options: Record<string, unknown>, target: {
161
161
  * the builder owns both the search and the limit it returns, so none of the
162
162
  * three is rendered a second time as a generic field.
163
163
  */
164
- export declare function queryBrowserOptionsSchema(descriptor: BrowserDescriptor): JsonSchemaObject | undefined;
164
+ export declare function queryBrowserOptionsSchema(descriptor: BrowserDescriptor,
165
+ /** The option keys the host renders elsewhere, such as the profile editor's Source card. */
166
+ { omitKeys }?: {
167
+ omitKeys?: string[];
168
+ }): JsonSchemaObject | undefined;
165
169
  export declare function completionForInspection(inspection?: BrowserInspection, selectedInspection?: BrowserInspection): QueryBrowserCompletion | undefined;
166
170
  /**
167
171
  * mergeProviderOptions layers the option sources a browser draws on, in
@@ -1 +1 @@
1
- {"version":3,"file":"connectionBrowserModel.d.ts","sourceRoot":"","sources":["../../../src/profiles/connections/connectionBrowserModel.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kDAAkD,CAAC;AAI/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,CAAC;IAC7C,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC;AAEF,8DAA8D;AAC9D,MAAM,MAAM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G,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,CAAC,CAAC,CAwBZ;AAeD,wBAAgB,sBAAsB,CACpC,UAAU,CAAC,EAAE,iBAAiB,GAC7B,cAAc,EAAE,CAkBlB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,iBAAiB,GAAG,SAAS,EACzC,IAAI,EAAE,MAAM,GACX,MAAM,CAMR;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GACxE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYzB;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,iBAAiB;AAC7B,4FAA4F;AAC5F,EAAE,QAAa,EAAE,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GAC9C,gBAAgB,GAAG,SAAS,CAoB9B;AAED,wBAAgB,uBAAuB,CACrC,UAAU,CAAC,EAAE,iBAAiB,EAC9B,kBAAkB,CAAC,EAAE,iBAAiB,GACrC,sBAAsB,GAAG,SAAS,CAgCpC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM1B"}
@@ -104,9 +104,9 @@ function withTarget(options, target) {
104
104
  * the builder owns both the search and the limit it returns, so none of the
105
105
  * three is rendered a second time as a generic field.
106
106
  */
107
- function queryBrowserOptionsSchema(descriptor) {
107
+ function queryBrowserOptionsSchema(descriptor, { omitKeys = [] } = {}) {
108
108
  if (!descriptor.optionsSchema) return void 0;
109
- const properties = { ...descriptor.optionsSchema.properties };
109
+ const properties = Object.fromEntries(Object.entries(descriptor.optionsSchema.properties ?? {}).filter(([key]) => !omitKeys.includes(key)));
110
110
  if (properties.search) {
111
111
  delete properties.search;
112
112
  delete properties.limit;
@@ -1 +1 @@
1
- {"version":3,"file":"connectionBrowserModel.js","names":[],"sources":["../../../src/profiles/connections/connectionBrowserModel.ts"],"sourcesContent":["/**\n * The data layer behind every query browser: the descriptor and inspection\n * shapes the server serves, and the hook that turns a selection (database,\n * index) into the catalog and completion a browser renders. All three hosts —\n * the connection browser, the profile wizard and the profile builder — drive\n * the same plumbing from here so the surfaces cannot drift apart.\n */\n\nimport type { ComboboxOption } from \"../../components/Combobox\";\nimport type { WorkloadKind } from \"../../components/workload-picker-utils\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { normalizeErrorDiagnostics } from \"../../data/diagnostics/error-diagnostics\";\nimport type { QueryBrowserCompletion } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { QueryBrowserDiagnostics } from \"../../data/query-browser/QueryBrowser.types\";\nimport { profileApiPath } from \"../profileApi\";\nimport { QueryBrowserExecutionError } from \"../../data/query-browser/QueryBrowser.types\";\nimport type { ReactNode } from \"react\";\n\nexport type BrowserDescriptor = {\n kind: \"query\" | \"cache\";\n provider?: string;\n language?: \"sql\" | \"json\" | \"text\";\n queryLabel?: string;\n defaultQuery?: string;\n resultView?: \"table\" | \"logs\" | \"timeseries\";\n optionsSchema?: JsonSchemaObject;\n initialOptions?: Record<string, unknown>;\n catalog?: boolean;\n /** Allows providers whose request is entirely structural to run without editor text. */\n allowEmptyQuery?: boolean;\n /** The typed resource a query runs against instead of a catalog tree. */\n target?: BrowserTarget;\n /**\n * The row caps that apply when a profile declares none of its own: the page a\n * caller gets by default, the largest page it may ask for, and where an\n * all-row export stops. The query's own `limit` option is none of them.\n */\n rowLimits?: BrowserRowLimits;\n /**\n * The order the provider already returned these rows in.\n *\n * A browser query is a bounded top-N rather than a whole result, so the cut\n * and the order are the same decision: re-sorting the rows the server chose\n * shows them as though the cut had been made the other way round. Kubernetes\n * is the case that proves it — its API only resumes forward, so a limit\n * returns the oldest lines, and newest-first would read as \"the latest logs\".\n */\n resultSort?: BrowserResultSort;\n};\n\n/** A column a result is already ordered by, and which way. */\nexport type BrowserResultSort = { key: string; dir: \"asc\" | \"desc\" };\n\nexport type BrowserTarget =\n | { kind: \"index\"; label: string; option: string }\n | {\n kind: \"kubernetes-workload\";\n label: string;\n kinds: WorkloadKind[];\n };\n\n/** The defaults the server serves, shown as what an unset cap inherits. */\nexport type BrowserRowLimits = {\n pageSize: number;\n maxPageSize: number;\n maxExportRows: number;\n};\n\n/** The caps a profile sets for itself; each unset one takes its default. */\nexport type ProfileRowLimits = {\n pageSize?: number;\n maxPageSize?: number;\n maxExportRows?: number;\n};\n\nexport type TargetKind =\n | \"group\"\n | \"index\"\n | \"alias\"\n | \"data_stream\"\n | \"pattern\";\n\nexport type InspectionTarget = {\n name: string;\n kind: TargetKind;\n /** The rotation wildcard this concrete index rolls up into. */\n pattern?: string;\n /** How many rotations a `pattern` target covers. */\n count?: number;\n members?: string[];\n};\n\nexport type InspectionCache = {\n policy: string;\n state: \"fresh\" | \"stale\";\n cached: boolean;\n refreshing?: boolean;\n loadedAt: string;\n freshUntil: string;\n lastChangedAt: string;\n lastRefreshAttempt?: string;\n lastRefreshError?: string;\n ageMs: number;\n retryAfterMs?: number;\n unchangedRefreshes?: number;\n};\n\nexport type CatalogNode = {\n id: string;\n label: string;\n kind: string;\n query?: string;\n options?: Record<string, unknown>;\n children?: CatalogNode[];\n};\n\nexport type InspectionField = {\n name: string;\n dataType?: string;\n types?: string[];\n searchable?: boolean;\n aggregatable?: boolean;\n conflicting?: boolean;\n};\n\nexport type BrowserInspection = {\n kind: \"sql\" | \"opensearch\";\n dialect?: \"postgresql\" | \"mysql\" | \"mssql\" | \"standard\";\n database?: string;\n databases?: string[];\n defaultSchema?: string;\n schemas?: {\n name: string;\n relations: {\n name: string;\n type?: \"table\" | \"view\";\n columns: InspectionField[];\n }[];\n }[];\n targets?: InspectionTarget[];\n nodes?: CatalogNode[];\n selected?: {\n target: InspectionTarget;\n fields: InspectionField[];\n };\n truncated?: boolean;\n truncateReason?: string;\n cache?: InspectionCache;\n};\n\nexport type ConnectionProfileActionRenderer = (context: {\n connectionName: string;\n providerType: string;\n providerOptions?: Record<string, unknown>;\n profileQuery?: string;\n}) => ReactNode;\n\n/**\n * savedConnectionID reads the id out of a `connection://<id>` reference. An\n * inline URL has no id, and so no catalog to browse — hence null rather than a\n * guess.\n */\nexport function savedConnectionID(value: string | undefined): string | null {\n const prefix = \"connection://\";\n if (!value?.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function browserBaseUrl(connectionID: string): string {\n return profileApiPath(\n `connection/${encodeURIComponent(connectionID)}/browser`,\n );\n}\n\nexport async function fetchJSON<T>(\n url: string,\n init?: RequestInit,\n): Promise<T> {\n const response = await fetch(url, init);\n if (!response.ok) {\n const body = await response.text();\n const fallback = body.trim() || `request failed: ${response.status}`;\n try {\n const parsed = JSON.parse(body) as {\n error?: unknown;\n diagnostics?: QueryBrowserDiagnostics;\n };\n if (typeof parsed.error === \"string\") {\n const errorDetails = normalizeErrorDiagnostics(parsed, parsed.error);\n throw new QueryBrowserExecutionError(\n errorDetails?.message ?? parsed.error,\n parsed.diagnostics,\n errorDetails ?? undefined,\n );\n }\n } catch (error) {\n if (error instanceof QueryBrowserExecutionError) throw error;\n }\n throw new Error(fallback);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * Rotations lead: a cluster with fifty-three daily jaeger indexes has one\n * target an author actually means, and it is `jaeger-span-*`. The concrete\n * indexes stay listed last so a single day is still reachable.\n */\nconst targetGroups: { kind: TargetKind; label: string }[] = [\n { kind: \"group\", label: \"Index groups\" },\n { kind: \"pattern\", label: \"Index patterns\" },\n { kind: \"alias\", label: \"Aliases\" },\n { kind: \"data_stream\", label: \"Data streams\" },\n { kind: \"index\", label: \"Indexes\" },\n];\n\nexport function openSearchIndexOptions(\n inspection?: BrowserInspection,\n): ComboboxOption[] {\n if (inspection?.kind !== \"opensearch\") return [];\n const targets = inspection.targets ?? [];\n return targetGroups.flatMap(({ kind, label }) =>\n targets\n .filter((target) => target.kind === kind)\n .map((target) => ({\n value: target.name,\n label: target.count\n ? `${target.pattern ?? target.name} · ${target.count} indexes`\n : target.name,\n selectedLabel: target.pattern ?? target.name,\n group: label,\n title: target.count\n ? `${target.name} · ${target.count} rotated indexes`\n : `${target.name} · ${target.kind.replace(\"_\", \" \")}`,\n })),\n );\n}\n\n/**\n * openSearchTargetKind resolves how to inspect a picked target. An undiscovered\n * name containing a wildcard is a pattern by construction — the server inspects\n * it without requiring it to have been enumerated.\n */\nexport function openSearchTargetKind(\n inspection: BrowserInspection | undefined,\n name: string,\n): string {\n const discovered = (inspection?.targets ?? []).find(\n (target) => target.name === name,\n );\n if (discovered) return discovered.kind;\n return name.includes(\"*\") ? \"pattern\" : \"\";\n}\n\n/**\n * withTarget applies a picked target over a host's options, clearing both keys\n * when the picker is emptied so a stale index cannot survive the selection.\n */\nexport function withTarget(\n options: Record<string, unknown>,\n target: { option: string; value: string; targetKind: string } | undefined,\n): Record<string, unknown> {\n if (!target) return options;\n const next = { ...options };\n if (target.value) {\n next[target.option] = target.value;\n if (target.targetKind) next.targetKind = target.targetKind;\n else delete next.targetKind;\n } else {\n delete next[target.option];\n delete next.targetKind;\n }\n return next;\n}\n\n/**\n * queryBrowserOptionsSchema is what the inline options form edits — the leftover\n * options, once the navigator has claimed the ones that belong with the query.\n * The target has its own combobox, and where the source has a structured search\n * the builder owns both the search and the limit it returns, so none of the\n * three is rendered a second time as a generic field.\n */\nexport function queryBrowserOptionsSchema(\n descriptor: BrowserDescriptor,\n): JsonSchemaObject | undefined {\n if (!descriptor.optionsSchema) return undefined;\n const properties = { ...descriptor.optionsSchema.properties };\n if (properties.search) {\n delete properties.search;\n delete properties.limit;\n }\n if (descriptor.target?.kind === \"index\") {\n delete properties[descriptor.target.option];\n }\n if (descriptor.target?.kind === \"kubernetes-workload\") {\n delete properties.kind;\n delete properties.namespace;\n delete properties.name;\n }\n return { ...descriptor.optionsSchema, properties };\n}\n\nexport function completionForInspection(\n inspection?: BrowserInspection,\n selectedInspection?: BrowserInspection,\n): QueryBrowserCompletion | undefined {\n if (inspection?.kind === \"sql\" && inspection.dialect) {\n return {\n kind: \"sql\",\n dialect: inspection.dialect,\n ...(inspection.defaultSchema\n ? { defaultSchema: inspection.defaultSchema }\n : {}),\n schemas: (inspection.schemas ?? []).map((schema) => ({\n name: schema.name,\n relations: schema.relations.map((relation) => ({\n name: relation.name,\n ...(relation.type ? { type: relation.type } : {}),\n columns: relation.columns.map((column) => ({\n name: column.name,\n types: column.dataType ? [column.dataType] : [],\n })),\n })),\n })),\n };\n }\n if (\n selectedInspection?.kind === \"opensearch\" &&\n selectedInspection.selected\n ) {\n return {\n kind: \"json-fields\",\n vocabulary: \"opensearch\",\n fields: selectedInspection.selected.fields,\n };\n }\n return undefined;\n}\n\n/**\n * mergeProviderOptions layers the option sources a browser draws on, in\n * increasing precedence, and pins the active database when there is one.\n * `targetKind` only tells the inspection endpoint which field mappings to\n * fetch, so it is dropped unless the caller is feeding the browser itself.\n */\nexport function mergeProviderOptions(input: {\n layers: Array<Record<string, unknown> | undefined>;\n database?: string;\n keepTargetKind?: boolean;\n}): Record<string, unknown> {\n const merged: Record<string, unknown> = {};\n for (const layer of input.layers) Object.assign(merged, layer ?? {});\n if (input.database) merged.database = input.database;\n if (!input.keepTargetKind) delete merged.targetKind;\n return merged;\n}\n"],"mappings":";;;;;;;;;AAkKA,SAAgB,kBAAkB,OAA0C;CAE1E,IAAI,CAAC,OAAO,WAAW,eAAM,GAAG,OAAO;CACvC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,CAAG,KAAK,YAAY;GACnD,MAAM,OAAO;GACb,WAAW,OAAO,UAAU,KAAK,cAAc;IAC7C,MAAM,SAAS;IACf,GAAI,SAAS,OAAO,EAAE,MAAM,SAAS,KAAK,IAAI,CAAC;IAC/C,SAAS,SAAS,QAAQ,KAAK,YAAY;KACzC,MAAM,OAAO;KACb,OAAO,OAAO,WAAW,CAAC,OAAO,QAAQ,IAAI,CAAC;IAChD,EAAE;GACJ,EAAE;EACJ,EAAE;CACJ;CAEF,IACE,oBAAoB,SAAS,gBAC7B,mBAAmB,UAEnB,OAAO;EACL,MAAM;EACN,YAAY;EACZ,QAAQ,mBAAmB,SAAS;CACtC;AAGJ;;;;;;;AAQA,SAAgB,qBAAqB,OAIT;CAC1B,MAAM,SAAkC,CAAC;CACzC,KAAK,MAAM,SAAS,MAAM,QAAQ,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC;CACnE,IAAI,MAAM,UAAU,OAAO,WAAW,MAAM;CAC5C,IAAI,CAAC,MAAM,gBAAgB,OAAO,OAAO;CACzC,OAAO;AACT"}
1
+ {"version":3,"file":"connectionBrowserModel.js","names":[],"sources":["../../../src/profiles/connections/connectionBrowserModel.ts"],"sourcesContent":["/**\n * The data layer behind every query browser: the descriptor and inspection\n * shapes the server serves, and the hook that turns a selection (database,\n * index) into the catalog and completion a browser renders. All three hosts —\n * the connection browser, the profile wizard and the profile builder — drive\n * the same plumbing from here so the surfaces cannot drift apart.\n */\n\nimport type { ComboboxOption } from \"../../components/Combobox\";\nimport type { WorkloadKind } from \"../../components/workload-picker-utils\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { normalizeErrorDiagnostics } from \"../../data/diagnostics/error-diagnostics\";\nimport type { QueryBrowserCompletion } from \"../../data/query-browser/QueryBrowser.completion\";\nimport type { QueryBrowserDiagnostics } from \"../../data/query-browser/QueryBrowser.types\";\nimport { profileApiPath } from \"../profileApi\";\nimport { QueryBrowserExecutionError } from \"../../data/query-browser/QueryBrowser.types\";\nimport type { ReactNode } from \"react\";\n\nexport type BrowserDescriptor = {\n kind: \"query\" | \"cache\";\n provider?: string;\n language?: \"sql\" | \"json\" | \"text\";\n queryLabel?: string;\n defaultQuery?: string;\n resultView?: \"table\" | \"logs\" | \"timeseries\";\n optionsSchema?: JsonSchemaObject;\n initialOptions?: Record<string, unknown>;\n catalog?: boolean;\n /** Allows providers whose request is entirely structural to run without editor text. */\n allowEmptyQuery?: boolean;\n /** The typed resource a query runs against instead of a catalog tree. */\n target?: BrowserTarget;\n /**\n * The row caps that apply when a profile declares none of its own: the page a\n * caller gets by default, the largest page it may ask for, and where an\n * all-row export stops. The query's own `limit` option is none of them.\n */\n rowLimits?: BrowserRowLimits;\n /**\n * The order the provider already returned these rows in.\n *\n * A browser query is a bounded top-N rather than a whole result, so the cut\n * and the order are the same decision: re-sorting the rows the server chose\n * shows them as though the cut had been made the other way round. Kubernetes\n * is the case that proves it — its API only resumes forward, so a limit\n * returns the oldest lines, and newest-first would read as \"the latest logs\".\n */\n resultSort?: BrowserResultSort;\n};\n\n/** A column a result is already ordered by, and which way. */\nexport type BrowserResultSort = { key: string; dir: \"asc\" | \"desc\" };\n\nexport type BrowserTarget =\n | { kind: \"index\"; label: string; option: string }\n | {\n kind: \"kubernetes-workload\";\n label: string;\n kinds: WorkloadKind[];\n };\n\n/** The defaults the server serves, shown as what an unset cap inherits. */\nexport type BrowserRowLimits = {\n pageSize: number;\n maxPageSize: number;\n maxExportRows: number;\n};\n\n/** The caps a profile sets for itself; each unset one takes its default. */\nexport type ProfileRowLimits = {\n pageSize?: number;\n maxPageSize?: number;\n maxExportRows?: number;\n};\n\nexport type TargetKind =\n | \"group\"\n | \"index\"\n | \"alias\"\n | \"data_stream\"\n | \"pattern\";\n\nexport type InspectionTarget = {\n name: string;\n kind: TargetKind;\n /** The rotation wildcard this concrete index rolls up into. */\n pattern?: string;\n /** How many rotations a `pattern` target covers. */\n count?: number;\n members?: string[];\n};\n\nexport type InspectionCache = {\n policy: string;\n state: \"fresh\" | \"stale\";\n cached: boolean;\n refreshing?: boolean;\n loadedAt: string;\n freshUntil: string;\n lastChangedAt: string;\n lastRefreshAttempt?: string;\n lastRefreshError?: string;\n ageMs: number;\n retryAfterMs?: number;\n unchangedRefreshes?: number;\n};\n\nexport type CatalogNode = {\n id: string;\n label: string;\n kind: string;\n query?: string;\n options?: Record<string, unknown>;\n children?: CatalogNode[];\n};\n\nexport type InspectionField = {\n name: string;\n dataType?: string;\n types?: string[];\n searchable?: boolean;\n aggregatable?: boolean;\n conflicting?: boolean;\n};\n\nexport type BrowserInspection = {\n kind: \"sql\" | \"opensearch\";\n dialect?: \"postgresql\" | \"mysql\" | \"mssql\" | \"standard\";\n database?: string;\n databases?: string[];\n defaultSchema?: string;\n schemas?: {\n name: string;\n relations: {\n name: string;\n type?: \"table\" | \"view\";\n columns: InspectionField[];\n }[];\n }[];\n targets?: InspectionTarget[];\n nodes?: CatalogNode[];\n selected?: {\n target: InspectionTarget;\n fields: InspectionField[];\n };\n truncated?: boolean;\n truncateReason?: string;\n cache?: InspectionCache;\n};\n\nexport type ConnectionProfileActionRenderer = (context: {\n connectionName: string;\n providerType: string;\n providerOptions?: Record<string, unknown>;\n profileQuery?: string;\n}) => ReactNode;\n\n/**\n * savedConnectionID reads the id out of a `connection://<id>` reference. An\n * inline URL has no id, and so no catalog to browse — hence null rather than a\n * guess.\n */\nexport function savedConnectionID(value: string | undefined): string | null {\n const prefix = \"connection://\";\n if (!value?.startsWith(prefix)) return null;\n return value.slice(prefix.length).trim() || null;\n}\n\nexport function browserBaseUrl(connectionID: string): string {\n return profileApiPath(\n `connection/${encodeURIComponent(connectionID)}/browser`,\n );\n}\n\nexport async function fetchJSON<T>(\n url: string,\n init?: RequestInit,\n): Promise<T> {\n const response = await fetch(url, init);\n if (!response.ok) {\n const body = await response.text();\n const fallback = body.trim() || `request failed: ${response.status}`;\n try {\n const parsed = JSON.parse(body) as {\n error?: unknown;\n diagnostics?: QueryBrowserDiagnostics;\n };\n if (typeof parsed.error === \"string\") {\n const errorDetails = normalizeErrorDiagnostics(parsed, parsed.error);\n throw new QueryBrowserExecutionError(\n errorDetails?.message ?? parsed.error,\n parsed.diagnostics,\n errorDetails ?? undefined,\n );\n }\n } catch (error) {\n if (error instanceof QueryBrowserExecutionError) throw error;\n }\n throw new Error(fallback);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * Rotations lead: a cluster with fifty-three daily jaeger indexes has one\n * target an author actually means, and it is `jaeger-span-*`. The concrete\n * indexes stay listed last so a single day is still reachable.\n */\nconst targetGroups: { kind: TargetKind; label: string }[] = [\n { kind: \"group\", label: \"Index groups\" },\n { kind: \"pattern\", label: \"Index patterns\" },\n { kind: \"alias\", label: \"Aliases\" },\n { kind: \"data_stream\", label: \"Data streams\" },\n { kind: \"index\", label: \"Indexes\" },\n];\n\nexport function openSearchIndexOptions(\n inspection?: BrowserInspection,\n): ComboboxOption[] {\n if (inspection?.kind !== \"opensearch\") return [];\n const targets = inspection.targets ?? [];\n return targetGroups.flatMap(({ kind, label }) =>\n targets\n .filter((target) => target.kind === kind)\n .map((target) => ({\n value: target.name,\n label: target.count\n ? `${target.pattern ?? target.name} · ${target.count} indexes`\n : target.name,\n selectedLabel: target.pattern ?? target.name,\n group: label,\n title: target.count\n ? `${target.name} · ${target.count} rotated indexes`\n : `${target.name} · ${target.kind.replace(\"_\", \" \")}`,\n })),\n );\n}\n\n/**\n * openSearchTargetKind resolves how to inspect a picked target. An undiscovered\n * name containing a wildcard is a pattern by construction — the server inspects\n * it without requiring it to have been enumerated.\n */\nexport function openSearchTargetKind(\n inspection: BrowserInspection | undefined,\n name: string,\n): string {\n const discovered = (inspection?.targets ?? []).find(\n (target) => target.name === name,\n );\n if (discovered) return discovered.kind;\n return name.includes(\"*\") ? \"pattern\" : \"\";\n}\n\n/**\n * withTarget applies a picked target over a host's options, clearing both keys\n * when the picker is emptied so a stale index cannot survive the selection.\n */\nexport function withTarget(\n options: Record<string, unknown>,\n target: { option: string; value: string; targetKind: string } | undefined,\n): Record<string, unknown> {\n if (!target) return options;\n const next = { ...options };\n if (target.value) {\n next[target.option] = target.value;\n if (target.targetKind) next.targetKind = target.targetKind;\n else delete next.targetKind;\n } else {\n delete next[target.option];\n delete next.targetKind;\n }\n return next;\n}\n\n/**\n * queryBrowserOptionsSchema is what the inline options form edits — the leftover\n * options, once the navigator has claimed the ones that belong with the query.\n * The target has its own combobox, and where the source has a structured search\n * the builder owns both the search and the limit it returns, so none of the\n * three is rendered a second time as a generic field.\n */\nexport function queryBrowserOptionsSchema(\n descriptor: BrowserDescriptor,\n /** The option keys the host renders elsewhere, such as the profile editor's Source card. */\n { omitKeys = [] }: { omitKeys?: string[] } = {},\n): JsonSchemaObject | undefined {\n if (!descriptor.optionsSchema) return undefined;\n const properties = Object.fromEntries(\n Object.entries(descriptor.optionsSchema.properties ?? {}).filter(\n ([key]) => !omitKeys.includes(key),\n ),\n );\n if (properties.search) {\n delete properties.search;\n delete properties.limit;\n }\n if (descriptor.target?.kind === \"index\") {\n delete properties[descriptor.target.option];\n }\n if (descriptor.target?.kind === \"kubernetes-workload\") {\n delete properties.kind;\n delete properties.namespace;\n delete properties.name;\n }\n return { ...descriptor.optionsSchema, properties };\n}\n\nexport function completionForInspection(\n inspection?: BrowserInspection,\n selectedInspection?: BrowserInspection,\n): QueryBrowserCompletion | undefined {\n if (inspection?.kind === \"sql\" && inspection.dialect) {\n return {\n kind: \"sql\",\n dialect: inspection.dialect,\n ...(inspection.defaultSchema\n ? { defaultSchema: inspection.defaultSchema }\n : {}),\n schemas: (inspection.schemas ?? []).map((schema) => ({\n name: schema.name,\n relations: schema.relations.map((relation) => ({\n name: relation.name,\n ...(relation.type ? { type: relation.type } : {}),\n columns: relation.columns.map((column) => ({\n name: column.name,\n types: column.dataType ? [column.dataType] : [],\n })),\n })),\n })),\n };\n }\n if (\n selectedInspection?.kind === \"opensearch\" &&\n selectedInspection.selected\n ) {\n return {\n kind: \"json-fields\",\n vocabulary: \"opensearch\",\n fields: selectedInspection.selected.fields,\n };\n }\n return undefined;\n}\n\n/**\n * mergeProviderOptions layers the option sources a browser draws on, in\n * increasing precedence, and pins the active database when there is one.\n * `targetKind` only tells the inspection endpoint which field mappings to\n * fetch, so it is dropped unless the caller is feeding the browser itself.\n */\nexport function mergeProviderOptions(input: {\n layers: Array<Record<string, unknown> | undefined>;\n database?: string;\n keepTargetKind?: boolean;\n}): Record<string, unknown> {\n const merged: Record<string, unknown> = {};\n for (const layer of input.layers) Object.assign(merged, layer ?? {});\n if (input.database) merged.database = input.database;\n if (!input.keepTargetKind) delete merged.targetKind;\n return merged;\n}\n"],"mappings":";;;;;;;;;AAkKA,SAAgB,kBAAkB,OAA0C;CAE1E,IAAI,CAAC,OAAO,WAAW,eAAM,GAAG,OAAO;CACvC,OAAO,MAAM,MAAM,EAAa,CAAC,CAAC,KAAK,KAAK;AAC9C;AAEA,SAAgB,eAAe,cAA8B;CAC3D,OAAO,eACL,cAAc,mBAAmB,YAAY,EAAE,SACjD;AACF;AAEA,eAAsB,UACpB,KACA,MACY;CACZ,MAAM,WAAW,MAAM,MAAM,KAAK,IAAI;CACtC,IAAI,CAAC,SAAS,IAAI;EAChB,MAAM,OAAO,MAAM,SAAS,KAAK;EACjC,MAAM,WAAW,KAAK,KAAK,KAAK,mBAAmB,SAAS;EAC5D,IAAI;GACF,MAAM,SAAS,KAAK,MAAM,IAAI;GAI9B,IAAI,OAAO,OAAO,UAAU,UAAU;IACpC,MAAM,eAAe,0BAA0B,QAAQ,OAAO,KAAK;IACnE,MAAM,IAAI,2BACR,cAAc,WAAW,OAAO,OAChC,OAAO,aACP,gBAAgB,KAAA,CAClB;GACF;EACF,SAAS,OAAO;GACd,IAAI,iBAAiB,4BAA4B,MAAM;EACzD;EACA,MAAM,IAAI,MAAM,QAAQ;CAC1B;CACA,OAAO,SAAS,KAAK;AACvB;;;;;;AAOA,IAAM,eAAsD;CAC1D;EAAE,MAAM;EAAS,OAAO;CAAe;CACvC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AAI,CAAC,MAAM,gBAAgB,OAAO,OAAO;CACzC,OAAO;AACT"}
@@ -18,7 +18,7 @@ const require_inspectionStatus = require("./inspectionStatus.cjs");
18
18
  let react = require("react");
19
19
  let react_jsx_runtime = require("react/jsx-runtime");
20
20
  // src/profiles/connections/connectionQueryWorkspace.tsx
21
- function ConnectionQueryWorkspace({ id, title, descriptor, inspection, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl = "", execute, lookupFilterValues, renderResults, className }) {
21
+ function ConnectionQueryWorkspace({ id, title, descriptor, inspection, runSlot, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl = "", execute, lookupFilterValues, renderResults, className }) {
22
22
  const builder = Boolean(onSearchChange) && require_connectionQueryWorkspaceModel.supportsQueryBuilder(descriptor);
23
23
  const tabs = require_connectionQueryWorkspaceModel.navigatorTabs({
24
24
  descriptor,
@@ -79,6 +79,7 @@ function ConnectionQueryWorkspace({ id, title, descriptor, inspection, onDatabas
79
79
  queryLabel: descriptor.queryLabel ?? "Query",
80
80
  initialQuery: specMode ? compilation.query : query,
81
81
  allowEmptyQuery: descriptor.allowEmptyQuery,
82
+ runSlot,
82
83
  optionsSchema,
83
84
  initialOptions: browserOptions,
84
85
  completion: inspection.completion,
@@ -1 +1 @@
1
- {"version":3,"file":"connectionQueryWorkspace.cjs","names":["supportsQueryBuilder","navigatorTabs","useState","initialNavigatorTab","useRef","useCompiledSearch","makeFieldValueLookup","toBuilderMode","toRawMode","QueryBrowser","InspectionStatus","QueryTargetPicker","withTarget","KubernetesWorkloadTargetPicker","QueryRowLimits","Tabs","EsQueryBuilder","esQueryFields","esBuilderVocabulary","CatalogTree","structuredSearchRequest","LogsTable","logsResultSort","PrometheusResults"],"sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"sourcesContent":["/**\n * The single query-browser host. The connection browser, the profile wizard and\n * the profile-edit builder all render this: they own where the query and the\n * options are stored and what a run means, and this owns the browser itself —\n * the catalog navigator, the structured filter builder, the completion, and the\n * descriptor's result view.\n */\n\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { LogsTable } from \"../../data/LogsTable\";\nimport { QueryBrowser } from \"../../data/query-browser/QueryBrowser\";\nimport type {\n QueryBrowserFilterLookup,\n QueryBrowserRequest,\n QueryBrowserResult,\n QueryBrowserResultContext,\n} from \"../../data/query-browser/QueryBrowser.types\";\nimport { Tabs } from \"../../layout/Tabs\";\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { CatalogTree } from \"./catalogTree\";\nimport {\n withTarget,\n type BrowserDescriptor,\n type CatalogNode,\n type ProfileRowLimits,\n} from \"./connectionBrowserModel\";\nimport type { Inspection } from \"./useInspection\";\nimport { makeFieldValueLookup } from \"../elasticsearch/esFieldValues\";\nimport { EsQueryBuilder } from \"../elasticsearch/esQueryBuilder\";\nimport {\n toBuilderMode,\n toRawMode,\n type EsSearch,\n type QueryModeTransition,\n} from \"../elasticsearch/esQueryBuilderModel\";\nimport { esBuilderVocabulary } from \"../elasticsearch/esQueryOperators\";\nimport { PrometheusResults } from \"../query/prometheusResults\";\nimport { QueryRowLimits } from \"../query/queryRowLimits\";\nimport { QueryTargetPicker } from \"../query/queryTargetPicker\";\nimport { KubernetesWorkloadTargetPicker } from \"../query/kubernetesWorkloadTargetPicker\";\nimport type { ParamMappingEdit } from \"../elasticsearch/esParamMappingModel\";\nimport type { ParamDraft } from \"../wizard/profileWizardModel\";\nimport {\n initialNavigatorTab,\n logsResultSort,\n navigatorTabs,\n structuredSearchRequest,\n supportsQueryBuilder,\n} from \"./connectionQueryWorkspaceModel\";\nimport { esQueryFields } from \"../elasticsearch/esQueryBuilderForm\";\nimport { useCompiledSearch } from \"../elasticsearch/esQueryCompile\";\nimport { InspectionStatus } from \"./inspectionStatus\";\n\nexport type ConnectionQueryWorkspaceProps = {\n id: string;\n title: string;\n descriptor: BrowserDescriptor;\n inspection: Inspection;\n onDatabaseChange: (database: string) => void;\n query: string;\n onQueryChange?: (query: string) => void | undefined;\n options: Record<string, unknown>;\n onOptionsChange: (options: Record<string, unknown>) => void;\n onCatalogSelect: (node: CatalogNode) => void;\n optionsSchema?: JsonSchemaObject | undefined;\n /**\n * The structured specification this host stores, when it stores one.\n * `undefined` means the raw query is the artifact.\n */\n search?: EsSearch | undefined;\n /**\n * Every change reports the specification and the raw query together, and one\n * of the two is always empty. The host stores both in one write, so it can\n * never end up holding a specification and a query at once — a state the\n * server rejects.\n */\n onSearchChange?: (transition: QueryModeTransition) => void | undefined;\n /**\n * The row caps the edited profile sets for itself. They are profile settings,\n * not provider options, so they are stored beside the query rather than\n * through `onOptionsChange`. A host that edits no profile — the connection\n * browser — passes neither, and the caps are then not offered at all.\n */\n limits?: ProfileRowLimits | undefined;\n onLimitsChange?: (limits: ProfileRowLimits | undefined) => void;\n /** Declared profile parameters an operand can bind to. */\n params?: ParamDraft[] | undefined;\n onParamMappingChange?: (edit: ParamMappingEdit) => void | undefined;\n /**\n * What those parameters currently resolve to. The server binds a {param:…}\n * operand from them and interpolates a {{.params.…}} one, so without values\n * the preview shows template text — or the compiler's refusal to guess.\n */\n paramValues?: Record<string, unknown> | undefined;\n /** Those parameters' roles, so the compiled preview folds them as a run would. */\n paramRoles?: Record<string, string> | undefined;\n /** Where POST /compile lives. Empty leaves the preview unresolved. */\n compileBaseUrl?: string | undefined;\n execute: (request: QueryBrowserRequest) => Promise<QueryBrowserResult>;\n /**\n * Answers a filter's value type-ahead. Absent leaves every filter the source\n * described showing only the values the result itself carried.\n */\n lookupFilterValues?: QueryBrowserFilterLookup | undefined;\n renderResults?: (context: QueryBrowserResultContext) => ReactNode | undefined;\n className?: string | undefined;\n};\n\nexport function ConnectionQueryWorkspace({\n id,\n title,\n descriptor,\n inspection,\n onDatabaseChange,\n query,\n onQueryChange,\n options,\n onOptionsChange,\n onCatalogSelect,\n optionsSchema,\n search,\n onSearchChange,\n limits,\n onLimitsChange,\n params,\n onParamMappingChange,\n paramValues,\n paramRoles,\n compileBaseUrl = \"\",\n execute,\n lookupFilterValues,\n renderResults,\n className,\n}: ConnectionQueryWorkspaceProps) {\n const builder = Boolean(onSearchChange) && supportsQueryBuilder(descriptor);\n const tabs = navigatorTabs({ descriptor, builder });\n const [tab, setTab] = useState<string | undefined>(() =>\n initialNavigatorTab({\n tabs,\n search,\n query,\n ...(descriptor.defaultQuery\n ? { defaultQuery: descriptor.defaultQuery }\n : {}),\n }),\n );\n // Picking a target has to reach the browser, which only resyncs its options\n // when `initialOptions` changes identity. The pick is layered here rather than\n // round-tripped through the host, so an options-form keystroke — which the\n // host also stores — cannot resync the browser out from under the author.\n const [picked, setPicked] = useState<Record<string, unknown>>();\n // What the browser last reported, so a pick keeps the author's other edits.\n const edited = useRef(options);\n const seed = useRef(options);\n if (seed.current !== options) {\n seed.current = options;\n edited.current = options;\n if (picked) setPicked(undefined);\n }\n const browserOptions = picked ?? options;\n const applyOptions = (next: Record<string, unknown>) => {\n edited.current = next;\n setPicked(next);\n onOptionsChange(next);\n };\n const compilation = useCompiledSearch({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n search: search ?? {},\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n enabled: Boolean(search) && compileBaseUrl !== \"\",\n });\n const values = makeFieldValueLookup({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n });\n\n // While a specification is active the editor mirrors what it compiles to. It\n // is a preview, not an input: the query is not stored alongside the spec, so\n // there is no keystroke for a compile to overwrite.\n const specMode = search !== undefined;\n const active = tabs.some((entry) => entry.id === tab) ? tab : tabs[0]?.id;\n const indexTarget =\n descriptor.target?.kind === \"index\" ? descriptor.target : undefined;\n\n // The form tab is the specification, so being on it means holding one. A tab\n // that stores nothing would leave the builder rendering a query it cannot\n // edit, and this is also what makes filters the default rather than an opt-in.\n useEffect(() => {\n if (active === \"form\" && onSearchChange && search === undefined) {\n onSearchChange(toBuilderMode());\n }\n }, [active, onSearchChange, search]);\n\n // Switching tabs is the mode switch. Each mode stores its own artifact and the\n // server rejects holding both, so leaving the form hands the raw editor the\n // DSL the specification last compiled to and drops the specification.\n const selectTab = (next: string) => {\n if (next === \"json\" && search && onSearchChange) {\n onSearchChange(toRawMode(search, compilation.query, query));\n }\n setTab(next);\n };\n\n return (\n <QueryBrowser\n id={id}\n title={title}\n language={descriptor.language ?? \"text\"}\n queryLabel={descriptor.queryLabel ?? \"Query\"}\n initialQuery={specMode ? compilation.query : query}\n allowEmptyQuery={descriptor.allowEmptyQuery}\n optionsSchema={optionsSchema}\n initialOptions={browserOptions}\n completion={inspection.completion}\n {...(specMode ? {} : onQueryChange ? { onQueryChange } : {})}\n onOptionsChange={(next) => {\n edited.current = next;\n onOptionsChange(next);\n }}\n className={className}\n navigator={\n tabs.length === 0 && !descriptor.target ? undefined : (\n <div className=\"flex min-h-0 flex-col gap-2\">\n {descriptor.catalog ? (\n <InspectionStatus inspection={inspection} />\n ) : null}\n {indexTarget ? (\n <QueryTargetPicker\n label={indexTarget.label}\n inspection={inspection}\n discoverable={descriptor.catalog === true}\n value={String(browserOptions[indexTarget.option] ?? \"\")}\n onChange={(index, targetKind) =>\n applyOptions(\n withTarget(edited.current, {\n option: indexTarget.option,\n value: index,\n targetKind,\n }),\n )\n }\n />\n ) : null}\n {descriptor.target?.kind === \"kubernetes-workload\" ? (\n <KubernetesWorkloadTargetPicker\n baseUrl={compileBaseUrl}\n target={descriptor.target}\n query={query}\n onChange={(next) => onQueryChange?.(next)}\n />\n ) : null}\n {builder ? (\n <QueryRowLimits\n value={String(browserOptions.limit ?? \"\")}\n onChange={(limit) => applyOptions({ ...edited.current, limit })}\n {...(descriptor.rowLimits\n ? { defaults: descriptor.rowLimits }\n : {})}\n {...(limits ? { limits } : {})}\n {...(onLimitsChange ? { onLimitsChange } : {})}\n />\n ) : null}\n {tabs.length > 1 ? (\n <Tabs tabs={tabs} value={active ?? \"\"} onChange={selectTab} />\n ) : null}\n {active === \"form\" && onSearchChange && search ? (\n <EsQueryBuilder\n search={search}\n onChange={(next) => onSearchChange({ search: next, query: \"\" })}\n fields={esQueryFields(inspection.completion)}\n vocabulary={esBuilderVocabulary(descriptor.optionsSchema)}\n {...(params ? { params } : {})}\n {...(onParamMappingChange\n ? { onMappingChange: onParamMappingChange }\n : {})}\n {...(values ? { values } : {})}\n compilation={compilation}\n />\n ) : active === \"json\" ? (\n <p className=\"rounded-md border border-dashed p-3 text-xs text-muted-foreground\">\n The {descriptor.queryLabel ?? \"query\"} editor holds the query.\n Switch back to Form to build it from filters — the raw query is\n dropped then, since only one of the two is stored.\n </p>\n ) : active === \"catalog\" ? (\n <CatalogTree\n nodes={inspection.nodes}\n loading={inspection.loading}\n error={inspection.error}\n databases={inspection.databases}\n database={inspection.activeDatabase}\n onDatabaseChange={onDatabaseChange}\n onSelect={onCatalogSelect}\n />\n ) : null}\n </div>\n )\n }\n execute={(request) =>\n execute(specMode ? structuredSearchRequest(request, search) : request)\n }\n {...(lookupFilterValues\n ? {\n lookupFilterValues: (request) =>\n lookupFilterValues(\n specMode ? structuredSearchRequest(request, search) : request,\n ),\n }\n : {})}\n renderResults={renderResults ?? descriptorResultView(descriptor)}\n />\n );\n}\n\n/**\n * descriptorResultView honours the view the server nominated for this provider.\n * A host that renders its own results (the profile builder's column picker)\n * passes renderResults and takes over entirely.\n */\nfunction descriptorResultView(\n descriptor: BrowserDescriptor,\n): ((context: QueryBrowserResultContext) => ReactNode) | undefined {\n if (descriptor.resultView === \"logs\") {\n return ({ result, defaultView }) =>\n result.rows?.length ? (\n <LogsTable\n logs={result.rows}\n autoFilter={false}\n fullscreenTitle=\"Logs\"\n {...logsResultSort(descriptor)}\n />\n ) : (\n defaultView\n );\n }\n if (descriptor.resultView === \"timeseries\") {\n return ({ result, defaultView }) => (\n <PrometheusResults result={result} fallback={defaultView} />\n );\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4GA,SAAgB,yBAAyB,EACvC,IACA,OACA,YACA,YACA,kBACA,OACA,eACA,SACA,iBACA,iBACA,eACA,QACA,gBACA,QACA,gBACA,QACA,sBACA,aACA,YACA,iBAAiB,IACjB,SACA,oBACA,eACA,aACgC;CAChC,MAAM,UAAU,QAAQ,cAAc,KAAKA,sCAAAA,qBAAqB,UAAU;CAC1E,MAAM,OAAOC,sCAAAA,cAAc;EAAE;EAAY;CAAQ,CAAC;CAClD,MAAM,CAAC,KAAK,WAAA,GAAUC,MAAAA,SAAAA,OACpBC,sCAAAA,oBAAoB;EAClB;EACA;EACA;EACA,GAAI,WAAW,eACX,EAAE,cAAc,WAAW,aAAa,IACxC,CAAC;CACP,CAAC,CACH;CAKA,MAAM,CAAC,QAAQ,cAAA,GAAaD,MAAAA,SAAAA,CAAkC;CAE9D,MAAM,UAAA,GAASE,MAAAA,OAAAA,CAAO,OAAO;CAC7B,MAAM,QAAA,GAAOA,MAAAA,OAAAA,CAAO,OAAO;CAC3B,IAAI,KAAK,YAAY,SAAS;EAC5B,KAAK,UAAU;EACf,OAAO,UAAU;EACjB,IAAI,QAAQ,UAAU,KAAA,CAAS;CACjC;CACA,MAAM,iBAAiB,UAAU;CACjC,MAAM,gBAAgB,SAAkC;EACtD,OAAO,UAAU;EACjB,UAAU,IAAI;EACd,gBAAgB,IAAI;CACtB;CACA,MAAM,cAAcC,uBAAAA,kBAAkB;EACpC,SAAS;EACT,OAAO,OAAO,eAAe,SAAS,EAAE;EACxC,QAAQ,UAAU,CAAC;EACnB,GAAI,cAAc,EAAE,QAAQ,YAAY,IAAI,CAAC;EAC7C,GAAI,aAAa,EAAE,OAAO,WAAW,IAAI,CAAC;EAC1C,SAAS,QAAQ,MAAM,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AE,OAAO,IAAI,CAAC;KACf;IACd,CAAA,IACC,WAAW,SACb,iBAAA,GAAA,kBAAA,KAAA,CAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MAAiF;MAC1E,WAAW,cAAc;MAAQ;KAGrC;IACD,CAAA,IAAA,WAAW,YACb,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,aAAD;KACE,OAAO,WAAW;KAClB,SAAS,WAAW;KACpB,OAAO,WAAW;KAClB,WAAW,WAAW;KACtB,UAAU,WAAW;KACH;KAClB,UAAU;IACX,CAAA,IACC;GACD;;EAGT,UAAU,YACR,QAAQ,WAAWC,sCAAAA,wBAAwB,SAAS,MAAM,IAAI,OAAO;EAEvE,GAAK,qBACD,EACE,qBAAqB,YACnB,mBACE,WAAWA,sCAAAA,wBAAwB,SAAS,MAAM,IAAI,OACxD,EACJ,IACA,CAAC;EACL,eAAe,iBAAiB,qBAAqB,UAAU;CAChE,CAAA;AAEL;;;;;;AAOA,SAAS,qBACP,YACiE;CACjE,IAAI,WAAW,eAAe,QAC5B,QAAQ,EAAE,QAAQ,kBAChB,OAAO,MAAM,SACX,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;EACE,MAAM,OAAO;EACb,YAAY;EACZ,iBAAgB;EAChB,GAAIC,sCAAAA,eAAe,UAAU;CAC9B,CAAA,IAED;CAGN,IAAI,WAAW,eAAe,cAC5B,QAAQ,EAAE,QAAQ,kBAChB,iBAAA,GAAA,kBAAA,IAAA,CAACC,0BAAAA,mBAAD;EAA2B;EAAQ,UAAU;CAAc,CAAA;AAIjE"}
1
+ {"version":3,"file":"connectionQueryWorkspace.cjs","names":["supportsQueryBuilder","navigatorTabs","useState","initialNavigatorTab","useRef","useCompiledSearch","makeFieldValueLookup","toBuilderMode","toRawMode","QueryBrowser","InspectionStatus","QueryTargetPicker","withTarget","KubernetesWorkloadTargetPicker","QueryRowLimits","Tabs","EsQueryBuilder","esQueryFields","esBuilderVocabulary","CatalogTree","structuredSearchRequest","LogsTable","logsResultSort","PrometheusResults"],"sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"sourcesContent":["/**\n * The single query-browser host. The connection browser, the profile wizard and\n * the profile-edit builder all render this: they own where the query and the\n * options are stored and what a run means, and this owns the browser itself —\n * the catalog navigator, the structured filter builder, the completion, and the\n * descriptor's result view.\n */\n\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { LogsTable } from \"../../data/LogsTable\";\nimport { QueryBrowser } from \"../../data/query-browser/QueryBrowser\";\nimport type {\n QueryBrowserFilterLookup,\n QueryBrowserRequest,\n QueryBrowserResult,\n QueryBrowserResultContext,\n} from \"../../data/query-browser/QueryBrowser.types\";\nimport { Tabs } from \"../../layout/Tabs\";\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { CatalogTree } from \"./catalogTree\";\nimport {\n withTarget,\n type BrowserDescriptor,\n type CatalogNode,\n type ProfileRowLimits,\n} from \"./connectionBrowserModel\";\nimport type { Inspection } from \"./useInspection\";\nimport { makeFieldValueLookup } from \"../elasticsearch/esFieldValues\";\nimport { EsQueryBuilder } from \"../elasticsearch/esQueryBuilder\";\nimport {\n toBuilderMode,\n toRawMode,\n type EsSearch,\n type QueryModeTransition,\n} from \"../elasticsearch/esQueryBuilderModel\";\nimport { esBuilderVocabulary } from \"../elasticsearch/esQueryOperators\";\nimport { PrometheusResults } from \"../query/prometheusResults\";\nimport { QueryRowLimits } from \"../query/queryRowLimits\";\nimport { QueryTargetPicker } from \"../query/queryTargetPicker\";\nimport { KubernetesWorkloadTargetPicker } from \"../query/kubernetesWorkloadTargetPicker\";\nimport type { ParamMappingEdit } from \"../elasticsearch/esParamMappingModel\";\nimport type { ParamDraft } from \"../wizard/profileWizardModel\";\nimport {\n initialNavigatorTab,\n logsResultSort,\n navigatorTabs,\n structuredSearchRequest,\n supportsQueryBuilder,\n} from \"./connectionQueryWorkspaceModel\";\nimport { esQueryFields } from \"../elasticsearch/esQueryBuilderForm\";\nimport { useCompiledSearch } from \"../elasticsearch/esQueryCompile\";\nimport { InspectionStatus } from \"./inspectionStatus\";\n\nexport type ConnectionQueryWorkspaceProps = {\n id: string;\n title: string;\n descriptor: BrowserDescriptor;\n inspection: Inspection;\n /** Where Run renders; see QueryBrowserProps.runSlot. Omitted keeps Run in the query header. */\n runSlot?: HTMLElement | null | undefined;\n onDatabaseChange: (database: string) => void;\n query: string;\n onQueryChange?: (query: string) => void | undefined;\n options: Record<string, unknown>;\n onOptionsChange: (options: Record<string, unknown>) => void;\n onCatalogSelect: (node: CatalogNode) => void;\n optionsSchema?: JsonSchemaObject | undefined;\n /**\n * The structured specification this host stores, when it stores one.\n * `undefined` means the raw query is the artifact.\n */\n search?: EsSearch | undefined;\n /**\n * Every change reports the specification and the raw query together, and one\n * of the two is always empty. The host stores both in one write, so it can\n * never end up holding a specification and a query at once — a state the\n * server rejects.\n */\n onSearchChange?: (transition: QueryModeTransition) => void | undefined;\n /**\n * The row caps the edited profile sets for itself. They are profile settings,\n * not provider options, so they are stored beside the query rather than\n * through `onOptionsChange`. A host that edits no profile — the connection\n * browser — passes neither, and the caps are then not offered at all.\n */\n limits?: ProfileRowLimits | undefined;\n onLimitsChange?: (limits: ProfileRowLimits | undefined) => void;\n /** Declared profile parameters an operand can bind to. */\n params?: ParamDraft[] | undefined;\n onParamMappingChange?: (edit: ParamMappingEdit) => void | undefined;\n /**\n * What those parameters currently resolve to. The server binds a {param:…}\n * operand from them and interpolates a {{.params.…}} one, so without values\n * the preview shows template text — or the compiler's refusal to guess.\n */\n paramValues?: Record<string, unknown> | undefined;\n /** Those parameters' roles, so the compiled preview folds them as a run would. */\n paramRoles?: Record<string, string> | undefined;\n /** Where POST /compile lives. Empty leaves the preview unresolved. */\n compileBaseUrl?: string | undefined;\n execute: (request: QueryBrowserRequest) => Promise<QueryBrowserResult>;\n /**\n * Answers a filter's value type-ahead. Absent leaves every filter the source\n * described showing only the values the result itself carried.\n */\n lookupFilterValues?: QueryBrowserFilterLookup | undefined;\n renderResults?: (context: QueryBrowserResultContext) => ReactNode | undefined;\n className?: string | undefined;\n};\n\nexport function ConnectionQueryWorkspace({\n id,\n title,\n descriptor,\n inspection,\n runSlot,\n onDatabaseChange,\n query,\n onQueryChange,\n options,\n onOptionsChange,\n onCatalogSelect,\n optionsSchema,\n search,\n onSearchChange,\n limits,\n onLimitsChange,\n params,\n onParamMappingChange,\n paramValues,\n paramRoles,\n compileBaseUrl = \"\",\n execute,\n lookupFilterValues,\n renderResults,\n className,\n}: ConnectionQueryWorkspaceProps) {\n const builder = Boolean(onSearchChange) && supportsQueryBuilder(descriptor);\n const tabs = navigatorTabs({ descriptor, builder });\n const [tab, setTab] = useState<string | undefined>(() =>\n initialNavigatorTab({\n tabs,\n search,\n query,\n ...(descriptor.defaultQuery\n ? { defaultQuery: descriptor.defaultQuery }\n : {}),\n }),\n );\n // Picking a target has to reach the browser, which only resyncs its options\n // when `initialOptions` changes identity. The pick is layered here rather than\n // round-tripped through the host, so an options-form keystroke — which the\n // host also stores — cannot resync the browser out from under the author.\n const [picked, setPicked] = useState<Record<string, unknown>>();\n // What the browser last reported, so a pick keeps the author's other edits.\n const edited = useRef(options);\n const seed = useRef(options);\n if (seed.current !== options) {\n seed.current = options;\n edited.current = options;\n if (picked) setPicked(undefined);\n }\n const browserOptions = picked ?? options;\n const applyOptions = (next: Record<string, unknown>) => {\n edited.current = next;\n setPicked(next);\n onOptionsChange(next);\n };\n const compilation = useCompiledSearch({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n search: search ?? {},\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n enabled: Boolean(search) && compileBaseUrl !== \"\",\n });\n const values = makeFieldValueLookup({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n });\n\n // While a specification is active the editor mirrors what it compiles to. It\n // is a preview, not an input: the query is not stored alongside the spec, so\n // there is no keystroke for a compile to overwrite.\n const specMode = search !== undefined;\n const active = tabs.some((entry) => entry.id === tab) ? tab : tabs[0]?.id;\n const indexTarget =\n descriptor.target?.kind === \"index\" ? descriptor.target : undefined;\n\n // The form tab is the specification, so being on it means holding one. A tab\n // that stores nothing would leave the builder rendering a query it cannot\n // edit, and this is also what makes filters the default rather than an opt-in.\n useEffect(() => {\n if (active === \"form\" && onSearchChange && search === undefined) {\n onSearchChange(toBuilderMode());\n }\n }, [active, onSearchChange, search]);\n\n // Switching tabs is the mode switch. Each mode stores its own artifact and the\n // server rejects holding both, so leaving the form hands the raw editor the\n // DSL the specification last compiled to and drops the specification.\n const selectTab = (next: string) => {\n if (next === \"json\" && search && onSearchChange) {\n onSearchChange(toRawMode(search, compilation.query, query));\n }\n setTab(next);\n };\n\n return (\n <QueryBrowser\n id={id}\n title={title}\n language={descriptor.language ?? \"text\"}\n queryLabel={descriptor.queryLabel ?? \"Query\"}\n initialQuery={specMode ? compilation.query : query}\n allowEmptyQuery={descriptor.allowEmptyQuery}\n runSlot={runSlot}\n optionsSchema={optionsSchema}\n initialOptions={browserOptions}\n completion={inspection.completion}\n {...(specMode ? {} : onQueryChange ? { onQueryChange } : {})}\n onOptionsChange={(next) => {\n edited.current = next;\n onOptionsChange(next);\n }}\n className={className}\n navigator={\n tabs.length === 0 && !descriptor.target ? undefined : (\n <div className=\"flex min-h-0 flex-col gap-2\">\n {descriptor.catalog ? (\n <InspectionStatus inspection={inspection} />\n ) : null}\n {indexTarget ? (\n <QueryTargetPicker\n label={indexTarget.label}\n inspection={inspection}\n discoverable={descriptor.catalog === true}\n value={String(browserOptions[indexTarget.option] ?? \"\")}\n onChange={(index, targetKind) =>\n applyOptions(\n withTarget(edited.current, {\n option: indexTarget.option,\n value: index,\n targetKind,\n }),\n )\n }\n />\n ) : null}\n {descriptor.target?.kind === \"kubernetes-workload\" ? (\n <KubernetesWorkloadTargetPicker\n baseUrl={compileBaseUrl}\n target={descriptor.target}\n query={query}\n onChange={(next) => onQueryChange?.(next)}\n />\n ) : null}\n {builder ? (\n <QueryRowLimits\n value={String(browserOptions.limit ?? \"\")}\n onChange={(limit) => applyOptions({ ...edited.current, limit })}\n {...(descriptor.rowLimits\n ? { defaults: descriptor.rowLimits }\n : {})}\n {...(limits ? { limits } : {})}\n {...(onLimitsChange ? { onLimitsChange } : {})}\n />\n ) : null}\n {tabs.length > 1 ? (\n <Tabs tabs={tabs} value={active ?? \"\"} onChange={selectTab} />\n ) : null}\n {active === \"form\" && onSearchChange && search ? (\n <EsQueryBuilder\n search={search}\n onChange={(next) => onSearchChange({ search: next, query: \"\" })}\n fields={esQueryFields(inspection.completion)}\n vocabulary={esBuilderVocabulary(descriptor.optionsSchema)}\n {...(params ? { params } : {})}\n {...(onParamMappingChange\n ? { onMappingChange: onParamMappingChange }\n : {})}\n {...(values ? { values } : {})}\n compilation={compilation}\n />\n ) : active === \"json\" ? (\n <p className=\"rounded-md border border-dashed p-3 text-xs text-muted-foreground\">\n The {descriptor.queryLabel ?? \"query\"} editor holds the query.\n Switch back to Form to build it from filters — the raw query is\n dropped then, since only one of the two is stored.\n </p>\n ) : active === \"catalog\" ? (\n <CatalogTree\n nodes={inspection.nodes}\n loading={inspection.loading}\n error={inspection.error}\n databases={inspection.databases}\n database={inspection.activeDatabase}\n onDatabaseChange={onDatabaseChange}\n onSelect={onCatalogSelect}\n />\n ) : null}\n </div>\n )\n }\n execute={(request) =>\n execute(specMode ? structuredSearchRequest(request, search) : request)\n }\n {...(lookupFilterValues\n ? {\n lookupFilterValues: (request) =>\n lookupFilterValues(\n specMode ? structuredSearchRequest(request, search) : request,\n ),\n }\n : {})}\n renderResults={renderResults ?? descriptorResultView(descriptor)}\n />\n );\n}\n\n/**\n * descriptorResultView honours the view the server nominated for this provider.\n * A host that renders its own results (the profile builder's column picker)\n * passes renderResults and takes over entirely.\n */\nfunction descriptorResultView(\n descriptor: BrowserDescriptor,\n): ((context: QueryBrowserResultContext) => ReactNode) | undefined {\n if (descriptor.resultView === \"logs\") {\n return ({ result, defaultView }) =>\n result.rows?.length ? (\n <LogsTable\n logs={result.rows}\n autoFilter={false}\n fullscreenTitle=\"Logs\"\n {...logsResultSort(descriptor)}\n />\n ) : (\n defaultView\n );\n }\n if (descriptor.resultView === \"timeseries\") {\n return ({ result, defaultView }) => (\n <PrometheusResults result={result} fallback={defaultView} />\n );\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8GA,SAAgB,yBAAyB,EACvC,IACA,OACA,YACA,YACA,SACA,kBACA,OACA,eACA,SACA,iBACA,iBACA,eACA,QACA,gBACA,QACA,gBACA,QACA,sBACA,aACA,YACA,iBAAiB,IACjB,SACA,oBACA,eACA,aACgC;CAChC,MAAM,UAAU,QAAQ,cAAc,KAAKA,sCAAAA,qBAAqB,UAAU;CAC1E,MAAM,OAAOC,sCAAAA,cAAc;EAAE;EAAY;CAAQ,CAAC;CAClD,MAAM,CAAC,KAAK,WAAA,GAAUC,MAAAA,SAAAA,OACpBC,sCAAAA,oBAAoB;EAClB;EACA;EACA;EACA,GAAI,WAAW,eACX,EAAE,cAAc,WAAW,aAAa,IACxC,CAAC;CACP,CAAC,CACH;CAKA,MAAM,CAAC,QAAQ,cAAA,GAAaD,MAAAA,SAAAA,CAAkC;CAE9D,MAAM,UAAA,GAASE,MAAAA,OAAAA,CAAO,OAAO;CAC7B,MAAM,QAAA,GAAOA,MAAAA,OAAAA,CAAO,OAAO;CAC3B,IAAI,KAAK,YAAY,SAAS;EAC5B,KAAK,UAAU;EACf,OAAO,UAAU;EACjB,IAAI,QAAQ,UAAU,KAAA,CAAS;CACjC;CACA,MAAM,iBAAiB,UAAU;CACjC,MAAM,gBAAgB,SAAkC;EACtD,OAAO,UAAU;EACjB,UAAU,IAAI;EACd,gBAAgB,IAAI;CACtB;CACA,MAAM,cAAcC,uBAAAA,kBAAkB;EACpC,SAAS;EACT,OAAO,OAAO,eAAe,SAAS,E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
13
  inspection: Inspection;
14
+ /** Where Run renders; see QueryBrowserProps.runSlot. Omitted keeps Run in the query header. */
15
+ runSlot?: HTMLElement | null | undefined;
14
16
  onDatabaseChange: (database: string) => void;
15
17
  query: string;
16
18
  onQueryChange?: (query: string) => void | undefined;
@@ -60,5 +62,5 @@ export type ConnectionQueryWorkspaceProps = {
60
62
  renderResults?: (context: QueryBrowserResultContext) => ReactNode | undefined;
61
63
  className?: string | undefined;
62
64
  };
63
- export declare function ConnectionQueryWorkspace({ id, title, descriptor, inspection, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl, execute, lookupFilterValues, renderResults, className, }: ConnectionQueryWorkspaceProps): import("react").JSX.Element;
65
+ export declare function ConnectionQueryWorkspace({ id, title, descriptor, inspection, runSlot, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl, execute, lookupFilterValues, renderResults, className, }: ConnectionQueryWorkspaceProps): import("react").JSX.Element;
64
66
  //# sourceMappingURL=connectionQueryWorkspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connectionQueryWorkspace.d.ts","sourceRoot":"","sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAGhF,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,K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AE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,GAAG,SAAS,CAAC;IACpE;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAClD,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAChD,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACvE;;;OAGG;IACH,kBAAkB,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;IAC1D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,KAAK,SAAS,GAAG,SAAS,CAAC;IAC9E,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACvC,EAAE,EACF,KAAK,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,OAAO,EACP,eAAe,EACf,eAAe,EACf,aAAa,EACb,MAAM,EACN,cAAc,EACd,MAAM,EACN,cAAc,EACd,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,cAAmB,EACnB,OAAO,EACP,kBAAkB,EAClB,aAAa,EACb,SAAS,GACV,EAAE,6BAA6B,+BAuL/B"}
1
+ {"version":3,"file":"connectionQueryWorkspace.d.ts","sourceRoot":"","sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAGhF,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAA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ffect, useRef, useState } from "react";
19
19
  import { jsx, jsxs } from "react/jsx-runtime";
20
20
  // src/profiles/connections/connectionQueryWorkspace.tsx
21
- function ConnectionQueryWorkspace({ id, title, descriptor, inspection, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl = "", execute, lookupFilterValues, renderResults, className }) {
21
+ function ConnectionQueryWorkspace({ id, title, descriptor, inspection, runSlot, onDatabaseChange, query, onQueryChange, options, onOptionsChange, onCatalogSelect, optionsSchema, search, onSearchChange, limits, onLimitsChange, params, onParamMappingChange, paramValues, paramRoles, compileBaseUrl = "", execute, lookupFilterValues, renderResults, className }) {
22
22
  const builder = Boolean(onSearchChange) && supportsQueryBuilder(descriptor);
23
23
  const tabs = navigatorTabs({
24
24
  descriptor,
@@ -79,6 +79,7 @@ function ConnectionQueryWorkspace({ id, title, descriptor, inspection, onDatabas
79
79
  queryLabel: descriptor.queryLabel ?? "Query",
80
80
  initialQuery: specMode ? compilation.query : query,
81
81
  allowEmptyQuery: descriptor.allowEmptyQuery,
82
+ runSlot,
82
83
  optionsSchema,
83
84
  initialOptions: browserOptions,
84
85
  completion: inspection.completion,
@@ -1 +1 @@
1
- {"version":3,"file":"connectionQueryWorkspace.js","names":[],"sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"sourcesContent":["/**\n * The single query-browser host. The connection browser, the profile wizard and\n * the profile-edit builder all render this: they own where the query and the\n * options are stored and what a run means, and this owns the browser itself —\n * the catalog navigator, the structured filter builder, the completion, and the\n * descriptor's result view.\n */\n\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { LogsTable } from \"../../data/LogsTable\";\nimport { QueryBrowser } from \"../../data/query-browser/QueryBrowser\";\nimport type {\n QueryBrowserFilterLookup,\n QueryBrowserRequest,\n QueryBrowserResult,\n QueryBrowserResultContext,\n} from \"../../data/query-browser/QueryBrowser.types\";\nimport { Tabs } from \"../../layout/Tabs\";\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { CatalogTree } from \"./catalogTree\";\nimport {\n withTarget,\n type BrowserDescriptor,\n type CatalogNode,\n type ProfileRowLimits,\n} from \"./connectionBrowserModel\";\nimport type { Inspection } from \"./useInspection\";\nimport { makeFieldValueLookup } from \"../elasticsearch/esFieldValues\";\nimport { EsQueryBuilder } from \"../elasticsearch/esQueryBuilder\";\nimport {\n toBuilderMode,\n toRawMode,\n type EsSearch,\n type QueryModeTransition,\n} from \"../elasticsearch/esQueryBuilderModel\";\nimport { esBuilderVocabulary } from \"../elasticsearch/esQueryOperators\";\nimport { PrometheusResults } from \"../query/prometheusResults\";\nimport { QueryRowLimits } from \"../query/queryRowLimits\";\nimport { QueryTargetPicker } from \"../query/queryTargetPicker\";\nimport { KubernetesWorkloadTargetPicker } from \"../query/kubernetesWorkloadTargetPicker\";\nimport type { ParamMappingEdit } from \"../elasticsearch/esParamMappingModel\";\nimport type { ParamDraft } from \"../wizard/profileWizardModel\";\nimport {\n initialNavigatorTab,\n logsResultSort,\n navigatorTabs,\n structuredSearchRequest,\n supportsQueryBuilder,\n} from \"./connectionQueryWorkspaceModel\";\nimport { esQueryFields } from \"../elasticsearch/esQueryBuilderForm\";\nimport { useCompiledSearch } from \"../elasticsearch/esQueryCompile\";\nimport { InspectionStatus } from \"./inspectionStatus\";\n\nexport type ConnectionQueryWorkspaceProps = {\n id: string;\n title: string;\n descriptor: BrowserDescriptor;\n inspection: Inspection;\n onDatabaseChange: (database: string) => void;\n query: string;\n onQueryChange?: (query: string) => void | undefined;\n options: Record<string, unknown>;\n onOptionsChange: (options: Record<string, unknown>) => void;\n onCatalogSelect: (node: CatalogNode) => void;\n optionsSchema?: JsonSchemaObject | undefined;\n /**\n * The structured specification this host stores, when it stores one.\n * `undefined` means the raw query is the artifact.\n */\n search?: EsSearch | undefined;\n /**\n * Every change reports the specification and the raw query together, and one\n * of the two is always empty. The host stores both in one write, so it can\n * never end up holding a specification and a query at once — a state the\n * server rejects.\n */\n onSearchChange?: (transition: QueryModeTransition) => void | undefined;\n /**\n * The row caps the edited profile sets for itself. They are profile settings,\n * not provider options, so they are stored beside the query rather than\n * through `onOptionsChange`. A host that edits no profile — the connection\n * browser — passes neither, and the caps are then not offered at all.\n */\n limits?: ProfileRowLimits | undefined;\n onLimitsChange?: (limits: ProfileRowLimits | undefined) => void;\n /** Declared profile parameters an operand can bind to. */\n params?: ParamDraft[] | undefined;\n onParamMappingChange?: (edit: ParamMappingEdit) => void | undefined;\n /**\n * What those parameters currently resolve to. The server binds a {param:…}\n * operand from them and interpolates a {{.params.…}} one, so without values\n * the preview shows template text — or the compiler's refusal to guess.\n */\n paramValues?: Record<string, unknown> | undefined;\n /** Those parameters' roles, so the compiled preview folds them as a run would. */\n paramRoles?: Record<string, string> | undefined;\n /** Where POST /compile lives. Empty leaves the preview unresolved. */\n compileBaseUrl?: string | undefined;\n execute: (request: QueryBrowserRequest) => Promise<QueryBrowserResult>;\n /**\n * Answers a filter's value type-ahead. Absent leaves every filter the source\n * described showing only the values the result itself carried.\n */\n lookupFilterValues?: QueryBrowserFilterLookup | undefined;\n renderResults?: (context: QueryBrowserResultContext) => ReactNode | undefined;\n className?: string | undefined;\n};\n\nexport function ConnectionQueryWorkspace({\n id,\n title,\n descriptor,\n inspection,\n onDatabaseChange,\n query,\n onQueryChange,\n options,\n onOptionsChange,\n onCatalogSelect,\n optionsSchema,\n search,\n onSearchChange,\n limits,\n onLimitsChange,\n params,\n onParamMappingChange,\n paramValues,\n paramRoles,\n compileBaseUrl = \"\",\n execute,\n lookupFilterValues,\n renderResults,\n className,\n}: ConnectionQueryWorkspaceProps) {\n const builder = Boolean(onSearchChange) && supportsQueryBuilder(descriptor);\n const tabs = navigatorTabs({ descriptor, builder });\n const [tab, setTab] = useState<string | undefined>(() =>\n initialNavigatorTab({\n tabs,\n search,\n query,\n ...(descriptor.defaultQuery\n ? { defaultQuery: descriptor.defaultQuery }\n : {}),\n }),\n );\n // Picking a target has to reach the browser, which only resyncs its options\n // when `initialOptions` changes identity. The pick is layered here rather than\n // round-tripped through the host, so an options-form keystroke — which the\n // host also stores — cannot resync the browser out from under the author.\n const [picked, setPicked] = useState<Record<string, unknown>>();\n // What the browser last reported, so a pick keeps the author's other edits.\n const edited = useRef(options);\n const seed = useRef(options);\n if (seed.current !== options) {\n seed.current = options;\n edited.current = options;\n if (picked) setPicked(undefined);\n }\n const browserOptions = picked ?? options;\n const applyOptions = (next: Record<string, unknown>) => {\n edited.current = next;\n setPicked(next);\n onOptionsChange(next);\n };\n const compilation = useCompiledSearch({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n search: search ?? {},\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n enabled: Boolean(search) && compileBaseUrl !== \"\",\n });\n const values = makeFieldValueLookup({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n });\n\n // While a specification is active the editor mirrors what it compiles to. It\n // is a preview, not an input: the query is not stored alongside the spec, so\n // there is no keystroke for a compile to overwrite.\n const specMode = search !== undefined;\n const active = tabs.some((entry) => entry.id === tab) ? tab : tabs[0]?.id;\n const indexTarget =\n descriptor.target?.kind === \"index\" ? descriptor.target : undefined;\n\n // The form tab is the specification, so being on it means holding one. A tab\n // that stores nothing would leave the builder rendering a query it cannot\n // edit, and this is also what makes filters the default rather than an opt-in.\n useEffect(() => {\n if (active === \"form\" && onSearchChange && search === undefined) {\n onSearchChange(toBuilderMode());\n }\n }, [active, onSearchChange, search]);\n\n // Switching tabs is the mode switch. Each mode stores its own artifact and the\n // server rejects holding both, so leaving the form hands the raw editor the\n // DSL the specification last compiled to and drops the specification.\n const selectTab = (next: string) => {\n if (next === \"json\" && search && onSearchChange) {\n onSearchChange(toRawMode(search, compilation.query, query));\n }\n setTab(next);\n };\n\n return (\n <QueryBrowser\n id={id}\n title={title}\n language={descriptor.language ?? \"text\"}\n queryLabel={descriptor.queryLabel ?? \"Query\"}\n initialQuery={specMode ? compilation.query : query}\n allowEmptyQuery={descriptor.allowEmptyQuery}\n optionsSchema={optionsSchema}\n initialOptions={browserOptions}\n completion={inspection.completion}\n {...(specMode ? {} : onQueryChange ? { onQueryChange } : {})}\n onOptionsChange={(next) => {\n edited.current = next;\n onOptionsChange(next);\n }}\n className={className}\n navigator={\n tabs.length === 0 && !descriptor.target ? undefined : (\n <div className=\"flex min-h-0 flex-col gap-2\">\n {descriptor.catalog ? (\n <InspectionStatus inspection={inspection} />\n ) : null}\n {indexTarget ? (\n <QueryTargetPicker\n label={indexTarget.label}\n inspection={inspection}\n discoverable={descriptor.catalog === true}\n value={String(browserOptions[indexTarget.option] ?? \"\")}\n onChange={(index, targetKind) =>\n applyOptions(\n withTarget(edited.current, {\n option: indexTarget.option,\n value: index,\n targetKind,\n }),\n )\n }\n />\n ) : null}\n {descriptor.target?.kind === \"kubernetes-workload\" ? (\n <KubernetesWorkloadTargetPicker\n baseUrl={compileBaseUrl}\n target={descriptor.target}\n query={query}\n onChange={(next) => onQueryChange?.(next)}\n />\n ) : null}\n {builder ? (\n <QueryRowLimits\n value={String(browserOptions.limit ?? \"\")}\n onChange={(limit) => applyOptions({ ...edited.current, limit })}\n {...(descriptor.rowLimits\n ? { defaults: descriptor.rowLimits }\n : {})}\n {...(limits ? { limits } : {})}\n {...(onLimitsChange ? { onLimitsChange } : {})}\n />\n ) : null}\n {tabs.length > 1 ? (\n <Tabs tabs={tabs} value={active ?? \"\"} onChange={selectTab} />\n ) : null}\n {active === \"form\" && onSearchChange && search ? (\n <EsQueryBuilder\n search={search}\n onChange={(next) => onSearchChange({ search: next, query: \"\" })}\n fields={esQueryFields(inspection.completion)}\n vocabulary={esBuilderVocabulary(descriptor.optionsSchema)}\n {...(params ? { params } : {})}\n {...(onParamMappingChange\n ? { onMappingChange: onParamMappingChange }\n : {})}\n {...(values ? { values } : {})}\n compilation={compilation}\n />\n ) : active === \"json\" ? (\n <p className=\"rounded-md border border-dashed p-3 text-xs text-muted-foreground\">\n The {descriptor.queryLabel ?? \"query\"} editor holds the query.\n Switch back to Form to build it from filters — the raw query is\n dropped then, since only one of the two is stored.\n </p>\n ) : active === \"catalog\" ? (\n <CatalogTree\n nodes={inspection.nodes}\n loading={inspection.loading}\n error={inspection.error}\n databases={inspection.databases}\n database={inspection.activeDatabase}\n onDatabaseChange={onDatabaseChange}\n onSelect={onCatalogSelect}\n />\n ) : null}\n </div>\n )\n }\n execute={(request) =>\n execute(specMode ? structuredSearchRequest(request, search) : request)\n }\n {...(lookupFilterValues\n ? {\n lookupFilterValues: (request) =>\n lookupFilterValues(\n specMode ? structuredSearchRequest(request, search) : request,\n ),\n }\n : {})}\n renderResults={renderResults ?? descriptorResultView(descriptor)}\n />\n );\n}\n\n/**\n * descriptorResultView honours the view the server nominated for this provider.\n * A host that renders its own results (the profile builder's column picker)\n * passes renderResults and takes over entirely.\n */\nfunction descriptorResultView(\n descriptor: BrowserDescriptor,\n): ((context: QueryBrowserResultContext) => ReactNode) | undefined {\n if (descriptor.resultView === \"logs\") {\n return ({ result, defaultView }) =>\n result.rows?.length ? (\n <LogsTable\n logs={result.rows}\n autoFilter={false}\n fullscreenTitle=\"Logs\"\n {...logsResultSort(descriptor)}\n />\n ) : (\n defaultView\n );\n }\n if (descriptor.resultView === \"timeseries\") {\n return ({ result, defaultView }) => (\n <PrometheusResults result={result} fallback={defaultView} />\n );\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4GA,SAAgB,yBAAyB,EACvC,IACA,OACA,YACA,YACA,kBACA,OACA,eACA,SACA,iBACA,iBACA,eACA,QACA,gBACA,QACA,gBACA,QACA,sBACA,aACA,YACA,iBAAiB,IACjB,SACA,oBACA,eACA,aACgC;CAChC,MAAM,UAAU,QAAQ,cAAc,KAAK,qBAAqB,UAAU;CAC1E,MAAM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connectionQueryWorkspace.js","names":[],"sources":["../../../src/profiles/connections/connectionQueryWorkspace.tsx"],"sourcesContent":["/**\n * The single query-browser host. The connection browser, the profile wizard and\n * the profile-edit builder all render this: they own where the query and the\n * options are stored and what a run means, and this owns the browser itself —\n * the catalog navigator, the structured filter builder, the completion, and the\n * descriptor's result view.\n */\n\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport { LogsTable } from \"../../data/LogsTable\";\nimport { QueryBrowser } from \"../../data/query-browser/QueryBrowser\";\nimport type {\n QueryBrowserFilterLookup,\n QueryBrowserRequest,\n QueryBrowserResult,\n QueryBrowserResultContext,\n} from \"../../data/query-browser/QueryBrowser.types\";\nimport { Tabs } from \"../../layout/Tabs\";\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { CatalogTree } from \"./catalogTree\";\nimport {\n withTarget,\n type BrowserDescriptor,\n type CatalogNode,\n type ProfileRowLimits,\n} from \"./connectionBrowserModel\";\nimport type { Inspection } from \"./useInspection\";\nimport { makeFieldValueLookup } from \"../elasticsearch/esFieldValues\";\nimport { EsQueryBuilder } from \"../elasticsearch/esQueryBuilder\";\nimport {\n toBuilderMode,\n toRawMode,\n type EsSearch,\n type QueryModeTransition,\n} from \"../elasticsearch/esQueryBuilderModel\";\nimport { esBuilderVocabulary } from \"../elasticsearch/esQueryOperators\";\nimport { PrometheusResults } from \"../query/prometheusResults\";\nimport { QueryRowLimits } from \"../query/queryRowLimits\";\nimport { QueryTargetPicker } from \"../query/queryTargetPicker\";\nimport { KubernetesWorkloadTargetPicker } from \"../query/kubernetesWorkloadTargetPicker\";\nimport type { ParamMappingEdit } from \"../elasticsearch/esParamMappingModel\";\nimport type { ParamDraft } from \"../wizard/profileWizardModel\";\nimport {\n initialNavigatorTab,\n logsResultSort,\n navigatorTabs,\n structuredSearchRequest,\n supportsQueryBuilder,\n} from \"./connectionQueryWorkspaceModel\";\nimport { esQueryFields } from \"../elasticsearch/esQueryBuilderForm\";\nimport { useCompiledSearch } from \"../elasticsearch/esQueryCompile\";\nimport { InspectionStatus } from \"./inspectionStatus\";\n\nexport type ConnectionQueryWorkspaceProps = {\n id: string;\n title: string;\n descriptor: BrowserDescriptor;\n inspection: Inspection;\n /** Where Run renders; see QueryBrowserProps.runSlot. Omitted keeps Run in the query header. */\n runSlot?: HTMLElement | null | undefined;\n onDatabaseChange: (database: string) => void;\n query: string;\n onQueryChange?: (query: string) => void | undefined;\n options: Record<string, unknown>;\n onOptionsChange: (options: Record<string, unknown>) => void;\n onCatalogSelect: (node: CatalogNode) => void;\n optionsSchema?: JsonSchemaObject | undefined;\n /**\n * The structured specification this host stores, when it stores one.\n * `undefined` means the raw query is the artifact.\n */\n search?: EsSearch | undefined;\n /**\n * Every change reports the specification and the raw query together, and one\n * of the two is always empty. The host stores both in one write, so it can\n * never end up holding a specification and a query at once — a state the\n * server rejects.\n */\n onSearchChange?: (transition: QueryModeTransition) => void | undefined;\n /**\n * The row caps the edited profile sets for itself. They are profile settings,\n * not provider options, so they are stored beside the query rather than\n * through `onOptionsChange`. A host that edits no profile — the connection\n * browser — passes neither, and the caps are then not offered at all.\n */\n limits?: ProfileRowLimits | undefined;\n onLimitsChange?: (limits: ProfileRowLimits | undefined) => void;\n /** Declared profile parameters an operand can bind to. */\n params?: ParamDraft[] | undefined;\n onParamMappingChange?: (edit: ParamMappingEdit) => void | undefined;\n /**\n * What those parameters currently resolve to. The server binds a {param:…}\n * operand from them and interpolates a {{.params.…}} one, so without values\n * the preview shows template text — or the compiler's refusal to guess.\n */\n paramValues?: Record<string, unknown> | undefined;\n /** Those parameters' roles, so the compiled preview folds them as a run would. */\n paramRoles?: Record<string, string> | undefined;\n /** Where POST /compile lives. Empty leaves the preview unresolved. */\n compileBaseUrl?: string | undefined;\n execute: (request: QueryBrowserRequest) => Promise<QueryBrowserResult>;\n /**\n * Answers a filter's value type-ahead. Absent leaves every filter the source\n * described showing only the values the result itself carried.\n */\n lookupFilterValues?: QueryBrowserFilterLookup | undefined;\n renderResults?: (context: QueryBrowserResultContext) => ReactNode | undefined;\n className?: string | undefined;\n};\n\nexport function ConnectionQueryWorkspace({\n id,\n title,\n descriptor,\n inspection,\n runSlot,\n onDatabaseChange,\n query,\n onQueryChange,\n options,\n onOptionsChange,\n onCatalogSelect,\n optionsSchema,\n search,\n onSearchChange,\n limits,\n onLimitsChange,\n params,\n onParamMappingChange,\n paramValues,\n paramRoles,\n compileBaseUrl = \"\",\n execute,\n lookupFilterValues,\n renderResults,\n className,\n}: ConnectionQueryWorkspaceProps) {\n const builder = Boolean(onSearchChange) && supportsQueryBuilder(descriptor);\n const tabs = navigatorTabs({ descriptor, builder });\n const [tab, setTab] = useState<string | undefined>(() =>\n initialNavigatorTab({\n tabs,\n search,\n query,\n ...(descriptor.defaultQuery\n ? { defaultQuery: descriptor.defaultQuery }\n : {}),\n }),\n );\n // Picking a target has to reach the browser, which only resyncs its options\n // when `initialOptions` changes identity. The pick is layered here rather than\n // round-tripped through the host, so an options-form keystroke — which the\n // host also stores — cannot resync the browser out from under the author.\n const [picked, setPicked] = useState<Record<string, unknown>>();\n // What the browser last reported, so a pick keeps the author's other edits.\n const edited = useRef(options);\n const seed = useRef(options);\n if (seed.current !== options) {\n seed.current = options;\n edited.current = options;\n if (picked) setPicked(undefined);\n }\n const browserOptions = picked ?? options;\n const applyOptions = (next: Record<string, unknown>) => {\n edited.current = next;\n setPicked(next);\n onOptionsChange(next);\n };\n const compilation = useCompiledSearch({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n search: search ?? {},\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n enabled: Boolean(search) && compileBaseUrl !== \"\",\n });\n const values = makeFieldValueLookup({\n baseUrl: compileBaseUrl,\n index: String(browserOptions.index ?? \"\"),\n ...(paramValues ? { params: paramValues } : {}),\n ...(paramRoles ? { roles: paramRoles } : {}),\n });\n\n // While a specification is active the editor mirrors what it compiles to. It\n // is a preview, not an input: the query is not stored alongside the spec, so\n // there is no keystroke for a compile to overwrite.\n const specMode = search !== undefined;\n const active = tabs.some((entry) => entry.id === tab) ? tab : tabs[0]?.id;\n const indexTarget =\n descriptor.target?.kind === \"index\" ? descriptor.target : undefined;\n\n // The form tab is the specification, so being on it means holding one. A tab\n // that stores nothing would leave the builder rendering a query it cannot\n // edit, and this is also what makes filters the default rather than an opt-in.\n useEffect(() => {\n if (active === \"form\" && onSearchChange && search === undefined) {\n onSearchChange(toBuilderMode());\n }\n }, [active, onSearchChange, search]);\n\n // Switching tabs is the mode switch. Each mode stores its own artifact and the\n // server rejects holding both, so leaving the form hands the raw editor the\n // DSL the specification last compiled to and drops the specification.\n const selectTab = (next: string) => {\n if (next === \"json\" && search && onSearchChange) {\n onSearchChange(toRawMode(search, compilation.query, query));\n }\n setTab(next);\n };\n\n return (\n <QueryBrowser\n id={id}\n title={title}\n language={descriptor.language ?? \"text\"}\n queryLabel={descriptor.queryLabel ?? \"Query\"}\n initialQuery={specMode ? compilation.query : query}\n allowEmptyQuery={descriptor.allowEmptyQuery}\n runSlot={runSlot}\n optionsSchema={optionsSchema}\n initialOptions={browserOptions}\n completion={inspection.completion}\n {...(specMode ? {} : onQueryChange ? { onQueryChange } : {})}\n onOptionsChange={(next) => {\n edited.current = next;\n onOptionsChange(next);\n }}\n className={className}\n navigator={\n tabs.length === 0 && !descriptor.target ? undefined : (\n <div className=\"flex min-h-0 flex-col gap-2\">\n {descriptor.catalog ? (\n <InspectionStatus inspection={inspection} />\n ) : null}\n {indexTarget ? (\n <QueryTargetPicker\n label={indexTarget.label}\n inspection={inspection}\n discoverable={descriptor.catalog === true}\n value={String(browserOptions[indexTarget.option] ?? \"\")}\n onChange={(index, targetKind) =>\n applyOptions(\n withTarget(edited.current, {\n option: indexTarget.option,\n value: index,\n targetKind,\n }),\n )\n }\n />\n ) : null}\n {descriptor.target?.kind === \"kubernetes-workload\" ? (\n <KubernetesWorkloadTargetPicker\n baseUrl={compileBaseUrl}\n target={descriptor.target}\n query={query}\n onChange={(next) => onQueryChange?.(next)}\n />\n ) : null}\n {builder ? (\n <QueryRowLimits\n value={String(browserOptions.limit ?? \"\")}\n onChange={(limit) => applyOptions({ ...edited.current, limit })}\n {...(descriptor.rowLimits\n ? { defaults: descriptor.rowLimits }\n : {})}\n {...(limits ? { limits } : {})}\n {...(onLimitsChange ? { onLimitsChange } : {})}\n />\n ) : null}\n {tabs.length > 1 ? (\n <Tabs tabs={tabs} value={active ?? \"\"} onChange={selectTab} />\n ) : null}\n {active === \"form\" && onSearchChange && search ? (\n <EsQueryBuilder\n search={search}\n onChange={(next) => onSearchChange({ search: next, query: \"\" })}\n fields={esQueryFields(inspection.completion)}\n vocabulary={esBuilderVocabulary(descriptor.optionsSchema)}\n {...(params ? { params } : {})}\n {...(onParamMappingChange\n ? { onMappingChange: onParamMappingChange }\n : {})}\n {...(values ? { values } : {})}\n compilation={compilation}\n />\n ) : active === \"json\" ? (\n <p className=\"rounded-md border border-dashed p-3 text-xs text-muted-foreground\">\n The {descriptor.queryLabel ?? \"query\"} editor holds the query.\n Switch back to Form to build it from filters — the raw query is\n dropped then, since only one of the two is stored.\n </p>\n ) : active === \"catalog\" ? (\n <CatalogTree\n nodes={inspection.nodes}\n loading={inspection.loading}\n error={inspection.error}\n databases={inspection.databases}\n database={inspection.activeDatabase}\n onDatabaseChange={onDatabaseChange}\n onSelect={onCatalogSelect}\n />\n ) : null}\n </div>\n )\n }\n execute={(request) =>\n execute(specMode ? structuredSearchRequest(request, search) : request)\n }\n {...(lookupFilterValues\n ? {\n lookupFilterValues: (request) =>\n lookupFilterValues(\n specMode ? structuredSearchRequest(request, search) : request,\n ),\n }\n : {})}\n renderResults={renderResults ?? descriptorResultView(descriptor)}\n />\n );\n}\n\n/**\n * descriptorResultView honours the view the server nominated for this provider.\n * A host that renders its own results (the profile builder's column picker)\n * passes renderResults and takes over entirely.\n */\nfunction descriptorResultView(\n descriptor: BrowserDescriptor,\n): ((context: QueryBrowserResultContext) => ReactNode) | undefined {\n if (descriptor.resultView === \"logs\") {\n return ({ result, defaultView }) =>\n result.rows?.length ? (\n <LogsTable\n logs={result.rows}\n autoFilter={false}\n fullscreenTitle=\"Logs\"\n {...logsResultSort(descriptor)}\n />\n ) : (\n defaultView\n );\n }\n if (descriptor.resultView === \"timeseries\") {\n return ({ result, defaultView }) => (\n <PrometheusResults result={result} fallback={defaultView} />\n );\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8GA,SAAgB,yBAAyB,EACvC,IACA,OACA,YACA,YACA,SACA,kBACA,OACA,eACA,SACA,iBACA,iBACA,eACA,QACA,gBACA,QACA,gBACA,QACA,sBACA,aACA,YACA,iBAAiB,IACjB,SACA,oBACA,eACA,aACgC;CAChC,MAAM,UAAU,QAAQ,cAAc,KAAK,qBAAqB,UAAU;CAC1E,MAAM,OAAO,cAAc;EAAE;EAAY;CAAQ,CAAC;CAClD,MAAM,CAAC,KAAK,UAAU,eACpB,oBAAoB;EAClB;EACA;EACA;EACA,GAAI,WAAW,eACX,EAAE,cAAc,WAAW,aAAa,IACxC,CAAC;CACP,CAAC,CACH;CAKA,MAAM,CAAC,QAAQ,aAAa,SAAkC;CAE9D,MAAM,SAAS,OAAO,OAAO;CAC7B,MAAM,OAAO,OAAO,OAAO;CAC3B,IAAI,KAAK,YAAY,SAAS;EAC5B,KAAK,UAAU;EACf,OAAO,UAAU;EACjB,IAAI,QAAQ,UAAU,KAAA,CAAS;CACjC;CACA,MAAM,iBAAiB,UAAU;CACjC,MAAM,gBAAgB,SAAkC;EACtD,OAAO,UAAU;EACjB,UAAU,IAAI;EACd,gBAAgB,IAAI;CACtB;CACA,MAAM,cAAc,kBAAkB;EACpC,SAAS;EACT,OAAO,OAAO,eAAe,SAAS,EAAE;EACxC,QAAQ,UAAU,CAAC;EACnB,GAAI,cAAc,EAAE,QAAQ,YAAY,IAAI,CAAC;EAC7C,GAAI,aAAa,EAAE,OAAO,WAAW,IAAI,CAAC;EAC1C,S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R,QAAQ,WAAW,wBAAwB,SAAS,MAAM,IAAI,OAAO;EAEvE,GAAK,qBACD,EACE,qBAAqB,YACnB,mBACE,WAAW,wBAAwB,SAAS,MAAM,IAAI,OACxD,EACJ,IACA,CAAC;EACL,eAAe,iBAAiB,qBAAqB,UAAU;CAChE,CAAA;AAEL;;;;;;AAOA,SAAS,qBACP,YACiE;CACjE,IAAI,WAAW,eAAe,QAC5B,QAAQ,EAAE,QAAQ,kBAChB,OAAO,MAAM,SACX,oBAAC,WAAD;EACE,MAAM,OAAO;EACb,YAAY;EACZ,iBAAgB;EAChB,GAAI,eAAe,UAAU;CAC9B,CAAA,IAED;CAGN,IAAI,WAAW,eAAe,cAC5B,QAAQ,EAAE,QAAQ,kBAChB,oBAAC,mBAAD;EAA2B;EAAQ,UAAU;CAAc,CAAA;AAIjE"}
@@ -0,0 +1,90 @@
1
+ const require_useUnwrapPreviews = require("./useUnwrapPreviews.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ // src/profiles/editor/UnwrapPreviewList.tsx
4
+ var KIND_LABELS = {
5
+ key_values: "Key/values",
6
+ json: "JSON"
7
+ };
8
+ function UnwrapPreviewList({ draft, rules }) {
9
+ const state = require_useUnwrapPreviews.useUnwrapPreviews(draft);
10
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11
+ "data-unwrap-previews": true,
12
+ className: "mt-2 space-y-2",
13
+ children: [
14
+ state.status === "loading" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
15
+ className: "text-xs text-muted-foreground",
16
+ children: "Previewing the rules against the source…"
17
+ }) : null,
18
+ state.status === "error" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Failure, { message: state.message }) : null,
19
+ state.status === "ready" ? rules.map((rule, index) => {
20
+ const preview = state.previews[index];
21
+ return preview ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnwrapPreviewCard, {
22
+ rule,
23
+ preview,
24
+ sampled: state.sampled
25
+ }, index) : null;
26
+ }) : null
27
+ ]
28
+ });
29
+ }
30
+ function UnwrapPreviewCard({ rule, preview, sampled }) {
31
+ const field = typeof rule.field === "string" && rule.field !== "" ? rule.field : "(no field)";
32
+ const kind = typeof rule.as === "string" ? KIND_LABELS[rule.as] ?? rule.as : "";
33
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
34
+ "data-unwrap-preview": field,
35
+ className: "rounded-md border bg-muted/30 p-2 text-xs",
36
+ children: [
37
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
38
+ className: "mb-1 font-medium",
39
+ children: [field, kind ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
40
+ className: "font-normal text-muted-foreground",
41
+ children: [" as ", kind]
42
+ }) : null]
43
+ }),
44
+ preview.status === "invalid" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Failure, { message: preview.error ?? "the server returned no error text" }) : null,
45
+ preview.status === "missing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
46
+ className: "text-muted-foreground",
47
+ children: [
48
+ "None of the ",
49
+ sampled,
50
+ " sampled rows carries this field."
51
+ ]
52
+ }) : null,
53
+ preview.status === "applied" || preview.status === "failed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
54
+ className: "mb-1 text-muted-foreground",
55
+ children: ["Sampled row ", preview.row + 1]
56
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
57
+ className: "grid gap-2 @md:grid-cols-2",
58
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Value, {
59
+ heading: "Now",
60
+ value: preview.before
61
+ }), preview.status === "applied" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Value, {
62
+ heading: "After unwrapping",
63
+ value: preview.after
64
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Failure, { message: preview.error ?? "the server returned no error text" })]
65
+ })] }) : null
66
+ ]
67
+ });
68
+ }
69
+ function Value({ heading, value }) {
70
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
71
+ className: "min-w-0",
72
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
73
+ className: "mb-0.5 text-muted-foreground",
74
+ children: heading
75
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
76
+ className: "max-h-40 overflow-auto rounded bg-background p-1.5 font-mono",
77
+ children: JSON.stringify(value, null, 2)
78
+ })]
79
+ });
80
+ }
81
+ function Failure({ message }) {
82
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
83
+ role: "alert",
84
+ className: "text-destructive",
85
+ children: message
86
+ });
87
+ }
88
+ exports.UnwrapPreviewList = UnwrapPreviewList;
89
+
90
+ //# sourceMappingURL=UnwrapPreviewList.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnwrapPreviewList.cjs","names":["useUnwrapPreviews","_Fragment"],"sources":["../../../src/profiles/editor/UnwrapPreviewList.tsx"],"sourcesContent":["import type { ProfileWizardDraft } from \"../wizard/profileWizardModel\";\nimport { useUnwrapPreviews, type RulePreview, type UnwrapRuleDraft } from \"./useUnwrapPreviews\";\n\nconst KIND_LABELS: Record<string, string> = { key_values: \"Key/values\", json: \"JSON\" };\n\nexport function UnwrapPreviewList({ draft, rules }: { draft: ProfileWizardDraft; rules: UnwrapRuleDraft[] }) {\n const state = useUnwrapPreviews(draft);\n return (\n <div data-unwrap-previews className=\"mt-2 space-y-2\">\n {state.status === \"loading\" ? <p className=\"text-xs text-muted-foreground\">Previewing the rules against the source…</p> : null}\n {state.status === \"error\" ? <Failure message={state.message} /> : null}\n {state.status === \"ready\"\n ? rules.map((rule, index) => {\n const preview = state.previews[index];\n return preview ? <UnwrapPreviewCard key={index} rule={rule} preview={preview} sampled={state.sampled} /> : null;\n })\n : null}\n </div>\n );\n}\n\nfunction UnwrapPreviewCard({ rule, preview, sampled }: { rule: UnwrapRuleDraft; preview: RulePreview; sampled: number }) {\n const field = typeof rule.field === \"string\" && rule.field !== \"\" ? rule.field : \"(no field)\";\n const kind = typeof rule.as === \"string\" ? (KIND_LABELS[rule.as] ?? rule.as) : \"\";\n return (\n <div data-unwrap-preview={field} className=\"rounded-md border bg-muted/30 p-2 text-xs\">\n <div className=\"mb-1 font-medium\">\n {field}\n {kind ? <span className=\"font-normal text-muted-foreground\"> as {kind}</span> : null}\n </div>\n {preview.status === \"invalid\" ? <Failure message={preview.error ?? \"the server returned no error text\"} /> : null}\n {preview.status === \"missing\" ? (\n <p className=\"text-muted-foreground\">None of the {sampled} sampled rows carries this field.</p>\n ) : null}\n {preview.status === \"applied\" || preview.status === \"failed\" ? (\n <>\n <p className=\"mb-1 text-muted-foreground\">Sampled row {preview.row + 1}</p>\n <div className=\"grid gap-2 @md:grid-cols-2\">\n <Value heading=\"Now\" value={preview.before} />\n {preview.status === \"applied\" ? (\n <Value heading=\"After unwrapping\" value={preview.after} />\n ) : (\n <Failure message={preview.error ?? \"the server returned no error text\"} />\n )}\n </div>\n </>\n ) : null}\n </div>\n );\n}\n\nfunction Value({ heading, value }: { heading: string; value: unknown }) {\n return (\n <div className=\"min-w-0\">\n <div className=\"mb-0.5 text-muted-foreground\">{heading}</div>\n <pre className=\"max-h-40 overflow-auto rounded bg-background p-1.5 font-mono\">{JSON.stringify(value, null, 2)}</pre>\n </div>\n );\n}\n\nfunction Failure({ message }: { message: string }) {\n return (\n <p role=\"alert\" className=\"text-destructive\">\n {message}\n </p>\n );\n}\n"],"mappings":";;;AAGA,IAAM,cAAsC;CAAE,YAAY;CAAc,MAAM;AAAO;AAErF,SAAgB,kBAAkB,EAAE,OAAO,SAAkE;CAC3G,MAAM,QAAQA,0BAAAA,kBAAkB,KAAK;CACrC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,wBAAA;EAAqB,WAAU;EAApC,UAAA;GACG,MAAM,WAAW,YAAY,iBA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AAA,GAAA,kBAAA,KAAA,CAAC,KAAD;IAAG,WAAU;IAAb,UAAA,CAA0C,gBAAa,QAAQ,MAAM,CAAK;GAC1E,CAAA,GAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAO,SAAQ;KAAM,OAAO,QAAQ;IAAS,CAAA,GAC5C,QAAQ,WAAW,YAClB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;KAAO,SAAQ;KAAmB,OAAO,QAAQ;IAAQ,CAAA,IAEzD,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,EAAS,SAAS,QAAQ,SAAS,oCAAsC,CAAA,CAExE;GACL,CAAA,CAAA,EAAA,CAAA,IACA;EACD;;AAET;AAEA,SAAS,MAAM,EAAE,SAAS,SAA8C;CACtE,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAU;GAAgC,UAAA;EAAa,CAAA,GAC5D,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,WAAU;GAAgE,UAAA,KAAK,UAAU,OAAO,MAAM,CAAC;EAAO,CAAA,CAChH;;AAET;AAEA,SAAS,QAAQ,EAAE,WAAgC;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EAAG,MAAK;EAAQ,WAAU;EACvB,UAAA;CACA,CAAA;AAEP"}
@@ -0,0 +1,7 @@
1
+ import { ProfileWizardDraft } from '../wizard/profileWizardModel.js';
2
+ import { UnwrapRuleDraft } from './useUnwrapPreviews.js';
3
+ export declare function UnwrapPreviewList({ draft, rules }: {
4
+ draft: ProfileWizardDraft;
5
+ rules: UnwrapRuleDraft[];
6
+ }): import("react").JSX.Element;
7
+ //# sourceMappingURL=UnwrapPreviewList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnwrapPreviewList.d.ts","sourceRoot":"","sources":["../../../src/profiles/editor/UnwrapPreviewList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAuC,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAIhG,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,kBAAkB,CAAC;IAAC,KAAK,EAAE,eAAe,EAAE,CAAA;CAAE,+BAc1G"}