@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 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../src/charts/chart-types/base-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,KAAK,IAAI,EAAC,MAAM,IAAI,CAAC;AAC7B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAC,WAAW,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAA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AAM,UAAU,eAAe,CAC7B,SAAuC;IAEvC,OAAO,YAAY,IAAI,SAAS,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,SAAuC;IAEvC,OAAO,UAAU,IAAI,SAAS,CAAC;AACjC,CAAC","sourcesContent":["/**\n * Base types for chart configurations.\n * Separated to avoid circular dependencies.\n */\n\nimport type {Spec} from '@uwdata/mosaic-spec';\nimport {type Tool} from 'ai';\nimport type {Coordinator} from '@uwdata/mosaic-core';\nimport type {ComponentType} from 'react';\nimport type * as z from 'zod';\nimport {ChartConfig, ChartType} from './chart-config';\nimport {RetainedVgPlotChart} from '../../VgPlotChart';\nimport type {Selection} from '@uwdata/mosaic-core';\nimport type {DataTableExplorerPanelConfig} from '../../dashboard/core-types';\nimport type {MosaicDashboardEntry} from '../../dashboard/dashboard-types';\nimport type {\n ChartDataPolicy,\n ChartDataPolicyContext,\n ChartRuntimeIssue,\n ChartRuntimeIssueContext,\n ChartRuntimeIssueReporter,\n} from '../../chart-runtime';\n\nexport type {ChartType};\n\n/**\n * Column info passed to chart builder UI\n */\nexport interface ChartBuilderColumn {\n name: string;\n type: string;\n}\n\n/**\n * Describes a field selector in a chart builder UI\n */\nexport interface ChartBuilderField {\n /** Unique key for this field */\n key: string;\n /** Display label */\n label: string;\n /** Whether the field is required */\n required?: boolean;\n /** Filter columns by DuckDB type (e.g. 'INTEGER', 'VARCHAR', 'DOUBLE') */\n types?: string[];\n /** Optional helper text for AI or custom UIs */\n description?: string;\n /** Whether this field accepts multiple values (array) */\n multiple?: boolean;\n}\n\n/**\n * Result of table resolution, includes table name and column metadata.\n */\nexport interface ResolvedTable {\n tableName: string;\n columns: ChartBuilderColumn[];\n}\n\n/**\n * Partial update to apply to a dashboard panel.\n * Config can be any of the panel config types (chart, dataTableExplorer).\n */\nexport interface PanelPatch {\n title?: string;\n source?: ChartBuilderPanelSource;\n config?: ChartConfig | DataTableExplorerPanelConfig;\n}\n\n/**\n * Dependencies injected into dashboard tool creation functions.\n * Provides the resources and operations needed to create dashboard panels.\n */\nexport interface DashboardToolDeps {\n /**\n * Resolves the dashboard artifact ID.\n * Use this when you only need the artifact and not table information.\n */\n resolveArtifact: (\n artifactId?: string,\n createIfMissing?: boolean,\n context?: ChartToolExecutionContext,\n ) => string;\n\n /**\n * Resolves table name and columns for a given dashboard artifact.\n * Use this when you need table-specific information.\n */\n resolveTable: (artifactId: string, tableName?: string) => ResolvedTable;\n\n addPanel: (dashboardId: string, panel: any) => string;\n updatePanel: (\n dashboardId: string,\n panelId: string,\n patch: Partial<PanelPatch>,\n ) => void;\n getDashboard: (dashboardId: string) => MosaicDashboardEntry | undefined;\n getPanelIssue?: (\n dashboardId: string,\n panelId: string,\n ) => ChartRuntimeIssue | undefined;\n removePanel: (dashboardId: string, panelId: string) => void;\n setCurrentArtifact: (artifactId: string) => void;\n\n maxDataPoints: number;\n}\n\nexport type ChartToolExecutionContext = object & {\n sessionId?: string;\n aiRunContext?: unknown;\n};\n\nexport type ChartBuilderPanelSource = {\n tableName?: string;\n sqlQuery?: string;\n};\n\nexport type ChartBuilderVgPlotOutput = {\n kind: 'vgplot';\n spec: Spec;\n};\n\nexport type ChartBuilderDashboardPanelOutput = {\n kind: 'dashboard-panel';\n type: string;\n source?: ChartBuilderPanelSource;\n config?: Record<string, unknown>;\n};\n\nexport type ChartBuilderOutput =\n | ChartBuilderVgPlotOutput\n | ChartBuilderDashboardPanelOutput;\n\nexport type ChartRetainer = {\n chart: RetainedVgPlotChart | undefined;\n setChart: (chart: RetainedVgPlotChart) => void;\n};\n\nexport type BrushSelectionParams = Map<string, Selection>;\n\n/**\n * Props passed to chart renderer components.\n */\nexport interface ChartRendererProps<TConfig extends ChartConfig = ChartConfig> {\n tableName: string;\n config: TConfig;\n coordinator: Coordinator;\n dataPolicy?: ChartDataPolicy | null;\n runtimeIssueContext?: ChartRuntimeIssueContext;\n runtimeIssueReporter?: ChartRuntimeIssueReporter;\n /**\n * Pre-defined params/selections to inject when rendering vgplot specs.\n * Keys are param names (without $), values are Param or Selection instances.\n */\n params?: BrushSelectionParams;\n /**\n * Optional retention adapter for preserving the underlying vgplot\n * instance across temporary unmount/remount cycles.\n */\n retention?: ChartRetainer;\n}\n\ntype BaseChartTypeDefinition<TConfig extends ChartConfig = ChartConfig> = {\n /** Unique identifier */\n id: ChartType;\n /** Short human-friendly name used in chart-type grids and prompts */\n label?: string;\n /** Short description of what this builder creates */\n description: string;\n /** Zod schema for runtime validation of settings */\n schema: z.ZodType<TConfig['settings']>;\n /** Generate a chart title from selected field values */\n buildTitle?: (fieldValues: Record<string, unknown>) => string;\n /** Optional availability override for a given table schema */\n isAvailable?: (columns: ChartBuilderColumn[]) => boolean;\n /** Explicit settings component for this chart type */\n settingsComponent: ComponentType;\n /** Optional icon component for chart-type grids */\n icon: ComponentType<{className?: string}>;\n /** Optional function to create an AI tool for this chart type */\n createTool?: (deps: DashboardToolDeps) => Tool;\n /** Optional runtime data policy for renderer-specific query validation. */\n getDataPolicy?: (\n context: ChartDataPolicyContext<TConfig>,\n ) => ChartDataPolicy | null | undefined;\n};\n\nexport type SpecChartTypeDefinition<TConfig extends ChartConfig = ChartConfig> =\n BaseChartTypeDefinition<TConfig> & {\n createSpec: (tableName: string, config: TConfig['settings']) => Spec;\n canViewSpec?: boolean;\n };\n\nexport type ComponentChartTypeDefinition<\n TConfig extends ChartConfig = ChartConfig,\n> = BaseChartTypeDefinition<TConfig> & {\n renderer: ComponentType<ChartRendererProps<TConfig>>;\n};\n\n/**\n * Shared chart-type definition used by both the chart-builder UI and\n * assistant-driven chart creation.\n */\nexport type ChartTypeDefinition<TConfig extends ChartConfig = ChartConfig> =\n | SpecChartTypeDefinition<TConfig>\n | ComponentChartTypeDefinition<TConfig>;\n\nexport function isSpecChartType<TConfig extends ChartConfig>(\n chartType: ChartTypeDefinition<TConfig>,\n): chartType is SpecChartTypeDefinition<TConfig> {\n return 'createSpec' in chartType;\n}\n\nexport function isComponentChartType<TConfig extends ChartConfig>(\n chartType: ChartTypeDefinition<TConfig>,\n): chartType is ComponentChartTypeDefinition<TConfig> {\n return 'renderer' in chartType;\n}\n\n/**\n * Backward-compatible alias for earlier chart-builder helper APIs.\n * @deprecated Use {@link ChartTypeDefinition} instead.\n */\nexport type ChartSpec = ChartTypeDefinition;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotSettings.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/box-plot/BoxPlotSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,EAAC,MAAM,OAAO,CAAC;AAK9B,eAAO,MAAM,wBAAwB,EAAE,EAoBtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Field } from '../../../components/Field';
|
|
3
|
+
import { ColumnSelector } from '../../../components/ColumnSelector';
|
|
4
|
+
import { useMosaicChartSettingsContext } from '../../chart-settings/MosaicChartSettingsContext';
|
|
5
|
+
export const BoxPlotSettingsComponent = () => {
|
|
6
|
+
const { onChangeConfig, config } = useMosaicChartSettingsContext('box-plot');
|
|
7
|
+
return (_jsxs("div", { className: "space-y-4", children: [_jsx(Field, { label: "X Field (categorical)", required: true, children: _jsx(ColumnSelector.Categorical, { value: config.settings.x, onChange: (x) => onChangeConfig('x', x) }) }), _jsx(Field, { label: "Y Field (numeric)", required: true, children: _jsx(ColumnSelector.Numeric, { value: config.settings.y, onChange: (y) => onChangeConfig('y', y) }) })] }));
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=BoxPlotSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotSettings.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/box-plot/BoxPlotSettings.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,KAAK,EAAC,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAC,6BAA6B,EAAC,MAAM,iDAAiD,CAAC;AAE9F,MAAM,CAAC,MAAM,wBAAwB,GAAO,GAAG,EAAE;IAC/C,MAAM,EAAC,cAAc,EAAE,MAAM,EAAC,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAE3E,OAAO,CACL,eAAK,SAAS,EAAC,WAAW,aACxB,KAAC,KAAK,IAAC,KAAK,EAAC,uBAAuB,EAAC,QAAQ,kBAC3C,KAAC,cAAc,CAAC,WAAW,IACzB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GACvC,GACI,EAER,KAAC,KAAK,IAAC,KAAK,EAAC,mBAAmB,EAAC,QAAQ,kBACvC,KAAC,cAAc,CAAC,OAAO,IACrB,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,CAAC,GACvC,GACI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {type FC} from 'react';\nimport {Field} from '../../../components/Field';\nimport {ColumnSelector} from '../../../components/ColumnSelector';\nimport {useMosaicChartSettingsContext} from '../../chart-settings/MosaicChartSettingsContext';\n\nexport const BoxPlotSettingsComponent: FC = () => {\n const {onChangeConfig, config} = useMosaicChartSettingsContext('box-plot');\n\n return (\n <div className=\"space-y-4\">\n <Field label=\"X Field (categorical)\" required>\n <ColumnSelector.Categorical\n value={config.settings.x}\n onChange={(x) => onChangeConfig('x', x)}\n />\n </Field>\n\n <Field label=\"Y Field (numeric)\" required>\n <ColumnSelector.Numeric\n value={config.settings.y}\n onChange={(y) => onChangeConfig('y', y)}\n />\n </Field>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../src/charts/chart-types/box-plot/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,4BAA4B,EAAC,MAAM,eAAe,CAAC;AAChE,OAAO,EAAC,kBAAkB,EAAuB,MAAM,UAAU,CAAC;AAUlE,eAAO,MAAM,gBAAgB,EAAE,4BAA4B,CAAC,kBAAkB,CAgB3E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BoxPlotChartSettings } from './schema';
|
|
2
|
+
import { titleFromDescription } from '../../../chart-builders/chartTypeUtils';
|
|
3
|
+
import { BoxPlotPanelRenderer } from './renderer/BoxPlotPanelRenderer';
|
|
4
|
+
import { BoxPlotSettingsComponent } from './BoxPlotSettings';
|
|
5
|
+
import { createBoxPlotAiTool } from './tool';
|
|
6
|
+
import { AlignHorizontalDistributeCenter } from 'lucide-react';
|
|
7
|
+
import { DEFAULT_CHART_MAX_DATA_POINTS } from '../../../chart-runtime';
|
|
8
|
+
const DESCRIPTION = 'Create a box plot';
|
|
9
|
+
export const boxPlotChartType = {
|
|
10
|
+
id: 'box-plot',
|
|
11
|
+
label: 'Box Plot',
|
|
12
|
+
description: DESCRIPTION,
|
|
13
|
+
icon: AlignHorizontalDistributeCenter,
|
|
14
|
+
schema: BoxPlotChartSettings,
|
|
15
|
+
settingsComponent: BoxPlotSettingsComponent,
|
|
16
|
+
buildTitle: titleFromDescription(DESCRIPTION),
|
|
17
|
+
renderer: BoxPlotPanelRenderer,
|
|
18
|
+
createTool: createBoxPlotAiTool,
|
|
19
|
+
getDataPolicy: () => ({
|
|
20
|
+
maxRows: DEFAULT_CHART_MAX_DATA_POINTS,
|
|
21
|
+
reason: 'Box plots render summaries plus outlier points. Too many outliers can make the chart too expensive to render.',
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/charts/chart-types/box-plot/definition.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,oBAAoB,EAAC,MAAM,UAAU,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAC,+BAA+B,EAAC,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAC,6BAA6B,EAAC,MAAM,wBAAwB,CAAC;AAErE,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAExC,MAAM,CAAC,MAAM,gBAAgB,GAC3B;IACE,EAAE,EAAE,UAAU;IACd,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,WAAW;IACxB,IAAI,EAAE,+BAA+B;IACrC,MAAM,EAAE,oBAAoB;IAC5B,iBAAiB,EAAE,wBAAwB;IAC3C,UAAU,EAAE,oBAAoB,CAAC,WAAW,CAAC;IAC7C,QAAQ,EAAE,oBAAoB;IAC9B,UAAU,EAAE,mBAAmB;IAC/B,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC;QACpB,OAAO,EAAE,6BAA6B;QACtC,MAAM,EACJ,+GAA+G;KAClH,CAAC;CACH,CAAC","sourcesContent":["import type {ComponentChartTypeDefinition} from '../base-types';\nimport {BoxPlotChartConfig, BoxPlotChartSettings} from './schema';\nimport {titleFromDescription} from '../../../chart-builders/chartTypeUtils';\nimport {BoxPlotPanelRenderer} from './renderer/BoxPlotPanelRenderer';\nimport {BoxPlotSettingsComponent} from './BoxPlotSettings';\nimport {createBoxPlotAiTool} from './tool';\nimport {AlignHorizontalDistributeCenter} from 'lucide-react';\nimport {DEFAULT_CHART_MAX_DATA_POINTS} from '../../../chart-runtime';\n\nconst DESCRIPTION = 'Create a box plot';\n\nexport const boxPlotChartType: ComponentChartTypeDefinition<BoxPlotChartConfig> =\n {\n id: 'box-plot',\n label: 'Box Plot',\n description: DESCRIPTION,\n icon: AlignHorizontalDistributeCenter,\n schema: BoxPlotChartSettings,\n settingsComponent: BoxPlotSettingsComponent,\n buildTitle: titleFromDescription(DESCRIPTION),\n renderer: BoxPlotPanelRenderer,\n createTool: createBoxPlotAiTool,\n getDataPolicy: () => ({\n maxRows: DEFAULT_CHART_MAX_DATA_POINTS,\n reason:\n 'Box plots render summaries plus outlier points. Too many outliers can make the chart too expensive to render.',\n }),\n };\n"]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MosaicClient, type Selection } from '@uwdata/mosaic-core';
|
|
2
|
+
import type { FilterExpr } from '@uwdata/mosaic-sql';
|
|
3
|
+
import { type ChartDataPolicy, type ChartRuntimeIssueContext, type ChartRuntimeIssueReporter } from '../../../../chart-runtime';
|
|
4
|
+
export type BoxPlotSummaryRow = {
|
|
5
|
+
category: unknown;
|
|
6
|
+
count: number;
|
|
7
|
+
lowerFence: number;
|
|
8
|
+
median: number;
|
|
9
|
+
q1: number;
|
|
10
|
+
q3: number;
|
|
11
|
+
upperFence: number;
|
|
12
|
+
whiskerHigh: number;
|
|
13
|
+
whiskerLow: number;
|
|
14
|
+
};
|
|
15
|
+
export type BoxPlotOutlierRow = {
|
|
16
|
+
category: unknown;
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
export type BoxPlotState = {
|
|
20
|
+
error?: Error;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
outliers: BoxPlotOutlierRow[];
|
|
23
|
+
summaries: BoxPlotSummaryRow[];
|
|
24
|
+
yBrush?: [number, number];
|
|
25
|
+
};
|
|
26
|
+
export type BoxPlotClientOptions = {
|
|
27
|
+
dataPolicy?: ChartDataPolicy | null;
|
|
28
|
+
onStateChange: (state: BoxPlotState) => void;
|
|
29
|
+
runtimeIssueContext?: ChartRuntimeIssueContext;
|
|
30
|
+
runtimeIssueReporter?: ChartRuntimeIssueReporter;
|
|
31
|
+
selection: Selection;
|
|
32
|
+
tableName: string;
|
|
33
|
+
x: string;
|
|
34
|
+
y: string;
|
|
35
|
+
};
|
|
36
|
+
type BuildBoxPlotQueryArgs = {
|
|
37
|
+
filter?: FilterExpr | null;
|
|
38
|
+
tableName: string;
|
|
39
|
+
x: string;
|
|
40
|
+
y: string;
|
|
41
|
+
};
|
|
42
|
+
export declare function buildBoxPlotQuery(args: BuildBoxPlotQueryArgs): string;
|
|
43
|
+
export declare class BoxPlotClient extends MosaicClient {
|
|
44
|
+
private readonly onStateChange;
|
|
45
|
+
private readonly tableName;
|
|
46
|
+
private readonly x;
|
|
47
|
+
private readonly y;
|
|
48
|
+
private readonly selection;
|
|
49
|
+
private readonly dataPolicy?;
|
|
50
|
+
private readonly runtimeIssueContext?;
|
|
51
|
+
private readonly runtimeIssueReporter?;
|
|
52
|
+
private state;
|
|
53
|
+
private destroyed;
|
|
54
|
+
constructor(options: BoxPlotClientOptions);
|
|
55
|
+
get filterStable(): boolean;
|
|
56
|
+
fields(): string[];
|
|
57
|
+
private emitState;
|
|
58
|
+
queryPending(): this;
|
|
59
|
+
query(filter?: FilterExpr | null): string;
|
|
60
|
+
queryResult(data: unknown): this;
|
|
61
|
+
queryError(error: Error): this;
|
|
62
|
+
updateYBrush(extent?: [number, number]): void;
|
|
63
|
+
reset(): void;
|
|
64
|
+
destroy(): void;
|
|
65
|
+
}
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=BoxPlotClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotClient.d.ts","sourceRoot":"","sources":["../../../../../src/charts/chart-types/box-plot/renderer/BoxPlotClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAW,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC7D,OAAO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,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,MAAM,CAiFrE;AAED,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgC;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAS;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAyB;IACrD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAA2B;IAChE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAA4B;IAClE,OAAO,CAAC,KAAK,CAIX;IACF,OAAO,CAAC,SAAS,CAAS;gBAEd,OAAO,EAAE,oBAAoB;IAYzC,IAAa,YAAY,IAAI,OAAO,CAEnC;IAED,MAAM,IAAI,MAAM,EAAE;IAIlB,OAAO,CAAC,SAAS;IAQR,YAAY,IAAI,IAAI;IAKpB,KAAK,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM;IASzC,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IA6EhC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAcvC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAStC,KAAK;IAII,OAAO;CAIjB"}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { MosaicClient, clauseInterval, } from '@uwdata/mosaic-core';
|
|
2
|
+
import { assertChartDataPolicy, createChartRuntimeIssueFromError, } from '../../../../chart-runtime';
|
|
3
|
+
function quoteIdentifier(identifier) {
|
|
4
|
+
return `"${identifier.replace(/"/g, '""')}"`;
|
|
5
|
+
}
|
|
6
|
+
function quoteTableReference(tableName) {
|
|
7
|
+
return tableName.split('.').map(quoteIdentifier).join('.');
|
|
8
|
+
}
|
|
9
|
+
function normalizeFilter(filter) {
|
|
10
|
+
if (!filter) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const filters = Array.isArray(filter) ? filter.flat(Infinity) : [filter];
|
|
14
|
+
return filters
|
|
15
|
+
.map((expr) => {
|
|
16
|
+
if (typeof expr === 'boolean') {
|
|
17
|
+
return expr ? null : 'FALSE';
|
|
18
|
+
}
|
|
19
|
+
return `(${expr.toString()})`;
|
|
20
|
+
})
|
|
21
|
+
.filter((expr) => Boolean(expr));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Type guard to check if data has a toArray method.
|
|
25
|
+
*/
|
|
26
|
+
function hasToArrayMethod(data) {
|
|
27
|
+
return (data !== null &&
|
|
28
|
+
data !== undefined &&
|
|
29
|
+
typeof data === 'object' &&
|
|
30
|
+
'toArray' in data &&
|
|
31
|
+
typeof data.toArray === 'function');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Safely extract rows from query result data.
|
|
35
|
+
* Handles both direct arrays and objects with toArray() method.
|
|
36
|
+
* Returns empty array if data is invalid or doesn't have expected structure.
|
|
37
|
+
*/
|
|
38
|
+
function rowsFromQueryResult(data) {
|
|
39
|
+
// Handle direct arrays
|
|
40
|
+
if (Array.isArray(data)) {
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
// Handle objects with toArray() method (Arrow Tables, Mosaic results, etc.)
|
|
44
|
+
if (!hasToArrayMethod(data)) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const result = data.toArray();
|
|
49
|
+
// Validate that toArray() returned an array
|
|
50
|
+
if (!Array.isArray(result)) {
|
|
51
|
+
console.warn('BoxPlotClient: toArray() did not return an array', typeof result);
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error('BoxPlotClient: Error calling toArray():', error);
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function numericValue(value) {
|
|
62
|
+
const numeric = Number(value);
|
|
63
|
+
return Number.isFinite(numeric) ? numeric : undefined;
|
|
64
|
+
}
|
|
65
|
+
export function buildBoxPlotQuery(args) {
|
|
66
|
+
const table = quoteTableReference(args.tableName);
|
|
67
|
+
const x = quoteIdentifier(args.x);
|
|
68
|
+
const y = quoteIdentifier(args.y);
|
|
69
|
+
const filters = normalizeFilter(args.filter).join(' AND ');
|
|
70
|
+
const where = [`${y} IS NOT NULL`, filters].filter(Boolean).join(' AND ');
|
|
71
|
+
return `
|
|
72
|
+
WITH base AS (
|
|
73
|
+
SELECT
|
|
74
|
+
${x} AS "category",
|
|
75
|
+
TRY_CAST(${y} AS DOUBLE) AS "value"
|
|
76
|
+
FROM ${table}
|
|
77
|
+
WHERE ${where}
|
|
78
|
+
),
|
|
79
|
+
stats AS (
|
|
80
|
+
SELECT
|
|
81
|
+
"category",
|
|
82
|
+
COUNT(*)::DOUBLE AS "count",
|
|
83
|
+
quantile_cont("value", 0.25) AS "q1",
|
|
84
|
+
quantile_cont("value", 0.5) AS "median",
|
|
85
|
+
quantile_cont("value", 0.75) AS "q3"
|
|
86
|
+
FROM base
|
|
87
|
+
WHERE "value" IS NOT NULL
|
|
88
|
+
GROUP BY "category"
|
|
89
|
+
),
|
|
90
|
+
fences AS (
|
|
91
|
+
SELECT
|
|
92
|
+
*,
|
|
93
|
+
"q1" - 1.5 * ("q3" - "q1") AS "lowerFence",
|
|
94
|
+
"q3" + 1.5 * ("q3" - "q1") AS "upperFence"
|
|
95
|
+
FROM stats
|
|
96
|
+
),
|
|
97
|
+
whiskers AS (
|
|
98
|
+
SELECT
|
|
99
|
+
b."category",
|
|
100
|
+
MIN(b."value") AS "whiskerLow",
|
|
101
|
+
MAX(b."value") AS "whiskerHigh"
|
|
102
|
+
FROM base b
|
|
103
|
+
JOIN fences f ON b."category" IS NOT DISTINCT FROM f."category"
|
|
104
|
+
WHERE b."value" BETWEEN f."lowerFence" AND f."upperFence"
|
|
105
|
+
GROUP BY b."category"
|
|
106
|
+
),
|
|
107
|
+
summary AS (
|
|
108
|
+
SELECT
|
|
109
|
+
'summary' AS "rowKind",
|
|
110
|
+
f."category",
|
|
111
|
+
f."count",
|
|
112
|
+
f."q1",
|
|
113
|
+
f."median",
|
|
114
|
+
f."q3",
|
|
115
|
+
f."lowerFence",
|
|
116
|
+
f."upperFence",
|
|
117
|
+
w."whiskerLow",
|
|
118
|
+
w."whiskerHigh",
|
|
119
|
+
NULL::DOUBLE AS "value"
|
|
120
|
+
FROM fences f
|
|
121
|
+
JOIN whiskers w ON w."category" IS NOT DISTINCT FROM f."category"
|
|
122
|
+
),
|
|
123
|
+
outliers AS (
|
|
124
|
+
SELECT
|
|
125
|
+
'outlier' AS "rowKind",
|
|
126
|
+
b."category",
|
|
127
|
+
NULL::DOUBLE AS "count",
|
|
128
|
+
NULL::DOUBLE AS "q1",
|
|
129
|
+
NULL::DOUBLE AS "median",
|
|
130
|
+
NULL::DOUBLE AS "q3",
|
|
131
|
+
NULL::DOUBLE AS "lowerFence",
|
|
132
|
+
NULL::DOUBLE AS "upperFence",
|
|
133
|
+
NULL::DOUBLE AS "whiskerLow",
|
|
134
|
+
NULL::DOUBLE AS "whiskerHigh",
|
|
135
|
+
b."value"
|
|
136
|
+
FROM base b
|
|
137
|
+
JOIN fences f ON b."category" IS NOT DISTINCT FROM f."category"
|
|
138
|
+
WHERE b."value" < f."lowerFence" OR b."value" > f."upperFence"
|
|
139
|
+
)
|
|
140
|
+
SELECT * FROM summary
|
|
141
|
+
UNION ALL
|
|
142
|
+
SELECT * FROM outliers
|
|
143
|
+
ORDER BY "category", "rowKind", "value"
|
|
144
|
+
`.trim();
|
|
145
|
+
}
|
|
146
|
+
export class BoxPlotClient extends MosaicClient {
|
|
147
|
+
onStateChange;
|
|
148
|
+
tableName;
|
|
149
|
+
x;
|
|
150
|
+
y;
|
|
151
|
+
selection;
|
|
152
|
+
dataPolicy;
|
|
153
|
+
runtimeIssueContext;
|
|
154
|
+
runtimeIssueReporter;
|
|
155
|
+
state = {
|
|
156
|
+
isLoading: true,
|
|
157
|
+
outliers: [],
|
|
158
|
+
summaries: [],
|
|
159
|
+
};
|
|
160
|
+
destroyed = false;
|
|
161
|
+
constructor(options) {
|
|
162
|
+
super(options.selection);
|
|
163
|
+
this.dataPolicy = options.dataPolicy;
|
|
164
|
+
this.onStateChange = options.onStateChange;
|
|
165
|
+
this.runtimeIssueContext = options.runtimeIssueContext;
|
|
166
|
+
this.runtimeIssueReporter = options.runtimeIssueReporter;
|
|
167
|
+
this.tableName = options.tableName;
|
|
168
|
+
this.x = options.x;
|
|
169
|
+
this.y = options.y;
|
|
170
|
+
this.selection = options.selection;
|
|
171
|
+
}
|
|
172
|
+
get filterStable() {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
fields() {
|
|
176
|
+
return [this.x, this.y];
|
|
177
|
+
}
|
|
178
|
+
emitState(next) {
|
|
179
|
+
if (this.destroyed) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this.state = { ...this.state, ...next };
|
|
183
|
+
this.onStateChange(this.state);
|
|
184
|
+
}
|
|
185
|
+
queryPending() {
|
|
186
|
+
this.emitState({ error: undefined, isLoading: true });
|
|
187
|
+
return this;
|
|
188
|
+
}
|
|
189
|
+
query(filter) {
|
|
190
|
+
return buildBoxPlotQuery({
|
|
191
|
+
filter,
|
|
192
|
+
tableName: this.tableName,
|
|
193
|
+
x: this.x,
|
|
194
|
+
y: this.y,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
queryResult(data) {
|
|
198
|
+
try {
|
|
199
|
+
assertChartDataPolicy(this.dataPolicy, data);
|
|
200
|
+
this.runtimeIssueReporter?.clearIssue();
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
const normalizedError = error instanceof Error ? error : new Error(String(error));
|
|
204
|
+
if (this.runtimeIssueContext) {
|
|
205
|
+
this.runtimeIssueReporter?.reportIssue(createChartRuntimeIssueFromError(normalizedError, this.runtimeIssueContext, this.dataPolicy));
|
|
206
|
+
}
|
|
207
|
+
this.emitState({ error: normalizedError, isLoading: false });
|
|
208
|
+
return this;
|
|
209
|
+
}
|
|
210
|
+
const rows = rowsFromQueryResult(data);
|
|
211
|
+
const summaries = [];
|
|
212
|
+
const outliers = [];
|
|
213
|
+
for (const row of rows) {
|
|
214
|
+
if (row.rowKind === 'summary') {
|
|
215
|
+
const count = numericValue(row.count);
|
|
216
|
+
const q1 = numericValue(row.q1);
|
|
217
|
+
const median = numericValue(row.median);
|
|
218
|
+
const q3 = numericValue(row.q3);
|
|
219
|
+
const lowerFence = numericValue(row.lowerFence);
|
|
220
|
+
const upperFence = numericValue(row.upperFence);
|
|
221
|
+
const whiskerLow = numericValue(row.whiskerLow);
|
|
222
|
+
const whiskerHigh = numericValue(row.whiskerHigh);
|
|
223
|
+
if (count === undefined ||
|
|
224
|
+
q1 === undefined ||
|
|
225
|
+
median === undefined ||
|
|
226
|
+
q3 === undefined ||
|
|
227
|
+
lowerFence === undefined ||
|
|
228
|
+
upperFence === undefined ||
|
|
229
|
+
whiskerLow === undefined ||
|
|
230
|
+
whiskerHigh === undefined) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
summaries.push({
|
|
234
|
+
category: row.category,
|
|
235
|
+
count,
|
|
236
|
+
lowerFence,
|
|
237
|
+
median,
|
|
238
|
+
q1,
|
|
239
|
+
q3,
|
|
240
|
+
upperFence,
|
|
241
|
+
whiskerHigh,
|
|
242
|
+
whiskerLow,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
else if (row.rowKind === 'outlier') {
|
|
246
|
+
const value = numericValue(row.value);
|
|
247
|
+
if (value !== undefined) {
|
|
248
|
+
outliers.push({
|
|
249
|
+
category: row.category,
|
|
250
|
+
value,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
this.emitState({
|
|
256
|
+
error: undefined,
|
|
257
|
+
isLoading: false,
|
|
258
|
+
outliers,
|
|
259
|
+
summaries,
|
|
260
|
+
});
|
|
261
|
+
return this;
|
|
262
|
+
}
|
|
263
|
+
queryError(error) {
|
|
264
|
+
if (this.runtimeIssueContext) {
|
|
265
|
+
this.runtimeIssueReporter?.reportIssue(createChartRuntimeIssueFromError(error, this.runtimeIssueContext, this.dataPolicy));
|
|
266
|
+
}
|
|
267
|
+
this.emitState({ error, isLoading: false });
|
|
268
|
+
return this;
|
|
269
|
+
}
|
|
270
|
+
updateYBrush(extent) {
|
|
271
|
+
const normalized = extent
|
|
272
|
+
? [Math.min(...extent), Math.max(...extent)]
|
|
273
|
+
: undefined;
|
|
274
|
+
this.emitState({ yBrush: normalized });
|
|
275
|
+
const clause = clauseInterval(this.y, normalized ?? null, { source: this });
|
|
276
|
+
this.selection.update(clause);
|
|
277
|
+
}
|
|
278
|
+
reset() {
|
|
279
|
+
this.updateYBrush();
|
|
280
|
+
}
|
|
281
|
+
destroy() {
|
|
282
|
+
this.destroyed = true;
|
|
283
|
+
super.destroy();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=BoxPlotClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotClient.js","sourceRoot":"","sources":["../../../../../src/charts/chart-types/box-plot/renderer/BoxPlotClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,cAAc,GAEf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,qBAAqB,EACrB,gCAAgC,GAIjC,MAAM,2BAA2B,CAAC;AA0CnC,SAAS,eAAe,CAAC,UAAkB;IACzC,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CA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AC,SAAS,GAAG,IAAI,CAAC;QACtB,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF","sourcesContent":["import {\n MosaicClient,\n clauseInterval,\n type Selection,\n} from '@uwdata/mosaic-core';\nimport type {ExprNode, FilterExpr} from '@uwdata/mosaic-sql';\nimport {\n assertChartDataPolicy,\n createChartRuntimeIssueFromError,\n type ChartDataPolicy,\n type ChartRuntimeIssueContext,\n type ChartRuntimeIssueReporter,\n} from '../../../../chart-runtime';\n\nexport type BoxPlotSummaryRow = {\n category: unknown;\n count: number;\n lowerFence: number;\n median: number;\n q1: number;\n q3: number;\n upperFence: number;\n whiskerHigh: number;\n whiskerLow: number;\n};\n\nexport type BoxPlotOutlierRow = {\n category: unknown;\n value: number;\n};\n\nexport type BoxPlotState = {\n error?: Error;\n isLoading: boolean;\n outliers: BoxPlotOutlierRow[];\n summaries: BoxPlotSummaryRow[];\n yBrush?: [number, number];\n};\n\nexport type BoxPlotClientOptions = {\n dataPolicy?: ChartDataPolicy | null;\n onStateChange: (state: BoxPlotState) => void;\n runtimeIssueContext?: ChartRuntimeIssueContext;\n runtimeIssueReporter?: ChartRuntimeIssueReporter;\n selection: Selection;\n tableName: string;\n x: string;\n y: string;\n};\n\ntype BoxPlotQueryRow = Partial<BoxPlotSummaryRow & BoxPlotOutlierRow> & {\n rowKind?: 'summary' | 'outlier';\n};\n\nfunction quoteIdentifier(identifier: string): string {\n return `\"${identifier.replace(/\"/g, '\"\"')}\"`;\n}\n\nfunction quoteTableReference(tableName: string): string {\n return tableName.split('.').map(quoteIdentifier).join('.');\n}\n\nfunction normalizeFilter(filter?: FilterExpr | null): string[] {\n if (!filter) {\n return [];\n }\n const filters = Array.isArray(filter) ? filter.flat(Infinity) : [filter];\n return filters\n .map((expr) => {\n if (typeof expr === 'boolean') {\n return expr ? null : 'FALSE';\n }\n return `(${(expr as string | ExprNode).toString()})`;\n })\n .filter((expr): expr is string => Boolean(expr));\n}\n\n/**\n * Type guard to check if data has a toArray method.\n */\nfunction hasToArrayMethod(data: unknown): data is {toArray: () => unknown} {\n return (\n data !== null &&\n data !== undefined &&\n typeof data === 'object' &&\n 'toArray' in data &&\n typeof (data as Record<string, unknown>).toArray === 'function'\n );\n}\n\n/**\n * Safely extract rows from query result data.\n * Handles both direct arrays and objects with toArray() method.\n * Returns empty array if data is invalid or doesn't have expected structure.\n */\nfunction rowsFromQueryResult<T>(data: unknown): T[] {\n // Handle direct arrays\n if (Array.isArray(data)) {\n return data as T[];\n }\n\n // Handle objects with toArray() method (Arrow Tables, Mosaic results, etc.)\n if (!hasToArrayMethod(data)) {\n return [];\n }\n\n try {\n const result = data.toArray();\n\n // Validate that toArray() returned an array\n if (!Array.isArray(result)) {\n console.warn(\n 'BoxPlotClient: toArray() did not return an array',\n typeof result,\n );\n return [];\n }\n\n return result as T[];\n } catch (error) {\n console.error('BoxPlotClient: Error calling toArray():', error);\n return [];\n }\n}\n\nfunction numericValue(value: unknown): number | undefined {\n const numeric = Number(value);\n return Number.isFinite(numeric) ? numeric : undefined;\n}\n\ntype BuildBoxPlotQueryArgs = {\n filter?: FilterExpr | null;\n tableName: string;\n x: string;\n y: string;\n};\n\nexport function buildBoxPlotQuery(args: BuildBoxPlotQueryArgs): string {\n const table = quoteTableReference(args.tableName);\n const x = quoteIdentifier(args.x);\n const y = quoteIdentifier(args.y);\n const filters = normalizeFilter(args.filter).join(' AND ');\n const where = [`${y} IS NOT NULL`, filters].filter(Boolean).join(' AND ');\n\n return `\nWITH base AS (\n SELECT\n ${x} AS \"category\",\n TRY_CAST(${y} AS DOUBLE) AS \"value\"\n FROM ${table}\n WHERE ${where}\n),\nstats AS (\n SELECT\n \"category\",\n COUNT(*)::DOUBLE AS \"count\",\n quantile_cont(\"value\", 0.25) AS \"q1\",\n quantile_cont(\"value\", 0.5) AS \"median\",\n quantile_cont(\"value\", 0.75) AS \"q3\"\n FROM base\n WHERE \"value\" IS NOT NULL\n GROUP BY \"category\"\n),\nfences AS (\n SELECT\n *,\n \"q1\" - 1.5 * (\"q3\" - \"q1\") AS \"lowerFence\",\n \"q3\" + 1.5 * (\"q3\" - \"q1\") AS \"upperFence\"\n FROM stats\n),\nwhiskers AS (\n SELECT\n b.\"category\",\n MIN(b.\"value\") AS \"whiskerLow\",\n MAX(b.\"value\") AS \"whiskerHigh\"\n FROM base b\n JOIN fences f ON b.\"category\" IS NOT DISTINCT FROM f.\"category\"\n WHERE b.\"value\" BETWEEN f.\"lowerFence\" AND f.\"upperFence\"\n GROUP BY b.\"category\"\n),\nsummary AS (\n SELECT\n 'summary' AS \"rowKind\",\n f.\"category\",\n f.\"count\",\n f.\"q1\",\n f.\"median\",\n f.\"q3\",\n f.\"lowerFence\",\n f.\"upperFence\",\n w.\"whiskerLow\",\n w.\"whiskerHigh\",\n NULL::DOUBLE AS \"value\"\n FROM fences f\n JOIN whiskers w ON w.\"category\" IS NOT DISTINCT FROM f.\"category\"\n),\noutliers AS (\n SELECT\n 'outlier' AS \"rowKind\",\n b.\"category\",\n NULL::DOUBLE AS \"count\",\n NULL::DOUBLE AS \"q1\",\n NULL::DOUBLE AS \"median\",\n NULL::DOUBLE AS \"q3\",\n NULL::DOUBLE AS \"lowerFence\",\n NULL::DOUBLE AS \"upperFence\",\n NULL::DOUBLE AS \"whiskerLow\",\n NULL::DOUBLE AS \"whiskerHigh\",\n b.\"value\"\n FROM base b\n JOIN fences f ON b.\"category\" IS NOT DISTINCT FROM f.\"category\"\n WHERE b.\"value\" < f.\"lowerFence\" OR b.\"value\" > f.\"upperFence\"\n)\nSELECT * FROM summary\nUNION ALL\nSELECT * FROM outliers\nORDER BY \"category\", \"rowKind\", \"value\"\n`.trim();\n}\n\nexport class BoxPlotClient extends MosaicClient {\n private readonly onStateChange: (state: BoxPlotState) => void;\n private readonly tableName: string;\n private readonly x: string;\n private readonly y: string;\n private readonly selection: Selection;\n private readonly dataPolicy?: ChartDataPolicy | null;\n private readonly runtimeIssueContext?: ChartRuntimeIssueContext;\n private readonly runtimeIssueReporter?: ChartRuntimeIssueReporter;\n private state: BoxPlotState = {\n isLoading: true,\n outliers: [],\n summaries: [],\n };\n private destroyed = false;\n\n constructor(options: BoxPlotClientOptions) {\n super(options.selection);\n this.dataPolicy = options.dataPolicy;\n this.onStateChange = options.onStateChange;\n this.runtimeIssueContext = options.runtimeIssueContext;\n this.runtimeIssueReporter = options.runtimeIssueReporter;\n this.tableName = options.tableName;\n this.x = options.x;\n this.y = options.y;\n this.selection = options.selection;\n }\n\n override get filterStable(): boolean {\n return false;\n }\n\n fields(): string[] {\n return [this.x, this.y];\n }\n\n private emitState(next: Partial<BoxPlotState>) {\n if (this.destroyed) {\n return;\n }\n this.state = {...this.state, ...next};\n this.onStateChange(this.state);\n }\n\n override queryPending(): this {\n this.emitState({error: undefined, isLoading: true});\n return this;\n }\n\n override query(filter?: FilterExpr | null): string {\n return buildBoxPlotQuery({\n filter,\n tableName: this.tableName,\n x: this.x,\n y: this.y,\n });\n }\n\n override queryResult(data: unknown): this {\n try {\n assertChartDataPolicy(this.dataPolicy, data);\n this.runtimeIssueReporter?.clearIssue();\n } catch (error) {\n const normalizedError =\n error instanceof Error ? error : new Error(String(error));\n if (this.runtimeIssueContext) {\n this.runtimeIssueReporter?.reportIssue(\n createChartRuntimeIssueFromError(\n normalizedError,\n this.runtimeIssueContext,\n this.dataPolicy,\n ),\n );\n }\n this.emitState({error: normalizedError, isLoading: false});\n return this;\n }\n\n const rows = rowsFromQueryResult<BoxPlotQueryRow>(data);\n const summaries: BoxPlotSummaryRow[] = [];\n const outliers: BoxPlotOutlierRow[] = [];\n\n for (const row of rows) {\n if (row.rowKind === 'summary') {\n const count = numericValue(row.count);\n const q1 = numericValue(row.q1);\n const median = numericValue(row.median);\n const q3 = numericValue(row.q3);\n const lowerFence = numericValue(row.lowerFence);\n const upperFence = numericValue(row.upperFence);\n const whiskerLow = numericValue(row.whiskerLow);\n const whiskerHigh = numericValue(row.whiskerHigh);\n if (\n count === undefined ||\n q1 === undefined ||\n median === undefined ||\n q3 === undefined ||\n lowerFence === undefined ||\n upperFence === undefined ||\n whiskerLow === undefined ||\n whiskerHigh === undefined\n ) {\n continue;\n }\n summaries.push({\n category: row.category,\n count,\n lowerFence,\n median,\n q1,\n q3,\n upperFence,\n whiskerHigh,\n whiskerLow,\n });\n } else if (row.rowKind === 'outlier') {\n const value = numericValue(row.value);\n if (value !== undefined) {\n outliers.push({\n category: row.category,\n value,\n });\n }\n }\n }\n\n this.emitState({\n error: undefined,\n isLoading: false,\n outliers,\n summaries,\n });\n return this;\n }\n\n override queryError(error: Error): this {\n if (this.runtimeIssueContext) {\n this.runtimeIssueReporter?.reportIssue(\n createChartRuntimeIssueFromError(\n error,\n this.runtimeIssueContext,\n this.dataPolicy,\n ),\n );\n }\n this.emitState({error, isLoading: false});\n return this;\n }\n\n updateYBrush(extent?: [number, number]) {\n const normalized = extent\n ? ([Math.min(...extent), Math.max(...extent)] as [number, number])\n : undefined;\n this.emitState({yBrush: normalized});\n const clause = clauseInterval(this.y, normalized ?? null, {source: this});\n this.selection.update(clause);\n }\n\n reset() {\n this.updateYBrush();\n }\n\n override destroy() {\n this.destroyed = true;\n super.destroy();\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../../src/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC,UAAU,yBAAyB;IACjC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,SAAS,CACjD,iBAAiB,EACjB,yBAAyB,CAC1B;gBACa,KAAK,EAAE,iBAAiB;IAKpC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,yBAAyB;IAK/D,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI;IAK3D,MAAM;CAchB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotErrorBoundary.js","sourceRoot":"","sources":["../../../../../src/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAMhC;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,SAGzC;IACC,YAAY,KAAwB;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAY;QAC1C,4DAA4D;QAC5D,OAAO,EAAC,KAAK,EAAC,CAAC;IACjB,CAAC;IAEQ,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QAC3D,kCAAkC;QAClC,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC/D,CAAC;IAEQ,MAAM;QACb,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,CACL,eAAK,SAAS,EAAC,+EAA+E,aAC5F,cAAK,SAAS,EAAC,aAAa,0CAAgC,EAC5D,cAAK,SAAS,EAAC,yBAAyB,YACrC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,GACrB,IACF,CACP,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,CAAC;CACF","sourcesContent":["import type {ErrorInfo, PropsWithChildren} from 'react';\nimport {Component} from 'react';\n\ninterface BoxPlotErrorBoundaryState {\n error: Error | null;\n}\n\n/**\n * Error boundary for box plot rendering to prevent crashes from propagating\n * to the entire dashboard. Catches errors during rendering, in lifecycle methods,\n * and in constructors of the component tree below it.\n */\nexport class BoxPlotErrorBoundary extends Component<\n PropsWithChildren,\n BoxPlotErrorBoundaryState\n> {\n constructor(props: PropsWithChildren) {\n super(props);\n this.state = {error: null};\n }\n\n static getDerivedStateFromError(error: Error): BoxPlotErrorBoundaryState {\n // Update state so the next render will show the fallback UI\n return {error};\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n // Log error details for debugging\n console.error('Box plot rendering error:', error, errorInfo);\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div className=\"text-destructive flex h-full flex-col items-center justify-center p-4 text-sm\">\n <div className=\"font-medium\">Failed to render box plot</div>\n <div className=\"mt-2 text-xs opacity-75\">\n {this.state.error.message}\n </div>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoxPlotPanelRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,EAAE,EAAoC,MAAM,OAAO,CAAC;AAIjE,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAQzD,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,WAAW,CAAC;AAKlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,EAAE,CACnC,kBAAkB,CAAC,kBAAkB,CAAC,CA2MvC,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { SpinnerPane } from '@sqlrooms/ui';
|
|
4
|
+
import { ResponsivePlot } from '../../../../ResponsivePlot';
|
|
5
|
+
import { DRAG_CLICK_THRESHOLD, MARGINS, } from './constants';
|
|
6
|
+
import { createBoxPlotElement } from './plot';
|
|
7
|
+
import { useBoxPlotClient } from './useBoxPlotClient';
|
|
8
|
+
import { formatCategory, getYDomain, yPixelToValue } from './utils';
|
|
9
|
+
import { BoxPlotErrorBoundary } from './BoxPlotErrorBoundary';
|
|
10
|
+
/**
|
|
11
|
+
* Custom renderer for box-plot chart type.
|
|
12
|
+
* Uses BoxPlotClient for SQL-based quartile calculations and custom Observable Plot rendering.
|
|
13
|
+
*/
|
|
14
|
+
export const BoxPlotPanelRenderer = ({ tableName, config, coordinator, params, dataPolicy, runtimeIssueContext, runtimeIssueReporter, }) => {
|
|
15
|
+
const configX = config.settings.x;
|
|
16
|
+
const configY = config.settings.y;
|
|
17
|
+
const boxPlotConfig = useMemo(() => typeof configX === 'string' && typeof configY === 'string'
|
|
18
|
+
? { x: configX, y: configY }
|
|
19
|
+
: null, [configX, configY]);
|
|
20
|
+
const [size, setSize] = useState(null);
|
|
21
|
+
const [drag, setDrag] = useState(null);
|
|
22
|
+
const plotRef = useRef(null);
|
|
23
|
+
const { clientRef, state } = useBoxPlotClient({
|
|
24
|
+
config: boxPlotConfig,
|
|
25
|
+
coordinator,
|
|
26
|
+
dataPolicy,
|
|
27
|
+
params,
|
|
28
|
+
runtimeIssueContext,
|
|
29
|
+
runtimeIssueReporter,
|
|
30
|
+
tableName,
|
|
31
|
+
});
|
|
32
|
+
const summaries = useMemo(() => state.summaries.map((row) => ({
|
|
33
|
+
...row,
|
|
34
|
+
categoryLabel: formatCategory(row.category),
|
|
35
|
+
})), [state.summaries]);
|
|
36
|
+
const outliers = useMemo(() => state.outliers.map((row) => ({
|
|
37
|
+
...row,
|
|
38
|
+
categoryLabel: formatCategory(row.category),
|
|
39
|
+
})), [state.outliers]);
|
|
40
|
+
const yDomain = useMemo(() => getYDomain(state.summaries, state.outliers), [state.outliers, state.summaries]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const container = plotRef.current;
|
|
43
|
+
if (!container || !size || !boxPlotConfig) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (!summaries.length) {
|
|
47
|
+
container.replaceChildren();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const plot = createBoxPlotElement({
|
|
51
|
+
config: boxPlotConfig,
|
|
52
|
+
domain: yDomain,
|
|
53
|
+
outliers,
|
|
54
|
+
size,
|
|
55
|
+
summaries,
|
|
56
|
+
});
|
|
57
|
+
container.replaceChildren(plot);
|
|
58
|
+
}, [boxPlotConfig, outliers, size, summaries, yDomain]);
|
|
59
|
+
const getLocalY = useCallback((event) => {
|
|
60
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
61
|
+
return event.clientY - rect.top;
|
|
62
|
+
}, []);
|
|
63
|
+
const handlePointerDown = useCallback((event) => {
|
|
64
|
+
if (!size || !summaries.length)
|
|
65
|
+
return;
|
|
66
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
67
|
+
const y = getLocalY(event);
|
|
68
|
+
setDrag({ currentY: y, startY: y });
|
|
69
|
+
}, [getLocalY, size, summaries.length]);
|
|
70
|
+
const handlePointerMove = useCallback((event) => {
|
|
71
|
+
if (!drag)
|
|
72
|
+
return;
|
|
73
|
+
setDrag({ ...drag, currentY: getLocalY(event) });
|
|
74
|
+
}, [drag, getLocalY]);
|
|
75
|
+
const finishDrag = useCallback((event) => {
|
|
76
|
+
if (!drag || !size)
|
|
77
|
+
return;
|
|
78
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
79
|
+
const currentY = getLocalY(event);
|
|
80
|
+
const pixelDistance = Math.abs(currentY - drag.startY);
|
|
81
|
+
setDrag(null);
|
|
82
|
+
if (pixelDistance < DRAG_CLICK_THRESHOLD) {
|
|
83
|
+
clientRef.current?.updateYBrush();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
clientRef.current?.updateYBrush([
|
|
87
|
+
yPixelToValue(drag.startY, size, yDomain),
|
|
88
|
+
yPixelToValue(currentY, size, yDomain),
|
|
89
|
+
]);
|
|
90
|
+
}, [clientRef, drag, getLocalY, size, yDomain]);
|
|
91
|
+
const brushStyle = useMemo(() => {
|
|
92
|
+
const extent = drag
|
|
93
|
+
? [drag.startY, drag.currentY]
|
|
94
|
+
: state.yBrush && size
|
|
95
|
+
? state.yBrush.map((value) => {
|
|
96
|
+
const plotHeight = Math.max(1, size.height - MARGINS.top - MARGINS.bottom);
|
|
97
|
+
const span = yDomain[1] - yDomain[0] || 1;
|
|
98
|
+
const pixelPos = MARGINS.top + ((yDomain[1] - value) / span) * plotHeight;
|
|
99
|
+
return Math.max(MARGINS.top, Math.min(MARGINS.top + plotHeight, pixelPos));
|
|
100
|
+
})
|
|
101
|
+
: null;
|
|
102
|
+
if (!extent)
|
|
103
|
+
return undefined;
|
|
104
|
+
const top = Math.max(MARGINS.top, Math.min(...extent));
|
|
105
|
+
const bottom = Math.min(size?.height ? size.height - MARGINS.bottom : Number.POSITIVE_INFINITY, Math.max(...extent));
|
|
106
|
+
return {
|
|
107
|
+
height: `${Math.max(0, bottom - top)}px`,
|
|
108
|
+
left: `${MARGINS.left}px`,
|
|
109
|
+
right: `${MARGINS.right}px`,
|
|
110
|
+
top: `${top}px`,
|
|
111
|
+
};
|
|
112
|
+
}, [drag, size, state.yBrush, yDomain]);
|
|
113
|
+
if (!config.settings.x || !config.settings.y) {
|
|
114
|
+
return (_jsxs("div", { className: "flex h-full flex-col items-center justify-center", children: [_jsx("div", { className: "text-center font-medium", children: "Configure chart to display visualization" }), _jsx("div", { className: "text-center text-xs", children: "X and Y fields are required for box plot" })] }));
|
|
115
|
+
}
|
|
116
|
+
return (_jsx(BoxPlotErrorBoundary, { children: _jsx("div", { className: "h-full min-h-0 overflow-auto p-2", children: _jsx("div", { className: "bg-background text-foreground relative flex h-full min-h-[220px] w-full items-center justify-center rounded-md p-2", children: state.error ? (_jsx("div", { className: "text-destructive flex h-full items-center justify-center p-4 text-sm", children: state.error.message })) : state.isLoading && !state.summaries.length ? (_jsx(SpinnerPane, { className: "h-full w-full" })) : !state.summaries.length ? (_jsx("div", { className: "text-muted-foreground flex h-full items-center justify-center text-sm", children: "No numeric values for this box plot" })) : (_jsxs(ResponsivePlot, { onResize: setSize, className: "relative h-full min-h-[220px] w-full", children: [_jsx("div", { ref: plotRef, className: "absolute inset-0" }), brushStyle ? (_jsx("div", { className: "bg-primary/15 border-primary/60 pointer-events-none absolute border", style: brushStyle })) : null, _jsx("div", { className: "absolute inset-0 cursor-crosshair touch-none", onPointerCancel: finishDrag, onPointerDown: handlePointerDown, onPointerMove: handlePointerMove, onPointerUp: finishDrag })] })) }) }) }));
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=BoxPlotPanelRenderer.js.map
|