@sqlrooms/mosaic 0.29.0-rc.6 → 0.29.0-rc.8

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 (1090) hide show
  1. package/LICENSE.md +2 -1
  2. package/README.md +182 -19
  3. package/dist/MosaicChart.d.ts +6 -6
  4. package/dist/MosaicChart.d.ts.map +1 -1
  5. package/dist/MosaicChart.js +6 -6
  6. package/dist/MosaicChart.js.map +1 -1
  7. package/dist/MosaicChartBuilder.d.ts +1 -1
  8. package/dist/MosaicChartBuilder.d.ts.map +1 -1
  9. package/dist/MosaicChartBuilder.js +1 -1
  10. package/dist/MosaicChartBuilder.js.map +1 -1
  11. package/dist/MosaicColorLegend.d.ts.map +1 -1
  12. package/dist/MosaicColorLegend.js +0 -1
  13. package/dist/MosaicColorLegend.js.map +1 -1
  14. package/dist/MosaicSlice.d.ts +1 -0
  15. package/dist/MosaicSlice.d.ts.map +1 -1
  16. package/dist/MosaicSlice.js.map +1 -1
  17. package/dist/VgPlotChart.d.ts.map +1 -1
  18. package/dist/VgPlotChart.js +15 -6
  19. package/dist/VgPlotChart.js.map +1 -1
  20. package/dist/ai/ai.d.ts +108 -0
  21. package/dist/ai/ai.d.ts.map +1 -0
  22. package/dist/ai/ai.js +461 -0
  23. package/dist/ai/ai.js.map +1 -0
  24. package/dist/ai/data-table-explorer-tool.d.ts +40 -0
  25. package/dist/ai/data-table-explorer-tool.d.ts.map +1 -0
  26. package/dist/ai/data-table-explorer-tool.js +75 -0
  27. package/dist/ai/data-table-explorer-tool.js.map +1 -0
  28. package/dist/ai/list-panels-tool.d.ts +35 -0
  29. package/dist/ai/list-panels-tool.d.ts.map +1 -0
  30. package/dist/ai/list-panels-tool.js.map +1 -0
  31. package/dist/ai/remove-panel-tool.d.ts +31 -0
  32. package/dist/ai/remove-panel-tool.d.ts.map +1 -0
  33. package/dist/ai/remove-panel-tool.js.map +1 -0
  34. package/dist/ai/tool-helpers.d.ts +34 -0
  35. package/dist/ai/tool-helpers.d.ts.map +1 -0
  36. package/dist/ai/tool-helpers.js +93 -0
  37. package/dist/ai/tool-helpers.js.map +1 -0
  38. package/dist/ai/tool-schemas.d.ts.map +1 -0
  39. package/dist/ai/tool-schemas.js.map +1 -0
  40. package/dist/ai/tool-types.d.ts +26 -0
  41. package/dist/ai/tool-types.d.ts.map +1 -0
  42. package/dist/ai/tool-types.js.map +1 -0
  43. package/dist/ai/tool-validation.d.ts +3 -0
  44. package/dist/ai/tool-validation.d.ts.map +1 -0
  45. package/dist/ai/tool-validation.js.map +1 -0
  46. package/dist/ai.d.ts +2 -99
  47. package/dist/ai.d.ts.map +1 -1
  48. package/dist/ai.js +2 -441
  49. package/dist/ai.js.map +1 -1
  50. package/dist/chart-builders/ChartBuilderActions.js.map +1 -1
  51. package/dist/chart-builders/ChartBuilderContent.d.ts +2 -2
  52. package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
  53. package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
  54. package/dist/chart-builders/ChartBuilderContext.d.ts +2 -2
  55. package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
  56. package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
  57. package/dist/chart-builders/ChartBuilderDialog.d.ts +2 -2
  58. package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
  59. package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
  60. package/dist/chart-builders/ChartBuilderFields.js +2 -2
  61. package/dist/chart-builders/ChartBuilderFields.js.map +1 -1
  62. package/dist/chart-builders/ChartBuilderRoot.d.ts +2 -2
  63. package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -1
  64. package/dist/chart-builders/ChartBuilderRoot.js.map +1 -1
  65. package/dist/chart-builders/chartSpecTitle.d.ts +1 -1
  66. package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
  67. package/dist/chart-builders/chartSpecTitle.js.map +1 -1
  68. package/dist/chart-builders/chartTypeUtils.d.ts +1 -2
  69. package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -1
  70. package/dist/chart-builders/chartTypeUtils.js +0 -1
  71. package/dist/chart-builders/chartTypeUtils.js.map +1 -1
  72. package/dist/chart-builders/createChartBuilderStore.d.ts +1 -1
  73. package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -1
  74. package/dist/chart-builders/createChartBuilderStore.js.map +1 -1
  75. package/dist/charts/MosaicChart.d.ts +14 -0
  76. package/dist/charts/MosaicChart.d.ts.map +1 -0
  77. package/dist/charts/MosaicChart.js +13 -0
  78. package/dist/charts/MosaicChart.js.map +1 -0
  79. package/dist/charts/MosaicChartError.d.ts +14 -0
  80. package/dist/charts/MosaicChartError.d.ts.map +1 -0
  81. package/dist/charts/MosaicChartError.js +31 -0
  82. package/dist/charts/MosaicChartError.js.map +1 -0
  83. package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts +7 -0
  84. package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts.map +1 -0
  85. package/dist/charts/MosaicChartRuntimeIssuePanel.js +10 -0
  86. package/dist/charts/MosaicChartRuntimeIssuePanel.js.map +1 -0
  87. package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
  88. package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
  89. package/dist/charts/MosaicChartSettingsButton.js +7 -0
  90. package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
  91. package/dist/charts/MosaicChartSettingsPanel.d.ts +11 -0
  92. package/dist/charts/MosaicChartSettingsPanel.d.ts.map +1 -0
  93. package/dist/charts/MosaicChartSettingsPanel.js +21 -0
  94. package/dist/charts/MosaicChartSettingsPanel.js.map +1 -0
  95. package/dist/charts/MosaicChartView.d.ts +15 -0
  96. package/dist/charts/MosaicChartView.d.ts.map +1 -0
  97. package/dist/charts/MosaicChartView.js +69 -0
  98. package/dist/charts/MosaicChartView.js.map +1 -0
  99. package/dist/charts/addChartPanelAction.d.ts.map +1 -0
  100. package/dist/charts/addChartPanelAction.js.map +1 -0
  101. package/dist/charts/chart-settings/MosaicChartSettings.d.ts +43 -0
  102. package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -0
  103. package/dist/charts/chart-settings/MosaicChartSettings.js +74 -0
  104. package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -0
  105. package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts +13 -0
  106. package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts.map +1 -0
  107. package/dist/charts/chart-settings/MosaicChartSettingsContent.js +18 -0
  108. package/dist/charts/chart-settings/MosaicChartSettingsContent.js.map +1 -0
  109. package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts +24 -0
  110. package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts.map +1 -0
  111. package/dist/charts/chart-settings/MosaicChartSettingsContext.js +34 -0
  112. package/dist/charts/chart-settings/MosaicChartSettingsContext.js.map +1 -0
  113. package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts +14 -0
  114. package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts.map +1 -0
  115. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +17 -0
  116. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -0
  117. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts +9 -0
  118. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -0
  119. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +11 -0
  120. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -0
  121. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts +9 -0
  122. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -0
  123. package/dist/charts/chart-settings/MosaicChartTypeSelector.js +23 -0
  124. package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
  125. package/dist/charts/chart-types/base-types.d.ts +179 -0
  126. package/dist/charts/chart-types/base-types.d.ts.map +1 -0
  127. package/dist/charts/chart-types/base-types.js +14 -0
  128. package/dist/charts/chart-types/base-types.js.map +1 -0
  129. package/dist/charts/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
  130. package/dist/charts/chart-types/box-plot/BoxPlotSettings.js +9 -0
  131. package/dist/charts/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
  132. package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -0
  133. package/dist/charts/chart-types/box-plot/definition.js +24 -0
  134. package/dist/charts/chart-types/box-plot/definition.js.map +1 -0
  135. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +67 -0
  136. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -0
  137. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +281 -0
  138. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -0
  139. package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
  140. package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
  141. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
  142. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +118 -0
  143. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
  144. package/dist/charts/chart-types/box-plot/renderer/constants.d.ts +24 -0
  145. package/dist/charts/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
  146. package/dist/charts/chart-types/box-plot/renderer/constants.js.map +1 -0
  147. package/dist/charts/chart-types/box-plot/renderer/plot.d.ts +14 -0
  148. package/dist/charts/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
  149. package/dist/charts/chart-types/box-plot/renderer/plot.js.map +1 -0
  150. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +18 -0
  151. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
  152. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +63 -0
  153. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
  154. package/dist/charts/chart-types/box-plot/renderer/utils.d.ts +6 -0
  155. package/dist/charts/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
  156. package/dist/charts/chart-types/box-plot/renderer/utils.js.map +1 -0
  157. package/dist/charts/chart-types/box-plot/schema.d.ts +21 -0
  158. package/dist/charts/chart-types/box-plot/schema.d.ts.map +1 -0
  159. package/dist/charts/chart-types/box-plot/schema.js +16 -0
  160. package/dist/charts/chart-types/box-plot/schema.js.map +1 -0
  161. package/dist/charts/chart-types/box-plot/tool.d.ts +40 -0
  162. package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -0
  163. package/dist/charts/chart-types/box-plot/tool.js +67 -0
  164. package/dist/charts/chart-types/box-plot/tool.js.map +1 -0
  165. package/dist/charts/chart-types/chart-config.d.ts +140 -0
  166. package/dist/charts/chart-types/chart-config.d.ts.map +1 -0
  167. package/dist/charts/chart-types/chart-config.js +41 -0
  168. package/dist/charts/chart-types/chart-config.js.map +1 -0
  169. package/dist/charts/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
  170. package/dist/charts/chart-types/count-plot/CountPlotSettings.js +9 -0
  171. package/dist/charts/chart-types/count-plot/CountPlotSettings.js.map +1 -0
  172. package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -0
  173. package/dist/charts/chart-types/count-plot/definition.js +19 -0
  174. package/dist/charts/chart-types/count-plot/definition.js.map +1 -0
  175. package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
  176. package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
  177. package/dist/charts/chart-types/count-plot/spec.d.ts +5 -0
  178. package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
  179. package/dist/charts/chart-types/count-plot/spec.js +80 -0
  180. package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
  181. package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -0
  182. package/dist/charts/chart-types/count-plot/tool.js +63 -0
  183. package/dist/charts/chart-types/count-plot/tool.js.map +1 -0
  184. package/dist/charts/chart-types/createChartTools.d.ts +17 -0
  185. package/dist/charts/chart-types/createChartTools.d.ts.map +1 -0
  186. package/dist/charts/chart-types/createChartTools.js +24 -0
  187. package/dist/charts/chart-types/createChartTools.js.map +1 -0
  188. package/dist/charts/chart-types/createDefaultChartTypes.d.ts +12 -0
  189. package/dist/charts/chart-types/createDefaultChartTypes.d.ts.map +1 -0
  190. package/dist/charts/chart-types/createDefaultChartTypes.js +30 -0
  191. package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -0
  192. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
  193. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js +30 -0
  194. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
  195. package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -0
  196. package/dist/charts/chart-types/custom-spec/definition.js +22 -0
  197. package/dist/charts/chart-types/custom-spec/definition.js.map +1 -0
  198. package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
  199. package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
  200. package/dist/charts/chart-types/custom-spec/spec.d.ts +5 -0
  201. package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
  202. package/dist/charts/chart-types/custom-spec/spec.js +28 -0
  203. package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
  204. package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
  205. package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
  206. package/dist/charts/chart-types/errors.d.ts +32 -0
  207. package/dist/charts/chart-types/errors.d.ts.map +1 -0
  208. package/dist/charts/chart-types/errors.js +48 -0
  209. package/dist/charts/chart-types/errors.js.map +1 -0
  210. package/dist/charts/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
  211. package/dist/charts/chart-types/heatmap/HeatmapSettings.js +9 -0
  212. package/dist/charts/chart-types/heatmap/HeatmapSettings.js.map +1 -0
  213. package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -0
  214. package/dist/charts/chart-types/heatmap/definition.js +19 -0
  215. package/dist/charts/chart-types/heatmap/definition.js.map +1 -0
  216. package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
  217. package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
  218. package/dist/charts/chart-types/heatmap/spec.d.ts +5 -0
  219. package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
  220. package/dist/charts/chart-types/heatmap/spec.js +64 -0
  221. package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
  222. package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -0
  223. package/dist/charts/chart-types/heatmap/tool.js +67 -0
  224. package/dist/charts/chart-types/heatmap/tool.js.map +1 -0
  225. package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
  226. package/dist/charts/chart-types/histogram/HistogramSettings.js +13 -0
  227. package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -0
  228. package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -0
  229. package/dist/charts/chart-types/histogram/definition.js +19 -0
  230. package/dist/charts/chart-types/histogram/definition.js.map +1 -0
  231. package/dist/charts/chart-types/histogram/schema.d.ts +26 -0
  232. package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
  233. package/dist/charts/chart-types/histogram/schema.js +27 -0
  234. package/dist/charts/chart-types/histogram/schema.js.map +1 -0
  235. package/dist/charts/chart-types/histogram/spec.d.ts +5 -0
  236. package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
  237. package/dist/charts/chart-types/histogram/spec.js +60 -0
  238. package/dist/charts/chart-types/histogram/spec.js.map +1 -0
  239. package/dist/charts/chart-types/histogram/tool.d.ts +42 -0
  240. package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -0
  241. package/dist/charts/chart-types/histogram/tool.js +65 -0
  242. package/dist/charts/chart-types/histogram/tool.js.map +1 -0
  243. package/dist/charts/chart-types/index.d.ts +42 -0
  244. package/dist/charts/chart-types/index.d.ts.map +1 -0
  245. package/dist/charts/chart-types/index.js +53 -0
  246. package/dist/charts/chart-types/index.js.map +1 -0
  247. package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
  248. package/dist/charts/chart-types/line-chart/LineChartSettings.js +15 -0
  249. package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -0
  250. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
  251. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
  252. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
  253. package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
  254. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
  255. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
  256. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
  257. package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
  258. package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -0
  259. package/dist/charts/chart-types/line-chart/definition.js +26 -0
  260. package/dist/charts/chart-types/line-chart/definition.js.map +1 -0
  261. package/dist/charts/chart-types/line-chart/schema.d.ts +72 -0
  262. package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
  263. package/dist/charts/chart-types/line-chart/schema.js +34 -0
  264. package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
  265. package/dist/charts/chart-types/line-chart/spec.d.ts +5 -0
  266. package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
  267. package/dist/charts/chart-types/line-chart/spec.js +123 -0
  268. package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
  269. package/dist/charts/chart-types/line-chart/tool.d.ts +66 -0
  270. package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -0
  271. package/dist/charts/chart-types/line-chart/tool.js +75 -0
  272. package/dist/charts/chart-types/line-chart/tool.js.map +1 -0
  273. package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
  274. package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
  275. package/dist/charts/chart-types/line-chart/utils.js +17 -0
  276. package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
  277. package/dist/charts/chart-types/mosaicChartTypes.d.ts +103 -0
  278. package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -0
  279. package/dist/charts/chart-types/mosaicChartTypes.js +20 -0
  280. package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -0
  281. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
  282. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
  283. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js +9 -0
  284. package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
  285. package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
  286. package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
  287. package/dist/charts/chart-types/scatter-plot/definition.js +24 -0
  288. package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
  289. package/dist/charts/chart-types/scatter-plot/schema.d.ts +23 -0
  290. package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
  291. package/dist/charts/chart-types/scatter-plot/schema.js +17 -0
  292. package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
  293. package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
  294. package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
  295. package/dist/charts/chart-types/scatter-plot/spec.js +81 -0
  296. package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
  297. package/dist/charts/chart-types/scatter-plot/tool.d.ts +42 -0
  298. package/dist/charts/chart-types/scatter-plot/tool.d.ts.map +1 -0
  299. package/dist/charts/chart-types/scatter-plot/tool.js +70 -0
  300. package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
  301. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
  302. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
  303. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +23 -0
  304. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -0
  305. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts +4 -0
  306. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -0
  307. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +23 -0
  308. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -0
  309. package/dist/charts/useBrushSelectionParams.d.ts +3 -0
  310. package/dist/charts/useBrushSelectionParams.d.ts.map +1 -0
  311. package/dist/charts/useBrushSelectionParams.js +16 -0
  312. package/dist/charts/useBrushSelectionParams.js.map +1 -0
  313. package/dist/charts/useChartDataPolicy.d.ts +5 -0
  314. package/dist/charts/useChartDataPolicy.d.ts.map +1 -0
  315. package/dist/charts/useChartDataPolicy.js +18 -0
  316. package/dist/charts/useChartDataPolicy.js.map +1 -0
  317. package/dist/charts/useChartPanelClients.d.ts +8 -0
  318. package/dist/charts/useChartPanelClients.d.ts.map +1 -0
  319. package/dist/charts/useChartPanelClients.js +22 -0
  320. package/dist/charts/useChartPanelClients.js.map +1 -0
  321. package/dist/charts/useChartRetainer.d.ts +4 -0
  322. package/dist/charts/useChartRetainer.d.ts.map +1 -0
  323. package/dist/charts/useChartRetainer.js +18 -0
  324. package/dist/charts/useChartRetainer.js.map +1 -0
  325. package/dist/charts/useChartTypeDefinition.d.ts +3 -0
  326. package/dist/charts/useChartTypeDefinition.d.ts.map +1 -0
  327. package/dist/charts/useChartTypeDefinition.js.map +1 -0
  328. package/dist/charts/useMosaicChartRenderContext.d.ts +20 -0
  329. package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -0
  330. package/dist/charts/useMosaicChartRenderContext.js +63 -0
  331. package/dist/charts/useMosaicChartRenderContext.js.map +1 -0
  332. package/dist/charts/useParseChartConfig.d.ts +12 -0
  333. package/dist/charts/useParseChartConfig.d.ts.map +1 -0
  334. package/dist/charts/useParseChartConfig.js +28 -0
  335. package/dist/charts/useParseChartConfig.js.map +1 -0
  336. package/dist/charts/useRuntimeIssueReporter.d.ts +7 -0
  337. package/dist/charts/useRuntimeIssueReporter.d.ts.map +1 -0
  338. package/dist/charts/useRuntimeIssueReporter.js +19 -0
  339. package/dist/charts/useRuntimeIssueReporter.js.map +1 -0
  340. package/dist/charts/worksheet/ChartBlockHeader.d.ts +15 -0
  341. package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -0
  342. package/dist/charts/worksheet/ChartBlockHeader.js +10 -0
  343. package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -0
  344. package/dist/charts/worksheet/ChartBlockRenderer.d.ts +4 -0
  345. package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -0
  346. package/dist/charts/worksheet/ChartBlockRenderer.js +37 -0
  347. package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -0
  348. package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts +15 -0
  349. package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts.map +1 -0
  350. package/dist/charts/worksheet/ChartSelectorEmptyState.js +10 -0
  351. package/dist/charts/worksheet/ChartSelectorEmptyState.js.map +1 -0
  352. package/dist/column-types-utils.d.ts +12 -0
  353. package/dist/column-types-utils.d.ts.map +1 -0
  354. package/dist/column-types-utils.js +55 -0
  355. package/dist/column-types-utils.js.map +1 -0
  356. package/dist/components/AggregationSelector.d.ts +11 -0
  357. package/dist/components/AggregationSelector.d.ts.map +1 -0
  358. package/dist/components/AggregationSelector.js +16 -0
  359. package/dist/components/AggregationSelector.js.map +1 -0
  360. package/dist/components/BlockCaptionEditor.d.ts +20 -0
  361. package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
  362. package/dist/components/BlockCaptionEditor.js +15 -0
  363. package/dist/components/BlockCaptionEditor.js.map +1 -0
  364. package/dist/components/ColorSelector.d.ts +12 -0
  365. package/dist/components/ColorSelector.d.ts.map +1 -0
  366. package/dist/components/ColorSelector.js +14 -0
  367. package/dist/components/ColorSelector.js.map +1 -0
  368. package/dist/components/ColumnSelector.d.ts +14 -0
  369. package/dist/components/ColumnSelector.d.ts.map +1 -0
  370. package/dist/components/ColumnSelector.js +30 -0
  371. package/dist/components/ColumnSelector.js.map +1 -0
  372. package/dist/components/ColumnsContext.d.ts +11 -0
  373. package/dist/components/ColumnsContext.d.ts.map +1 -0
  374. package/dist/components/ColumnsContext.js +15 -0
  375. package/dist/components/ColumnsContext.js.map +1 -0
  376. package/dist/components/Combobox.d.ts +45 -0
  377. package/dist/components/Combobox.d.ts.map +1 -0
  378. package/dist/components/Combobox.js +58 -0
  379. package/dist/components/Combobox.js.map +1 -0
  380. package/dist/components/DataTableSelector.d.ts +22 -0
  381. package/dist/components/DataTableSelector.d.ts.map +1 -0
  382. package/dist/components/DataTableSelector.js +66 -0
  383. package/dist/components/DataTableSelector.js.map +1 -0
  384. package/dist/components/Field.d.ts.map +1 -0
  385. package/dist/components/Field.js.map +1 -0
  386. package/dist/components/FieldSelectorInput.d.ts +15 -0
  387. package/dist/components/FieldSelectorInput.d.ts.map +1 -0
  388. package/dist/components/FieldSelectorInput.js +14 -0
  389. package/dist/components/FieldSelectorInput.js.map +1 -0
  390. package/dist/components/MultiFieldSelector.d.ts +17 -0
  391. package/dist/components/MultiFieldSelector.d.ts.map +1 -0
  392. package/dist/components/MultiFieldSelector.js +44 -0
  393. package/dist/components/MultiFieldSelector.js.map +1 -0
  394. package/dist/components/TableSelector.d.ts.map +1 -0
  395. package/dist/components/TableSelector.js +23 -0
  396. package/dist/components/TableSelector.js.map +1 -0
  397. package/dist/components/TemporalGranularitySelector.d.ts +10 -0
  398. package/dist/components/TemporalGranularitySelector.d.ts.map +1 -0
  399. package/dist/components/TemporalGranularitySelector.js +41 -0
  400. package/dist/components/TemporalGranularitySelector.js.map +1 -0
  401. package/dist/components/useCombobox.d.ts +23 -0
  402. package/dist/components/useCombobox.d.ts.map +1 -0
  403. package/dist/components/useCombobox.js +26 -0
  404. package/dist/components/useCombobox.js.map +1 -0
  405. package/dist/constants/chart-colors.d.ts +3 -0
  406. package/dist/constants/chart-colors.d.ts.map +1 -0
  407. package/dist/constants/chart-colors.js +5 -0
  408. package/dist/constants/chart-colors.js.map +1 -0
  409. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +5 -0
  410. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -0
  411. package/dist/dashboard/DefaultMosaicDashboardBlock.js +6 -0
  412. package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -0
  413. package/dist/dashboard/MosaicDashboard.d.ts +2 -5
  414. package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
  415. package/dist/dashboard/MosaicDashboard.js +4 -6
  416. package/dist/dashboard/MosaicDashboard.js.map +1 -1
  417. package/dist/dashboard/MosaicDashboardContext.d.ts +0 -2
  418. package/dist/dashboard/MosaicDashboardContext.d.ts.map +1 -1
  419. package/dist/dashboard/MosaicDashboardContext.js.map +1 -1
  420. package/dist/dashboard/MosaicDashboardSlice.d.ts +52 -79
  421. package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
  422. package/dist/dashboard/MosaicDashboardSlice.js +102 -52
  423. package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
  424. package/dist/dashboard/action-types.d.ts +1 -1
  425. package/dist/dashboard/action-types.d.ts.map +1 -1
  426. package/dist/dashboard/action-types.js.map +1 -1
  427. package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
  428. package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
  429. package/dist/dashboard/components/ResetFiltersButton.js +15 -0
  430. package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
  431. package/dist/dashboard/core-types.d.ts +2 -8
  432. package/dist/dashboard/core-types.d.ts.map +1 -1
  433. package/dist/dashboard/core-types.js +2 -8
  434. package/dist/dashboard/core-types.js.map +1 -1
  435. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts +3 -0
  436. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts.map +1 -0
  437. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js +11 -0
  438. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js.map +1 -0
  439. package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts +12 -0
  440. package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts.map +1 -0
  441. package/dist/dashboard/createMosaicDashboardBlockDefinition.js +32 -0
  442. package/dist/dashboard/createMosaicDashboardBlockDefinition.js.map +1 -0
  443. package/dist/dashboard/dashboard-types.d.ts +21 -57
  444. package/dist/dashboard/dashboard-types.d.ts.map +1 -1
  445. package/dist/dashboard/dashboard-types.js +7 -15
  446. package/dist/dashboard/dashboard-types.js.map +1 -1
  447. package/dist/dashboard/defaultPanelActions.d.ts.map +1 -1
  448. package/dist/dashboard/defaultPanelActions.js +3 -5
  449. package/dist/dashboard/defaultPanelActions.js.map +1 -1
  450. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
  451. package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
  452. package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
  453. package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
  454. package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
  455. package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
  456. package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
  457. package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
  458. package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -0
  459. package/dist/dashboard/panel/MosaicDashboardPanel.js +23 -0
  460. package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -0
  461. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
  462. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js +17 -0
  463. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js.map +1 -0
  464. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts +17 -0
  465. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts.map +1 -0
  466. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js +21 -0
  467. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js.map +1 -0
  468. package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts +13 -0
  469. package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts.map +1 -0
  470. package/dist/dashboard/panel/MosaicDashboardPanelHeader.js +30 -0
  471. package/dist/dashboard/panel/MosaicDashboardPanelHeader.js.map +1 -0
  472. package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -0
  473. package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -0
  474. package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -0
  475. package/dist/dashboard/panel/MosaicDashboardPanels.js +63 -0
  476. package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -0
  477. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
  478. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
  479. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
  480. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
  481. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
  482. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
  483. package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
  484. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
  485. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
  486. package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
  487. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
  488. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
  489. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +15 -4
  490. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
  491. package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +1 -1
  492. package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -1
  493. package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
  494. package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
  495. package/dist/dashboard/usePanelClientRegistration.js +30 -0
  496. package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
  497. package/dist/dashboard/usePanelClients.d.ts +7 -0
  498. package/dist/dashboard/usePanelClients.d.ts.map +1 -0
  499. package/dist/dashboard/usePanelClients.js +13 -0
  500. package/dist/dashboard/usePanelClients.js.map +1 -0
  501. package/dist/dashboard/useSelectedOrFirstTable.js +1 -1
  502. package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
  503. package/dist/data-table-explorer/DataTableExplorer.d.ts +39 -0
  504. package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -0
  505. package/dist/data-table-explorer/DataTableExplorer.js +67 -0
  506. package/dist/data-table-explorer/DataTableExplorer.js.map +1 -0
  507. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +50 -0
  508. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -0
  509. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +122 -0
  510. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -0
  511. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +28 -0
  512. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -0
  513. package/dist/data-table-explorer/DataTableExplorerCountClient.js +51 -0
  514. package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -0
  515. package/dist/data-table-explorer/DataTableExplorerHeader.d.ts +7 -0
  516. package/dist/data-table-explorer/DataTableExplorerHeader.d.ts.map +1 -0
  517. package/dist/data-table-explorer/DataTableExplorerHeader.js +195 -0
  518. package/dist/data-table-explorer/DataTableExplorerHeader.js.map +1 -0
  519. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +69 -0
  520. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -0
  521. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +179 -0
  522. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -0
  523. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +37 -0
  524. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -0
  525. package/dist/data-table-explorer/DataTableExplorerPageClient.js +65 -0
  526. package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -0
  527. package/dist/data-table-explorer/DataTableExplorerRows.d.ts +9 -0
  528. package/dist/data-table-explorer/DataTableExplorerRows.d.ts.map +1 -0
  529. package/dist/data-table-explorer/DataTableExplorerRows.js +65 -0
  530. package/dist/data-table-explorer/DataTableExplorerRows.js.map +1 -0
  531. package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts +9 -0
  532. package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts.map +1 -0
  533. package/dist/data-table-explorer/DataTableExplorerStatusBar.js +28 -0
  534. package/dist/data-table-explorer/DataTableExplorerStatusBar.js.map +1 -0
  535. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +24 -0
  536. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -0
  537. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +51 -0
  538. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -0
  539. package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts +3 -0
  540. package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts.map +1 -0
  541. package/dist/data-table-explorer/addDataTableExplorerPanelAction.js +9 -0
  542. package/dist/data-table-explorer/addDataTableExplorerPanelAction.js.map +1 -0
  543. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +49 -0
  544. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
  545. package/dist/data-table-explorer/createDataTableExplorerStore.js +132 -0
  546. package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -0
  547. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
  548. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
  549. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
  550. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
  551. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts +4 -0
  552. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -0
  553. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +43 -0
  554. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
  555. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
  556. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
  557. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
  558. package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
  559. package/dist/data-table-explorer/dataTableExplorerController.d.ts +68 -0
  560. package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
  561. package/dist/data-table-explorer/dataTableExplorerController.js +130 -0
  562. package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -0
  563. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
  564. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
  565. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
  566. package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
  567. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +30 -0
  568. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
  569. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +120 -0
  570. package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
  571. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +28 -0
  572. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
  573. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +40 -0
  574. package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
  575. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
  576. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
  577. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
  578. package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
  579. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
  580. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
  581. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
  582. package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
  583. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
  584. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
  585. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
  586. package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
  587. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
  588. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
  589. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
  590. package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
  591. package/dist/data-table-explorer/layout.d.ts +11 -0
  592. package/dist/data-table-explorer/layout.d.ts.map +1 -0
  593. package/dist/data-table-explorer/layout.js +23 -0
  594. package/dist/data-table-explorer/layout.js.map +1 -0
  595. package/dist/data-table-explorer/types.d.ts +90 -0
  596. package/dist/data-table-explorer/types.d.ts.map +1 -0
  597. package/dist/data-table-explorer/types.js.map +1 -0
  598. package/dist/data-table-explorer/useDataTableExplorer.d.ts +7 -0
  599. package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -0
  600. package/dist/data-table-explorer/useDataTableExplorer.js +95 -0
  601. package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -0
  602. package/dist/data-table-explorer/utils.d.ts +61 -0
  603. package/dist/data-table-explorer/utils.d.ts.map +1 -0
  604. package/dist/data-table-explorer/utils.js +349 -0
  605. package/dist/data-table-explorer/utils.js.map +1 -0
  606. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +12 -0
  607. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
  608. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +9 -0
  609. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -0
  610. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts +4 -0
  611. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -0
  612. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +35 -0
  613. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -0
  614. package/dist/editor/MosaicChartContainer.d.ts +4 -4
  615. package/dist/editor/MosaicChartContainer.js +4 -4
  616. package/dist/editor/MosaicChartContainer.js.map +1 -1
  617. package/dist/hooks/useTablesWithColumns.d.ts.map +1 -0
  618. package/dist/hooks/useTablesWithColumns.js +13 -0
  619. package/dist/hooks/useTablesWithColumns.js.map +1 -0
  620. package/dist/index.d.ts +46 -32
  621. package/dist/index.d.ts.map +1 -1
  622. package/dist/index.js +41 -27
  623. package/dist/index.js.map +1 -1
  624. package/dist/schemas/common.d.ts +20 -0
  625. package/dist/schemas/common.d.ts.map +1 -0
  626. package/dist/schemas/common.js +15 -0
  627. package/dist/schemas/common.js.map +1 -0
  628. package/dist/schemas/index.d.ts +2 -0
  629. package/dist/schemas/index.d.ts.map +1 -0
  630. package/dist/schemas/index.js +2 -0
  631. package/dist/schemas/index.js.map +1 -0
  632. package/dist/useVgPlotChartRender.d.ts.map +1 -1
  633. package/dist/useVgPlotChartRender.js +142 -31
  634. package/dist/useVgPlotChartRender.js.map +1 -1
  635. package/dist/useVgPlotChartRetention.d.ts +11 -0
  636. package/dist/useVgPlotChartRetention.d.ts.map +1 -1
  637. package/dist/useVgPlotChartRetention.js.map +1 -1
  638. package/package.json +14 -13
  639. package/dist/boxplot/BoxPlotClient.d.ts +0 -65
  640. package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
  641. package/dist/boxplot/BoxPlotClient.js +0 -286
  642. package/dist/boxplot/BoxPlotClient.js.map +0 -1
  643. package/dist/chart/ChartRuntimeIssuePanel.d.ts +0 -7
  644. package/dist/chart/ChartRuntimeIssuePanel.d.ts.map +0 -1
  645. package/dist/chart/ChartRuntimeIssuePanel.js +0 -10
  646. package/dist/chart/ChartRuntimeIssuePanel.js.map +0 -1
  647. package/dist/chart/MosaicDashboardChart.d.ts +0 -14
  648. package/dist/chart/MosaicDashboardChart.d.ts.map +0 -1
  649. package/dist/chart/MosaicDashboardChart.js +0 -21
  650. package/dist/chart/MosaicDashboardChart.js.map +0 -1
  651. package/dist/chart/MosaicDashboardChartContent.d.ts +0 -16
  652. package/dist/chart/MosaicDashboardChartContent.d.ts.map +0 -1
  653. package/dist/chart/MosaicDashboardChartContent.js +0 -45
  654. package/dist/chart/MosaicDashboardChartContent.js.map +0 -1
  655. package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +0 -4
  656. package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +0 -1
  657. package/dist/chart/MosaicDashboardChartHeaderActions.js +0 -16
  658. package/dist/chart/MosaicDashboardChartHeaderActions.js.map +0 -1
  659. package/dist/chart/MosaicDashboardChartRenderer.d.ts +0 -4
  660. package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +0 -1
  661. package/dist/chart/MosaicDashboardChartRenderer.js +0 -31
  662. package/dist/chart/MosaicDashboardChartRenderer.js.map +0 -1
  663. package/dist/chart/MosaicDashboardComponentChart.d.ts +0 -18
  664. package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
  665. package/dist/chart/MosaicDashboardComponentChart.js +0 -14
  666. package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
  667. package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -14
  668. package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +0 -1
  669. package/dist/chart/MosaicDashboardVgPlotChart.js +0 -10
  670. package/dist/chart/MosaicDashboardVgPlotChart.js.map +0 -1
  671. package/dist/chart/MosaicDashboardVgPlotError.d.ts +0 -8
  672. package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +0 -1
  673. package/dist/chart/MosaicDashboardVgPlotError.js +0 -11
  674. package/dist/chart/MosaicDashboardVgPlotError.js.map +0 -1
  675. package/dist/chart/addChartPanelAction.d.ts.map +0 -1
  676. package/dist/chart/addChartPanelAction.js.map +0 -1
  677. package/dist/chart/chart-settings/ChartSettings.d.ts +0 -44
  678. package/dist/chart/chart-settings/ChartSettings.d.ts.map +0 -1
  679. package/dist/chart/chart-settings/ChartSettings.js +0 -74
  680. package/dist/chart/chart-settings/ChartSettings.js.map +0 -1
  681. package/dist/chart/chart-settings/ChartSettingsContent.d.ts +0 -13
  682. package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +0 -1
  683. package/dist/chart/chart-settings/ChartSettingsContent.js +0 -18
  684. package/dist/chart/chart-settings/ChartSettingsContent.js.map +0 -1
  685. package/dist/chart/chart-settings/ChartSettingsContext.d.ts +0 -25
  686. package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
  687. package/dist/chart/chart-settings/ChartSettingsContext.js +0 -34
  688. package/dist/chart/chart-settings/ChartSettingsContext.js.map +0 -1
  689. package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +0 -14
  690. package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +0 -1
  691. package/dist/chart/chart-settings/ChartSettingsPanel.js +0 -17
  692. package/dist/chart/chart-settings/ChartSettingsPanel.js.map +0 -1
  693. package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +0 -9
  694. package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +0 -1
  695. package/dist/chart/chart-settings/ChartSpecViewerPanel.js +0 -11
  696. package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +0 -1
  697. package/dist/chart/chart-settings/ChartTypeSelector.d.ts +0 -9
  698. package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +0 -1
  699. package/dist/chart/chart-settings/ChartTypeSelector.js +0 -16
  700. package/dist/chart/chart-settings/ChartTypeSelector.js.map +0 -1
  701. package/dist/chart/chart-settings/useTableColumns.d.ts +0 -3
  702. package/dist/chart/chart-settings/useTableColumns.d.ts.map +0 -1
  703. package/dist/chart/chart-settings/useTableColumns.js +0 -12
  704. package/dist/chart/chart-settings/useTableColumns.js.map +0 -1
  705. package/dist/chart/useBrushSelectionParams.d.ts +0 -3
  706. package/dist/chart/useBrushSelectionParams.d.ts.map +0 -1
  707. package/dist/chart/useBrushSelectionParams.js +0 -16
  708. package/dist/chart/useBrushSelectionParams.js.map +0 -1
  709. package/dist/chart/useChartRetainer.d.ts +0 -3
  710. package/dist/chart/useChartRetainer.d.ts.map +0 -1
  711. package/dist/chart/useChartRetainer.js +0 -11
  712. package/dist/chart/useChartRetainer.js.map +0 -1
  713. package/dist/chart/useGenerateSpec.d.ts +0 -13
  714. package/dist/chart/useGenerateSpec.d.ts.map +0 -1
  715. package/dist/chart/useGenerateSpec.js +0 -32
  716. package/dist/chart/useGenerateSpec.js.map +0 -1
  717. package/dist/chart-builders/AggregationSelector.d.ts +0 -11
  718. package/dist/chart-builders/AggregationSelector.d.ts.map +0 -1
  719. package/dist/chart-builders/AggregationSelector.js +0 -9
  720. package/dist/chart-builders/AggregationSelector.js.map +0 -1
  721. package/dist/chart-builders/ColumnSelector.d.ts +0 -13
  722. package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
  723. package/dist/chart-builders/ColumnSelector.js +0 -30
  724. package/dist/chart-builders/ColumnSelector.js.map +0 -1
  725. package/dist/chart-builders/ColumnsContext.d.ts +0 -13
  726. package/dist/chart-builders/ColumnsContext.d.ts.map +0 -1
  727. package/dist/chart-builders/ColumnsContext.js +0 -15
  728. package/dist/chart-builders/ColumnsContext.js.map +0 -1
  729. package/dist/chart-builders/Field.d.ts.map +0 -1
  730. package/dist/chart-builders/Field.js.map +0 -1
  731. package/dist/chart-builders/FieldSelectorInput.d.ts +0 -14
  732. package/dist/chart-builders/FieldSelectorInput.d.ts.map +0 -1
  733. package/dist/chart-builders/FieldSelectorInput.js +0 -19
  734. package/dist/chart-builders/FieldSelectorInput.js.map +0 -1
  735. package/dist/chart-builders/MultiFieldSelector.d.ts +0 -14
  736. package/dist/chart-builders/MultiFieldSelector.d.ts.map +0 -1
  737. package/dist/chart-builders/MultiFieldSelector.js +0 -53
  738. package/dist/chart-builders/MultiFieldSelector.js.map +0 -1
  739. package/dist/chart-builders/TableSelector.d.ts.map +0 -1
  740. package/dist/chart-builders/TableSelector.js +0 -23
  741. package/dist/chart-builders/TableSelector.js.map +0 -1
  742. package/dist/chart-builders/TemporalGranularitySelector.d.ts +0 -10
  743. package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +0 -1
  744. package/dist/chart-builders/TemporalGranularitySelector.js +0 -37
  745. package/dist/chart-builders/TemporalGranularitySelector.js.map +0 -1
  746. package/dist/chart-builders/constants.d.ts +0 -12
  747. package/dist/chart-builders/constants.d.ts.map +0 -1
  748. package/dist/chart-builders/constants.js +0 -47
  749. package/dist/chart-builders/constants.js.map +0 -1
  750. package/dist/chart-types/base-types.d.ts +0 -168
  751. package/dist/chart-types/base-types.d.ts.map +0 -1
  752. package/dist/chart-types/base-types.js +0 -11
  753. package/dist/chart-types/base-types.js.map +0 -1
  754. package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +0 -1
  755. package/dist/chart-types/box-plot/BoxPlotSettings.js +0 -9
  756. package/dist/chart-types/box-plot/BoxPlotSettings.js.map +0 -1
  757. package/dist/chart-types/box-plot/definition.d.ts.map +0 -1
  758. package/dist/chart-types/box-plot/definition.js +0 -24
  759. package/dist/chart-types/box-plot/definition.js.map +0 -1
  760. package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +0 -1
  761. package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +0 -1
  762. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +0 -1
  763. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +0 -118
  764. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +0 -1
  765. package/dist/chart-types/box-plot/renderer/constants.d.ts +0 -24
  766. package/dist/chart-types/box-plot/renderer/constants.d.ts.map +0 -1
  767. package/dist/chart-types/box-plot/renderer/constants.js.map +0 -1
  768. package/dist/chart-types/box-plot/renderer/plot.d.ts +0 -14
  769. package/dist/chart-types/box-plot/renderer/plot.d.ts.map +0 -1
  770. package/dist/chart-types/box-plot/renderer/plot.js.map +0 -1
  771. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +0 -18
  772. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
  773. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -56
  774. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +0 -1
  775. package/dist/chart-types/box-plot/renderer/utils.d.ts +0 -6
  776. package/dist/chart-types/box-plot/renderer/utils.d.ts.map +0 -1
  777. package/dist/chart-types/box-plot/renderer/utils.js.map +0 -1
  778. package/dist/chart-types/box-plot/schema.d.ts +0 -21
  779. package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
  780. package/dist/chart-types/box-plot/schema.js +0 -13
  781. package/dist/chart-types/box-plot/schema.js.map +0 -1
  782. package/dist/chart-types/box-plot/tool.d.ts +0 -40
  783. package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
  784. package/dist/chart-types/box-plot/tool.js +0 -67
  785. package/dist/chart-types/box-plot/tool.js.map +0 -1
  786. package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
  787. package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
  788. package/dist/chart-types/bubble-chart/BubbleChartSettings.js +0 -9
  789. package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
  790. package/dist/chart-types/bubble-chart/definition.d.ts +0 -4
  791. package/dist/chart-types/bubble-chart/definition.d.ts.map +0 -1
  792. package/dist/chart-types/bubble-chart/definition.js +0 -24
  793. package/dist/chart-types/bubble-chart/definition.js.map +0 -1
  794. package/dist/chart-types/bubble-chart/schema.d.ts +0 -23
  795. package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
  796. package/dist/chart-types/bubble-chart/schema.js +0 -17
  797. package/dist/chart-types/bubble-chart/schema.js.map +0 -1
  798. package/dist/chart-types/bubble-chart/spec.d.ts +0 -4
  799. package/dist/chart-types/bubble-chart/spec.d.ts.map +0 -1
  800. package/dist/chart-types/bubble-chart/spec.js +0 -31
  801. package/dist/chart-types/bubble-chart/spec.js.map +0 -1
  802. package/dist/chart-types/bubble-chart/tool.d.ts +0 -42
  803. package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
  804. package/dist/chart-types/bubble-chart/tool.js +0 -66
  805. package/dist/chart-types/bubble-chart/tool.js.map +0 -1
  806. package/dist/chart-types/chart-config.d.ts +0 -138
  807. package/dist/chart-types/chart-config.d.ts.map +0 -1
  808. package/dist/chart-types/chart-config.js +0 -49
  809. package/dist/chart-types/chart-config.js.map +0 -1
  810. package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +0 -1
  811. package/dist/chart-types/count-plot/CountPlotSettings.js +0 -9
  812. package/dist/chart-types/count-plot/CountPlotSettings.js.map +0 -1
  813. package/dist/chart-types/count-plot/definition.d.ts.map +0 -1
  814. package/dist/chart-types/count-plot/definition.js +0 -19
  815. package/dist/chart-types/count-plot/definition.js.map +0 -1
  816. package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
  817. package/dist/chart-types/count-plot/schema.js.map +0 -1
  818. package/dist/chart-types/count-plot/spec.d.ts +0 -4
  819. package/dist/chart-types/count-plot/spec.d.ts.map +0 -1
  820. package/dist/chart-types/count-plot/spec.js +0 -49
  821. package/dist/chart-types/count-plot/spec.js.map +0 -1
  822. package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
  823. package/dist/chart-types/count-plot/tool.js +0 -63
  824. package/dist/chart-types/count-plot/tool.js.map +0 -1
  825. package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +0 -1
  826. package/dist/chart-types/custom-spec/CustomSpecSettings.js +0 -30
  827. package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +0 -1
  828. package/dist/chart-types/custom-spec/definition.d.ts.map +0 -1
  829. package/dist/chart-types/custom-spec/definition.js +0 -22
  830. package/dist/chart-types/custom-spec/definition.js.map +0 -1
  831. package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
  832. package/dist/chart-types/custom-spec/schema.js.map +0 -1
  833. package/dist/chart-types/custom-spec/spec.d.ts +0 -4
  834. package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
  835. package/dist/chart-types/custom-spec/spec.js +0 -24
  836. package/dist/chart-types/custom-spec/spec.js.map +0 -1
  837. package/dist/chart-types/data-policy-schema.d.ts.map +0 -1
  838. package/dist/chart-types/data-policy-schema.js.map +0 -1
  839. package/dist/chart-types/errors.d.ts +0 -23
  840. package/dist/chart-types/errors.d.ts.map +0 -1
  841. package/dist/chart-types/errors.js +0 -26
  842. package/dist/chart-types/errors.js.map +0 -1
  843. package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +0 -1
  844. package/dist/chart-types/heatmap/HeatmapSettings.js +0 -9
  845. package/dist/chart-types/heatmap/HeatmapSettings.js.map +0 -1
  846. package/dist/chart-types/heatmap/definition.d.ts.map +0 -1
  847. package/dist/chart-types/heatmap/definition.js +0 -19
  848. package/dist/chart-types/heatmap/definition.js.map +0 -1
  849. package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
  850. package/dist/chart-types/heatmap/schema.js.map +0 -1
  851. package/dist/chart-types/heatmap/spec.d.ts +0 -4
  852. package/dist/chart-types/heatmap/spec.d.ts.map +0 -1
  853. package/dist/chart-types/heatmap/spec.js +0 -32
  854. package/dist/chart-types/heatmap/spec.js.map +0 -1
  855. package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
  856. package/dist/chart-types/heatmap/tool.js +0 -67
  857. package/dist/chart-types/heatmap/tool.js.map +0 -1
  858. package/dist/chart-types/histogram/HistogramSettings.d.ts.map +0 -1
  859. package/dist/chart-types/histogram/HistogramSettings.js +0 -11
  860. package/dist/chart-types/histogram/HistogramSettings.js.map +0 -1
  861. package/dist/chart-types/histogram/definition.d.ts.map +0 -1
  862. package/dist/chart-types/histogram/definition.js +0 -19
  863. package/dist/chart-types/histogram/definition.js.map +0 -1
  864. package/dist/chart-types/histogram/schema.d.ts +0 -24
  865. package/dist/chart-types/histogram/schema.d.ts.map +0 -1
  866. package/dist/chart-types/histogram/schema.js +0 -26
  867. package/dist/chart-types/histogram/schema.js.map +0 -1
  868. package/dist/chart-types/histogram/spec.d.ts +0 -4
  869. package/dist/chart-types/histogram/spec.d.ts.map +0 -1
  870. package/dist/chart-types/histogram/spec.js +0 -37
  871. package/dist/chart-types/histogram/spec.js.map +0 -1
  872. package/dist/chart-types/histogram/tool.d.ts +0 -40
  873. package/dist/chart-types/histogram/tool.d.ts.map +0 -1
  874. package/dist/chart-types/histogram/tool.js +0 -65
  875. package/dist/chart-types/histogram/tool.js.map +0 -1
  876. package/dist/chart-types/index.d.ts +0 -157
  877. package/dist/chart-types/index.d.ts.map +0 -1
  878. package/dist/chart-types/index.js +0 -106
  879. package/dist/chart-types/index.js.map +0 -1
  880. package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +0 -1
  881. package/dist/chart-types/line-chart/LineChartSettings.js +0 -24
  882. package/dist/chart-types/line-chart/LineChartSettings.js.map +0 -1
  883. package/dist/chart-types/line-chart/definition.d.ts.map +0 -1
  884. package/dist/chart-types/line-chart/definition.js +0 -26
  885. package/dist/chart-types/line-chart/definition.js.map +0 -1
  886. package/dist/chart-types/line-chart/schema.d.ts +0 -88
  887. package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
  888. package/dist/chart-types/line-chart/schema.js +0 -41
  889. package/dist/chart-types/line-chart/schema.js.map +0 -1
  890. package/dist/chart-types/line-chart/spec.d.ts +0 -4
  891. package/dist/chart-types/line-chart/spec.d.ts.map +0 -1
  892. package/dist/chart-types/line-chart/spec.js +0 -91
  893. package/dist/chart-types/line-chart/spec.js.map +0 -1
  894. package/dist/chart-types/line-chart/tool.d.ts +0 -64
  895. package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
  896. package/dist/chart-types/line-chart/tool.js +0 -74
  897. package/dist/chart-types/line-chart/tool.js.map +0 -1
  898. package/dist/chart-types/list-panels-tool.d.ts +0 -35
  899. package/dist/chart-types/list-panels-tool.d.ts.map +0 -1
  900. package/dist/chart-types/list-panels-tool.js.map +0 -1
  901. package/dist/chart-types/profiler-tool.d.ts +0 -40
  902. package/dist/chart-types/profiler-tool.d.ts.map +0 -1
  903. package/dist/chart-types/profiler-tool.js +0 -73
  904. package/dist/chart-types/profiler-tool.js.map +0 -1
  905. package/dist/chart-types/remove-panel-tool.d.ts +0 -31
  906. package/dist/chart-types/remove-panel-tool.d.ts.map +0 -1
  907. package/dist/chart-types/remove-panel-tool.js.map +0 -1
  908. package/dist/chart-types/text-panel-tool.d.ts +0 -42
  909. package/dist/chart-types/text-panel-tool.d.ts.map +0 -1
  910. package/dist/chart-types/text-panel-tool.js +0 -71
  911. package/dist/chart-types/text-panel-tool.js.map +0 -1
  912. package/dist/chart-types/tool-helpers.d.ts +0 -44
  913. package/dist/chart-types/tool-helpers.d.ts.map +0 -1
  914. package/dist/chart-types/tool-helpers.js +0 -129
  915. package/dist/chart-types/tool-helpers.js.map +0 -1
  916. package/dist/chart-types/tool-schemas.d.ts.map +0 -1
  917. package/dist/chart-types/tool-schemas.js.map +0 -1
  918. package/dist/chart-types/tool-types.d.ts +0 -26
  919. package/dist/chart-types/tool-types.d.ts.map +0 -1
  920. package/dist/chart-types/tool-types.js.map +0 -1
  921. package/dist/chart-types/tool-validation.d.ts +0 -3
  922. package/dist/chart-types/tool-validation.d.ts.map +0 -1
  923. package/dist/chart-types/tool-validation.js.map +0 -1
  924. package/dist/chart-types/useChartTypeDefinition.d.ts +0 -3
  925. package/dist/chart-types/useChartTypeDefinition.d.ts.map +0 -1
  926. package/dist/chart-types/useChartTypeDefinition.js.map +0 -1
  927. package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +0 -17
  928. package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +0 -1
  929. package/dist/dashboard/DashboardPanelErrorBoundary.js +0 -21
  930. package/dist/dashboard/DashboardPanelErrorBoundary.js.map +0 -1
  931. package/dist/dashboard/MosaicDashboardEmptyState.d.ts +0 -2
  932. package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +0 -1
  933. package/dist/dashboard/MosaicDashboardEmptyState.js +0 -14
  934. package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
  935. package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
  936. package/dist/dashboard/MosaicDashboardPanel.js +0 -23
  937. package/dist/dashboard/MosaicDashboardPanel.js.map +0 -1
  938. package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +0 -1
  939. package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +0 -17
  940. package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +0 -1
  941. package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +0 -13
  942. package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +0 -1
  943. package/dist/dashboard/MosaicDashboardPanelHeader.js +0 -30
  944. package/dist/dashboard/MosaicDashboardPanelHeader.js.map +0 -1
  945. package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +0 -1
  946. package/dist/dashboard/MosaicDashboardPanelLayout.js.map +0 -1
  947. package/dist/dashboard/MosaicDashboardPanels.d.ts.map +0 -1
  948. package/dist/dashboard/MosaicDashboardPanels.js +0 -54
  949. package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
  950. package/dist/dashboard/defaultPanelRenderers.d.ts +0 -3
  951. package/dist/dashboard/defaultPanelRenderers.d.ts.map +0 -1
  952. package/dist/dashboard/defaultPanelRenderers.js +0 -13
  953. package/dist/dashboard/defaultPanelRenderers.js.map +0 -1
  954. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts +0 -6
  955. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts.map +0 -1
  956. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js +0 -46
  957. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js.map +0 -1
  958. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts +0 -7
  959. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts.map +0 -1
  960. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js +0 -29
  961. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js.map +0 -1
  962. package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts +0 -6
  963. package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts.map +0 -1
  964. package/dist/dashboard/initial-state/MosaicDashboardInitialState.js +0 -9
  965. package/dist/dashboard/initial-state/MosaicDashboardInitialState.js.map +0 -1
  966. package/dist/dashboard/useTablesWithColumns.d.ts.map +0 -1
  967. package/dist/dashboard/useTablesWithColumns.js +0 -13
  968. package/dist/dashboard/useTablesWithColumns.js.map +0 -1
  969. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -4
  970. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +0 -1
  971. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +0 -32
  972. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +0 -1
  973. package/dist/profiler/MosaicProfiler.d.ts +0 -32
  974. package/dist/profiler/MosaicProfiler.d.ts.map +0 -1
  975. package/dist/profiler/MosaicProfiler.js +0 -57
  976. package/dist/profiler/MosaicProfiler.js.map +0 -1
  977. package/dist/profiler/MosaicProfilerHeader.d.ts +0 -7
  978. package/dist/profiler/MosaicProfilerHeader.d.ts.map +0 -1
  979. package/dist/profiler/MosaicProfilerHeader.js +0 -196
  980. package/dist/profiler/MosaicProfilerHeader.js.map +0 -1
  981. package/dist/profiler/MosaicProfilerRows.d.ts +0 -9
  982. package/dist/profiler/MosaicProfilerRows.d.ts.map +0 -1
  983. package/dist/profiler/MosaicProfilerRows.js +0 -65
  984. package/dist/profiler/MosaicProfilerRows.js.map +0 -1
  985. package/dist/profiler/MosaicProfilerStatusBar.d.ts +0 -9
  986. package/dist/profiler/MosaicProfilerStatusBar.d.ts.map +0 -1
  987. package/dist/profiler/MosaicProfilerStatusBar.js +0 -28
  988. package/dist/profiler/MosaicProfilerStatusBar.js.map +0 -1
  989. package/dist/profiler/ProfilerCategoryClient.d.ts +0 -50
  990. package/dist/profiler/ProfilerCategoryClient.d.ts.map +0 -1
  991. package/dist/profiler/ProfilerCategoryClient.js +0 -121
  992. package/dist/profiler/ProfilerCategoryClient.js.map +0 -1
  993. package/dist/profiler/ProfilerCountClient.d.ts +0 -28
  994. package/dist/profiler/ProfilerCountClient.d.ts.map +0 -1
  995. package/dist/profiler/ProfilerCountClient.js +0 -51
  996. package/dist/profiler/ProfilerCountClient.js.map +0 -1
  997. package/dist/profiler/ProfilerHistogramClient.d.ts +0 -69
  998. package/dist/profiler/ProfilerHistogramClient.d.ts.map +0 -1
  999. package/dist/profiler/ProfilerHistogramClient.js +0 -179
  1000. package/dist/profiler/ProfilerHistogramClient.js.map +0 -1
  1001. package/dist/profiler/ProfilerPageClient.d.ts +0 -37
  1002. package/dist/profiler/ProfilerPageClient.d.ts.map +0 -1
  1003. package/dist/profiler/ProfilerPageClient.js +0 -65
  1004. package/dist/profiler/ProfilerPageClient.js.map +0 -1
  1005. package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts +0 -24
  1006. package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts.map +0 -1
  1007. package/dist/profiler/ProfilerUnsupportedSummaryClient.js +0 -51
  1008. package/dist/profiler/ProfilerUnsupportedSummaryClient.js.map +0 -1
  1009. package/dist/profiler/addProfilerPanelAction.d.ts +0 -3
  1010. package/dist/profiler/addProfilerPanelAction.d.ts.map +0 -1
  1011. package/dist/profiler/addProfilerPanelAction.js +0 -9
  1012. package/dist/profiler/addProfilerPanelAction.js.map +0 -1
  1013. package/dist/profiler/createProfilerStore.d.ts +0 -45
  1014. package/dist/profiler/createProfilerStore.d.ts.map +0 -1
  1015. package/dist/profiler/createProfilerStore.js +0 -120
  1016. package/dist/profiler/createProfilerStore.js.map +0 -1
  1017. package/dist/profiler/layout.d.ts +0 -7
  1018. package/dist/profiler/layout.d.ts.map +0 -1
  1019. package/dist/profiler/layout.js +0 -13
  1020. package/dist/profiler/layout.js.map +0 -1
  1021. package/dist/profiler/profilerController.d.ts +0 -64
  1022. package/dist/profiler/profilerController.d.ts.map +0 -1
  1023. package/dist/profiler/profilerController.js +0 -123
  1024. package/dist/profiler/profilerController.js.map +0 -1
  1025. package/dist/profiler/types.d.ts +0 -86
  1026. package/dist/profiler/types.d.ts.map +0 -1
  1027. package/dist/profiler/types.js.map +0 -1
  1028. package/dist/profiler/useMosaicProfiler.d.ts +0 -7
  1029. package/dist/profiler/useMosaicProfiler.d.ts.map +0 -1
  1030. package/dist/profiler/useMosaicProfiler.js +0 -339
  1031. package/dist/profiler/useMosaicProfiler.js.map +0 -1
  1032. package/dist/profiler/utils.d.ts +0 -61
  1033. package/dist/profiler/utils.d.ts.map +0 -1
  1034. package/dist/profiler/utils.js +0 -347
  1035. package/dist/profiler/utils.js.map +0 -1
  1036. package/dist/text/MosaicDashboardTextRenderer.d.ts +0 -4
  1037. package/dist/text/MosaicDashboardTextRenderer.d.ts.map +0 -1
  1038. package/dist/text/MosaicDashboardTextRenderer.js +0 -46
  1039. package/dist/text/MosaicDashboardTextRenderer.js.map +0 -1
  1040. package/dist/text/addTextPanelAction.d.ts +0 -3
  1041. package/dist/text/addTextPanelAction.d.ts.map +0 -1
  1042. package/dist/text/addTextPanelAction.js +0 -9
  1043. package/dist/text/addTextPanelAction.js.map +0 -1
  1044. /package/dist/{chart-types → ai}/list-panels-tool.js +0 -0
  1045. /package/dist/{chart-types → ai}/remove-panel-tool.js +0 -0
  1046. /package/dist/{chart-types → ai}/tool-schemas.d.ts +0 -0
  1047. /package/dist/{chart-types → ai}/tool-schemas.js +0 -0
  1048. /package/dist/{chart-types → ai}/tool-types.js +0 -0
  1049. /package/dist/{chart-types → ai}/tool-validation.js +0 -0
  1050. /package/dist/{chart → charts}/addChartPanelAction.d.ts +0 -0
  1051. /package/dist/{chart → charts}/addChartPanelAction.js +0 -0
  1052. /package/dist/{chart-types → charts/chart-types}/box-plot/BoxPlotSettings.d.ts +0 -0
  1053. /package/dist/{chart-types → charts/chart-types}/box-plot/definition.d.ts +0 -0
  1054. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.d.ts +0 -0
  1055. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.js +0 -0
  1056. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotPanelRenderer.d.ts +0 -0
  1057. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/constants.js +0 -0
  1058. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/plot.js +0 -0
  1059. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/utils.js +0 -0
  1060. /package/dist/{chart-types → charts/chart-types}/count-plot/CountPlotSettings.d.ts +0 -0
  1061. /package/dist/{chart-types → charts/chart-types}/count-plot/definition.d.ts +0 -0
  1062. /package/dist/{chart-types → charts/chart-types}/count-plot/schema.d.ts +0 -0
  1063. /package/dist/{chart-types → charts/chart-types}/count-plot/schema.js +0 -0
  1064. /package/dist/{chart-types → charts/chart-types}/count-plot/tool.d.ts +0 -0
  1065. /package/dist/{chart-types → charts/chart-types}/custom-spec/CustomSpecSettings.d.ts +0 -0
  1066. /package/dist/{chart-types → charts/chart-types}/custom-spec/definition.d.ts +0 -0
  1067. /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.d.ts +0 -0
  1068. /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.js +0 -0
  1069. /package/dist/{chart-types → charts/chart-types}/data-policy-schema.d.ts +0 -0
  1070. /package/dist/{chart-types → charts/chart-types}/data-policy-schema.js +0 -0
  1071. /package/dist/{chart-types → charts/chart-types}/heatmap/HeatmapSettings.d.ts +0 -0
  1072. /package/dist/{chart-types → charts/chart-types}/heatmap/definition.d.ts +0 -0
  1073. /package/dist/{chart-types → charts/chart-types}/heatmap/schema.d.ts +0 -0
  1074. /package/dist/{chart-types → charts/chart-types}/heatmap/schema.js +0 -0
  1075. /package/dist/{chart-types → charts/chart-types}/heatmap/tool.d.ts +0 -0
  1076. /package/dist/{chart-types → charts/chart-types}/histogram/HistogramSettings.d.ts +0 -0
  1077. /package/dist/{chart-types → charts/chart-types}/histogram/definition.d.ts +0 -0
  1078. /package/dist/{chart-types → charts/chart-types}/line-chart/LineChartSettings.d.ts +0 -0
  1079. /package/dist/{chart-types → charts/chart-types}/line-chart/definition.d.ts +0 -0
  1080. /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
  1081. /package/dist/{chart-builders → components}/Field.d.ts +0 -0
  1082. /package/dist/{chart-builders → components}/Field.js +0 -0
  1083. /package/dist/{chart-builders → components}/TableSelector.d.ts +0 -0
  1084. /package/dist/dashboard/{MosaicDashboardPanel.d.ts → panel/MosaicDashboardPanel.d.ts} +0 -0
  1085. /package/dist/dashboard/{MosaicDashboardPanelDragOverlay.d.ts → panel/MosaicDashboardPanelDragOverlay.d.ts} +0 -0
  1086. /package/dist/dashboard/{MosaicDashboardPanelLayout.d.ts → panel/MosaicDashboardPanelLayout.d.ts} +0 -0
  1087. /package/dist/dashboard/{MosaicDashboardPanelLayout.js → panel/MosaicDashboardPanelLayout.js} +0 -0
  1088. /package/dist/dashboard/{MosaicDashboardPanels.d.ts → panel/MosaicDashboardPanels.d.ts} +0 -0
  1089. /package/dist/{profiler → data-table-explorer}/types.js +0 -0
  1090. /package/dist/{dashboard → hooks}/useTablesWithColumns.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicDashboardProfilerPanelRenderer.js","sourceRoot":"","sources":["../../src/profiler/MosaicDashboardProfilerPanelRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,EAAC,cAAc,EAA2B,MAAM,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AoC,GAC/C;IACE,SAAS,EAAE,+BAA+B;IAC1C,IAAI,EAAE,mBAAmB;CAC1B,CAAC","sourcesContent":["import {SpinnerPane} from '@sqlrooms/ui';\nimport {TablePropertiesIcon} from 'lucide-react';\nimport {MosaicProfiler, type MosaicProfilerProps} from './MosaicProfiler';\nimport type {ProfilerPanel} from '../dashboard/dashboard-types';\nimport {\n type MosaicDashboardPanelRenderer,\n type ProfilerPanelRendererProps,\n useStoreWithMosaicDashboard,\n} from '../dashboard/MosaicDashboardSlice';\n\nfunction MosaicDashboardProfilerRenderer({\n panel,\n dashboard,\n selectionName,\n}: ProfilerPanelRendererProps) {\n const connection = useStoreWithMosaicDashboard(\n (state) => state.mosaic.connection,\n );\n const tableName = dashboard.selectedTable;\n const pageSize =\n typeof panel.config.pageSize === 'number'\n ? panel.config.pageSize\n : undefined;\n\n if (!tableName) {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-4 text-sm\">\n Data Table panels require a table source.\n </div>\n );\n }\n\n if (connection.status === 'loading') {\n return <SpinnerPane className=\"h-full w-full\" />;\n }\n\n if (connection.status !== 'ready') {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-4 text-sm\">\n Mosaic connection is not ready.\n </div>\n );\n }\n\n const profilerProps = {\n tableName,\n pageSize: pageSize ?? 10,\n selectionName,\n } satisfies MosaicProfilerProps;\n\n return (\n <MosaicProfiler {...profilerProps}>\n <div className=\"flex h-full min-h-0 flex-col\">\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <MosaicProfiler.Table>\n <MosaicProfiler.Header />\n <MosaicProfiler.Rows />\n </MosaicProfiler.Table>\n </div>\n <MosaicProfiler.StatusBar />\n </div>\n </MosaicProfiler>\n );\n}\n\nexport const mosaicDashboardProfilerPanelRenderer: MosaicDashboardPanelRenderer<ProfilerPanel> =\n {\n component: MosaicDashboardProfilerRenderer,\n icon: TablePropertiesIcon,\n };\n"]}
