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

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 (962) hide show
  1. package/README.md +48 -19
  2. package/dist/MosaicChart.d.ts +6 -6
  3. package/dist/MosaicChart.d.ts.map +1 -1
  4. package/dist/MosaicChart.js +6 -6
  5. package/dist/MosaicChart.js.map +1 -1
  6. package/dist/MosaicChartBuilder.d.ts +1 -1
  7. package/dist/MosaicChartBuilder.d.ts.map +1 -1
  8. package/dist/MosaicChartBuilder.js +1 -1
  9. package/dist/MosaicChartBuilder.js.map +1 -1
  10. package/dist/MosaicColorLegend.d.ts.map +1 -1
  11. package/dist/MosaicColorLegend.js +0 -1
  12. package/dist/MosaicColorLegend.js.map +1 -1
  13. package/dist/VgPlotChart.d.ts.map +1 -1
  14. package/dist/VgPlotChart.js +6 -3
  15. package/dist/VgPlotChart.js.map +1 -1
  16. package/dist/ai/ai.d.ts +103 -0
  17. package/dist/ai/ai.d.ts.map +1 -0
  18. package/dist/ai/ai.js +419 -0
  19. package/dist/ai/ai.js.map +1 -0
  20. package/dist/ai/data-table-explorer-tool.d.ts +40 -0
  21. package/dist/ai/data-table-explorer-tool.d.ts.map +1 -0
  22. package/dist/ai/data-table-explorer-tool.js +75 -0
  23. package/dist/ai/data-table-explorer-tool.js.map +1 -0
  24. package/dist/ai/list-panels-tool.d.ts +35 -0
  25. package/dist/ai/list-panels-tool.d.ts.map +1 -0
  26. package/dist/ai/list-panels-tool.js.map +1 -0
  27. package/dist/ai/remove-panel-tool.d.ts +31 -0
  28. package/dist/ai/remove-panel-tool.d.ts.map +1 -0
  29. package/dist/ai/remove-panel-tool.js.map +1 -0
  30. package/dist/ai/tool-helpers.d.ts +34 -0
  31. package/dist/ai/tool-helpers.d.ts.map +1 -0
  32. package/dist/ai/tool-helpers.js +93 -0
  33. package/dist/ai/tool-helpers.js.map +1 -0
  34. package/dist/ai/tool-schemas.d.ts.map +1 -0
  35. package/dist/ai/tool-schemas.js.map +1 -0
  36. package/dist/ai/tool-types.d.ts +26 -0
  37. package/dist/ai/tool-types.d.ts.map +1 -0
  38. package/dist/ai/tool-types.js.map +1 -0
  39. package/dist/ai/tool-validation.d.ts +3 -0
  40. package/dist/ai/tool-validation.d.ts.map +1 -0
  41. package/dist/ai/tool-validation.js.map +1 -0
  42. package/dist/ai.d.ts +2 -99
  43. package/dist/ai.d.ts.map +1 -1
  44. package/dist/ai.js +2 -441
  45. package/dist/ai.js.map +1 -1
  46. package/dist/chart-builders/ChartBuilderActions.js.map +1 -1
  47. package/dist/chart-builders/ChartBuilderContent.d.ts +2 -2
  48. package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
  49. package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
  50. package/dist/chart-builders/ChartBuilderContext.d.ts +2 -2
  51. package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
  52. package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
  53. package/dist/chart-builders/ChartBuilderDialog.d.ts +2 -2
  54. package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
  55. package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
  56. package/dist/chart-builders/ChartBuilderFields.js +2 -2
  57. package/dist/chart-builders/ChartBuilderFields.js.map +1 -1
  58. package/dist/chart-builders/ChartBuilderRoot.d.ts +2 -2
  59. package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -1
  60. package/dist/chart-builders/ChartBuilderRoot.js.map +1 -1
  61. package/dist/chart-builders/chartSpecTitle.d.ts +1 -1
  62. package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
  63. package/dist/chart-builders/chartSpecTitle.js.map +1 -1
  64. package/dist/chart-builders/chartTypeUtils.d.ts +1 -2
  65. package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -1
  66. package/dist/chart-builders/chartTypeUtils.js +0 -1
  67. package/dist/chart-builders/chartTypeUtils.js.map +1 -1
  68. package/dist/chart-builders/createChartBuilderStore.d.ts +1 -1
  69. package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -1
  70. package/dist/chart-builders/createChartBuilderStore.js.map +1 -1
  71. package/dist/charts/MosaicChart.d.ts +12 -0
  72. package/dist/charts/MosaicChart.d.ts.map +1 -0
  73. package/dist/charts/MosaicChart.js +13 -0
  74. package/dist/charts/MosaicChart.js.map +1 -0
  75. package/dist/charts/MosaicChartError.d.ts +8 -0
  76. package/dist/charts/MosaicChartError.d.ts.map +1 -0
  77. package/dist/charts/MosaicChartError.js +5 -0
  78. package/dist/charts/MosaicChartError.js.map +1 -0
  79. package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts +7 -0
  80. package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts.map +1 -0
  81. package/dist/charts/MosaicChartRuntimeIssuePanel.js +10 -0
  82. package/dist/charts/MosaicChartRuntimeIssuePanel.js.map +1 -0
  83. package/dist/charts/MosaicChartSettingsPanel.d.ts +11 -0
  84. package/dist/charts/MosaicChartSettingsPanel.d.ts.map +1 -0
  85. package/dist/charts/MosaicChartSettingsPanel.js +21 -0
  86. package/dist/charts/MosaicChartSettingsPanel.js.map +1 -0
  87. package/dist/charts/MosaicChartView.d.ts +13 -0
  88. package/dist/charts/MosaicChartView.d.ts.map +1 -0
  89. package/dist/charts/MosaicChartView.js +56 -0
  90. package/dist/charts/MosaicChartView.js.map +1 -0
  91. package/dist/charts/addChartPanelAction.d.ts.map +1 -0
  92. package/dist/charts/addChartPanelAction.js.map +1 -0
  93. package/dist/charts/chart-settings/MosaicChartSettings.d.ts +43 -0
  94. package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -0
  95. package/dist/charts/chart-settings/MosaicChartSettings.js +74 -0
  96. package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -0
  97. package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts +13 -0
  98. package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts.map +1 -0
  99. package/dist/charts/chart-settings/MosaicChartSettingsContent.js +18 -0
  100. package/dist/charts/chart-settings/MosaicChartSettingsContent.js.map +1 -0
  101. package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts +24 -0
  102. package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts.map +1 -0
  103. package/dist/charts/chart-settings/MosaicChartSettingsContext.js +34 -0
  104. package/dist/charts/chart-settings/MosaicChartSettingsContext.js.map +1 -0
  105. package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts +14 -0
  106. package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts.map +1 -0
  107. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +17 -0
  108. package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -0
  109. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts +9 -0
  110. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -0
  111. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +11 -0
  112. package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -0
  113. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts +9 -0
  114. package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -0
  115. package/dist/charts/chart-settings/MosaicChartTypeSelector.js +16 -0
  116. package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
  117. package/dist/charts/chart-types/base-types.d.ts +168 -0
  118. package/dist/charts/chart-types/base-types.d.ts.map +1 -0
  119. package/dist/charts/chart-types/base-types.js.map +1 -0
  120. package/dist/charts/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
  121. package/dist/charts/chart-types/box-plot/BoxPlotSettings.js +9 -0
  122. package/dist/charts/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
  123. package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -0
  124. package/dist/charts/chart-types/box-plot/definition.js +24 -0
  125. package/dist/charts/chart-types/box-plot/definition.js.map +1 -0
  126. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +67 -0
  127. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -0
  128. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +286 -0
  129. package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -0
  130. package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
  131. package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
  132. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
  133. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +118 -0
  134. package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
  135. package/dist/charts/chart-types/box-plot/renderer/constants.d.ts +24 -0
  136. package/dist/charts/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
  137. package/dist/charts/chart-types/box-plot/renderer/constants.js.map +1 -0
  138. package/dist/charts/chart-types/box-plot/renderer/plot.d.ts +14 -0
  139. package/dist/charts/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
  140. package/dist/charts/chart-types/box-plot/renderer/plot.js.map +1 -0
  141. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +18 -0
  142. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
  143. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +63 -0
  144. package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
  145. package/dist/charts/chart-types/box-plot/renderer/utils.d.ts +6 -0
  146. package/dist/charts/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
  147. package/dist/charts/chart-types/box-plot/renderer/utils.js.map +1 -0
  148. package/dist/charts/chart-types/box-plot/schema.d.ts +21 -0
  149. package/dist/charts/chart-types/box-plot/schema.d.ts.map +1 -0
  150. package/dist/charts/chart-types/box-plot/schema.js +16 -0
  151. package/dist/charts/chart-types/box-plot/schema.js.map +1 -0
  152. package/dist/charts/chart-types/box-plot/tool.d.ts +40 -0
  153. package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -0
  154. package/dist/charts/chart-types/box-plot/tool.js +67 -0
  155. package/dist/charts/chart-types/box-plot/tool.js.map +1 -0
  156. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +1 -0
  157. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js +9 -0
  158. package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +1 -0
  159. package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +1 -0
  160. package/dist/charts/chart-types/bubble-chart/definition.js +24 -0
  161. package/dist/charts/chart-types/bubble-chart/definition.js.map +1 -0
  162. package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +1 -0
  163. package/dist/charts/chart-types/bubble-chart/schema.js.map +1 -0
  164. package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +1 -0
  165. package/dist/charts/chart-types/bubble-chart/spec.js +31 -0
  166. package/dist/charts/chart-types/bubble-chart/spec.js.map +1 -0
  167. package/dist/charts/chart-types/bubble-chart/tool.d.ts.map +1 -0
  168. package/dist/charts/chart-types/bubble-chart/tool.js +66 -0
  169. package/dist/charts/chart-types/bubble-chart/tool.js.map +1 -0
  170. package/dist/charts/chart-types/chart-config.d.ts +138 -0
  171. package/dist/charts/chart-types/chart-config.d.ts.map +1 -0
  172. package/dist/charts/chart-types/chart-config.js +41 -0
  173. package/dist/charts/chart-types/chart-config.js.map +1 -0
  174. package/dist/charts/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
  175. package/dist/charts/chart-types/count-plot/CountPlotSettings.js +9 -0
  176. package/dist/charts/chart-types/count-plot/CountPlotSettings.js.map +1 -0
  177. package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -0
  178. package/dist/charts/chart-types/count-plot/definition.js +19 -0
  179. package/dist/charts/chart-types/count-plot/definition.js.map +1 -0
  180. package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
  181. package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
  182. package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
  183. package/dist/charts/chart-types/count-plot/spec.js +49 -0
  184. package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
  185. package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -0
  186. package/dist/charts/chart-types/count-plot/tool.js +63 -0
  187. package/dist/charts/chart-types/count-plot/tool.js.map +1 -0
  188. package/dist/charts/chart-types/createChartTools.d.ts +17 -0
  189. package/dist/charts/chart-types/createChartTools.d.ts.map +1 -0
  190. package/dist/charts/chart-types/createChartTools.js +24 -0
  191. package/dist/charts/chart-types/createChartTools.js.map +1 -0
  192. package/dist/charts/chart-types/createDefaultChartTypes.d.ts +12 -0
  193. package/dist/charts/chart-types/createDefaultChartTypes.d.ts.map +1 -0
  194. package/dist/charts/chart-types/createDefaultChartTypes.js +30 -0
  195. package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -0
  196. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
  197. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js +30 -0
  198. package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
  199. package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -0
  200. package/dist/charts/chart-types/custom-spec/definition.js +22 -0
  201. package/dist/charts/chart-types/custom-spec/definition.js.map +1 -0
  202. package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
  203. package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
  204. package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
  205. package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
  206. package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
  207. package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
  208. package/dist/charts/chart-types/errors.d.ts +7 -0
  209. package/dist/charts/chart-types/errors.d.ts.map +1 -0
  210. package/dist/charts/chart-types/errors.js +10 -0
  211. package/dist/charts/chart-types/errors.js.map +1 -0
  212. package/dist/charts/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
  213. package/dist/charts/chart-types/heatmap/HeatmapSettings.js +9 -0
  214. package/dist/charts/chart-types/heatmap/HeatmapSettings.js.map +1 -0
  215. package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -0
  216. package/dist/charts/chart-types/heatmap/definition.js +19 -0
  217. package/dist/charts/chart-types/heatmap/definition.js.map +1 -0
  218. package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
  219. package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
  220. package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
  221. package/dist/charts/chart-types/heatmap/spec.js +32 -0
  222. package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
  223. package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -0
  224. package/dist/charts/chart-types/heatmap/tool.js +67 -0
  225. package/dist/charts/chart-types/heatmap/tool.js.map +1 -0
  226. package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
  227. package/dist/charts/chart-types/histogram/HistogramSettings.js +11 -0
  228. package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -0
  229. package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -0
  230. package/dist/charts/chart-types/histogram/definition.js +19 -0
  231. package/dist/charts/chart-types/histogram/definition.js.map +1 -0
  232. package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
  233. package/dist/charts/chart-types/histogram/schema.js.map +1 -0
  234. package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
  235. package/dist/charts/chart-types/histogram/spec.js +37 -0
  236. package/dist/charts/chart-types/histogram/spec.js.map +1 -0
  237. package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -0
  238. package/dist/charts/chart-types/histogram/tool.js +65 -0
  239. package/dist/charts/chart-types/histogram/tool.js.map +1 -0
  240. package/dist/charts/chart-types/index.d.ts +42 -0
  241. package/dist/charts/chart-types/index.d.ts.map +1 -0
  242. package/dist/charts/chart-types/index.js +53 -0
  243. package/dist/charts/chart-types/index.js.map +1 -0
  244. package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
  245. package/dist/charts/chart-types/line-chart/LineChartSettings.js +24 -0
  246. package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -0
  247. package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -0
  248. package/dist/charts/chart-types/line-chart/definition.js +26 -0
  249. package/dist/charts/chart-types/line-chart/definition.js.map +1 -0
  250. package/dist/charts/chart-types/line-chart/schema.d.ts +70 -0
  251. package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
  252. package/dist/charts/chart-types/line-chart/schema.js +29 -0
  253. package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
  254. package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
  255. package/dist/charts/chart-types/line-chart/spec.js +91 -0
  256. package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
  257. package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -0
  258. package/dist/charts/chart-types/line-chart/tool.js +75 -0
  259. package/dist/charts/chart-types/line-chart/tool.js.map +1 -0
  260. package/dist/charts/chart-types/mosaicChartTypes.d.ts +101 -0
  261. package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -0
  262. package/dist/charts/chart-types/mosaicChartTypes.js +20 -0
  263. package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -0
  264. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
  265. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
  266. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +16 -0
  267. package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -0
  268. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts +4 -0
  269. package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -0
  270. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +23 -0
  271. package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -0
  272. package/dist/charts/useBrushSelectionParams.d.ts +3 -0
  273. package/dist/charts/useBrushSelectionParams.d.ts.map +1 -0
  274. package/dist/charts/useBrushSelectionParams.js +16 -0
  275. package/dist/charts/useBrushSelectionParams.js.map +1 -0
  276. package/dist/charts/useChartDataPolicy.d.ts +5 -0
  277. package/dist/charts/useChartDataPolicy.d.ts.map +1 -0
  278. package/dist/charts/useChartDataPolicy.js +17 -0
  279. package/dist/charts/useChartDataPolicy.js.map +1 -0
  280. package/dist/charts/useChartRetainer.d.ts +4 -0
  281. package/dist/charts/useChartRetainer.d.ts.map +1 -0
  282. package/dist/charts/useChartRetainer.js +18 -0
  283. package/dist/charts/useChartRetainer.js.map +1 -0
  284. package/dist/charts/useChartTypeDefinition.d.ts +3 -0
  285. package/dist/charts/useChartTypeDefinition.d.ts.map +1 -0
  286. package/dist/charts/useChartTypeDefinition.js.map +1 -0
  287. package/dist/charts/useMosaicChartRenderContext.d.ts +21 -0
  288. package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -0
  289. package/dist/charts/useMosaicChartRenderContext.js +63 -0
  290. package/dist/charts/useMosaicChartRenderContext.js.map +1 -0
  291. package/dist/charts/useParseChartConfig.d.ts +12 -0
  292. package/dist/charts/useParseChartConfig.d.ts.map +1 -0
  293. package/dist/charts/useParseChartConfig.js +28 -0
  294. package/dist/charts/useParseChartConfig.js.map +1 -0
  295. package/dist/charts/useRuntimeIssueReporter.d.ts +7 -0
  296. package/dist/charts/useRuntimeIssueReporter.d.ts.map +1 -0
  297. package/dist/charts/useRuntimeIssueReporter.js +19 -0
  298. package/dist/charts/useRuntimeIssueReporter.js.map +1 -0
  299. package/dist/charts/worksheet/ChartBlockHeader.d.ts +15 -0
  300. package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -0
  301. package/dist/charts/worksheet/ChartBlockHeader.js +9 -0
  302. package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -0
  303. package/dist/charts/worksheet/ChartBlockRenderer.d.ts +4 -0
  304. package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -0
  305. package/dist/charts/worksheet/ChartBlockRenderer.js +47 -0
  306. package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -0
  307. package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts +15 -0
  308. package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts.map +1 -0
  309. package/dist/charts/worksheet/ChartSelectorEmptyState.js +10 -0
  310. package/dist/charts/worksheet/ChartSelectorEmptyState.js.map +1 -0
  311. package/dist/column-types-utils.d.ts +12 -0
  312. package/dist/column-types-utils.d.ts.map +1 -0
  313. package/dist/column-types-utils.js +47 -0
  314. package/dist/column-types-utils.js.map +1 -0
  315. package/dist/components/AggregationSelector.d.ts +11 -0
  316. package/dist/components/AggregationSelector.d.ts.map +1 -0
  317. package/dist/components/AggregationSelector.js.map +1 -0
  318. package/dist/components/ColumnSelector.d.ts.map +1 -0
  319. package/dist/components/ColumnSelector.js +30 -0
  320. package/dist/components/ColumnSelector.js.map +1 -0
  321. package/dist/components/ColumnsContext.d.ts +11 -0
  322. package/dist/components/ColumnsContext.d.ts.map +1 -0
  323. package/dist/components/ColumnsContext.js +15 -0
  324. package/dist/components/ColumnsContext.js.map +1 -0
  325. package/dist/components/DataTableSelector.d.ts +22 -0
  326. package/dist/components/DataTableSelector.d.ts.map +1 -0
  327. package/dist/components/DataTableSelector.js +66 -0
  328. package/dist/components/DataTableSelector.js.map +1 -0
  329. package/dist/components/Field.d.ts.map +1 -0
  330. package/dist/components/Field.js.map +1 -0
  331. package/dist/components/FieldSelectorInput.d.ts +14 -0
  332. package/dist/components/FieldSelectorInput.d.ts.map +1 -0
  333. package/dist/components/FieldSelectorInput.js.map +1 -0
  334. package/dist/components/MultiFieldSelector.d.ts +14 -0
  335. package/dist/components/MultiFieldSelector.d.ts.map +1 -0
  336. package/dist/components/MultiFieldSelector.js +53 -0
  337. package/dist/components/MultiFieldSelector.js.map +1 -0
  338. package/dist/components/TableSelector.d.ts.map +1 -0
  339. package/dist/components/TableSelector.js +23 -0
  340. package/dist/components/TableSelector.js.map +1 -0
  341. package/dist/components/TemporalGranularitySelector.d.ts +10 -0
  342. package/dist/components/TemporalGranularitySelector.d.ts.map +1 -0
  343. package/dist/components/TemporalGranularitySelector.js +37 -0
  344. package/dist/components/TemporalGranularitySelector.js.map +1 -0
  345. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +4 -0
  346. package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -0
  347. package/dist/dashboard/DefaultMosaicDashboardBlock.js +6 -0
  348. package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -0
  349. package/dist/dashboard/MosaicDashboard.d.ts +2 -5
  350. package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
  351. package/dist/dashboard/MosaicDashboard.js +4 -6
  352. package/dist/dashboard/MosaicDashboard.js.map +1 -1
  353. package/dist/dashboard/MosaicDashboardContext.d.ts +0 -2
  354. package/dist/dashboard/MosaicDashboardContext.d.ts.map +1 -1
  355. package/dist/dashboard/MosaicDashboardContext.js.map +1 -1
  356. package/dist/dashboard/MosaicDashboardSlice.d.ts +30 -75
  357. package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
  358. package/dist/dashboard/MosaicDashboardSlice.js +47 -52
  359. package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
  360. package/dist/dashboard/action-types.d.ts +1 -1
  361. package/dist/dashboard/action-types.d.ts.map +1 -1
  362. package/dist/dashboard/action-types.js.map +1 -1
  363. package/dist/dashboard/core-types.d.ts +2 -8
  364. package/dist/dashboard/core-types.d.ts.map +1 -1
  365. package/dist/dashboard/core-types.js +2 -8
  366. package/dist/dashboard/core-types.js.map +1 -1
  367. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts +3 -0
  368. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts.map +1 -0
  369. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js +11 -0
  370. package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js.map +1 -0
  371. package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts +12 -0
  372. package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts.map +1 -0
  373. package/dist/dashboard/createMosaicDashboardBlockDefinition.js +32 -0
  374. package/dist/dashboard/createMosaicDashboardBlockDefinition.js.map +1 -0
  375. package/dist/dashboard/dashboard-types.d.ts +12 -54
  376. package/dist/dashboard/dashboard-types.d.ts.map +1 -1
  377. package/dist/dashboard/dashboard-types.js +7 -15
  378. package/dist/dashboard/dashboard-types.js.map +1 -1
  379. package/dist/dashboard/defaultPanelActions.d.ts.map +1 -1
  380. package/dist/dashboard/defaultPanelActions.js +3 -5
  381. package/dist/dashboard/defaultPanelActions.js.map +1 -1
  382. package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -0
  383. package/dist/dashboard/panel/MosaicDashboardPanel.js +23 -0
  384. package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -0
  385. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
  386. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js +17 -0
  387. package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js.map +1 -0
  388. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts +17 -0
  389. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts.map +1 -0
  390. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js +21 -0
  391. package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js.map +1 -0
  392. package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts +13 -0
  393. package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts.map +1 -0
  394. package/dist/dashboard/panel/MosaicDashboardPanelHeader.js +30 -0
  395. package/dist/dashboard/panel/MosaicDashboardPanelHeader.js.map +1 -0
  396. package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -0
  397. package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -0
  398. package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -0
  399. package/dist/dashboard/panel/MosaicDashboardPanels.js +63 -0
  400. package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -0
  401. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +1 -1
  402. package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
  403. package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
  404. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +13 -4
  405. package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
  406. package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +1 -1
  407. package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -1
  408. package/dist/dashboard/useSelectedOrFirstTable.js +1 -1
  409. package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
  410. package/dist/data-table-explorer/DataTableExplorer.d.ts +37 -0
  411. package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -0
  412. package/dist/data-table-explorer/DataTableExplorer.js +67 -0
  413. package/dist/data-table-explorer/DataTableExplorer.js.map +1 -0
  414. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +50 -0
  415. package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -0
  416. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +121 -0
  417. package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -0
  418. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +28 -0
  419. package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -0
  420. package/dist/data-table-explorer/DataTableExplorerCountClient.js +51 -0
  421. package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -0
  422. package/dist/data-table-explorer/DataTableExplorerHeader.d.ts +7 -0
  423. package/dist/data-table-explorer/DataTableExplorerHeader.d.ts.map +1 -0
  424. package/dist/data-table-explorer/DataTableExplorerHeader.js +195 -0
  425. package/dist/data-table-explorer/DataTableExplorerHeader.js.map +1 -0
  426. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +69 -0
  427. package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -0
  428. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +179 -0
  429. package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -0
  430. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +37 -0
  431. package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -0
  432. package/dist/data-table-explorer/DataTableExplorerPageClient.js +65 -0
  433. package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -0
  434. package/dist/data-table-explorer/DataTableExplorerRows.d.ts +9 -0
  435. package/dist/data-table-explorer/DataTableExplorerRows.d.ts.map +1 -0
  436. package/dist/data-table-explorer/DataTableExplorerRows.js +65 -0
  437. package/dist/data-table-explorer/DataTableExplorerRows.js.map +1 -0
  438. package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts +9 -0
  439. package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts.map +1 -0
  440. package/dist/data-table-explorer/DataTableExplorerStatusBar.js +28 -0
  441. package/dist/data-table-explorer/DataTableExplorerStatusBar.js.map +1 -0
  442. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +24 -0
  443. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -0
  444. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +51 -0
  445. package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -0
  446. package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts +3 -0
  447. package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts.map +1 -0
  448. package/dist/data-table-explorer/addDataTableExplorerPanelAction.js +9 -0
  449. package/dist/data-table-explorer/addDataTableExplorerPanelAction.js.map +1 -0
  450. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +46 -0
  451. package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
  452. package/dist/data-table-explorer/createDataTableExplorerStore.js +126 -0
  453. package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -0
  454. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts +4 -0
  455. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -0
  456. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +28 -0
  457. package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
  458. package/dist/data-table-explorer/dataTableExplorerController.d.ts +64 -0
  459. package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
  460. package/dist/data-table-explorer/dataTableExplorerController.js +127 -0
  461. package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -0
  462. package/dist/data-table-explorer/layout.d.ts +11 -0
  463. package/dist/data-table-explorer/layout.d.ts.map +1 -0
  464. package/dist/data-table-explorer/layout.js +23 -0
  465. package/dist/data-table-explorer/layout.js.map +1 -0
  466. package/dist/data-table-explorer/types.d.ts +87 -0
  467. package/dist/data-table-explorer/types.d.ts.map +1 -0
  468. package/dist/data-table-explorer/types.js.map +1 -0
  469. package/dist/data-table-explorer/useDataTableExplorer.d.ts +7 -0
  470. package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -0
  471. package/dist/data-table-explorer/useDataTableExplorer.js +358 -0
  472. package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -0
  473. package/dist/data-table-explorer/utils.d.ts +61 -0
  474. package/dist/data-table-explorer/utils.d.ts.map +1 -0
  475. package/dist/data-table-explorer/utils.js +349 -0
  476. package/dist/data-table-explorer/utils.js.map +1 -0
  477. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +11 -0
  478. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
  479. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +7 -0
  480. package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -0
  481. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts +4 -0
  482. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -0
  483. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +35 -0
  484. package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -0
  485. package/dist/editor/MosaicChartContainer.d.ts +4 -4
  486. package/dist/editor/MosaicChartContainer.js +4 -4
  487. package/dist/editor/MosaicChartContainer.js.map +1 -1
  488. package/dist/hooks/useDataTable.d.ts +3 -0
  489. package/dist/hooks/useDataTable.d.ts.map +1 -0
  490. package/dist/hooks/useDataTable.js +28 -0
  491. package/dist/hooks/useDataTable.js.map +1 -0
  492. package/dist/hooks/useTablesWithColumns.d.ts.map +1 -0
  493. package/dist/hooks/useTablesWithColumns.js +13 -0
  494. package/dist/hooks/useTablesWithColumns.js.map +1 -0
  495. package/dist/index.d.ts +42 -32
  496. package/dist/index.d.ts.map +1 -1
  497. package/dist/index.js +35 -25
  498. package/dist/index.js.map +1 -1
  499. package/dist/schemas/common.d.ts +20 -0
  500. package/dist/schemas/common.d.ts.map +1 -0
  501. package/dist/schemas/common.js +15 -0
  502. package/dist/schemas/common.js.map +1 -0
  503. package/dist/schemas/index.d.ts +2 -0
  504. package/dist/schemas/index.d.ts.map +1 -0
  505. package/dist/schemas/index.js +2 -0
  506. package/dist/schemas/index.js.map +1 -0
  507. package/dist/useVgPlotChartRender.d.ts.map +1 -1
  508. package/dist/useVgPlotChartRender.js +17 -7
  509. package/dist/useVgPlotChartRender.js.map +1 -1
  510. package/package.json +14 -13
  511. package/dist/boxplot/BoxPlotClient.d.ts +0 -65
  512. package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
  513. package/dist/boxplot/BoxPlotClient.js +0 -286
  514. package/dist/boxplot/BoxPlotClient.js.map +0 -1
  515. package/dist/chart/ChartRuntimeIssuePanel.d.ts +0 -7
  516. package/dist/chart/ChartRuntimeIssuePanel.d.ts.map +0 -1
  517. package/dist/chart/ChartRuntimeIssuePanel.js +0 -10
  518. package/dist/chart/ChartRuntimeIssuePanel.js.map +0 -1
  519. package/dist/chart/MosaicDashboardChart.d.ts +0 -14
  520. package/dist/chart/MosaicDashboardChart.d.ts.map +0 -1
  521. package/dist/chart/MosaicDashboardChart.js +0 -21
  522. package/dist/chart/MosaicDashboardChart.js.map +0 -1
  523. package/dist/chart/MosaicDashboardChartContent.d.ts +0 -16
  524. package/dist/chart/MosaicDashboardChartContent.d.ts.map +0 -1
  525. package/dist/chart/MosaicDashboardChartContent.js +0 -45
  526. package/dist/chart/MosaicDashboardChartContent.js.map +0 -1
  527. package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +0 -4
  528. package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +0 -1
  529. package/dist/chart/MosaicDashboardChartHeaderActions.js +0 -16
  530. package/dist/chart/MosaicDashboardChartHeaderActions.js.map +0 -1
  531. package/dist/chart/MosaicDashboardChartRenderer.d.ts +0 -4
  532. package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +0 -1
  533. package/dist/chart/MosaicDashboardChartRenderer.js +0 -31
  534. package/dist/chart/MosaicDashboardChartRenderer.js.map +0 -1
  535. package/dist/chart/MosaicDashboardComponentChart.d.ts +0 -18
  536. package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
  537. package/dist/chart/MosaicDashboardComponentChart.js +0 -14
  538. package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
  539. package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -14
  540. package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +0 -1
  541. package/dist/chart/MosaicDashboardVgPlotChart.js +0 -10
  542. package/dist/chart/MosaicDashboardVgPlotChart.js.map +0 -1
  543. package/dist/chart/MosaicDashboardVgPlotError.d.ts +0 -8
  544. package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +0 -1
  545. package/dist/chart/MosaicDashboardVgPlotError.js +0 -11
  546. package/dist/chart/MosaicDashboardVgPlotError.js.map +0 -1
  547. package/dist/chart/addChartPanelAction.d.ts.map +0 -1
  548. package/dist/chart/addChartPanelAction.js.map +0 -1
  549. package/dist/chart/chart-settings/ChartSettings.d.ts +0 -44
  550. package/dist/chart/chart-settings/ChartSettings.d.ts.map +0 -1
  551. package/dist/chart/chart-settings/ChartSettings.js +0 -74
  552. package/dist/chart/chart-settings/ChartSettings.js.map +0 -1
  553. package/dist/chart/chart-settings/ChartSettingsContent.d.ts +0 -13
  554. package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +0 -1
  555. package/dist/chart/chart-settings/ChartSettingsContent.js +0 -18
  556. package/dist/chart/chart-settings/ChartSettingsContent.js.map +0 -1
  557. package/dist/chart/chart-settings/ChartSettingsContext.d.ts +0 -25
  558. package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
  559. package/dist/chart/chart-settings/ChartSettingsContext.js +0 -34
  560. package/dist/chart/chart-settings/ChartSettingsContext.js.map +0 -1
  561. package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +0 -14
  562. package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +0 -1
  563. package/dist/chart/chart-settings/ChartSettingsPanel.js +0 -17
  564. package/dist/chart/chart-settings/ChartSettingsPanel.js.map +0 -1
  565. package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +0 -9
  566. package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +0 -1
  567. package/dist/chart/chart-settings/ChartSpecViewerPanel.js +0 -11
  568. package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +0 -1
  569. package/dist/chart/chart-settings/ChartTypeSelector.d.ts +0 -9
  570. package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +0 -1
  571. package/dist/chart/chart-settings/ChartTypeSelector.js +0 -16
  572. package/dist/chart/chart-settings/ChartTypeSelector.js.map +0 -1
  573. package/dist/chart/chart-settings/useTableColumns.d.ts +0 -3
  574. package/dist/chart/chart-settings/useTableColumns.d.ts.map +0 -1
  575. package/dist/chart/chart-settings/useTableColumns.js +0 -12
  576. package/dist/chart/chart-settings/useTableColumns.js.map +0 -1
  577. package/dist/chart/useBrushSelectionParams.d.ts +0 -3
  578. package/dist/chart/useBrushSelectionParams.d.ts.map +0 -1
  579. package/dist/chart/useBrushSelectionParams.js +0 -16
  580. package/dist/chart/useBrushSelectionParams.js.map +0 -1
  581. package/dist/chart/useChartRetainer.d.ts +0 -3
  582. package/dist/chart/useChartRetainer.d.ts.map +0 -1
  583. package/dist/chart/useChartRetainer.js +0 -11
  584. package/dist/chart/useChartRetainer.js.map +0 -1
  585. package/dist/chart/useGenerateSpec.d.ts +0 -13
  586. package/dist/chart/useGenerateSpec.d.ts.map +0 -1
  587. package/dist/chart/useGenerateSpec.js +0 -32
  588. package/dist/chart/useGenerateSpec.js.map +0 -1
  589. package/dist/chart-builders/AggregationSelector.d.ts +0 -11
  590. package/dist/chart-builders/AggregationSelector.d.ts.map +0 -1
  591. package/dist/chart-builders/AggregationSelector.js.map +0 -1
  592. package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
  593. package/dist/chart-builders/ColumnSelector.js +0 -30
  594. package/dist/chart-builders/ColumnSelector.js.map +0 -1
  595. package/dist/chart-builders/ColumnsContext.d.ts +0 -13
  596. package/dist/chart-builders/ColumnsContext.d.ts.map +0 -1
  597. package/dist/chart-builders/ColumnsContext.js +0 -15
  598. package/dist/chart-builders/ColumnsContext.js.map +0 -1
  599. package/dist/chart-builders/Field.d.ts.map +0 -1
  600. package/dist/chart-builders/Field.js.map +0 -1
  601. package/dist/chart-builders/FieldSelectorInput.d.ts +0 -14
  602. package/dist/chart-builders/FieldSelectorInput.d.ts.map +0 -1
  603. package/dist/chart-builders/FieldSelectorInput.js.map +0 -1
  604. package/dist/chart-builders/MultiFieldSelector.d.ts +0 -14
  605. package/dist/chart-builders/MultiFieldSelector.d.ts.map +0 -1
  606. package/dist/chart-builders/MultiFieldSelector.js +0 -53
  607. package/dist/chart-builders/MultiFieldSelector.js.map +0 -1
  608. package/dist/chart-builders/TableSelector.d.ts.map +0 -1
  609. package/dist/chart-builders/TableSelector.js +0 -23
  610. package/dist/chart-builders/TableSelector.js.map +0 -1
  611. package/dist/chart-builders/TemporalGranularitySelector.d.ts +0 -10
  612. package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +0 -1
  613. package/dist/chart-builders/TemporalGranularitySelector.js +0 -37
  614. package/dist/chart-builders/TemporalGranularitySelector.js.map +0 -1
  615. package/dist/chart-builders/constants.d.ts +0 -12
  616. package/dist/chart-builders/constants.d.ts.map +0 -1
  617. package/dist/chart-builders/constants.js +0 -47
  618. package/dist/chart-builders/constants.js.map +0 -1
  619. package/dist/chart-types/base-types.d.ts +0 -168
  620. package/dist/chart-types/base-types.d.ts.map +0 -1
  621. package/dist/chart-types/base-types.js.map +0 -1
  622. package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +0 -1
  623. package/dist/chart-types/box-plot/BoxPlotSettings.js +0 -9
  624. package/dist/chart-types/box-plot/BoxPlotSettings.js.map +0 -1
  625. package/dist/chart-types/box-plot/definition.d.ts.map +0 -1
  626. package/dist/chart-types/box-plot/definition.js +0 -24
  627. package/dist/chart-types/box-plot/definition.js.map +0 -1
  628. package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +0 -1
  629. package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +0 -1
  630. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +0 -1
  631. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +0 -118
  632. package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +0 -1
  633. package/dist/chart-types/box-plot/renderer/constants.d.ts +0 -24
  634. package/dist/chart-types/box-plot/renderer/constants.d.ts.map +0 -1
  635. package/dist/chart-types/box-plot/renderer/constants.js.map +0 -1
  636. package/dist/chart-types/box-plot/renderer/plot.d.ts +0 -14
  637. package/dist/chart-types/box-plot/renderer/plot.d.ts.map +0 -1
  638. package/dist/chart-types/box-plot/renderer/plot.js.map +0 -1
  639. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +0 -18
  640. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
  641. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -56
  642. package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +0 -1
  643. package/dist/chart-types/box-plot/renderer/utils.d.ts +0 -6
  644. package/dist/chart-types/box-plot/renderer/utils.d.ts.map +0 -1
  645. package/dist/chart-types/box-plot/renderer/utils.js.map +0 -1
  646. package/dist/chart-types/box-plot/schema.d.ts +0 -21
  647. package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
  648. package/dist/chart-types/box-plot/schema.js +0 -13
  649. package/dist/chart-types/box-plot/schema.js.map +0 -1
  650. package/dist/chart-types/box-plot/tool.d.ts +0 -40
  651. package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
  652. package/dist/chart-types/box-plot/tool.js +0 -67
  653. package/dist/chart-types/box-plot/tool.js.map +0 -1
  654. package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
  655. package/dist/chart-types/bubble-chart/BubbleChartSettings.js +0 -9
  656. package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
  657. package/dist/chart-types/bubble-chart/definition.d.ts.map +0 -1
  658. package/dist/chart-types/bubble-chart/definition.js +0 -24
  659. package/dist/chart-types/bubble-chart/definition.js.map +0 -1
  660. package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
  661. package/dist/chart-types/bubble-chart/schema.js.map +0 -1
  662. package/dist/chart-types/bubble-chart/spec.d.ts.map +0 -1
  663. package/dist/chart-types/bubble-chart/spec.js +0 -31
  664. package/dist/chart-types/bubble-chart/spec.js.map +0 -1
  665. package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
  666. package/dist/chart-types/bubble-chart/tool.js +0 -66
  667. package/dist/chart-types/bubble-chart/tool.js.map +0 -1
  668. package/dist/chart-types/chart-config.d.ts +0 -138
  669. package/dist/chart-types/chart-config.d.ts.map +0 -1
  670. package/dist/chart-types/chart-config.js +0 -49
  671. package/dist/chart-types/chart-config.js.map +0 -1
  672. package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +0 -1
  673. package/dist/chart-types/count-plot/CountPlotSettings.js +0 -9
  674. package/dist/chart-types/count-plot/CountPlotSettings.js.map +0 -1
  675. package/dist/chart-types/count-plot/definition.d.ts.map +0 -1
  676. package/dist/chart-types/count-plot/definition.js +0 -19
  677. package/dist/chart-types/count-plot/definition.js.map +0 -1
  678. package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
  679. package/dist/chart-types/count-plot/schema.js.map +0 -1
  680. package/dist/chart-types/count-plot/spec.d.ts.map +0 -1
  681. package/dist/chart-types/count-plot/spec.js +0 -49
  682. package/dist/chart-types/count-plot/spec.js.map +0 -1
  683. package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
  684. package/dist/chart-types/count-plot/tool.js +0 -63
  685. package/dist/chart-types/count-plot/tool.js.map +0 -1
  686. package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +0 -1
  687. package/dist/chart-types/custom-spec/CustomSpecSettings.js +0 -30
  688. package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +0 -1
  689. package/dist/chart-types/custom-spec/definition.d.ts.map +0 -1
  690. package/dist/chart-types/custom-spec/definition.js +0 -22
  691. package/dist/chart-types/custom-spec/definition.js.map +0 -1
  692. package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
  693. package/dist/chart-types/custom-spec/schema.js.map +0 -1
  694. package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
  695. package/dist/chart-types/custom-spec/spec.js.map +0 -1
  696. package/dist/chart-types/data-policy-schema.d.ts.map +0 -1
  697. package/dist/chart-types/data-policy-schema.js.map +0 -1
  698. package/dist/chart-types/errors.d.ts +0 -23
  699. package/dist/chart-types/errors.d.ts.map +0 -1
  700. package/dist/chart-types/errors.js +0 -26
  701. package/dist/chart-types/errors.js.map +0 -1
  702. package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +0 -1
  703. package/dist/chart-types/heatmap/HeatmapSettings.js +0 -9
  704. package/dist/chart-types/heatmap/HeatmapSettings.js.map +0 -1
  705. package/dist/chart-types/heatmap/definition.d.ts.map +0 -1
  706. package/dist/chart-types/heatmap/definition.js +0 -19
  707. package/dist/chart-types/heatmap/definition.js.map +0 -1
  708. package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
  709. package/dist/chart-types/heatmap/schema.js.map +0 -1
  710. package/dist/chart-types/heatmap/spec.d.ts.map +0 -1
  711. package/dist/chart-types/heatmap/spec.js +0 -32
  712. package/dist/chart-types/heatmap/spec.js.map +0 -1
  713. package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
  714. package/dist/chart-types/heatmap/tool.js +0 -67
  715. package/dist/chart-types/heatmap/tool.js.map +0 -1
  716. package/dist/chart-types/histogram/HistogramSettings.d.ts.map +0 -1
  717. package/dist/chart-types/histogram/HistogramSettings.js +0 -11
  718. package/dist/chart-types/histogram/HistogramSettings.js.map +0 -1
  719. package/dist/chart-types/histogram/definition.d.ts.map +0 -1
  720. package/dist/chart-types/histogram/definition.js +0 -19
  721. package/dist/chart-types/histogram/definition.js.map +0 -1
  722. package/dist/chart-types/histogram/schema.d.ts.map +0 -1
  723. package/dist/chart-types/histogram/schema.js.map +0 -1
  724. package/dist/chart-types/histogram/spec.d.ts.map +0 -1
  725. package/dist/chart-types/histogram/spec.js +0 -37
  726. package/dist/chart-types/histogram/spec.js.map +0 -1
  727. package/dist/chart-types/histogram/tool.d.ts.map +0 -1
  728. package/dist/chart-types/histogram/tool.js +0 -65
  729. package/dist/chart-types/histogram/tool.js.map +0 -1
  730. package/dist/chart-types/index.d.ts +0 -157
  731. package/dist/chart-types/index.d.ts.map +0 -1
  732. package/dist/chart-types/index.js +0 -106
  733. package/dist/chart-types/index.js.map +0 -1
  734. package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +0 -1
  735. package/dist/chart-types/line-chart/LineChartSettings.js +0 -24
  736. package/dist/chart-types/line-chart/LineChartSettings.js.map +0 -1
  737. package/dist/chart-types/line-chart/definition.d.ts.map +0 -1
  738. package/dist/chart-types/line-chart/definition.js +0 -26
  739. package/dist/chart-types/line-chart/definition.js.map +0 -1
  740. package/dist/chart-types/line-chart/schema.d.ts +0 -88
  741. package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
  742. package/dist/chart-types/line-chart/schema.js +0 -41
  743. package/dist/chart-types/line-chart/schema.js.map +0 -1
  744. package/dist/chart-types/line-chart/spec.d.ts.map +0 -1
  745. package/dist/chart-types/line-chart/spec.js +0 -91
  746. package/dist/chart-types/line-chart/spec.js.map +0 -1
  747. package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
  748. package/dist/chart-types/line-chart/tool.js +0 -74
  749. package/dist/chart-types/line-chart/tool.js.map +0 -1
  750. package/dist/chart-types/list-panels-tool.d.ts +0 -35
  751. package/dist/chart-types/list-panels-tool.d.ts.map +0 -1
  752. package/dist/chart-types/list-panels-tool.js.map +0 -1
  753. package/dist/chart-types/profiler-tool.d.ts +0 -40
  754. package/dist/chart-types/profiler-tool.d.ts.map +0 -1
  755. package/dist/chart-types/profiler-tool.js +0 -73
  756. package/dist/chart-types/profiler-tool.js.map +0 -1
  757. package/dist/chart-types/remove-panel-tool.d.ts +0 -31
  758. package/dist/chart-types/remove-panel-tool.d.ts.map +0 -1
  759. package/dist/chart-types/remove-panel-tool.js.map +0 -1
  760. package/dist/chart-types/text-panel-tool.d.ts +0 -42
  761. package/dist/chart-types/text-panel-tool.d.ts.map +0 -1
  762. package/dist/chart-types/text-panel-tool.js +0 -71
  763. package/dist/chart-types/text-panel-tool.js.map +0 -1
  764. package/dist/chart-types/tool-helpers.d.ts +0 -44
  765. package/dist/chart-types/tool-helpers.d.ts.map +0 -1
  766. package/dist/chart-types/tool-helpers.js +0 -129
  767. package/dist/chart-types/tool-helpers.js.map +0 -1
  768. package/dist/chart-types/tool-schemas.d.ts.map +0 -1
  769. package/dist/chart-types/tool-schemas.js.map +0 -1
  770. package/dist/chart-types/tool-types.d.ts +0 -26
  771. package/dist/chart-types/tool-types.d.ts.map +0 -1
  772. package/dist/chart-types/tool-types.js.map +0 -1
  773. package/dist/chart-types/tool-validation.d.ts +0 -3
  774. package/dist/chart-types/tool-validation.d.ts.map +0 -1
  775. package/dist/chart-types/tool-validation.js.map +0 -1
  776. package/dist/chart-types/useChartTypeDefinition.d.ts +0 -3
  777. package/dist/chart-types/useChartTypeDefinition.d.ts.map +0 -1
  778. package/dist/chart-types/useChartTypeDefinition.js.map +0 -1
  779. package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +0 -17
  780. package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +0 -1
  781. package/dist/dashboard/DashboardPanelErrorBoundary.js +0 -21
  782. package/dist/dashboard/DashboardPanelErrorBoundary.js.map +0 -1
  783. package/dist/dashboard/MosaicDashboardEmptyState.d.ts +0 -2
  784. package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +0 -1
  785. package/dist/dashboard/MosaicDashboardEmptyState.js +0 -14
  786. package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
  787. package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
  788. package/dist/dashboard/MosaicDashboardPanel.js +0 -23
  789. package/dist/dashboard/MosaicDashboardPanel.js.map +0 -1
  790. package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +0 -1
  791. package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +0 -17
  792. package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +0 -1
  793. package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +0 -13
  794. package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +0 -1
  795. package/dist/dashboard/MosaicDashboardPanelHeader.js +0 -30
  796. package/dist/dashboard/MosaicDashboardPanelHeader.js.map +0 -1
  797. package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +0 -1
  798. package/dist/dashboard/MosaicDashboardPanelLayout.js.map +0 -1
  799. package/dist/dashboard/MosaicDashboardPanels.d.ts.map +0 -1
  800. package/dist/dashboard/MosaicDashboardPanels.js +0 -54
  801. package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
  802. package/dist/dashboard/defaultPanelRenderers.d.ts +0 -3
  803. package/dist/dashboard/defaultPanelRenderers.d.ts.map +0 -1
  804. package/dist/dashboard/defaultPanelRenderers.js +0 -13
  805. package/dist/dashboard/defaultPanelRenderers.js.map +0 -1
  806. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts +0 -6
  807. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts.map +0 -1
  808. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js +0 -46
  809. package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js.map +0 -1
  810. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts +0 -7
  811. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts.map +0 -1
  812. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js +0 -29
  813. package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js.map +0 -1
  814. package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts +0 -6
  815. package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts.map +0 -1
  816. package/dist/dashboard/initial-state/MosaicDashboardInitialState.js +0 -9
  817. package/dist/dashboard/initial-state/MosaicDashboardInitialState.js.map +0 -1
  818. package/dist/dashboard/useTablesWithColumns.d.ts.map +0 -1
  819. package/dist/dashboard/useTablesWithColumns.js +0 -13
  820. package/dist/dashboard/useTablesWithColumns.js.map +0 -1
  821. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -4
  822. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +0 -1
  823. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +0 -32
  824. package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +0 -1
  825. package/dist/profiler/MosaicProfiler.d.ts +0 -32
  826. package/dist/profiler/MosaicProfiler.d.ts.map +0 -1
  827. package/dist/profiler/MosaicProfiler.js +0 -57
  828. package/dist/profiler/MosaicProfiler.js.map +0 -1
  829. package/dist/profiler/MosaicProfilerHeader.d.ts +0 -7
  830. package/dist/profiler/MosaicProfilerHeader.d.ts.map +0 -1
  831. package/dist/profiler/MosaicProfilerHeader.js +0 -196
  832. package/dist/profiler/MosaicProfilerHeader.js.map +0 -1
  833. package/dist/profiler/MosaicProfilerRows.d.ts +0 -9
  834. package/dist/profiler/MosaicProfilerRows.d.ts.map +0 -1
  835. package/dist/profiler/MosaicProfilerRows.js +0 -65
  836. package/dist/profiler/MosaicProfilerRows.js.map +0 -1
  837. package/dist/profiler/MosaicProfilerStatusBar.d.ts +0 -9
  838. package/dist/profiler/MosaicProfilerStatusBar.d.ts.map +0 -1
  839. package/dist/profiler/MosaicProfilerStatusBar.js +0 -28
  840. package/dist/profiler/MosaicProfilerStatusBar.js.map +0 -1
  841. package/dist/profiler/ProfilerCategoryClient.d.ts +0 -50
  842. package/dist/profiler/ProfilerCategoryClient.d.ts.map +0 -1
  843. package/dist/profiler/ProfilerCategoryClient.js +0 -121
  844. package/dist/profiler/ProfilerCategoryClient.js.map +0 -1
  845. package/dist/profiler/ProfilerCountClient.d.ts +0 -28
  846. package/dist/profiler/ProfilerCountClient.d.ts.map +0 -1
  847. package/dist/profiler/ProfilerCountClient.js +0 -51
  848. package/dist/profiler/ProfilerCountClient.js.map +0 -1
  849. package/dist/profiler/ProfilerHistogramClient.d.ts +0 -69
  850. package/dist/profiler/ProfilerHistogramClient.d.ts.map +0 -1
  851. package/dist/profiler/ProfilerHistogramClient.js +0 -179
  852. package/dist/profiler/ProfilerHistogramClient.js.map +0 -1
  853. package/dist/profiler/ProfilerPageClient.d.ts +0 -37
  854. package/dist/profiler/ProfilerPageClient.d.ts.map +0 -1
  855. package/dist/profiler/ProfilerPageClient.js +0 -65
  856. package/dist/profiler/ProfilerPageClient.js.map +0 -1
  857. package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts +0 -24
  858. package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts.map +0 -1
  859. package/dist/profiler/ProfilerUnsupportedSummaryClient.js +0 -51
  860. package/dist/profiler/ProfilerUnsupportedSummaryClient.js.map +0 -1
  861. package/dist/profiler/addProfilerPanelAction.d.ts +0 -3
  862. package/dist/profiler/addProfilerPanelAction.d.ts.map +0 -1
  863. package/dist/profiler/addProfilerPanelAction.js +0 -9
  864. package/dist/profiler/addProfilerPanelAction.js.map +0 -1
  865. package/dist/profiler/createProfilerStore.d.ts +0 -45
  866. package/dist/profiler/createProfilerStore.d.ts.map +0 -1
  867. package/dist/profiler/createProfilerStore.js +0 -120
  868. package/dist/profiler/createProfilerStore.js.map +0 -1
  869. package/dist/profiler/layout.d.ts +0 -7
  870. package/dist/profiler/layout.d.ts.map +0 -1
  871. package/dist/profiler/layout.js +0 -13
  872. package/dist/profiler/layout.js.map +0 -1
  873. package/dist/profiler/profilerController.d.ts +0 -64
  874. package/dist/profiler/profilerController.d.ts.map +0 -1
  875. package/dist/profiler/profilerController.js +0 -123
  876. package/dist/profiler/profilerController.js.map +0 -1
  877. package/dist/profiler/types.d.ts +0 -86
  878. package/dist/profiler/types.d.ts.map +0 -1
  879. package/dist/profiler/types.js.map +0 -1
  880. package/dist/profiler/useMosaicProfiler.d.ts +0 -7
  881. package/dist/profiler/useMosaicProfiler.d.ts.map +0 -1
  882. package/dist/profiler/useMosaicProfiler.js +0 -339
  883. package/dist/profiler/useMosaicProfiler.js.map +0 -1
  884. package/dist/profiler/utils.d.ts +0 -61
  885. package/dist/profiler/utils.d.ts.map +0 -1
  886. package/dist/profiler/utils.js +0 -347
  887. package/dist/profiler/utils.js.map +0 -1
  888. package/dist/text/MosaicDashboardTextRenderer.d.ts +0 -4
  889. package/dist/text/MosaicDashboardTextRenderer.d.ts.map +0 -1
  890. package/dist/text/MosaicDashboardTextRenderer.js +0 -46
  891. package/dist/text/MosaicDashboardTextRenderer.js.map +0 -1
  892. package/dist/text/addTextPanelAction.d.ts +0 -3
  893. package/dist/text/addTextPanelAction.d.ts.map +0 -1
  894. package/dist/text/addTextPanelAction.js +0 -9
  895. package/dist/text/addTextPanelAction.js.map +0 -1
  896. /package/dist/{chart-types → ai}/list-panels-tool.js +0 -0
  897. /package/dist/{chart-types → ai}/remove-panel-tool.js +0 -0
  898. /package/dist/{chart-types → ai}/tool-schemas.d.ts +0 -0
  899. /package/dist/{chart-types → ai}/tool-schemas.js +0 -0
  900. /package/dist/{chart-types → ai}/tool-types.js +0 -0
  901. /package/dist/{chart-types → ai}/tool-validation.js +0 -0
  902. /package/dist/{chart → charts}/addChartPanelAction.d.ts +0 -0
  903. /package/dist/{chart → charts}/addChartPanelAction.js +0 -0
  904. /package/dist/{chart-types → charts/chart-types}/base-types.js +0 -0
  905. /package/dist/{chart-types → charts/chart-types}/box-plot/BoxPlotSettings.d.ts +0 -0
  906. /package/dist/{chart-types → charts/chart-types}/box-plot/definition.d.ts +0 -0
  907. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.d.ts +0 -0
  908. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.js +0 -0
  909. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotPanelRenderer.d.ts +0 -0
  910. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/constants.js +0 -0
  911. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/plot.js +0 -0
  912. /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/utils.js +0 -0
  913. /package/dist/{chart-types → charts/chart-types}/bubble-chart/BubbleChartSettings.d.ts +0 -0
  914. /package/dist/{chart-types → charts/chart-types}/bubble-chart/definition.d.ts +0 -0
  915. /package/dist/{chart-types → charts/chart-types}/bubble-chart/schema.d.ts +0 -0
  916. /package/dist/{chart-types → charts/chart-types}/bubble-chart/schema.js +0 -0
  917. /package/dist/{chart-types → charts/chart-types}/bubble-chart/spec.d.ts +0 -0
  918. /package/dist/{chart-types → charts/chart-types}/bubble-chart/tool.d.ts +0 -0
  919. /package/dist/{chart-types → charts/chart-types}/count-plot/CountPlotSettings.d.ts +0 -0
  920. /package/dist/{chart-types → charts/chart-types}/count-plot/definition.d.ts +0 -0
  921. /package/dist/{chart-types → charts/chart-types}/count-plot/schema.d.ts +0 -0
  922. /package/dist/{chart-types → charts/chart-types}/count-plot/schema.js +0 -0
  923. /package/dist/{chart-types → charts/chart-types}/count-plot/spec.d.ts +0 -0
  924. /package/dist/{chart-types → charts/chart-types}/count-plot/tool.d.ts +0 -0
  925. /package/dist/{chart-types → charts/chart-types}/custom-spec/CustomSpecSettings.d.ts +0 -0
  926. /package/dist/{chart-types → charts/chart-types}/custom-spec/definition.d.ts +0 -0
  927. /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.d.ts +0 -0
  928. /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.js +0 -0
  929. /package/dist/{chart-types → charts/chart-types}/custom-spec/spec.d.ts +0 -0
  930. /package/dist/{chart-types → charts/chart-types}/custom-spec/spec.js +0 -0
  931. /package/dist/{chart-types → charts/chart-types}/data-policy-schema.d.ts +0 -0
  932. /package/dist/{chart-types → charts/chart-types}/data-policy-schema.js +0 -0
  933. /package/dist/{chart-types → charts/chart-types}/heatmap/HeatmapSettings.d.ts +0 -0
  934. /package/dist/{chart-types → charts/chart-types}/heatmap/definition.d.ts +0 -0
  935. /package/dist/{chart-types → charts/chart-types}/heatmap/schema.d.ts +0 -0
  936. /package/dist/{chart-types → charts/chart-types}/heatmap/schema.js +0 -0
  937. /package/dist/{chart-types → charts/chart-types}/heatmap/spec.d.ts +0 -0
  938. /package/dist/{chart-types → charts/chart-types}/heatmap/tool.d.ts +0 -0
  939. /package/dist/{chart-types → charts/chart-types}/histogram/HistogramSettings.d.ts +0 -0
  940. /package/dist/{chart-types → charts/chart-types}/histogram/definition.d.ts +0 -0
  941. /package/dist/{chart-types → charts/chart-types}/histogram/schema.d.ts +0 -0
  942. /package/dist/{chart-types → charts/chart-types}/histogram/schema.js +0 -0
  943. /package/dist/{chart-types → charts/chart-types}/histogram/spec.d.ts +0 -0
  944. /package/dist/{chart-types → charts/chart-types}/histogram/tool.d.ts +0 -0
  945. /package/dist/{chart-types → charts/chart-types}/line-chart/LineChartSettings.d.ts +0 -0
  946. /package/dist/{chart-types → charts/chart-types}/line-chart/definition.d.ts +0 -0
  947. /package/dist/{chart-types → charts/chart-types}/line-chart/spec.d.ts +0 -0
  948. /package/dist/{chart-types → charts/chart-types}/line-chart/tool.d.ts +0 -0
  949. /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
  950. /package/dist/{chart-builders → components}/AggregationSelector.js +0 -0
  951. /package/dist/{chart-builders → components}/ColumnSelector.d.ts +0 -0
  952. /package/dist/{chart-builders → components}/Field.d.ts +0 -0
  953. /package/dist/{chart-builders → components}/Field.js +0 -0
  954. /package/dist/{chart-builders → components}/FieldSelectorInput.js +0 -0
  955. /package/dist/{chart-builders → components}/TableSelector.d.ts +0 -0
  956. /package/dist/dashboard/{MosaicDashboardPanel.d.ts → panel/MosaicDashboardPanel.d.ts} +0 -0
  957. /package/dist/dashboard/{MosaicDashboardPanelDragOverlay.d.ts → panel/MosaicDashboardPanelDragOverlay.d.ts} +0 -0
  958. /package/dist/dashboard/{MosaicDashboardPanelLayout.d.ts → panel/MosaicDashboardPanelLayout.d.ts} +0 -0
  959. /package/dist/dashboard/{MosaicDashboardPanelLayout.js → panel/MosaicDashboardPanelLayout.js} +0 -0
  960. /package/dist/dashboard/{MosaicDashboardPanels.d.ts → panel/MosaicDashboardPanels.d.ts} +0 -0
  961. /package/dist/{profiler → data-table-explorer}/types.js +0 -0
  962. /package/dist/{dashboard → hooks}/useTablesWithColumns.d.ts +0 -0
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { isLayoutDockNode, isLayoutGridNode, LayoutRenderer, } from '@sqlrooms/layout';
3
+ import { useCallback, useEffect, useMemo } from 'react';
4
+ import { useMosaicDashboardContext } from '../MosaicDashboardContext';
5
+ import { MosaicDashboardPanelDragOverlay } from './MosaicDashboardPanelDragOverlay';
6
+ import { MosaicDashboardPanel } from './MosaicDashboardPanel';
7
+ import { getMosaicDashboardDockId, MOSAIC_DASHBOARD_PANEL, useStoreWithMosaicDashboard, } from '../MosaicDashboardSlice';
8
+ import { DataTableSelectorEmptyState } from '../../components/DataTableSelector';
9
+ import { useTablesWithColumns } from '../../hooks/useTablesWithColumns';
10
+ const EMPTY_DASHBOARD_PANELS = [];
11
+ export const MosaicDashboardPanels = () => {
12
+ const { dashboardId } = useMosaicDashboardContext();
13
+ const registerPanel = useStoreWithMosaicDashboard((state) => state.layout.registerPanel);
14
+ const setLayout = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setLayout);
15
+ const panels = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels ??
16
+ EMPTY_DASHBOARD_PANELS);
17
+ const dashboardLayout = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.layout ?? null);
18
+ const dashboardLayoutType = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.layoutType ??
19
+ 'dock');
20
+ const tables = useTablesWithColumns();
21
+ const selectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable);
22
+ const setSelectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setSelectedTable);
23
+ const handleTableChange = useCallback((table) => {
24
+ setSelectedTable(dashboardId, table.table.toString());
25
+ }, [dashboardId, setSelectedTable]);
26
+ useEffect(() => {
27
+ // This renderer is shared by every Mosaic dashboard panel in the room.
28
+ // Dashboard blocks can be transiently unmounted by the surrounding editor,
29
+ // so unregistering on instance cleanup can leave still-mounted dashboards
30
+ // with layout panel shells but no chart renderer.
31
+ registerPanel(MOSAIC_DASHBOARD_PANEL, () => ({
32
+ title: 'Dashboard panel',
33
+ component: MosaicDashboardPanel,
34
+ dragOverlay: MosaicDashboardPanelDragOverlay,
35
+ }));
36
+ }, [registerPanel]);
37
+ const rootLayout = useMemo(() => {
38
+ if (!dashboardLayout)
39
+ return null;
40
+ if (dashboardLayoutType === 'grid') {
41
+ return isLayoutGridNode(dashboardLayout) ? dashboardLayout : null;
42
+ }
43
+ return {
44
+ type: 'dock',
45
+ id: getMosaicDashboardDockId(dashboardId),
46
+ root: dashboardLayout,
47
+ };
48
+ }, [dashboardId, dashboardLayout, dashboardLayoutType]);
49
+ const handleLayoutChange = useCallback((nextLayout) => {
50
+ const innerLayout = nextLayout && isLayoutDockNode(nextLayout)
51
+ ? nextLayout.root
52
+ : nextLayout;
53
+ setLayout(dashboardId, innerLayout);
54
+ }, [dashboardId, setLayout]);
55
+ if (!selectedTable) {
56
+ return (_jsx(DataTableSelectorEmptyState, { onChange: handleTableChange, tables: tables }));
57
+ }
58
+ if (!panels.length || !rootLayout) {
59
+ return (_jsx("div", { className: "flex h-full items-center justify-center p-4", children: _jsx("div", { className: "text-muted-foreground text-sm", children: "Dashboard is empty. Add a panel to get started." }) }));
60
+ }
61
+ return (_jsx("div", { className: "h-full min-h-[360px]", children: _jsx(LayoutRenderer, { rootLayout: rootLayout, onLayoutChange: handleLayoutChange }) }));
62
+ };
63
+ //# sourceMappingURL=MosaicDashboardPanels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MosaicDashboardPanels.js","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanels.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAEhB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAGtE,MAAM,sBAAsB,GAAiC,EAAE,CAAC;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAClD,MAAM,aAAa,GAAG,2BAA2B,CAC/C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CACtC,CAAC;IACF,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAC3C,CAAC;IACF,MAAM,MAAM,GAAG,2BAA2B,CACxC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CA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n LayoutRenderer,\n} from '@sqlrooms/layout';\nimport {useCallback, useEffect, useMemo} from 'react';\nimport {useMosaicDashboardContext} from '../MosaicDashboardContext';\nimport {MosaicDashboardPanelDragOverlay} from './MosaicDashboardPanelDragOverlay';\nimport {MosaicDashboardPanel} from './MosaicDashboardPanel';\nimport type {MosaicDashboardPanelConfig} from '../dashboard-types';\nimport {\n getMosaicDashboardDockId,\n MOSAIC_DASHBOARD_PANEL,\n useStoreWithMosaicDashboard,\n} from '../MosaicDashboardSlice';\nimport {DataTableSelectorEmptyState} from '../../components/DataTableSelector';\nimport {useTablesWithColumns} from '../../hooks/useTablesWithColumns';\nimport type {DataTable} from '@sqlrooms/db';\n\nconst EMPTY_DASHBOARD_PANELS: MosaicDashboardPanelConfig[] = [];\n\nexport const MosaicDashboardPanels: React.FC = () => {\n const {dashboardId} = useMosaicDashboardContext();\n const registerPanel = useStoreWithMosaicDashboard(\n (state) => state.layout.registerPanel,\n );\n const setLayout = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setLayout,\n );\n const panels = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels ??\n EMPTY_DASHBOARD_PANELS,\n );\n const dashboardLayout = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.layout ?? null,\n );\n const dashboardLayoutType = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.layoutType ??\n 'dock',\n );\n\n const tables = useTablesWithColumns();\n const selectedTable = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable,\n );\n const setSelectedTable = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setSelectedTable,\n );\n\n const handleTableChange = useCallback(\n (table: DataTable) => {\n setSelectedTable(dashboardId, table.table.toString());\n },\n [dashboardId, setSelectedTable],\n );\n\n useEffect(() => {\n // This renderer is shared by every Mosaic dashboard panel in the room.\n // Dashboard blocks can be transiently unmounted by the surrounding editor,\n // so unregistering on instance cleanup can leave still-mounted dashboards\n // with layout panel shells but no chart renderer.\n registerPanel(MOSAIC_DASHBOARD_PANEL, () => ({\n title: 'Dashboard panel',\n component: MosaicDashboardPanel,\n dragOverlay: MosaicDashboardPanelDragOverlay,\n }));\n }, [registerPanel]);\n\n const rootLayout: LayoutNode | null = useMemo(() => {\n if (!dashboardLayout) return null;\n if (dashboardLayoutType === 'grid') {\n return isLayoutGridNode(dashboardLayout) ? dashboardLayout : null;\n }\n return {\n type: 'dock',\n id: getMosaicDashboardDockId(dashboardId),\n root: dashboardLayout,\n };\n }, [dashboardId, dashboardLayout, dashboardLayoutType]);\n\n const handleLayoutChange = useCallback(\n (nextLayout: LayoutNode | null) => {\n const innerLayout =\n nextLayout && isLayoutDockNode(nextLayout)\n ? nextLayout.root\n : nextLayout;\n setLayout(dashboardId, innerLayout);\n },\n [dashboardId, setLayout],\n );\n\n if (!selectedTable) {\n return (\n <DataTableSelectorEmptyState\n onChange={handleTableChange}\n tables={tables}\n />\n );\n }\n\n if (!panels.length || !rootLayout) {\n return (\n <div className=\"flex h-full items-center justify-center p-4\">\n <div className=\"text-muted-foreground text-sm\">\n Dashboard is empty. Add a panel to get started.\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"h-full min-h-[360px]\">\n <LayoutRenderer\n rootLayout={rootLayout}\n onLayoutChange={handleLayoutChange}\n />\n </div>\n );\n};\n"]}
@@ -4,7 +4,7 @@ import { Plus } from 'lucide-react';
4
4
  import { useAddPanelActions } from '../useAddPanelActions';
