@flanksource/clicky-ui 0.3.78 → 0.3.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (745) hide show
  1. package/dist/ai.cjs +2 -2
  2. package/dist/ai.js +2 -2
  3. package/dist/comments/CommentThreadList.cjs +13 -14
  4. package/dist/comments/CommentThreadList.cjs.map +1 -1
  5. package/dist/comments/CommentThreadList.d.ts.map +1 -1
  6. package/dist/comments/CommentThreadList.js +13 -14
  7. package/dist/comments/CommentThreadList.js.map +1 -1
  8. package/dist/components/EndpointSelector.cjs +7 -1
  9. package/dist/components/EndpointSelector.cjs.map +1 -1
  10. package/dist/components/EndpointSelector.d.ts.map +1 -1
  11. package/dist/components/EndpointSelector.js +7 -1
  12. package/dist/components/EndpointSelector.js.map +1 -1
  13. package/dist/components/FilterBar.cjs +36 -12
  14. package/dist/components/FilterBar.cjs.map +1 -1
  15. package/dist/components/FilterBar.d.ts +14 -2
  16. package/dist/components/FilterBar.d.ts.map +1 -1
  17. package/dist/components/FilterBar.js +36 -12
  18. package/dist/components/FilterBar.js.map +1 -1
  19. package/dist/components/FormLookupProvider.cjs +12 -4
  20. package/dist/components/FormLookupProvider.cjs.map +1 -1
  21. package/dist/components/FormLookupProvider.d.ts.map +1 -1
  22. package/dist/components/FormLookupProvider.js +13 -5
  23. package/dist/components/FormLookupProvider.js.map +1 -1
  24. package/dist/components/JSONPathPlayground.cjs +124 -233
  25. package/dist/components/JSONPathPlayground.cjs.map +1 -1
  26. package/dist/components/JSONPathPlayground.d.ts +15 -13
  27. package/dist/components/JSONPathPlayground.d.ts.map +1 -1
  28. package/dist/components/JSONPathPlayground.js +125 -234
  29. package/dist/components/JSONPathPlayground.js.map +1 -1
  30. package/dist/components/JsonSchemaForm.cjs +6 -0
  31. package/dist/components/JsonSchemaForm.cjs.map +1 -1
  32. package/dist/components/JsonSchemaForm.js +6 -0
  33. package/dist/components/JsonSchemaForm.js.map +1 -1
  34. package/dist/components/SegmentedControl.cjs +1 -1
  35. package/dist/components/SegmentedControl.cjs.map +1 -1
  36. package/dist/components/SegmentedControl.d.ts.map +1 -1
  37. package/dist/components/SegmentedControl.js +1 -1
  38. package/dist/components/SegmentedControl.js.map +1 -1
  39. package/dist/components/TimeRange.cjs +133 -60
  40. package/dist/components/TimeRange.cjs.map +1 -1
  41. package/dist/components/TimeRange.d.ts +8 -1
  42. package/dist/components/TimeRange.d.ts.map +1 -1
  43. package/dist/components/TimeRange.js +133 -60
  44. package/dist/components/TimeRange.js.map +1 -1
  45. package/dist/components/json-schema-form-accordion-array.cjs +8 -6
  46. package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
  47. package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
  48. package/dist/components/json-schema-form-accordion-array.js +9 -7
  49. package/dist/components/json-schema-form-accordion-array.js.map +1 -1
  50. package/dist/components/json-schema-form-array-rows.cjs +45 -0
  51. package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
  52. package/dist/components/json-schema-form-array-rows.d.ts +10 -0
  53. package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
  54. package/dist/components/json-schema-form-array-rows.js +45 -0
  55. package/dist/components/json-schema-form-array-rows.js.map +1 -0
  56. package/dist/components/json-schema-form-item-summary.cjs +3 -5
  57. package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
  58. package/dist/components/json-schema-form-item-summary.d.ts +1 -1
  59. package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
  60. package/dist/components/json-schema-form-item-summary.js +3 -5
  61. package/dist/components/json-schema-form-item-summary.js.map +1 -1
  62. package/dist/components/json-schema-form-render.cjs +11 -2
  63. package/dist/components/json-schema-form-render.cjs.map +1 -1
  64. package/dist/components/json-schema-form-render.d.ts.map +1 -1
  65. package/dist/components/json-schema-form-render.js +12 -3
  66. package/dist/components/json-schema-form-render.js.map +1 -1
  67. package/dist/components/json-schema-form-resolve.cjs +10 -0
  68. package/dist/components/json-schema-form-resolve.cjs.map +1 -1
  69. package/dist/components/json-schema-form-resolve.d.ts +1 -0
  70. package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
  71. package/dist/components/json-schema-form-resolve.js +10 -1
  72. package/dist/components/json-schema-form-resolve.js.map +1 -1
  73. package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
  74. package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
  75. package/dist/components/json-schema-form-table-array.cjs +25 -16
  76. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  77. package/dist/components/json-schema-form-table-array.d.ts +1 -1
  78. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  79. package/dist/components/json-schema-form-table-array.js +26 -17
  80. package/dist/components/json-schema-form-table-array.js.map +1 -1
  81. package/dist/components/json-schema-form-types.d.ts +0 -2
  82. package/dist/components/json-schema-form-types.d.ts.map +1 -1
  83. package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
  84. package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
  85. package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
  86. package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
  87. package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
  88. package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
  89. package/dist/components/jsonPathTree.cjs +1 -0
  90. package/dist/components/jsonPathTree.cjs.map +1 -1
  91. package/dist/components/jsonPathTree.d.ts +6 -0
  92. package/dist/components/jsonPathTree.d.ts.map +1 -1
  93. package/dist/components/jsonPathTree.js +1 -0
  94. package/dist/components/jsonPathTree.js.map +1 -1
  95. package/dist/data/Clicky.cjs +37 -18
  96. package/dist/data/Clicky.cjs.map +1 -1
  97. package/dist/data/Clicky.d.ts +5 -0
  98. package/dist/data/Clicky.d.ts.map +1 -1
  99. package/dist/data/Clicky.js +37 -18
  100. package/dist/data/Clicky.js.map +1 -1
  101. package/dist/data/DataTable.cjs +49 -12
  102. package/dist/data/DataTable.cjs.map +1 -1
  103. package/dist/data/DataTable.d.ts +17 -2
  104. package/dist/data/DataTable.d.ts.map +1 -1
  105. package/dist/data/DataTable.js +49 -12
  106. package/dist/data/DataTable.js.map +1 -1
  107. package/dist/data/TaskPoolUsage.cjs +2 -1
  108. package/dist/data/TaskPoolUsage.cjs.map +1 -1
  109. package/dist/data/TaskPoolUsage.d.ts.map +1 -1
  110. package/dist/data/TaskPoolUsage.js +2 -1
  111. package/dist/data/TaskPoolUsage.js.map +1 -1
  112. package/dist/data/TimeseriesPanel.axes.cjs +18 -3
  113. package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
  114. package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
  115. package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
  116. package/dist/data/TimeseriesPanel.axes.js +17 -4
  117. package/dist/data/TimeseriesPanel.axes.js.map +1 -1
  118. package/dist/data/TimeseriesPanel.cjs +57 -23
  119. package/dist/data/TimeseriesPanel.cjs.map +1 -1
  120. package/dist/data/TimeseriesPanel.d.ts.map +1 -1
  121. package/dist/data/TimeseriesPanel.js +59 -25
  122. package/dist/data/TimeseriesPanel.js.map +1 -1
  123. package/dist/data/TimeseriesPanel.model.cjs +10 -7
  124. package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
  125. package/dist/data/TimeseriesPanel.model.d.ts +7 -4
  126. package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
  127. package/dist/data/TimeseriesPanel.model.js +11 -8
  128. package/dist/data/TimeseriesPanel.model.js.map +1 -1
  129. package/dist/data/TimeseriesPanel.readout.cjs +11 -0
  130. package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
  131. package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
  132. package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
  133. package/dist/data/TimeseriesPanel.readout.js +10 -0
  134. package/dist/data/TimeseriesPanel.readout.js.map +1 -0
  135. package/dist/data/TimeseriesPanel.segments.cjs +67 -0
  136. package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
  137. package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
  138. package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
  139. package/dist/data/TimeseriesPanel.segments.js +67 -0
  140. package/dist/data/TimeseriesPanel.segments.js.map +1 -0
  141. package/dist/data/TreeDataTable.cjs +12 -3
  142. package/dist/data/TreeDataTable.cjs.map +1 -1
  143. package/dist/data/TreeDataTable.d.ts +15 -3
  144. package/dist/data/TreeDataTable.d.ts.map +1 -1
  145. package/dist/data/TreeDataTable.js +12 -3
  146. package/dist/data/TreeDataTable.js.map +1 -1
  147. package/dist/data/TreeNode.cjs +18 -3
  148. package/dist/data/TreeNode.cjs.map +1 -1
  149. package/dist/data/TreeNode.d.ts +7 -1
  150. package/dist/data/TreeNode.d.ts.map +1 -1
  151. package/dist/data/TreeNode.js +18 -3
  152. package/dist/data/TreeNode.js.map +1 -1
  153. package/dist/data/ai/SessionChatComposer.cjs +2 -0
  154. package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
  155. package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
  156. package/dist/data/ai/SessionChatComposer.js +2 -0
  157. package/dist/data/ai/SessionChatComposer.js.map +1 -1
  158. package/dist/data/ai/SessionInspector.panels.cjs +47 -1
  159. package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
  160. package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
  161. package/dist/data/ai/SessionInspector.panels.js +48 -2
  162. package/dist/data/ai/SessionInspector.panels.js.map +1 -1
  163. package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
  164. package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
  165. package/dist/data/ai/index.d.ts +2 -2
  166. package/dist/data/ai/index.d.ts.map +1 -1
  167. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
  168. package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
  169. package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
  170. package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
  171. package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
  172. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
  173. package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
  174. package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
  175. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
  176. package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
  177. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
  178. package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
  179. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
  180. package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
  181. package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
  182. package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
  183. package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
  184. package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
  185. package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
  186. package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
  187. package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
  188. package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
  189. package/dist/data/ai/sessionSubmitVariant.js +30 -0
  190. package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
  191. package/dist/data/cells/Timestamp.cjs +15 -4
  192. package/dist/data/cells/Timestamp.cjs.map +1 -1
  193. package/dist/data/cells/Timestamp.d.ts.map +1 -1
  194. package/dist/data/cells/Timestamp.js +15 -4
  195. package/dist/data/cells/Timestamp.js.map +1 -1
  196. package/dist/data/cells/timestamp-format.cjs +28 -8
  197. package/dist/data/cells/timestamp-format.cjs.map +1 -1
  198. package/dist/data/cells/timestamp-format.d.ts +3 -1
  199. package/dist/data/cells/timestamp-format.d.ts.map +1 -1
  200. package/dist/data/cells/timestamp-format.js +28 -8
  201. package/dist/data/cells/timestamp-format.js.map +1 -1
  202. package/dist/data/charts/TrendChart.cjs +65 -31
  203. package/dist/data/charts/TrendChart.cjs.map +1 -1
  204. package/dist/data/charts/TrendChart.d.ts +12 -3
  205. package/dist/data/charts/TrendChart.d.ts.map +1 -1
  206. package/dist/data/charts/TrendChart.js +67 -33
  207. package/dist/data/charts/TrendChart.js.map +1 -1
  208. package/dist/data/charts/index.d.ts +1 -1
  209. package/dist/data/charts/index.d.ts.map +1 -1
  210. package/dist/data/chat/PromptInput.cjs +11 -2
  211. package/dist/data/chat/PromptInput.cjs.map +1 -1
  212. package/dist/data/chat/PromptInput.d.ts +15 -1
  213. package/dist/data/chat/PromptInput.d.ts.map +1 -1
  214. package/dist/data/chat/PromptInput.js +11 -2
  215. package/dist/data/chat/PromptInput.js.map +1 -1
  216. package/dist/data/chat/index.d.ts +1 -1
  217. package/dist/data/chat/index.d.ts.map +1 -1
  218. package/dist/data/data-table-filter-values.cjs.map +1 -1
  219. package/dist/data/data-table-filter-values.d.ts +1 -1
  220. package/dist/data/data-table-filter-values.d.ts.map +1 -1
  221. package/dist/data/data-table-filter-values.js.map +1 -1
  222. package/dist/data/data-table-server-filters.cjs +2 -6
  223. package/dist/data/data-table-server-filters.cjs.map +1 -1
  224. package/dist/data/data-table-server-filters.d.ts +1 -1
  225. package/dist/data/data-table-server-filters.d.ts.map +1 -1
  226. package/dist/data/data-table-server-filters.js +1 -5
  227. package/dist/data/data-table-server-filters.js.map +1 -1
  228. package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
  229. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  230. package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
  231. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  232. package/dist/data/diagnostics/ErrorDetails.js +2 -1
  233. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  234. package/dist/data/gauge-stats.cjs +7 -3
  235. package/dist/data/gauge-stats.cjs.map +1 -1
  236. package/dist/data/gauge-stats.d.ts.map +1 -1
  237. package/dist/data/gauge-stats.js +7 -3
  238. package/dist/data/gauge-stats.js.map +1 -1
  239. package/dist/data/query-browser/QueryBrowser.cjs +41 -17
  240. package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
  241. package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
  242. package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
  243. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
  244. package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
  245. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
  246. package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
  247. package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
  248. package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
  249. package/dist/data/query-browser/QueryBrowser.js +41 -17
  250. package/dist/data/query-browser/QueryBrowser.js.map +1 -1
  251. package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
  252. package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
  253. package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
  254. package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
  255. package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
  256. package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
  257. package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
  258. package/dist/data/runtime/RuntimeBarLayout.js +3 -2
  259. package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
  260. package/dist/data/test-runner/TestRunner.cjs +3 -1
  261. package/dist/data/test-runner/TestRunner.cjs.map +1 -1
  262. package/dist/data/test-runner/TestRunner.d.ts +8 -1
  263. package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
  264. package/dist/data/test-runner/TestRunner.js +3 -1
  265. package/dist/data/test-runner/TestRunner.js.map +1 -1
  266. package/dist/data/test-runner/TestTree.cjs +1 -0
  267. package/dist/data/test-runner/TestTree.cjs.map +1 -1
  268. package/dist/data/test-runner/TestTree.d.ts.map +1 -1
  269. package/dist/data/test-runner/TestTree.js +1 -0
  270. package/dist/data/test-runner/TestTree.js.map +1 -1
  271. package/dist/data/test-runner/context.cjs.map +1 -1
  272. package/dist/data/test-runner/context.d.ts +2 -0
  273. package/dist/data/test-runner/context.d.ts.map +1 -1
  274. package/dist/data/test-runner/context.js.map +1 -1
  275. package/dist/data/timeseries-query.cjs +2 -2
  276. package/dist/data/timeseries-query.cjs.map +1 -1
  277. package/dist/data/timeseries-query.d.ts +1 -1
  278. package/dist/data/timeseries-query.d.ts.map +1 -1
  279. package/dist/data/timeseries-query.js +2 -2
  280. package/dist/data/timeseries-query.js.map +1 -1
  281. package/dist/data/version-info.cjs +3 -3
  282. package/dist/data/version-info.js +3 -3
  283. package/dist/data.cjs +1 -0
  284. package/dist/data.d.ts +1 -1
  285. package/dist/data.d.ts.map +1 -1
  286. package/dist/data.js +2 -2
  287. package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
  288. package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
  289. package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
  290. package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
  291. package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
  292. package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
  293. package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
  294. package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
  295. package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
  296. package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
  297. package/dist/expressions/playground/ExpressionPlayground.js +6 -6
  298. package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
  299. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
  300. package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
  301. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
  302. package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
  303. package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
  304. package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
  305. package/dist/expressions/playground/api.cjs.map +1 -1
  306. package/dist/expressions/playground/api.d.ts +10 -0
  307. package/dist/expressions/playground/api.d.ts.map +1 -1
  308. package/dist/expressions/playground/api.js.map +1 -1
  309. package/dist/expressions/playground/hostEvaluation.cjs +67 -0
  310. package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
  311. package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
  312. package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
  313. package/dist/expressions/playground/hostEvaluation.js +63 -0
  314. package/dist/expressions/playground/hostEvaluation.js.map +1 -0
  315. package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
  316. package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
  317. package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
  318. package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
  319. package/dist/expressions/playground/panels/GraphPanel.js +8 -3
  320. package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
  321. package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
  322. package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
  323. package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
  324. package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
  325. package/dist/expressions/playground/panels/graphNodes.js +6 -2
  326. package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
  327. package/dist/expressions/playground.d.ts +1 -1
  328. package/dist/expressions/playground.d.ts.map +1 -1
  329. package/dist/hooks/use-element-height.cjs +26 -0
  330. package/dist/hooks/use-element-height.cjs.map +1 -0
  331. package/dist/hooks/use-element-height.d.ts +10 -0
  332. package/dist/hooks/use-element-height.d.ts.map +1 -0
  333. package/dist/hooks/use-element-height.js +26 -0
  334. package/dist/hooks/use-element-height.js.map +1 -0
  335. package/dist/index.cjs +6 -5
  336. package/dist/index.js +7 -7
  337. package/dist/jvm/classes/PatchedClassList.cjs +11 -2
  338. package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
  339. package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
  340. package/dist/jvm/classes/PatchedClassList.js +11 -2
  341. package/dist/jvm/classes/PatchedClassList.js.map +1 -1
  342. package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
  343. package/dist/jvm/model/patches.cjs +4 -2
  344. package/dist/jvm/model/patches.cjs.map +1 -1
  345. package/dist/jvm/model/patches.d.ts +3 -1
  346. package/dist/jvm/model/patches.d.ts.map +1 -1
  347. package/dist/jvm/model/patches.js +4 -2
  348. package/dist/jvm/model/patches.js.map +1 -1
  349. package/dist/jvm/protocol/client.d.ts +7 -2
  350. package/dist/jvm/protocol/client.d.ts.map +1 -1
  351. package/dist/jvm/protocol/operation-client.cjs +30 -11
  352. package/dist/jvm/protocol/operation-client.cjs.map +1 -1
  353. package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
  354. package/dist/jvm/protocol/operation-client.js +30 -11
  355. package/dist/jvm/protocol/operation-client.js.map +1 -1
  356. package/dist/jvm/protocol/query-keys.cjs +1 -1
  357. package/dist/jvm/protocol/query-keys.cjs.map +1 -1
  358. package/dist/jvm/protocol/query-keys.d.ts +1 -1
  359. package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
  360. package/dist/jvm/protocol/query-keys.js +1 -1
  361. package/dist/jvm/protocol/query-keys.js.map +1 -1
  362. package/dist/jvm/protocol/status.cjs +38 -0
  363. package/dist/jvm/protocol/status.cjs.map +1 -0
  364. package/dist/jvm/protocol/status.d.ts +13 -0
  365. package/dist/jvm/protocol/status.d.ts.map +1 -0
  366. package/dist/jvm/protocol/status.js +38 -0
  367. package/dist/jvm/protocol/status.js.map +1 -0
  368. package/dist/jvm/protocol/types.d.ts +16 -4
  369. package/dist/jvm/protocol/types.d.ts.map +1 -1
  370. package/dist/jvm/runtime/GcSummary.cjs +7 -1
  371. package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
  372. package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
  373. package/dist/jvm/runtime/GcSummary.js +7 -1
  374. package/dist/jvm/runtime/GcSummary.js.map +1 -1
  375. package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
  376. package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
  377. package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
  378. package/dist/jvm/surfaces/ClassesSurface.js +12 -11
  379. package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
  380. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
  381. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
  382. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
  383. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
  384. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
  385. package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
  386. package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
  387. package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
  388. package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
  389. package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
  390. package/dist/jvm/surfaces/PatchesSurface.js +4 -9
  391. package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
  392. package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
  393. package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
  394. package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
  395. package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
  396. package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
  397. package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
  398. package/dist/jvm/surfaces/jvm-context.cjs +23 -4
  399. package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
  400. package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
  401. package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
  402. package/dist/jvm/surfaces/jvm-context.js +23 -5
  403. package/dist/jvm/surfaces/jvm-context.js.map +1 -1
  404. package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
  405. package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
  406. package/dist/jvm/surfaces/use-patch-actions.js +2 -2
  407. package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
  408. package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
  409. package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
  410. package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
  411. package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
  412. package/dist/jvm/threads/FoldedStackTrace.js +3 -2
  413. package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
  414. package/dist/jvm/threads/ThreadDetail.cjs +6 -2
  415. package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
  416. package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
  417. package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
  418. package/dist/jvm/threads/ThreadDetail.js +6 -2
  419. package/dist/jvm/threads/ThreadDetail.js.map +1 -1
  420. package/dist/jvm.cjs +3 -0
  421. package/dist/jvm.d.ts +2 -1
  422. package/dist/jvm.d.ts.map +1 -1
  423. package/dist/jvm.js +3 -2
  424. package/dist/layout/AppShell.cjs.map +1 -1
  425. package/dist/layout/AppShell.d.ts +16 -0
  426. package/dist/layout/AppShell.d.ts.map +1 -1
  427. package/dist/layout/AppShell.js.map +1 -1
  428. package/dist/layout/AppShell.nav.cjs +21 -2
  429. package/dist/layout/AppShell.nav.cjs.map +1 -1
  430. package/dist/layout/AppShell.nav.js +21 -2
  431. package/dist/layout/AppShell.nav.js.map +1 -1
  432. package/dist/layout/Workspace.cjs +66 -21
  433. package/dist/layout/Workspace.cjs.map +1 -1
  434. package/dist/layout/Workspace.d.ts +6 -1
  435. package/dist/layout/Workspace.d.ts.map +1 -1
  436. package/dist/layout/Workspace.js +66 -21
  437. package/dist/layout/Workspace.js.map +1 -1
  438. package/dist/layout/Workspace.model.cjs +20 -0
  439. package/dist/layout/Workspace.model.cjs.map +1 -1
  440. package/dist/layout/Workspace.model.d.ts +17 -0
  441. package/dist/layout/Workspace.model.d.ts.map +1 -1
  442. package/dist/layout/Workspace.model.js +20 -1
  443. package/dist/layout/Workspace.model.js.map +1 -1
  444. package/dist/layout/Workspace.regions.cjs +10 -6
  445. package/dist/layout/Workspace.regions.cjs.map +1 -1
  446. package/dist/layout/Workspace.regions.d.ts +4 -1
  447. package/dist/layout/Workspace.regions.d.ts.map +1 -1
  448. package/dist/layout/Workspace.regions.js +10 -6
  449. package/dist/layout/Workspace.regions.js.map +1 -1
  450. package/dist/lib/duration.cjs +20 -0
  451. package/dist/lib/duration.cjs.map +1 -1
  452. package/dist/lib/duration.d.ts +8 -0
  453. package/dist/lib/duration.d.ts.map +1 -1
  454. package/dist/lib/duration.js +19 -1
  455. package/dist/lib/duration.js.map +1 -1
  456. package/dist/monaco/MonacoEditor.cjs +34 -30
  457. package/dist/monaco/MonacoEditor.cjs.map +1 -1
  458. package/dist/monaco/MonacoEditor.d.ts.map +1 -1
  459. package/dist/monaco/MonacoEditor.js +34 -30
  460. package/dist/monaco/MonacoEditor.js.map +1 -1
  461. package/dist/overlay/ConfirmDialog.cjs +5 -2
  462. package/dist/overlay/ConfirmDialog.cjs.map +1 -1
  463. package/dist/overlay/ConfirmDialog.d.ts +14 -2
  464. package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
  465. package/dist/overlay/ConfirmDialog.js +5 -2
  466. package/dist/overlay/ConfirmDialog.js.map +1 -1
  467. package/dist/profiles/cel/celEditor.cjs +94 -285
  468. package/dist/profiles/cel/celEditor.cjs.map +1 -1
  469. package/dist/profiles/cel/celEditor.d.ts +10 -15
  470. package/dist/profiles/cel/celEditor.d.ts.map +1 -1
  471. package/dist/profiles/cel/celEditor.js +97 -287
  472. package/dist/profiles/cel/celEditor.js.map +1 -1
  473. package/dist/profiles/cel/celExpression.cjs +1 -61
  474. package/dist/profiles/cel/celExpression.cjs.map +1 -1
  475. package/dist/profiles/cel/celExpression.d.ts +2 -38
  476. package/dist/profiles/cel/celExpression.d.ts.map +1 -1
  477. package/dist/profiles/cel/celExpression.js +2 -58
  478. package/dist/profiles/cel/celExpression.js.map +1 -1
  479. package/dist/profiles/cel/celPlayground.cjs +122 -0
  480. package/dist/profiles/cel/celPlayground.cjs.map +1 -0
  481. package/dist/profiles/cel/celPlayground.d.ts +43 -0
  482. package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
  483. package/dist/profiles/cel/celPlayground.js +118 -0
  484. package/dist/profiles/cel/celPlayground.js.map +1 -0
  485. package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
  486. package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
  487. package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
  488. package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
  489. package/dist/profiles/connections/connectionBrowserModel.js +2 -2
  490. package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
  491. package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
  492. package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
  493. package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
  494. package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
  495. package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
  496. package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
  497. package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
  498. package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
  499. package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
  500. package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
  501. package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
  502. package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
  503. package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
  504. package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
  505. package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
  506. package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
  507. package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
  508. package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
  509. package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
  510. package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
  511. package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
  512. package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
  513. package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
  514. package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
  515. package/dist/profiles/editor/profileEditor.cjs +106 -37
  516. package/dist/profiles/editor/profileEditor.cjs.map +1 -1
  517. package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
  518. package/dist/profiles/editor/profileEditor.js +107 -38
  519. package/dist/profiles/editor/profileEditor.js.map +1 -1
  520. package/dist/profiles/editor/profileEditorModel.cjs +65 -19
  521. package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
  522. package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
  523. package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
  524. package/dist/profiles/editor/profileEditorModel.js +64 -18
  525. package/dist/profiles/editor/profileEditorModel.js.map +1 -1
  526. package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
  527. package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
  528. package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
  529. package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
  530. package/dist/profiles/editor/profileEditorPreview.js +129 -29
  531. package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
  532. package/dist/profiles/editor/profileEditorSections.cjs +137 -88
  533. package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
  534. package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
  535. package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
  536. package/dist/profiles/editor/profileEditorSections.js +138 -90
  537. package/dist/profiles/editor/profileEditorSections.js.map +1 -1
  538. package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
  539. package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
  540. package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
  541. package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
  542. package/dist/profiles/editor/profileMappingPreview.js +23 -7
  543. package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
  544. package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
  545. package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
  546. package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
  547. package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
  548. package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
  549. package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
  550. package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
  551. package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
  552. package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
  553. package/dist/profiles/editor/profileSourceExtensions.js +70 -0
  554. package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
  555. package/dist/profiles/editor/samplePaths.cjs +54 -0
  556. package/dist/profiles/editor/samplePaths.cjs.map +1 -0
  557. package/dist/profiles/editor/samplePaths.d.ts +27 -0
  558. package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
  559. package/dist/profiles/editor/samplePaths.js +53 -0
  560. package/dist/profiles/editor/samplePaths.js.map +1 -0
  561. package/dist/profiles/editor/testSchema.d.ts.map +1 -1
  562. package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
  563. package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
  564. package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
  565. package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
  566. package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
  567. package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
  568. package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
  569. package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
  570. package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
  571. package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
  572. package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
  573. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
  574. package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
  575. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
  576. package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
  577. package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
  578. package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
  579. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
  580. package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
  581. package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
  582. package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
  583. package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
  584. package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
  585. package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
  586. package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
  587. package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
  588. package/dist/profiles/fields/profileFieldControls.cjs +3 -2
  589. package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
  590. package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
  591. package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
  592. package/dist/profiles/fields/profileFieldControls.js +3 -2
  593. package/dist/profiles/fields/profileFieldControls.js.map +1 -1
  594. package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
  595. package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
  596. package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
  597. package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
  598. package/dist/profiles/fields/profileFieldEditor.js +99 -186
  599. package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
  600. package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
  601. package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
  602. package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
  603. package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
  604. package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
  605. package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
  606. package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
  607. package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
  608. package/dist/profiles/fields/profileFieldIcons.js +2 -0
  609. package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
  610. package/dist/profiles/fields/profileFieldList.cjs +23 -1
  611. package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
  612. package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
  613. package/dist/profiles/fields/profileFieldList.js +23 -1
  614. package/dist/profiles/fields/profileFieldList.js.map +1 -1
  615. package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
  616. package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
  617. package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
  618. package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
  619. package/dist/profiles/fields/profileFieldPreview.js +110 -0
  620. package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
  621. package/dist/profiles/fields/profileFieldSample.cjs +182 -0
  622. package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
  623. package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
  624. package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
  625. package/dist/profiles/fields/profileFieldSample.js +180 -0
  626. package/dist/profiles/fields/profileFieldSample.js.map +1 -0
  627. package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
  628. package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
  629. package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
  630. package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
  631. package/dist/profiles/fields/profileFieldTypeField.js +104 -0
  632. package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
  633. package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
  634. package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
  635. package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
  636. package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
  637. package/dist/profiles/fields/profileFieldTypes.js +1 -0
  638. package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
  639. package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
  640. package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
  641. package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
  642. package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
  643. package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
  644. package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
  645. package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
  646. package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
  647. package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
  648. package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
  649. package/dist/profiles/fields/profileFieldValueMode.js +59 -0
  650. package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
  651. package/dist/profiles/processor/processorConfig.cjs +79 -79
  652. package/dist/profiles/processor/processorConfig.cjs.map +1 -1
  653. package/dist/profiles/processor/processorConfig.d.ts +30 -3
  654. package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
  655. package/dist/profiles/processor/processorConfig.js +78 -78
  656. package/dist/profiles/processor/processorConfig.js.map +1 -1
  657. package/dist/profiles/processor/processorPipeline.cjs +8 -6
  658. package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
  659. package/dist/profiles/processor/processorPipeline.d.ts +3 -3
  660. package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
  661. package/dist/profiles/processor/processorPipeline.js +9 -7
  662. package/dist/profiles/processor/processorPipeline.js.map +1 -1
  663. package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
  664. package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
  665. package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
  666. package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
  667. package/dist/profiles/processor/processorPipelineEditor.js +39 -95
  668. package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
  669. package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
  670. package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
  671. package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
  672. package/dist/profiles/processor/processorPipelineExtension.js +3 -2
  673. package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
  674. package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
  675. package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
  676. package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
  677. package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
  678. package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
  679. package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
  680. package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
  681. package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
  682. package/dist/profiles/wizard/profileWizardModel.js +10 -1
  683. package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
  684. package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
  685. package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
  686. package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
  687. package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
  688. package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
  689. package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
  690. package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
  691. package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
  692. package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
  693. package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
  694. package/dist/profiles/wizard/useProfileInspection.js +39 -0
  695. package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
  696. package/dist/profiles.cjs +9 -11
  697. package/dist/profiles.js +8 -8
  698. package/dist/rpc/EntityExplorerApp.cjs +7 -3
  699. package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
  700. package/dist/rpc/EntityExplorerApp.d.ts +16 -1
  701. package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
  702. package/dist/rpc/EntityExplorerApp.js +7 -3
  703. package/dist/rpc/EntityExplorerApp.js.map +1 -1
  704. package/dist/rpc/InlineError.cjs +30 -10
  705. package/dist/rpc/InlineError.cjs.map +1 -1
  706. package/dist/rpc/InlineError.d.ts +10 -1
  707. package/dist/rpc/InlineError.d.ts.map +1 -1
  708. package/dist/rpc/InlineError.js +30 -10
  709. package/dist/rpc/InlineError.js.map +1 -1
  710. package/dist/rpc/SchemaActionForm.cjs +9 -6
  711. package/dist/rpc/SchemaActionForm.cjs.map +1 -1
  712. package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
  713. package/dist/rpc/SchemaActionForm.js +9 -6
  714. package/dist/rpc/SchemaActionForm.js.map +1 -1
  715. package/dist/rpc/SessionHeader.cjs +3 -3
  716. package/dist/rpc/SessionHeader.cjs.map +1 -1
  717. package/dist/rpc/SessionHeader.d.ts.map +1 -1
  718. package/dist/rpc/SessionHeader.js +3 -3
  719. package/dist/rpc/SessionHeader.js.map +1 -1
  720. package/dist/rpc/formMetadata.cjs +2 -6
  721. package/dist/rpc/formMetadata.cjs.map +1 -1
  722. package/dist/rpc/formMetadata.d.ts.map +1 -1
  723. package/dist/rpc/formMetadata.js +1 -5
  724. package/dist/rpc/formMetadata.js.map +1 -1
  725. package/dist/rpc/surfaceNav.cjs +5 -0
  726. package/dist/rpc/surfaceNav.cjs.map +1 -1
  727. package/dist/rpc/surfaceNav.d.ts.map +1 -1
  728. package/dist/rpc/surfaceNav.js +5 -0
  729. package/dist/rpc/surfaceNav.js.map +1 -1
  730. package/dist/runtime/barrels.json +4982 -4979
  731. package/dist/runtime/importmap.json +2168 -2146
  732. package/dist/styles.css +1 -1
  733. package/package.json +1 -1
  734. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
  735. package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
  736. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
  737. package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
  738. package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
  739. package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
  740. package/dist/profiles/cel/celEditorResults.cjs +0 -158
  741. package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
  742. package/dist/profiles/cel/celEditorResults.d.ts +0 -37
  743. package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
  744. package/dist/profiles/cel/celEditorResults.js +0 -156
  745. package/dist/profiles/cel/celEditorResults.js.map +0 -1