@@ -1,32 +0,0 @@
1
- import { type ComponentProps, type PropsWithChildren, type ReactElement } from 'react';
2
- import { Table } from '@sqlrooms/ui';
3
- import { type MosaicProfilerHeaderProps } from './MosaicProfilerHeader';
4
- import { type MosaicProfilerRowsProps } from './MosaicProfilerRows';
5
- import { type MosaicProfilerStatusBarProps } from './MosaicProfilerStatusBar';
6
- import type { MosaicProfilerOptions, UseMosaicProfilerReturn } from './types';
7
- export type MosaicProfilerRootProps = PropsWithChildren<{
8
- profiler: UseMosaicProfilerReturn;
9
- }>;
10
- /**
11
- * Provides an existing profiler instance to compound profiler subcomponents.
12
- */
13
- export declare function MosaicProfilerRoot({ children, profiler, }: MosaicProfilerRootProps): import("react/jsx-runtime").JSX.Element;
14
- export type MosaicProfilerProps = PropsWithChildren<MosaicProfilerOptions>;
15
- export type MosaicProfilerCompoundHeaderProps = Omit<MosaicProfilerHeaderProps, 'profiler'>;
16
- declare function MosaicProfilerCompoundHeader(props: MosaicProfilerCompoundHeaderProps): import("react/jsx-runtime").JSX.Element;
17
- export type MosaicProfilerCompoundRowsProps = Omit<MosaicProfilerRowsProps, 'profiler'>;
18
- declare function MosaicProfilerCompoundRows(props: MosaicProfilerCompoundRowsProps): import("react/jsx-runtime").JSX.Element;
19
- export type MosaicProfilerCompoundStatusBarProps = Omit<MosaicProfilerStatusBarProps, 'profiler'>;
20
- declare function MosaicProfilerCompoundStatusBar(props: MosaicProfilerCompoundStatusBarProps): import("react/jsx-runtime").JSX.Element;
21
- export type MosaicProfilerCompoundTableProps = ComponentProps<typeof Table>;
22
- declare function MosaicProfilerCompoundTable({ className, disableWrapper, style, ...props }: MosaicProfilerCompoundTableProps): import("react/jsx-runtime").JSX.Element;
23
- type MosaicProfilerCompoundComponent = ((props: MosaicProfilerProps) => ReactElement) & {
24
- Header: typeof MosaicProfilerCompoundHeader;
25
- Root: typeof MosaicProfilerRoot;
26
- Rows: typeof MosaicProfilerCompoundRows;
27
- StatusBar: typeof MosaicProfilerCompoundStatusBar;
28
- Table: typeof MosaicProfilerCompoundTable;
29
- };
30
- export declare const MosaicProfiler: MosaicProfilerCompoundComponent;
31
- export {};
32
- //# sourceMappingURL=MosaicProfiler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfiler.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfiler.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,qBAAqB,EAAE,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAiB5E,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;IACtD,QAAQ,EAAE,uBAAuB,CAAC;CACnC,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,QAAQ,GACT,EAAE,uBAAuB,2CAMzB;AAED,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAgB3E,MAAM,MAAM,iCAAiC,GAAG,IAAI,CAClD,yBAAyB,EACzB,UAAU,CACX,CAAC;AAEF,iBAAS,4BAA4B,CACnC,KAAK,EAAE,iCAAiC,2CAIzC;AAED,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,uBAAuB,EACvB,UAAU,CACX,CAAC;AAEF,iBAAS,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,2CAGzE;AAED,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,4BAA4B,EAC5B,UAAU,CACX,CAAC;AAEF,iBAAS,+BAA+B,CACtC,KAAK,EAAE,oCAAoC,2CAI5C;AAED,MAAM,MAAM,gCAAgC,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE5E,iBAAS,2BAA2B,CAAC,EACnC,SAAS,EACT,cAAqB,EACrB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gCAAgC,2CAclC;AAED,KAAK,+BAA+B,GAAG,CAAC,CACtC,KAAK,EAAE,mBAAmB,KACvB,YAAY,CAAC,GAAG;IACnB,MAAM,EAAE,OAAO,4BAA4B,CAAC;IAC5C,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,IAAI,EAAE,OAAO,0BAA0B,CAAC;IACxC,SAAS,EAAE,OAAO,+BAA+B,CAAC;IAClD,KAAK,EAAE,OAAO,2BAA2B,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,+BAS5B,CAAC"}
@@ -1,57 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext, useContext, } from 'react';
3
- import { Table } from '@sqlrooms/ui';
4
- import { getProfilerTableWidth } from './layout';
5
- import { MosaicProfilerHeader, } from './MosaicProfilerHeader';
6
- import { MosaicProfilerRows, } from './MosaicProfilerRows';
7
- import { MosaicProfilerStatusBar, } from './MosaicProfilerStatusBar';
8
- import { useMosaicProfiler } from './useMosaicProfiler';
9
- const profilerContext = createContext(null);
10
- function useProfilerCompoundContext() {
11
- const profiler = useContext(profilerContext);
12
- if (!profiler) {
13
- throw new Error('MosaicProfiler compound components must be rendered inside <MosaicProfiler> or <MosaicProfiler.Root>.');
14
- }
15
- return profiler;
16
- }
17
- /**
18
- * Provides an existing profiler instance to compound profiler subcomponents.
19
- */
20
- export function MosaicProfilerRoot({ children, profiler, }) {
21
- return (_jsx(profilerContext.Provider, { value: profiler, children: children }));
22
- }
23
- /**
24
- * Creates a profiler instance and exposes it to compound profiler
25
- * subcomponents through context.
26
- */
27
- function MosaicProfilerComponent({ children, ...options }) {
28
- const profiler = useMosaicProfiler(options);
29
- return (_jsx(MosaicProfilerRoot, { profiler: profiler, children: children }));
30
- }
31
- function MosaicProfilerCompoundHeader(props) {
32
- const profiler = useProfilerCompoundContext();
33
- return _jsx(MosaicProfilerHeader, { ...props, profiler: profiler });
34
- }
35
- function MosaicProfilerCompoundRows(props) {
36
- const profiler = useProfilerCompoundContext();
37
- return _jsx(MosaicProfilerRows, { ...props, profiler: profiler });
38
- }
39
- function MosaicProfilerCompoundStatusBar(props) {
40
- const profiler = useProfilerCompoundContext();
41
- return _jsx(MosaicProfilerStatusBar, { ...props, profiler: profiler });
42
- }
43
- function MosaicProfilerCompoundTable({ className, disableWrapper = true, style, ...props }) {
44
- const profiler = useProfilerCompoundContext();
45
- const tableWidth = getProfilerTableWidth(profiler.columns);
46
- return (_jsx(Table, { disableWrapper: disableWrapper, className: ['min-w-full table-fixed', className]
47
- .filter(Boolean)
48
- .join(' '), style: { width: `${tableWidth}px`, ...style }, ...props }));
49
- }
50
- export const MosaicProfiler = Object.assign(MosaicProfilerComponent, {
51
- Header: MosaicProfilerCompoundHeader,
52
- Root: MosaicProfilerRoot,
53
- Rows: MosaicProfilerCompoundRows,
54
- StatusBar: MosaicProfilerCompoundStatusBar,
55
- Table: MosaicProfilerCompoundTable,
56
- });
57
- //# sourceMappingURL=MosaicProfiler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfiler.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfiler.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EACL,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAC,iBAAiB,EAAC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AS,2BAA2B,CAAC,EACnC,SAAS,EACT,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,GAAG,KAAK,EACyB;IACjC,MAAM,QAAQ,GAAG,0BAA0B,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,KAAK,IACJ,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC;aAC7C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,EAAC,KAAK,EAAE,GAAG,UAAU,IAAI,EAAE,GAAG,KAAK,EAAC,KACvC,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAYD,MAAM,CAAC,MAAM,cAAc,GAAoC,MAAM,CAAC,MAAM,CAC1E,uBAAuB,EACvB;IACE,MAAM,EAAE,4BAA4B;IACpC,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,SAAS,EAAE,+BAA+B;IAC1C,KAAK,EAAE,2BAA2B;CACnC,CACF,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type PropsWithChildren,\n type ReactElement,\n} from 'react';\nimport {Table} from '@sqlrooms/ui';\nimport {getProfilerTableWidth} from './layout';\nimport {\n MosaicProfilerHeader,\n type MosaicProfilerHeaderProps,\n} from './MosaicProfilerHeader';\nimport {\n MosaicProfilerRows,\n type MosaicProfilerRowsProps,\n} from './MosaicProfilerRows';\nimport {\n MosaicProfilerStatusBar,\n type MosaicProfilerStatusBarProps,\n} from './MosaicProfilerStatusBar';\nimport type {MosaicProfilerOptions, UseMosaicProfilerReturn} from './types';\nimport {useMosaicProfiler} from './useMosaicProfiler';\n\nconst profilerContext = createContext<UseMosaicProfilerReturn | null>(null);\n\nfunction useProfilerCompoundContext() {\n const profiler = useContext(profilerContext);\n\n if (!profiler) {\n throw new Error(\n 'MosaicProfiler compound components must be rendered inside <MosaicProfiler> or <MosaicProfiler.Root>.',\n );\n }\n\n return profiler;\n}\n\nexport type MosaicProfilerRootProps = PropsWithChildren<{\n profiler: UseMosaicProfilerReturn;\n}>;\n\n/**\n * Provides an existing profiler instance to compound profiler subcomponents.\n */\nexport function MosaicProfilerRoot({\n children,\n profiler,\n}: MosaicProfilerRootProps) {\n return (\n <profilerContext.Provider value={profiler}>\n {children}\n </profilerContext.Provider>\n );\n}\n\nexport type MosaicProfilerProps = PropsWithChildren<MosaicProfilerOptions>;\n\n/**\n * Creates a profiler instance and exposes it to compound profiler\n * subcomponents through context.\n */\nfunction MosaicProfilerComponent({\n children,\n ...options\n}: MosaicProfilerProps): ReactElement {\n const profiler = useMosaicProfiler(options);\n return (\n <MosaicProfilerRoot profiler={profiler}>{children}</MosaicProfilerRoot>\n );\n}\n\nexport type MosaicProfilerCompoundHeaderProps = Omit<\n MosaicProfilerHeaderProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundHeader(\n props: MosaicProfilerCompoundHeaderProps,\n) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerHeader {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundRowsProps = Omit<\n MosaicProfilerRowsProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundRows(props: MosaicProfilerCompoundRowsProps) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerRows {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundStatusBarProps = Omit<\n MosaicProfilerStatusBarProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundStatusBar(\n props: MosaicProfilerCompoundStatusBarProps,\n) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerStatusBar {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundTableProps = ComponentProps<typeof Table>;\n\nfunction MosaicProfilerCompoundTable({\n className,\n disableWrapper = true,\n style,\n ...props\n}: MosaicProfilerCompoundTableProps) {\n const profiler = useProfilerCompoundContext();\n const tableWidth = getProfilerTableWidth(profiler.columns);\n\n return (\n <Table\n disableWrapper={disableWrapper}\n className={['min-w-full table-fixed', className]\n .filter(Boolean)\n .join(' ')}\n style={{width: `${tableWidth}px`, ...style}}\n {...props}\n />\n );\n}\n\ntype MosaicProfilerCompoundComponent = ((\n props: MosaicProfilerProps,\n) => ReactElement) & {\n Header: typeof MosaicProfilerCompoundHeader;\n Root: typeof MosaicProfilerRoot;\n Rows: typeof MosaicProfilerCompoundRows;\n StatusBar: typeof MosaicProfilerCompoundStatusBar;\n Table: typeof MosaicProfilerCompoundTable;\n};\n\nexport const MosaicProfiler: MosaicProfilerCompoundComponent = Object.assign(\n MosaicProfilerComponent,\n {\n Header: MosaicProfilerCompoundHeader,\n Root: MosaicProfilerRoot,\n Rows: MosaicProfilerCompoundRows,\n StatusBar: MosaicProfilerCompoundStatusBar,\n Table: MosaicProfilerCompoundTable,\n },\n);\n"]}
@@ -1,7 +0,0 @@
1
- import type { UseMosaicProfilerReturn } from './types';
2
- export type MosaicProfilerHeaderProps = {
3
- className?: string;
4
- profiler: Pick<UseMosaicProfilerReturn, 'columns' | 'setSorting' | 'sorting'>;
5
- };
6
- export declare function MosaicProfilerHeader({ className, profiler, }: MosaicProfilerHeaderProps): import("react/jsx-runtime").JSX.Element;
7
- //# sourceMappingURL=MosaicProfilerHeader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerHeader.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerHeader.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAKV,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;CAC/E,CAAC;AAgYF,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,QAAQ,GACT,EAAE,yBAAyB,2CA0E3B"}
@@ -1,196 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Badge, cn, TableHead, TableHeader, TableRow } from '@sqlrooms/ui';
3
- import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
4
- import { useEffect, useMemo, useRef, useState } from 'react';
5
- import { getProfilerColumnWidthPx, PROFILER_DEFAULT_COLUMN_WIDTH_PX, PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX, PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX, } from './layout';
6
- import { isProfilerUnsupportedSummaryType } from './utils';
7
- const COLUMN_WIDTH_CLASS = `min-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px]`;
8
- const STICKY_ROW_NUMBER_CLASS = `bg-background sticky left-0 top-0 z-40 min-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] border-r px-1 text-center`;
9
- const STICKY_COLUMN_HEADER_CLASS = 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';
10
- function getColumnWidthClass(column) {
11
- return isProfilerUnsupportedSummaryType(column.field.type)
12
- ? `min-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px]`
13
- : COLUMN_WIDTH_CLASS;
14
- }
15
- function setNextSortState(currentSorting, columnId, setSorting) {
16
- const current = currentSorting.find((entry) => entry.id === columnId);
17
- if (!current) {
18
- setSorting([{ desc: false, id: columnId }]);
19
- return;
20
- }
21
- if (!current.desc) {
22
- setSorting([{ desc: true, id: columnId }]);
23
- return;
24
- }
25
- setSorting([]);
26
- }
27
- function formatPercentOfTotal(value) {
28
- const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;
29
- return Intl.NumberFormat(undefined, {
30
- maximumFractionDigits,
31
- style: 'percent',
32
- }).format(value);
33
- }
34
- function CategorySummaryCell({ summary, }) {
35
- const [hoveredKey, setHoveredKey] = useState();
36
- const totalCount = summary.buckets.reduce((acc, bucket) => acc + bucket.totalCount, 0);
37
- const activeBucket = summary.buckets.find((bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey);
38
- const footerLabel = activeBucket
39
- ? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`
40
- : `${summary.bucketCount.toLocaleString()} categories`;
41
- return (_jsxs("div", { className: "space-y-0.5 pt-1.5", children: [_jsx("div", { className: "flex h-10 overflow-hidden rounded-sm border", children: summary.buckets.map((bucket) => {
42
- const width = totalCount > 0
43
- ? `${(bucket.totalCount / totalCount) * 100}%`
44
- : '0%';
45
- const fillPct = bucket.totalCount > 0
46
- ? (bucket.filteredCount / bucket.totalCount) * 100
47
- : 0;
48
- const isSelected = summary.selectedKey === bucket.key;
49
- const background = bucket.kind === 'overflow'
50
- ? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`
51
- : `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;
52
- return (_jsx("button", { type: "button", disabled: !bucket.selectable, className: cn('relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default', isSelected && 'ring-ring ring-1 ring-inset', !bucket.selectable && 'text-muted-foreground'), style: {
53
- background,
54
- flexBasis: width,
55
- flexGrow: bucket.totalCount,
56
- }, onClick: () => summary.toggleValue(bucket.key), onMouseEnter: () => setHoveredKey(bucket.key), onMouseLeave: () => setHoveredKey(undefined), children: _jsx("span", { className: "max-w-full truncate px-1", children: bucket.label }) }, bucket.key));
57
- }) }), _jsx("div", { className: "text-muted-foreground truncate text-[10px] font-normal", children: footerLabel })] }));
58
- }
59
- const histogramInteractorIds = new WeakMap();
60
- let nextHistogramInteractorId = 0;
61
- function getHistogramInteractorId(interactor) {
62
- const cachedId = histogramInteractorIds.get(interactor);
63
- if (cachedId !== undefined) {
64
- return cachedId;
65
- }
66
- const id = ++nextHistogramInteractorId;
67
- histogramInteractorIds.set(interactor, id);
68
- return id;
69
- }
70
- function createScale(type, domain, range) {
71
- const [d0, d1] = domain.map((value) => value instanceof Date ? value.getTime() : value);
72
- const [r0, r1] = range;
73
- const span = d1 - d0 || 1;
74
- const rspan = r1 - r0;
75
- return {
76
- apply(value) {
77
- const numeric = value instanceof Date ? value.getTime() : value;
78
- return r0 + ((numeric - d0) / span) * rspan;
79
- },
80
- domain,
81
- invert(value) {
82
- const numeric = d0 + ((value - r0) / (rspan || 1)) * span;
83
- return type === 'utc' ? new Date(numeric) : numeric;
84
- },
85
- range,
86
- type,
87
- };
88
- }
89
- function formatDomainValue(value, valueType) {
90
- if (valueType === 'date') {
91
- const date = value instanceof Date ? value : new Date(value);
92
- return date.toISOString().slice(0, 10);
93
- }
94
- return Intl.NumberFormat(undefined, {
95
- maximumFractionDigits: 2,
96
- }).format(typeof value === 'number' ? value : value.getTime());
97
- }
98
- function HistogramSummaryCell({ summary, }) {
99
- const svgRef = useRef(null);
100
- const brushRootRef = useRef(null);
101
- const initializedBrushRef = useRef(undefined);
102
- const layout = useMemo(() => {
103
- const width = 122;
104
- const height = 40;
105
- const margin = { bottom: 4, left: 4, right: 4, top: 2 };
106
- const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;
107
- const nullBarGap = nullBarWidth > 0 ? 3 : 0;
108
- const totalBins = summary.totalBins.length
109
- ? summary.totalBins
110
- : summary.filteredBins;
111
- const domain = totalBins.length > 0
112
- ? [totalBins[0].x0, totalBins[totalBins.length - 1].x1]
113
- : null;
114
- const totalMax = Math.max(summary.totalNullCount, ...totalBins.map((bin) => bin.length), 1);
115
- const xScale = domain
116
- ? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [
117
- margin.left + nullBarWidth + nullBarGap,
118
- width - margin.right,
119
- ])
120
- : null;
121
- const yScale = createScale('linear', [0, totalMax], [height - margin.bottom, margin.top]);
122
- return {
123
- height,
124
- margin,
125
- nullBarGap,
126
- nullBarWidth,
127
- width,
128
- xScale,
129
- yScale,
130
- };
131
- }, [summary]);
132
- useEffect(() => {
133
- const svg = svgRef.current;
134
- const brushRoot = brushRootRef.current;
135
- const interactor = summary.interactor;
136
- if (!svg || !brushRoot || !interactor || !layout.xScale)
137
- return;
138
- const brushKey = [
139
- getHistogramInteractorId(interactor),
140
- summary.valueType,
141
- layout.xScale.domain
142
- .map((value) => (value instanceof Date ? value.getTime() : value))
143
- .join(':'),
144
- layout.xScale.range.join(':'),
145
- ].join('|');
146
- if (initializedBrushRef.current === brushKey)
147
- return;
148
- svg.scale = (channel) => {
149
- if (channel === 'x')
150
- return layout.xScale;
151
- if (channel === 'y')
152
- return layout.yScale;
153
- return undefined;
154
- };
155
- brushRoot.replaceChildren();
156
- interactor.init(svg, brushRoot);
157
- initializedBrushRef.current = brushKey;
158
- }, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);
159
- const axisY = layout.height - layout.margin.bottom;
160
- const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;
161
- const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;
162
- const xAxisEnd = layout.xScale?.range[1] ?? layout.width - layout.margin.right;
163
- return (_jsxs("div", { className: "space-y-0 pt-1.5", children: [_jsxs("svg", { ref: svgRef, width: layout.width, height: layout.height, viewBox: `0 0 ${layout.width} ${layout.height}`, className: "max-w-full overflow-visible", children: [summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.totalNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
164
- layout.yScale.apply(summary.totalNullCount), fill: "hsl(var(--muted-foreground) / 0.22)" })) : null, summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.filteredNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
165
- layout.yScale.apply(summary.filteredNullCount), fill: "hsl(var(--chart-1))", opacity: 0.95 })) : null, summary.totalBins.map((bin, index) => {
166
- const x0 = layout.xScale?.apply(bin.x0) ?? 0;
167
- const x1 = layout.xScale?.apply(bin.x1) ?? 0;
168
- const y = layout.yScale.apply(bin.length);
169
- return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--muted-foreground) / 0.22)" }, `bg-${index}`));
170
- }), summary.filteredBins.map((bin, index) => {
171
- const x0 = layout.xScale?.apply(bin.x0) ?? 0;
172
- const x1 = layout.xScale?.apply(bin.x1) ?? 0;
173
- const y = layout.yScale.apply(bin.length);
174
- return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--chart-1))", opacity: 0.95 }, `fg-${index}`));
175
- }), _jsx("line", { x1: xAxisStart, x2: xAxisEnd, y1: axisY, y2: axisY, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisStart, x2: xAxisStart, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisEnd, x2: xAxisEnd, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), summary.totalNullCount > 0 ? (_jsx("line", { x1: nullBarCenter, x2: nullBarCenter, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--chart-1))" })) : null, _jsx("g", { ref: brushRootRef })] }), _jsxs("div", { className: "text-muted-foreground relative h-3.5 text-[10px] font-normal", children: [summary.totalNullCount > 0 ? (_jsx("span", { className: "absolute -translate-x-1/2", style: { left: nullBarCenter }, children: "\u2205" })) : null, _jsx("span", { className: "absolute", style: { left: xAxisStart }, children: summary.totalBins[0]
176
- ? formatDomainValue(summary.totalBins[0].x0, summary.valueType)
177
- : '0' }), _jsx("span", { className: "absolute -translate-x-full", style: { left: xAxisEnd }, children: summary.totalBins.at(-1)
178
- ? formatDomainValue(summary.totalBins.at(-1).x1, summary.valueType)
179
- : '0' })] })] }));
180
- }
181
- function SummaryCell({ column }) {
182
- if (column.summary.kind === 'histogram') {
183
- return _jsx(HistogramSummaryCell, { summary: column.summary });
184
- }
185
- if (column.summary.kind === 'category') {
186
- return _jsx(CategorySummaryCell, { summary: column.summary });
187
- }
188
- return (_jsx("div", { className: "text-muted-foreground pt-1.5 text-[10px] font-normal", children: column.summary.label }));
189
- }
190
- export function MosaicProfilerHeader({ className, profiler, }) {
191
- return (_jsxs(_Fragment, { children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX } }), profiler.columns.map((column) => (_jsx("col", { style: { width: getProfilerColumnWidthPx(column) } }, column.name)))] }), _jsx(TableHeader, { className: cn('sticky top-0 z-30', className), children: _jsxs(TableRow, { children: [_jsx(TableHead, { className: STICKY_ROW_NUMBER_CLASS, children: "#" }), profiler.columns.map((column) => {
192
- const sortState = profiler.sorting.find((entry) => entry.id === column.name);
193
- return (_jsx(TableHead, { className: cn(getColumnWidthClass(column), STICKY_COLUMN_HEADER_CLASS), children: _jsxs("div", { className: "min-w-0", children: [_jsxs("button", { type: "button", className: "group relative flex w-full items-start gap-1.5 pr-4 text-left", onClick: () => setNextSortState(profiler.sorting, column.name, profiler.setSorting), children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[13px] leading-tight font-semibold", children: column.name }), _jsx(Badge, { variant: "outline", className: "mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60", children: String(column.field.type) })] }), _jsx("span", { className: "text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center", children: sortState ? (sortState.desc ? (_jsx(ChevronDownIcon, { className: "h-4 w-4" })) : (_jsx(ChevronUpIcon, { className: "h-4 w-4" }))) : (_jsxs("span", { className: "flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60", children: [_jsx(ChevronUpIcon, { className: "-mb-1 h-3 w-3" }), _jsx(ChevronDownIcon, { className: "-mt-1 h-3 w-3" })] })) })] }), _jsx(SummaryCell, { column: column })] }) }, column.name));
194
- })] }) })] }));
195
- }
196
- //# sourceMappingURL=MosaicProfilerHeader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerHeader.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AACzE,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,GACrC,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAC,gCAAgC,EAAC,MAAM,SAAS,CAAC;AAOzD,MAAM,kBAAkB,GAAG,UAAU,gCAAgC,UAAU,gCAAgC,cAAc,gCAAgC,KAAK,CAAC;AACnK,MAAM,uBAAuB,GAAG,iDAAiD,mCAAmC,UAAU,mCAAmC,cAAc,mCAAmC,+BAA+B,CAAC;AAClP,MAAM,0BAA0B,GAC9B,wGAAwG,CAAC;AAE3G,SAAS,mBAAmB,CAAC,M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AC,CAAC,CACF,gBAAM,SAAS,EAAC,uGAAuG,aACrH,KAAC,aAAa,IAAC,SAAS,EAAC,eAAe,GAAG,EAC3C,KAAC,eAAe,IAAC,SAAS,EAAC,eAAe,GAAG,IACxC,CACR,GACI,IACA,EACT,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,GAAI,IAC3B,IA7CD,MAAM,CAAC,IAAI,CA8CN,CACb,CAAC;wBACJ,CAAC,CAAC,IACO,GACC,IACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {Badge, cn, TableHead, TableHeader, TableRow} from '@sqlrooms/ui';\nimport {ChevronDownIcon, ChevronUpIcon} from 'lucide-react';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {\n getProfilerColumnWidthPx,\n PROFILER_DEFAULT_COLUMN_WIDTH_PX,\n PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX,\n PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX,\n} from './layout';\nimport type {\n MosaicProfilerCategorySummary,\n MosaicProfilerColumnState,\n MosaicProfilerHistogramSummary,\n MosaicProfilerSorting,\n UseMosaicProfilerReturn,\n} from './types';\nimport {isProfilerUnsupportedSummaryType} from './utils';\n\nexport type MosaicProfilerHeaderProps = {\n className?: string;\n profiler: Pick<UseMosaicProfilerReturn, 'columns' | 'setSorting' | 'sorting'>;\n};\n\nconst COLUMN_WIDTH_CLASS = `min-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px]`;\nconst STICKY_ROW_NUMBER_CLASS = `bg-background sticky left-0 top-0 z-40 min-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] border-r px-1 text-center`;\nconst STICKY_COLUMN_HEADER_CLASS =\n 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';\n\nfunction getColumnWidthClass(column: MosaicProfilerColumnState) {\n return isProfilerUnsupportedSummaryType(column.field.type)\n ? `min-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px]`\n : COLUMN_WIDTH_CLASS;\n}\n\nfunction setNextSortState(\n currentSorting: MosaicProfilerSorting,\n columnId: string,\n setSorting: UseMosaicProfilerReturn['setSorting'],\n) {\n const current = currentSorting.find((entry) => entry.id === columnId);\n if (!current) {\n setSorting([{desc: false, id: columnId}]);\n return;\n }\n if (!current.desc) {\n setSorting([{desc: true, id: columnId}]);\n return;\n }\n setSorting([]);\n}\n\nfunction formatPercentOfTotal(value: number) {\n const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits,\n style: 'percent',\n }).format(value);\n}\n\nfunction CategorySummaryCell({\n summary,\n}: {\n summary: MosaicProfilerCategorySummary;\n}) {\n const [hoveredKey, setHoveredKey] = useState<string>();\n const totalCount = summary.buckets.reduce(\n (acc, bucket) => acc + bucket.totalCount,\n 0,\n );\n const activeBucket = summary.buckets.find(\n (bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey,\n );\n const footerLabel = activeBucket\n ? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`\n : `${summary.bucketCount.toLocaleString()} categories`;\n\n return (\n <div className=\"space-y-0.5 pt-1.5\">\n <div className=\"flex h-10 overflow-hidden rounded-sm border\">\n {summary.buckets.map((bucket) => {\n const width =\n totalCount > 0\n ? `${(bucket.totalCount / totalCount) * 100}%`\n : '0%';\n const fillPct =\n bucket.totalCount > 0\n ? (bucket.filteredCount / bucket.totalCount) * 100\n : 0;\n const isSelected = summary.selectedKey === bucket.key;\n const background =\n bucket.kind === 'overflow'\n ? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`\n : `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;\n\n return (\n <button\n key={bucket.key}\n type=\"button\"\n disabled={!bucket.selectable}\n className={cn(\n 'relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default',\n isSelected && 'ring-ring ring-1 ring-inset',\n !bucket.selectable && 'text-muted-foreground',\n )}\n style={{\n background,\n flexBasis: width,\n flexGrow: bucket.totalCount,\n }}\n onClick={() => summary.toggleValue(bucket.key)}\n onMouseEnter={() => setHoveredKey(bucket.key)}\n onMouseLeave={() => setHoveredKey(undefined)}\n >\n <span className=\"max-w-full truncate px-1\">{bucket.label}</span>\n </button>\n );\n })}\n </div>\n <div className=\"text-muted-foreground truncate text-[10px] font-normal\">\n {footerLabel}\n </div>\n </div>\n );\n}\n\ntype ScaleLike = {\n apply: (value: number | Date) => number;\n domain: [number | Date, number | Date];\n invert: (value: number) => number | Date;\n range: [number, number];\n type: 'linear' | 'utc';\n};\n\nconst histogramInteractorIds = new WeakMap<object, number>();\nlet nextHistogramInteractorId = 0;\n\nfunction getHistogramInteractorId(interactor: object) {\n const cachedId = histogramInteractorIds.get(interactor);\n if (cachedId !== undefined) {\n return cachedId;\n }\n\n const id = ++nextHistogramInteractorId;\n histogramInteractorIds.set(interactor, id);\n return id;\n}\n\nfunction createScale(\n type: ScaleLike['type'],\n domain: [number | Date, number | Date],\n range: [number, number],\n): ScaleLike {\n const [d0, d1] = domain.map((value) =>\n value instanceof Date ? value.getTime() : value,\n ) as [number, number];\n const [r0, r1] = range;\n const span = d1 - d0 || 1;\n const rspan = r1 - r0;\n\n return {\n apply(value: number | Date) {\n const numeric = value instanceof Date ? value.getTime() : value;\n return r0 + ((numeric - d0) / span) * rspan;\n },\n domain,\n invert(value: number) {\n const numeric = d0 + ((value - r0) / (rspan || 1)) * span;\n return type === 'utc' ? new Date(numeric) : numeric;\n },\n range,\n type,\n };\n}\n\nfunction formatDomainValue(value: number | Date, valueType: 'date' | 'number') {\n if (valueType === 'date') {\n const date = value instanceof Date ? value : new Date(value);\n return date.toISOString().slice(0, 10);\n }\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits: 2,\n }).format(typeof value === 'number' ? value : value.getTime());\n}\n\nfunction HistogramSummaryCell({\n summary,\n}: {\n summary: MosaicProfilerHistogramSummary;\n}) {\n const svgRef = useRef<SVGSVGElement>(null);\n const brushRootRef = useRef<SVGGElement>(null);\n const initializedBrushRef = useRef<string | undefined>(undefined);\n\n const layout = useMemo(() => {\n const width = 122;\n const height = 40;\n const margin = {bottom: 4, left: 4, right: 4, top: 2};\n const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;\n const nullBarGap = nullBarWidth > 0 ? 3 : 0;\n const totalBins = summary.totalBins.length\n ? summary.totalBins\n : summary.filteredBins;\n const domain: [number | Date, number | Date] | null =\n totalBins.length > 0\n ? [totalBins[0]!.x0, totalBins[totalBins.length - 1]!.x1]\n : null;\n const totalMax = Math.max(\n summary.totalNullCount,\n ...totalBins.map((bin) => bin.length),\n 1,\n );\n const xScale = domain\n ? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [\n margin.left + nullBarWidth + nullBarGap,\n width - margin.right,\n ])\n : null;\n const yScale = createScale(\n 'linear',\n [0, totalMax],\n [height - margin.bottom, margin.top],\n );\n return {\n height,\n margin,\n nullBarGap,\n nullBarWidth,\n width,\n xScale,\n yScale,\n };\n }, [summary]);\n\n useEffect(() => {\n const svg = svgRef.current;\n const brushRoot = brushRootRef.current;\n const interactor = summary.interactor;\n if (!svg || !brushRoot || !interactor || !layout.xScale) return;\n\n const brushKey = [\n getHistogramInteractorId(interactor),\n summary.valueType,\n layout.xScale.domain\n .map((value) => (value instanceof Date ? value.getTime() : value))\n .join(':'),\n layout.xScale.range.join(':'),\n ].join('|');\n if (initializedBrushRef.current === brushKey) return;\n\n (\n svg as SVGSVGElement & {\n scale: (channel: string) => ScaleLike | undefined;\n }\n ).scale = (channel: string) => {\n if (channel === 'x') return layout.xScale!;\n if (channel === 'y') return layout.yScale;\n return undefined;\n };\n\n brushRoot.replaceChildren();\n interactor.init(svg as any, brushRoot);\n initializedBrushRef.current = brushKey;\n }, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);\n\n const axisY = layout.height - layout.margin.bottom;\n const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;\n const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;\n const xAxisEnd =\n layout.xScale?.range[1] ?? layout.width - layout.margin.right;\n\n return (\n <div className=\"space-y-0 pt-1.5\">\n <svg\n ref={svgRef}\n width={layout.width}\n height={layout.height}\n viewBox={`0 0 ${layout.width} ${layout.height}`}\n className=\"max-w-full overflow-visible\"\n >\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.totalNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.totalNullCount)\n }\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n ) : null}\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.filteredNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.filteredNullCount)\n }\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n ) : null}\n {summary.totalBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`bg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n );\n })}\n {summary.filteredBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`fg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n );\n })}\n <line\n x1={xAxisStart}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisStart}\n x2={xAxisStart}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisEnd}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n {summary.totalNullCount > 0 ? (\n <line\n x1={nullBarCenter}\n x2={nullBarCenter}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--chart-1))\"\n />\n ) : null}\n <g ref={brushRootRef} />\n </svg>\n <div className=\"text-muted-foreground relative h-3.5 text-[10px] font-normal\">\n {summary.totalNullCount > 0 ? (\n <span\n className=\"absolute -translate-x-1/2\"\n style={{left: nullBarCenter}}\n >\n ∅\n </span>\n ) : null}\n <span className=\"absolute\" style={{left: xAxisStart}}>\n {summary.totalBins[0]\n ? formatDomainValue(summary.totalBins[0].x0, summary.valueType)\n : '0'}\n </span>\n <span className=\"absolute -translate-x-full\" style={{left: xAxisEnd}}>\n {summary.totalBins.at(-1)\n ? formatDomainValue(summary.totalBins.at(-1)!.x1, summary.valueType)\n : '0'}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SummaryCell({column}: {column: MosaicProfilerColumnState}) {\n if (column.summary.kind === 'histogram') {\n return <HistogramSummaryCell summary={column.summary} />;\n }\n if (column.summary.kind === 'category') {\n return <CategorySummaryCell summary={column.summary} />;\n }\n return (\n <div className=\"text-muted-foreground pt-1.5 text-[10px] font-normal\">\n {column.summary.label}\n </div>\n );\n}\n\nexport function MosaicProfilerHeader({\n className,\n profiler,\n}: MosaicProfilerHeaderProps) {\n return (\n <>\n <colgroup>\n <col style={{width: PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}} />\n {profiler.columns.map((column) => (\n <col\n key={column.name}\n style={{width: getProfilerColumnWidthPx(column)}}\n />\n ))}\n </colgroup>\n <TableHeader className={cn('sticky top-0 z-30', className)}>\n <TableRow>\n <TableHead className={STICKY_ROW_NUMBER_CLASS}>#</TableHead>\n {profiler.columns.map((column) => {\n const sortState = profiler.sorting.find(\n (entry) => entry.id === column.name,\n );\n return (\n <TableHead\n key={column.name}\n className={cn(\n getColumnWidthClass(column),\n STICKY_COLUMN_HEADER_CLASS,\n )}\n >\n <div className=\"min-w-0\">\n <button\n type=\"button\"\n className=\"group relative flex w-full items-start gap-1.5 pr-4 text-left\"\n onClick={() =>\n setNextSortState(\n profiler.sorting,\n column.name,\n profiler.setSorting,\n )\n }\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-[13px] leading-tight font-semibold\">\n {column.name}\n </div>\n <Badge\n variant=\"outline\"\n className=\"mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60\"\n >\n {String(column.field.type)}\n </Badge>\n </div>\n <span className=\"text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center\">\n {sortState ? (\n sortState.desc ? (\n <ChevronDownIcon className=\"h-4 w-4\" />\n ) : (\n <ChevronUpIcon className=\"h-4 w-4\" />\n )\n ) : (\n <span className=\"flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60\">\n <ChevronUpIcon className=\"-mb-1 h-3 w-3\" />\n <ChevronDownIcon className=\"-mt-1 h-3 w-3\" />\n </span>\n )}\n </span>\n </button>\n <SummaryCell column={column} />\n </div>\n </TableHead>\n );\n })}\n </TableRow>\n </TableHeader>\n </>\n );\n}\n"]}
@@ -1,9 +0,0 @@
1
- import type { UseMosaicProfilerReturn } from './types';
2
- export type MosaicProfilerRowsProps = {
3
- className?: string;
4
- profiler: Pick<UseMosaicProfilerReturn, 'columns' | 'pageTable' | 'pagination' | 'tableError'>;
5
- };
6
- declare function MosaicProfilerRowsImpl({ className, profiler, }: MosaicProfilerRowsProps): import("react/jsx-runtime").JSX.Element;
7
- export declare const MosaicProfilerRows: import("react").MemoExoticComponent<typeof MosaicProfilerRowsImpl>;
8
- export {};
9
- //# sourceMappingURL=MosaicProfilerRows.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerRows.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerRows.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAGrD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CACZ,uBAAuB,EACvB,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,CACtD,CAAC;CACH,CAAC;AA+GF,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,QAAQ,GACT,EAAE,uBAAuB,2CA2CzB;AAoBD,eAAO,MAAM,kBAAkB,oEAW9B,CAAC"}
@@ -1,65 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { ArrowCellValue, isNumericArrowType } from '@sqlrooms/data-table';
3
- import { cn, TableBody, TableCell, TableRow } from '@sqlrooms/ui';
4
- import * as arrow from 'apache-arrow';
5
- import { memo } from 'react';
6
- import { isProfilerUnsupportedSummaryType } from './utils';
7
- const COLUMN_WIDTH_CLASS = 'min-w-[140px] w-[140px] max-w-[140px]';
8
- const ROW_NUMBER_CLASS = 'bg-background text-muted-foreground sticky left-0 z-10 w-[40px] max-w-[40px] min-w-[40px] border-r px-1 text-center';
9
- function getColumnWidthClass(field) {
10
- return isProfilerUnsupportedSummaryType(field.type)
11
- ? 'min-w-[104px] w-[104px] max-w-[104px]'
12
- : COLUMN_WIDTH_CLASS;
13
- }
14
- function formatProfilerValue(type, value) {
15
- if (arrow.DataType.isBinary(type) && value instanceof Uint8Array) {
16
- return `${value.byteLength} bytes`;
17
- }
18
- return undefined;
19
- }
20
- function SizingRow({ columns }) {
21
- return (_jsxs(TableRow, { "aria-hidden": "true", className: "pointer-events-none h-0 border-0 opacity-0 hover:bg-transparent", children: [_jsx(TableCell, { className: "w-[40px] max-w-[40px] min-w-[40px] border-r p-0" }), columns.map((column) => (_jsx(TableCell, { className: cn(getColumnWidthClass(column.field), 'border-r p-0') }, column.name)))] }));
22
- }
23
- function EmptyStateRow({ columns, message, tone = 'muted', }) {
24
- return (_jsxs(TableRow, { children: [_jsx(TableCell, { className: ROW_NUMBER_CLASS }), _jsx(TableCell, { colSpan: Math.max(columns.length, 1), className: cn('max-w-[240px] border-r p-4 align-top font-mono text-xs', tone === 'error'
25
- ? 'text-sm text-red-500'
26
- : 'text-muted-foreground text-sm'), children: message })] }));
27
- }
28
- const DataRow = memo(function DataRow({ columns, pageIndex, pageSize, pageTable, rowIndex, }) {
29
- return (_jsxs(TableRow, { children: [_jsx(TableCell, { className: ROW_NUMBER_CLASS, children: pageIndex * pageSize + rowIndex + 1 }), columns.map((column) => {
30
- const vector = pageTable.getChild(column.name);
31
- const value = vector?.get(rowIndex);
32
- return (_jsx(TableCell, { className: cn(getColumnWidthClass(column.field), 'max-w-[240px] overflow-hidden border-r align-top font-mono text-xs', isNumericArrowType(column.field.type) && 'text-right'), children: _jsx("span", { className: "block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap", children: _jsx(ArrowCellValue, { fieldName: column.name, fontSizeClass: "text-xs", formatValue: formatProfilerValue, type: column.field.type, value: value }) }) }, column.name));
33
- })] }));
34
- });
35
- function MosaicProfilerRowsImpl({ className, profiler, }) {
36
- if (profiler.tableError) {
37
- return (_jsxs(TableBody, { className: className, children: [_jsx(SizingRow, { columns: profiler.columns }), _jsx(EmptyStateRow, { columns: profiler.columns, message: profiler.tableError.message, tone: "error" })] }));
38
- }
39
- if (!profiler.pageTable || profiler.pageTable.numRows === 0) {
40
- return (_jsxs(TableBody, { className: className, children: [_jsx(SizingRow, { columns: profiler.columns }), _jsx(EmptyStateRow, { columns: profiler.columns, message: "No rows" })] }));
41
- }
42
- const rows = Array.from({ length: profiler.pageTable.numRows }, (_, index) => index);
43
- const pageTable = profiler.pageTable;
44
- return (_jsx(TableBody, { className: className, children: rows.map((rowIndex) => (_jsx(DataRow, { columns: profiler.columns, pageIndex: profiler.pagination.pageIndex, pageSize: profiler.pagination.pageSize, pageTable: pageTable, rowIndex: rowIndex }, rowIndex))) }));
45
- }
46
- function areRowColumnsEqual(left, right) {
47
- if (left.length !== right.length) {
48
- return false;
49
- }
50
- return left.every((column, index) => {
51
- const other = right[index];
52
- return (column.name === other?.name &&
53
- column.kind === other.kind &&
54
- column.field === other.field);
55
- });
56
- }
57
- export const MosaicProfilerRows = memo(MosaicProfilerRowsImpl, (previous, next) => previous.className === next.className &&
58
- previous.profiler.pageTable === next.profiler.pageTable &&
59
- previous.profiler.tableError === next.profiler.tableError &&
60
- previous.profiler.pagination.pageIndex ===
61
- next.profiler.pagination.pageIndex &&
62
- previous.profiler.pagination.pageSize ===
63
- next.profiler.pagination.pageSize &&
64
- areRowColumnsEqual(previous.profiler.columns, next.profiler.columns));
65
- //# sourceMappingURL=MosaicProfilerRows.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerRows.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerRows.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAC,EAAE,EAAE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sqlrooms/ui';\nimport * as arrow from 'apache-arrow';\nimport {memo} from 'react';\nimport type {UseMosaicProfilerReturn} from './types';\nimport {isProfilerUnsupportedSummaryType} from './utils';\n\nexport type MosaicProfilerRowsProps = {\n className?: string;\n profiler: Pick<\n UseMosaicProfilerReturn,\n 'columns' | 'pageTable' | 'pagination' | 'tableError'\n >;\n};\n\nconst COLUMN_WIDTH_CLASS = 'min-w-[140px] w-[140px] max-w-[140px]';\nconst ROW_NUMBER_CLASS =\n 'bg-background text-muted-foreground sticky left-0 z-10 w-[40px] max-w-[40px] min-w-[40px] border-r px-1 text-center';\n\nfunction getColumnWidthClass(field: arrow.Field) {\n return isProfilerUnsupportedSummaryType(field.type)\n ? 'min-w-[104px] w-[104px] max-w-[104px]'\n : COLUMN_WIDTH_CLASS;\n}\n\nfunction formatProfilerValue(type: arrow.DataType, value: unknown) {\n if (arrow.DataType.isBinary(type) && value instanceof Uint8Array) {\n return `${value.byteLength} bytes`;\n }\n return undefined;\n}\n\nfunction SizingRow({columns}: {columns: UseMosaicProfilerReturn['columns']}) {\n return (\n <TableRow\n aria-hidden=\"true\"\n className=\"pointer-events-none h-0 border-0 opacity-0 hover:bg-transparent\"\n >\n <TableCell className=\"w-[40px] max-w-[40px] min-w-[40px] border-r p-0\" />\n {columns.map((column) => (\n <TableCell\n key={column.name}\n className={cn(getColumnWidthClass(column.field), 'border-r p-0')}\n />\n ))}\n </TableRow>\n );\n}\n\nfunction EmptyStateRow({\n columns,\n message,\n tone = 'muted',\n}: {\n columns: UseMosaicProfilerReturn['columns'];\n message: string;\n tone?: 'error' | 'muted';\n}) {\n return (\n <TableRow>\n <TableCell className={ROW_NUMBER_CLASS} />\n <TableCell\n colSpan={Math.max(columns.length, 1)}\n className={cn(\n 'max-w-[240px] border-r p-4 align-top font-mono text-xs',\n tone === 'error'\n ? 'text-sm text-red-500'\n : 'text-muted-foreground text-sm',\n )}\n >\n {message}\n </TableCell>\n </TableRow>\n );\n}\n\ntype DataRowProps = {\n columns: UseMosaicProfilerReturn['columns'];\n pageIndex: number;\n pageSize: number;\n pageTable: NonNullable<UseMosaicProfilerReturn['pageTable']>;\n rowIndex: number;\n};\n\nconst DataRow = memo(function DataRow({\n columns,\n pageIndex,\n pageSize,\n pageTable,\n rowIndex,\n}: DataRowProps) {\n return (\n <TableRow>\n <TableCell className={ROW_NUMBER_CLASS}>\n {pageIndex * pageSize + rowIndex + 1}\n </TableCell>\n {columns.map((column) => {\n const vector = pageTable.getChild(column.name) as arrow.Vector | null;\n const value = vector?.get(rowIndex);\n return (\n <TableCell\n key={column.name}\n className={cn(\n getColumnWidthClass(column.field),\n 'max-w-[240px] overflow-hidden border-r align-top font-mono text-xs',\n isNumericArrowType(column.field.type) && 'text-right',\n )}\n >\n <span className=\"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap\">\n <ArrowCellValue\n fieldName={column.name}\n fontSizeClass=\"text-xs\"\n formatValue={formatProfilerValue}\n type={column.field.type}\n value={value}\n />\n </span>\n </TableCell>\n );\n })}\n </TableRow>\n );\n});\n\nfunction MosaicProfilerRowsImpl({\n className,\n profiler,\n}: MosaicProfilerRowsProps) {\n if (profiler.tableError) {\n return (\n <TableBody className={className}>\n <SizingRow columns={profiler.columns} />\n <EmptyStateRow\n columns={profiler.columns}\n message={profiler.tableError.message}\n tone=\"error\"\n />\n </TableBody>\n );\n }\n\n if (!profiler.pageTable || profiler.pageTable.numRows === 0) {\n return (\n <TableBody className={className}>\n <SizingRow columns={profiler.columns} />\n <EmptyStateRow columns={profiler.columns} message=\"No rows\" />\n </TableBody>\n );\n }\n\n const rows = Array.from(\n {length: profiler.pageTable.numRows},\n (_, index) => index,\n );\n const pageTable = profiler.pageTable;\n\n return (\n <TableBody className={className}>\n {rows.map((rowIndex) => (\n <DataRow\n key={rowIndex}\n columns={profiler.columns}\n pageIndex={profiler.pagination.pageIndex}\n pageSize={profiler.pagination.pageSize}\n pageTable={pageTable}\n rowIndex={rowIndex}\n />\n ))}\n </TableBody>\n );\n}\n\nfunction areRowColumnsEqual(\n left: UseMosaicProfilerReturn['columns'],\n right: UseMosaicProfilerReturn['columns'],\n) {\n if (left.length !== right.length) {\n return false;\n }\n\n return left.every((column, index) => {\n const other = right[index];\n return (\n column.name === other?.name &&\n column.kind === other.kind &&\n column.field === other.field\n );\n });\n}\n\nexport const MosaicProfilerRows = memo(\n MosaicProfilerRowsImpl,\n (previous, next) =>\n previous.className === next.className &&\n previous.profiler.pageTable === next.profiler.pageTable &&\n previous.profiler.tableError === next.profiler.tableError &&\n previous.profiler.pagination.pageIndex ===\n next.profiler.pagination.pageIndex &&\n previous.profiler.pagination.pageSize ===\n next.profiler.pagination.pageSize &&\n areRowColumnsEqual(previous.profiler.columns, next.profiler.columns),\n);\n"]}
@@ -1,9 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { UseMosaicProfilerReturn } from './types';
3
- export type MosaicProfilerStatusBarProps = {
4
- className?: string;
5
- profiler: Pick<UseMosaicProfilerReturn, 'filteredRowCount' | 'hasFilters' | 'pagination' | 'reset' | 'setPagination' | 'sql' | 'totalRowCount'>;
6
- renderActions?: (sql: string) => ReactNode;
7
- };
8
- export declare function MosaicProfilerStatusBar({ className, profiler, renderActions, }: MosaicProfilerStatusBarProps): import("react/jsx-runtime").JSX.Element;
9
- //# sourceMappingURL=MosaicProfilerStatusBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerStatusBar.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerStatusBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGrC,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAErD,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CACZ,uBAAuB,EACrB,kBAAkB,GAClB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,eAAe,GACf,KAAK,GACL,eAAe,CAClB,CAAC;IACF,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAC;CAC5C,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,EACR,aAAa,GACd,EAAE,4BAA4B,2CAmF9B"}
@@ -1,28 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, cn } from '@sqlrooms/ui';
3
- import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
4
- export function MosaicProfilerStatusBar({ className, profiler, renderActions, }) {
5
- const actions = renderActions?.(profiler.sql);
6
- const totalPages = profiler.filteredRowCount !== undefined
7
- ? Math.max(1, Math.ceil(profiler.filteredRowCount / profiler.pagination.pageSize))
8
- : undefined;
9
- const canGoPrevious = profiler.pagination.pageIndex > 0;
10
- const canGoNext = totalPages !== undefined && profiler.pagination.pageIndex < totalPages - 1;
11
- const showPaginationLabel = totalPages !== undefined;
12
- return (_jsxs("div", { className: cn('flex items-center justify-between gap-3 border-t px-3 py-2 text-sm', className), children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsxs("div", { className: "flex items-center gap-1 whitespace-nowrap", children: [_jsx(Button, { variant: "ghost", size: "xs", className: "h-6 w-6 p-0", "aria-label": "Previous page", disabled: !canGoPrevious, onClick: () => {
13
- profiler.setPagination((prev) => ({
14
- ...prev,
15
- pageIndex: Math.max(0, prev.pageIndex - 1),
16
- }));
17
- }, children: _jsx(ChevronLeftIcon, { size: 14 }) }), showPaginationLabel ? (_jsxs("span", { className: "text-muted-foreground min-w-14 text-center text-[11px]", children: [profiler.pagination.pageIndex + 1, " / ", totalPages] })) : null, _jsx(Button, { variant: "ghost", size: "xs", className: "h-6 w-6 p-0", "aria-label": "Next page", disabled: !canGoNext, onClick: () => {
18
- profiler.setPagination((prev) => ({
19
- ...prev,
20
- pageIndex: totalPages === undefined
21
- ? prev.pageIndex
22
- : Math.min(totalPages - 1, prev.pageIndex + 1),
23
- }));
24
- }, children: _jsx(ChevronRightIcon, { size: 14 }) })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "link", size: "sm", className: "h-auto px-0", disabled: !profiler.hasFilters, onClick: profiler.reset, children: "Reset" }), _jsxs("span", { className: "text-muted-foreground text-xs", children: [profiler.filteredRowCount?.toLocaleString() ?? '0', profiler.totalRowCount !== undefined
25
- ? ` of ${profiler.totalRowCount.toLocaleString()} rows`
26
- : ' rows'] })] })] }), actions ? _jsx("div", { children: actions }) : null] }));
27
- }
28
- //# sourceMappingURL=MosaicProfilerStatusBar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MosaicProfilerStatusBar.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerStatusBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,MAAM,EAAE,EAAE,EAAC,MAAM,cAAc,CAAC;AACxC,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAkB/D,MAAM,UAAU,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,EACR,aAAa,GACgB;IAC7B,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC9C,MAAM,UAAU,GACd,QAAQ,CAAC,gBAAgB,KAAK,SAAS;QACrC,CAAC,CAAC,IAAI,CAAC,GAAG,CACN,CAAC,EACD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CACpE;QACH,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,aAAa,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;IACxD,MAAM,SAAS,GACb,UAAU,KAAK,SAAS,IAAI,QAAQ,CAAC,UAAU,CAAC,SAAS,GAAG,UAAU,GAAG,CAAC,CAAC;IAC7E,MAAM,mBAAmB,GAAG,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IAAC,IAAI,EAAE,EAAE,GAAI,GACvB,IACL,EACN,eAAK,SAAS,EAAC,yBAAyB,aACtC,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,aAAa,EACvB,QAAQ,EAAE,CAAC,QAAQ,CAAC,UAAU,EAC9B,OAAO,EAAE,QAAQ,CAAC,KAAK,sBAGhB,EACT,gBAAM,SAAS,EAAC,+BAA+B,aAC5C,QAAQ,CAAC,gBAAgB,EAAE,cAAc,EAAE,IAAI,GAAG,EAClD,QAAQ,CAAC,aAAa,KAAK,SAAS;wCACnC,CAAC,CAAC,OAAO,QAAQ,CAAC,aAAa,CAAC,cAAc,EAAE,OAAO;wCACvD,CAAC,CAAC,OAAO,IACN,IACH,IACF,EACL,OAAO,CAAC,CAAC,CAAC,wBAAM,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IAClC,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type {ReactNode} from 'react';\nimport {Button, cn} from '@sqlrooms/ui';\nimport {ChevronLeftIcon, ChevronRightIcon} from 'lucide-react';\nimport type {UseMosaicProfilerReturn} from './types';\n\nexport type MosaicProfilerStatusBarProps = {\n className?: string;\n profiler: Pick<\n UseMosaicProfilerReturn,\n | 'filteredRowCount'\n | 'hasFilters'\n | 'pagination'\n | 'reset'\n | 'setPagination'\n | 'sql'\n | 'totalRowCount'\n >;\n renderActions?: (sql: string) => ReactNode;\n};\n\nexport function MosaicProfilerStatusBar({\n className,\n profiler,\n renderActions,\n}: MosaicProfilerStatusBarProps) {\n const actions = renderActions?.(profiler.sql);\n const totalPages =\n profiler.filteredRowCount !== undefined\n ? Math.max(\n 1,\n Math.ceil(profiler.filteredRowCount / profiler.pagination.pageSize),\n )\n : undefined;\n const canGoPrevious = profiler.pagination.pageIndex > 0;\n const canGoNext =\n totalPages !== undefined && profiler.pagination.pageIndex < totalPages - 1;\n const showPaginationLabel = totalPages !== undefined;\n\n return (\n <div\n className={cn(\n 'flex items-center justify-between gap-3 border-t px-3 py-2 text-sm',\n className,\n )}\n >\n <div className=\"flex items-center gap-3\">\n <div className=\"flex items-center gap-1 whitespace-nowrap\">\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"h-6 w-6 p-0\"\n aria-label=\"Previous page\"\n disabled={!canGoPrevious}\n onClick={() => {\n profiler.setPagination((prev) => ({\n ...prev,\n pageIndex: Math.max(0, prev.pageIndex - 1),\n }));\n }}\n >\n <ChevronLeftIcon size={14} />\n </Button>\n {showPaginationLabel ? (\n <span className=\"text-muted-foreground min-w-14 text-center text-[11px]\">\n {profiler.pagination.pageIndex + 1} / {totalPages}\n </span>\n ) : null}\n <Button\n variant=\"ghost\"\n size=\"xs\"\n className=\"h-6 w-6 p-0\"\n aria-label=\"Next page\"\n disabled={!canGoNext}\n onClick={() => {\n profiler.setPagination((prev) => ({\n ...prev,\n pageIndex:\n totalPages === undefined\n ? prev.pageIndex\n : Math.min(totalPages - 1, prev.pageIndex + 1),\n }));\n }}\n >\n <ChevronRightIcon size={14} />\n </Button>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"link\"\n size=\"sm\"\n className=\"h-auto px-0\"\n disabled={!profiler.hasFilters}\n onClick={profiler.reset}\n >\n Reset\n </Button>\n <span className=\"text-muted-foreground text-xs\">\n {profiler.filteredRowCount?.toLocaleString() ?? '0'}\n {profiler.totalRowCount !== undefined\n ? ` of ${profiler.totalRowCount.toLocaleString()} rows`\n : ' rows'}\n </span>\n </div>\n </div>\n {actions ? <div>{actions}</div> : null}\n </div>\n );\n}\n"]}