5
5
  export const MosaicDashboardAddPanelDropdown = ({ dashboardId }) => {
6
6
  const { handleAddPanel, canAddPanel, actions, canAddAnyPanel } = useAddPanelActions(dashboardId);
7
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { size: "sm", variant: "outline", disabled: !canAddAnyPanel, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add"] }) }), _jsx(DropdownMenuContent, { align: "end", children: actions.map((action) => {
7
+ return (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { size: "sm", variant: "outline", disabled: !canAddAnyPanel, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add"] }) }), _jsx(DropdownMenuContent, { align: "end", children: actions.map((action) => {
8
8
  const Icon = action.icon;
9
9
  return (_jsxs(DropdownMenuItem, { onClick: () => handleAddPanel(action), disabled: !canAddPanel(action), children: [Icon ? _jsx(Icon, { className: "mr-2 h-4 w-4" }) : null, action.label] }, action.type));
10
10
  }) })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"MosaicDashboardAddPanelDropdown.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardAddPanelDropdown.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAMzD,MAAM,CAAC,MAAM,+BAA+B,GAExC,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE;IACpB,MAAM,EAAC,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAC,GAC1D,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAElC,OAAO,CACL,MAAC,YAAY,eACX,KAAC,mBAAmB,IAAC,OAAO,kBAC1B,MAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,EAAE,CAAC,cAAc,aAC3D,KAAC,IAAI,IAAC,SAAS,EAAC,cAAc,GAAG,WAE1B,GACW,EACtB,KAAC,mBAAmB,IAAC,KAAK,EAAC,KAAK,YAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;oBACtB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;oBAEzB,OAAO,CACL,MAAC,gBAAgB,IAEf,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,EACrC,QAAQ,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,aAE7B,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,SAAS,EAAC,cAAc,GAAG,CAAC,CAAC,CAAC,IAAI,EAC/C,MAAM,CAAC,KAAK,KALR,MAAM,CAAC,IAAI,CAMC,CACpB,CAAC;gBACJ,CAAC,CAAC,GACkB,IACT,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {type FC} from 'react';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@sqlrooms/ui';\nimport {Plus} from 'lucide-react';\nimport {useAddPanelActions} from '../useAddPanelActions';\n\ninterface MosaicDashboardAddPanelDropdownProps {\n dashboardId: string;\n}\n\nexport const MosaicDashboardAddPanelDropdown: FC<\n MosaicDashboardAddPanelDropdownProps\n> = ({dashboardId}) => {\n const {handleAddPanel, canAddPanel, actions, canAddAnyPanel} =\n useAddPanelActions(dashboardId);\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button size=\"sm\" variant=\"outline\" disabled={!canAddAnyPanel}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {actions.map((action) => {\n const Icon = action.icon;\n\n return (\n <DropdownMenuItem\n key={action.type}\n onClick={() => handleAddPanel(action)}\n disabled={!canAddPanel(action)}\n >\n {Icon ? <Icon className=\"mr-2 h-4 w-4\" /> : null}\n {action.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"]}