@@ -0,0 +1,111 @@
1
+ const require_FilterBar = require("../../components/FilterBar.cjs");
2
+ const require_Icon = require("../../data/Icon.cjs");
3
+ const require_data_table_server_filters = require("../../data/data-table-server-filters.cjs");
4
+ const require_jsonPathSample = require("../query/jsonPathSample.cjs");
5
+ const require_profileWizardModel = require("../wizard/profileWizardModel.cjs");
6
+ const require_profileFieldIcons = require("./profileFieldIcons.cjs");
7
+ const require_profileFieldSample = require("./profileFieldSample.cjs");
8
+ let react = require("react");
9
+ let react_jsx_runtime = require("react/jsx-runtime");
10
+ // src/profiles/fields/profileFieldPreview.tsx
11
+ var PREVIEW_FILTER_KEY = "preview";
12
+ /**
13
+ * The field's value as the sample holds it, or why the sample holds none.
14
+ *
15
+ * It sits with the value source it previews. The filter control the field would
16
+ * offer is previewed where the filter is configured (ProfileFieldFilterPreview),
17
+ * and how the value renders as a table cell where the data type is chosen
18
+ * (ProfileFieldTypeField).
19
+ */
20
+ function ProfileFieldPreview({ field, columns }) {
21
+ const rows = require_jsonPathSample.useJsonPathSampleRows();
22
+ const sample = (0, react.useMemo)(() => require_profileFieldSample.sampleFieldValue(rows, field), [rows, field]);
23
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
24
+ "aria-label": "Preview",
25
+ className: `grid gap-3 rounded-md border bg-muted/20 p-3 ${columns === 2 ? "sm:col-span-2" : ""}`,
26
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
27
+ className: "text-sm font-medium",
28
+ children: "Preview"
29
+ }), sample.status === "none" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
30
+ className: "text-xs text-muted-foreground",
31
+ children: sample.message
32
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
33
+ className: "min-w-0 break-words font-mono text-xs",
34
+ children: typeof sample.value === "string" ? sample.value : JSON.stringify(sample.value)
35
+ })]
36
+ });
37
+ }
38
+ /**
39
+ * What the field would offer as a filter for the values the sample holds, shown
40
+ * below the filter's options. Absent when filtering is off, and until the sample
41
+ * holds a value to build the control from (the Preview above says why not).
42
+ *
43
+ * The control is the FilterBar one the results table builds from the same column
44
+ * description, not a mock of it.
45
+ */
46
+ function ProfileFieldFilterPreview({ field }) {
47
+ const rows = require_jsonPathSample.useJsonPathSampleRows();
48
+ const sample = (0, react.useMemo)(() => require_profileFieldSample.sampleFieldValue(rows, field), [rows, field]);
49
+ const filter = field.filter ?? {};
50
+ const kind = filter.disabled ? "none" : filter.kind ?? require_profileWizardModel.inferredFilterKind(field);
51
+ if (sample.status === "none" || kind === "none") return null;
52
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FilterPreview, {
53
+ field,
54
+ rows,
55
+ kind
56
+ });
57
+ }
58
+ function FilterPreview({ field, rows, kind }) {
59
+ const [selection, setSelection] = (0, react.useState)({});
60
+ const label = require_profileWizardModel.PROFILE_FILTER_KIND_OPTIONS.find((option) => option.value === kind)?.label ?? kind;
61
+ const config = (0, react.useMemo)(() => require_data_table_server_filters.serverFiltersToFilterBar([previewFilterColumn(field, rows, kind)], selection, setSelection), [
62
+ field,
63
+ kind,
64
+ rows,
65
+ selection
66
+ ]);
67
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
68
+ role: "group",
69
+ "aria-label": "Filter preview",
70
+ className: "grid gap-1.5",
71
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
72
+ className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground",
73
+ children: [
74
+ "Filter preview",
75
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.LabelIcon, {
76
+ icon: require_profileFieldIcons.profileFilterKindIcon(kind),
77
+ className: "text-[14px]"
78
+ }),
79
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })
80
+ ]
81
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FilterBar.FilterBar, {
82
+ filters: config.filters,
83
+ ...config.timeRange ? { timeRange: config.timeRange } : {},
84
+ overflowMode: "wrap",
85
+ className: "rounded-md border bg-background px-2"
86
+ })]
87
+ });
88
+ }
89
+ function previewFilterColumn(field, rows, kind) {
90
+ const values = require_profileFieldSample.sampledValues(rows, field);
91
+ const numbers = values.filter((value) => typeof value === "number");
92
+ const filter = {
93
+ kind: kind === "match" ? "terms" : kind,
94
+ ...field.filter?.options ? { options: field.filter.options.map((value) => ({ value })) } : { options: [...new Set(values.map(String))].slice(0, field.filter?.limit ?? 50).map((value) => ({ value })) },
95
+ ...numbers.length > 0 ? {
96
+ min: Math.min(...numbers),
97
+ max: Math.max(...numbers)
98
+ } : {},
99
+ ...field.unit === "s" ? { unit: "s" } : {}
100
+ };
101
+ return {
102
+ name: field.name,
103
+ label: field.label ?? field.name,
104
+ filterKey: PREVIEW_FILTER_KEY,
105
+ filter
106
+ };
107
+ }
108
+ exports.ProfileFieldFilterPreview = ProfileFieldFilterPreview;
109
+ exports.ProfileFieldPreview = ProfileFieldPreview;
110
+
111
+ //# sourceMappingURL=profileFieldPreview.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileFieldPreview.cjs","names":["useJsonPathSampleRows","useMemo","sampleFieldValue","inferredFilterKind","useState","PROFILE_FILTER_KIND_OPTIONS","serverFiltersToFilterBar","LabelIcon","profileFilterKindIcon","FilterBar","sampledValues"],"sources":["../../../src/profiles/fields/profileFieldPreview.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { FilterBar } from \"../../components/FilterBar\";\nimport { LabelIcon } from \"../../data/Icon\";\nimport {\n serverFiltersToFilterBar,\n type DataTableColumnFilter,\n type DataTableFilterKind,\n type DataTableServerColumn,\n} from \"../../data/data-table-server-filters\";\nimport type { DataTableFilterSelection } from \"../../data/data-table-filter-values\";\nimport { useJsonPathSampleRows } from \"../query/jsonPathSample\";\nimport {\n inferredFilterKind,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n type ProfileColumn,\n} from \"../wizard/profileWizardModel\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport { sampleFieldValue, sampledValues } from \"./profileFieldSample\";\n\nconst PREVIEW_FILTER_KEY = \"preview\";\n\n/**\n * The field's value as the sample holds it, or why the sample holds none.\n *\n * It sits with the value source it previews. The filter control the field would\n * offer is previewed where the filter is configured (ProfileFieldFilterPreview),\n * and how the value renders as a table cell where the data type is chosen\n * (ProfileFieldTypeField).\n */\nexport function ProfileFieldPreview({\n field,\n columns,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n}) {\n const rows = useJsonPathSampleRows();\n const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);\n\n return (\n <section\n aria-label=\"Preview\"\n className={`grid gap-3 rounded-md border bg-muted/20 p-3 ${columns === 2 ? \"sm:col-span-2\" : \"\"}`}\n >\n <p className=\"text-sm font-medium\">Preview</p>\n {sample.status === \"none\" ? (\n <p className=\"text-xs text-muted-foreground\">{sample.message}</p>\n ) : (\n <p className=\"min-w-0 break-words font-mono text-xs\">\n {typeof sample.value === \"string\" ? sample.value : JSON.stringify(sample.value)}\n </p>\n )}\n </section>\n );\n}\n\n/**\n * What the field would offer as a filter for the values the sample holds, shown\n * below the filter's options. Absent when filtering is off, and until the sample\n * holds a value to build the control from (the Preview above says why not).\n *\n * The control is the FilterBar one the results table builds from the same column\n * description, not a mock of it.\n */\nexport function ProfileFieldFilterPreview({ field }: { field: ProfileColumn }) {\n const rows = useJsonPathSampleRows();\n const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);\n const filter = field.filter ?? {};\n const kind = filter.disabled ? \"none\" : (filter.kind ?? inferredFilterKind(field));\n if (sample.status === \"none\" || kind === \"none\") return null;\n return <FilterPreview field={field} rows={rows} kind={kind} />;\n}\n\nfunction FilterPreview({\n field,\n rows,\n kind,\n}: {\n field: ProfileColumn;\n rows: unknown[];\n kind: string;\n}) {\n const [selection, setSelection] = useState<DataTableFilterSelection>({});\n const label = PROFILE_FILTER_KIND_OPTIONS.find((option) => option.value === kind)?.label ?? kind;\n const config = useMemo(\n () =>\n serverFiltersToFilterBar(\n [previewFilterColumn(field, rows, kind)],\n selection,\n setSelection,\n ),\n [field, kind, rows, selection],\n );\n\n return (\n <div role=\"group\" aria-label=\"Filter preview\" className=\"grid gap-1.5\">\n <span className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n Filter preview\n <LabelIcon\n icon={profileFilterKindIcon(kind)}\n className=\"text-[14px]\"\n />\n <span>{label}</span>\n </span>\n <FilterBar\n filters={config.filters}\n {...(config.timeRange ? { timeRange: config.timeRange } : {})}\n overflowMode=\"wrap\"\n className=\"rounded-md border bg-background px-2\"\n />\n </div>\n );\n}\n\nfunction previewFilterColumn(\n field: ProfileColumn,\n rows: unknown[],\n kind: string,\n): DataTableServerColumn {\n const values = sampledValues(rows, field);\n const numbers = values.filter(\n (value): value is number => typeof value === \"number\",\n );\n const filter: DataTableColumnFilter = {\n // \"match\" is a pattern list the server compiles; the control is the same\n // value list as \"terms\".\n kind: (kind === \"match\" ? \"terms\" : kind) as DataTableFilterKind,\n ...(field.filter?.options\n ? { options: field.filter.options.map((value) => ({ value })) }\n : {\n options: [...new Set(values.map(String))]\n .slice(0, field.filter?.limit ?? PROFILE_FILTER_DEFAULT_LIMIT)\n .map((value) => ({ value })),\n }),\n ...(numbers.length > 0\n ? { min: Math.min(...numbers), max: Math.max(...numbers) }\n : {}),\n ...(field.unit === \"s\" ? { unit: \"s\" } : {}),\n };\n return {\n name: field.name,\n label: field.label ?? field.name,\n filterKey: PREVIEW_FILTER_KEY,\n filter,\n };\n}\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,qBAAqB;;;;;;;;;AAU3B,SAAgB,oBAAoB,EAClC,OACA,WAIC;CACD,MA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K,IAAI,GAAG,OAAO;EAAE,IACvD,CAAC;EACL,GAAI,MAAM,SAAS,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC;CAC5C;CACA,OAAO;EACL,MAAM,MAAM;EACZ,OAAO,MAAM,SAAS,MAAM;EAC5B,WAAW;EACX;CACF;AACF"}
@@ -0,0 +1,25 @@
1
+ import { ProfileColumn } from '../wizard/profileWizardModel.js';
2
+ /**
3
+ * The field's value as the sample holds it, or why the sample holds none.
4
+ *
5
+ * It sits with the value source it previews. The filter control the field would
6
+ * offer is previewed where the filter is configured (ProfileFieldFilterPreview),
7
+ * and how the value renders as a table cell where the data type is chosen
8
+ * (ProfileFieldTypeField).
9
+ */
10
+ export declare function ProfileFieldPreview({ field, columns, }: {
11
+ field: ProfileColumn;
12
+ columns: 1 | 2;
13
+ }): import("react").JSX.Element;
14
+ /**
15
+ * What the field would offer as a filter for the values the sample holds, shown
16
+ * below the filter's options. Absent when filtering is off, and until the sample
17
+ * holds a value to build the control from (the Preview above says why not).
18
+ *
19
+ * The control is the FilterBar one the results table builds from the same column
20
+ * description, not a mock of it.
21
+ */
22
+ export declare function ProfileFieldFilterPreview({ field }: {
23
+ field: ProfileColumn;
24
+ }): import("react").JSX.Element | null;
25
+ //# sourceMappingURL=profileFieldPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileFieldPreview.d.ts","sourceRoot":"","sources":["../../../src/profiles/fields/profileFieldPreview.tsx"],"names":[],"mappings":"AAWA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,8BAA8B,CAAC;AAMtC;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,OAAO,GACR,EAAE;IACD,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;CAChB,+BAmBA;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,CAAA;CAAE,sCAO5E"}
@@ -0,0 +1,110 @@
1
+ import { FilterBar } from "../../components/FilterBar.js";
2
+ import { LabelIcon } from "../../data/Icon.js";
3
+ import { serverFiltersToFilterBar } from "../../data/data-table-server-filters.js";
4
+ import { useJsonPathSampleRows } from "../query/jsonPathSample.js";
5
+ import { PROFILE_FILTER_KIND_OPTIONS, inferredFilterKind } from "../wizard/profileWizardModel.js";
6
+ import { profileFilterKindIcon } from "./profileFieldIcons.js";
7
+ import { sampleFieldValue, sampledValues } from "./profileFieldSample.js";
8
+ import { useMemo, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ // src/profiles/fields/profileFieldPreview.tsx
11
+ var PREVIEW_FILTER_KEY = "preview";
12
+ /**
13
+ * The field's value as the sample holds it, or why the sample holds none.
14
+ *
15
+ * It sits with the value source it previews. The filter control the field would
16
+ * offer is previewed where the filter is configured (ProfileFieldFilterPreview),
17
+ * and how the value renders as a table cell where the data type is chosen
18
+ * (ProfileFieldTypeField).
19
+ */
20
+ function ProfileFieldPreview({ field, columns }) {
21
+ const rows = useJsonPathSampleRows();
22
+ const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);
23
+ return /* @__PURE__ */ jsxs("section", {
24
+ "aria-label": "Preview",
25
+ className: `grid gap-3 rounded-md border bg-muted/20 p-3 ${columns === 2 ? "sm:col-span-2" : ""}`,
26
+ children: [/* @__PURE__ */ jsx("p", {
27
+ className: "text-sm font-medium",
28
+ children: "Preview"
29
+ }), sample.status === "none" ? /* @__PURE__ */ jsx("p", {
30
+ className: "text-xs text-muted-foreground",
31
+ children: sample.message
32
+ }) : /* @__PURE__ */ jsx("p", {
33
+ className: "min-w-0 break-words font-mono text-xs",
34
+ children: typeof sample.value === "string" ? sample.value : JSON.stringify(sample.value)
35
+ })]
36
+ });
37
+ }
38
+ /**
39
+ * What the field would offer as a filter for the values the sample holds, shown
40
+ * below the filter's options. Absent when filtering is off, and until the sample
41
+ * holds a value to build the control from (the Preview above says why not).
42
+ *
43
+ * The control is the FilterBar one the results table builds from the same column
44
+ * description, not a mock of it.
45
+ */
46
+ function ProfileFieldFilterPreview({ field }) {
47
+ const rows = useJsonPathSampleRows();
48
+ const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);
49
+ const filter = field.filter ?? {};
50
+ const kind = filter.disabled ? "none" : filter.kind ?? inferredFilterKind(field);
51
+ if (sample.status === "none" || kind === "none") return null;
52
+ return /* @__PURE__ */ jsx(FilterPreview, {
53
+ field,
54
+ rows,
55
+ kind
56
+ });
57
+ }
58
+ function FilterPreview({ field, rows, kind }) {
59
+ const [selection, setSelection] = useState({});
60
+ const label = PROFILE_FILTER_KIND_OPTIONS.find((option) => option.value === kind)?.label ?? kind;
61
+ const config = useMemo(() => serverFiltersToFilterBar([previewFilterColumn(field, rows, kind)], selection, setSelection), [
62
+ field,
63
+ kind,
64
+ rows,
65
+ selection
66
+ ]);
67
+ return /* @__PURE__ */ jsxs("div", {
68
+ role: "group",
69
+ "aria-label": "Filter preview",
70
+ className: "grid gap-1.5",
71
+ children: [/* @__PURE__ */ jsxs("span", {
72
+ className: "flex items-center gap-1.5 text-xs font-medium text-muted-foreground",
73
+ children: [
74
+ "Filter preview",
75
+ /* @__PURE__ */ jsx(LabelIcon, {
76
+ icon: profileFilterKindIcon(kind),
77
+ className: "text-[14px]"
78
+ }),
79
+ /* @__PURE__ */ jsx("span", { children: label })
80
+ ]
81
+ }), /* @__PURE__ */ jsx(FilterBar, {
82
+ filters: config.filters,
83
+ ...config.timeRange ? { timeRange: config.timeRange } : {},
84
+ overflowMode: "wrap",
85
+ className: "rounded-md border bg-background px-2"
86
+ })]
87
+ });
88
+ }
89
+ function previewFilterColumn(field, rows, kind) {
90
+ const values = sampledValues(rows, field);
91
+ const numbers = values.filter((value) => typeof value === "number");
92
+ const filter = {
93
+ kind: kind === "match" ? "terms" : kind,
94
+ ...field.filter?.options ? { options: field.filter.options.map((value) => ({ value })) } : { options: [...new Set(values.map(String))].slice(0, field.filter?.limit ?? 50).map((value) => ({ value })) },
95
+ ...numbers.length > 0 ? {
96
+ min: Math.min(...numbers),
97
+ max: Math.max(...numbers)
98
+ } : {},
99
+ ...field.unit === "s" ? { unit: "s" } : {}
100
+ };
101
+ return {
102
+ name: field.name,
103
+ label: field.label ?? field.name,
104
+ filterKey: PREVIEW_FILTER_KEY,
105
+ filter
106
+ };
107
+ }
108
+ export { ProfileFieldFilterPreview, ProfileFieldPreview };
109
+
110
+ //# sourceMappingURL=profileFieldPreview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileFieldPreview.js","names":[],"sources":["../../../src/profiles/fields/profileFieldPreview.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { FilterBar } from \"../../components/FilterBar\";\nimport { LabelIcon } from \"../../data/Icon\";\nimport {\n serverFiltersToFilterBar,\n type DataTableColumnFilter,\n type DataTableFilterKind,\n type DataTableServerColumn,\n} from \"../../data/data-table-server-filters\";\nimport type { DataTableFilterSelection } from \"../../data/data-table-filter-values\";\nimport { useJsonPathSampleRows } from \"../query/jsonPathSample\";\nimport {\n inferredFilterKind,\n PROFILE_FILTER_DEFAULT_LIMIT,\n PROFILE_FILTER_KIND_OPTIONS,\n type ProfileColumn,\n} from \"../wizard/profileWizardModel\";\nimport { profileFilterKindIcon } from \"./profileFieldIcons\";\nimport { sampleFieldValue, sampledValues } from \"./profileFieldSample\";\n\nconst PREVIEW_FILTER_KEY = \"preview\";\n\n/**\n * The field's value as the sample holds it, or why the sample holds none.\n *\n * It sits with the value source it previews. The filter control the field would\n * offer is previewed where the filter is configured (ProfileFieldFilterPreview),\n * and how the value renders as a table cell where the data type is chosen\n * (ProfileFieldTypeField).\n */\nexport function ProfileFieldPreview({\n field,\n columns,\n}: {\n field: ProfileColumn;\n columns: 1 | 2;\n}) {\n const rows = useJsonPathSampleRows();\n const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);\n\n return (\n <section\n aria-label=\"Preview\"\n className={`grid gap-3 rounded-md border bg-muted/20 p-3 ${columns === 2 ? \"sm:col-span-2\" : \"\"}`}\n >\n <p className=\"text-sm font-medium\">Preview</p>\n {sample.status === \"none\" ? (\n <p className=\"text-xs text-muted-foreground\">{sample.message}</p>\n ) : (\n <p className=\"min-w-0 break-words font-mono text-xs\">\n {typeof sample.value === \"string\" ? sample.value : JSON.stringify(sample.value)}\n </p>\n )}\n </section>\n );\n}\n\n/**\n * What the field would offer as a filter for the values the sample holds, shown\n * below the filter's options. Absent when filtering is off, and until the sample\n * holds a value to build the control from (the Preview above says why not).\n *\n * The control is the FilterBar one the results table builds from the same column\n * description, not a mock of it.\n */\nexport function ProfileFieldFilterPreview({ field }: { field: ProfileColumn }) {\n const rows = useJsonPathSampleRows();\n const sample = useMemo(() => sampleFieldValue(rows, field), [rows, field]);\n const filter = field.filter ?? {};\n const kind = filter.disabled ? \"none\" : (filter.kind ?? inferredFilterKind(field));\n if (sample.status === \"none\" || kind === \"none\") return null;\n return <FilterPreview field={field} rows={rows} kind={kind} />;\n}\n\nfunction FilterPreview({\n field,\n rows,\n kind,\n}: {\n field: ProfileColumn;\n rows: unknown[];\n kind: string;\n}) {\n const [selection, setSelection] = useState<DataTableFilterSelection>({});\n const label = PROFILE_FILTER_KIND_OPTIONS.find((option) => option.value === kind)?.label ?? kind;\n const config = useMemo(\n () =>\n serverFiltersToFilterBar(\n [previewFilterColumn(field, rows, kind)],\n selection,\n setSelection,\n ),\n [field, kind, rows, selection],\n );\n\n return (\n <div role=\"group\" aria-label=\"Filter preview\" className=\"grid gap-1.5\">\n <span className=\"flex items-center gap-1.5 text-xs font-medium text-muted-foreground\">\n Filter preview\n <LabelIcon\n icon={profileFilterKindIcon(kind)}\n className=\"text-[14px]\"\n />\n <span>{label}</span>\n </span>\n <FilterBar\n filters={config.filters}\n {...(config.timeRange ? { timeRange: config.timeRange } : {})}\n overflowMode=\"wrap\"\n className=\"rounded-md border bg-background px-2\"\n />\n </div>\n );\n}\n\nfunction previewFilterColumn(\n field: ProfileColumn,\n rows: unknown[],\n kind: string,\n): DataTableServerColumn {\n const values = sampledValues(rows, field);\n const numbers = values.filter(\n (value): value is number => typeof value === \"number\",\n );\n const filter: DataTableColumnFilter = {\n // \"match\" is a pattern list the server compiles; the control is the same\n // value list as \"terms\".\n kind: (kind === \"match\" ? \"terms\" : kind) as DataTableFilterKind,\n ...(field.filter?.options\n ? { options: field.filter.options.map((value) => ({ value })) }\n : {\n options: [...new Set(values.map(String))]\n .slice(0, field.filter?.limit ?? PROFILE_FILTER_DEFAULT_LIMIT)\n .map((value) => ({ value })),\n }),\n ...(numbers.length > 0\n ? { min: Math.min(...numbers), max: Math.max(...numbers) }\n : {}),\n ...(field.unit === \"s\" ? { unit: \"s\" } : {}),\n };\n return {\n name: field.name,\n label: field.label ?? field.name,\n filterKey: PREVIEW_FILTER_KEY,\n filter,\n };\n}\n"],"mappings":";;;;;;;;;;AAoBA,IAAM,qBAAqB;;;;;;;;;AAU3B,SAAgB,oBAAoB,EAClC,OACA,WAIC;CACD,MAAM,OAAO,sBAAsB;CACnC,MAAM,SAAS,cAAc,iBAAiB,MAAM,KAAK,GAAG,CAAC,MAAM,KAAK,CAAC;CAEzE,OACE,qBAAC,WAAD;EACE,cAAW;EACX,WAAW,gDAAgD,YAAY,IAAI,kBAAkB;EAF/F,UAAA,CAIE,oBAAC,KAAD;GAAG,WAAU;GAAsB,UAAA;EAAU,CAAA,GAC5C,OAAO,WAAW,SACjB,oBAAC,KAAD;GAAG,WAAU;GAAiC,UAAA,OAAO;EAAW,CAAA,IAEhE,oBAAC,KAAD;GAAG,WAAU;GACV,UAAA,OAAO,OAAO,UAAU,WAAW,OAAO,QAAQ,KAAK,UAAU,OAAO,KAAK;EAC7E,CAAA,CAEE;;AAEb;;;;;;;;;AAUA,SAAgB,0BAA0B,EAAE,SAAmC;CAC7E,MAAM,OAAO,sBAAsB;CACnC,MAAM,SAAS,cAAc,iBAAiB,MAAM,KAAK,GAAG,CAAC,MAAM,KAAK,CAA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AAM,CAAC,CAAC,CAAC,CACtC,MAAM,GAAG,MAAM,QAAQ,SAAA,EAAqC,CAAC,CAC7D,KAAK,WAAW,EAAE,MAAM,EAAE,EAC/B;EACJ,GAAI,QAAQ,SAAS,IACjB;GAAE,KAAK,KAAK,IAAI,GAAG,OAAO;GAAG,KAAK,KAAK,IAAI,GAAG,OAAO;EAAE,IACvD,CAAC;EACL,GAAI,MAAM,SAAS,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC;CAC5C;CACA,OAAO;EACL,MAAM,MAAM;EACZ,OAAO,MAAM,SAAS,MAAM;EAC5B,WAAW;EACX;CACF;AACF"}
@@ -0,0 +1,182 @@
1
+ const require_connectionBrowserModel = require("../connections/connectionBrowserModel.cjs");
2
+ const require_samplePaths = require("../editor/samplePaths.cjs");
3
+ const require_profileApi = require("../profileApi.cjs");
4
+ let react = require("react");
5
+ // src/profiles/fields/profileFieldSample.ts
6
+ /** The key the sampled value travels under in the mapping request, so the type
7
+ * column reads it through `source`. */
8
+ var SAMPLE_KEY = "value";
9
+ /** The first sampled value for the field, by output name and then by source. */
10
+ function sampleFieldValue(rows, field) {
11
+ if (rows.length === 0) return {
12
+ status: "none",
13
+ message: "Run a sample to preview this field."
14
+ };
15
+ const [value] = sampledValues(rows, field);
16
+ if (value === void 0) return {
17
+ status: "none",
18
+ message: `The sample has no value for ${field.name || "this field"}: ${explainMissingValue(rows, field)}`
19
+ };
20
+ return {
21
+ status: "found",
22
+ value
23
+ };
24
+ }
25
+ /** Each sampled row's non-empty value for the field, by output name and then by
26
+ * source. A path is read the way the query engine resolves a column's source
27
+ * (lookupSamplePath): a literal key wins over splitting, so a dotted key inside
28
+ * an unwrapped object is reached as well as a nested document. */
29
+ function sampledValues(rows, field) {
30
+ const keys = [field.name, field.source].filter((key) => Boolean(key));
31
+ return rows.flatMap((row) => {
32
+ for (const key of keys) {
33
+ const found = require_samplePaths.lookupSamplePath(row, key);
34
+ if (found.found && found.value !== null && found.value !== void 0 && found.value !== "") return [found.value];
35
+ }
36
+ return [];
37
+ });
38
+ }
39
+ var LISTED_KEYS = 8;
40
+ var isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
41
+ function isKeyValueList(value) {
42
+ return Array.isArray(value) && value.length > 0 && value.every((entry) => isRecord(entry) && typeof entry.key === "string");
43
+ }
44
+ function typeNoun(value) {
45
+ if (value === null) return "null";
46
+ if (Array.isArray(value)) return "a list";
47
+ return `a ${typeof value}`;
48
+ }
49
+ /** Why no sampled row has a value for the field, read from the path the profile
50
+ * actually uses (the source, else the output name): where the path stops and
51
+ * what is there instead. */
52
+ function explainMissingValue(rows, field) {
53
+ const path = field.source || field.name;
54
+ const count = rows.length;
55
+ const present = rows.filter((row) => require_samplePaths.lookupSamplePath(row, path).found).length;
56
+ if (present === count) return `it is empty in ${count === 1 ? "the 1 sampled row" : `all ${count} sampled rows`}.`;
57
+ if (present > 0) return `it is empty in the ${present} of ${count} sampled rows that carry ${path}, and absent from the rest.`;
58
+ const stop = deepestPrefix(rows, path);
59
+ if (!stop) return `the path ${path} matched nothing in ${count} sampled ${count === 1 ? "row" : "rows"}.`;
60
+ const { head, value } = stop;
61
+ const rest = path.slice(head.length + 1);
62
+ const cannotRead = `so ${rest} cannot be read from it`;
63
+ if (isKeyValueList(value)) return `${head} is a list of {key, value} entries, ${cannotRead}. Add an unwrap rule for ${head} (as key_values) to the provider options, then run the sample again.`;
64
+ if (typeof value === "string") {
65
+ const kind = encodedKind(value);
66
+ if (kind) return `${head} holds JSON text, ${cannotRead}. Add an unwrap rule for ${head} (as ${kind}) to the provider options, then run the sample again.`;
67
+ }
68
+ if (isRecord(value)) {
69
+ const keys = Object.keys(value);
70
+ if (keys.length === 0) return `${head} is an empty object.`;
71
+ return `${head} has no ${rest}. It has ${keys.slice(0, LISTED_KEYS).join(", ")}${keys.length > LISTED_KEYS ? ` and ${keys.length - LISTED_KEYS} more` : ""}.`;
72
+ }
73
+ return `${head} is ${typeNoun(value)}, ${cannotRead}.`;
74
+ }
75
+ /** JSON text decoding to an object or a list: the unwrap rule that would read it. */
76
+ function encodedKind(text) {
77
+ try {
78
+ const decoded = JSON.parse(text);
79
+ if (isKeyValueList(decoded)) return "key_values";
80
+ return typeof decoded === "object" && decoded !== null ? "json" : void 0;
81
+ } catch {
82
+ return;
83
+ }
84
+ }
85
+ /** The longest leading part of the path any row resolves, with what it holds. */
86
+ function deepestPrefix(rows, path) {
87
+ let best;
88
+ for (const row of rows) for (let dot = path.lastIndexOf("."); dot > 0; dot = path.lastIndexOf(".", dot - 1)) {
89
+ const head = path.slice(0, dot);
90
+ if (best && head.length <= best.head.length) break;
91
+ const found = require_samplePaths.lookupSamplePath(row, head);
92
+ if (found.found) {
93
+ best = {
94
+ head,
95
+ value: found.value
96
+ };
97
+ break;
98
+ }
99
+ }
100
+ return best;
101
+ }
102
+ /** The sampled value as one data type, rendered by the mapping endpoint. */
103
+ function useTypeCell({ type, value, format, unit }) {
104
+ const [state, setState] = (0, react.useState)({ status: "pending" });
105
+ const body = JSON.stringify({
106
+ profile: { columns: [{
107
+ name: type,
108
+ source: SAMPLE_KEY,
109
+ type,
110
+ ...format ? { format } : {},
111
+ ...unit ? { unit } : {}
112
+ }] },
113
+ rows: [{ [SAMPLE_KEY]: value }]
114
+ });
115
+ (0, react.useEffect)(() => {
116
+ const controller = new AbortController();
117
+ setState({ status: "pending" });
118
+ const timer = setTimeout(() => {
119
+ require_connectionBrowserModel.fetchJSON(require_profileApi.profileApiPath("profile/sample/mapping"), {
120
+ method: "POST",
121
+ headers: { "Content-Type": "application/json" },
122
+ body,
123
+ signal: controller.signal
124
+ }).then((result) => {
125
+ if (controller.signal.aborted) return;
126
+ try {
127
+ const document = cellDocument(result.document);
128
+ setState(isEmptyNode(document.node.rows?.[0]?.cells[type]) ? { status: "empty" } : {
129
+ status: "ready",
130
+ document
131
+ });
132
+ } catch (error) {
133
+ setState({
134
+ status: "error",
135
+ message: error instanceof Error ? error.message : String(error)
136
+ });
137
+ }
138
+ }, (error) => {
139
+ if (controller.signal.aborted) return;
140
+ setState({
141
+ status: "error",
142
+ message: error instanceof Error ? error.message : String(error)
143
+ });
144
+ });
145
+ }, 250);
146
+ return () => {
147
+ clearTimeout(timer);
148
+ controller.abort();
149
+ };
150
+ }, [body, type]);
151
+ return state;
152
+ }
153
+ /** A text node with no text anywhere in it: what the server returns when the
154
+ * value has nothing to show as that type. */
155
+ function isEmptyNode(node) {
156
+ if (!node) return true;
157
+ return node.kind === "text" && !node.text && !node.plain && (node.children ?? []).every(isEmptyNode);
158
+ }
159
+ /** The mapping response's one-cell table, still drawn by the table that would
160
+ * draw it. The option names the type, so the header is left unlabelled and
161
+ * unsortable rather than naming it a second time. */
162
+ function cellDocument(document) {
163
+ const table = document.node;
164
+ const column = table.columns?.[0];
165
+ if (table.kind !== "table" || !column || table.rows?.length !== 1) throw new Error("the mapping preview did not return a one-cell table");
166
+ return {
167
+ ...document,
168
+ node: {
169
+ ...table,
170
+ columns: [{
171
+ ...column,
172
+ label: "",
173
+ sortable: false
174
+ }]
175
+ }
176
+ };
177
+ }
178
+ exports.sampleFieldValue = sampleFieldValue;
179
+ exports.sampledValues = sampledValues;
180
+ exports.useTypeCell = useTypeCell;
181
+
182
+ //# sourceMappingURL=profileFieldSample.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileFieldSample.cjs","names":["lookupSamplePath","useState","profileApiPath"],"sources":["../../../src/profiles/fields/profileFieldSample.ts"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { ClickyDocument, ClickyNode } from \"../../data/Clicky\";\nimport { fetchJSON } from \"../connections/connectionBrowserModel\";\nimport { lookupSamplePath } from \"../editor/samplePaths\";\nimport { profileApiPath } from \"../profileApi\";\nimport type { ProfileColumn } from \"../wizard/profileWizardModel\";\n\n/** The key the sampled value travels under in the mapping request, so the type\n * column reads it through `source`. */\nconst SAMPLE_KEY = \"value\";\n\ntype MappingResponse = { document: ClickyDocument };\n\n/** One data type's answer for the sampled value. */\nexport type TypeCellState =\n | { status: \"pending\" }\n | { status: \"error\"; message: string }\n | { status: \"empty\" }\n | { status: \"ready\"; document: ClickyDocument };\n\n/** The first sampled value for the field, by output name and then by source. */\nexport function sampleFieldValue(\n rows: unknown[],\n field: ProfileColumn,\n): { status: \"found\"; value: unknown } | { status: \"none\"; message: string } {\n if (rows.length === 0) {\n return { status: \"none\", message: \"Run a sample to preview this field.\" };\n }\n const [value] = sampledValues(rows, field);\n if (value === undefined) {\n return {\n status: \"none\",\n message: `The sample has no value for ${field.name || \"this field\"}: ${explainMissingValue(rows, field)}`,\n };\n }\n return { status: \"found\", value };\n}\n\n/** Each sampled row's non-empty value for the field, by output name and then by\n * source. A path is read the way the query engine resolves a column's source\n * (lookupSamplePath): a literal key wins over splitting, so a dotted key inside\n * an unwrapped object is reached as well as a nested document. */\nexport function sampledValues(rows: unknown[], field: ProfileColumn): unknown[] {\n const keys = [field.name, field.source].filter((key): key is string =>\n Boolean(key),\n );\n return rows.flatMap((row) => {\n for (const key of keys) {\n const found = lookupSamplePath(row, key);\n if (found.found && found.value !== null && found.value !== undefined && found.value !== \"\") {\n return [found.value];\n }\n }\n return [];\n });\n}\n\nconst LISTED_KEYS = 8;\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\nfunction isKeyValueList(value: unknown): boolean {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every((entry) => isRecord(entry) && typeof entry.key === \"string\")\n );\n}\n\nfunction typeNoun(value: unknown): string {\n if (value === null) return \"null\";\n if (Array.isArray(value)) return \"a list\";\n return `a ${typeof value}`;\n}\n\n/** Why no sampled row has a value for the field, read from the path the profile\n * actually uses (the source, else the output name): where the path stops and\n * what is there instead. */\nfunction explainMissingValue(rows: unknown[], field: ProfileColumn): string {\n const path = field.source || field.name;\n const count = rows.length;\n const present = rows.filter((row) => lookupSamplePath(row, path).found).length;\n if (present === count) {\n return `it is empty in ${count === 1 ? \"the 1 sampled row\" : `all ${count} sampled rows`}.`;\n }\n if (present > 0) {\n return `it is empty in the ${present} of ${count} sampled rows that carry ${path}, and absent from the rest.`;\n }\n const stop = deepestPrefix(rows, path);\n if (!stop) {\n return `the path ${path} matched nothing in ${count} sampled ${count === 1 ? \"row\" : \"rows\"}.`;\n }\n const { head, value } = stop;\n const rest = path.slice(head.length + 1);\n const cannotRead = `so ${rest} cannot be read from it`;\n if (isKeyValueList(value)) {\n return `${head} is a list of {key, value} entries, ${cannotRead}. Add an unwrap rule for ${head} (as key_values) to the provider options, then run the sample again.`;\n }\n if (typeof value === \"string\") {\n const kind = encodedKind(value);\n if (kind) {\n return `${head} holds JSON text, ${cannotRead}. Add an unwrap rule for ${head} (as ${kind}) to the provider options, then run the sample again.`;\n }\n }\n if (isRecord(value)) {\n const keys = Object.keys(value);\n if (keys.length === 0) return `${head} is an empty object.`;\n const listed = keys.slice(0, LISTED_KEYS).join(\", \");\n const more = keys.length > LISTED_KEYS ? ` and ${keys.length - LISTED_KEYS} more` : \"\";\n return `${head} has no ${rest}. It has ${listed}${more}.`;\n }\n return `${head} is ${typeNoun(value)}, ${cannotRead}.`;\n}\n\n/** JSON text decoding to an object or a list: the unwrap rule that would read it. */\nfunction encodedKind(text: string): \"json\" | \"key_values\" | undefined {\n try {\n const decoded: unknown = JSON.parse(text);\n if (isKeyValueList(decoded)) return \"key_values\";\n return typeof decoded === \"object\" && decoded !== null ? \"json\" : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** The longest leading part of the path any row resolves, with what it holds. */\nfunction deepestPrefix(\n rows: unknown[],\n path: string,\n): { head: string; value: unknown } | undefined {\n let best: { head: string; value: unknown } | undefined;\n for (const row of rows) {\n for (let dot = path.lastIndexOf(\".\"); dot > 0; dot = path.lastIndexOf(\".\", dot - 1)) {\n const head = path.slice(0, dot);\n if (best && head.length <= best.head.length) break;\n const found = lookupSamplePath(row, head);\n if (found.found) {\n best = { head, value: found.value };\n break;\n }\n }\n }\n return best;\n}\n\n/** The sampled value as one data type, rendered by the mapping endpoint. */\nexport function useTypeCell({\n type,\n value,\n format,\n unit,\n}: {\n type: string;\n value: unknown;\n format?: string | undefined;\n unit?: string | undefined;\n}): TypeCellState {\n const [state, setState] = useState<TypeCellState>({ status: \"pending\" });\n const body = JSON.stringify({\n profile: {\n columns: [\n {\n name: type,\n source: SAMPLE_KEY,\n type,\n ...(format ? { format } : {}),\n ...(unit ? { unit } : {}),\n },\n ],\n },\n rows: [{ [SAMPLE_KEY]: value }],\n });\n\n useEffect(() => {\n const controller = new AbortController();\n setState({ status: \"pending\" });\n const timer = setTimeout(() => {\n fetchJSON<MappingResponse>(profileApiPath(\"profile/sample/mapping\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body,\n signal: controller.signal,\n }).then(\n (result) => {\n if (controller.signal.aborted) return;\n try {\n const document = cellDocument(result.document);\n setState(\n isEmptyNode(document.node.rows?.[0]?.cells[type])\n ? { status: \"empty\" }\n : { status: \"ready\", document },\n );\n } catch (error) {\n setState({\n status: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n (error: unknown) => {\n if (controller.signal.aborted) return;\n setState({\n status: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n },\n );\n }, 250);\n return () => {\n clearTimeout(timer);\n controller.abort();\n };\n }, [body, type]);\n\n return state;\n}\n\n/** A text node with no text anywhere in it: what the server returns when the\n * value has nothing to show as that type. */\nfunction isEmptyNode(node: ClickyNode | undefined): boolean {\n if (!node) return true;\n return (\n node.kind === \"text\" &&\n !node.text &&\n !node.plain &&\n (node.children ?? []).every(isEmptyNode)\n );\n}\n\n/** The mapping response's one-cell table, still drawn by the table that would\n * draw it. The option names the type, so the header is left unlabelled and\n * unsortable rather than naming it a second time. */\nfunction cellDocument(document: ClickyDocument): ClickyDocument {\n const table: ClickyNode = document.node;\n const column = table.columns?.[0];\n if (table.kind !== \"table\" || !column || table.rows?.length !== 1) {\n throw new Error(\"the mapping preview did not return a one-cell table\");\n }\n return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AO,EAAE,EAAE,MAAM,KAAK,IAC5C,EAAE,QAAQ,QAAQ,IAClB;MAAE,QAAQ;MAAS;KAAS,CAClC;IACF,SAAS,OAAO;KACd,SAAS;MACP,QAAQ;MACR,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;KAChE,CAAC;IACH;GACF,IACC,UAAmB;IAClB,IAAI,WAAW,OAAO,SAAS;IAC/B,SAAS;KACP,QAAQ;KACR,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAChE,CAAC;GACH,CACF;EACF,GAAG,GAAG;EACN,aAAa;GACX,aAAa,KAAK;GAClB,WAAW,MAAM;EACnB;CACF,GAAG,CAAC,MAAM,IAAI,CAAC;CAEf,OAAO;AACT;;;AAIA,SAAS,YAAY,MAAuC;CAC1D,IAAI,CAAC,MAAM,OAAO;CAClB,OACE,KAAK,SAAS,UACd,CAAC,KAAK,QACN,CAAC,KAAK,UACL,KAAK,YAAY,CAAC,EAAA,CAAG,MAAM,WAAW;AAE3C;;;;AAKA,SAAS,aAAa,UAA0C;CAC9D,MAAM,QAAoB,SAAS;CACnC,MAAM,SAAS,MAAM,UAAU;CAC/B,IAAI,MAAM,SAAS,WAAW,CAAC,UAAU,MAAM,MAAM,WAAW,GAC9D,MAAM,IAAI,MAAM,qDAAqD;CAEvE,OAAO;EACL,GAAG;EACH,MAAM;GAAE,GAAG;GAAO,SAAS,CAAC;IAAE,GAAG;IAAQ,OAAO;IAAI,UAAU;GAAM,CAAC;EAAE;CACzE;AACF"}
@@ -0,0 +1,35 @@
1
+ import { ClickyDocument } from '../../data/Clicky.js';
2
+ import { ProfileColumn } from '../wizard/profileWizardModel.js';
3
+ /** One data type's answer for the sampled value. */
4
+ export type TypeCellState = {
5
+ status: "pending";
6
+ } | {
7
+ status: "error";
8
+ message: string;
9
+ } | {
10
+ status: "empty";
11
+ } | {
12
+ status: "ready";
13
+ document: ClickyDocument;
14
+ };
15
+ /** The first sampled value for the field, by output name and then by source. */
16
+ export declare function sampleFieldValue(rows: unknown[], field: ProfileColumn): {
17
+ status: "found";
18
+ value: unknown;
19
+ } | {
20
+ status: "none";
21
+ message: string;
22
+ };
23
+ /** Each sampled row's non-empty value for the field, by output name and then by
24
+ * source. A path is read the way the query engine resolves a column's source
25
+ * (lookupSamplePath): a literal key wins over splitting, so a dotted key inside
26
+ * an unwrapped object is reached as well as a nested document. */
27
+ export declare function sampledValues(rows: unknown[], field: ProfileColumn): unknown[];
28
+ /** The sampled value as one data type, rendered by the mapping endpoint. */
29
+ export declare function useTypeCell({ type, value, format, unit, }: {
30
+ type: string;
31
+ value: unknown;
32
+ format?: string | undefined;
33
+ unit?: string | undefined;
34
+ }): TypeCellState;
35
+ //# sourceMappingURL=profileFieldSample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profileFieldSample.d.ts","sourceRoot":"","sources":["../../../src/profiles/fields/profileFieldSample.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,mBAAmB,CAAC;AAIpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAQlE,oDAAoD;AACpD,MAAM,MAAM,aAAa,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GACnB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAA;CAAE,CAAC;AAElD,gFAAgF;AAChF,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EAAE,EACf,KAAK,EAAE,aAAa,GACnB;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAY3E;AAED;;;mEAGmE;AACnE,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,EAAE,CAa9E;AA2FD,4EAA4E;AAC5E,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,MAAM,EACN,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,GAAG,aAAa,CA2DhB"}