@sqlrooms/mosaic 0.29.0-rc.5 → 0.29.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -57
- package/dist/DataPointLimitError.d.ts +9 -0
- package/dist/DataPointLimitError.d.ts.map +1 -0
- package/dist/DataPointLimitError.js +14 -0
- package/dist/DataPointLimitError.js.map +1 -0
- 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.map +1 -1
- package/dist/MosaicSlice.js +3 -3
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/VgPlotChart.d.ts +8 -11
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +77 -90
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/VgPlotChartError.d.ts +7 -0
- package/dist/VgPlotChartError.d.ts.map +1 -0
- package/dist/VgPlotChartError.js +9 -0
- package/dist/VgPlotChartError.js.map +1 -0
- package/dist/ai/ai.d.ts +103 -0
- package/dist/ai/ai.d.ts.map +1 -0
- package/dist/ai/ai.js +419 -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 +66 -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 +55 -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 +9 -0
- package/dist/ai/tool-schemas.d.ts.map +1 -0
- package/dist/ai/tool-schemas.js +22 -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 +6 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +6 -0
- package/dist/ai.js.map +1 -0
- 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/chart-runtime.d.ts +50 -0
- package/dist/chart-runtime.d.ts.map +1 -0
- package/dist/chart-runtime.js +76 -0
- package/dist/chart-runtime.js.map +1 -0
- package/dist/charts/MosaicChart.d.ts +12 -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 +8 -0
- package/dist/charts/MosaicChartError.d.ts.map +1 -0
- package/dist/charts/MosaicChartError.js +5 -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/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 +13 -0
- package/dist/charts/MosaicChartView.d.ts.map +1 -0
- package/dist/charts/MosaicChartView.js +56 -0
- package/dist/charts/MosaicChartView.js.map +1 -0
- package/dist/charts/addChartPanelAction.d.ts +3 -0
- package/dist/charts/addChartPanelAction.d.ts.map +1 -0
- package/dist/charts/addChartPanelAction.js +14 -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 +16 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
- package/dist/charts/chart-types/base-types.d.ts +168 -0
- package/dist/charts/chart-types/base-types.d.ts.map +1 -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 +286 -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/bubble-chart/BubbleChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js +9 -0
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/definition.js +24 -0
- package/dist/charts/chart-types/bubble-chart/definition.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/schema.d.ts +23 -0
- package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/schema.js +17 -0
- package/dist/charts/chart-types/bubble-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/spec.js +31 -0
- package/dist/charts/chart-types/bubble-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/tool.d.ts +42 -0
- package/dist/charts/chart-types/bubble-chart/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/tool.js +66 -0
- package/dist/charts/chart-types/bubble-chart/tool.js.map +1 -0
- package/dist/charts/chart-types/chart-config.d.ts +138 -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 +19 -0
- package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.js +15 -0
- package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.js +49 -0
- package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.d.ts +38 -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 +19 -0
- package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.js +12 -0
- package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts +8 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.js +7 -0
- package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
- package/dist/charts/chart-types/errors.d.ts +7 -0
- package/dist/charts/chart-types/errors.d.ts.map +1 -0
- package/dist/charts/chart-types/errors.js +10 -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 +21 -0
- package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.js +13 -0
- package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.js +32 -0
- package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.d.ts +40 -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 +11 -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 +24 -0
- package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/schema.js +26 -0
- package/dist/charts/chart-types/histogram/schema.js.map +1 -0
- package/dist/charts/chart-types/histogram/spec.d.ts +4 -0
- package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/spec.js +37 -0
- package/dist/charts/chart-types/histogram/spec.js.map +1 -0
- package/dist/charts/chart-types/histogram/tool.d.ts +40 -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 +24 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.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 +70 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.js +29 -0
- package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.js +91 -0
- package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts +64 -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/mosaicChartTypes.d.ts +101 -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/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +16 -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 +17 -0
- package/dist/charts/useChartDataPolicy.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 +21 -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 +9 -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 +47 -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 +47 -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.map +1 -0
- package/dist/components/ColumnSelector.d.ts +13 -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/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 +14 -0
- package/dist/components/FieldSelectorInput.d.ts.map +1 -0
- package/dist/components/FieldSelectorInput.js.map +1 -0
- package/dist/components/MultiFieldSelector.d.ts +14 -0
- package/dist/components/MultiFieldSelector.d.ts.map +1 -0
- package/dist/components/MultiFieldSelector.js +53 -0
- package/dist/components/MultiFieldSelector.js.map +1 -0
- package/dist/components/TableSelector.d.ts +14 -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 +37 -0
- package/dist/components/TemporalGranularitySelector.js.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +4 -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 -2
- package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboard.js +16 -37
- package/dist/dashboard/MosaicDashboard.js.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.d.ts +210 -177
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +109 -91
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/action-types.d.ts +25 -0
- package/dist/dashboard/action-types.d.ts.map +1 -0
- package/dist/dashboard/action-types.js +5 -0
- package/dist/dashboard/action-types.js.map +1 -0
- package/dist/dashboard/core-types.d.ts +20 -0
- package/dist/dashboard/core-types.d.ts.map +1 -0
- package/dist/dashboard/core-types.js +15 -0
- package/dist/dashboard/core-types.js.map +1 -0
- 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 +449 -0
- package/dist/dashboard/dashboard-types.d.ts.map +1 -0
- package/dist/dashboard/dashboard-types.js +46 -0
- package/dist/dashboard/dashboard-types.js.map +1 -0
- package/dist/dashboard/defaultPanelActions.d.ts +3 -0
- package/dist/dashboard/defaultPanelActions.d.ts.map +1 -0
- package/dist/dashboard/defaultPanelActions.js +7 -0
- package/dist/dashboard/defaultPanelActions.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 +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +12 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +36 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +24 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -0
- package/dist/dashboard/useAddPanelActions.d.ts +10 -0
- package/dist/dashboard/useAddPanelActions.d.ts.map +1 -0
- package/dist/dashboard/useAddPanelActions.js +26 -0
- package/dist/dashboard/useAddPanelActions.js.map +1 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.d.ts +3 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.d.ts.map +1 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +18 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.d.ts +10 -0
- package/dist/dashboard/useSelectedOrFirstTable.d.ts.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.js +25 -0
- package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorer.d.ts +37 -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 +121 -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 +46 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js +126 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.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 +28 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts +64 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.js +127 -0
- package/dist/data-table-explorer/dataTableExplorerController.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 +87 -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 +358 -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 +11 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +7 -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/useDataTable.d.ts +3 -0
- package/dist/hooks/useDataTable.d.ts.map +1 -0
- package/dist/hooks/useDataTable.js +28 -0
- package/dist/hooks/useDataTable.js.map +1 -0
- package/dist/hooks/useTablesWithColumns.d.ts +9 -0
- 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 +48 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -12
- 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/useMosaicClient.d.ts +4 -0
- package/dist/useMosaicClient.d.ts.map +1 -1
- package/dist/useMosaicClient.js +33 -3
- package/dist/useMosaicClient.js.map +1 -1
- package/dist/useVgPlotChartError.d.ts +13 -0
- package/dist/useVgPlotChartError.d.ts.map +1 -0
- package/dist/useVgPlotChartError.js +18 -0
- package/dist/useVgPlotChartError.js.map +1 -0
- package/dist/useVgPlotChartRender.d.ts +24 -0
- package/dist/useVgPlotChartRender.d.ts.map +1 -0
- package/dist/useVgPlotChartRender.js +162 -0
- package/dist/useVgPlotChartRender.js.map +1 -0
- package/dist/useVgPlotChartRetention.d.ts +21 -0
- package/dist/useVgPlotChartRetention.d.ts.map +1 -0
- package/dist/useVgPlotChartRetention.js +63 -0
- package/dist/useVgPlotChartRetention.js.map +1 -0
- package/dist/wrapCoordinatorWithValidation.d.ts +11 -0
- package/dist/wrapCoordinatorWithValidation.d.ts.map +1 -0
- package/dist/wrapCoordinatorWithValidation.js +23 -0
- package/dist/wrapCoordinatorWithValidation.js.map +1 -0
- package/package.json +32 -13
- package/dist/boxplot/BoxPlotClient.d.ts +0 -58
- package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
- package/dist/boxplot/BoxPlotClient.js +0 -264
- package/dist/boxplot/BoxPlotClient.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 -18
- 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 -3
- 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 -14
- package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.js +0 -11
- package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -10
- 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/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 -71
- 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 -27
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.js +0 -35
- 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.map +0 -1
- package/dist/chart-builders/ColumnSelector.d.ts +0 -15
- package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
- package/dist/chart-builders/ColumnSelector.js +0 -31
- package/dist/chart-builders/ColumnSelector.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.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/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 -148
- package/dist/chart-types/base-types.d.ts.map +0 -1
- 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 -19
- 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 -115
- 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 -14
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -45
- 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 -16
- package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/box-plot/schema.js +0 -11
- package/dist/chart-types/box-plot/schema.js.map +0 -1
- package/dist/chart-types/box-plot/tool.d.ts +0 -44
- package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/box-plot/tool.js +0 -59
- package/dist/chart-types/box-plot/tool.js.map +0 -1
- 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.map +0 -1
- package/dist/chart-types/bubble-chart/definition.js +0 -19
- package/dist/chart-types/bubble-chart/definition.js.map +0 -1
- package/dist/chart-types/bubble-chart/schema.d.ts +0 -18
- package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/schema.js +0 -15
- package/dist/chart-types/bubble-chart/schema.js.map +0 -1
- 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 -46
- package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/tool.js +0 -58
- package/dist/chart-types/bubble-chart/tool.js.map +0 -1
- package/dist/chart-types/chart-config.d.ts +0 -92
- package/dist/chart-types/chart-config.d.ts.map +0 -1
- package/dist/chart-types/chart-config.js +0 -47
- 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 +0 -14
- package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/count-plot/schema.js +0 -13
- package/dist/chart-types/count-plot/schema.js.map +0 -1
- 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 +0 -42
- package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/count-plot/tool.js +0 -55
- 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 -17
- package/dist/chart-types/custom-spec/definition.js.map +0 -1
- package/dist/chart-types/custom-spec/schema.d.ts +0 -14
- package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/schema.js +0 -10
- package/dist/chart-types/custom-spec/schema.js.map +0 -1
- package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/spec.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 +0 -16
- package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
- package/dist/chart-types/heatmap/schema.js +0 -11
- package/dist/chart-types/heatmap/schema.js.map +0 -1
- 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 +0 -44
- package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
- package/dist/chart-types/heatmap/tool.js +0 -59
- 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 -9
- 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 -14
- package/dist/chart-types/histogram/schema.d.ts.map +0 -1
- package/dist/chart-types/histogram/schema.js +0 -13
- 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 -36
- package/dist/chart-types/histogram/spec.js.map +0 -1
- package/dist/chart-types/histogram/tool.d.ts +0 -42
- package/dist/chart-types/histogram/tool.d.ts.map +0 -1
- package/dist/chart-types/histogram/tool.js +0 -55
- package/dist/chart-types/histogram/tool.js.map +0 -1
- package/dist/chart-types/index.d.ts +0 -115
- package/dist/chart-types/index.d.ts.map +0 -1
- package/dist/chart-types/index.js +0 -100
- 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 -22
- 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 -19
- package/dist/chart-types/line-chart/definition.js.map +0 -1
- package/dist/chart-types/line-chart/schema.d.ts +0 -83
- package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/line-chart/schema.js +0 -39
- package/dist/chart-types/line-chart/schema.js.map +0 -1
- 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 -68
- package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/line-chart/tool.js +0 -66
- package/dist/chart-types/line-chart/tool.js.map +0 -1
- package/dist/chart-types/tool-schemas.d.ts +0 -8
- package/dist/chart-types/tool-schemas.d.ts.map +0 -1
- package/dist/chart-types/tool-schemas.js +0 -18
- 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 -50
- package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.js +0 -26
- 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 -53
- package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
- package/dist/dashboard/MosaicDashboardToolbar.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardToolbar.js +0 -86
- package/dist/dashboard/MosaicDashboardToolbar.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/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -3
- 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/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 -3
- 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/{chart-types → ai}/tool-types.js +0 -0
- /package/dist/{chart-types → ai}/tool-validation.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/base-types.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}/bubble-chart/BubbleChartSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/bubble-chart/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/bubble-chart/spec.d.ts +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/spec.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/spec.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/spec.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/spec.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/chart-types}/line-chart/spec.d.ts +0 -0
- /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
- /package/dist/{chart-builders → components}/AggregationSelector.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}/FieldSelectorInput.js +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/dashboard/{MosaicDashboardToolbar.d.ts → toolbar/MosaicDashboardToolbar.d.ts} +0 -0
- /package/dist/{profiler → data-table-explorer}/types.js +0 -0
|
@@ -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,MAA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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,121 @@
|
|
|
1
|
+
import { MosaicClient, clausePoint } from '@uwdata/mosaic-core';
|
|
2
|
+
import { buildCategoryBuckets, buildCategorySummaryQuery, categoryKeyToSelectionValue, isSelectableCategoryKey, rowsFromQueryResult, } from './utils';
|
|
3
|
+
export class DataTableExplorerCategoryClient extends MosaicClient {
|
|
4
|
+
categoryLimit;
|
|
5
|
+
filteredError;
|
|
6
|
+
filteredLoading = true;
|
|
7
|
+
field;
|
|
8
|
+
onStateChange;
|
|
9
|
+
selectedKey;
|
|
10
|
+
filteredRows;
|
|
11
|
+
tableName;
|
|
12
|
+
totalError;
|
|
13
|
+
totalLoading = true;
|
|
14
|
+
totalRows;
|
|
15
|
+
constructor(options) {
|
|
16
|
+
super(options.selection);
|
|
17
|
+
this.categoryLimit = options.categoryLimit;
|
|
18
|
+
this.field = options.field;
|
|
19
|
+
this.onStateChange = options.onStateChange;
|
|
20
|
+
this.tableName = options.tableName;
|
|
21
|
+
}
|
|
22
|
+
get filterStable() {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
emitSummary() {
|
|
26
|
+
const filteredRows = this.filteredRows ?? (this.filteredLoading ? (this.totalRows ?? []) : []);
|
|
27
|
+
const totalRows = this.totalRows ?? (this.totalLoading ? (this.filteredRows ?? []) : []);
|
|
28
|
+
const { bucketCount, buckets } = buildCategoryBuckets(filteredRows, totalRows, this.categoryLimit, this.selectedKey);
|
|
29
|
+
this.onStateChange({
|
|
30
|
+
bucketCount,
|
|
31
|
+
buckets,
|
|
32
|
+
error: this.filteredError ?? this.totalError,
|
|
33
|
+
isLoading: this.filteredLoading || this.totalLoading,
|
|
34
|
+
kind: 'category',
|
|
35
|
+
selectedKey: this.selectedKey,
|
|
36
|
+
toggleValue: (key) => this.toggleValue(key),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
setTotalError(error) {
|
|
40
|
+
this.totalError = error;
|
|
41
|
+
this.totalLoading = false;
|
|
42
|
+
this.emitSummary();
|
|
43
|
+
}
|
|
44
|
+
setTotalLoading(isLoading) {
|
|
45
|
+
this.totalLoading = isLoading;
|
|
46
|
+
if (isLoading) {
|
|
47
|
+
this.totalError = undefined;
|
|
48
|
+
}
|
|
49
|
+
this.emitSummary();
|
|
50
|
+
}
|
|
51
|
+
setTotalRows(rows) {
|
|
52
|
+
this.totalRows = rows
|
|
53
|
+
.slice()
|
|
54
|
+
.sort((left, right) => right.total - left.total);
|
|
55
|
+
this.totalError = undefined;
|
|
56
|
+
this.totalLoading = false;
|
|
57
|
+
this.emitSummary();
|
|
58
|
+
}
|
|
59
|
+
queryPending() {
|
|
60
|
+
this.filteredLoading = true;
|
|
61
|
+
this.filteredError = undefined;
|
|
62
|
+
this.emitSummary();
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
query(filter = []) {
|
|
66
|
+
return buildCategorySummaryQuery(this.tableName, this.field.name, filter);
|
|
67
|
+
}
|
|
68
|
+
queryResult(data) {
|
|
69
|
+
const rows = rowsFromQueryResult(data)
|
|
70
|
+
.slice()
|
|
71
|
+
.sort((left, right) => right.total - left.total);
|
|
72
|
+
this.filteredRows = rows;
|
|
73
|
+
this.filteredError = undefined;
|
|
74
|
+
this.filteredLoading = false;
|
|
75
|
+
this.emitSummary();
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
queryError(error) {
|
|
79
|
+
this.filteredError = error;
|
|
80
|
+
this.filteredLoading = false;
|
|
81
|
+
this.emitSummary();
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
reset() {
|
|
85
|
+
this.selectedKey = undefined;
|
|
86
|
+
this.emitSummary();
|
|
87
|
+
}
|
|
88
|
+
toggleValue(key) {
|
|
89
|
+
if (!isSelectableCategoryKey(key)) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.selectedKey = this.selectedKey === key ? undefined : key;
|
|
93
|
+
this.filterBy?.update(clausePoint(this.field.name, categoryKeyToSelectionValue(this.selectedKey), {
|
|
94
|
+
source: this,
|
|
95
|
+
}));
|
|
96
|
+
this.emitSummary();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export class DataTableExplorerCategoryTotalClient extends MosaicClient {
|
|
100
|
+
summaryClient;
|
|
101
|
+
constructor(options) {
|
|
102
|
+
super();
|
|
103
|
+
this.summaryClient = options.summaryClient;
|
|
104
|
+
}
|
|
105
|
+
queryPending() {
|
|
106
|
+
this.summaryClient.setTotalLoading(true);
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
query(filter = []) {
|
|
110
|
+
return this.summaryClient.query(filter);
|
|
111
|
+
}
|
|
112
|
+
queryResult(data) {
|
|
113
|
+
this.summaryClient.setTotalRows(rowsFromQueryResult(data));
|
|
114
|
+
return this;
|
|
115
|
+
}
|
|
116
|
+
queryError(error) {
|
|
117
|
+
this.summaryClient.setTotalError(error);
|
|
118
|
+
return this;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=DataTableExplorerCategoryClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerCategoryClient.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCategoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AAI9E,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAE3B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D,aAAa,CAAkC;IAEhE,YAAY,OAAoD;QAC9D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;IAEQ,YAAY;QACnB,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,KAAK,CAAC,SAA0B,EAAE;QACzC,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAEQ,WAAW,CAAC,IAAa;QAChC,IAAI,CAAC,aAAa,CAAC,YAAY,CAC7B,mBAAmB,CAAmB,IAAI,CAAC,CAC5C,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,UAAU,CAAC,KAAY;QAC9B,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import {MosaicClient, clausePoint, type Selection} from '@uwdata/mosaic-core';\nimport {type ExprNode, Query} from '@uwdata/mosaic-sql';\nimport type * as arrow from 'apache-arrow';\nimport type {DataTableExplorerCategorySummary} from './types';\nimport {\n buildCategoryBuckets,\n buildCategorySummaryQuery,\n categoryKeyToSelectionValue,\n type CategoryCountRow,\n isSelectableCategoryKey,\n rowsFromQueryResult,\n} from './utils';\n\ntype CategoryClientOptions = {\n categoryLimit: number;\n field: arrow.Field;\n onStateChange: (summary: DataTableExplorerCategorySummary) => void;\n selection: Selection;\n tableName: string;\n};\n\nexport class DataTableExplorerCategoryClient extends MosaicClient {\n private readonly categoryLimit: number;\n private filteredError?: Error;\n private filteredLoading = true;\n private readonly field: arrow.Field;\n private readonly onStateChange: (\n summary: DataTableExplorerCategorySummary,\n ) => void;\n private selectedKey?: string;\n private filteredRows?: CategoryCountRow[];\n private readonly tableName: string;\n private totalError?: Error;\n private totalLoading = true;\n private totalRows?: CategoryCountRow[];\n\n constructor(options: CategoryClientOptions) {\n super(options.selection);\n this.categoryLimit = options.categoryLimit;\n this.field = options.field;\n this.onStateChange = options.onStateChange;\n this.tableName = options.tableName;\n }\n\n override get filterStable(): boolean {\n return false;\n }\n\n private emitSummary() {\n const filteredRows =\n this.filteredRows ?? (this.filteredLoading ? (this.totalRows ?? []) : []);\n const totalRows =\n this.totalRows ?? (this.totalLoading ? (this.filteredRows ?? []) : []);\n const {bucketCount, buckets} = buildCategoryBuckets(\n filteredRows,\n totalRows,\n this.categoryLimit,\n this.selectedKey,\n );\n\n this.onStateChange({\n bucketCount,\n buckets,\n error: this.filteredError ?? this.totalError,\n isLoading: this.filteredLoading || this.totalLoading,\n kind: 'category',\n selectedKey: this.selectedKey,\n toggleValue: (key) => this.toggleValue(key),\n });\n }\n\n setTotalError(error?: Error) {\n this.totalError = error;\n this.totalLoading = false;\n this.emitSummary();\n }\n\n setTotalLoading(isLoading: boolean) {\n this.totalLoading = isLoading;\n if (isLoading) {\n this.totalError = undefined;\n }\n this.emitSummary();\n }\n\n setTotalRows(rows: CategoryCountRow[]) {\n this.totalRows = rows\n .slice()\n .sort(\n (left: CategoryCountRow, right: CategoryCountRow) =>\n right.total - left.total,\n );\n this.totalError = undefined;\n this.totalLoading = false;\n this.emitSummary();\n }\n\n override queryPending(): this {\n this.filteredLoading = true;\n this.filteredError = undefined;\n this.emitSummary();\n return this;\n }\n\n override query(filter: Array<ExprNode> = []): Query {\n return buildCategorySummaryQuery(this.tableName, this.field.name, filter);\n }\n\n override queryResult(data: unknown): this {\n const rows = rowsFromQueryResult<CategoryCountRow>(data)\n .slice()\n .sort(\n (left: CategoryCountRow, right: CategoryCountRow) =>\n right.total - left.total,\n );\n this.filteredRows = rows;\n this.filteredError = undefined;\n this.filteredLoading = false;\n this.emitSummary();\n return this;\n }\n\n override queryError(error: Error): this {\n this.filteredError = error;\n this.filteredLoading = false;\n this.emitSummary();\n return this;\n }\n\n reset() {\n this.selectedKey = undefined;\n this.emitSummary();\n }\n\n toggleValue(key: string) {\n if (!isSelectableCategoryKey(key)) {\n return;\n }\n\n this.selectedKey = this.selectedKey === key ? undefined : key;\n this.filterBy?.update(\n clausePoint(\n this.field.name,\n categoryKeyToSelectionValue(this.selectedKey),\n {\n source: this,\n },\n ),\n );\n this.emitSummary();\n }\n}\n\ntype DataTableExplorerCategoryTotalClientOptions = {\n summaryClient: DataTableExplorerCategoryClient;\n};\n\nexport class DataTableExplorerCategoryTotalClient extends MosaicClient {\n private readonly summaryClient: DataTableExplorerCategoryClient;\n\n constructor(options: DataTableExplorerCategoryTotalClientOptions) {\n super();\n this.summaryClient = options.summaryClient;\n }\n\n override queryPending(): this {\n this.summaryClient.setTotalLoading(true);\n return this;\n }\n\n override query(filter: Array<ExprNode> = []): Query {\n return this.summaryClient.query(filter);\n }\n\n override queryResult(data: unknown): this {\n this.summaryClient.setTotalRows(\n rowsFromQueryResult<CategoryCountRow>(data),\n );\n return this;\n }\n\n override queryError(error: Error): this {\n this.summaryClient.setTotalError(error);\n return this;\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MosaicClient, type Selection } from '@uwdata/mosaic-core';
|
|
2
|
+
import { type ExprNode, type Query } from '@uwdata/mosaic-sql';
|
|
3
|
+
export type DataTableExplorerCountState = {
|
|
4
|
+
count?: number;
|
|
5
|
+
error?: Error;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
};
|
|
8
|
+
type DataTableExplorerCountClientOptions = {
|
|
9
|
+
filterStable?: boolean;
|
|
10
|
+
onStateChange: (state: DataTableExplorerCountState) => void;
|
|
11
|
+
selection?: Selection;
|
|
12
|
+
tableName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare class DataTableExplorerCountClient extends MosaicClient {
|
|
15
|
+
private count?;
|
|
16
|
+
private error?;
|
|
17
|
+
private readonly isFilterStable;
|
|
18
|
+
private readonly onStateChange;
|
|
19
|
+
private readonly tableName;
|
|
20
|
+
constructor(options: DataTableExplorerCountClientOptions);
|
|
21
|
+
get filterStable(): boolean;
|
|
22
|
+
queryPending(): this;
|
|
23
|
+
query(filter?: Array<ExprNode>): Query;
|
|
24
|
+
queryResult(data: unknown): this;
|
|
25
|
+
queryError(error: Error): this;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=DataTableExplorerCountClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerCountClient.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerCountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,KAAK,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAG7D,MAAM,MAAM,2BAA2B,GAAG;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAC5D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,qBAAa,4BAA6B,SAAQ,YAAY;IAC5D,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,KAAK,CAAC,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+C;IAC7E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,mCAAmC;IAOxD,IAAa,YAAY,IAAI,OAAO,CAEnC;IAEQ,YAAY,IAAI,IAAI;IASpB,KAAK,CAAC,MAAM,GAAE,KAAK,CAAC,QAAQ,CAAM,GAAG,KAAK;IAO1C,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAUhC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CASxC"}
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorerHeader.js","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorerHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AACzE,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC3D,OAAO,EACL,8CAA8C,EAC9C,8CAA8C,EAC9C,0CAA0C,EAC1C,kDAAkD,EAClD,iCAAiC,GAClC,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAC,yCAAyC,EAAC,MAAM,SAAS,CAAC;AAUlE,MAAM,uBAAuB,GAC3B,kEAAkE,CAAC;AACrE,MAAM,0BAA0B,GAC9B,wGAAwG,CAAC;AAE3G,SAAS,mBAAmB,CAAC,MAAoC;IAC/D,OAAO,yCAAyC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QACjE,CAAC,CAAC,kDAAkD;QACpD,CAAC,CAAC,8CAA8C,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CACvB,cAAwC,EACxC,QAAgB,EAChB,UAAoD;IAEpD,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC;IACtE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,UAAU,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,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AAC;4BACF,OAAO,CACL,KAAC,SAAS,IAER,SAAS,EAAE,0BAA0B,EACrC,KAAK,EAAE,mBAAmB,CAAC,MAAM,CAAC,YAElC,eAAK,SAAS,EAAC,SAAS,aACtB,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,+DAA+D,EACzE,OAAO,EAAE,GAAG,EAAE,CACZ,gBAAgB,CACd,QAAQ,CAAC,OAAO,EAChB,MAAM,CAAC,IAAI,EACX,QAAQ,CAAC,UAAU,CACpB,aAGH,eAAK,SAAS,EAAC,gBAAgB,aAC7B,cAAK,SAAS,EAAC,kDAAkD,YAC9D,MAAM,CAAC,IAAI,GACR,EACN,KAAC,KAAK,IACJ,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,4DAA4D,YAErE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GACpB,IACJ,EACN,eAAM,SAAS,EAAC,2GAA2G,YACxH,SAAS,CAAC,CAAC,CAAC,CACX,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CACf,KAAC,eAAe,IAAC,SAAS,EAAC,SAAS,GAAG,CACxC,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,IAAC,SAAS,EAAC,SAAS,GAAG,CACtC,CACF,CAAC,CAAC,CAAC,CACF,gBAAM,SAAS,EAAC,uGAAuG,aACrH,KAAC,aAAa,IAAC,SAAS,EAAC,eAAe,GAAG,EAC3C,KAAC,eAAe,IAAC,SAAS,EAAC,eAAe,GAAG,IACxC,CACR,GACI,IACA,EACT,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,GAAI,IAC3B,IA3CD,MAAM,CAAC,IAAI,CA4CN,CACb,CAAC;wBACJ,CAAC,CAAC,IACO,GACC,IACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {Badge, cn, TableHead, TableHeader, TableRow} from '@sqlrooms/ui';\nimport {ChevronDownIcon, ChevronUpIcon} from 'lucide-react';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {\n DATA_TABLE_EXPLORER_DEFAULT_COLUMN_WIDTH_STYLE,\n DATA_TABLE_EXPLORER_ROW_NUMBER_COLUMN_WIDTH_PX,\n DATA_TABLE_EXPLORER_ROW_NUMBER_WIDTH_STYLE,\n DATA_TABLE_EXPLORER_UNSUPPORTED_COLUMN_WIDTH_STYLE,\n getDataTableExplorerColumnWidthPx,\n} from './layout';\nimport type {\n DataTableExplorerCategorySummary,\n DataTableExplorerColumnState,\n DataTableExplorerHistogramSummary,\n DataTableExplorerSorting,\n UseDataTableExplorerReturn,\n} from './types';\nimport {isDataTableExplorerUnsupportedSummaryType} from './utils';\n\nexport type DataTableExplorerHeaderProps = {\n className?: string;\n explorer: Pick<\n UseDataTableExplorerReturn,\n 'columns' | 'setSorting' | 'sorting'\n >;\n};\n\nconst STICKY_ROW_NUMBER_CLASS =\n 'bg-background sticky left-0 top-0 z-40 border-r px-1 text-center';\nconst STICKY_COLUMN_HEADER_CLASS =\n 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';\n\nfunction getColumnWidthStyle(column: DataTableExplorerColumnState) {\n return isDataTableExplorerUnsupportedSummaryType(column.field.type)\n ? DATA_TABLE_EXPLORER_UNSUPPORTED_COLUMN_WIDTH_STYLE\n : DATA_TABLE_EXPLORER_DEFAULT_COLUMN_WIDTH_STYLE;\n}\n\nfunction setNextSortState(\n currentSorting: DataTableExplorerSorting,\n columnId: string,\n setSorting: UseDataTableExplorerReturn['setSorting'],\n) {\n const current = currentSorting.find((entry) => entry.id === columnId);\n if (!current) {\n setSorting([{desc: false, id: columnId}]);\n return;\n }\n if (!current.desc) {\n setSorting([{desc: true, id: columnId}]);\n return;\n }\n setSorting([]);\n}\n\nfunction formatPercentOfTotal(value: number) {\n const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits,\n style: 'percent',\n }).format(value);\n}\n\nfunction CategorySummaryCell({\n summary,\n}: {\n summary: DataTableExplorerCategorySummary;\n}) {\n const [hoveredKey, setHoveredKey] = useState<string>();\n const totalCount = summary.buckets.reduce(\n (acc, bucket) => acc + bucket.totalCount,\n 0,\n );\n const activeBucket = summary.buckets.find(\n (bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey,\n );\n const footerLabel = activeBucket\n ? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`\n : `${summary.bucketCount.toLocaleString()} categories`;\n\n return (\n <div className=\"space-y-0.5 pt-1.5\">\n <div className=\"flex h-10 overflow-hidden rounded-sm border\">\n {summary.buckets.map((bucket) => {\n const width =\n totalCount > 0\n ? `${(bucket.totalCount / totalCount) * 100}%`\n : '0%';\n const fillPct =\n bucket.totalCount > 0\n ? (bucket.filteredCount / bucket.totalCount) * 100\n : 0;\n const isSelected = summary.selectedKey === bucket.key;\n const background =\n bucket.kind === 'overflow'\n ? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`\n : `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;\n\n return (\n <button\n key={bucket.key}\n type=\"button\"\n disabled={!bucket.selectable}\n className={cn(\n 'relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default',\n isSelected && 'ring-ring ring-1 ring-inset',\n !bucket.selectable && 'text-muted-foreground',\n )}\n style={{\n background,\n flexBasis: width,\n flexGrow: bucket.totalCount,\n }}\n onClick={() => summary.toggleValue(bucket.key)}\n onMouseEnter={() => setHoveredKey(bucket.key)}\n onMouseLeave={() => setHoveredKey(undefined)}\n >\n <span className=\"max-w-full truncate px-1\">{bucket.label}</span>\n </button>\n );\n })}\n </div>\n <div className=\"text-muted-foreground truncate text-[10px] font-normal\">\n {footerLabel}\n </div>\n </div>\n );\n}\n\ntype ScaleLike = {\n apply: (value: number | Date) => number;\n domain: [number | Date, number | Date];\n invert: (value: number) => number | Date;\n range: [number, number];\n type: 'linear' | 'utc';\n};\n\nconst histogramInteractorIds = new WeakMap<object, number>();\nlet nextHistogramInteractorId = 0;\n\nfunction getHistogramInteractorId(interactor: object) {\n const cachedId = histogramInteractorIds.get(interactor);\n if (cachedId !== undefined) {\n return cachedId;\n }\n\n const id = ++nextHistogramInteractorId;\n histogramInteractorIds.set(interactor, id);\n return id;\n}\n\nfunction createScale(\n type: ScaleLike['type'],\n domain: [number | Date, number | Date],\n range: [number, number],\n): ScaleLike {\n const [d0, d1] = domain.map((value) =>\n value instanceof Date ? value.getTime() : value,\n ) as [number, number];\n const [r0, r1] = range;\n const span = d1 - d0 || 1;\n const rspan = r1 - r0;\n\n return {\n apply(value: number | Date) {\n const numeric = value instanceof Date ? value.getTime() : value;\n return r0 + ((numeric - d0) / span) * rspan;\n },\n domain,\n invert(value: number) {\n const numeric = d0 + ((value - r0) / (rspan || 1)) * span;\n return type === 'utc' ? new Date(numeric) : numeric;\n },\n range,\n type,\n };\n}\n\nfunction formatDomainValue(value: number | Date, valueType: 'date' | 'number') {\n if (valueType === 'date') {\n const date = value instanceof Date ? value : new Date(value);\n return date.toISOString().slice(0, 10);\n }\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits: 2,\n }).format(typeof value === 'number' ? value : value.getTime());\n}\n\nfunction HistogramSummaryCell({\n summary,\n}: {\n summary: DataTableExplorerHistogramSummary;\n}) {\n const svgRef = useRef<SVGSVGElement>(null);\n const brushRootRef = useRef<SVGGElement>(null);\n const initializedBrushRef = useRef<string | undefined>(undefined);\n\n const layout = useMemo(() => {\n const width = 122;\n const height = 40;\n const margin = {bottom: 4, left: 4, right: 4, top: 2};\n const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;\n const nullBarGap = nullBarWidth > 0 ? 3 : 0;\n const totalBins = summary.totalBins.length\n ? summary.totalBins\n : summary.filteredBins;\n const domain: [number | Date, number | Date] | null =\n totalBins.length > 0\n ? [totalBins[0]!.x0, totalBins[totalBins.length - 1]!.x1]\n : null;\n const totalMax = Math.max(\n summary.totalNullCount,\n ...totalBins.map((bin) => bin.length),\n 1,\n );\n const xScale = domain\n ? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [\n margin.left + nullBarWidth + nullBarGap,\n width - margin.right,\n ])\n : null;\n const yScale = createScale(\n 'linear',\n [0, totalMax],\n [height - margin.bottom, margin.top],\n );\n return {\n height,\n margin,\n nullBarGap,\n nullBarWidth,\n width,\n xScale,\n yScale,\n };\n }, [summary]);\n\n useEffect(() => {\n const svg = svgRef.current;\n const brushRoot = brushRootRef.current;\n const interactor = summary.interactor;\n if (!svg || !brushRoot || !interactor || !layout.xScale) return;\n\n const brushKey = [\n getHistogramInteractorId(interactor),\n summary.valueType,\n layout.xScale.domain\n .map((value) => (value instanceof Date ? value.getTime() : value))\n .join(':'),\n layout.xScale.range.join(':'),\n ].join('|');\n if (initializedBrushRef.current === brushKey) return;\n\n (\n svg as SVGSVGElement & {\n scale: (channel: string) => ScaleLike | undefined;\n }\n ).scale = (channel: string) => {\n if (channel === 'x') return layout.xScale!;\n if (channel === 'y') return layout.yScale;\n return undefined;\n };\n\n brushRoot.replaceChildren();\n interactor.init(svg as any, brushRoot);\n initializedBrushRef.current = brushKey;\n }, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);\n\n const axisY = layout.height - layout.margin.bottom;\n const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;\n const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;\n const xAxisEnd =\n layout.xScale?.range[1] ?? layout.width - layout.margin.right;\n\n return (\n <div className=\"space-y-0 pt-1.5\">\n <svg\n ref={svgRef}\n width={layout.width}\n height={layout.height}\n viewBox={`0 0 ${layout.width} ${layout.height}`}\n className=\"max-w-full overflow-visible\"\n >\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.totalNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.totalNullCount)\n }\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n ) : null}\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.filteredNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.filteredNullCount)\n }\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n ) : null}\n {summary.totalBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`bg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n );\n })}\n {summary.filteredBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`fg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n );\n })}\n <line\n x1={xAxisStart}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisStart}\n x2={xAxisStart}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisEnd}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n {summary.totalNullCount > 0 ? (\n <line\n x1={nullBarCenter}\n x2={nullBarCenter}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--chart-1))\"\n />\n ) : null}\n <g ref={brushRootRef} />\n </svg>\n <div className=\"text-muted-foreground relative h-3.5 text-[10px] font-normal\">\n {summary.totalNullCount > 0 ? (\n <span\n className=\"absolute -translate-x-1/2\"\n style={{left: nullBarCenter}}\n >\n ∅\n </span>\n ) : null}\n <span className=\"absolute\" style={{left: xAxisStart}}>\n {summary.totalBins[0]\n ? formatDomainValue(summary.totalBins[0].x0, summary.valueType)\n : '0'}\n </span>\n <span className=\"absolute -translate-x-full\" style={{left: xAxisEnd}}>\n {summary.totalBins.at(-1)\n ? formatDomainValue(summary.totalBins.at(-1)!.x1, summary.valueType)\n : '0'}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SummaryCell({column}: {column: DataTableExplorerColumnState}) {\n if (column.summary.kind === 'histogram') {\n return <HistogramSummaryCell summary={column.summary} />;\n }\n if (column.summary.kind === 'category') {\n return <CategorySummaryCell summary={column.summary} />;\n }\n return (\n <div className=\"text-muted-foreground pt-1.5 text-[10px] font-normal\">\n {column.summary.label}\n </div>\n );\n}\n\nexport function DataTableExplorerHeader({\n className,\n explorer,\n}: DataTableExplorerHeaderProps) {\n return (\n <>\n <colgroup>\n <col style={{width: DATA_TABLE_EXPLORER_ROW_NUMBER_COLUMN_WIDTH_PX}} />\n {explorer.columns.map((column) => (\n <col\n key={column.name}\n style={{width: getDataTableExplorerColumnWidthPx(column)}}\n />\n ))}\n </colgroup>\n <TableHeader className={cn('sticky top-0 z-30', className)}>\n <TableRow>\n <TableHead\n className={STICKY_ROW_NUMBER_CLASS}\n style={DATA_TABLE_EXPLORER_ROW_NUMBER_WIDTH_STYLE}\n >\n #\n </TableHead>\n {explorer.columns.map((column) => {\n const sortState = explorer.sorting.find(\n (entry) => entry.id === column.name,\n );\n return (\n <TableHead\n key={column.name}\n className={STICKY_COLUMN_HEADER_CLASS}\n style={getColumnWidthStyle(column)}\n >\n <div className=\"min-w-0\">\n <button\n type=\"button\"\n className=\"group relative flex w-full items-start gap-1.5 pr-4 text-left\"\n onClick={() =>\n setNextSortState(\n explorer.sorting,\n column.name,\n explorer.setSorting,\n )\n }\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-[13px] leading-tight font-semibold\">\n {column.name}\n </div>\n <Badge\n variant=\"outline\"\n className=\"mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60\"\n >\n {String(column.field.type)}\n </Badge>\n </div>\n <span className=\"text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center\">\n {sortState ? (\n sortState.desc ? (\n <ChevronDownIcon className=\"h-4 w-4\" />\n ) : (\n <ChevronUpIcon className=\"h-4 w-4\" />\n )\n ) : (\n <span className=\"flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60\">\n <ChevronUpIcon className=\"-mb-1 h-3 w-3\" />\n <ChevronDownIcon className=\"-mt-1 h-3 w-3\" />\n </span>\n )}\n </span>\n </button>\n <SummaryCell column={column} />\n </div>\n </TableHead>\n );\n })}\n </TableRow>\n </TableHeader>\n </>\n );\n}\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { FieldInfo } from '@uwdata/mosaic-core';
|
|
2
|
+
import { MosaicClient, type Selection } from '@uwdata/mosaic-core';
|
|
3
|
+
import { type ExprNode, Query } from '@uwdata/mosaic-sql';
|
|
4
|
+
import type * as arrow from 'apache-arrow';
|
|
5
|
+
import type { DataTableExplorerHistogramSummary } from './types';
|
|
6
|
+
type HistogramStateChange = (summary: DataTableExplorerHistogramSummary) => void;
|
|
7
|
+
type HistogramClientOptions = {
|
|
8
|
+
field: arrow.Field;
|
|
9
|
+
onStateChange: HistogramStateChange;
|
|
10
|
+
selection: Selection;
|
|
11
|
+
steps: number;
|
|
12
|
+
tableName: string;
|
|
13
|
+
valueType: 'date' | 'number';
|
|
14
|
+
};
|
|
15
|
+
type HistogramRow = {
|
|
16
|
+
x1: number | Date | null;
|
|
17
|
+
x2: number | Date | null;
|
|
18
|
+
y: number;
|
|
19
|
+
};
|
|
20
|
+
export declare class DataTableExplorerHistogramClient extends MosaicClient {
|
|
21
|
+
readonly type = "rectY";
|
|
22
|
+
private filteredError?;
|
|
23
|
+
private filteredLoading;
|
|
24
|
+
private readonly field;
|
|
25
|
+
private fieldInfo?;
|
|
26
|
+
private fieldInfoPromise?;
|
|
27
|
+
private filteredBins?;
|
|
28
|
+
private filteredNullCount?;
|
|
29
|
+
private readonly interactor;
|
|
30
|
+
private readonly onStateChange;
|
|
31
|
+
private readonly select;
|
|
32
|
+
private readonly tableName;
|
|
33
|
+
private totalBins?;
|
|
34
|
+
private totalError?;
|
|
35
|
+
private totalLoading;
|
|
36
|
+
private totalNullCount?;
|
|
37
|
+
private readonly valueType;
|
|
38
|
+
constructor(options: HistogramClientOptions);
|
|
39
|
+
get filterStable(): boolean;
|
|
40
|
+
private emitSummary;
|
|
41
|
+
ensureFieldInfo(): Promise<void>;
|
|
42
|
+
setTotalError(error?: Error): void;
|
|
43
|
+
setTotalLoading(isLoading: boolean): void;
|
|
44
|
+
setTotalRows(rows: HistogramRow[]): void;
|
|
45
|
+
queryPending(): this;
|
|
46
|
+
prepare(): Promise<void>;
|
|
47
|
+
query(filter?: Array<ExprNode>): Query;
|
|
48
|
+
queryResult(data: unknown): this;
|
|
49
|
+
queryError(error: Error): this;
|
|
50
|
+
channelField(channel: string): FieldInfo;
|
|
51
|
+
get plot(): {
|
|
52
|
+
getAttribute(name: string): undefined;
|
|
53
|
+
markSet: Set<DataTableExplorerHistogramClient>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
type DataTableExplorerHistogramTotalClientOptions = {
|
|
57
|
+
summaryClient: DataTableExplorerHistogramClient;
|
|
58
|
+
};
|
|
59
|
+
export declare class DataTableExplorerHistogramTotalClient extends MosaicClient {
|
|
60
|
+
private readonly summaryClient;
|
|
61
|
+
constructor(options: DataTableExplorerHistogramTotalClientOptions);
|
|
62
|
+
prepare(): Promise<void>;
|
|
63
|
+
queryPending(): this;
|
|
64
|
+
query(filter?: Array<ExprNode>): Query;
|
|
65
|
+
queryResult(data: unknown): this;
|
|
66
|
+
queryError(error: Error): this;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=DataTableExplorerHistogramClient.d.ts.map
|