1
+ {"version":3,"file":"MosaicDashboardAddPanelDropdown.js","sourceRoot":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react';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@sqlrooms/ui';\nimport {Plus} from 'lucide-react';\nimport {useAddPanelActions} from '../useAddPanelActions';\n\ninterface MosaicDashboardAddPanelDropdownProps {\n dashboardId: string;\n}\n\nexport const MosaicDashboardAddPanelDropdown: FC<\n MosaicDashboardAddPanelDropdownProps\n> = ({dashboardId}) => {\n const {handleAddPanel, canAddPanel, actions, canAddAnyPanel} =\n useAddPanelActions(dashboardId);\n\n return (\n <DropdownMenu modal={false}>\n <DropdownMenuTrigger asChild>\n <Button size=\"sm\" variant=\"outline\" disabled={!canAddAnyPanel}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n {actions.map((action) => {\n const Icon = action.icon;\n\n return (\n <DropdownMenuItem\n key={action.type}\n onClick={() => handleAddPanel(action)}\n disabled={!canAddPanel(action)}\n >\n {Icon ? <Icon className=\"mr-2 h-4 w-4\" /> : null}\n {action.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MosaicDashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAsB1C,CAAC"}
1
+ {"version":3,"file":"MosaicDashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAUzC,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EA0C1C,CAAC"}
@@ -1,15 +1,24 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback } from 'react';
2
3
  import { useMosaicDashboardContext } from '../MosaicDashboardContext';
3
4
  import { useStoreWithMosaicDashboard } from '../MosaicDashboardSlice';
4
5
  import { MosaicDashboardAddPanelDropdown } from './MosaicDashboardAddPanelDropdown';
5
6
  import { MosaicDashboardResetFiltersButton } from './MosaicDashboardResetFiltersButton';
7
+ import { DataTableSelector } from '../../components/DataTableSelector';
8
+ import { useTablesWithColumns } from '../../hooks/useTablesWithColumns';
9
+ import { useDataTable } from '../../hooks/useDataTable';
6
10
  export const MosaicDashboardToolbar = () => {
7
11
  const { dashboardId } = useMosaicDashboardContext();
8
- const hasPanels = useStoreWithMosaicDashboard((state) => (state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels
9
- ?.length ?? 0) > 0);
10
- if (!hasPanels) {
12
+ const tables = useTablesWithColumns();
13
+ const selectedTableName = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable);
14
+ const selectedTable = useDataTable(selectedTableName);
15
+ const setSelectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setSelectedTable);
16
+ const handleTableChange = useCallback((table) => {
17
+ setSelectedTable(dashboardId, table.table.toString());
18
+ }, [dashboardId, setSelectedTable]);
19
+ if (!selectedTableName) {
11
20
  return null;
12
21
  }
13
- return (_jsxs("div", { className: "flex items-center justify-between border-b px-5 py-2", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx(MosaicDashboardResetFiltersButton, { dashboardId: dashboardId }) }), _jsx("div", { className: "flex items-center gap-2", children: _jsx(MosaicDashboardAddPanelDropdown, { dashboardId: dashboardId }) })] }));
22
+ return (_jsxs("div", { className: "flex items-center justify-between border-b px-5 py-2", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx(MosaicDashboardResetFiltersButton, { dashboardId: dashboardId }) }), _jsxs("div", { className: "flex items-center gap-2", children: [selectedTable && (_jsx(DataTableSelector, { className: "w-48", onChange: handleTableChange, tables: tables, value: selectedTable })), _jsx(MosaicDashboardAddPanelDropdown, { dashboardId: dashboardId })] })] }));
14
23
  };
