@sqlrooms/mosaic 0.29.0-rc.2 → 0.29.0-rc.4
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 +209 -0
- package/dist/MosaicChartBuilder.d.ts +44 -13
- package/dist/MosaicChartBuilder.d.ts.map +1 -1
- package/dist/MosaicChartBuilder.js +22 -30
- package/dist/MosaicChartBuilder.js.map +1 -1
- package/dist/MosaicSlice.d.ts +28 -10
- package/dist/MosaicSlice.d.ts.map +1 -1
- package/dist/MosaicSlice.js +77 -11
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/ResponsivePlot.d.ts +23 -0
- package/dist/ResponsivePlot.d.ts.map +1 -0
- package/dist/ResponsivePlot.js +43 -0
- package/dist/ResponsivePlot.js.map +1 -0
- package/dist/VgPlotChart.d.ts +18 -2
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +112 -26
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/boxplot/BoxPlotClient.d.ts +58 -0
- package/dist/boxplot/BoxPlotClient.d.ts.map +1 -0
- package/dist/boxplot/BoxPlotClient.js +264 -0
- package/dist/boxplot/BoxPlotClient.js.map +1 -0
- package/dist/chart/MosaicDashboardChart.d.ts +14 -0
- package/dist/chart/MosaicDashboardChart.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardChart.js +21 -0
- package/dist/chart/MosaicDashboardChart.js.map +1 -0
- package/dist/chart/MosaicDashboardChartContent.d.ts +16 -0
- package/dist/chart/MosaicDashboardChartContent.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardChartContent.js +18 -0
- package/dist/chart/MosaicDashboardChartContent.js.map +1 -0
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +4 -0
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardChartHeaderActions.js +16 -0
- package/dist/chart/MosaicDashboardChartHeaderActions.js.map +1 -0
- package/dist/chart/MosaicDashboardChartRenderer.d.ts +3 -0
- package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardChartRenderer.js +31 -0
- package/dist/chart/MosaicDashboardChartRenderer.js.map +1 -0
- package/dist/chart/MosaicDashboardComponentChart.d.ts +14 -0
- package/dist/chart/MosaicDashboardComponentChart.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardComponentChart.js +11 -0
- package/dist/chart/MosaicDashboardComponentChart.js.map +1 -0
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts +10 -0
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardVgPlotChart.js +10 -0
- package/dist/chart/MosaicDashboardVgPlotChart.js.map +1 -0
- package/dist/chart/MosaicDashboardVgPlotError.d.ts +8 -0
- package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +1 -0
- package/dist/chart/MosaicDashboardVgPlotError.js +11 -0
- package/dist/chart/MosaicDashboardVgPlotError.js.map +1 -0
- package/dist/chart/chart-settings/ChartSettings.d.ts +44 -0
- package/dist/chart/chart-settings/ChartSettings.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartSettings.js +71 -0
- package/dist/chart/chart-settings/ChartSettings.js.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts +13 -0
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsContent.js +18 -0
- package/dist/chart/chart-settings/ChartSettingsContent.js.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts +27 -0
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsContext.js +35 -0
- package/dist/chart/chart-settings/ChartSettingsContext.js.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +14 -0
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartSettingsPanel.js +17 -0
- package/dist/chart/chart-settings/ChartSettingsPanel.js.map +1 -0
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +9 -0
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js +11 -0
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +1 -0
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts +9 -0
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +1 -0
- package/dist/chart/chart-settings/ChartTypeSelector.js +16 -0
- package/dist/chart/chart-settings/ChartTypeSelector.js.map +1 -0
- package/dist/chart/chart-settings/useTableColumns.d.ts +3 -0
- package/dist/chart/chart-settings/useTableColumns.d.ts.map +1 -0
- package/dist/chart/chart-settings/useTableColumns.js +12 -0
- package/dist/chart/chart-settings/useTableColumns.js.map +1 -0
- package/dist/chart/useBrushSelectionParams.d.ts +3 -0
- package/dist/chart/useBrushSelectionParams.d.ts.map +1 -0
- package/dist/chart/useBrushSelectionParams.js +16 -0
- package/dist/chart/useBrushSelectionParams.js.map +1 -0
- package/dist/chart/useChartRetainer.d.ts +3 -0
- package/dist/chart/useChartRetainer.d.ts.map +1 -0
- package/dist/chart/useChartRetainer.js +11 -0
- package/dist/chart/useChartRetainer.js.map +1 -0
- package/dist/chart/useGenerateSpec.d.ts +13 -0
- package/dist/chart/useGenerateSpec.d.ts.map +1 -0
- package/dist/chart/useGenerateSpec.js +32 -0
- package/dist/chart/useGenerateSpec.js.map +1 -0
- package/dist/chart-builders/AggregationSelector.d.ts +11 -0
- package/dist/chart-builders/AggregationSelector.d.ts.map +1 -0
- package/dist/chart-builders/AggregationSelector.js +9 -0
- package/dist/chart-builders/AggregationSelector.js.map +1 -0
- package/dist/chart-builders/ChartBuilderActions.d.ts +6 -0
- package/dist/chart-builders/ChartBuilderActions.d.ts.map +1 -0
- package/dist/chart-builders/ChartBuilderActions.js +36 -0
- package/dist/chart-builders/ChartBuilderActions.js.map +1 -0
- package/dist/chart-builders/ChartBuilderContent.d.ts +12 -12
- package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.js +21 -52
- package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.d.ts +8 -4
- package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.js +5 -0
- package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.d.ts +30 -8
- package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.js +25 -10
- package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
- package/dist/chart-builders/ChartBuilderFields.d.ts +6 -0
- package/dist/chart-builders/ChartBuilderFields.d.ts.map +1 -0
- package/dist/chart-builders/ChartBuilderFields.js +39 -0
- package/dist/chart-builders/ChartBuilderFields.js.map +1 -0
- package/dist/chart-builders/ChartBuilderRoot.d.ts +25 -0
- package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -0
- package/dist/chart-builders/ChartBuilderRoot.js +42 -0
- package/dist/chart-builders/ChartBuilderRoot.js.map +1 -0
- package/dist/chart-builders/ChartBuilderTypeGrid.d.ts +7 -0
- package/dist/chart-builders/ChartBuilderTypeGrid.d.ts.map +1 -0
- package/dist/chart-builders/ChartBuilderTypeGrid.js +23 -0
- package/dist/chart-builders/ChartBuilderTypeGrid.js.map +1 -0
- package/dist/chart-builders/ColumnSelector.d.ts +15 -0
- package/dist/chart-builders/ColumnSelector.d.ts.map +1 -0
- package/dist/chart-builders/ColumnSelector.js +31 -0
- package/dist/chart-builders/ColumnSelector.js.map +1 -0
- package/dist/chart-builders/Field.d.ts +11 -0
- package/dist/chart-builders/Field.d.ts.map +1 -0
- package/dist/chart-builders/Field.js +9 -0
- package/dist/chart-builders/Field.js.map +1 -0
- package/dist/chart-builders/FieldSelectorInput.d.ts +2 -1
- package/dist/chart-builders/FieldSelectorInput.d.ts.map +1 -1
- package/dist/chart-builders/FieldSelectorInput.js +5 -5
- package/dist/chart-builders/FieldSelectorInput.js.map +1 -1
- package/dist/chart-builders/MultiFieldSelector.d.ts +14 -0
- package/dist/chart-builders/MultiFieldSelector.d.ts.map +1 -0
- package/dist/chart-builders/MultiFieldSelector.js +53 -0
- package/dist/chart-builders/MultiFieldSelector.js.map +1 -0
- package/dist/chart-builders/TemporalGranularitySelector.d.ts +10 -0
- package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +1 -0
- package/dist/chart-builders/TemporalGranularitySelector.js +37 -0
- package/dist/chart-builders/TemporalGranularitySelector.js.map +1 -0
- package/dist/chart-builders/chartSpecTitle.d.ts +3 -4
- package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
- package/dist/chart-builders/chartSpecTitle.js +3 -5
- package/dist/chart-builders/chartSpecTitle.js.map +1 -1
- package/dist/chart-builders/chartTypeUtils.d.ts +13 -0
- package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -0
- package/dist/chart-builders/chartTypeUtils.js +47 -0
- package/dist/chart-builders/chartTypeUtils.js.map +1 -0
- package/dist/chart-builders/constants.d.ts +12 -0
- package/dist/chart-builders/constants.d.ts.map +1 -0
- package/dist/chart-builders/constants.js +47 -0
- package/dist/chart-builders/constants.js.map +1 -0
- package/dist/chart-builders/createChartBuilderStore.d.ts +11 -0
- package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -0
- package/dist/chart-builders/createChartBuilderStore.js +26 -0
- package/dist/chart-builders/createChartBuilderStore.js.map +1 -0
- package/dist/chart-types/base-types.d.ts +148 -0
- package/dist/chart-types/base-types.d.ts.map +1 -0
- package/dist/chart-types/base-types.js +11 -0
- package/dist/chart-types/base-types.js.map +1 -0
- package/dist/chart-types/box-plot/BoxPlotSettings.d.ts +3 -0
- package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
- package/dist/chart-types/box-plot/BoxPlotSettings.js +9 -0
- package/dist/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
- package/dist/chart-types/box-plot/definition.d.ts +4 -0
- package/dist/chart-types/box-plot/definition.d.ts.map +1 -0
- package/dist/chart-types/box-plot/definition.js +19 -0
- package/dist/chart-types/box-plot/definition.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts +18 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js +28 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts +9 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +115 -0
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/constants.d.ts +24 -0
- package/dist/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/constants.js +17 -0
- package/dist/chart-types/box-plot/renderer/constants.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/plot.d.ts +14 -0
- package/dist/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/plot.js +91 -0
- package/dist/chart-types/box-plot/renderer/plot.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +14 -0
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +45 -0
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
- package/dist/chart-types/box-plot/renderer/utils.d.ts +6 -0
- package/dist/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
- package/dist/chart-types/box-plot/renderer/utils.js +34 -0
- package/dist/chart-types/box-plot/renderer/utils.js.map +1 -0
- package/dist/chart-types/box-plot/schema.d.ts +16 -0
- package/dist/chart-types/box-plot/schema.d.ts.map +1 -0
- package/dist/chart-types/box-plot/schema.js +11 -0
- package/dist/chart-types/box-plot/schema.js.map +1 -0
- package/dist/chart-types/box-plot/tool.d.ts +44 -0
- package/dist/chart-types/box-plot/tool.d.ts.map +1 -0
- package/dist/chart-types/box-plot/tool.js +59 -0
- package/dist/chart-types/box-plot/tool.js.map +1 -0
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts +3 -0
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +1 -0
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js +9 -0
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +1 -0
- package/dist/chart-types/bubble-chart/definition.d.ts +4 -0
- package/dist/chart-types/bubble-chart/definition.d.ts.map +1 -0
- package/dist/chart-types/bubble-chart/definition.js +19 -0
- package/dist/chart-types/bubble-chart/definition.js.map +1 -0
- package/dist/chart-types/bubble-chart/schema.d.ts +18 -0
- package/dist/chart-types/bubble-chart/schema.d.ts.map +1 -0
- package/dist/chart-types/bubble-chart/schema.js +15 -0
- package/dist/chart-types/bubble-chart/schema.js.map +1 -0
- package/dist/chart-types/bubble-chart/spec.d.ts +4 -0
- package/dist/chart-types/bubble-chart/spec.d.ts.map +1 -0
- package/dist/chart-types/bubble-chart/spec.js +31 -0
- package/dist/chart-types/bubble-chart/spec.js.map +1 -0
- package/dist/chart-types/bubble-chart/tool.d.ts +46 -0
- package/dist/chart-types/bubble-chart/tool.d.ts.map +1 -0
- package/dist/chart-types/bubble-chart/tool.js +58 -0
- package/dist/chart-types/bubble-chart/tool.js.map +1 -0
- package/dist/chart-types/chart-config.d.ts +92 -0
- package/dist/chart-types/chart-config.d.ts.map +1 -0
- package/dist/chart-types/chart-config.js +47 -0
- package/dist/chart-types/chart-config.js.map +1 -0
- package/dist/chart-types/count-plot/CountPlotSettings.d.ts +3 -0
- package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
- package/dist/chart-types/count-plot/CountPlotSettings.js +9 -0
- package/dist/chart-types/count-plot/CountPlotSettings.js.map +1 -0
- package/dist/chart-types/count-plot/definition.d.ts +4 -0
- package/dist/chart-types/count-plot/definition.d.ts.map +1 -0
- package/dist/chart-types/count-plot/definition.js +19 -0
- package/dist/chart-types/count-plot/definition.js.map +1 -0
- package/dist/chart-types/count-plot/schema.d.ts +14 -0
- package/dist/chart-types/count-plot/schema.d.ts.map +1 -0
- package/dist/chart-types/count-plot/schema.js +13 -0
- package/dist/chart-types/count-plot/schema.js.map +1 -0
- package/dist/chart-types/count-plot/spec.d.ts +4 -0
- package/dist/chart-types/count-plot/spec.d.ts.map +1 -0
- package/dist/chart-types/count-plot/spec.js +49 -0
- package/dist/chart-types/count-plot/spec.js.map +1 -0
- package/dist/chart-types/count-plot/tool.d.ts +42 -0
- package/dist/chart-types/count-plot/tool.d.ts.map +1 -0
- package/dist/chart-types/count-plot/tool.js +55 -0
- package/dist/chart-types/count-plot/tool.js.map +1 -0
- package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts +7 -0
- package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
- package/dist/chart-types/custom-spec/CustomSpecSettings.js +30 -0
- package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
- package/dist/chart-types/custom-spec/definition.d.ts +4 -0
- package/dist/chart-types/custom-spec/definition.d.ts.map +1 -0
- package/dist/chart-types/custom-spec/definition.js +17 -0
- package/dist/chart-types/custom-spec/definition.js.map +1 -0
- package/dist/chart-types/custom-spec/schema.d.ts +14 -0
- package/dist/chart-types/custom-spec/schema.d.ts.map +1 -0
- package/dist/chart-types/custom-spec/schema.js +10 -0
- package/dist/chart-types/custom-spec/schema.js.map +1 -0
- package/dist/chart-types/custom-spec/spec.d.ts +4 -0
- package/dist/chart-types/custom-spec/spec.d.ts.map +1 -0
- package/dist/chart-types/custom-spec/spec.js +24 -0
- package/dist/chart-types/custom-spec/spec.js.map +1 -0
- package/dist/chart-types/errors.d.ts +23 -0
- package/dist/chart-types/errors.d.ts.map +1 -0
- package/dist/chart-types/errors.js +26 -0
- package/dist/chart-types/errors.js.map +1 -0
- package/dist/chart-types/heatmap/HeatmapSettings.d.ts +3 -0
- package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
- package/dist/chart-types/heatmap/HeatmapSettings.js +9 -0
- package/dist/chart-types/heatmap/HeatmapSettings.js.map +1 -0
- package/dist/chart-types/heatmap/definition.d.ts +4 -0
- package/dist/chart-types/heatmap/definition.d.ts.map +1 -0
- package/dist/chart-types/heatmap/definition.js +19 -0
- package/dist/chart-types/heatmap/definition.js.map +1 -0
- package/dist/chart-types/heatmap/schema.d.ts +16 -0
- package/dist/chart-types/heatmap/schema.d.ts.map +1 -0
- package/dist/chart-types/heatmap/schema.js +11 -0
- package/dist/chart-types/heatmap/schema.js.map +1 -0
- package/dist/chart-types/heatmap/spec.d.ts +4 -0
- package/dist/chart-types/heatmap/spec.d.ts.map +1 -0
- package/dist/chart-types/heatmap/spec.js +32 -0
- package/dist/chart-types/heatmap/spec.js.map +1 -0
- package/dist/chart-types/heatmap/tool.d.ts +44 -0
- package/dist/chart-types/heatmap/tool.d.ts.map +1 -0
- package/dist/chart-types/heatmap/tool.js +59 -0
- package/dist/chart-types/heatmap/tool.js.map +1 -0
- package/dist/chart-types/histogram/HistogramSettings.d.ts +3 -0
- package/dist/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
- package/dist/chart-types/histogram/HistogramSettings.js +9 -0
- package/dist/chart-types/histogram/HistogramSettings.js.map +1 -0
- package/dist/chart-types/histogram/definition.d.ts +4 -0
- package/dist/chart-types/histogram/definition.d.ts.map +1 -0
- package/dist/chart-types/histogram/definition.js +19 -0
- package/dist/chart-types/histogram/definition.js.map +1 -0
- package/dist/chart-types/histogram/schema.d.ts +14 -0
- package/dist/chart-types/histogram/schema.d.ts.map +1 -0
- package/dist/chart-types/histogram/schema.js +13 -0
- package/dist/chart-types/histogram/schema.js.map +1 -0
- package/dist/chart-types/histogram/spec.d.ts +4 -0
- package/dist/chart-types/histogram/spec.d.ts.map +1 -0
- package/dist/chart-types/histogram/spec.js +36 -0
- package/dist/chart-types/histogram/spec.js.map +1 -0
- package/dist/chart-types/histogram/tool.d.ts +42 -0
- package/dist/chart-types/histogram/tool.d.ts.map +1 -0
- package/dist/chart-types/histogram/tool.js +55 -0
- package/dist/chart-types/histogram/tool.js.map +1 -0
- package/dist/chart-types/index.d.ts +115 -0
- package/dist/chart-types/index.d.ts.map +1 -0
- package/dist/chart-types/index.js +100 -0
- package/dist/chart-types/index.js.map +1 -0
- package/dist/chart-types/line-chart/LineChartSettings.d.ts +7 -0
- package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
- package/dist/chart-types/line-chart/LineChartSettings.js +22 -0
- package/dist/chart-types/line-chart/LineChartSettings.js.map +1 -0
- package/dist/chart-types/line-chart/definition.d.ts +4 -0
- package/dist/chart-types/line-chart/definition.d.ts.map +1 -0
- package/dist/chart-types/line-chart/definition.js +19 -0
- package/dist/chart-types/line-chart/definition.js.map +1 -0
- package/dist/chart-types/line-chart/schema.d.ts +83 -0
- package/dist/chart-types/line-chart/schema.d.ts.map +1 -0
- package/dist/chart-types/line-chart/schema.js +39 -0
- package/dist/chart-types/line-chart/schema.js.map +1 -0
- package/dist/chart-types/line-chart/spec.d.ts +4 -0
- package/dist/chart-types/line-chart/spec.d.ts.map +1 -0
- package/dist/chart-types/line-chart/spec.js +91 -0
- package/dist/chart-types/line-chart/spec.js.map +1 -0
- package/dist/chart-types/line-chart/tool.d.ts +68 -0
- package/dist/chart-types/line-chart/tool.d.ts.map +1 -0
- package/dist/chart-types/line-chart/tool.js +66 -0
- package/dist/chart-types/line-chart/tool.js.map +1 -0
- package/dist/chart-types/tool-schemas.d.ts +8 -0
- package/dist/chart-types/tool-schemas.d.ts.map +1 -0
- package/dist/chart-types/tool-schemas.js +18 -0
- package/dist/chart-types/tool-schemas.js.map +1 -0
- package/dist/chart-types/tool-types.d.ts +26 -0
- package/dist/chart-types/tool-types.d.ts.map +1 -0
- package/dist/chart-types/tool-types.js +2 -0
- package/dist/chart-types/tool-types.js.map +1 -0
- package/dist/chart-types/tool-validation.d.ts +3 -0
- package/dist/chart-types/tool-validation.d.ts.map +1 -0
- package/dist/chart-types/tool-validation.js +11 -0
- package/dist/chart-types/tool-validation.js.map +1 -0
- package/dist/chart-types/useChartTypeDefinition.d.ts +3 -0
- package/dist/chart-types/useChartTypeDefinition.d.ts.map +1 -0
- package/dist/chart-types/useChartTypeDefinition.js +8 -0
- package/dist/chart-types/useChartTypeDefinition.js.map +1 -0
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +17 -0
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +1 -0
- package/dist/dashboard/DashboardPanelErrorBoundary.js +21 -0
- package/dist/dashboard/DashboardPanelErrorBoundary.js.map +1 -0
- package/dist/dashboard/MosaicDashboard.d.ts +2 -4
- package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboard.js +38 -19
- package/dist/dashboard/MosaicDashboard.js.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.d.ts +1 -0
- package/dist/dashboard/MosaicDashboardContext.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.js.map +1 -1
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts +2 -0
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardEmptyState.js +50 -0
- package/dist/dashboard/MosaicDashboardEmptyState.js.map +1 -0
- package/dist/dashboard/MosaicDashboardPanel.d.ts +3 -0
- package/dist/dashboard/MosaicDashboardPanel.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardPanel.js +26 -0
- package/dist/dashboard/MosaicDashboardPanel.js.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts +8 -0
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +17 -0
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +13 -0
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelHeader.js +30 -0
- package/dist/dashboard/MosaicDashboardPanelHeader.js.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelLayout.d.ts +10 -0
- package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardPanelLayout.js +46 -0
- package/dist/dashboard/MosaicDashboardPanelLayout.js.map +1 -0
- package/dist/dashboard/MosaicDashboardPanels.d.ts +2 -0
- package/dist/dashboard/MosaicDashboardPanels.d.ts.map +1 -0
- package/dist/dashboard/MosaicDashboardPanels.js +53 -0
- package/dist/dashboard/MosaicDashboardPanels.js.map +1 -0
- package/dist/dashboard/MosaicDashboardSlice.d.ts +607 -27
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +525 -93
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/MosaicDashboardToolbar.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardToolbar.js +74 -7
- package/dist/dashboard/MosaicDashboardToolbar.js.map +1 -1
- package/dist/dashboard/defaultPanelRenderers.d.ts +3 -0
- package/dist/dashboard/defaultPanelRenderers.d.ts.map +1 -0
- package/dist/dashboard/defaultPanelRenderers.js +13 -0
- package/dist/dashboard/defaultPanelRenderers.js.map +1 -0
- package/dist/dashboard/utils.d.ts +3 -0
- package/dist/dashboard/utils.d.ts.map +1 -0
- package/dist/dashboard/utils.js +16 -0
- package/dist/dashboard/utils.js.map +1 -0
- package/dist/editor/MosaicChartDisplay.d.ts.map +1 -1
- package/dist/editor/MosaicChartDisplay.js +6 -1
- package/dist/editor/MosaicChartDisplay.js.map +1 -1
- package/dist/index.d.ts +28 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +3 -0
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +1 -0
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +32 -0
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +1 -0
- package/dist/profiler/useMosaicProfiler.d.ts.map +1 -1
- package/dist/profiler/useMosaicProfiler.js.map +1 -1
- package/dist/tableInterop.js.map +1 -1
- package/dist/text/MosaicDashboardTextRenderer.d.ts +3 -0
- package/dist/text/MosaicDashboardTextRenderer.d.ts.map +1 -0
- package/dist/text/MosaicDashboardTextRenderer.js +46 -0
- package/dist/text/MosaicDashboardTextRenderer.js.map +1 -0
- package/dist/useMosaicClient.d.ts +4 -15
- package/dist/useMosaicClient.d.ts.map +1 -1
- package/dist/useMosaicClient.js +10 -4
- package/dist/useMosaicClient.js.map +1 -1
- package/package.json +40 -31
- package/dist/chart-builders/builders.d.ts +0 -7
- package/dist/chart-builders/builders.d.ts.map +0 -1
- package/dist/chart-builders/builders.js +0 -280
- package/dist/chart-builders/builders.js.map +0 -1
- package/dist/chart-builders/createMosaicChartTool.d.ts +0 -45
- package/dist/chart-builders/createMosaicChartTool.d.ts.map +0 -1
- package/dist/chart-builders/createMosaicChartTool.js +0 -109
- package/dist/chart-builders/createMosaicChartTool.js.map +0 -1
- package/dist/chart-builders/describeChartSpecs.d.ts +0 -7
- package/dist/chart-builders/describeChartSpecs.d.ts.map +0 -1
- package/dist/chart-builders/describeChartSpecs.js +0 -38
- package/dist/chart-builders/describeChartSpecs.js.map +0 -1
- package/dist/chart-builders/types.d.ts +0 -40
- package/dist/chart-builders/types.d.ts.map +0 -1
- package/dist/chart-builders/types.js +0 -2
- package/dist/chart-builders/types.js.map +0 -1
- package/dist/dashboard/MosaicDashboardChartPanel.d.ts +0 -3
- package/dist/dashboard/MosaicDashboardChartPanel.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardChartPanel.js +0 -49
- package/dist/dashboard/MosaicDashboardChartPanel.js.map +0 -1
- package/dist/dashboard/MosaicDashboardCharts.d.ts +0 -3
- package/dist/dashboard/MosaicDashboardCharts.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardCharts.js +0 -45
- package/dist/dashboard/MosaicDashboardCharts.js.map +0 -1
- package/dist/dashboard/MosaicDashboardProfiler.d.ts +0 -3
- package/dist/dashboard/MosaicDashboardProfiler.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardProfiler.js +0 -21
- package/dist/dashboard/MosaicDashboardProfiler.js.map +0 -1
- package/dist/dashboard/VgPlotSpecPopoverEditor.d.ts +0 -8
- package/dist/dashboard/VgPlotSpecPopoverEditor.d.ts.map +0 -1
- package/dist/dashboard/VgPlotSpecPopoverEditor.js +0 -40
- package/dist/dashboard/VgPlotSpecPopoverEditor.js.map +0 -1
- package/dist/use-mosaic.d.ts +0 -11
- package/dist/use-mosaic.d.ts.map +0 -1
- package/dist/use-mosaic.js +0 -42
- package/dist/use-mosaic.js.map +0 -1
|
@@ -1,28 +1,462 @@
|
|
|
1
1
|
import { DbSliceState } from '@sqlrooms/db';
|
|
2
|
-
import { type DuckDbSliceState } from '@sqlrooms/duckdb';
|
|
3
|
-
import type
|
|
4
|
-
import {
|
|
2
|
+
import { type DataTable, type DuckDbSliceState } from '@sqlrooms/duckdb';
|
|
3
|
+
import { type LayoutSliceState } from '@sqlrooms/layout';
|
|
4
|
+
import { type LayoutNode } from '@sqlrooms/layout-config';
|
|
5
5
|
import { BaseRoomStoreState, SliceFunctions } from '@sqlrooms/room-store';
|
|
6
|
+
import type { ComponentType } from 'react';
|
|
6
7
|
import { z } from 'zod';
|
|
8
|
+
import type { ChartTypeDefinition } from '../chart-types/base-types';
|
|
7
9
|
import { type MosaicSliceState } from '../MosaicSlice';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
import { type RetainedVgPlotChart } from '../VgPlotChart';
|
|
11
|
+
import { ChartConfig } from '../chart-types/chart-config';
|
|
12
|
+
/**
|
|
13
|
+
* Panel key used for function-form panel definitions registered by
|
|
14
|
+
* `MosaicDashboardPanels`. Individual dashboard panels are represented as
|
|
15
|
+
* `LayoutPanelNode` entries whose `panel` property carries
|
|
16
|
+
* `{ key: MOSAIC_DASHBOARD_PANEL, meta: { dashboardId, panelId } }`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MOSAIC_DASHBOARD_PANEL = "mosaic-dashboard-panel";
|
|
19
|
+
export declare const MOSAIC_DASHBOARD_CHART_PANEL_TYPE = "vgplot";
|
|
20
|
+
export declare const MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE = "profiler";
|
|
21
|
+
export declare const MOSAIC_DASHBOARD_TEXT_PANEL_TYPE = "text";
|
|
22
|
+
export declare const MosaicDashboardLayoutType: z.ZodEnum<{
|
|
23
|
+
grid: "grid";
|
|
24
|
+
dock: "dock";
|
|
25
|
+
}>;
|
|
26
|
+
export type MosaicDashboardLayoutType = z.infer<typeof MosaicDashboardLayoutType>;
|
|
27
|
+
export declare const MosaicDashboardPanelSource: z.ZodObject<{
|
|
28
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
29
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type MosaicDashboardPanelSource = z.infer<typeof MosaicDashboardPanelSource>;
|
|
32
|
+
export declare const ProfilerPanelConfig: z.ZodObject<{
|
|
33
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type ProfilerPanelConfig = z.infer<typeof ProfilerPanelConfig>;
|
|
36
|
+
export declare const TextPanelConfig: z.ZodObject<{
|
|
37
|
+
content: z.ZodDefault<z.ZodString>;
|
|
38
|
+
toolbarOpen: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
sourcePanelOpen: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type TextPanelConfig = z.infer<typeof TextPanelConfig>;
|
|
42
|
+
export declare const ChartPanelConfig: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
type: z.ZodLiteral<"vgplot">;
|
|
45
|
+
title: z.ZodDefault<z.ZodString>;
|
|
46
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
48
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
config: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
51
|
+
chartType: z.ZodLiteral<"histogram">;
|
|
52
|
+
settings: z.ZodObject<{
|
|
53
|
+
field: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
chartType: z.ZodLiteral<"count-plot">;
|
|
58
|
+
settings: z.ZodObject<{
|
|
59
|
+
field: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
chartType: z.ZodLiteral<"line-chart">;
|
|
64
|
+
settings: z.ZodObject<{
|
|
65
|
+
x: z.ZodOptional<z.ZodString>;
|
|
66
|
+
xInterval: z.ZodOptional<z.ZodEnum<{
|
|
67
|
+
second: "second";
|
|
68
|
+
minute: "minute";
|
|
69
|
+
hour: "hour";
|
|
70
|
+
day: "day";
|
|
71
|
+
week: "week";
|
|
72
|
+
month: "month";
|
|
73
|
+
quarter: "quarter";
|
|
74
|
+
year: "year";
|
|
75
|
+
}>>;
|
|
76
|
+
yFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
77
|
+
field: z.ZodString;
|
|
78
|
+
color: z.ZodOptional<z.ZodString>;
|
|
79
|
+
aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
sum: "sum";
|
|
81
|
+
max: "max";
|
|
82
|
+
min: "min";
|
|
83
|
+
avg: "avg";
|
|
84
|
+
}>>>;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
chartType: z.ZodLiteral<"bubble-chart">;
|
|
90
|
+
settings: z.ZodObject<{
|
|
91
|
+
x: z.ZodOptional<z.ZodString>;
|
|
92
|
+
y: z.ZodOptional<z.ZodString>;
|
|
93
|
+
size: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
chartType: z.ZodLiteral<"heatmap">;
|
|
98
|
+
settings: z.ZodObject<{
|
|
99
|
+
x: z.ZodOptional<z.ZodString>;
|
|
100
|
+
y: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strip>;
|
|
102
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
chartType: z.ZodLiteral<"box-plot">;
|
|
105
|
+
settings: z.ZodObject<{
|
|
106
|
+
x: z.ZodString;
|
|
107
|
+
y: z.ZodString;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
111
|
+
chartType: z.ZodLiteral<"custom-spec">;
|
|
112
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
settings: z.ZodObject<{
|
|
114
|
+
vgPlotSpec: z.ZodOptional<z.ZodUnknown>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
}, z.core.$strip>], "chartType">, z.ZodObject<{
|
|
117
|
+
chartType: z.ZodString;
|
|
118
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
119
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
}, z.core.$strip>]>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type ChartPanelConfig = z.infer<typeof ChartPanelConfig>;
|
|
123
|
+
export declare const ProfilerPanel: z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
type: z.ZodLiteral<"profiler">;
|
|
126
|
+
title: z.ZodDefault<z.ZodString>;
|
|
127
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
129
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
config: z.ZodObject<{
|
|
132
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type ProfilerPanel = z.infer<typeof ProfilerPanel>;
|
|
136
|
+
export declare const TextPanel: z.ZodObject<{
|
|
137
|
+
id: z.ZodString;
|
|
138
|
+
type: z.ZodLiteral<"text">;
|
|
139
|
+
title: z.ZodDefault<z.ZodString>;
|
|
140
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
142
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
config: z.ZodObject<{
|
|
145
|
+
content: z.ZodDefault<z.ZodString>;
|
|
146
|
+
toolbarOpen: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
sourcePanelOpen: z.ZodDefault<z.ZodBoolean>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export type TextPanel = z.infer<typeof TextPanel>;
|
|
151
|
+
export declare const LegacyPanelConfig: z.ZodObject<{
|
|
11
152
|
id: z.ZodString;
|
|
153
|
+
type: z.ZodString;
|
|
12
154
|
title: z.ZodDefault<z.ZodString>;
|
|
13
|
-
|
|
155
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
156
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
157
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
160
|
}, z.core.$strip>;
|
|
15
|
-
export type
|
|
161
|
+
export type LegacyPanelConfig = z.infer<typeof LegacyPanelConfig>;
|
|
162
|
+
export declare const MosaicDashboardPanelConfig: z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
163
|
+
id: z.ZodString;
|
|
164
|
+
type: z.ZodLiteral<"vgplot">;
|
|
165
|
+
title: z.ZodDefault<z.ZodString>;
|
|
166
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
168
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
config: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
171
|
+
chartType: z.ZodLiteral<"histogram">;
|
|
172
|
+
settings: z.ZodObject<{
|
|
173
|
+
field: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
chartType: z.ZodLiteral<"count-plot">;
|
|
178
|
+
settings: z.ZodObject<{
|
|
179
|
+
field: z.ZodOptional<z.ZodString>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
182
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
+
chartType: z.ZodLiteral<"line-chart">;
|
|
184
|
+
settings: z.ZodObject<{
|
|
185
|
+
x: z.ZodOptional<z.ZodString>;
|
|
186
|
+
xInterval: z.ZodOptional<z.ZodEnum<{
|
|
187
|
+
second: "second";
|
|
188
|
+
minute: "minute";
|
|
189
|
+
hour: "hour";
|
|
190
|
+
day: "day";
|
|
191
|
+
week: "week";
|
|
192
|
+
month: "month";
|
|
193
|
+
quarter: "quarter";
|
|
194
|
+
year: "year";
|
|
195
|
+
}>>;
|
|
196
|
+
yFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
field: z.ZodString;
|
|
198
|
+
color: z.ZodOptional<z.ZodString>;
|
|
199
|
+
aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
200
|
+
sum: "sum";
|
|
201
|
+
max: "max";
|
|
202
|
+
min: "min";
|
|
203
|
+
avg: "avg";
|
|
204
|
+
}>>>;
|
|
205
|
+
}, z.core.$strip>>>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
chartType: z.ZodLiteral<"bubble-chart">;
|
|
210
|
+
settings: z.ZodObject<{
|
|
211
|
+
x: z.ZodOptional<z.ZodString>;
|
|
212
|
+
y: z.ZodOptional<z.ZodString>;
|
|
213
|
+
size: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
chartType: z.ZodLiteral<"heatmap">;
|
|
218
|
+
settings: z.ZodObject<{
|
|
219
|
+
x: z.ZodOptional<z.ZodString>;
|
|
220
|
+
y: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
chartType: z.ZodLiteral<"box-plot">;
|
|
225
|
+
settings: z.ZodObject<{
|
|
226
|
+
x: z.ZodString;
|
|
227
|
+
y: z.ZodString;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
+
chartType: z.ZodLiteral<"custom-spec">;
|
|
232
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
233
|
+
settings: z.ZodObject<{
|
|
234
|
+
vgPlotSpec: z.ZodOptional<z.ZodUnknown>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
}, z.core.$strip>], "chartType">, z.ZodObject<{
|
|
237
|
+
chartType: z.ZodString;
|
|
238
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
239
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
}, z.core.$strip>]>;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
id: z.ZodString;
|
|
243
|
+
type: z.ZodLiteral<"profiler">;
|
|
244
|
+
title: z.ZodDefault<z.ZodString>;
|
|
245
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
247
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
config: z.ZodObject<{
|
|
250
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
+
id: z.ZodString;
|
|
254
|
+
type: z.ZodLiteral<"text">;
|
|
255
|
+
title: z.ZodDefault<z.ZodString>;
|
|
256
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
258
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
config: z.ZodObject<{
|
|
261
|
+
content: z.ZodDefault<z.ZodString>;
|
|
262
|
+
toolbarOpen: z.ZodDefault<z.ZodBoolean>;
|
|
263
|
+
sourcePanelOpen: z.ZodDefault<z.ZodBoolean>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
type: z.ZodString;
|
|
268
|
+
title: z.ZodDefault<z.ZodString>;
|
|
269
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
270
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
271
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
272
|
+
}, z.core.$strip>>;
|
|
273
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
274
|
+
}, z.core.$strip>]>;
|
|
275
|
+
export type MosaicDashboardPanelConfig = z.infer<typeof MosaicDashboardPanelConfig>;
|
|
276
|
+
export type MosaicDashboardPanelRendererProps<TPanel extends MosaicDashboardPanelConfig = MosaicDashboardPanelConfig> = {
|
|
277
|
+
dashboardId: string;
|
|
278
|
+
dashboard: MosaicDashboardEntry;
|
|
279
|
+
panel: TPanel;
|
|
280
|
+
selectionName: string;
|
|
281
|
+
resolvedSource?: MosaicDashboardPanelSource;
|
|
282
|
+
};
|
|
283
|
+
export type ChartPanelRendererProps = MosaicDashboardPanelRendererProps<ChartPanelConfig>;
|
|
284
|
+
export type ProfilerPanelRendererProps = MosaicDashboardPanelRendererProps<ProfilerPanel>;
|
|
285
|
+
export type TextPanelRendererProps = MosaicDashboardPanelRendererProps<TextPanel>;
|
|
286
|
+
export type MosaicDashboardPanelRenderer<TPanel extends MosaicDashboardPanelConfig = MosaicDashboardPanelConfig> = {
|
|
287
|
+
component: ComponentType<MosaicDashboardPanelRendererProps<TPanel>>;
|
|
288
|
+
headerActions?: ComponentType<MosaicDashboardPanelRendererProps<TPanel>>;
|
|
289
|
+
icon?: ComponentType<{
|
|
290
|
+
className?: string;
|
|
291
|
+
}>;
|
|
292
|
+
};
|
|
293
|
+
export type AnyPanelRenderer = {
|
|
294
|
+
component: ComponentType<any>;
|
|
295
|
+
headerActions?: ComponentType<any>;
|
|
296
|
+
icon?: ComponentType<{
|
|
297
|
+
className?: string;
|
|
298
|
+
}>;
|
|
299
|
+
};
|
|
300
|
+
export type PanelTypeMap = {
|
|
301
|
+
[MOSAIC_DASHBOARD_CHART_PANEL_TYPE]: ChartPanelConfig;
|
|
302
|
+
[MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE]: ProfilerPanel;
|
|
303
|
+
[MOSAIC_DASHBOARD_TEXT_PANEL_TYPE]: TextPanel;
|
|
304
|
+
};
|
|
305
|
+
export type PanelRenderersRecord = Record<string, AnyPanelRenderer>;
|
|
306
|
+
export type MosaicDashboardAddPanelActionContext = {
|
|
307
|
+
dashboardId: string;
|
|
308
|
+
dashboard: MosaicDashboardEntry | undefined;
|
|
309
|
+
selectedTable: DataTable | undefined;
|
|
310
|
+
tables: DataTable[];
|
|
311
|
+
};
|
|
312
|
+
export type MosaicDashboardAddPanelAction = {
|
|
313
|
+
type: string;
|
|
314
|
+
label: string;
|
|
315
|
+
icon?: ComponentType<{
|
|
316
|
+
className?: string;
|
|
317
|
+
}>;
|
|
318
|
+
isEnabled?: (context: MosaicDashboardAddPanelActionContext) => boolean;
|
|
319
|
+
createPanel: (context: MosaicDashboardAddPanelActionContext) => MosaicDashboardPanelConfig | undefined;
|
|
320
|
+
};
|
|
321
|
+
export declare function createMosaicDashboardPanelConfig(options: {
|
|
322
|
+
type: string;
|
|
323
|
+
title: string;
|
|
324
|
+
source?: MosaicDashboardPanelSource;
|
|
325
|
+
config?: Record<string, unknown>;
|
|
326
|
+
}): MosaicDashboardPanelConfig;
|
|
327
|
+
export declare function createMosaicDashboardChartPanelConfig(title: string, config: ChartConfig, source?: MosaicDashboardPanelSource): ChartPanelConfig;
|
|
328
|
+
export declare function createMosaicDashboardProfilerPanelConfig(options?: {
|
|
329
|
+
title?: string;
|
|
330
|
+
source?: MosaicDashboardPanelSource;
|
|
331
|
+
pageSize?: number;
|
|
332
|
+
}): MosaicDashboardPanelConfig;
|
|
333
|
+
export declare function createMosaicDashboardTextPanelConfig(options?: {
|
|
334
|
+
title?: string;
|
|
335
|
+
content?: string;
|
|
336
|
+
source?: MosaicDashboardPanelSource;
|
|
337
|
+
}): MosaicDashboardPanelConfig;
|
|
16
338
|
export declare const MosaicDashboardEntry: z.ZodObject<{
|
|
17
339
|
id: z.ZodString;
|
|
18
340
|
title: z.ZodDefault<z.ZodString>;
|
|
341
|
+
layoutType: z.ZodDefault<z.ZodEnum<{
|
|
342
|
+
grid: "grid";
|
|
343
|
+
dock: "dock";
|
|
344
|
+
}>>;
|
|
19
345
|
selectedTable: z.ZodOptional<z.ZodString>;
|
|
20
|
-
|
|
346
|
+
panels: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
347
|
id: z.ZodString;
|
|
348
|
+
type: z.ZodLiteral<"vgplot">;
|
|
22
349
|
title: z.ZodDefault<z.ZodString>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
350
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
351
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
352
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
353
|
+
}, z.core.$strip>>;
|
|
354
|
+
config: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
355
|
+
chartType: z.ZodLiteral<"histogram">;
|
|
356
|
+
settings: z.ZodObject<{
|
|
357
|
+
field: z.ZodOptional<z.ZodString>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
360
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
361
|
+
chartType: z.ZodLiteral<"count-plot">;
|
|
362
|
+
settings: z.ZodObject<{
|
|
363
|
+
field: z.ZodOptional<z.ZodString>;
|
|
364
|
+
}, z.core.$strip>;
|
|
365
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
367
|
+
chartType: z.ZodLiteral<"line-chart">;
|
|
368
|
+
settings: z.ZodObject<{
|
|
369
|
+
x: z.ZodOptional<z.ZodString>;
|
|
370
|
+
xInterval: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
second: "second";
|
|
372
|
+
minute: "minute";
|
|
373
|
+
hour: "hour";
|
|
374
|
+
day: "day";
|
|
375
|
+
week: "week";
|
|
376
|
+
month: "month";
|
|
377
|
+
quarter: "quarter";
|
|
378
|
+
year: "year";
|
|
379
|
+
}>>;
|
|
380
|
+
yFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
381
|
+
field: z.ZodString;
|
|
382
|
+
color: z.ZodOptional<z.ZodString>;
|
|
383
|
+
aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
384
|
+
sum: "sum";
|
|
385
|
+
max: "max";
|
|
386
|
+
min: "min";
|
|
387
|
+
avg: "avg";
|
|
388
|
+
}>>>;
|
|
389
|
+
}, z.core.$strip>>>;
|
|
390
|
+
}, z.core.$strip>;
|
|
391
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
393
|
+
chartType: z.ZodLiteral<"bubble-chart">;
|
|
394
|
+
settings: z.ZodObject<{
|
|
395
|
+
x: z.ZodOptional<z.ZodString>;
|
|
396
|
+
y: z.ZodOptional<z.ZodString>;
|
|
397
|
+
size: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
400
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
401
|
+
chartType: z.ZodLiteral<"heatmap">;
|
|
402
|
+
settings: z.ZodObject<{
|
|
403
|
+
x: z.ZodOptional<z.ZodString>;
|
|
404
|
+
y: z.ZodOptional<z.ZodString>;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
408
|
+
chartType: z.ZodLiteral<"box-plot">;
|
|
409
|
+
settings: z.ZodObject<{
|
|
410
|
+
x: z.ZodString;
|
|
411
|
+
y: z.ZodString;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
chartType: z.ZodLiteral<"custom-spec">;
|
|
416
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
+
settings: z.ZodObject<{
|
|
418
|
+
vgPlotSpec: z.ZodOptional<z.ZodUnknown>;
|
|
419
|
+
}, z.core.$strip>;
|
|
420
|
+
}, z.core.$strip>], "chartType">, z.ZodObject<{
|
|
421
|
+
chartType: z.ZodString;
|
|
422
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
423
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
424
|
+
}, z.core.$strip>]>;
|
|
425
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
426
|
+
id: z.ZodString;
|
|
427
|
+
type: z.ZodLiteral<"profiler">;
|
|
428
|
+
title: z.ZodDefault<z.ZodString>;
|
|
429
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
431
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
432
|
+
}, z.core.$strip>>;
|
|
433
|
+
config: z.ZodObject<{
|
|
434
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
435
|
+
}, z.core.$strip>;
|
|
436
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
437
|
+
id: z.ZodString;
|
|
438
|
+
type: z.ZodLiteral<"text">;
|
|
439
|
+
title: z.ZodDefault<z.ZodString>;
|
|
440
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
441
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
442
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
443
|
+
}, z.core.$strip>>;
|
|
444
|
+
config: z.ZodObject<{
|
|
445
|
+
content: z.ZodDefault<z.ZodString>;
|
|
446
|
+
toolbarOpen: z.ZodDefault<z.ZodBoolean>;
|
|
447
|
+
sourcePanelOpen: z.ZodDefault<z.ZodBoolean>;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
450
|
+
id: z.ZodString;
|
|
451
|
+
type: z.ZodString;
|
|
452
|
+
title: z.ZodDefault<z.ZodString>;
|
|
453
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
454
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
455
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
456
|
+
}, z.core.$strip>>;
|
|
457
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
458
|
+
}, z.core.$strip>]>>>;
|
|
459
|
+
layout: z.ZodDefault<z.ZodNullable<z.ZodType<LayoutNode, unknown, z.core.$ZodTypeInternals<LayoutNode, unknown>>>>;
|
|
26
460
|
updatedAt: z.ZodDefault<z.ZodNumber>;
|
|
27
461
|
}, z.core.$strip>;
|
|
28
462
|
export type MosaicDashboardEntry = z.infer<typeof MosaicDashboardEntry>;
|
|
@@ -30,13 +464,125 @@ export declare const MosaicDashboardSliceConfig: z.ZodObject<{
|
|
|
30
464
|
dashboardsById: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
31
465
|
id: z.ZodString;
|
|
32
466
|
title: z.ZodDefault<z.ZodString>;
|
|
467
|
+
layoutType: z.ZodDefault<z.ZodEnum<{
|
|
468
|
+
grid: "grid";
|
|
469
|
+
dock: "dock";
|
|
470
|
+
}>>;
|
|
33
471
|
selectedTable: z.ZodOptional<z.ZodString>;
|
|
34
|
-
|
|
472
|
+
panels: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
type: z.ZodLiteral<"vgplot">;
|
|
475
|
+
title: z.ZodDefault<z.ZodString>;
|
|
476
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
477
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
478
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
479
|
+
}, z.core.$strip>>;
|
|
480
|
+
config: z.ZodUnion<[z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
|
|
481
|
+
chartType: z.ZodLiteral<"histogram">;
|
|
482
|
+
settings: z.ZodObject<{
|
|
483
|
+
field: z.ZodOptional<z.ZodString>;
|
|
484
|
+
}, z.core.$strip>;
|
|
485
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
486
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
487
|
+
chartType: z.ZodLiteral<"count-plot">;
|
|
488
|
+
settings: z.ZodObject<{
|
|
489
|
+
field: z.ZodOptional<z.ZodString>;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
492
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
493
|
+
chartType: z.ZodLiteral<"line-chart">;
|
|
494
|
+
settings: z.ZodObject<{
|
|
495
|
+
x: z.ZodOptional<z.ZodString>;
|
|
496
|
+
xInterval: z.ZodOptional<z.ZodEnum<{
|
|
497
|
+
second: "second";
|
|
498
|
+
minute: "minute";
|
|
499
|
+
hour: "hour";
|
|
500
|
+
day: "day";
|
|
501
|
+
week: "week";
|
|
502
|
+
month: "month";
|
|
503
|
+
quarter: "quarter";
|
|
504
|
+
year: "year";
|
|
505
|
+
}>>;
|
|
506
|
+
yFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
507
|
+
field: z.ZodString;
|
|
508
|
+
color: z.ZodOptional<z.ZodString>;
|
|
509
|
+
aggregate: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
510
|
+
sum: "sum";
|
|
511
|
+
max: "max";
|
|
512
|
+
min: "min";
|
|
513
|
+
avg: "avg";
|
|
514
|
+
}>>>;
|
|
515
|
+
}, z.core.$strip>>>;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
518
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
519
|
+
chartType: z.ZodLiteral<"bubble-chart">;
|
|
520
|
+
settings: z.ZodObject<{
|
|
521
|
+
x: z.ZodOptional<z.ZodString>;
|
|
522
|
+
y: z.ZodOptional<z.ZodString>;
|
|
523
|
+
size: z.ZodOptional<z.ZodString>;
|
|
524
|
+
}, z.core.$strip>;
|
|
525
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
526
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
527
|
+
chartType: z.ZodLiteral<"heatmap">;
|
|
528
|
+
settings: z.ZodObject<{
|
|
529
|
+
x: z.ZodOptional<z.ZodString>;
|
|
530
|
+
y: z.ZodOptional<z.ZodString>;
|
|
531
|
+
}, z.core.$strip>;
|
|
532
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
533
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
534
|
+
chartType: z.ZodLiteral<"box-plot">;
|
|
535
|
+
settings: z.ZodObject<{
|
|
536
|
+
x: z.ZodString;
|
|
537
|
+
y: z.ZodString;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
540
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
541
|
+
chartType: z.ZodLiteral<"custom-spec">;
|
|
542
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
543
|
+
settings: z.ZodObject<{
|
|
544
|
+
vgPlotSpec: z.ZodOptional<z.ZodUnknown>;
|
|
545
|
+
}, z.core.$strip>;
|
|
546
|
+
}, z.core.$strip>], "chartType">, z.ZodObject<{
|
|
547
|
+
chartType: z.ZodString;
|
|
548
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
549
|
+
settingsOpen: z.ZodOptional<z.ZodBoolean>;
|
|
550
|
+
}, z.core.$strip>]>;
|
|
551
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
552
|
id: z.ZodString;
|
|
553
|
+
type: z.ZodLiteral<"profiler">;
|
|
36
554
|
title: z.ZodDefault<z.ZodString>;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
555
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
556
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
557
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
558
|
+
}, z.core.$strip>>;
|
|
559
|
+
config: z.ZodObject<{
|
|
560
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
561
|
+
}, z.core.$strip>;
|
|
562
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
563
|
+
id: z.ZodString;
|
|
564
|
+
type: z.ZodLiteral<"text">;
|
|
565
|
+
title: z.ZodDefault<z.ZodString>;
|
|
566
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
567
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
568
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$strip>>;
|
|
570
|
+
config: z.ZodObject<{
|
|
571
|
+
content: z.ZodDefault<z.ZodString>;
|
|
572
|
+
toolbarOpen: z.ZodDefault<z.ZodBoolean>;
|
|
573
|
+
sourcePanelOpen: z.ZodDefault<z.ZodBoolean>;
|
|
574
|
+
}, z.core.$strip>;
|
|
575
|
+
}, z.core.$strip>], "type">, z.ZodObject<{
|
|
576
|
+
id: z.ZodString;
|
|
577
|
+
type: z.ZodString;
|
|
578
|
+
title: z.ZodDefault<z.ZodString>;
|
|
579
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
580
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
581
|
+
sqlQuery: z.ZodOptional<z.ZodString>;
|
|
582
|
+
}, z.core.$strip>>;
|
|
583
|
+
config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
584
|
+
}, z.core.$strip>]>>>;
|
|
585
|
+
layout: z.ZodDefault<z.ZodNullable<z.ZodType<LayoutNode, unknown, z.core.$ZodTypeInternals<LayoutNode, unknown>>>>;
|
|
40
586
|
updatedAt: z.ZodDefault<z.ZodNumber>;
|
|
41
587
|
}, z.core.$strip>>>;
|
|
42
588
|
}, z.core.$strip>;
|
|
@@ -44,25 +590,59 @@ export type MosaicDashboardSliceConfig = z.infer<typeof MosaicDashboardSliceConf
|
|
|
44
590
|
export type MosaicDashboardSliceState = {
|
|
45
591
|
mosaicDashboard: SliceFunctions & {
|
|
46
592
|
config: MosaicDashboardSliceConfig;
|
|
47
|
-
|
|
48
|
-
|
|
593
|
+
runtime: {
|
|
594
|
+
/**
|
|
595
|
+
* Live vgplot chart instances retained across transient dashboard panel
|
|
596
|
+
* remounts, keyed by `getMosaicDashboardPanelId(dashboardId, panelId)`.
|
|
597
|
+
*
|
|
598
|
+
* This is runtime-only state: entries are never serialized with dashboard
|
|
599
|
+
* config and must be evicted when their panel/dashboard lifecycle ends.
|
|
600
|
+
*/
|
|
601
|
+
retainedChartsByPanelId: Record<string, RetainedVgPlotChart>;
|
|
602
|
+
};
|
|
603
|
+
chartTypes?: ChartTypeDefinition[];
|
|
604
|
+
addPanelActions: MosaicDashboardAddPanelAction[];
|
|
605
|
+
createDashboard: (title?: string, layoutType?: MosaicDashboardLayoutType) => string;
|
|
606
|
+
ensureDashboard: (dashboardId: string, title?: string, layoutType?: MosaicDashboardLayoutType) => void;
|
|
49
607
|
removeDashboard: (dashboardId: string) => void;
|
|
50
608
|
getDashboard: (dashboardId: string) => MosaicDashboardEntry | undefined;
|
|
51
609
|
setSelectedTable: (dashboardId: string, tableName: string) => void;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
610
|
+
panelRenderers: PanelRenderersRecord;
|
|
611
|
+
registerPanelRenderer: (type: string, renderer: AnyPanelRenderer) => void;
|
|
612
|
+
unregisterPanelRenderer: (type: string) => void;
|
|
613
|
+
addPanel: (dashboardId: string, panel: MosaicDashboardPanelConfig) => MosaicDashboardPanelConfig['id'];
|
|
614
|
+
updatePanel: (dashboardId: string, panelId: string, patch: Partial<Omit<MosaicDashboardPanelConfig, 'id'>>) => void;
|
|
615
|
+
removePanel: (dashboardId: string, panelId: string) => void;
|
|
616
|
+
getRetainedChart: (dashboardId: string, panelId: string) => RetainedVgPlotChart | undefined;
|
|
617
|
+
setRetainedChart: (dashboardId: string, panelId: string, chart: RetainedVgPlotChart) => void;
|
|
618
|
+
evictPanelRuntime: (dashboardId: string, panelId: string) => void;
|
|
619
|
+
evictDashboardRuntime: (dashboardId: string, options?: {
|
|
620
|
+
resetSelection?: boolean;
|
|
621
|
+
}) => void;
|
|
622
|
+
clearAllDashboardRuntime: () => void;
|
|
623
|
+
setLayout: (dashboardId: string, layout: LayoutNode | null) => void;
|
|
56
624
|
};
|
|
57
625
|
};
|
|
58
626
|
export type MosaicDashboardStoreState = BaseRoomStoreState & DbSliceState & DuckDbSliceState & LayoutSliceState & MosaicSliceState & MosaicDashboardSliceState;
|
|
59
|
-
export declare function
|
|
60
|
-
export declare function
|
|
627
|
+
export declare function isChartPanelConfig(panel: MosaicDashboardPanelConfig): panel is ChartPanelConfig;
|
|
628
|
+
export declare function getMosaicDashboardPanelId(dashboardId: string, panelId: string): string;
|
|
629
|
+
export declare function getMosaicDashboardDockId(dashboardId: string): string;
|
|
630
|
+
export declare function getMosaicDashboardGridId(dashboardId: string): string;
|
|
61
631
|
export declare function getMosaicDashboardSelectionName(dashboardId: string): string;
|
|
62
|
-
|
|
632
|
+
/**
|
|
633
|
+
* Type guard to check if a panel config has a source property.
|
|
634
|
+
* All standard panel types (Chart, Profiler, Text) have optional sources.
|
|
635
|
+
*/
|
|
636
|
+
export declare function panelHasSource(panel: MosaicDashboardPanelConfig): panel is ChartPanelConfig | ProfilerPanel | TextPanel;
|
|
637
|
+
export declare function resolveMosaicDashboardPanelSource(dashboard: MosaicDashboardEntry, panel: MosaicDashboardPanelConfig): MosaicDashboardPanelSource | undefined;
|
|
63
638
|
export declare function createDefaultMosaicDashboardConfig(props?: Partial<MosaicDashboardSliceConfig>): MosaicDashboardSliceConfig;
|
|
64
|
-
|
|
639
|
+
type CreateMosaicDashboardSliceProps = {
|
|
65
640
|
config?: Partial<MosaicDashboardSliceConfig>;
|
|
66
|
-
|
|
641
|
+
panelRenderers?: Record<string, MosaicDashboardPanelRenderer>;
|
|
642
|
+
addPanelActions?: MosaicDashboardAddPanelAction[];
|
|
643
|
+
chartTypes?: ChartTypeDefinition[];
|
|
644
|
+
};
|
|
645
|
+
export type { CreateMosaicDashboardSliceProps };
|
|
646
|
+
export declare function createMosaicDashboardSlice(props?: CreateMosaicDashboardSliceProps): import("zustand").StateCreator<MosaicDashboardSliceState>;
|
|
67
647
|
export declare function useStoreWithMosaicDashboard<T>(selector: (state: MosaicDashboardStoreState) => T): T;
|
|
68
648
|
//# sourceMappingURL=MosaicDashboardSlice.d.ts.map
|