@sqlrooms/mosaic 0.29.0-rc.6 → 0.29.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -1
- package/README.md +182 -19
- package/dist/MosaicChart.d.ts +6 -6
- package/dist/MosaicChart.d.ts.map +1 -1
- package/dist/MosaicChart.js +6 -6
- package/dist/MosaicChart.js.map +1 -1
- package/dist/MosaicChartBuilder.d.ts +1 -1
- package/dist/MosaicChartBuilder.d.ts.map +1 -1
- package/dist/MosaicChartBuilder.js +1 -1
- package/dist/MosaicChartBuilder.js.map +1 -1
- package/dist/MosaicColorLegend.d.ts.map +1 -1
- package/dist/MosaicColorLegend.js +0 -1
- package/dist/MosaicColorLegend.js.map +1 -1
- package/dist/MosaicSlice.d.ts +1 -0
- package/dist/MosaicSlice.d.ts.map +1 -1
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +15 -6
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/ai/ai.d.ts +108 -0
- package/dist/ai/ai.d.ts.map +1 -0
- package/dist/ai/ai.js +461 -0
- package/dist/ai/ai.js.map +1 -0
- package/dist/ai/data-table-explorer-tool.d.ts +40 -0
- package/dist/ai/data-table-explorer-tool.d.ts.map +1 -0
- package/dist/ai/data-table-explorer-tool.js +75 -0
- package/dist/ai/data-table-explorer-tool.js.map +1 -0
- package/dist/ai/list-panels-tool.d.ts +35 -0
- package/dist/ai/list-panels-tool.d.ts.map +1 -0
- package/dist/ai/list-panels-tool.js.map +1 -0
- package/dist/ai/remove-panel-tool.d.ts +31 -0
- package/dist/ai/remove-panel-tool.d.ts.map +1 -0
- package/dist/ai/remove-panel-tool.js.map +1 -0
- package/dist/ai/tool-helpers.d.ts +34 -0
- package/dist/ai/tool-helpers.d.ts.map +1 -0
- package/dist/ai/tool-helpers.js +93 -0
- package/dist/ai/tool-helpers.js.map +1 -0
- package/dist/ai/tool-schemas.d.ts.map +1 -0
- package/dist/ai/tool-schemas.js.map +1 -0
- package/dist/ai/tool-types.d.ts +26 -0
- package/dist/ai/tool-types.d.ts.map +1 -0
- package/dist/ai/tool-types.js.map +1 -0
- package/dist/ai/tool-validation.d.ts +3 -0
- package/dist/ai/tool-validation.d.ts.map +1 -0
- package/dist/ai/tool-validation.js.map +1 -0
- package/dist/ai.d.ts +2 -99
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +2 -441
- package/dist/ai.js.map +1 -1
- package/dist/chart-builders/ChartBuilderActions.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
- package/dist/chart-builders/ChartBuilderFields.js +2 -2
- package/dist/chart-builders/ChartBuilderFields.js.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.js.map +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
- package/dist/chart-builders/chartSpecTitle.js.map +1 -1
- package/dist/chart-builders/chartTypeUtils.d.ts +1 -2
- package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -1
- package/dist/chart-builders/chartTypeUtils.js +0 -1
- package/dist/chart-builders/chartTypeUtils.js.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.js.map +1 -1
- package/dist/charts/MosaicChart.d.ts +14 -0
- package/dist/charts/MosaicChart.d.ts.map +1 -0
- package/dist/charts/MosaicChart.js +13 -0
- package/dist/charts/MosaicChart.js.map +1 -0
- package/dist/charts/MosaicChartError.d.ts +14 -0
- package/dist/charts/MosaicChartError.d.ts.map +1 -0
- package/dist/charts/MosaicChartError.js +31 -0
- package/dist/charts/MosaicChartError.js.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts +7 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js +10 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js.map +1 -0
- package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
- package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsButton.js +7 -0
- package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts +11 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.js +21 -0
- package/dist/charts/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/MosaicChartView.d.ts +15 -0
- package/dist/charts/MosaicChartView.d.ts.map +1 -0
- package/dist/charts/MosaicChartView.js +69 -0
- package/dist/charts/MosaicChartView.js.map +1 -0
- package/dist/charts/addChartPanelAction.d.ts.map +1 -0
- package/dist/charts/addChartPanelAction.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts +43 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js +74 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts +13 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js +18 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts +24 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js +34 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts +14 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +17 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +11 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js +23 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
- package/dist/charts/chart-types/base-types.d.ts +179 -0
- package/dist/charts/chart-types/base-types.d.ts.map +1 -0
- package/dist/charts/chart-types/base-types.js +14 -0
- package/dist/charts/chart-types/base-types.js.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js +9 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.js +24 -0
- package/dist/charts/chart-types/box-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +67 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +281 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +118 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts +24 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts +14 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +18 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +63 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts +6 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.js.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts +21 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.js +16 -0
- package/dist/charts/chart-types/box-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts +40 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.js +67 -0
- package/dist/charts/chart-types/box-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/chart-config.d.ts +140 -0
- package/dist/charts/chart-types/chart-config.d.ts.map +1 -0
- package/dist/charts/chart-types/chart-config.js +41 -0
- package/dist/charts/chart-types/chart-config.js.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js +9 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.js +19 -0
- package/dist/charts/chart-types/count-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts +5 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.js +80 -0
- package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.js +63 -0
- package/dist/charts/chart-types/count-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/createChartTools.d.ts +17 -0
- package/dist/charts/chart-types/createChartTools.d.ts.map +1 -0
- package/dist/charts/chart-types/createChartTools.js +24 -0
- package/dist/charts/chart-types/createChartTools.js.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts +12 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js +30 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js +30 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.js +22 -0
- package/dist/charts/chart-types/custom-spec/definition.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts +5 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.js +28 -0
- package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
- package/dist/charts/chart-types/errors.d.ts +32 -0
- package/dist/charts/chart-types/errors.d.ts.map +1 -0
- package/dist/charts/chart-types/errors.js +48 -0
- package/dist/charts/chart-types/errors.js.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js +9 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.js +19 -0
- package/dist/charts/chart-types/heatmap/definition.js.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts +5 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.js +64 -0
- package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.js +67 -0
- package/dist/charts/chart-types/heatmap/tool.js.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js +13 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -0
- package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/definition.js +19 -0
- package/dist/charts/chart-types/histogram/definition.js.map +1 -0
- package/dist/charts/chart-types/histogram/schema.d.ts +26 -0
- package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/schema.js +27 -0
- package/dist/charts/chart-types/histogram/schema.js.map +1 -0
- package/dist/charts/chart-types/histogram/spec.d.ts +5 -0
- package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/spec.js +60 -0
- package/dist/charts/chart-types/histogram/spec.js.map +1 -0
- package/dist/charts/chart-types/histogram/tool.d.ts +42 -0
- package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/tool.js +65 -0
- package/dist/charts/chart-types/histogram/tool.js.map +1 -0
- package/dist/charts/chart-types/index.d.ts +42 -0
- package/dist/charts/chart-types/index.d.ts.map +1 -0
- package/dist/charts/chart-types/index.js +53 -0
- package/dist/charts/chart-types/index.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js +15 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.js +26 -0
- package/dist/charts/chart-types/line-chart/definition.js.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts +72 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.js +34 -0
- package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts +5 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.js +123 -0
- package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts +66 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.js +75 -0
- package/dist/charts/chart-types/line-chart/tool.js.map +1 -0
- package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/utils.js +17 -0
- package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts +103 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.js +20 -0
- package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js +9 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.js +24 -0
- package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/schema.d.ts +23 -0
- package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/schema.js +17 -0
- package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.js +81 -0
- package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts +42 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.js +70 -0
- package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +23 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +23 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -0
- package/dist/charts/useBrushSelectionParams.d.ts +3 -0
- package/dist/charts/useBrushSelectionParams.d.ts.map +1 -0
- package/dist/charts/useBrushSelectionParams.js +16 -0
- package/dist/charts/useBrushSelectionParams.js.map +1 -0
- package/dist/charts/useChartDataPolicy.d.ts +5 -0
- package/dist/charts/useChartDataPolicy.d.ts.map +1 -0
- package/dist/charts/useChartDataPolicy.js +18 -0
- package/dist/charts/useChartDataPolicy.js.map +1 -0
- package/dist/charts/useChartPanelClients.d.ts +8 -0
- package/dist/charts/useChartPanelClients.d.ts.map +1 -0
- package/dist/charts/useChartPanelClients.js +22 -0
- package/dist/charts/useChartPanelClients.js.map +1 -0
- package/dist/charts/useChartRetainer.d.ts +4 -0
- package/dist/charts/useChartRetainer.d.ts.map +1 -0
- package/dist/charts/useChartRetainer.js +18 -0
- package/dist/charts/useChartRetainer.js.map +1 -0
- package/dist/charts/useChartTypeDefinition.d.ts +3 -0
- package/dist/charts/useChartTypeDefinition.d.ts.map +1 -0
- package/dist/charts/useChartTypeDefinition.js.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts +20 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.js +63 -0
- package/dist/charts/useMosaicChartRenderContext.js.map +1 -0
- package/dist/charts/useParseChartConfig.d.ts +12 -0
- package/dist/charts/useParseChartConfig.d.ts.map +1 -0
- package/dist/charts/useParseChartConfig.js +28 -0
- package/dist/charts/useParseChartConfig.js.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts +7 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.js +19 -0
- package/dist/charts/useRuntimeIssueReporter.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts +15 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.js +10 -0
- package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts +4 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js +37 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts +15 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js +10 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js.map +1 -0
- package/dist/column-types-utils.d.ts +12 -0
- package/dist/column-types-utils.d.ts.map +1 -0
- package/dist/column-types-utils.js +55 -0
- package/dist/column-types-utils.js.map +1 -0
- package/dist/components/AggregationSelector.d.ts +11 -0
- package/dist/components/AggregationSelector.d.ts.map +1 -0
- package/dist/components/AggregationSelector.js +16 -0
- package/dist/components/AggregationSelector.js.map +1 -0
- package/dist/components/BlockCaptionEditor.d.ts +20 -0
- package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
- package/dist/components/BlockCaptionEditor.js +15 -0
- package/dist/components/BlockCaptionEditor.js.map +1 -0
- package/dist/components/ColorSelector.d.ts +12 -0
- package/dist/components/ColorSelector.d.ts.map +1 -0
- package/dist/components/ColorSelector.js +14 -0
- package/dist/components/ColorSelector.js.map +1 -0
- package/dist/components/ColumnSelector.d.ts +14 -0
- package/dist/components/ColumnSelector.d.ts.map +1 -0
- package/dist/components/ColumnSelector.js +30 -0
- package/dist/components/ColumnSelector.js.map +1 -0
- package/dist/components/ColumnsContext.d.ts +11 -0
- package/dist/components/ColumnsContext.d.ts.map +1 -0
- package/dist/components/ColumnsContext.js +15 -0
- package/dist/components/ColumnsContext.js.map +1 -0
- package/dist/components/Combobox.d.ts +45 -0
- package/dist/components/Combobox.d.ts.map +1 -0
- package/dist/components/Combobox.js +58 -0
- package/dist/components/Combobox.js.map +1 -0
- package/dist/components/DataTableSelector.d.ts +22 -0
- package/dist/components/DataTableSelector.d.ts.map +1 -0
- package/dist/components/DataTableSelector.js +66 -0
- package/dist/components/DataTableSelector.js.map +1 -0
- package/dist/components/Field.d.ts.map +1 -0
- package/dist/components/Field.js.map +1 -0
- package/dist/components/FieldSelectorInput.d.ts +15 -0
- package/dist/components/FieldSelectorInput.d.ts.map +1 -0
- package/dist/components/FieldSelectorInput.js +14 -0
- package/dist/components/FieldSelectorInput.js.map +1 -0
- package/dist/components/MultiFieldSelector.d.ts +17 -0
- package/dist/components/MultiFieldSelector.d.ts.map +1 -0
- package/dist/components/MultiFieldSelector.js +44 -0
- package/dist/components/MultiFieldSelector.js.map +1 -0
- package/dist/components/TableSelector.d.ts.map +1 -0
- package/dist/components/TableSelector.js +23 -0
- package/dist/components/TableSelector.js.map +1 -0
- package/dist/components/TemporalGranularitySelector.d.ts +10 -0
- package/dist/components/TemporalGranularitySelector.d.ts.map +1 -0
- package/dist/components/TemporalGranularitySelector.js +41 -0
- package/dist/components/TemporalGranularitySelector.js.map +1 -0
- package/dist/components/useCombobox.d.ts +23 -0
- package/dist/components/useCombobox.d.ts.map +1 -0
- package/dist/components/useCombobox.js +26 -0
- package/dist/components/useCombobox.js.map +1 -0
- package/dist/constants/chart-colors.d.ts +3 -0
- package/dist/constants/chart-colors.d.ts.map +1 -0
- package/dist/constants/chart-colors.js +5 -0
- package/dist/constants/chart-colors.js.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +5 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js +6 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -0
- package/dist/dashboard/MosaicDashboard.d.ts +2 -5
- package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboard.js +4 -6
- package/dist/dashboard/MosaicDashboard.js.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.d.ts +0 -2
- package/dist/dashboard/MosaicDashboardContext.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.js.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.d.ts +52 -79
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +102 -52
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/action-types.d.ts +1 -1
- package/dist/dashboard/action-types.d.ts.map +1 -1
- package/dist/dashboard/action-types.js.map +1 -1
- package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
- package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
- package/dist/dashboard/components/ResetFiltersButton.js +15 -0
- package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
- package/dist/dashboard/core-types.d.ts +2 -8
- package/dist/dashboard/core-types.d.ts.map +1 -1
- package/dist/dashboard/core-types.js +2 -8
- package/dist/dashboard/core-types.js.map +1 -1
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts +3 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts.map +1 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js +11 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts +12 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js +32 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js.map +1 -0
- package/dist/dashboard/dashboard-types.d.ts +21 -57
- package/dist/dashboard/dashboard-types.d.ts.map +1 -1
- package/dist/dashboard/dashboard-types.js +7 -15
- package/dist/dashboard/dashboard-types.js.map +1 -1
- package/dist/dashboard/defaultPanelActions.d.ts.map +1 -1
- package/dist/dashboard/defaultPanelActions.js +3 -5
- package/dist/dashboard/defaultPanelActions.js.map +1 -1
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js +23 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js +21 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts +13 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js +30 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js +63 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +15 -4
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +1 -1
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -1
- package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
- package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
- package/dist/dashboard/usePanelClientRegistration.js +30 -0
- package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
- package/dist/dashboard/usePanelClients.d.ts +7 -0
- package/dist/dashboard/usePanelClients.d.ts.map +1 -0
- package/dist/dashboard/usePanelClients.js +13 -0
- package/dist/dashboard/usePanelClients.js.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.js +1 -1
- package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorer.d.ts +39 -0
- package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorer.js +67 -0
- package/dist/data-table-explorer/DataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +50 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +122 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +28 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts +7 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js +195 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +69 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +179 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +37 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js +28 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +24 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts +3 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js +9 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +49 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js +132 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +43 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts +68 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.js +130 -0
- package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +30 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +120 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +28 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +40 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
- package/dist/data-table-explorer/layout.d.ts +11 -0
- package/dist/data-table-explorer/layout.d.ts.map +1 -0
- package/dist/data-table-explorer/layout.js +23 -0
- package/dist/data-table-explorer/layout.js.map +1 -0
- package/dist/data-table-explorer/types.d.ts +90 -0
- package/dist/data-table-explorer/types.d.ts.map +1 -0
- package/dist/data-table-explorer/types.js.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts +7 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.js +95 -0
- package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/utils.d.ts +61 -0
- package/dist/data-table-explorer/utils.d.ts.map +1 -0
- package/dist/data-table-explorer/utils.js +349 -0
- package/dist/data-table-explorer/utils.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +12 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +9 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts +4 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +35 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -0
- package/dist/editor/MosaicChartContainer.d.ts +4 -4
- package/dist/editor/MosaicChartContainer.js +4 -4
- package/dist/editor/MosaicChartContainer.js.map +1 -1
- package/dist/hooks/useTablesWithColumns.d.ts.map +1 -0
- package/dist/hooks/useTablesWithColumns.js +13 -0
- package/dist/hooks/useTablesWithColumns.js.map +1 -0
- package/dist/index.d.ts +46 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -27
- package/dist/index.js.map +1 -1
- package/dist/schemas/common.d.ts +20 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +15 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/useVgPlotChartRender.d.ts.map +1 -1
- package/dist/useVgPlotChartRender.js +142 -31
- package/dist/useVgPlotChartRender.js.map +1 -1
- package/dist/useVgPlotChartRetention.d.ts +11 -0
- package/dist/useVgPlotChartRetention.d.ts.map +1 -1
- package/dist/useVgPlotChartRetention.js.map +1 -1
- package/package.json +14 -13
- package/dist/boxplot/BoxPlotClient.d.ts +0 -65
- package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
- package/dist/boxplot/BoxPlotClient.js +0 -286
- package/dist/boxplot/BoxPlotClient.js.map +0 -1
- package/dist/chart/ChartRuntimeIssuePanel.d.ts +0 -7
- package/dist/chart/ChartRuntimeIssuePanel.d.ts.map +0 -1
- package/dist/chart/ChartRuntimeIssuePanel.js +0 -10
- package/dist/chart/ChartRuntimeIssuePanel.js.map +0 -1
- package/dist/chart/MosaicDashboardChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChart.js +0 -21
- package/dist/chart/MosaicDashboardChart.js.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.d.ts +0 -16
- package/dist/chart/MosaicDashboardChartContent.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.js +0 -45
- package/dist/chart/MosaicDashboardChartContent.js.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +0 -4
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.js +0 -16
- package/dist/chart/MosaicDashboardChartHeaderActions.js.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.d.ts +0 -4
- package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.js +0 -31
- package/dist/chart/MosaicDashboardChartRenderer.js.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.d.ts +0 -18
- package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.js +0 -14
- package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.js +0 -10
- package/dist/chart/MosaicDashboardVgPlotChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.d.ts +0 -8
- package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.js +0 -11
- package/dist/chart/MosaicDashboardVgPlotError.js.map +0 -1
- package/dist/chart/addChartPanelAction.d.ts.map +0 -1
- package/dist/chart/addChartPanelAction.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.d.ts +0 -44
- package/dist/chart/chart-settings/ChartSettings.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.js +0 -74
- package/dist/chart/chart-settings/ChartSettings.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts +0 -13
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.js +0 -18
- package/dist/chart/chart-settings/ChartSettingsContent.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts +0 -25
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.js +0 -34
- package/dist/chart/chart-settings/ChartSettingsContext.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +0 -14
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.js +0 -17
- package/dist/chart/chart-settings/ChartSettingsPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +0 -9
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js +0 -11
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts +0 -9
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.js +0 -16
- package/dist/chart/chart-settings/ChartTypeSelector.js.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.d.ts +0 -3
- package/dist/chart/chart-settings/useTableColumns.d.ts.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.js +0 -12
- package/dist/chart/chart-settings/useTableColumns.js.map +0 -1
- package/dist/chart/useBrushSelectionParams.d.ts +0 -3
- package/dist/chart/useBrushSelectionParams.d.ts.map +0 -1
- package/dist/chart/useBrushSelectionParams.js +0 -16
- package/dist/chart/useBrushSelectionParams.js.map +0 -1
- package/dist/chart/useChartRetainer.d.ts +0 -3
- package/dist/chart/useChartRetainer.d.ts.map +0 -1
- package/dist/chart/useChartRetainer.js +0 -11
- package/dist/chart/useChartRetainer.js.map +0 -1
- package/dist/chart/useGenerateSpec.d.ts +0 -13
- package/dist/chart/useGenerateSpec.d.ts.map +0 -1
- package/dist/chart/useGenerateSpec.js +0 -32
- package/dist/chart/useGenerateSpec.js.map +0 -1
- package/dist/chart-builders/AggregationSelector.d.ts +0 -11
- package/dist/chart-builders/AggregationSelector.d.ts.map +0 -1
- package/dist/chart-builders/AggregationSelector.js +0 -9
- package/dist/chart-builders/AggregationSelector.js.map +0 -1
- package/dist/chart-builders/ColumnSelector.d.ts +0 -13
- package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
- package/dist/chart-builders/ColumnSelector.js +0 -30
- package/dist/chart-builders/ColumnSelector.js.map +0 -1
- package/dist/chart-builders/ColumnsContext.d.ts +0 -13
- package/dist/chart-builders/ColumnsContext.d.ts.map +0 -1
- package/dist/chart-builders/ColumnsContext.js +0 -15
- package/dist/chart-builders/ColumnsContext.js.map +0 -1
- package/dist/chart-builders/Field.d.ts.map +0 -1
- package/dist/chart-builders/Field.js.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.d.ts +0 -14
- package/dist/chart-builders/FieldSelectorInput.d.ts.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.js +0 -19
- package/dist/chart-builders/FieldSelectorInput.js.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.d.ts +0 -14
- package/dist/chart-builders/MultiFieldSelector.d.ts.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.js +0 -53
- package/dist/chart-builders/MultiFieldSelector.js.map +0 -1
- package/dist/chart-builders/TableSelector.d.ts.map +0 -1
- package/dist/chart-builders/TableSelector.js +0 -23
- package/dist/chart-builders/TableSelector.js.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.d.ts +0 -10
- package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.js +0 -37
- package/dist/chart-builders/TemporalGranularitySelector.js.map +0 -1
- package/dist/chart-builders/constants.d.ts +0 -12
- package/dist/chart-builders/constants.d.ts.map +0 -1
- package/dist/chart-builders/constants.js +0 -47
- package/dist/chart-builders/constants.js.map +0 -1
- package/dist/chart-types/base-types.d.ts +0 -168
- package/dist/chart-types/base-types.d.ts.map +0 -1
- package/dist/chart-types/base-types.js +0 -11
- package/dist/chart-types/base-types.js.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.js +0 -9
- package/dist/chart-types/box-plot/BoxPlotSettings.js.map +0 -1
- package/dist/chart-types/box-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/box-plot/definition.js +0 -24
- package/dist/chart-types/box-plot/definition.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +0 -118
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.d.ts +0 -24
- package/dist/chart-types/box-plot/renderer/constants.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.d.ts +0 -14
- package/dist/chart-types/box-plot/renderer/plot.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +0 -18
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -56
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.d.ts +0 -6
- package/dist/chart-types/box-plot/renderer/utils.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.js.map +0 -1
- package/dist/chart-types/box-plot/schema.d.ts +0 -21
- package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/box-plot/schema.js +0 -13
- package/dist/chart-types/box-plot/schema.js.map +0 -1
- package/dist/chart-types/box-plot/tool.d.ts +0 -40
- package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/box-plot/tool.js +0 -67
- package/dist/chart-types/box-plot/tool.js.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js +0 -9
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
- package/dist/chart-types/bubble-chart/definition.d.ts +0 -4
- package/dist/chart-types/bubble-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/definition.js +0 -24
- package/dist/chart-types/bubble-chart/definition.js.map +0 -1
- package/dist/chart-types/bubble-chart/schema.d.ts +0 -23
- package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/schema.js +0 -17
- package/dist/chart-types/bubble-chart/schema.js.map +0 -1
- package/dist/chart-types/bubble-chart/spec.d.ts +0 -4
- package/dist/chart-types/bubble-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/spec.js +0 -31
- package/dist/chart-types/bubble-chart/spec.js.map +0 -1
- package/dist/chart-types/bubble-chart/tool.d.ts +0 -42
- package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/tool.js +0 -66
- package/dist/chart-types/bubble-chart/tool.js.map +0 -1
- package/dist/chart-types/chart-config.d.ts +0 -138
- package/dist/chart-types/chart-config.d.ts.map +0 -1
- package/dist/chart-types/chart-config.js +0 -49
- package/dist/chart-types/chart-config.js.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.js +0 -9
- package/dist/chart-types/count-plot/CountPlotSettings.js.map +0 -1
- package/dist/chart-types/count-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/count-plot/definition.js +0 -19
- package/dist/chart-types/count-plot/definition.js.map +0 -1
- package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/count-plot/schema.js.map +0 -1
- package/dist/chart-types/count-plot/spec.d.ts +0 -4
- package/dist/chart-types/count-plot/spec.d.ts.map +0 -1
- package/dist/chart-types/count-plot/spec.js +0 -49
- package/dist/chart-types/count-plot/spec.js.map +0 -1
- package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/count-plot/tool.js +0 -63
- package/dist/chart-types/count-plot/tool.js.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.js +0 -30
- package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +0 -1
- package/dist/chart-types/custom-spec/definition.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/definition.js +0 -22
- package/dist/chart-types/custom-spec/definition.js.map +0 -1
- package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/schema.js.map +0 -1
- package/dist/chart-types/custom-spec/spec.d.ts +0 -4
- package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/spec.js +0 -24
- package/dist/chart-types/custom-spec/spec.js.map +0 -1
- package/dist/chart-types/data-policy-schema.d.ts.map +0 -1
- package/dist/chart-types/data-policy-schema.js.map +0 -1
- package/dist/chart-types/errors.d.ts +0 -23
- package/dist/chart-types/errors.d.ts.map +0 -1
- package/dist/chart-types/errors.js +0 -26
- package/dist/chart-types/errors.js.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.js +0 -9
- package/dist/chart-types/heatmap/HeatmapSettings.js.map +0 -1
- package/dist/chart-types/heatmap/definition.d.ts.map +0 -1
- package/dist/chart-types/heatmap/definition.js +0 -19
- package/dist/chart-types/heatmap/definition.js.map +0 -1
- package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
- package/dist/chart-types/heatmap/schema.js.map +0 -1
- package/dist/chart-types/heatmap/spec.d.ts +0 -4
- package/dist/chart-types/heatmap/spec.d.ts.map +0 -1
- package/dist/chart-types/heatmap/spec.js +0 -32
- package/dist/chart-types/heatmap/spec.js.map +0 -1
- package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
- package/dist/chart-types/heatmap/tool.js +0 -67
- package/dist/chart-types/heatmap/tool.js.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.d.ts.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.js +0 -11
- package/dist/chart-types/histogram/HistogramSettings.js.map +0 -1
- package/dist/chart-types/histogram/definition.d.ts.map +0 -1
- package/dist/chart-types/histogram/definition.js +0 -19
- package/dist/chart-types/histogram/definition.js.map +0 -1
- package/dist/chart-types/histogram/schema.d.ts +0 -24
- package/dist/chart-types/histogram/schema.d.ts.map +0 -1
- package/dist/chart-types/histogram/schema.js +0 -26
- package/dist/chart-types/histogram/schema.js.map +0 -1
- package/dist/chart-types/histogram/spec.d.ts +0 -4
- package/dist/chart-types/histogram/spec.d.ts.map +0 -1
- package/dist/chart-types/histogram/spec.js +0 -37
- package/dist/chart-types/histogram/spec.js.map +0 -1
- package/dist/chart-types/histogram/tool.d.ts +0 -40
- package/dist/chart-types/histogram/tool.d.ts.map +0 -1
- package/dist/chart-types/histogram/tool.js +0 -65
- package/dist/chart-types/histogram/tool.js.map +0 -1
- package/dist/chart-types/index.d.ts +0 -157
- package/dist/chart-types/index.d.ts.map +0 -1
- package/dist/chart-types/index.js +0 -106
- package/dist/chart-types/index.js.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.js +0 -24
- package/dist/chart-types/line-chart/LineChartSettings.js.map +0 -1
- package/dist/chart-types/line-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/line-chart/definition.js +0 -26
- package/dist/chart-types/line-chart/definition.js.map +0 -1
- package/dist/chart-types/line-chart/schema.d.ts +0 -88
- package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/line-chart/schema.js +0 -41
- package/dist/chart-types/line-chart/schema.js.map +0 -1
- package/dist/chart-types/line-chart/spec.d.ts +0 -4
- package/dist/chart-types/line-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/line-chart/spec.js +0 -91
- package/dist/chart-types/line-chart/spec.js.map +0 -1
- package/dist/chart-types/line-chart/tool.d.ts +0 -64
- package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/line-chart/tool.js +0 -74
- package/dist/chart-types/line-chart/tool.js.map +0 -1
- package/dist/chart-types/list-panels-tool.d.ts +0 -35
- package/dist/chart-types/list-panels-tool.d.ts.map +0 -1
- package/dist/chart-types/list-panels-tool.js.map +0 -1
- package/dist/chart-types/profiler-tool.d.ts +0 -40
- package/dist/chart-types/profiler-tool.d.ts.map +0 -1
- package/dist/chart-types/profiler-tool.js +0 -73
- package/dist/chart-types/profiler-tool.js.map +0 -1
- package/dist/chart-types/remove-panel-tool.d.ts +0 -31
- package/dist/chart-types/remove-panel-tool.d.ts.map +0 -1
- package/dist/chart-types/remove-panel-tool.js.map +0 -1
- package/dist/chart-types/text-panel-tool.d.ts +0 -42
- package/dist/chart-types/text-panel-tool.d.ts.map +0 -1
- package/dist/chart-types/text-panel-tool.js +0 -71
- package/dist/chart-types/text-panel-tool.js.map +0 -1
- package/dist/chart-types/tool-helpers.d.ts +0 -44
- package/dist/chart-types/tool-helpers.d.ts.map +0 -1
- package/dist/chart-types/tool-helpers.js +0 -129
- package/dist/chart-types/tool-helpers.js.map +0 -1
- package/dist/chart-types/tool-schemas.d.ts.map +0 -1
- package/dist/chart-types/tool-schemas.js.map +0 -1
- package/dist/chart-types/tool-types.d.ts +0 -26
- package/dist/chart-types/tool-types.d.ts.map +0 -1
- package/dist/chart-types/tool-types.js.map +0 -1
- package/dist/chart-types/tool-validation.d.ts +0 -3
- package/dist/chart-types/tool-validation.d.ts.map +0 -1
- package/dist/chart-types/tool-validation.js.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.d.ts +0 -3
- package/dist/chart-types/useChartTypeDefinition.d.ts.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.js.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +0 -17
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.js +0 -21
- package/dist/dashboard/DashboardPanelErrorBoundary.js.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts +0 -2
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.js +0 -14
- package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.js +0 -23
- package/dist/dashboard/MosaicDashboardPanel.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +0 -17
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +0 -13
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.js +0 -30
- package/dist/dashboard/MosaicDashboardPanelHeader.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.js +0 -54
- package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.d.ts +0 -3
- package/dist/dashboard/defaultPanelRenderers.d.ts.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.js +0 -13
- package/dist/dashboard/defaultPanelRenderers.js.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts +0 -6
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js +0 -46
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts +0 -7
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js +0 -29
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js.map +0 -1
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts +0 -6
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts.map +0 -1
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.js +0 -9
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.js.map +0 -1
- package/dist/dashboard/useTablesWithColumns.d.ts.map +0 -1
- package/dist/dashboard/useTablesWithColumns.js +0 -13
- package/dist/dashboard/useTablesWithColumns.js.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -4
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +0 -32
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +0 -1
- package/dist/profiler/MosaicProfiler.d.ts +0 -32
- package/dist/profiler/MosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/MosaicProfiler.js +0 -57
- package/dist/profiler/MosaicProfiler.js.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.d.ts +0 -7
- package/dist/profiler/MosaicProfilerHeader.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.js +0 -196
- package/dist/profiler/MosaicProfilerHeader.js.map +0 -1
- package/dist/profiler/MosaicProfilerRows.d.ts +0 -9
- package/dist/profiler/MosaicProfilerRows.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerRows.js +0 -65
- package/dist/profiler/MosaicProfilerRows.js.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.d.ts +0 -9
- package/dist/profiler/MosaicProfilerStatusBar.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.js +0 -28
- package/dist/profiler/MosaicProfilerStatusBar.js.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.d.ts +0 -50
- package/dist/profiler/ProfilerCategoryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.js +0 -121
- package/dist/profiler/ProfilerCategoryClient.js.map +0 -1
- package/dist/profiler/ProfilerCountClient.d.ts +0 -28
- package/dist/profiler/ProfilerCountClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCountClient.js +0 -51
- package/dist/profiler/ProfilerCountClient.js.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.d.ts +0 -69
- package/dist/profiler/ProfilerHistogramClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.js +0 -179
- package/dist/profiler/ProfilerHistogramClient.js.map +0 -1
- package/dist/profiler/ProfilerPageClient.d.ts +0 -37
- package/dist/profiler/ProfilerPageClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerPageClient.js +0 -65
- package/dist/profiler/ProfilerPageClient.js.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts +0 -24
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js +0 -51
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js.map +0 -1
- package/dist/profiler/addProfilerPanelAction.d.ts +0 -3
- package/dist/profiler/addProfilerPanelAction.d.ts.map +0 -1
- package/dist/profiler/addProfilerPanelAction.js +0 -9
- package/dist/profiler/addProfilerPanelAction.js.map +0 -1
- package/dist/profiler/createProfilerStore.d.ts +0 -45
- package/dist/profiler/createProfilerStore.d.ts.map +0 -1
- package/dist/profiler/createProfilerStore.js +0 -120
- package/dist/profiler/createProfilerStore.js.map +0 -1
- package/dist/profiler/layout.d.ts +0 -7
- package/dist/profiler/layout.d.ts.map +0 -1
- package/dist/profiler/layout.js +0 -13
- package/dist/profiler/layout.js.map +0 -1
- package/dist/profiler/profilerController.d.ts +0 -64
- package/dist/profiler/profilerController.d.ts.map +0 -1
- package/dist/profiler/profilerController.js +0 -123
- package/dist/profiler/profilerController.js.map +0 -1
- package/dist/profiler/types.d.ts +0 -86
- package/dist/profiler/types.d.ts.map +0 -1
- package/dist/profiler/types.js.map +0 -1
- package/dist/profiler/useMosaicProfiler.d.ts +0 -7
- package/dist/profiler/useMosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/useMosaicProfiler.js +0 -339
- package/dist/profiler/useMosaicProfiler.js.map +0 -1
- package/dist/profiler/utils.d.ts +0 -61
- package/dist/profiler/utils.d.ts.map +0 -1
- package/dist/profiler/utils.js +0 -347
- package/dist/profiler/utils.js.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.d.ts +0 -4
- package/dist/text/MosaicDashboardTextRenderer.d.ts.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.js +0 -46
- package/dist/text/MosaicDashboardTextRenderer.js.map +0 -1
- package/dist/text/addTextPanelAction.d.ts +0 -3
- package/dist/text/addTextPanelAction.d.ts.map +0 -1
- package/dist/text/addTextPanelAction.js +0 -9
- package/dist/text/addTextPanelAction.js.map +0 -1
- /package/dist/{chart-types → ai}/list-panels-tool.js +0 -0
- /package/dist/{chart-types → ai}/remove-panel-tool.js +0 -0
- /package/dist/{chart-types → ai}/tool-schemas.d.ts +0 -0
- /package/dist/{chart-types → ai}/tool-schemas.js +0 -0
- /package/dist/{chart-types → ai}/tool-types.js +0 -0
- /package/dist/{chart-types → ai}/tool-validation.js +0 -0
- /package/dist/{chart → charts}/addChartPanelAction.d.ts +0 -0
- /package/dist/{chart → charts}/addChartPanelAction.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/BoxPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotPanelRenderer.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/constants.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/plot.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/utils.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/CountPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/tool.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/CustomSpecSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/data-policy-schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/data-policy-schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/HeatmapSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/tool.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/HistogramSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/LineChartSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/definition.d.ts +0 -0
- /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
- /package/dist/{chart-builders → components}/Field.d.ts +0 -0
- /package/dist/{chart-builders → components}/Field.js +0 -0
- /package/dist/{chart-builders → components}/TableSelector.d.ts +0 -0
- /package/dist/dashboard/{MosaicDashboardPanel.d.ts → panel/MosaicDashboardPanel.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelDragOverlay.d.ts → panel/MosaicDashboardPanelDragOverlay.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.d.ts → panel/MosaicDashboardPanelLayout.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.js → panel/MosaicDashboardPanelLayout.js} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanels.d.ts → panel/MosaicDashboardPanels.d.ts} +0 -0
- /package/dist/{profiler → data-table-explorer}/types.js +0 -0
- /package/dist/{dashboard → hooks}/useTablesWithColumns.d.ts +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, } from 'react';
|
|
3
|
+
import { cn, Table } from '@sqlrooms/ui';
|
|
4
|
+
import { getDataTableExplorerTableWidth } from './layout';
|
|
5
|
+
import { DataTableExplorerHeader, } from './DataTableExplorerHeader';
|
|
6
|
+
import { DataTableExplorerRows, } from './DataTableExplorerRows';
|
|
7
|
+
import { DataTableExplorerStatusBar, } from './DataTableExplorerStatusBar';
|
|
8
|
+
import { useDataTableExplorer } from './useDataTableExplorer';
|
|
9
|
+
import { ResetFiltersButton } from '../dashboard/components/ResetFiltersButton';
|
|
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(ResetFiltersButton, { className: cn('h-7 w-7', className), iconClassName: "h-3.5 w-3.5", disabled: disabled, onClick: () => {
|
|
55
|
+
explorer.reset();
|
|
56
|
+
onClick?.();
|
|
57
|
+
}, tooltip: "Reset filters", ...props }));
|
|
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":"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","sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type PropsWithChildren,\n type ReactElement,\n} from 'react';\nimport {cn, Table} from '@sqlrooms/ui';\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';\nimport {ResetFiltersButton} from '../dashboard/components/ResetFiltersButton';\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 ResetFiltersButton>,\n 'disabled' | 'onClick'\n> & {\n disabled?: boolean;\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 <ResetFiltersButton\n className={cn('h-7 w-7', className)}\n iconClassName=\"h-3.5 w-3.5\"\n disabled={disabled}\n onClick={() => {\n explorer.reset();\n onClick?.();\n }}\n tooltip=\"Reset filters\"\n {...props}\n />\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,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,aAAa,CAAC,CAAQ;IAC9B,OAAO,CAAC,eAAe,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAEpB;IACV,OAAO,CAAC,WAAW,CAAC,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,SAAS,CAAC,CAAqB;gBAE3B,OAAO,EAAE,qBAAqB;IAQ1C,IAAa,YAAY,IAAI,OAAO,CAEnC;IAED,OAAO,CAAC,WAAW;IAwBnB,aAAa,CAAC,KAAK,CAAC,EAAE,KAAK;IAM3B,eAAe,CAAC,SAAS,EAAE,OAAO;IAQlC,YAAY,CAAC,IAAI,EAAE,gBAAgB,EAAE;IAY5B,YAAY,IAAI,IAAI;IAOpB,KAAK,CAAC,MAAM,GAAE,KAAK,CAAC,QAAQ,CAAM,GAAG,KAAK;IAI1C,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAchC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAOvC,KAAK;IAKL,WAAW,CAAC,GAAG,EAAE,MAAM;CAiBxB;AAED,KAAK,2CAA2C,GAAG;IACjD,aAAa,EAAE,+BAA+B,CAAC;CAChD,CAAC;AAEF,qBAAa,oCAAqC,SAAQ,YAAY;IACpE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;gBAEpD,OAAO,EAAE,2CAA2C;IAKvD,YAAY,IAAI,IAAI;IAKpB,KAAK,CAAC,MAAM,GAAE,KAAK,CAAC,QAAQ,CAAM,GAAG,KAAK;IAI1C,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAOhC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAIxC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
client: this,
|
|
33
|
+
error: this.filteredError ?? this.totalError,
|
|
34
|
+
isLoading: this.filteredLoading || this.totalLoading,
|
|
35
|
+
kind: 'category',
|
|
36
|
+
selectedKey: this.selectedKey,
|
|
37
|
+
toggleValue: (key) => this.toggleValue(key),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
setTotalError(error) {
|
|
41
|
+
this.totalError = error;
|
|
42
|
+
this.totalLoading = false;
|
|
43
|
+
this.emitSummary();
|
|
44
|
+
}
|
|
45
|
+
setTotalLoading(isLoading) {
|
|
46
|
+
this.totalLoading = isLoading;
|
|
47
|
+
if (isLoading) {
|
|
48
|
+
this.totalError = undefined;
|
|
49
|
+
}
|
|
50
|
+
this.emitSummary();
|
|
51
|
+
}
|
|
52
|
+
setTotalRows(rows) {
|
|
53
|
+
this.totalRows = rows
|
|
54
|
+
.slice()
|
|
55
|
+
.sort((left, right) => right.total - left.total);
|
|
56
|
+
this.totalError = undefined;
|
|
57
|
+
this.totalLoading = false;
|
|
58
|
+
this.emitSummary();
|
|
59
|
+
}
|
|
60
|
+
queryPending() {
|
|
61
|
+
this.filteredLoading = true;
|
|
62
|
+
this.filteredError = undefined;
|
|
63
|
+
this.emitSummary();
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
query(filter = []) {
|
|
67
|
+
return buildCategorySummaryQuery(this.tableName, this.field.name, filter);
|
|
68
|
+
}
|
|
69
|
+
queryResult(data) {
|
|
70
|
+
const rows = rowsFromQueryResult(data)
|
|
71
|
+
.slice()
|
|
72
|
+
.sort((left, right) => right.total - left.total);
|
|
73
|
+
this.filteredRows = rows;
|
|
74
|
+
this.filteredError = undefined;
|
|
75
|
+
this.filteredLoading = false;
|
|
76
|
+
this.emitSummary();
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
queryError(error) {
|
|
80
|
+
this.filteredError = error;
|
|
81
|
+
this.filteredLoading = false;
|
|
82
|
+
this.emitSummary();
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
reset() {
|
|
86
|
+
this.selectedKey = undefined;
|
|
87
|
+
this.emitSummary();
|
|
88
|
+
}
|
|
89
|
+
toggleValue(key) {
|
|
90
|
+
if (!isSelectableCategoryKey(key)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.selectedKey = this.selectedKey === key ? undefined : key;
|
|
94
|
+
this.filterBy?.update(clausePoint(this.field.name, categoryKeyToSelectionValue(this.selectedKey), {
|
|
95
|
+
source: this,
|
|
96
|
+
}));
|
|
97
|
+
this.emitSummary();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export class DataTableExplorerCategoryTotalClient extends MosaicClient {
|
|
101
|
+
summaryClient;
|
|
102
|
+
constructor(options) {
|
|
103
|
+
super();
|
|
104
|
+
this.summaryClient = options.summaryClient;
|
|
105
|
+
}
|
|
106
|
+
queryPending() {
|
|
107
|
+
this.summaryClient.setTotalLoading(true);
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
query(filter = []) {
|
|
111
|
+
return this.summaryClient.query(filter);
|
|
112
|
+
}
|
|
113
|
+
queryResult(data) {
|
|
114
|
+
this.summaryClient.setTotalRows(rowsFromQueryResult(data));
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
queryError(error) {
|
|
118
|
+
this.summaryClient.setTotalError(error);
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=DataTableExplorerCategoryClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerCategoryClient.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCategoryClient.ts"],"names":[],"mappings":"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","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 client: this,\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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { MosaicClient } from '@uwdata/mosaic-core';
|
|
2
|
+
import { buildCountQuery, readCountData } from './utils';
|
|
3
|
+
export class DataTableExplorerCountClient extends MosaicClient {
|
|
4
|
+
count;
|
|
5
|
+
error;
|
|
6
|
+
isFilterStable;
|
|
7
|
+
onStateChange;
|
|
8
|
+
tableName;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
super(options.selection);
|
|
11
|
+
this.isFilterStable = options.filterStable ?? false;
|
|
12
|
+
this.onStateChange = options.onStateChange;
|
|
13
|
+
this.tableName = options.tableName;
|
|
14
|
+
}
|
|
15
|
+
get filterStable() {
|
|
16
|
+
return this.isFilterStable;
|
|
17
|
+
}
|
|
18
|
+
queryPending() {
|
|
19
|
+
this.onStateChange({
|
|
20
|
+
count: this.count,
|
|
21
|
+
error: this.error,
|
|
22
|
+
isLoading: true,
|
|
23
|
+
});
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
query(filter = []) {
|
|
27
|
+
return buildCountQuery({
|
|
28
|
+
filter,
|
|
29
|
+
tableName: this.tableName,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
queryResult(data) {
|
|
33
|
+
this.count = readCountData(data);
|
|
34
|
+
this.error = undefined;
|
|
35
|
+
this.onStateChange({
|
|
36
|
+
count: this.count,
|
|
37
|
+
isLoading: false,
|
|
38
|
+
});
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
queryError(error) {
|
|
42
|
+
this.error = error;
|
|
43
|
+
this.onStateChange({
|
|
44
|
+
count: this.count,
|
|
45
|
+
error,
|
|
46
|
+
isLoading: false,
|
|
47
|
+
});
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=DataTableExplorerCountClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerCountClient.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAiB,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAevD,MAAM,OAAO,4BAA6B,SAAQ,YAAY;IACpD,KAAK,CAAU;IACf,KAAK,CAAS;IACL,cAAc,CAAU;IACxB,aAAa,CAA+C;IAC5D,SAAS,CAAS;IAEnC,YAAY,OAA4C;QACtD,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,YAAY,IAAI,KAAK,CAAC;QACpD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACrC,CAAC;IAED,IAAa,YAAY;QACvB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEQ,YAAY;QACnB,IAAI,CAAC,aAAa,CAAC;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,IAAI;SAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,KAAK,CAAC,SAA0B,EAAE;QACzC,OAAO,eAAe,CAAC;YACrB,MAAM;YACN,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC;IAEQ,WAAW,CAAC,IAAa;QAChC,IAAI,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,aAAa,CAAC;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,UAAU,CAAC,KAAY;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,aAAa,CAAC;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK;YACL,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import {MosaicClient, type Selection} from '@uwdata/mosaic-core';\nimport {type ExprNode, type Query} from '@uwdata/mosaic-sql';\nimport {buildCountQuery, readCountData} from './utils';\n\nexport type DataTableExplorerCountState = {\n count?: number;\n error?: Error;\n isLoading: boolean;\n};\n\ntype DataTableExplorerCountClientOptions = {\n filterStable?: boolean;\n onStateChange: (state: DataTableExplorerCountState) => void;\n selection?: Selection;\n tableName: string;\n};\n\nexport class DataTableExplorerCountClient extends MosaicClient {\n private count?: number;\n private error?: Error;\n private readonly isFilterStable: boolean;\n private readonly onStateChange: (state: DataTableExplorerCountState) => void;\n private readonly tableName: string;\n\n constructor(options: DataTableExplorerCountClientOptions) {\n super(options.selection);\n this.isFilterStable = options.filterStable ?? false;\n this.onStateChange = options.onStateChange;\n this.tableName = options.tableName;\n }\n\n override get filterStable(): boolean {\n return this.isFilterStable;\n }\n\n override queryPending(): this {\n this.onStateChange({\n count: this.count,\n error: this.error,\n isLoading: true,\n });\n return this;\n }\n\n override query(filter: Array<ExprNode> = []): Query {\n return buildCountQuery({\n filter,\n tableName: this.tableName,\n });\n }\n\n override queryResult(data: unknown): this {\n this.count = readCountData(data);\n this.error = undefined;\n this.onStateChange({\n count: this.count,\n isLoading: false,\n });\n return this;\n }\n\n override queryError(error: Error): this {\n this.error = error;\n this.onStateChange({\n count: this.count,\n error,\n isLoading: false,\n });\n return this;\n }\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UseDataTableExplorerReturn } from './types';
|
|
2
|
+
export type DataTableExplorerHeaderProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
explorer: Pick<UseDataTableExplorerReturn, 'columns' | 'setSorting' | 'sorting'>;
|
|
5
|
+
};
|
|
6
|
+
export declare function DataTableExplorerHeader({ className, explorer, }: DataTableExplorerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=DataTableExplorerHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerHeader.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAKV,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CACZ,0BAA0B,EAC1B,SAAS,GAAG,YAAY,GAAG,SAAS,CACrC,CAAC;CACH,CAAC;AAgYF,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,GACT,EAAE,4BAA4B,2CA6E9B"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Badge, cn, TableHead, TableHeader, TableRow } from '@sqlrooms/ui';
|
|
3
|
+
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
|
+
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import { DATA_TABLE_EXPLORER_DEFAULT_COLUMN_WIDTH_STYLE, DATA_TABLE_EXPLORER_ROW_NUMBER_COLUMN_WIDTH_PX, DATA_TABLE_EXPLORER_ROW_NUMBER_WIDTH_STYLE, DATA_TABLE_EXPLORER_UNSUPPORTED_COLUMN_WIDTH_STYLE, getDataTableExplorerColumnWidthPx, } from './layout';
|
|
6
|
+
import { isDataTableExplorerUnsupportedSummaryType } from './utils';
|
|
7
|
+
const STICKY_ROW_NUMBER_CLASS = 'bg-background sticky left-0 top-0 z-40 border-r px-1 text-center';
|
|
8
|
+
const STICKY_COLUMN_HEADER_CLASS = 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';
|
|
9
|
+
function getColumnWidthStyle(column) {
|
|
10
|
+
return isDataTableExplorerUnsupportedSummaryType(column.field.type)
|
|
11
|
+
? DATA_TABLE_EXPLORER_UNSUPPORTED_COLUMN_WIDTH_STYLE
|
|
12
|
+
: DATA_TABLE_EXPLORER_DEFAULT_COLUMN_WIDTH_STYLE;
|
|
13
|
+
}
|
|
14
|
+
function setNextSortState(currentSorting, columnId, setSorting) {
|
|
15
|
+
const current = currentSorting.find((entry) => entry.id === columnId);
|
|
16
|
+
if (!current) {
|
|
17
|
+
setSorting([{ desc: false, id: columnId }]);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!current.desc) {
|
|
21
|
+
setSorting([{ desc: true, id: columnId }]);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
setSorting([]);
|
|
25
|
+
}
|
|
26
|
+
function formatPercentOfTotal(value) {
|
|
27
|
+
const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;
|
|
28
|
+
return Intl.NumberFormat(undefined, {
|
|
29
|
+
maximumFractionDigits,
|
|
30
|
+
style: 'percent',
|
|
31
|
+
}).format(value);
|
|
32
|
+
}
|
|
33
|
+
function CategorySummaryCell({ summary, }) {
|
|
34
|
+
const [hoveredKey, setHoveredKey] = useState();
|
|
35
|
+
const totalCount = summary.buckets.reduce((acc, bucket) => acc + bucket.totalCount, 0);
|
|
36
|
+
const activeBucket = summary.buckets.find((bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey);
|
|
37
|
+
const footerLabel = activeBucket
|
|
38
|
+
? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`
|
|
39
|
+
: `${summary.bucketCount.toLocaleString()} categories`;
|
|
40
|
+
return (_jsxs("div", { className: "space-y-0.5 pt-1.5", children: [_jsx("div", { className: "flex h-10 overflow-hidden rounded-sm border", children: summary.buckets.map((bucket) => {
|
|
41
|
+
const width = totalCount > 0
|
|
42
|
+
? `${(bucket.totalCount / totalCount) * 100}%`
|
|
43
|
+
: '0%';
|
|
44
|
+
const fillPct = bucket.totalCount > 0
|
|
45
|
+
? (bucket.filteredCount / bucket.totalCount) * 100
|
|
46
|
+
: 0;
|
|
47
|
+
const isSelected = summary.selectedKey === bucket.key;
|
|
48
|
+
const background = bucket.kind === 'overflow'
|
|
49
|
+
? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`
|
|
50
|
+
: `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;
|
|
51
|
+
return (_jsx("button", { type: "button", disabled: !bucket.selectable, className: cn('relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default', isSelected && 'ring-ring ring-1 ring-inset', !bucket.selectable && 'text-muted-foreground'), style: {
|
|
52
|
+
background,
|
|
53
|
+
flexBasis: width,
|
|
54
|
+
flexGrow: bucket.totalCount,
|
|
55
|
+
}, onClick: () => summary.toggleValue(bucket.key), onMouseEnter: () => setHoveredKey(bucket.key), onMouseLeave: () => setHoveredKey(undefined), children: _jsx("span", { className: "max-w-full truncate px-1", children: bucket.label }) }, bucket.key));
|
|
56
|
+
}) }), _jsx("div", { className: "text-muted-foreground truncate text-[10px] font-normal", children: footerLabel })] }));
|
|
57
|
+
}
|
|
58
|
+
const histogramInteractorIds = new WeakMap();
|
|
59
|
+
let nextHistogramInteractorId = 0;
|
|
60
|
+
function getHistogramInteractorId(interactor) {
|
|
61
|
+
const cachedId = histogramInteractorIds.get(interactor);
|
|
62
|
+
if (cachedId !== undefined) {
|
|
63
|
+
return cachedId;
|
|
64
|
+
}
|
|
65
|
+
const id = ++nextHistogramInteractorId;
|
|
66
|
+
histogramInteractorIds.set(interactor, id);
|
|
67
|
+
return id;
|
|
68
|
+
}
|
|
69
|
+
function createScale(type, domain, range) {
|
|
70
|
+
const [d0, d1] = domain.map((value) => value instanceof Date ? value.getTime() : value);
|
|
71
|
+
const [r0, r1] = range;
|
|
72
|
+
const span = d1 - d0 || 1;
|
|
73
|
+
const rspan = r1 - r0;
|
|
74
|
+
return {
|
|
75
|
+
apply(value) {
|
|
76
|
+
const numeric = value instanceof Date ? value.getTime() : value;
|
|
77
|
+
return r0 + ((numeric - d0) / span) * rspan;
|
|
78
|
+
},
|
|
79
|
+
domain,
|
|
80
|
+
invert(value) {
|
|
81
|
+
const numeric = d0 + ((value - r0) / (rspan || 1)) * span;
|
|
82
|
+
return type === 'utc' ? new Date(numeric) : numeric;
|
|
83
|
+
},
|
|
84
|
+
range,
|
|
85
|
+
type,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function formatDomainValue(value, valueType) {
|
|
89
|
+
if (valueType === 'date') {
|
|
90
|
+
const date = value instanceof Date ? value : new Date(value);
|
|
91
|
+
return date.toISOString().slice(0, 10);
|
|
92
|
+
}
|
|
93
|
+
return Intl.NumberFormat(undefined, {
|
|
94
|
+
maximumFractionDigits: 2,
|
|
95
|
+
}).format(typeof value === 'number' ? value : value.getTime());
|
|
96
|
+
}
|
|
97
|
+
function HistogramSummaryCell({ summary, }) {
|
|
98
|
+
const svgRef = useRef(null);
|
|
99
|
+
const brushRootRef = useRef(null);
|
|
100
|
+
const initializedBrushRef = useRef(undefined);
|
|
101
|
+
const layout = useMemo(() => {
|
|
102
|
+
const width = 122;
|
|
103
|
+
const height = 40;
|
|
104
|
+
const margin = { bottom: 4, left: 4, right: 4, top: 2 };
|
|
105
|
+
const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;
|
|
106
|
+
const nullBarGap = nullBarWidth > 0 ? 3 : 0;
|
|
107
|
+
const totalBins = summary.totalBins.length
|
|
108
|
+
? summary.totalBins
|
|
109
|
+
: summary.filteredBins;
|
|
110
|
+
const domain = totalBins.length > 0
|
|
111
|
+
? [totalBins[0].x0, totalBins[totalBins.length - 1].x1]
|
|
112
|
+
: null;
|
|
113
|
+
const totalMax = Math.max(summary.totalNullCount, ...totalBins.map((bin) => bin.length), 1);
|
|
114
|
+
const xScale = domain
|
|
115
|
+
? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [
|
|
116
|
+
margin.left + nullBarWidth + nullBarGap,
|
|
117
|
+
width - margin.right,
|
|
118
|
+
])
|
|
119
|
+
: null;
|
|
120
|
+
const yScale = createScale('linear', [0, totalMax], [height - margin.bottom, margin.top]);
|
|
121
|
+
return {
|
|
122
|
+
height,
|
|
123
|
+
margin,
|
|
124
|
+
nullBarGap,
|
|
125
|
+
nullBarWidth,
|
|
126
|
+
width,
|
|
127
|
+
xScale,
|
|
128
|
+
yScale,
|
|
129
|
+
};
|
|
130
|
+
}, [summary]);
|
|
131
|
+
useEffect(() => {
|
|
132
|
+
const svg = svgRef.current;
|
|
133
|
+
const brushRoot = brushRootRef.current;
|
|
134
|
+
const interactor = summary.interactor;
|
|
135
|
+
if (!svg || !brushRoot || !interactor || !layout.xScale)
|
|
136
|
+
return;
|
|
137
|
+
const brushKey = [
|
|
138
|
+
getHistogramInteractorId(interactor),
|
|
139
|
+
summary.valueType,
|
|
140
|
+
layout.xScale.domain
|
|
141
|
+
.map((value) => (value instanceof Date ? value.getTime() : value))
|
|
142
|
+
.join(':'),
|
|
143
|
+
layout.xScale.range.join(':'),
|
|
144
|
+
].join('|');
|
|
145
|
+
if (initializedBrushRef.current === brushKey)
|
|
146
|
+
return;
|
|
147
|
+
svg.scale = (channel) => {
|
|
148
|
+
if (channel === 'x')
|
|
149
|
+
return layout.xScale;
|
|
150
|
+
if (channel === 'y')
|
|
151
|
+
return layout.yScale;
|
|
152
|
+
return undefined;
|
|
153
|
+
};
|
|
154
|
+
brushRoot.replaceChildren();
|
|
155
|
+
interactor.init(svg, brushRoot);
|
|
156
|
+
initializedBrushRef.current = brushKey;
|
|
157
|
+
}, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);
|
|
158
|
+
const axisY = layout.height - layout.margin.bottom;
|
|
159
|
+
const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;
|
|
160
|
+
const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;
|
|
161
|
+
const xAxisEnd = layout.xScale?.range[1] ?? layout.width - layout.margin.right;
|
|
162
|
+
return (_jsxs("div", { className: "space-y-0 pt-1.5", children: [_jsxs("svg", { ref: svgRef, width: layout.width, height: layout.height, viewBox: `0 0 ${layout.width} ${layout.height}`, className: "max-w-full overflow-visible", children: [summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.totalNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
|
|
163
|
+
layout.yScale.apply(summary.totalNullCount), fill: "hsl(var(--muted-foreground) / 0.22)" })) : null, summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.filteredNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
|
|
164
|
+
layout.yScale.apply(summary.filteredNullCount), fill: "hsl(var(--chart-1))", opacity: 0.95 })) : null, summary.totalBins.map((bin, index) => {
|
|
165
|
+
const x0 = layout.xScale?.apply(bin.x0) ?? 0;
|
|
166
|
+
const x1 = layout.xScale?.apply(bin.x1) ?? 0;
|
|
167
|
+
const y = layout.yScale.apply(bin.length);
|
|
168
|
+
return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--muted-foreground) / 0.22)" }, `bg-${index}`));
|
|
169
|
+
}), summary.filteredBins.map((bin, index) => {
|
|
170
|
+
const x0 = layout.xScale?.apply(bin.x0) ?? 0;
|
|
171
|
+
const x1 = layout.xScale?.apply(bin.x1) ?? 0;
|
|
172
|
+
const y = layout.yScale.apply(bin.length);
|
|
173
|
+
return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--chart-1))", opacity: 0.95 }, `fg-${index}`));
|
|
174
|
+
}), _jsx("line", { x1: xAxisStart, x2: xAxisEnd, y1: axisY, y2: axisY, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisStart, x2: xAxisStart, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisEnd, x2: xAxisEnd, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), summary.totalNullCount > 0 ? (_jsx("line", { x1: nullBarCenter, x2: nullBarCenter, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--chart-1))" })) : null, _jsx("g", { ref: brushRootRef })] }), _jsxs("div", { className: "text-muted-foreground relative h-3.5 text-[10px] font-normal", children: [summary.totalNullCount > 0 ? (_jsx("span", { className: "absolute -translate-x-1/2", style: { left: nullBarCenter }, children: "\u2205" })) : null, _jsx("span", { className: "absolute", style: { left: xAxisStart }, children: summary.totalBins[0]
|
|
175
|
+
? formatDomainValue(summary.totalBins[0].x0, summary.valueType)
|
|
176
|
+
: '0' }), _jsx("span", { className: "absolute -translate-x-full", style: { left: xAxisEnd }, children: summary.totalBins.at(-1)
|
|
177
|
+
? formatDomainValue(summary.totalBins.at(-1).x1, summary.valueType)
|
|
178
|
+
: '0' })] })] }));
|
|
179
|
+
}
|
|
180
|
+
function SummaryCell({ column }) {
|
|
181
|
+
if (column.summary.kind === 'histogram') {
|
|
182
|
+
return _jsx(HistogramSummaryCell, { summary: column.summary });
|
|
183
|
+
}
|
|
184
|
+
if (column.summary.kind === 'category') {
|
|
185
|
+
return _jsx(CategorySummaryCell, { summary: column.summary });
|
|
186
|
+
}
|
|
187
|
+
return (_jsx("div", { className: "text-muted-foreground pt-1.5 text-[10px] font-normal", children: column.summary.label }));
|
|
188
|
+
}
|
|
189
|
+
export function DataTableExplorerHeader({ className, explorer, }) {
|
|
190
|
+
return (_jsxs(_Fragment, { children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: DATA_TABLE_EXPLORER_ROW_NUMBER_COLUMN_WIDTH_PX } }), explorer.columns.map((column) => (_jsx("col", { style: { width: getDataTableExplorerColumnWidthPx(column) } }, column.name)))] }), _jsx(TableHeader, { className: cn('sticky top-0 z-30', className), children: _jsxs(TableRow, { children: [_jsx(TableHead, { className: STICKY_ROW_NUMBER_CLASS, style: DATA_TABLE_EXPLORER_ROW_NUMBER_WIDTH_STYLE, children: "#" }), explorer.columns.map((column) => {
|
|
191
|
+
const sortState = explorer.sorting.find((entry) => entry.id === column.name);
|
|
192
|
+
return (_jsx(TableHead, { className: STICKY_COLUMN_HEADER_CLASS, style: getColumnWidthStyle(column), children: _jsxs("div", { className: "min-w-0", children: [_jsxs("button", { type: "button", className: "group relative flex w-full items-start gap-1.5 pr-4 text-left", onClick: () => setNextSortState(explorer.sorting, column.name, explorer.setSorting), children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[13px] leading-tight font-semibold", children: column.name }), _jsx(Badge, { variant: "outline", className: "mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60", children: String(column.field.type) })] }), _jsx("span", { className: "text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center", children: sortState ? (sortState.desc ? (_jsx(ChevronDownIcon, { className: "h-4 w-4" })) : (_jsx(ChevronUpIcon, { className: "h-4 w-4" }))) : (_jsxs("span", { className: "flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60", children: [_jsx(ChevronUpIcon, { className: "-mb-1 h-3 w-3" }), _jsx(ChevronDownIcon, { className: "-mt-1 h-3 w-3" })] })) })] }), _jsx(SummaryCell, { column: column })] }) }, column.name));
|
|
193
|
+
})] }) })] }));
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=DataTableExplorerHeader.js.map
|