15
24
  //# sourceMappingURL=MosaicDashboardToolbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MosaicDashboardToolbar.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,iCAAiC,EAAC,MAAM,qCAAqC,CAAC;AAEtF,MAAM,CAAC,MAAM,sBAAsB,GAAa,GAAG,EAAE;IACnD,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAClD,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CACR,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM;QAC/D,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CACvB,CAAC;IAEF,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,sDAAsD,aACnE,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,iCAAiC,IAAC,WAAW,EAAE,WAAW,GAAI,GAC3D,EACN,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI,GACzD,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport {useMosaicDashboardContext} from '../MosaicDashboardContext';\nimport {useStoreWithMosaicDashboard} from '../MosaicDashboardSlice';\nimport {MosaicDashboardAddPanelDropdown} from './MosaicDashboardAddPanelDropdown';\nimport {MosaicDashboardResetFiltersButton} from './MosaicDashboardResetFiltersButton';\n\nexport const MosaicDashboardToolbar: React.FC = () => {\n const {dashboardId} = useMosaicDashboardContext();\n const hasPanels = useStoreWithMosaicDashboard(\n (state) =>\n (state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels\n ?.length ?? 0) > 0,\n );\n\n if (!hasPanels) {\n return null;\n }\n\n return (\n <div className=\"flex items-center justify-between border-b px-5 py-2\">\n <div className=\"flex items-center gap-2\">\n <MosaicDashboardResetFiltersButton dashboardId={dashboardId} />\n </div>\n <div className=\"flex items-center gap-2\">\n <MosaicDashboardAddPanelDropdown dashboardId={dashboardId} />\n </div>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"MosaicDashboardToolbar.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAC,WAAW,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,iCAAiC,EAAC,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAGtD,MAAM,CAAC,MAAM,sBAAsB,GAAa,GAAG,EAAE;IACnD,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAElD,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,iBAAiB,GAAG,2BAA2B,CACnD,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,aAAa,CAC1E,CAAC;IACF,MAAM,aAAa,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACtD,MAAM,gBAAgB,GAAG,2BAA2B,CAClD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,gBAAgB,CAClD,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,KAAgB,EAAE,EAAE;QACnB,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC,EACD,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAChC,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,sDAAsD,aACnE,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,iCAAiC,IAAC,WAAW,EAAE,WAAW,GAAI,GAC3D,EACN,eAAK,SAAS,EAAC,yBAAyB,aACrC,aAAa,IAAI,CAChB,KAAC,iBAAiB,IAChB,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GACpB,CACH,EACD,KAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI,IACzD,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, {useCallback} from 'react';\nimport {useMosaicDashboardContext} from '../MosaicDashboardContext';\nimport {useStoreWithMosaicDashboard} from '../MosaicDashboardSlice';\nimport {MosaicDashboardAddPanelDropdown} from './MosaicDashboardAddPanelDropdown';\nimport {MosaicDashboardResetFiltersButton} from './MosaicDashboardResetFiltersButton';\nimport {DataTableSelector} from '../../components/DataTableSelector';\nimport {useTablesWithColumns} from '../../hooks/useTablesWithColumns';\nimport {useDataTable} from '../../hooks/useDataTable';\nimport type {DataTable} from '@sqlrooms/db';\n\nexport const MosaicDashboardToolbar: React.FC = () => {\n const {dashboardId} = useMosaicDashboardContext();\n\n const tables = useTablesWithColumns();\n const selectedTableName = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable,\n );\n const selectedTable = useDataTable(selectedTableName);\n const setSelectedTable = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setSelectedTable,\n );\n\n const handleTableChange = useCallback(\n (table: DataTable) => {\n setSelectedTable(dashboardId, table.table.toString());\n },\n [dashboardId, setSelectedTable],\n );\n\n if (!selectedTableName) {\n return null;\n }\n\n return (\n <div className=\"flex items-center justify-between border-b px-5 py-2\">\n <div className=\"flex items-center gap-2\">\n <MosaicDashboardResetFiltersButton dashboardId={dashboardId} />\n </div>\n <div className=\"flex items-center gap-2\">\n {selectedTable && (\n <DataTableSelector\n className=\"w-48\"\n onChange={handleTableChange}\n tables={tables}\n value={selectedTable}\n />\n )}\n <MosaicDashboardAddPanelDropdown dashboardId={dashboardId} />\n </div>\n </div>\n );\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useStoreWithMosaicDashboard } from './MosaicDashboardSlice';
