@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
@@ -0,0 +1,349 @@
1
+ import { asc, column, count, desc, Query, sql, sum } from '@uwdata/mosaic-sql';
2
+ import * as arrow from 'apache-arrow';
3
+ export function isDataTableExplorerHistogramType(type) {
4
+ return (arrow.DataType.isDate(type) ||
5
+ arrow.DataType.isTimestamp(type) ||
6
+ arrow.DataType.isDecimal(type) ||
7
+ arrow.DataType.isFloat(type) ||
8
+ arrow.DataType.isInt(type));
9
+ }
10
+ export function isDataTableExplorerUnsupportedSummaryType(type) {
11
+ return (arrow.DataType.isBinary(type) ||
12
+ type.toString().toLowerCase().includes('geometry'));
13
+ }
14
+ export function getDataTableExplorerValueType(type) {
15
+ if (arrow.DataType.isDate(type) || arrow.DataType.isTimestamp(type)) {
16
+ return 'date';
17
+ }
18
+ if (arrow.DataType.isDecimal(type) ||
19
+ arrow.DataType.isFloat(type) ||
20
+ arrow.DataType.isInt(type)) {
21
+ return 'number';
22
+ }
23
+ return 'string';
24
+ }
25
+ export function buildSchemaQuery(tableName, columns) {
26
+ return Query.from(tableName)
27
+ .select(columns?.length ? columns.map((name) => column(name)) : ['*'])
28
+ .limit(1);
29
+ }
30
+ function createDataTableExplorerArrowType(sqlType) {
31
+ const type = sqlType.toLowerCase();
32
+ if (/^bool(ean)?/.test(type)) {
33
+ return new arrow.Bool();
34
+ }
35
+ if (/^date$/.test(type)) {
36
+ return new arrow.DateDay();
37
+ }
38
+ if (/^time$|^timestamp|^timestamptz/.test(type)) {
39
+ return new arrow.TimestampMillisecond();
40
+ }
41
+ if (/^(tinyint|smallint|integer|bigint|hugeint|utinyint|usmallint|uinteger|ubigint|uhugeint)/.test(type)) {
42
+ return new arrow.Int64();
43
+ }
44
+ if (/^(decimal|numeric)/.test(type)) {
45
+ return new arrow.Decimal(38, 9);
46
+ }
47
+ if (/^(double|float|real)/.test(type)) {
48
+ return new arrow.Float64();
49
+ }
50
+ if (/^(blob|bytea|binary|varbinary)/.test(type)) {
51
+ return new arrow.Binary();
52
+ }
53
+ if (/^geometry/.test(type)) {
54
+ return {
55
+ toString() {
56
+ return sqlType;
57
+ },
58
+ };
59
+ }
60
+ return new arrow.Utf8();
61
+ }
62
+ export function fieldInfoToDataTableExplorerField(info) {
63
+ return new arrow.Field(info.column, createDataTableExplorerArrowType(info.sqlType), info.nullable);
64
+ }
65
+ export function buildDataTableExplorerBaseQuery(args) {
66
+ const { columns, filter, sorting, tableName } = args;
67
+ const query = Query.from(tableName)
68
+ .select(columns?.length ? columns.map((name) => column(name)) : ['*'])
69
+ .where(filter ?? []);
70
+ if (sorting?.length) {
71
+ query.orderby(sorting.map((entry) => (entry.desc ? desc(entry.id) : asc(entry.id))));
72
+ }
73
+ return query;
74
+ }
75
+ export function buildDataTableExplorerPageQuery(baseQuery, pagination) {
76
+ const { pageIndex, pageSize } = normalizeDataTableExplorerPagination(pagination);
77
+ return baseQuery
78
+ .clone()
79
+ .limit(pageSize)
80
+ .offset(pageIndex * pageSize);
81
+ }
82
+ export function normalizeDataTableExplorerPagination(pagination) {
83
+ const pageSize = Math.min(1000, Math.max(1, Math.trunc(Number(pagination?.pageSize) || 0) || 100));
84
+ const pageIndex = Math.max(0, Math.trunc(Number(pagination?.pageIndex) || 0));
85
+ return { pageIndex, pageSize };
86
+ }
87
+ export function buildCountQuery(args) {
88
+ return Query.from(args.tableName)
89
+ .select({ count: count() })
90
+ .where(args.filter ?? []);
91
+ }
92
+ export function buildDistinctCountQuery(args) {
93
+ return Query.from(args.tableName)
94
+ .select({
95
+ count: count(column(args.fieldName)).distinct(),
96
+ })
97
+ .where(args.filter ?? []);
98
+ }
99
+ export function readCountData(data) {
100
+ if (!data || typeof data !== 'object') {
101
+ return undefined;
102
+ }
103
+ if ('toArray' in data && typeof data.toArray === 'function') {
104
+ return data.toArray()[0]?.count;
105
+ }
106
+ if ('get' in data && typeof data.get === 'function') {
107
+ return data.get(0)?.count;
108
+ }
109
+ return undefined;
110
+ }
111
+ export function rowsFromQueryResult(data) {
112
+ if (!data ||
113
+ typeof data !== 'object' ||
114
+ !('toArray' in data) ||
115
+ typeof data.toArray !== 'function') {
116
+ return [];
117
+ }
118
+ return Array.from(data.toArray());
119
+ }
120
+ export function buildCategorySummaryQuery(tableName, fieldName, filter) {
121
+ const col = column(fieldName);
122
+ const counts = Query.from({ source: tableName })
123
+ .select({
124
+ bucket_kind: sql `CASE
125
+ WHEN ${col} IS NULL THEN 'null'
126
+ ELSE 'value'
127
+ END`,
128
+ typed_value: col,
129
+ count: count(),
130
+ })
131
+ .groupby([
132
+ sql `CASE
133
+ WHEN ${col} IS NULL THEN 'null'
134
+ ELSE 'value'
135
+ END`,
136
+ col,
137
+ ])
138
+ .where(filter ?? []);
139
+ return Query.with({ counts })
140
+ .select({
141
+ bucketKind: sql `CASE
142
+ WHEN "count" = 1 AND "bucket_kind" = 'value' THEN 'unique'
143
+ ELSE "bucket_kind"
144
+ END`,
145
+ typedValue: sql `CASE
146
+ WHEN "count" = 1 AND "bucket_kind" = 'value' THEN NULL
147
+ ELSE "typed_value"
148
+ END`,
149
+ total: sum('count'),
150
+ })
151
+ .from('counts')
152
+ .groupby([
153
+ sql `CASE
154
+ WHEN "count" = 1 AND "bucket_kind" = 'value' THEN 'unique'
155
+ ELSE "bucket_kind"
156
+ END`,
157
+ sql `CASE
158
+ WHEN "count" = 1 AND "bucket_kind" = 'value' THEN NULL
159
+ ELSE "typed_value"
160
+ END`,
161
+ ]);
162
+ }
163
+ export function splitHistogramBins(rows) {
164
+ let nullCount = 0;
165
+ const bins = [];
166
+ for (const row of rows) {
167
+ if (row.x1 == null || row.x2 == null) {
168
+ nullCount += row.y;
169
+ continue;
170
+ }
171
+ bins.push({
172
+ x0: row.x1,
173
+ x1: row.x2,
174
+ length: row.y,
175
+ });
176
+ }
177
+ bins.sort((left, right) => {
178
+ const leftValue = left.x0 instanceof Date ? left.x0.getTime() : left.x0;
179
+ const rightValue = right.x0 instanceof Date ? right.x0.getTime() : right.x0;
180
+ return leftValue - rightValue;
181
+ });
182
+ return { bins, nullCount };
183
+ }
184
+ export function buildCategoryBuckets(filteredRows, totalRows, categoryLimit, selectedKey) {
185
+ const totalByKey = new Map(totalRows.map((row) => [serializeCategoryBucketKey(row), row.total]));
186
+ const filteredByKey = new Map(filteredRows.map((row) => [serializeCategoryBucketKey(row), row.total]));
187
+ const baseRows = totalRows
188
+ .filter((row) => row.bucketKind === 'value')
189
+ .slice()
190
+ .sort((left, right) => right.total - left.total);
191
+ const visibleRows = baseRows.slice(0, categoryLimit);
192
+ const overflowRows = baseRows.slice(categoryLimit);
193
+ const buckets = visibleRows.map((row) => ({
194
+ filteredCount: filteredByKey.get(serializeCategoryBucketKey(row)) ?? 0,
195
+ key: serializeCategoryBucketKey(row),
196
+ kind: 'value',
197
+ label: String(row.typedValue),
198
+ selectable: true,
199
+ totalCount: row.total,
200
+ }));
201
+ const overflowTotalCount = overflowRows.reduce((acc, row) => acc + row.total, 0);
202
+ const overflowFilteredCount = overflowRows.reduce((acc, row) => acc + (filteredByKey.get(serializeCategoryBucketKey(row)) ?? 0), 0);
203
+ if (overflowTotalCount > 0) {
204
+ buckets.push({
205
+ filteredCount: overflowFilteredCount,
206
+ key: serializeCategoryBucketKey({
207
+ bucketKind: 'unique',
208
+ typedValue: '__sqlrooms_overflow__',
209
+ }),
210
+ kind: 'overflow',
211
+ label: `${overflowRows.length} more`,
212
+ selectable: false,
213
+ totalCount: overflowTotalCount,
214
+ });
215
+ }
216
+ const uniqueKey = serializeCategoryBucketKey({
217
+ bucketKind: 'unique',
218
+ typedValue: null,
219
+ });
220
+ const uniqueTotalCount = totalByKey.get(uniqueKey) ?? 0;
221
+ if (uniqueTotalCount > 0) {
222
+ buckets.push({
223
+ filteredCount: filteredByKey.get(uniqueKey) ?? 0,
224
+ key: uniqueKey,
225
+ kind: 'unique',
226
+ label: 'unique',
227
+ selectable: false,
228
+ totalCount: uniqueTotalCount,
229
+ });
230
+ }
231
+ const nullKey = serializeCategoryBucketKey({
232
+ bucketKind: 'null',
233
+ typedValue: null,
234
+ });
235
+ const nullTotalCount = totalByKey.get(nullKey) ?? 0;
236
+ if (nullTotalCount > 0) {
237
+ buckets.push({
238
+ filteredCount: filteredByKey.get(nullKey) ?? 0,
239
+ key: nullKey,
240
+ kind: 'null',
241
+ label: 'null',
242
+ selectable: true,
243
+ totalCount: nullTotalCount,
244
+ });
245
+ }
246
+ return {
247
+ bucketCount: filteredRows.length,
248
+ buckets,
249
+ selectedKey,
250
+ };
251
+ }
252
+ export function isSelectableCategoryKey(key) {
253
+ const parsedKey = parseCategoryBucketKey(key);
254
+ return (parsedKey?.bucketKind !== 'unique' &&
255
+ parsedKey?.typedValue !== '__sqlrooms_overflow__');
256
+ }
257
+ export function categoryKeyToSelectionValue(key) {
258
+ if (key === undefined)
259
+ return undefined;
260
+ const parsedKey = parseCategoryBucketKey(key);
261
+ if (!parsedKey || parsedKey.bucketKind === 'unique') {
262
+ return undefined;
263
+ }
264
+ return parsedKey.bucketKind === 'null' ? null : parsedKey.typedValue;
265
+ }
266
+ function normalizeCategoryBucketValue(value) {
267
+ if (value instanceof Date) {
268
+ return {
269
+ type: 'date',
270
+ value: value.toISOString(),
271
+ };
272
+ }
273
+ if (typeof value === 'bigint') {
274
+ return {
275
+ type: 'bigint',
276
+ value: value.toString(),
277
+ };
278
+ }
279
+ return value;
280
+ }
281
+ function denormalizeCategoryBucketValue(value) {
282
+ if (!value || typeof value !== 'object') {
283
+ return value;
284
+ }
285
+ if ('type' in value &&
286
+ 'value' in value &&
287
+ value.type === 'date' &&
288
+ typeof value.value === 'string') {
289
+ return new Date(value.value);
290
+ }
291
+ if ('type' in value &&
292
+ 'value' in value &&
293
+ value.type === 'bigint' &&
294
+ typeof value.value === 'string') {
295
+ return BigInt(value.value);
296
+ }
297
+ return value;
298
+ }
299
+ export function serializeCategoryBucketKey(row) {
300
+ return JSON.stringify([
301
+ row.bucketKind,
302
+ normalizeCategoryBucketValue(row.typedValue),
303
+ ]);
304
+ }
305
+ export function parseCategoryBucketKey(key) {
306
+ try {
307
+ const parsed = JSON.parse(key);
308
+ if (!Array.isArray(parsed) || parsed.length !== 2) {
309
+ return undefined;
310
+ }
311
+ return {
312
+ bucketKind: parsed[0],
313
+ typedValue: denormalizeCategoryBucketValue(parsed[1]),
314
+ };
315
+ }
316
+ catch {
317
+ return undefined;
318
+ }
319
+ }
320
+ export function createEmptySummaryState(field) {
321
+ if (isDataTableExplorerUnsupportedSummaryType(field.type)) {
322
+ return {
323
+ isLoading: false,
324
+ kind: 'unsupported',
325
+ label: 'No summary',
326
+ };
327
+ }
328
+ return isDataTableExplorerHistogramType(field.type)
329
+ ? {
330
+ filteredBins: [],
331
+ filteredNullCount: 0,
332
+ interactor: null,
333
+ isLoading: true,
334
+ kind: 'histogram',
335
+ totalBins: [],
336
+ totalNullCount: 0,
337
+ valueType: getDataTableExplorerValueType(field.type) === 'date'
338
+ ? 'date'
339
+ : 'number',
340
+ }
341
+ : {
342
+ bucketCount: 0,
343
+ buckets: [],
344
+ isLoading: true,
345
+ kind: 'category',
346
+ toggleValue: () => { },
347
+ };
348
+ }
349
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/data-table-explorer/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAC,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAiBtC,MAAM,UAAU,gCAAgC,CAC9C,IAAoB;IAEpB,OAAO,CACL,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3B,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC;QAChC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;QAC9B,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;QAC5B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yCAAyC,CACvD,IAAoB;IAEpB,OAAO,CACL,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CACnD,CAAC;AACJ,CA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AAC,KAAK,CAAC,IAAI,CAAC,KAAK,MAAM;gBAClD,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,QAAQ;SACf;QACH,CAAC,CAAC;YACE,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC;SACtB,CAAC;AACR,CAAC","sourcesContent":["import type {FieldInfo} from '@uwdata/mosaic-core';\nimport {asc, column, count, desc, Query, sql, sum} from '@uwdata/mosaic-sql';\nimport * as arrow from 'apache-arrow';\nimport type {\n DataTableExplorerBin,\n DataTableExplorerCategoryBucket,\n DataTableExplorerPaginationState,\n DataTableExplorerSorting,\n DataTableExplorerSummaryState,\n} from './types';\n\nexport type CategoryCountRow = {\n bucketKind: 'null' | 'unique' | 'value';\n total: number;\n typedValue: unknown;\n};\n\ntype QueryWhereInput = Parameters<ReturnType<typeof Query.from>['where']>[0];\n\nexport function isDataTableExplorerHistogramType(\n type: arrow.DataType,\n): boolean {\n return (\n arrow.DataType.isDate(type) ||\n arrow.DataType.isTimestamp(type) ||\n arrow.DataType.isDecimal(type) ||\n arrow.DataType.isFloat(type) ||\n arrow.DataType.isInt(type)\n );\n}\n\nexport function isDataTableExplorerUnsupportedSummaryType(\n type: arrow.DataType,\n): boolean {\n return (\n arrow.DataType.isBinary(type) ||\n type.toString().toLowerCase().includes('geometry')\n );\n}\n\nexport function getDataTableExplorerValueType(\n type: arrow.DataType,\n): 'date' | 'number' | 'string' {\n if (arrow.DataType.isDate(type) || arrow.DataType.isTimestamp(type)) {\n return 'date';\n }\n if (\n arrow.DataType.isDecimal(type) ||\n arrow.DataType.isFloat(type) ||\n arrow.DataType.isInt(type)\n ) {\n return 'number';\n }\n return 'string';\n}\n\nexport function buildSchemaQuery(\n tableName: string,\n columns?: string[],\n): ReturnType<typeof Query.from> {\n return Query.from(tableName)\n .select(columns?.length ? columns.map((name) => column(name)) : ['*'])\n .limit(1);\n}\n\nfunction createDataTableExplorerArrowType(sqlType: string): arrow.DataType {\n const type = sqlType.toLowerCase();\n\n if (/^bool(ean)?/.test(type)) {\n return new arrow.Bool();\n }\n\n if (/^date$/.test(type)) {\n return new arrow.DateDay();\n }\n\n if (/^time$|^timestamp|^timestamptz/.test(type)) {\n return new arrow.TimestampMillisecond();\n }\n\n if (\n /^(tinyint|smallint|integer|bigint|hugeint|utinyint|usmallint|uinteger|ubigint|uhugeint)/.test(\n type,\n )\n ) {\n return new arrow.Int64();\n }\n\n if (/^(decimal|numeric)/.test(type)) {\n return new arrow.Decimal(38, 9);\n }\n\n if (/^(double|float|real)/.test(type)) {\n return new arrow.Float64();\n }\n\n if (/^(blob|bytea|binary|varbinary)/.test(type)) {\n return new arrow.Binary();\n }\n\n if (/^geometry/.test(type)) {\n return {\n toString() {\n return sqlType;\n },\n } as arrow.DataType;\n }\n\n return new arrow.Utf8();\n}\n\nexport function fieldInfoToDataTableExplorerField(\n info: FieldInfo,\n): arrow.Field {\n return new arrow.Field(\n info.column,\n createDataTableExplorerArrowType(info.sqlType),\n info.nullable,\n );\n}\n\nexport function buildDataTableExplorerBaseQuery(args: {\n columns?: string[];\n filter?: QueryWhereInput;\n sorting?: DataTableExplorerSorting;\n tableName: string;\n}) {\n const {columns, filter, sorting, tableName} = args;\n const query = Query.from(tableName)\n .select(columns?.length ? columns.map((name) => column(name)) : ['*'])\n .where(filter ?? []);\n\n if (sorting?.length) {\n query.orderby(\n sorting.map((entry) => (entry.desc ? desc(entry.id) : asc(entry.id))),\n );\n }\n\n return query;\n}\n\nexport function buildDataTableExplorerPageQuery(\n baseQuery: ReturnType<typeof buildDataTableExplorerBaseQuery>,\n pagination: DataTableExplorerPaginationState,\n) {\n const {pageIndex, pageSize} =\n normalizeDataTableExplorerPagination(pagination);\n\n return baseQuery\n .clone()\n .limit(pageSize)\n .offset(pageIndex * pageSize);\n}\n\nexport function normalizeDataTableExplorerPagination(\n pagination: Partial<DataTableExplorerPaginationState> | undefined,\n): DataTableExplorerPaginationState {\n const pageSize = Math.min(\n 1000,\n Math.max(1, Math.trunc(Number(pagination?.pageSize) || 0) || 100),\n );\n const pageIndex = Math.max(0, Math.trunc(Number(pagination?.pageIndex) || 0));\n\n return {pageIndex, pageSize};\n}\n\nexport function buildCountQuery(args: {\n filter?: QueryWhereInput;\n tableName: string;\n}) {\n return Query.from(args.tableName)\n .select({count: count()})\n .where(args.filter ?? []);\n}\n\nexport function buildDistinctCountQuery(args: {\n filter?: QueryWhereInput;\n fieldName: string;\n tableName: string;\n}) {\n return Query.from(args.tableName)\n .select({\n count: count(column(args.fieldName)).distinct(),\n })\n .where(args.filter ?? []);\n}\n\nexport function readCountData(data: unknown): number | undefined {\n if (!data || typeof data !== 'object') {\n return undefined;\n }\n\n if ('toArray' in data && typeof data.toArray === 'function') {\n return (data.toArray() as Array<{count?: number}>)[0]?.count;\n }\n\n if ('get' in data && typeof data.get === 'function') {\n return (data.get(0) as {count?: number} | undefined)?.count;\n }\n\n return undefined;\n}\n\nexport function rowsFromQueryResult<T>(data: unknown): T[] {\n if (\n !data ||\n typeof data !== 'object' ||\n !('toArray' in data) ||\n typeof (data as {toArray?: unknown}).toArray !== 'function'\n ) {\n return [];\n }\n\n return Array.from((data as {toArray(): T[]}).toArray());\n}\n\nexport function buildCategorySummaryQuery(\n tableName: string,\n fieldName: string,\n filter?: QueryWhereInput,\n) {\n const col = column(fieldName);\n const counts = Query.from({source: tableName})\n .select({\n bucket_kind: sql`CASE\n WHEN ${col} IS NULL THEN 'null'\n ELSE 'value'\n END`,\n typed_value: col,\n count: count(),\n })\n .groupby([\n sql`CASE\n WHEN ${col} IS NULL THEN 'null'\n ELSE 'value'\n END`,\n col,\n ])\n .where(filter ?? []);\n\n return Query.with({counts})\n .select({\n bucketKind: sql`CASE\n WHEN \"count\" = 1 AND \"bucket_kind\" = 'value' THEN 'unique'\n ELSE \"bucket_kind\"\n END`,\n typedValue: sql`CASE\n WHEN \"count\" = 1 AND \"bucket_kind\" = 'value' THEN NULL\n ELSE \"typed_value\"\n END`,\n total: sum('count'),\n })\n .from('counts')\n .groupby([\n sql`CASE\n WHEN \"count\" = 1 AND \"bucket_kind\" = 'value' THEN 'unique'\n ELSE \"bucket_kind\"\n END`,\n sql`CASE\n WHEN \"count\" = 1 AND \"bucket_kind\" = 'value' THEN NULL\n ELSE \"typed_value\"\n END`,\n ]);\n}\n\nexport function splitHistogramBins(\n rows: Array<{\n x1: DataTableExplorerBin['x0'] | null;\n x2: DataTableExplorerBin['x1'] | null;\n y: number;\n }>,\n) {\n let nullCount = 0;\n const bins: DataTableExplorerBin[] = [];\n\n for (const row of rows) {\n if (row.x1 == null || row.x2 == null) {\n nullCount += row.y;\n continue;\n }\n\n bins.push({\n x0: row.x1,\n x1: row.x2,\n length: row.y,\n });\n }\n\n bins.sort((left, right) => {\n const leftValue = left.x0 instanceof Date ? left.x0.getTime() : left.x0;\n const rightValue = right.x0 instanceof Date ? right.x0.getTime() : right.x0;\n return leftValue - rightValue;\n });\n\n return {bins, nullCount};\n}\n\nexport function buildCategoryBuckets(\n filteredRows: CategoryCountRow[],\n totalRows: CategoryCountRow[],\n categoryLimit: number,\n selectedKey?: string,\n) {\n const totalByKey = new Map(\n totalRows.map((row) => [serializeCategoryBucketKey(row), row.total]),\n );\n const filteredByKey = new Map(\n filteredRows.map((row) => [serializeCategoryBucketKey(row), row.total]),\n );\n\n const baseRows = totalRows\n .filter((row) => row.bucketKind === 'value')\n .slice()\n .sort(\n (left: CategoryCountRow, right: CategoryCountRow) =>\n right.total - left.total,\n );\n\n const visibleRows = baseRows.slice(0, categoryLimit);\n const overflowRows = baseRows.slice(categoryLimit);\n const buckets: DataTableExplorerCategoryBucket[] = visibleRows.map((row) => ({\n filteredCount: filteredByKey.get(serializeCategoryBucketKey(row)) ?? 0,\n key: serializeCategoryBucketKey(row),\n kind: 'value',\n label: String(row.typedValue),\n selectable: true,\n totalCount: row.total,\n }));\n\n const overflowTotalCount = overflowRows.reduce(\n (acc: number, row: CategoryCountRow) => acc + row.total,\n 0,\n );\n const overflowFilteredCount = overflowRows.reduce(\n (acc: number, row: CategoryCountRow) =>\n acc + (filteredByKey.get(serializeCategoryBucketKey(row)) ?? 0),\n 0,\n );\n if (overflowTotalCount > 0) {\n buckets.push({\n filteredCount: overflowFilteredCount,\n key: serializeCategoryBucketKey({\n bucketKind: 'unique',\n typedValue: '__sqlrooms_overflow__',\n }),\n kind: 'overflow',\n label: `${overflowRows.length} more`,\n selectable: false,\n totalCount: overflowTotalCount,\n });\n }\n\n const uniqueKey = serializeCategoryBucketKey({\n bucketKind: 'unique',\n typedValue: null,\n });\n const uniqueTotalCount = totalByKey.get(uniqueKey) ?? 0;\n if (uniqueTotalCount > 0) {\n buckets.push({\n filteredCount: filteredByKey.get(uniqueKey) ?? 0,\n key: uniqueKey,\n kind: 'unique',\n label: 'unique',\n selectable: false,\n totalCount: uniqueTotalCount,\n });\n }\n\n const nullKey = serializeCategoryBucketKey({\n bucketKind: 'null',\n typedValue: null,\n });\n const nullTotalCount = totalByKey.get(nullKey) ?? 0;\n if (nullTotalCount > 0) {\n buckets.push({\n filteredCount: filteredByKey.get(nullKey) ?? 0,\n key: nullKey,\n kind: 'null',\n label: 'null',\n selectable: true,\n totalCount: nullTotalCount,\n });\n }\n\n return {\n bucketCount: filteredRows.length,\n buckets,\n selectedKey,\n };\n}\n\nexport function isSelectableCategoryKey(key: string) {\n const parsedKey = parseCategoryBucketKey(key);\n return (\n parsedKey?.bucketKind !== 'unique' &&\n parsedKey?.typedValue !== '__sqlrooms_overflow__'\n );\n}\n\nexport function categoryKeyToSelectionValue(key?: string) {\n if (key === undefined) return undefined;\n const parsedKey = parseCategoryBucketKey(key);\n if (!parsedKey || parsedKey.bucketKind === 'unique') {\n return undefined;\n }\n return parsedKey.bucketKind === 'null' ? null : parsedKey.typedValue;\n}\n\nfunction normalizeCategoryBucketValue(value: unknown): unknown {\n if (value instanceof Date) {\n return {\n type: 'date',\n value: value.toISOString(),\n };\n }\n if (typeof value === 'bigint') {\n return {\n type: 'bigint',\n value: value.toString(),\n };\n }\n return value;\n}\n\nfunction denormalizeCategoryBucketValue(value: unknown): unknown {\n if (!value || typeof value !== 'object') {\n return value;\n }\n\n if (\n 'type' in value &&\n 'value' in value &&\n value.type === 'date' &&\n typeof value.value === 'string'\n ) {\n return new Date(value.value);\n }\n\n if (\n 'type' in value &&\n 'value' in value &&\n value.type === 'bigint' &&\n typeof value.value === 'string'\n ) {\n return BigInt(value.value);\n }\n\n return value;\n}\n\nexport function serializeCategoryBucketKey(row: {\n bucketKind: CategoryCountRow['bucketKind'];\n typedValue: unknown;\n}) {\n return JSON.stringify([\n row.bucketKind,\n normalizeCategoryBucketValue(row.typedValue),\n ]);\n}\n\nexport function parseCategoryBucketKey(key: string):\n | {\n bucketKind: CategoryCountRow['bucketKind'];\n typedValue: unknown;\n }\n | undefined {\n try {\n const parsed = JSON.parse(key) as [CategoryCountRow['bucketKind'], unknown];\n if (!Array.isArray(parsed) || parsed.length !== 2) {\n return undefined;\n }\n\n return {\n bucketKind: parsed[0],\n typedValue: denormalizeCategoryBucketValue(parsed[1]),\n };\n } catch {\n return undefined;\n }\n}\n\nexport function createEmptySummaryState(\n field: arrow.Field,\n): DataTableExplorerSummaryState {\n if (isDataTableExplorerUnsupportedSummaryType(field.type)) {\n return {\n isLoading: false,\n kind: 'unsupported',\n label: 'No summary',\n };\n }\n\n return isDataTableExplorerHistogramType(field.type)\n ? {\n filteredBins: [],\n filteredNullCount: 0,\n interactor: null,\n isLoading: true,\n kind: 'histogram',\n totalBins: [],\n totalNullCount: 0,\n valueType:\n getDataTableExplorerValueType(field.type) === 'date'\n ? 'date'\n : 'number',\n }\n : {\n bucketCount: 0,\n buckets: [],\n isLoading: true,\n kind: 'category',\n toggleValue: () => {},\n };\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { DataTable } from '@sqlrooms/db';
2
+ import { FC } from 'react';
3
+ export type DataTableBlockHeaderProps = {
4
+ caption?: string;
5
+ onCaptionChange?: (caption: string | undefined) => void;
6
+ onTableChange: (table: DataTable) => void;
7
+ readOnly?: boolean;
8
+ tables: DataTable[];
9
+ selectedTable: DataTable;
10
+ };
11
+ export declare const DataTableBlockHeader: FC<DataTableBlockHeaderProps>;
12
+ //# sourceMappingURL=DataTableBlockHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableBlockHeader.d.ts","sourceRoot":"","sources":["../../../src/data-table-explorer/worksheet/DataTableBlockHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAIzB,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACxD,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,aAAa,EAAE,SAAS,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CA6B9D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { EditableText } from '@sqlrooms/ui';
3
+ import { DataTableSelector } from '../../components/DataTableSelector';
4
+ import { DataTableExplorer } from '../DataTableExplorer';
5
+ export const DataTableBlockHeader = ({ caption, onCaptionChange, onTableChange, readOnly, selectedTable, tables, }) => {
6
+ const tableName = selectedTable.table.table;
7
+ return (_jsxs("div", { className: "border-border flex shrink-0 items-center gap-2 border-b px-3 py-2", children: [_jsx(EditableText, { className: "min-w-0 flex-1 text-sm font-medium", value: caption ?? '', placeholder: tableName || 'Table caption', isReadOnly: readOnly, onChange: (value) => onCaptionChange?.(value || undefined) }), _jsx(DataTableSelector, { className: "w-48", disabled: readOnly || !onTableChange, onChange: onTableChange, tables: tables, value: selectedTable }), _jsx(DataTableExplorer.ResetButton, {})] }));
8
+ };
9
+ //# sourceMappingURL=DataTableBlockHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableBlockHeader.js","sourceRoot":"","sources":["../../../src/data-table-explorer/worksheet/DataTableBlockHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAWvD,MAAM,CAAC,MAAM,oBAAoB,GAAkC,CAAC,EAClE,OAAO,EACP,eAAe,EACf,aAAa,EACb,QAAQ,EACR,aAAa,EACb,MAAM,GACP,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC;IAE5C,OAAO,CACL,eAAK,SAAS,EAAC,mEAAmE,aAChF,KAAC,YAAY,IACX,SAAS,EAAC,oCAAoC,EAC9C,KAAK,EAAE,OAAO,IAAI,EAAE,EACpB,WAAW,EAAE,SAAS,IAAI,eAAe,EACzC,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,eAAe,EAAE,CAAC,KAAK,IAAI,SAAS,CAAC,GAC1D,EACF,KAAC,iBAAiB,IAChB,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,QAAQ,IAAI,CAAC,aAAa,EACpC,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GACpB,EACF,KAAC,iBAAiB,CAAC,WAAW,KAAG,IAC7B,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type {DataTable} from '@sqlrooms/db';\nimport {EditableText} from '@sqlrooms/ui';\nimport {FC} from 'react';\nimport {DataTableSelector} from '../../components/DataTableSelector';\nimport {DataTableExplorer} from '../DataTableExplorer';\n\nexport type DataTableBlockHeaderProps = {\n caption?: string;\n onCaptionChange?: (caption: string | undefined) => void;\n onTableChange: (table: DataTable) => void;\n readOnly?: boolean;\n tables: DataTable[];\n selectedTable: DataTable;\n};\n\nexport const DataTableBlockHeader: FC<DataTableBlockHeaderProps> = ({\n caption,\n onCaptionChange,\n onTableChange,\n readOnly,\n selectedTable,\n tables,\n}) => {\n const tableName = selectedTable.table.table;\n\n return (\n <div className=\"border-border flex shrink-0 items-center gap-2 border-b px-3 py-2\">\n <EditableText\n className=\"min-w-0 flex-1 text-sm font-medium\"\n value={caption ?? ''}\n placeholder={tableName || 'Table caption'}\n isReadOnly={readOnly}\n onChange={(value) => onCaptionChange?.(value || undefined)}\n />\n <DataTableSelector\n className=\"w-48\"\n disabled={readOnly || !onTableChange}\n onChange={onTableChange}\n tables={tables}\n value={selectedTable}\n />\n <DataTableExplorer.ResetButton />\n </div>\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import type { BlockDocumentStatefulBlockRendererProps } from '@sqlrooms/documents';
2
+ import { FC } from 'react';
3
+ export declare const DataTableBlockRenderer: FC<BlockDocumentStatefulBlockRendererProps>;
4
+ //# sourceMappingURL=DataTableBlockRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableBlockRenderer.d.ts","sourceRoot":"","sources":["../../../src/data-table-explorer/worksheet/DataTableBlockRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,uCAAuC,EAAC,MAAM,qBAAqB,CAAC;AAEjF,OAAO,EAAC,EAAE,EAAc,MAAM,OAAO,CAAC;AAQtC,eAAO,MAAM,sBAAsB,EAAE,EAAE,CACrC,uCAAuC,CA2FxC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { SpinnerPane } from '@sqlrooms/ui';
3
+ import { useCallback } from 'react';
4
+ import { useStoreWithMosaic } from '../../MosaicSlice';
5
+ import { DataTableSelectorEmptyState } from '../../components/DataTableSelector';
6
+ import { useDataTable } from '@sqlrooms/db';
7
+ import { useTablesWithColumns } from '../../hooks/useTablesWithColumns';
8
+ import { DataTableExplorer } from '../DataTableExplorer';
9
+ import { DataTableBlockHeader } from './DataTableBlockHeader';
10
+ export const DataTableBlockRenderer = ({ blockId, blockInstanceId, blockType, caption, documentId, onCaptionChange, onTitleChange, readOnly, title, }) => {
11
+ const connection = useStoreWithMosaic((state) => state.mosaic.connection);
12
+ const tables = useTablesWithColumns();
13
+ const selectedTable = useDataTable(title);
14
+ const selectionName = `block-document:${documentId}:data-table:${blockId}:brush`;
15
+ const selection = useStoreWithMosaic((state) => state.mosaic.selections[selectionName]);
16
+ const getSelection = useStoreWithMosaic((state) => state.mosaic.getSelection);
17
+ const handleTableChange = useCallback((table) => {
18
+ (selection ?? getSelection(selectionName, 'crossfilter')).reset();
19
+ onTitleChange?.(table.table.toString());
20
+ }, [getSelection, onTitleChange, selection, selectionName]);
21
+ if (!blockInstanceId || blockType !== 'data-table') {
22
+ return (_jsxs("div", { className: "text-muted-foreground p-4 text-sm", children: ["Unsupported stateful block type: ", blockType || 'Unconfigured'] }));
23
+ }
24
+ if (!selectedTable) {
25
+ return (_jsx(DataTableSelectorEmptyState, { disabled: readOnly || !onTitleChange, onChange: handleTableChange, tables: tables }));
26
+ }
27
+ if (connection.status === 'loading') {
28
+ return (_jsx("div", { className: "flex h-full min-h-0 flex-col", children: _jsx(SpinnerPane, { className: "min-h-0 flex-1" }) }));
29
+ }
30
+ if (connection.status !== 'ready') {
31
+ return (_jsx("div", { className: "flex h-full min-h-0 flex-col", children: _jsx("div", { className: "text-muted-foreground flex min-h-0 flex-1 items-center justify-center p-4 text-sm", children: "Mosaic connection is not ready." }) }));
32
+ }
33
+ return (_jsx(DataTableExplorer, { pageSize: 25, selectionName: selectionName, tableName: selectedTable.table, children: _jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx(DataTableBlockHeader, { caption: caption, onCaptionChange: onCaptionChange, selectedTable: selectedTable, readOnly: readOnly, tables: tables, onTableChange: handleTableChange }), _jsx("div", { className: "min-h-0 flex-1 overflow-auto", children: _jsxs(DataTableExplorer.Table, { children: [_jsx(DataTableExplorer.Header, {}), _jsx(DataTableExplorer.Rows, {})] }) }), _jsx(DataTableExplorer.StatusBar, {})] }) }));
34
+ };
35
+ //# sourceMappingURL=DataTableBlockRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableBlockRenderer.js","sourceRoot":"","sources":["../../../src/data-table-explorer/worksheet/DataTableBlockRenderer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,EAAK,WAAW,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,MAAM,sBAAsB,GAE/B,CAAC,EACH,OAAO,EACP,eAAe,EACf,SAAS,EACT,OAAO,EACP,UAAU,EACV,eAAe,EACf,aAAa,EACb,QAAQ,EACR,KAAK,GACN,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,kBAAkB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE1E,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,YAAY,CAAC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AAK,SAAS,EAAC,8BAA8B,YAC3C,cAAK,SAAS,EAAC,mFAAmF,gDAE5F,GACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,iBAAiB,IAChB,QAAQ,EAAE,EAAE,EACZ,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,aAAa,CAAC,KAAK,YAE9B,eAAK,SAAS,EAAC,8BAA8B,aAC3C,KAAC,oBAAoB,IACnB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,iBAAiB,GAChC,EACF,cAAK,SAAS,EAAC,8BAA8B,YAC3C,MAAC,iBAAiB,CAAC,KAAK,eACtB,KAAC,iBAAiB,CAAC,MAAM,KAAG,EAC5B,KAAC,iBAAiB,CAAC,IAAI,KAAG,IACF,GACtB,EACN,KAAC,iBAAiB,CAAC,SAAS,KAAG,IAC3B,GACY,CACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type {DataTable} from '@sqlrooms/db';\nimport type {BlockDocumentStatefulBlockRendererProps} from '@sqlrooms/documents';\nimport {SpinnerPane} from '@sqlrooms/ui';\nimport {FC, useCallback} from 'react';\nimport {useStoreWithMosaic} from '../../MosaicSlice';\nimport {DataTableSelectorEmptyState} from '../../components/DataTableSelector';\nimport {useDataTable} from '@sqlrooms/db';\nimport {useTablesWithColumns} from '../../hooks/useTablesWithColumns';\nimport {DataTableExplorer} from '../DataTableExplorer';\nimport {DataTableBlockHeader} from './DataTableBlockHeader';\n\nexport const DataTableBlockRenderer: FC<\n BlockDocumentStatefulBlockRendererProps\n> = ({\n blockId,\n blockInstanceId,\n blockType,\n caption,\n documentId,\n onCaptionChange,\n onTitleChange,\n readOnly,\n title,\n}) => {\n const connection = useStoreWithMosaic((state) => state.mosaic.connection);\n\n const tables = useTablesWithColumns();\n const selectedTable = useDataTable(title);\n\n const selectionName = `block-document:${documentId}:data-table:${blockId}:brush`;\n const selection = useStoreWithMosaic(\n (state) => state.mosaic.selections[selectionName],\n );\n const getSelection = useStoreWithMosaic((state) => state.mosaic.getSelection);\n const handleTableChange = useCallback(\n (table: DataTable) => {\n (selection ?? getSelection(selectionName, 'crossfilter')).reset();\n onTitleChange?.(table.table.toString());\n },\n [getSelection, onTitleChange, selection, selectionName],\n );\n\n if (!blockInstanceId || blockType !== 'data-table') {\n return (\n <div className=\"text-muted-foreground p-4 text-sm\">\n Unsupported stateful block type: {blockType || 'Unconfigured'}\n </div>\n );\n }\n\n if (!selectedTable) {\n return (\n <DataTableSelectorEmptyState\n disabled={readOnly || !onTitleChange}\n onChange={handleTableChange}\n tables={tables}\n />\n );\n }\n\n if (connection.status === 'loading') {\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n <SpinnerPane className=\"min-h-0 flex-1\" />\n </div>\n );\n }\n\n if (connection.status !== 'ready') {\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n <div className=\"text-muted-foreground flex min-h-0 flex-1 items-center justify-center p-4 text-sm\">\n Mosaic connection is not ready.\n </div>\n </div>\n );\n }\n\n return (\n <DataTableExplorer\n pageSize={25}\n selectionName={selectionName}\n tableName={selectedTable.table}\n >\n <div className=\"flex h-full min-h-0 flex-col\">\n <DataTableBlockHeader\n caption={caption}\n onCaptionChange={onCaptionChange}\n selectedTable={selectedTable}\n readOnly={readOnly}\n tables={tables}\n onTableChange={handleTableChange}\n />\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <DataTableExplorer.Table>\n <DataTableExplorer.Header />\n <DataTableExplorer.Rows />\n </DataTableExplorer.Table>\n </div>\n <DataTableExplorer.StatusBar />\n </div>\n </DataTableExplorer>\n );\n};\n"]}
@@ -35,15 +35,15 @@ export interface MosaicChartContainerProps {
35
35
  *
36
36
  * @example
37
37
  * ```tsx
38
- * <MosaicChart.Container
38
+ * <MosaicSpecChart.Container
39
39
  * spec={mySpec}
40
40
  * params={paramsMap}
41
41
  * editable={true}
42
42
  * onSpecChange={(spec) => saveSpec(spec)}
43
43
  * >
44
- * <MosaicChart.Chart />
45
- * <MosaicChart.SpecEditor />
46
- * <MosaicChart.Actions />
44
+ * <MosaicSpecChart.Chart />
45
+ * <MosaicSpecChart.SpecEditor />
46
+ * <MosaicSpecChart.Actions />
47
47
  * </MosaicChart.Container>
48
48
  * ```
49
49
  */
@@ -9,15 +9,15 @@ import { useMosaicChartEditor } from './useMosaicChartEditor';
9
9
  *
10
10
  * @example
11
11
  * ```tsx
12
- * <MosaicChart.Container
12
+ * <MosaicSpecChart.Container
13
13
  * spec={mySpec}
14
14
  * params={paramsMap}
15
15
  * editable={true}
16
16
  * onSpecChange={(spec) => saveSpec(spec)}
17
17
  * >
18
- * <MosaicChart.Chart />
19
- * <MosaicChart.SpecEditor />
20
- * <MosaicChart.Actions />
18
+ * <MosaicSpecChart.Chart />
19
+ * <MosaicSpecChart.SpecEditor />
20
+ * <MosaicSpecChart.Actions />
21
21
  * </MosaicChart.Container>
22
22
  * ```
23
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MosaicChartContainer.js","sourceRoot":"","sources":["../../src/editor/MosaicChartContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAGhC,OAAc,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AA8B5D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EACxE,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,YAAY,EACZ,QAAQ,EACR,SAAS,GACV,EAAE,EAAE;IACH,MAAM,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAC,GAAG,oBAAoB,CAAC;QAClE,WAAW,EAAE,IAAI;QACjB,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,YAAY,GAA6B,OAAO,CACpD,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,OAAO;QACP,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,UAAU;KACX,CAAC,EACF,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CACzD,CAAC;IAEF,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAC/C,cAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,GACzC,CAChC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {cn} from '@sqlrooms/ui';\nimport {Param} from '@uwdata/mosaic-core';\nimport {Spec} from '@uwdata/mosaic-spec';\nimport React, {useMemo} from 'react';\nimport {MosaicEditorContext} from './MosaicEditorContext';\nimport {MosaicEditorContextValue, OnMosaicSpecChange} from './types';\nimport {useMosaicChartEditor} from './useMosaicChartEditor';\n\nexport interface MosaicChartContainerProps {\n /**\n * Initial Mosaic specification\n */\n spec: Spec | string;\n /**\n * Pre-defined params/selections for shared cross-filtering\n */\n params?: Map<string, Param<any>>;\n /**\n * Whether editing is enabled\n * @default true\n */\n editable?: boolean;\n /**\n * Callback when spec changes are applied\n */\n onSpecChange?: OnMosaicSpecChange;\n /**\n * Child components (Chart, SpecEditor, Actions)\n */\n children: React.ReactNode;\n /**\n * Custom class name for the container\n */\n className?: string;\n}\n\n/**\n * Container component for composable Mosaic chart editing.\n * Provides context for child subcomponents.\n *\n * @example\n * ```tsx\n * <MosaicChart.Container\n * spec={mySpec}\n * params={paramsMap}\n * editable={true}\n * onSpecChange={(spec) => saveSpec(spec)}\n * >\n * <MosaicChart.Chart />\n * <MosaicChart.SpecEditor />\n * <MosaicChart.Actions />\n * </MosaicChart.Container>\n * ```\n */\nexport const MosaicChartContainer: React.FC<MosaicChartContainerProps> = ({\n spec,\n params,\n editable = true,\n onSpecChange,\n children,\n className,\n}) => {\n const {state, actions, canApply, hasChanges} = useMosaicChartEditor({\n initialSpec: spec,\n onSpecChange,\n });\n\n const contextValue: MosaicEditorContextValue = useMemo(\n () => ({\n state,\n actions,\n editable,\n params,\n canApply,\n hasChanges,\n }),\n [state, actions, editable, params, canApply, hasChanges],\n );\n\n return (\n <MosaicEditorContext.Provider value={contextValue}>\n <div className={cn('flex flex-col gap-2', className)}>{children}</div>\n </MosaicEditorContext.Provider>\n );\n};\n"]}
1
+ {"version":3,"file":"MosaicChartContainer.js","sourceRoot":"","sources":["../../src/editor/MosaicChartContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAGhC,OAAc,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AA8B5D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EACxE,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,YAAY,EACZ,QAAQ,EACR,SAAS,GACV,EAAE,EAAE;IACH,MAAM,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAC,GAAG,oBAAoB,CAAC;QAClE,WAAW,EAAE,IAAI;QACjB,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,YAAY,GAA6B,OAAO,CACpD,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,OAAO;QACP,QAAQ;QACR,MAAM;QACN,QAAQ;QACR,UAAU;KACX,CAAC,EACF,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CACzD,CAAC;IAEF,OAAO,CACL,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAC/C,cAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,GACzC,CAChC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {cn} from '@sqlrooms/ui';\nimport {Param} from '@uwdata/mosaic-core';\nimport {Spec} from '@uwdata/mosaic-spec';\nimport React, {useMemo} from 'react';\nimport {MosaicEditorContext} from './MosaicEditorContext';\nimport {MosaicEditorContextValue, OnMosaicSpecChange} from './types';\nimport {useMosaicChartEditor} from './useMosaicChartEditor';\n\nexport interface MosaicChartContainerProps {\n /**\n * Initial Mosaic specification\n */\n spec: Spec | string;\n /**\n * Pre-defined params/selections for shared cross-filtering\n */\n params?: Map<string, Param<any>>;\n /**\n * Whether editing is enabled\n * @default true\n */\n editable?: boolean;\n /**\n * Callback when spec changes are applied\n */\n onSpecChange?: OnMosaicSpecChange;\n /**\n * Child components (Chart, SpecEditor, Actions)\n */\n children: React.ReactNode;\n /**\n * Custom class name for the container\n */\n className?: string;\n}\n\n/**\n * Container component for composable Mosaic chart editing.\n * Provides context for child subcomponents.\n *\n * @example\n * ```tsx\n * <MosaicSpecChart.Container\n * spec={mySpec}\n * params={paramsMap}\n * editable={true}\n * onSpecChange={(spec) => saveSpec(spec)}\n * >\n * <MosaicSpecChart.Chart />\n * <MosaicSpecChart.SpecEditor />\n * <MosaicSpecChart.Actions />\n * </MosaicChart.Container>\n * ```\n */\nexport const MosaicChartContainer: React.FC<MosaicChartContainerProps> = ({\n spec,\n params,\n editable = true,\n onSpecChange,\n children,\n className,\n}) => {\n const {state, actions, canApply, hasChanges} = useMosaicChartEditor({\n initialSpec: spec,\n onSpecChange,\n });\n\n const contextValue: MosaicEditorContextValue = useMemo(\n () => ({\n state,\n actions,\n editable,\n params,\n canApply,\n hasChanges,\n }),\n [state, actions, editable, params, canApply, hasChanges],\n );\n\n return (\n <MosaicEditorContext.Provider value={contextValue}>\n <div className={cn('flex flex-col gap-2', className)}>{children}</div>\n </MosaicEditorContext.Provider>\n );\n};\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTablesWithColumns.d.ts","sourceRoot":"","sources":["../../src/hooks/useTablesWithColumns.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,SAAS,EAAE,CAOlD"}
@@ -0,0 +1,13 @@
1
+ import { useMemo } from 'react';
2
+ import { useStoreWithMosaicDashboard } from '../dashboard/MosaicDashboardSlice';
3
+ /**
4
+ * Returns all tables that have columns defined.
5
+ * Filters out tables without columns or with empty column arrays.
6
+ *
7
+ * @returns Array of tables with columns
8
+ */
9
+ export function useTablesWithColumns() {
10
+ const tables = useStoreWithMosaicDashboard((state) => state.db.tables);
11
+ return useMemo(() => tables.filter((table) => table.columns && table.columns.length > 0), [tables]);
12
+ }
13
+ //# sourceMappingURL=useTablesWithColumns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTablesWithColumns.js","sourceRoot":"","sources":["../../src/hooks/useTablesWithColumns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,MAAM,GAAG,2BAA2B,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAEvE,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,EACzE,CAAC,MAAM,CAAC,CACT,CAAC;AACJ,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type DataTable} from '@sqlrooms/db';\nimport {useStoreWithMosaicDashboard} from '../dashboard/MosaicDashboardSlice';\n\n/**\n * Returns all tables that have columns defined.\n * Filters out tables without columns or with empty column arrays.\n *\n * @returns Array of tables with columns\n */\nexport function useTablesWithColumns(): DataTable[] {\n const tables = useStoreWithMosaicDashboard((state) => state.db.tables);\n\n return useMemo(\n () => tables.filter((table) => table.columns && table.columns.length > 0),\n [tables],\n );\n}\n"]}