3
3
  import { useSelectedOrFirstTable } from './useSelectedOrFirstTable';
4
- import { useTablesWithColumns } from './useTablesWithColumns';
4
+ import { useTablesWithColumns } from '../hooks/useTablesWithColumns';
5
5
  export function useMosaicDashboardAddPanelActionContext(dashboardId) {
6
6
  const dashboard = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]);
7
7
  const chartTypes = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.chartTypes);
@@ -1 +1 @@
1
- {"version":3,"file":"useMosaicDashboardAddPanelActionContext.js","sourceRoot":"","sources":["../../src/dashboard/useMosaicDashboardAddPanelActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,uCAAuC,CACrD,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,UAAU,GAAG,2BAA2B,CAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAC5C,CAAC;IAEF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAE3D,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,SAAS;QACT,aAAa;QACb,MAAM;QACN,UAAU;KACX,CAAC,EACF,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,CAC5D,CAAC;AACJ,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type MosaicDashboardAddPanelActionContext} from './action-types';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useSelectedOrFirstTable} from './useSelectedOrFirstTable';\nimport {useTablesWithColumns} from './useTablesWithColumns';\n\nexport function useMosaicDashboardAddPanelActionContext(\n dashboardId: string,\n): MosaicDashboardAddPanelActionContext {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const chartTypes = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.chartTypes,\n );\n\n const tables = useTablesWithColumns();\n const selectedTable = useSelectedOrFirstTable(dashboardId);\n\n return useMemo<MosaicDashboardAddPanelActionContext>(\n () => ({\n dashboardId,\n dashboard,\n selectedTable,\n tables,\n chartTypes,\n }),\n [dashboard, dashboardId, selectedTable, tables, chartTypes],\n );\n}\n"]}
1
+ {"version":3,"file":"useMosaicDashboardAddPanelActionContext.js","sourceRoot":"","sources":["../../src/dashboard/useMosaicDashboardAddPanelActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAEnE,MAAM,UAAU,uCAAuC,CACrD,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,UAAU,GAAG,2BAA2B,CAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAC5C,CAAC;IAEF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAE3D,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,SAAS;QACT,aAAa;QACb,MAAM;QACN,UAAU;KACX,CAAC,EACF,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,CAC5D,CAAC;AACJ,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type MosaicDashboardAddPanelActionContext} from './action-types';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useSelectedOrFirstTable} from './useSelectedOrFirstTable';\nimport {useTablesWithColumns} from '../hooks/useTablesWithColumns';\n\nexport function useMosaicDashboardAddPanelActionContext(\n dashboardId: string,\n): MosaicDashboardAddPanelActionContext {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const chartTypes = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.chartTypes,\n );\n\n const tables = useTablesWithColumns();\n const selectedTable = useSelectedOrFirstTable(dashboardId);\n\n return useMemo<MosaicDashboardAddPanelActionContext>(\n () => ({\n dashboardId,\n dashboard,\n selectedTable,\n tables,\n chartTypes,\n }),\n [dashboard, dashboardId, selectedTable, tables, chartTypes],\n );\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { useMemo } from 'react';
2
2
  import { useStoreWithMosaicDashboard } from './MosaicDashboardSlice';
3
- import { useTablesWithColumns } from './useTablesWithColumns';
3
+ import { useTablesWithColumns } from '../hooks/useTablesWithColumns';
4
4
  /**
5
5
  * Returns the last selected table for a dashboard if it exists,
6
6
  * otherwise falls back to the first table with columns.
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectedOrFirstTable.js","sourceRoot":"","sources":["../../src/dashboard/useSelectedOrFirstTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAEtC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,qBAAqB,GAAG,SAAS,EAAE,iBAAiB,CAAC;QAE3D,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QAED,4CAA4C;QAC5C,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CACnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,qBAAqB,CACvD,CAAC;QACF,iEAAiE;QACjE,OAAO,iBAAiB,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type DataTable} from '@sqlrooms/db';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useTablesWithColumns} from './useTablesWithColumns';\n\n/**\n * Returns the last selected table for a dashboard if it exists,\n * otherwise falls back to the first table with columns.\n *\n * @param dashboardId - The dashboard ID\n * @returns The selected table, or the first table, or undefined if no tables exist\n */\nexport function useSelectedOrFirstTable(\n dashboardId: string,\n): DataTable | undefined {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const tables = useTablesWithColumns();\n\n return useMemo(() => {\n const lastSelectedTableName = dashboard?.lastSelectedTable;\n\n if (!lastSelectedTableName) {\n return tables[0];\n }\n\n // Try to find the last selected table first\n const lastSelectedTable = tables.find(\n (table) => table.table.table === lastSelectedTableName,\n );\n // Fall back to the first table if the selected one doesn't exist\n return lastSelectedTable ?? tables[0];\n }, [dashboard?.lastSelectedTable, tables]);\n}\n"]}
1
+ {"version":3,"file":"useSelectedOrFirstTable.js","sourceRoot":"","sources":["../../src/dashboard/useSelectedOrFirstTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAEtC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,qBAAqB,GAAG,SAAS,EAAE,iBAAiB,CAAC;QAE3D,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QAED,4CAA4C;QAC5C,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CACnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,qBAAqB,CACvD,CAAC;QACF,iEAAiE;QACjE,OAAO,iBAAiB,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type DataTable} from '@sqlrooms/db';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useTablesWithColumns} from '../hooks/useTablesWithColumns';\n\n/**\n * Returns the last selected table for a dashboard if it exists,\n * otherwise falls back to the first table with columns.\n *\n * @param dashboardId - The dashboard ID\n * @returns The selected table, or the first table, or undefined if no tables exist\n */\nexport function useSelectedOrFirstTable(\n dashboardId: string,\n): DataTable | undefined {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const tables = useTablesWithColumns();\n\n return useMemo(() => {\n const lastSelectedTableName = dashboard?.lastSelectedTable;\n\n if (!lastSelectedTableName) {\n return tables[0];\n }\n\n // Try to find the last selected table first\n const lastSelectedTable = tables.find(\n (table) => table.table.table === lastSelectedTableName,\n );\n // Fall back to the first table if the selected one doesn't exist\n return lastSelectedTable ?? tables[0];\n }, [dashboard?.lastSelectedTable, tables]);\n}\n"]}
@@ -0,0 +1,37 @@
1
+ import { type ComponentProps, type PropsWithChildren, type ReactElement } from 'react';
2
+ import { Button, Table } from '@sqlrooms/ui';
3
+ import { type DataTableExplorerHeaderProps } from './DataTableExplorerHeader';
4
+ import { type DataTableExplorerRowsProps } from './DataTableExplorerRows';
5
+ import { type DataTableExplorerStatusBarProps } from './DataTableExplorerStatusBar';
6
+ import type { DataTableExplorerOptions, UseDataTableExplorerReturn } from './types';
7
+ export type DataTableExplorerRootProps = PropsWithChildren<{
8
+ explorer: UseDataTableExplorerReturn;
9
+ }>;
10
+ /**
11
+ * Provides an existing explorer instance to compound explorer subcomponents.
12
+ */
13
+ export declare function DataTableExplorerRoot({ children, explorer, }: DataTableExplorerRootProps): import("react/jsx-runtime").JSX.Element;
14
+ export type DataTableExplorerProps = PropsWithChildren<DataTableExplorerOptions>;
15
+ export type DataTableExplorerCompoundHeaderProps = Omit<DataTableExplorerHeaderProps, 'explorer'>;
16
+ declare function DataTableExplorerCompoundHeader(props: DataTableExplorerCompoundHeaderProps): import("react/jsx-runtime").JSX.Element;
17
+ export type DataTableExplorerCompoundRowsProps = Omit<DataTableExplorerRowsProps, 'explorer'>;
18
+ declare function DataTableExplorerCompoundRows(props: DataTableExplorerCompoundRowsProps): import("react/jsx-runtime").JSX.Element;
19
+ export type DataTableExplorerCompoundStatusBarProps = Omit<DataTableExplorerStatusBarProps, 'explorer'>;
20
+ declare function DataTableExplorerCompoundStatusBar(props: DataTableExplorerCompoundStatusBarProps): import("react/jsx-runtime").JSX.Element;
21
+ export type DataTableExplorerCompoundTableProps = ComponentProps<typeof Table>;
22
+ declare function DataTableExplorerCompoundTable({ className, disableWrapper, style, ...props }: DataTableExplorerCompoundTableProps): import("react/jsx-runtime").JSX.Element;
23
+ export type DataTableExplorerCompoundResetButtonProps = Omit<ComponentProps<typeof Button>, 'onClick'> & {
24
+ onClick?: () => void;
25
+ };
26
+ declare function DataTableExplorerCompoundResetButton({ className, disabled: disabledProp, onClick, ...props }: DataTableExplorerCompoundResetButtonProps): import("react/jsx-runtime").JSX.Element;
27
+ type DataTableExplorerCompoundComponent = ((props: DataTableExplorerProps) => ReactElement) & {
28
+ Header: typeof DataTableExplorerCompoundHeader;
29
+ ResetButton: typeof DataTableExplorerCompoundResetButton;
30
+ Root: typeof DataTableExplorerRoot;
31
+ Rows: typeof DataTableExplorerCompoundRows;
32
+ StatusBar: typeof DataTableExplorerCompoundStatusBar;
33
+ Table: typeof DataTableExplorerCompoundTable;
34
+ };
35
+ export declare const DataTableExplorer: DataTableExplorerCompoundComponent;
36
+ export {};
37
+ //# sourceMappingURL=DataTableExplorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableExplorer.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,MAAM,EAAM,KAAK,EAAC,MAAM,cAAc,CAAC;AAG/C,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAiBjB,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,QAAQ,EAAE,0BAA0B,CAAC;CACtC,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,GACT,EAAE,0BAA0B,2CAM5B;AAED,MAAM,MAAM,sBAAsB,GAChC,iBAAiB,CAAC,wBAAwB,CAAC,CAA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}
@@ -0,0 +1,67 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, } from 'react';
3
+ import { Button, cn, Table } from '@sqlrooms/ui';
4
+ import { FilterX } from 'lucide-react';
5
+ import { getDataTableExplorerTableWidth } from './layout';
6
+ import { DataTableExplorerHeader, } from './DataTableExplorerHeader';
7
+ import { DataTableExplorerRows, } from './DataTableExplorerRows';
8
+ import { DataTableExplorerStatusBar, } from './DataTableExplorerStatusBar';
9
+ import { useDataTableExplorer } from './useDataTableExplorer';
10
+ const explorerContext = createContext(null);
11
+ function useDataTableExplorerCompoundContext() {
12
+ const explorer = useContext(explorerContext);
13
+ if (!explorer) {
14
+ throw new Error('DataTableExplorer compound components must be rendered inside <DataTableExplorer> or <DataTableExplorer.Root>.');
15
+ }
16
+ return explorer;
17
+ }
18
+ /**
19
+ * Provides an existing explorer instance to compound explorer subcomponents.
20
+ */
21
+ export function DataTableExplorerRoot({ children, explorer, }) {
22
+ return (_jsx(explorerContext.Provider, { value: explorer, children: children }));
23
+ }
24
+ /**
25
+ * Creates an explorer instance and exposes it to compound explorer
26
+ * subcomponents through context.
27
+ */
28
+ function DataTableExplorerComponent({ children, ...options }) {
29
+ const explorer = useDataTableExplorer(options);
30
+ return (_jsx(DataTableExplorerRoot, { explorer: explorer, children: children }));
31
+ }
32
+ function DataTableExplorerCompoundHeader(props) {
33
+ const explorer = useDataTableExplorerCompoundContext();
34
+ return _jsx(DataTableExplorerHeader, { ...props, explorer: explorer });
35
+ }
36
+ function DataTableExplorerCompoundRows(props) {
37
+ const explorer = useDataTableExplorerCompoundContext();
38
+ return _jsx(DataTableExplorerRows, { ...props, explorer: explorer });
39
+ }
40
+ function DataTableExplorerCompoundStatusBar(props) {
41
+ const explorer = useDataTableExplorerCompoundContext();
42
+ return _jsx(DataTableExplorerStatusBar, { ...props, explorer: explorer });
43
+ }
44
+ function DataTableExplorerCompoundTable({ className, disableWrapper = true, style, ...props }) {
45
+ const explorer = useDataTableExplorerCompoundContext();
46
+ const tableWidth = getDataTableExplorerTableWidth(explorer.columns);
47
+ return (_jsx(Table, { disableWrapper: disableWrapper, className: ['min-w-full table-fixed', className]
48
+ .filter(Boolean)
49
+ .join(' '), style: { width: `${tableWidth}px`, ...style }, ...props }));
50
+ }
51
+ function DataTableExplorerCompoundResetButton({ className, disabled: disabledProp, onClick, ...props }) {
52
+ const explorer = useDataTableExplorerCompoundContext();
53
+ const disabled = disabledProp ?? !explorer.hasFilters;
54
+ return (_jsx(Button, { type: "button", size: "icon", variant: "ghost", className: cn('h-7 w-7', className), "aria-label": "Reset filters", title: "Reset filters", disabled: disabled, onClick: () => {
55
+ explorer.reset();
56
+ onClick?.();
57
+ }, ...props, children: _jsx(FilterX, { className: "h-4 w-4" }) }));
58
+ }
59
+ export const DataTableExplorer = Object.assign(DataTableExplorerComponent, {
60
+ Header: DataTableExplorerCompoundHeader,
61
+ ResetButton: DataTableExplorerCompoundResetButton,
62
+ Root: DataTableExplorerRoot,
63
+ Rows: DataTableExplorerCompoundRows,
64
+ StatusBar: DataTableExplorerCompoundStatusBar,
65
+ Table: DataTableExplorerCompoundTable,
66
+ });
67
+ //# sourceMappingURL=DataTableExplorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableExplorer.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorer.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAC,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,8BAA8B,EAAC,MAAM,UAAU,CAAC;AACxD,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,0BAA0B,GAE3B,MAAM,8BAA8B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xC,MAAM,EAAE,+BAA+B;IACvC,WAAW,EAAE,oCAAoC;IACjD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,6BAA6B;IACnC,SAAS,EAAE,kCAAkC;IAC7C,KAAK,EAAE,8BAA8B;CACtC,CAAC,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type PropsWithChildren,\n type ReactElement,\n} from 'react';\nimport {Button, cn, Table} from '@sqlrooms/ui';\nimport {FilterX} from 'lucide-react';\nimport {getDataTableExplorerTableWidth} from './layout';\nimport {\n DataTableExplorerHeader,\n type DataTableExplorerHeaderProps,\n} from './DataTableExplorerHeader';\nimport {\n DataTableExplorerRows,\n type DataTableExplorerRowsProps,\n} from './DataTableExplorerRows';\nimport {\n DataTableExplorerStatusBar,\n type DataTableExplorerStatusBarProps,\n} from './DataTableExplorerStatusBar';\nimport type {\n DataTableExplorerOptions,\n UseDataTableExplorerReturn,\n} from './types';\nimport {useDataTableExplorer} from './useDataTableExplorer';\n\nconst explorerContext = createContext<UseDataTableExplorerReturn | null>(null);\n\nfunction useDataTableExplorerCompoundContext() {\n const explorer = useContext(explorerContext);\n\n if (!explorer) {\n throw new Error(\n 'DataTableExplorer compound components must be rendered inside <DataTableExplorer> or <DataTableExplorer.Root>.',\n );\n }\n\n return explorer;\n}\n\nexport type DataTableExplorerRootProps = PropsWithChildren<{\n explorer: UseDataTableExplorerReturn;\n}>;\n\n/**\n * Provides an existing explorer instance to compound explorer subcomponents.\n */\nexport function DataTableExplorerRoot({\n children,\n explorer,\n}: DataTableExplorerRootProps) {\n return (\n <explorerContext.Provider value={explorer}>\n {children}\n </explorerContext.Provider>\n );\n}\n\nexport type DataTableExplorerProps =\n PropsWithChildren<DataTableExplorerOptions>;\n\n/**\n * Creates an explorer instance and exposes it to compound explorer\n * subcomponents through context.\n */\nfunction DataTableExplorerComponent({\n children,\n ...options\n}: DataTableExplorerProps): ReactElement {\n const explorer = useDataTableExplorer(options);\n return (\n <DataTableExplorerRoot explorer={explorer}>\n {children}\n </DataTableExplorerRoot>\n );\n}\n\nexport type DataTableExplorerCompoundHeaderProps = Omit<\n DataTableExplorerHeaderProps,\n 'explorer'\n>;\n\nfunction DataTableExplorerCompoundHeader(\n props: DataTableExplorerCompoundHeaderProps,\n) {\n const explorer = useDataTableExplorerCompoundContext();\n return <DataTableExplorerHeader {...props} explorer={explorer} />;\n}\n\nexport type DataTableExplorerCompoundRowsProps = Omit<\n DataTableExplorerRowsProps,\n 'explorer'\n>;\n\nfunction DataTableExplorerCompoundRows(\n props: DataTableExplorerCompoundRowsProps,\n) {\n const explorer = useDataTableExplorerCompoundContext();\n return <DataTableExplorerRows {...props} explorer={explorer} />;\n}\n\nexport type DataTableExplorerCompoundStatusBarProps = Omit<\n DataTableExplorerStatusBarProps,\n 'explorer'\n>;\n\nfunction DataTableExplorerCompoundStatusBar(\n props: DataTableExplorerCompoundStatusBarProps,\n) {\n const explorer = useDataTableExplorerCompoundContext();\n return <DataTableExplorerStatusBar {...props} explorer={explorer} />;\n}\n\nexport type DataTableExplorerCompoundTableProps = ComponentProps<typeof Table>;\n\nfunction DataTableExplorerCompoundTable({\n className,\n disableWrapper = true,\n style,\n ...props\n}: DataTableExplorerCompoundTableProps) {\n const explorer = useDataTableExplorerCompoundContext();\n const tableWidth = getDataTableExplorerTableWidth(explorer.columns);\n\n return (\n <Table\n disableWrapper={disableWrapper}\n className={['min-w-full table-fixed', className]\n .filter(Boolean)\n .join(' ')}\n style={{width: `${tableWidth}px`, ...style}}\n {...props}\n />\n );\n}\n\nexport type DataTableExplorerCompoundResetButtonProps = Omit<\n ComponentProps<typeof Button>,\n 'onClick'\n> & {\n onClick?: () => void;\n};\n\nfunction DataTableExplorerCompoundResetButton({\n className,\n disabled: disabledProp,\n onClick,\n ...props\n}: DataTableExplorerCompoundResetButtonProps) {\n const explorer = useDataTableExplorerCompoundContext();\n const disabled = disabledProp ?? !explorer.hasFilters;\n\n return (\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"ghost\"\n className={cn('h-7 w-7', className)}\n aria-label=\"Reset filters\"\n title=\"Reset filters\"\n disabled={disabled}\n onClick={() => {\n explorer.reset();\n onClick?.();\n }}\n {...props}\n >\n <FilterX className=\"h-4 w-4\" />\n </Button>\n );\n}\n\ntype DataTableExplorerCompoundComponent = ((\n props: DataTableExplorerProps,\n) => ReactElement) & {\n Header: typeof DataTableExplorerCompoundHeader;\n ResetButton: typeof DataTableExplorerCompoundResetButton;\n Root: typeof DataTableExplorerRoot;\n Rows: typeof DataTableExplorerCompoundRows;\n StatusBar: typeof DataTableExplorerCompoundStatusBar;\n Table: typeof DataTableExplorerCompoundTable;\n};\n\nexport const DataTableExplorer: DataTableExplorerCompoundComponent =\n Object.assign(DataTableExplorerComponent, {\n Header: DataTableExplorerCompoundHeader,\n ResetButton: DataTableExplorerCompoundResetButton,\n Root: DataTableExplorerRoot,\n Rows: DataTableExplorerCompoundRows,\n StatusBar: DataTableExplorerCompoundStatusBar,\n Table: DataTableExplorerCompoundTable,\n });\n"]}
@@ -0,0 +1,50 @@
1
+ import { MosaicClient, type Selection } from '@uwdata/mosaic-core';
2
+ import { type ExprNode, Query } from '@uwdata/mosaic-sql';
3
+ import type * as arrow from 'apache-arrow';
4
+ import type { DataTableExplorerCategorySummary } from './types';
5
+ import { type CategoryCountRow } from './utils';
6
+ type CategoryClientOptions = {
7
+ categoryLimit: number;
8
+ field: arrow.Field;
9
+ onStateChange: (summary: DataTableExplorerCategorySummary) => void;
10
+ selection: Selection;
11
+ tableName: string;
12
+ };
13
+ export declare class DataTableExplorerCategoryClient extends MosaicClient {
14
+ private readonly categoryLimit;
15
+ private filteredError?;
16
+ private filteredLoading;
17
+ private readonly field;
18
+ private readonly onStateChange;
19
+ private selectedKey?;
20
+ private filteredRows?;
21
+ private readonly tableName;
22
+ private totalError?;
23
+ private totalLoading;
24
+ private totalRows?;
25
+ constructor(options: CategoryClientOptions);
26
+ get filterStable(): boolean;
27
+ private emitSummary;
28
+ setTotalError(error?: Error): void;
29
+ setTotalLoading(isLoading: boolean): void;
30
+ setTotalRows(rows: CategoryCountRow[]): void;
31
+ queryPending(): this;
32
+ query(filter?: Array<ExprNode>): Query;
33
+ queryResult(data: unknown): this;
34
+ queryError(error: Error): this;
35
+ reset(): void;
36
+ toggleValue(key: string): void;
37
+ }
38
+ type DataTableExplorerCategoryTotalClientOptions = {
39
+ summaryClient: DataTableExplorerCategoryClient;
40
+ };
41
+ export declare class DataTableExplorerCategoryTotalClient extends MosaicClient {
42
+ private readonly summaryClient;
43
+ constructor(options: DataTableExplorerCategoryTotalClientOptions);
44
+ queryPending(): this;
45
+ query(filter?: Array<ExprNode>): Query;
46
+ queryResult(data: unknown): this;
47
+ queryError(error: Error): this;
48
+ }
49
+ export {};
50
+ //# sourceMappingURL=DataTableExplorerCategoryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableExplorerCategoryClient.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCategoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAe,KAAK,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAC,gCAAgC,EAAC,MAAM,SAAS,CAAC;AAC9D,OAAO,EAIL,KAAK,gBAAgB,EAGtB,MAAM,SAAS,CAAC;AAEjB,KAAK,qBAAqB,GAAG;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IACnB,aAAa,EAAE,CAAC,OAAO,EAAE,gCAAgC,KAAK,IAAI,CAAC;IACnE,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,qBAAa,+BAAgC,SAAQ,YAAY;IAC/D,OAAO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EAAE,KAAK,GAAG,IAAI;CAIxC"}
@@ -0,0 +1,121 @@
1
+ import { MosaicClient, clausePoint } from '@uwdata/mosaic-core';
2
+ import { buildCategoryBuckets, buildCategorySummaryQuery, categoryKeyToSelectionValue, isSelectableCategoryKey, rowsFromQueryResult, } from './utils';
3
+ export class DataTableExplorerCategoryClient extends MosaicClient {
4
+ categoryLimit;
5
+ filteredError;
6
+ filteredLoading = true;
7
+ field;
8
+ onStateChange;
9
+ selectedKey;
10
+ filteredRows;
11
+ tableName;
12
+ totalError;
13
+ totalLoading = true;
14
+ totalRows;
15
+ constructor(options) {
16
+ super(options.selection);
17
+ this.categoryLimit = options.categoryLimit;
18
+ this.field = options.field;
19
+ this.onStateChange = options.onStateChange;
20
+ this.tableName = options.tableName;
21
+ }
22
+ get filterStable() {
23
+ return false;
24
+ }
25
+ emitSummary() {
26
+ const filteredRows = this.filteredRows ?? (this.filteredLoading ? (this.totalRows ?? []) : []);
27
+ const totalRows = this.totalRows ?? (this.totalLoading ? (this.filteredRows ?? []) : []);
28
+ const { bucketCount, buckets } = buildCategoryBuckets(filteredRows, totalRows, this.categoryLimit, this.selectedKey);
29
+ this.onStateChange({
30
+ bucketCount,
31
+ buckets,
32
+ error: this.filteredError ?? this.totalError,
33
+ isLoading: this.filteredLoading || this.totalLoading,
34
+ kind: 'category',
35
+ selectedKey: this.selectedKey,
36
+ toggleValue: (key) => this.toggleValue(key),
37
+ });
38
+ }
39
+ setTotalError(error) {
40
+ this.totalError = error;
41
+ this.totalLoading = false;
42
+ this.emitSummary();
43
+ }
44
+ setTotalLoading(isLoading) {
45
+ this.totalLoading = isLoading;
46
+ if (isLoading) {
47
+ this.totalError = undefined;
48
+ }
49
+ this.emitSummary();
50
+ }
51
+ setTotalRows(rows) {
52
+ this.totalRows = rows
53
+ .slice()
54
+ .sort((left, right) => right.total - left.total);
55
+ this.totalError = undefined;
56
+ this.totalLoading = false;
57
+ this.emitSummary();
58
+ }
59
+ queryPending() {
60
+ this.filteredLoading = true;
61
+ this.filteredError = undefined;
62
+ this.emitSummary();
63
+ return this;
64
+ }
65
+ query(filter = []) {
66
+ return buildCategorySummaryQuery(this.tableName, this.field.name, filter);
67
+ }
68
+ queryResult(data) {
69
+ const rows = rowsFromQueryResult(data)
70
+ .slice()
71
+ .sort((left, right) => right.total - left.total);
72
+ this.filteredRows = rows;
73
+ this.filteredError = undefined;
74
+ this.filteredLoading = false;
75
+ this.emitSummary();
76
+ return this;
77
+ }
78
+ queryError(error) {
79
+ this.filteredError = error;
80
+ this.filteredLoading = false;
81
+ this.emitSummary();
82
+ return this;
83
+ }
84
+ reset() {
85
+ this.selectedKey = undefined;
86
+ this.emitSummary();
87
+ }
88
+ toggleValue(key) {
89
+ if (!isSelectableCategoryKey(key)) {
90
+ return;
91
+ }
92
+ this.selectedKey = this.selectedKey === key ? undefined : key;
93
+ this.filterBy?.update(clausePoint(this.field.name, categoryKeyToSelectionValue(this.selectedKey), {
94
+ source: this,
95
+ }));
96
+ this.emitSummary();
97
+ }
98
+ }
99
+ export class DataTableExplorerCategoryTotalClient extends MosaicClient {
100
+ summaryClient;
101
+ constructor(options) {
102
+ super();
103
+ this.summaryClient = options.summaryClient;
104
+ }
105
+ queryPending() {
106
+ this.summaryClient.setTotalLoading(true);
107
+ return this;
108
+ }
109
+ query(filter = []) {
110
+ return this.summaryClient.query(filter);
111
+ }
112
+ queryResult(data) {
113
+ this.summaryClient.setTotalRows(rowsFromQueryResult(data));
114
+ return this;
115
+ }
116
+ queryError(error) {
117
+ this.summaryClient.setTotalError(error);
118
+ return this;
119
+ }
120
+ }
121
+ //# sourceMappingURL=DataTableExplorerCategoryClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableExplorerCategoryClient.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCategoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AAI9E,OAAO,EACL,oBA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D,MAAM,OAAO,oCAAqC,SAAQ,YAAY;IACnD,aAAa,CAAkC;IAEhE,YAAY,OAAoD;QAC9D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;IAEQ,YAAY;QACnB,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,KAAK,CAAC,SAA0B,EAAE;QACzC,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAEQ,WAAW,CAAC,IAAa;QAChC,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,mBAAmB,CAAmB,IAAI,CAAC,CAC5C,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,UAAU,CAAC,KAAY;QAC9B,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import {MosaicClient, clausePoint, type Selection} from '@uwdata/mosaic-core';\nimport {type ExprNode, Query} from '@uwdata/mosaic-sql';\nimport type * as arrow from 'apache-arrow';\nimport type {DataTableExplorerCategorySummary} from './types';\nimport {\n buildCategoryBuckets,\n buildCategorySummaryQuery,\n categoryKeyToSelectionValue,\n type CategoryCountRow,\n isSelectableCategoryKey,\n rowsFromQueryResult,\n} from './utils';\n\ntype CategoryClientOptions = {\n categoryLimit: number;\n field: arrow.Field;\n onStateChange: (summary: DataTableExplorerCategorySummary) => void;\n selection: Selection;\n tableName: string;\n};\n\nexport class DataTableExplorerCategoryClient extends MosaicClient {\n private readonly categoryLimit: number;\n private filteredError?: Error;\n private filteredLoading = true;\n private readonly field: arrow.Field;\n private readonly onStateChange: (\n summary: DataTableExplorerCategorySummary,\n ) => void;\n private selectedKey?: string;\n private filteredRows?: CategoryCountRow[];\n private readonly tableName: string;\n private totalError?: Error;\n private totalLoading = true;\n private totalRows?: CategoryCountRow[];\n\n constructor(options: CategoryClientOptions) {\n super(options.selection);\n this.categoryLimit = options.categoryLimit;\n this.field = options.field;\n this.onStateChange = options.onStateChange;\n this.tableName = options.tableName;\n }\n\n override get filterStable(): boolean {\n return false;\n }\n\n private emitSummary() {\n const filteredRows =\n this.filteredRows ?? (this.filteredLoading ? (this.totalRows ?? []) : []);\n const totalRows =\n this.totalRows ?? (this.totalLoading ? (this.filteredRows ?? []) : []);\n const {bucketCount, buckets} = buildCategoryBuckets(\n filteredRows,\n totalRows,\n this.categoryLimit,\n this.selectedKey,\n );\n\n this.onStateChange({\n bucketCount,\n buckets,\n error: this.filteredError ?? this.totalError,\n isLoading: this.filteredLoading || this.totalLoading,\n kind: 'category',\n selectedKey: this.selectedKey,\n toggleValue: (key) => this.toggleValue(key),\n });\n }\n\n setTotalError(error?: Error) {\n this.totalError = error;\n this.totalLoading = false;\n this.emitSummary();\n }\n\n setTotalLoading(isLoading: boolean) {\n this.totalLoading = isLoading;\n if (isLoading) {\n this.totalError = undefined;\n }\n this.emitSummary();\n }\n\n setTotalRows(rows: CategoryCountRow[]) {\n this.totalRows = rows\n .slice()\n .sort(\n (left: CategoryCountRow, right: CategoryCountRow) =>\n right.total - left.total,\n );\n this.totalError = undefined;\n this.totalLoading = false;\n this.emitSummary();\n }\n\n override queryPending(): this {\n this.filteredLoading = true;\n this.filteredError = undefined;\n this.emitSummary();\n return this;\n }\n\n override query(filter: Array<ExprNode> = []): Query {\n return buildCategorySummaryQuery(this.tableName, this.field.name, filter);\n }\n\n override queryResult(data: unknown): this {\n const rows = rowsFromQueryResult<CategoryCountRow>(data)\n .slice()\n .sort(\n (left: CategoryCountRow, right: CategoryCountRow) =>\n right.total - left.total,\n );\n this.filteredRows = rows;\n this.filteredError = undefined;\n this.filteredLoading = false;\n this.emitSummary();\n return this;\n }\n\n override queryError(error: Error): this {\n this.filteredError = error;\n this.filteredLoading = false;\n this.emitSummary();\n return this;\n }\n\n reset() {\n this.selectedKey = undefined;\n this.emitSummary();\n }\n\n toggleValue(key: string) {\n if (!isSelectableCategoryKey(key)) {\n return;\n }\n\n this.selectedKey = this.selectedKey === key ? undefined : key;\n this.filterBy?.update(\n clausePoint(\n this.field.name,\n categoryKeyToSelectionValue(this.selectedKey),\n {\n source: this,\n },\n ),\n );\n this.emitSummary();\n }\n}\n\ntype DataTableExplorerCategoryTotalClientOptions = {\n summaryClient: DataTableExplorerCategoryClient;\n};\n\nexport class DataTableExplorerCategoryTotalClient extends MosaicClient {\n private readonly summaryClient: DataTableExplorerCategoryClient;\n\n constructor(options: DataTableExplorerCategoryTotalClientOptions) {\n super();\n this.summaryClient = options.summaryClient;\n }\n\n override queryPending(): this {\n this.summaryClient.setTotalLoading(true);\n return this;\n }\n\n override query(filter: Array<ExprNode> = []): Query {\n return this.summaryClient.query(filter);\n }\n\n override queryResult(data: unknown): this {\n this.summaryClient.setTotalRows(\n rowsFromQueryResult<CategoryCountRow>(data),\n );\n return this;\n }\n\n override queryError(error: Error): this {\n this.summaryClient.setTotalError(error);\n return this;\n }\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import { MosaicClient, type Selection } from '@uwdata/mosaic-core';
2
+ import { type ExprNode, type Query } from '@uwdata/mosaic-sql';
3
+ export type DataTableExplorerCountState = {
4
+ count?: number;
5
+ error?: Error;
6
+ isLoading: boolean;
7
+ };
8
+ type DataTableExplorerCountClientOptions = {
9
+ filterStable?: boolean;
10
+ onStateChange: (state: DataTableExplorerCountState) => void;
11
+ selection?: Selection;
12
+ tableName: string;
13
+ };
14
+ export declare class DataTableExplorerCountClient extends MosaicClient {
15
+ private count?;
16
+ private error?;
17
+ private readonly isFilterStable;
18
+ private readonly onStateChange;
19
+ private readonly tableName;
20
+ constructor(options: DataTableExplorerCountClientOptions);
21
+ get filterStable(): boolean;
22
+ queryPending(): this;
23
+ query(filter?: Array<ExprNode>): Query;
24
+ queryResult(data: unknown): this;
25
+ queryError(error: Error): this;
26
+ }
27
+ export {};
28
+ //# sourceMappingURL=DataTableExplorerCountClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTableExplorerCountClient.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,KAAK,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAG7D,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,KAAK,CAAC,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+C;IAC7E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,mCAAmC;IAOxD,IAAa,YAAY,IAAI,OAAO,CAEnC;IAEQ,YAAY,IAAI,IAAI;IASpB,KAAK,CAAC,MAAM,GAAE,KAAK,CAAC,QAAQ,CAAM,GAAG,KAAK;IAO1C,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAUhC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CASxC"}