@sqlrooms/mosaic 0.29.0-rc.6 → 0.29.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -1
- package/README.md +182 -19
- package/dist/MosaicChart.d.ts +6 -6
- package/dist/MosaicChart.d.ts.map +1 -1
- package/dist/MosaicChart.js +6 -6
- package/dist/MosaicChart.js.map +1 -1
- package/dist/MosaicChartBuilder.d.ts +1 -1
- package/dist/MosaicChartBuilder.d.ts.map +1 -1
- package/dist/MosaicChartBuilder.js +1 -1
- package/dist/MosaicChartBuilder.js.map +1 -1
- package/dist/MosaicColorLegend.d.ts.map +1 -1
- package/dist/MosaicColorLegend.js +0 -1
- package/dist/MosaicColorLegend.js.map +1 -1
- package/dist/MosaicSlice.d.ts +1 -0
- package/dist/MosaicSlice.d.ts.map +1 -1
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +15 -6
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/ai/ai.d.ts +108 -0
- package/dist/ai/ai.d.ts.map +1 -0
- package/dist/ai/ai.js +461 -0
- package/dist/ai/ai.js.map +1 -0
- package/dist/ai/data-table-explorer-tool.d.ts +40 -0
- package/dist/ai/data-table-explorer-tool.d.ts.map +1 -0
- package/dist/ai/data-table-explorer-tool.js +75 -0
- package/dist/ai/data-table-explorer-tool.js.map +1 -0
- package/dist/ai/list-panels-tool.d.ts +35 -0
- package/dist/ai/list-panels-tool.d.ts.map +1 -0
- package/dist/ai/list-panels-tool.js.map +1 -0
- package/dist/ai/remove-panel-tool.d.ts +31 -0
- package/dist/ai/remove-panel-tool.d.ts.map +1 -0
- package/dist/ai/remove-panel-tool.js.map +1 -0
- package/dist/ai/tool-helpers.d.ts +34 -0
- package/dist/ai/tool-helpers.d.ts.map +1 -0
- package/dist/ai/tool-helpers.js +93 -0
- package/dist/ai/tool-helpers.js.map +1 -0
- package/dist/ai/tool-schemas.d.ts.map +1 -0
- package/dist/ai/tool-schemas.js.map +1 -0
- package/dist/ai/tool-types.d.ts +26 -0
- package/dist/ai/tool-types.d.ts.map +1 -0
- package/dist/ai/tool-types.js.map +1 -0
- package/dist/ai/tool-validation.d.ts +3 -0
- package/dist/ai/tool-validation.d.ts.map +1 -0
- package/dist/ai/tool-validation.js.map +1 -0
- package/dist/ai.d.ts +2 -99
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +2 -441
- package/dist/ai.js.map +1 -1
- package/dist/chart-builders/ChartBuilderActions.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
- package/dist/chart-builders/ChartBuilderFields.js +2 -2
- package/dist/chart-builders/ChartBuilderFields.js.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.js.map +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
- package/dist/chart-builders/chartSpecTitle.js.map +1 -1
- package/dist/chart-builders/chartTypeUtils.d.ts +1 -2
- package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -1
- package/dist/chart-builders/chartTypeUtils.js +0 -1
- package/dist/chart-builders/chartTypeUtils.js.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.js.map +1 -1
- package/dist/charts/MosaicChart.d.ts +14 -0
- package/dist/charts/MosaicChart.d.ts.map +1 -0
- package/dist/charts/MosaicChart.js +13 -0
- package/dist/charts/MosaicChart.js.map +1 -0
- package/dist/charts/MosaicChartError.d.ts +14 -0
- package/dist/charts/MosaicChartError.d.ts.map +1 -0
- package/dist/charts/MosaicChartError.js +31 -0
- package/dist/charts/MosaicChartError.js.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts +7 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js +10 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js.map +1 -0
- package/dist/charts/MosaicChartSettingsButton.d.ts +15 -0
- package/dist/charts/MosaicChartSettingsButton.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsButton.js +7 -0
- package/dist/charts/MosaicChartSettingsButton.js.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts +11 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.js +21 -0
- package/dist/charts/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/MosaicChartView.d.ts +15 -0
- package/dist/charts/MosaicChartView.d.ts.map +1 -0
- package/dist/charts/MosaicChartView.js +69 -0
- package/dist/charts/MosaicChartView.js.map +1 -0
- package/dist/charts/addChartPanelAction.d.ts.map +1 -0
- package/dist/charts/addChartPanelAction.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts +43 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js +74 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts +13 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js +18 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts +24 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js +34 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts +14 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +17 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +11 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js +23 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
- package/dist/charts/chart-types/base-types.d.ts +179 -0
- package/dist/charts/chart-types/base-types.d.ts.map +1 -0
- package/dist/charts/chart-types/base-types.js +14 -0
- package/dist/charts/chart-types/base-types.js.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js +9 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.js +24 -0
- package/dist/charts/chart-types/box-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +67 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +281 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +118 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts +24 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts +14 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +18 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +63 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts +6 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.js.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts +21 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.js +16 -0
- package/dist/charts/chart-types/box-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts +40 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.js +67 -0
- package/dist/charts/chart-types/box-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/chart-config.d.ts +140 -0
- package/dist/charts/chart-types/chart-config.d.ts.map +1 -0
- package/dist/charts/chart-types/chart-config.js +41 -0
- package/dist/charts/chart-types/chart-config.js.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js +9 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.js +19 -0
- package/dist/charts/chart-types/count-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts +5 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.js +80 -0
- package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.js +63 -0
- package/dist/charts/chart-types/count-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/createChartTools.d.ts +17 -0
- package/dist/charts/chart-types/createChartTools.d.ts.map +1 -0
- package/dist/charts/chart-types/createChartTools.js +24 -0
- package/dist/charts/chart-types/createChartTools.js.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts +12 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js +30 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js +30 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.js +22 -0
- package/dist/charts/chart-types/custom-spec/definition.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts +5 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.js +28 -0
- package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
- package/dist/charts/chart-types/errors.d.ts +32 -0
- package/dist/charts/chart-types/errors.d.ts.map +1 -0
- package/dist/charts/chart-types/errors.js +48 -0
- package/dist/charts/chart-types/errors.js.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js +9 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.js +19 -0
- package/dist/charts/chart-types/heatmap/definition.js.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts +5 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.js +64 -0
- package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.js +67 -0
- package/dist/charts/chart-types/heatmap/tool.js.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js +13 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -0
- package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/definition.js +19 -0
- package/dist/charts/chart-types/histogram/definition.js.map +1 -0
- package/dist/charts/chart-types/histogram/schema.d.ts +26 -0
- package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/schema.js +27 -0
- package/dist/charts/chart-types/histogram/schema.js.map +1 -0
- package/dist/charts/chart-types/histogram/spec.d.ts +5 -0
- package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/spec.js +60 -0
- package/dist/charts/chart-types/histogram/spec.js.map +1 -0
- package/dist/charts/chart-types/histogram/tool.d.ts +42 -0
- package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/tool.js +65 -0
- package/dist/charts/chart-types/histogram/tool.js.map +1 -0
- package/dist/charts/chart-types/index.d.ts +42 -0
- package/dist/charts/chart-types/index.d.ts.map +1 -0
- package/dist/charts/chart-types/index.js +53 -0
- package/dist/charts/chart-types/index.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js +15 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js +22 -0
- package/dist/charts/chart-types/line-chart/LineChartXFieldSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js +42 -0
- package/dist/charts/chart-types/line-chart/LineChartYFieldsSelector.js.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.js +26 -0
- package/dist/charts/chart-types/line-chart/definition.js.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts +72 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.js +34 -0
- package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts +5 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.js +123 -0
- package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts +66 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.js +75 -0
- package/dist/charts/chart-types/line-chart/tool.js.map +1 -0
- package/dist/charts/chart-types/line-chart/utils.d.ts +7 -0
- package/dist/charts/chart-types/line-chart/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/utils.js +17 -0
- package/dist/charts/chart-types/line-chart/utils.js.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts +103 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.js +20 -0
- package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts +3 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js +9 -0
- package/dist/charts/chart-types/scatter-plot/ScatterPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts +4 -0
- package/dist/charts/chart-types/scatter-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/definition.js +24 -0
- package/dist/charts/chart-types/scatter-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/schema.d.ts +23 -0
- package/dist/charts/chart-types/scatter-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/schema.js +17 -0
- package/dist/charts/chart-types/scatter-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts +5 -0
- package/dist/charts/chart-types/scatter-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/spec.js +81 -0
- package/dist/charts/chart-types/scatter-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts +42 -0
- package/dist/charts/chart-types/scatter-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/scatter-plot/tool.js +70 -0
- package/dist/charts/chart-types/scatter-plot/tool.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +23 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +23 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -0
- package/dist/charts/useBrushSelectionParams.d.ts +3 -0
- package/dist/charts/useBrushSelectionParams.d.ts.map +1 -0
- package/dist/charts/useBrushSelectionParams.js +16 -0
- package/dist/charts/useBrushSelectionParams.js.map +1 -0
- package/dist/charts/useChartDataPolicy.d.ts +5 -0
- package/dist/charts/useChartDataPolicy.d.ts.map +1 -0
- package/dist/charts/useChartDataPolicy.js +18 -0
- package/dist/charts/useChartDataPolicy.js.map +1 -0
- package/dist/charts/useChartPanelClients.d.ts +8 -0
- package/dist/charts/useChartPanelClients.d.ts.map +1 -0
- package/dist/charts/useChartPanelClients.js +22 -0
- package/dist/charts/useChartPanelClients.js.map +1 -0
- package/dist/charts/useChartRetainer.d.ts +4 -0
- package/dist/charts/useChartRetainer.d.ts.map +1 -0
- package/dist/charts/useChartRetainer.js +18 -0
- package/dist/charts/useChartRetainer.js.map +1 -0
- package/dist/charts/useChartTypeDefinition.d.ts +3 -0
- package/dist/charts/useChartTypeDefinition.d.ts.map +1 -0
- package/dist/charts/useChartTypeDefinition.js.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts +20 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.js +63 -0
- package/dist/charts/useMosaicChartRenderContext.js.map +1 -0
- package/dist/charts/useParseChartConfig.d.ts +12 -0
- package/dist/charts/useParseChartConfig.d.ts.map +1 -0
- package/dist/charts/useParseChartConfig.js +28 -0
- package/dist/charts/useParseChartConfig.js.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts +7 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.js +19 -0
- package/dist/charts/useRuntimeIssueReporter.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts +15 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.js +10 -0
- package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts +4 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js +37 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts +15 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js +10 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js.map +1 -0
- package/dist/column-types-utils.d.ts +12 -0
- package/dist/column-types-utils.d.ts.map +1 -0
- package/dist/column-types-utils.js +55 -0
- package/dist/column-types-utils.js.map +1 -0
- package/dist/components/AggregationSelector.d.ts +11 -0
- package/dist/components/AggregationSelector.d.ts.map +1 -0
- package/dist/components/AggregationSelector.js +16 -0
- package/dist/components/AggregationSelector.js.map +1 -0
- package/dist/components/BlockCaptionEditor.d.ts +20 -0
- package/dist/components/BlockCaptionEditor.d.ts.map +1 -0
- package/dist/components/BlockCaptionEditor.js +15 -0
- package/dist/components/BlockCaptionEditor.js.map +1 -0
- package/dist/components/ColorSelector.d.ts +12 -0
- package/dist/components/ColorSelector.d.ts.map +1 -0
- package/dist/components/ColorSelector.js +14 -0
- package/dist/components/ColorSelector.js.map +1 -0
- package/dist/components/ColumnSelector.d.ts +14 -0
- package/dist/components/ColumnSelector.d.ts.map +1 -0
- package/dist/components/ColumnSelector.js +30 -0
- package/dist/components/ColumnSelector.js.map +1 -0
- package/dist/components/ColumnsContext.d.ts +11 -0
- package/dist/components/ColumnsContext.d.ts.map +1 -0
- package/dist/components/ColumnsContext.js +15 -0
- package/dist/components/ColumnsContext.js.map +1 -0
- package/dist/components/Combobox.d.ts +45 -0
- package/dist/components/Combobox.d.ts.map +1 -0
- package/dist/components/Combobox.js +58 -0
- package/dist/components/Combobox.js.map +1 -0
- package/dist/components/DataTableSelector.d.ts +22 -0
- package/dist/components/DataTableSelector.d.ts.map +1 -0
- package/dist/components/DataTableSelector.js +66 -0
- package/dist/components/DataTableSelector.js.map +1 -0
- package/dist/components/Field.d.ts.map +1 -0
- package/dist/components/Field.js.map +1 -0
- package/dist/components/FieldSelectorInput.d.ts +15 -0
- package/dist/components/FieldSelectorInput.d.ts.map +1 -0
- package/dist/components/FieldSelectorInput.js +14 -0
- package/dist/components/FieldSelectorInput.js.map +1 -0
- package/dist/components/MultiFieldSelector.d.ts +17 -0
- package/dist/components/MultiFieldSelector.d.ts.map +1 -0
- package/dist/components/MultiFieldSelector.js +44 -0
- package/dist/components/MultiFieldSelector.js.map +1 -0
- package/dist/components/TableSelector.d.ts.map +1 -0
- package/dist/components/TableSelector.js +23 -0
- package/dist/components/TableSelector.js.map +1 -0
- package/dist/components/TemporalGranularitySelector.d.ts +10 -0
- package/dist/components/TemporalGranularitySelector.d.ts.map +1 -0
- package/dist/components/TemporalGranularitySelector.js +41 -0
- package/dist/components/TemporalGranularitySelector.js.map +1 -0
- package/dist/components/useCombobox.d.ts +23 -0
- package/dist/components/useCombobox.d.ts.map +1 -0
- package/dist/components/useCombobox.js +26 -0
- package/dist/components/useCombobox.js.map +1 -0
- package/dist/constants/chart-colors.d.ts +3 -0
- package/dist/constants/chart-colors.d.ts.map +1 -0
- package/dist/constants/chart-colors.js +5 -0
- package/dist/constants/chart-colors.js.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +5 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js +6 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -0
- package/dist/dashboard/MosaicDashboard.d.ts +2 -5
- package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboard.js +4 -6
- package/dist/dashboard/MosaicDashboard.js.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.d.ts +0 -2
- package/dist/dashboard/MosaicDashboardContext.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardContext.js.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.d.ts +52 -79
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +102 -52
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/action-types.d.ts +1 -1
- package/dist/dashboard/action-types.d.ts.map +1 -1
- package/dist/dashboard/action-types.js.map +1 -1
- package/dist/dashboard/components/ResetFiltersButton.d.ts +14 -0
- package/dist/dashboard/components/ResetFiltersButton.d.ts.map +1 -0
- package/dist/dashboard/components/ResetFiltersButton.js +15 -0
- package/dist/dashboard/components/ResetFiltersButton.js.map +1 -0
- package/dist/dashboard/core-types.d.ts +2 -8
- package/dist/dashboard/core-types.d.ts.map +1 -1
- package/dist/dashboard/core-types.js +2 -8
- package/dist/dashboard/core-types.js.map +1 -1
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts +3 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts.map +1 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js +11 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts +12 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js +32 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js.map +1 -0
- package/dist/dashboard/dashboard-types.d.ts +21 -57
- package/dist/dashboard/dashboard-types.d.ts.map +1 -1
- package/dist/dashboard/dashboard-types.js +7 -15
- package/dist/dashboard/dashboard-types.js.map +1 -1
- package/dist/dashboard/defaultPanelActions.d.ts.map +1 -1
- package/dist/dashboard/defaultPanelActions.js +3 -5
- package/dist/dashboard/defaultPanelActions.js.map +1 -1
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts +14 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js +39 -0
- package/dist/dashboard/hooks/useDashboardResetFilters.js.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts +16 -0
- package/dist/dashboard/hooks/usePanelResetFilters.d.ts.map +1 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js +47 -0
- package/dist/dashboard/hooks/usePanelResetFilters.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js +23 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js +21 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts +13 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js +30 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js +63 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +3 -3
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js +18 -0
- package/dist/dashboard/toolbar/MosaicDashboardDataTableSelector.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +4 -32
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts +2 -2
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -1
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +15 -4
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -1
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +1 -1
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -1
- package/dist/dashboard/usePanelClientRegistration.d.ts +7 -0
- package/dist/dashboard/usePanelClientRegistration.d.ts.map +1 -0
- package/dist/dashboard/usePanelClientRegistration.js +30 -0
- package/dist/dashboard/usePanelClientRegistration.js.map +1 -0
- package/dist/dashboard/usePanelClients.d.ts +7 -0
- package/dist/dashboard/usePanelClients.d.ts.map +1 -0
- package/dist/dashboard/usePanelClients.js +13 -0
- package/dist/dashboard/usePanelClients.js.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.js +1 -1
- package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -1
- package/dist/data-table-explorer/DataTableExplorer.d.ts +39 -0
- package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorer.js +67 -0
- package/dist/data-table-explorer/DataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +50 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +122 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +28 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts +7 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js +195 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +69 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +179 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +37 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js +28 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +24 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts +3 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js +9 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +49 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js +132 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js +13 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerHeaderActions.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +43 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts +13 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js +32 -0
- package/dist/data-table-explorer/dashboard/useDataTableExplorerPanelClients.js.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts +68 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.js +130 -0
- package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts +12 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js +19 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerColumns.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts +30 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js +120 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerLifecycles.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts +28 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js +40 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerQueryState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts +13 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js +40 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerSelection.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts +18 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js +23 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStatus.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts +27 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js +28 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerStoreState.js.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts +15 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.d.ts.map +1 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js +21 -0
- package/dist/data-table-explorer/hooks/useDataTableExplorerVisiblePage.js.map +1 -0
- package/dist/data-table-explorer/layout.d.ts +11 -0
- package/dist/data-table-explorer/layout.d.ts.map +1 -0
- package/dist/data-table-explorer/layout.js +23 -0
- package/dist/data-table-explorer/layout.js.map +1 -0
- package/dist/data-table-explorer/types.d.ts +90 -0
- package/dist/data-table-explorer/types.d.ts.map +1 -0
- package/dist/data-table-explorer/types.js.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts +7 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.js +95 -0
- package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/utils.d.ts +61 -0
- package/dist/data-table-explorer/utils.d.ts.map +1 -0
- package/dist/data-table-explorer/utils.js +349 -0
- package/dist/data-table-explorer/utils.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +12 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +9 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts +4 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +35 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -0
- package/dist/editor/MosaicChartContainer.d.ts +4 -4
- package/dist/editor/MosaicChartContainer.js +4 -4
- package/dist/editor/MosaicChartContainer.js.map +1 -1
- package/dist/hooks/useTablesWithColumns.d.ts.map +1 -0
- package/dist/hooks/useTablesWithColumns.js +13 -0
- package/dist/hooks/useTablesWithColumns.js.map +1 -0
- package/dist/index.d.ts +46 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -27
- package/dist/index.js.map +1 -1
- package/dist/schemas/common.d.ts +20 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +15 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/useVgPlotChartRender.d.ts.map +1 -1
- package/dist/useVgPlotChartRender.js +142 -31
- package/dist/useVgPlotChartRender.js.map +1 -1
- package/dist/useVgPlotChartRetention.d.ts +11 -0
- package/dist/useVgPlotChartRetention.d.ts.map +1 -1
- package/dist/useVgPlotChartRetention.js.map +1 -1
- package/package.json +14 -13
- package/dist/boxplot/BoxPlotClient.d.ts +0 -65
- package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
- package/dist/boxplot/BoxPlotClient.js +0 -286
- package/dist/boxplot/BoxPlotClient.js.map +0 -1
- package/dist/chart/ChartRuntimeIssuePanel.d.ts +0 -7
- package/dist/chart/ChartRuntimeIssuePanel.d.ts.map +0 -1
- package/dist/chart/ChartRuntimeIssuePanel.js +0 -10
- package/dist/chart/ChartRuntimeIssuePanel.js.map +0 -1
- package/dist/chart/MosaicDashboardChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChart.js +0 -21
- package/dist/chart/MosaicDashboardChart.js.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.d.ts +0 -16
- package/dist/chart/MosaicDashboardChartContent.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.js +0 -45
- package/dist/chart/MosaicDashboardChartContent.js.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +0 -4
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.js +0 -16
- package/dist/chart/MosaicDashboardChartHeaderActions.js.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.d.ts +0 -4
- package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.js +0 -31
- package/dist/chart/MosaicDashboardChartRenderer.js.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.d.ts +0 -18
- package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.js +0 -14
- package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.js +0 -10
- package/dist/chart/MosaicDashboardVgPlotChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.d.ts +0 -8
- package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.js +0 -11
- package/dist/chart/MosaicDashboardVgPlotError.js.map +0 -1
- package/dist/chart/addChartPanelAction.d.ts.map +0 -1
- package/dist/chart/addChartPanelAction.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.d.ts +0 -44
- package/dist/chart/chart-settings/ChartSettings.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.js +0 -74
- package/dist/chart/chart-settings/ChartSettings.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts +0 -13
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.js +0 -18
- package/dist/chart/chart-settings/ChartSettingsContent.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts +0 -25
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.js +0 -34
- package/dist/chart/chart-settings/ChartSettingsContext.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +0 -14
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.js +0 -17
- package/dist/chart/chart-settings/ChartSettingsPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +0 -9
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js +0 -11
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts +0 -9
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.js +0 -16
- package/dist/chart/chart-settings/ChartTypeSelector.js.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.d.ts +0 -3
- package/dist/chart/chart-settings/useTableColumns.d.ts.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.js +0 -12
- package/dist/chart/chart-settings/useTableColumns.js.map +0 -1
- package/dist/chart/useBrushSelectionParams.d.ts +0 -3
- package/dist/chart/useBrushSelectionParams.d.ts.map +0 -1
- package/dist/chart/useBrushSelectionParams.js +0 -16
- package/dist/chart/useBrushSelectionParams.js.map +0 -1
- package/dist/chart/useChartRetainer.d.ts +0 -3
- package/dist/chart/useChartRetainer.d.ts.map +0 -1
- package/dist/chart/useChartRetainer.js +0 -11
- package/dist/chart/useChartRetainer.js.map +0 -1
- package/dist/chart/useGenerateSpec.d.ts +0 -13
- package/dist/chart/useGenerateSpec.d.ts.map +0 -1
- package/dist/chart/useGenerateSpec.js +0 -32
- package/dist/chart/useGenerateSpec.js.map +0 -1
- package/dist/chart-builders/AggregationSelector.d.ts +0 -11
- package/dist/chart-builders/AggregationSelector.d.ts.map +0 -1
- package/dist/chart-builders/AggregationSelector.js +0 -9
- package/dist/chart-builders/AggregationSelector.js.map +0 -1
- package/dist/chart-builders/ColumnSelector.d.ts +0 -13
- package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
- package/dist/chart-builders/ColumnSelector.js +0 -30
- package/dist/chart-builders/ColumnSelector.js.map +0 -1
- package/dist/chart-builders/ColumnsContext.d.ts +0 -13
- package/dist/chart-builders/ColumnsContext.d.ts.map +0 -1
- package/dist/chart-builders/ColumnsContext.js +0 -15
- package/dist/chart-builders/ColumnsContext.js.map +0 -1
- package/dist/chart-builders/Field.d.ts.map +0 -1
- package/dist/chart-builders/Field.js.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.d.ts +0 -14
- package/dist/chart-builders/FieldSelectorInput.d.ts.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.js +0 -19
- package/dist/chart-builders/FieldSelectorInput.js.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.d.ts +0 -14
- package/dist/chart-builders/MultiFieldSelector.d.ts.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.js +0 -53
- package/dist/chart-builders/MultiFieldSelector.js.map +0 -1
- package/dist/chart-builders/TableSelector.d.ts.map +0 -1
- package/dist/chart-builders/TableSelector.js +0 -23
- package/dist/chart-builders/TableSelector.js.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.d.ts +0 -10
- package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.js +0 -37
- package/dist/chart-builders/TemporalGranularitySelector.js.map +0 -1
- package/dist/chart-builders/constants.d.ts +0 -12
- package/dist/chart-builders/constants.d.ts.map +0 -1
- package/dist/chart-builders/constants.js +0 -47
- package/dist/chart-builders/constants.js.map +0 -1
- package/dist/chart-types/base-types.d.ts +0 -168
- package/dist/chart-types/base-types.d.ts.map +0 -1
- package/dist/chart-types/base-types.js +0 -11
- package/dist/chart-types/base-types.js.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.js +0 -9
- package/dist/chart-types/box-plot/BoxPlotSettings.js.map +0 -1
- package/dist/chart-types/box-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/box-plot/definition.js +0 -24
- package/dist/chart-types/box-plot/definition.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +0 -118
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.d.ts +0 -24
- package/dist/chart-types/box-plot/renderer/constants.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.d.ts +0 -14
- package/dist/chart-types/box-plot/renderer/plot.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +0 -18
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -56
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.d.ts +0 -6
- package/dist/chart-types/box-plot/renderer/utils.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.js.map +0 -1
- package/dist/chart-types/box-plot/schema.d.ts +0 -21
- package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/box-plot/schema.js +0 -13
- package/dist/chart-types/box-plot/schema.js.map +0 -1
- package/dist/chart-types/box-plot/tool.d.ts +0 -40
- package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/box-plot/tool.js +0 -67
- package/dist/chart-types/box-plot/tool.js.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts +0 -3
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js +0 -9
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
- package/dist/chart-types/bubble-chart/definition.d.ts +0 -4
- package/dist/chart-types/bubble-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/definition.js +0 -24
- package/dist/chart-types/bubble-chart/definition.js.map +0 -1
- package/dist/chart-types/bubble-chart/schema.d.ts +0 -23
- package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/schema.js +0 -17
- package/dist/chart-types/bubble-chart/schema.js.map +0 -1
- package/dist/chart-types/bubble-chart/spec.d.ts +0 -4
- package/dist/chart-types/bubble-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/spec.js +0 -31
- package/dist/chart-types/bubble-chart/spec.js.map +0 -1
- package/dist/chart-types/bubble-chart/tool.d.ts +0 -42
- package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/tool.js +0 -66
- package/dist/chart-types/bubble-chart/tool.js.map +0 -1
- package/dist/chart-types/chart-config.d.ts +0 -138
- package/dist/chart-types/chart-config.d.ts.map +0 -1
- package/dist/chart-types/chart-config.js +0 -49
- package/dist/chart-types/chart-config.js.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.js +0 -9
- package/dist/chart-types/count-plot/CountPlotSettings.js.map +0 -1
- package/dist/chart-types/count-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/count-plot/definition.js +0 -19
- package/dist/chart-types/count-plot/definition.js.map +0 -1
- package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/count-plot/schema.js.map +0 -1
- package/dist/chart-types/count-plot/spec.d.ts +0 -4
- package/dist/chart-types/count-plot/spec.d.ts.map +0 -1
- package/dist/chart-types/count-plot/spec.js +0 -49
- package/dist/chart-types/count-plot/spec.js.map +0 -1
- package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/count-plot/tool.js +0 -63
- package/dist/chart-types/count-plot/tool.js.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.js +0 -30
- package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +0 -1
- package/dist/chart-types/custom-spec/definition.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/definition.js +0 -22
- package/dist/chart-types/custom-spec/definition.js.map +0 -1
- package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/schema.js.map +0 -1
- package/dist/chart-types/custom-spec/spec.d.ts +0 -4
- package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/spec.js +0 -24
- package/dist/chart-types/custom-spec/spec.js.map +0 -1
- package/dist/chart-types/data-policy-schema.d.ts.map +0 -1
- package/dist/chart-types/data-policy-schema.js.map +0 -1
- package/dist/chart-types/errors.d.ts +0 -23
- package/dist/chart-types/errors.d.ts.map +0 -1
- package/dist/chart-types/errors.js +0 -26
- package/dist/chart-types/errors.js.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.js +0 -9
- package/dist/chart-types/heatmap/HeatmapSettings.js.map +0 -1
- package/dist/chart-types/heatmap/definition.d.ts.map +0 -1
- package/dist/chart-types/heatmap/definition.js +0 -19
- package/dist/chart-types/heatmap/definition.js.map +0 -1
- package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
- package/dist/chart-types/heatmap/schema.js.map +0 -1
- package/dist/chart-types/heatmap/spec.d.ts +0 -4
- package/dist/chart-types/heatmap/spec.d.ts.map +0 -1
- package/dist/chart-types/heatmap/spec.js +0 -32
- package/dist/chart-types/heatmap/spec.js.map +0 -1
- package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
- package/dist/chart-types/heatmap/tool.js +0 -67
- package/dist/chart-types/heatmap/tool.js.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.d.ts.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.js +0 -11
- package/dist/chart-types/histogram/HistogramSettings.js.map +0 -1
- package/dist/chart-types/histogram/definition.d.ts.map +0 -1
- package/dist/chart-types/histogram/definition.js +0 -19
- package/dist/chart-types/histogram/definition.js.map +0 -1
- package/dist/chart-types/histogram/schema.d.ts +0 -24
- package/dist/chart-types/histogram/schema.d.ts.map +0 -1
- package/dist/chart-types/histogram/schema.js +0 -26
- package/dist/chart-types/histogram/schema.js.map +0 -1
- package/dist/chart-types/histogram/spec.d.ts +0 -4
- package/dist/chart-types/histogram/spec.d.ts.map +0 -1
- package/dist/chart-types/histogram/spec.js +0 -37
- package/dist/chart-types/histogram/spec.js.map +0 -1
- package/dist/chart-types/histogram/tool.d.ts +0 -40
- package/dist/chart-types/histogram/tool.d.ts.map +0 -1
- package/dist/chart-types/histogram/tool.js +0 -65
- package/dist/chart-types/histogram/tool.js.map +0 -1
- package/dist/chart-types/index.d.ts +0 -157
- package/dist/chart-types/index.d.ts.map +0 -1
- package/dist/chart-types/index.js +0 -106
- package/dist/chart-types/index.js.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.js +0 -24
- package/dist/chart-types/line-chart/LineChartSettings.js.map +0 -1
- package/dist/chart-types/line-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/line-chart/definition.js +0 -26
- package/dist/chart-types/line-chart/definition.js.map +0 -1
- package/dist/chart-types/line-chart/schema.d.ts +0 -88
- package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/line-chart/schema.js +0 -41
- package/dist/chart-types/line-chart/schema.js.map +0 -1
- package/dist/chart-types/line-chart/spec.d.ts +0 -4
- package/dist/chart-types/line-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/line-chart/spec.js +0 -91
- package/dist/chart-types/line-chart/spec.js.map +0 -1
- package/dist/chart-types/line-chart/tool.d.ts +0 -64
- package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/line-chart/tool.js +0 -74
- package/dist/chart-types/line-chart/tool.js.map +0 -1
- package/dist/chart-types/list-panels-tool.d.ts +0 -35
- package/dist/chart-types/list-panels-tool.d.ts.map +0 -1
- package/dist/chart-types/list-panels-tool.js.map +0 -1
- package/dist/chart-types/profiler-tool.d.ts +0 -40
- package/dist/chart-types/profiler-tool.d.ts.map +0 -1
- package/dist/chart-types/profiler-tool.js +0 -73
- package/dist/chart-types/profiler-tool.js.map +0 -1
- package/dist/chart-types/remove-panel-tool.d.ts +0 -31
- package/dist/chart-types/remove-panel-tool.d.ts.map +0 -1
- package/dist/chart-types/remove-panel-tool.js.map +0 -1
- package/dist/chart-types/text-panel-tool.d.ts +0 -42
- package/dist/chart-types/text-panel-tool.d.ts.map +0 -1
- package/dist/chart-types/text-panel-tool.js +0 -71
- package/dist/chart-types/text-panel-tool.js.map +0 -1
- package/dist/chart-types/tool-helpers.d.ts +0 -44
- package/dist/chart-types/tool-helpers.d.ts.map +0 -1
- package/dist/chart-types/tool-helpers.js +0 -129
- package/dist/chart-types/tool-helpers.js.map +0 -1
- package/dist/chart-types/tool-schemas.d.ts.map +0 -1
- package/dist/chart-types/tool-schemas.js.map +0 -1
- package/dist/chart-types/tool-types.d.ts +0 -26
- package/dist/chart-types/tool-types.d.ts.map +0 -1
- package/dist/chart-types/tool-types.js.map +0 -1
- package/dist/chart-types/tool-validation.d.ts +0 -3
- package/dist/chart-types/tool-validation.d.ts.map +0 -1
- package/dist/chart-types/tool-validation.js.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.d.ts +0 -3
- package/dist/chart-types/useChartTypeDefinition.d.ts.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.js.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +0 -17
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.js +0 -21
- package/dist/dashboard/DashboardPanelErrorBoundary.js.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts +0 -2
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.js +0 -14
- package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.js +0 -23
- package/dist/dashboard/MosaicDashboardPanel.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +0 -17
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +0 -13
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.js +0 -30
- package/dist/dashboard/MosaicDashboardPanelHeader.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.js +0 -54
- package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.d.ts +0 -3
- package/dist/dashboard/defaultPanelRenderers.d.ts.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.js +0 -13
- package/dist/dashboard/defaultPanelRenderers.js.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts +0 -6
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.d.ts.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js +0 -46
- package/dist/dashboard/initial-state/BuildDashboardManuallyPanel.js.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts +0 -7
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.d.ts.map +0 -1
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js +0 -29
- package/dist/dashboard/initial-state/BuildDashboardWithAIPanel.js.map +0 -1
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts +0 -6
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.d.ts.map +0 -1
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.js +0 -9
- package/dist/dashboard/initial-state/MosaicDashboardInitialState.js.map +0 -1
- package/dist/dashboard/useTablesWithColumns.d.ts.map +0 -1
- package/dist/dashboard/useTablesWithColumns.js +0 -13
- package/dist/dashboard/useTablesWithColumns.js.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -4
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +0 -32
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +0 -1
- package/dist/profiler/MosaicProfiler.d.ts +0 -32
- package/dist/profiler/MosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/MosaicProfiler.js +0 -57
- package/dist/profiler/MosaicProfiler.js.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.d.ts +0 -7
- package/dist/profiler/MosaicProfilerHeader.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.js +0 -196
- package/dist/profiler/MosaicProfilerHeader.js.map +0 -1
- package/dist/profiler/MosaicProfilerRows.d.ts +0 -9
- package/dist/profiler/MosaicProfilerRows.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerRows.js +0 -65
- package/dist/profiler/MosaicProfilerRows.js.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.d.ts +0 -9
- package/dist/profiler/MosaicProfilerStatusBar.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.js +0 -28
- package/dist/profiler/MosaicProfilerStatusBar.js.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.d.ts +0 -50
- package/dist/profiler/ProfilerCategoryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.js +0 -121
- package/dist/profiler/ProfilerCategoryClient.js.map +0 -1
- package/dist/profiler/ProfilerCountClient.d.ts +0 -28
- package/dist/profiler/ProfilerCountClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCountClient.js +0 -51
- package/dist/profiler/ProfilerCountClient.js.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.d.ts +0 -69
- package/dist/profiler/ProfilerHistogramClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.js +0 -179
- package/dist/profiler/ProfilerHistogramClient.js.map +0 -1
- package/dist/profiler/ProfilerPageClient.d.ts +0 -37
- package/dist/profiler/ProfilerPageClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerPageClient.js +0 -65
- package/dist/profiler/ProfilerPageClient.js.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts +0 -24
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js +0 -51
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js.map +0 -1
- package/dist/profiler/addProfilerPanelAction.d.ts +0 -3
- package/dist/profiler/addProfilerPanelAction.d.ts.map +0 -1
- package/dist/profiler/addProfilerPanelAction.js +0 -9
- package/dist/profiler/addProfilerPanelAction.js.map +0 -1
- package/dist/profiler/createProfilerStore.d.ts +0 -45
- package/dist/profiler/createProfilerStore.d.ts.map +0 -1
- package/dist/profiler/createProfilerStore.js +0 -120
- package/dist/profiler/createProfilerStore.js.map +0 -1
- package/dist/profiler/layout.d.ts +0 -7
- package/dist/profiler/layout.d.ts.map +0 -1
- package/dist/profiler/layout.js +0 -13
- package/dist/profiler/layout.js.map +0 -1
- package/dist/profiler/profilerController.d.ts +0 -64
- package/dist/profiler/profilerController.d.ts.map +0 -1
- package/dist/profiler/profilerController.js +0 -123
- package/dist/profiler/profilerController.js.map +0 -1
- package/dist/profiler/types.d.ts +0 -86
- package/dist/profiler/types.d.ts.map +0 -1
- package/dist/profiler/types.js.map +0 -1
- package/dist/profiler/useMosaicProfiler.d.ts +0 -7
- package/dist/profiler/useMosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/useMosaicProfiler.js +0 -339
- package/dist/profiler/useMosaicProfiler.js.map +0 -1
- package/dist/profiler/utils.d.ts +0 -61
- package/dist/profiler/utils.d.ts.map +0 -1
- package/dist/profiler/utils.js +0 -347
- package/dist/profiler/utils.js.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.d.ts +0 -4
- package/dist/text/MosaicDashboardTextRenderer.d.ts.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.js +0 -46
- package/dist/text/MosaicDashboardTextRenderer.js.map +0 -1
- package/dist/text/addTextPanelAction.d.ts +0 -3
- package/dist/text/addTextPanelAction.d.ts.map +0 -1
- package/dist/text/addTextPanelAction.js +0 -9
- package/dist/text/addTextPanelAction.js.map +0 -1
- /package/dist/{chart-types → ai}/list-panels-tool.js +0 -0
- /package/dist/{chart-types → ai}/remove-panel-tool.js +0 -0
- /package/dist/{chart-types → ai}/tool-schemas.d.ts +0 -0
- /package/dist/{chart-types → ai}/tool-schemas.js +0 -0
- /package/dist/{chart-types → ai}/tool-types.js +0 -0
- /package/dist/{chart-types → ai}/tool-validation.js +0 -0
- /package/dist/{chart → charts}/addChartPanelAction.d.ts +0 -0
- /package/dist/{chart → charts}/addChartPanelAction.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/BoxPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotPanelRenderer.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/constants.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/plot.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/utils.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/CountPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/tool.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/CustomSpecSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/data-policy-schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/data-policy-schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/HeatmapSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/schema.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/schema.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/tool.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/HistogramSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/LineChartSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/definition.d.ts +0 -0
- /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
- /package/dist/{chart-builders → components}/Field.d.ts +0 -0
- /package/dist/{chart-builders → components}/Field.js +0 -0
- /package/dist/{chart-builders → components}/TableSelector.d.ts +0 -0
- /package/dist/dashboard/{MosaicDashboardPanel.d.ts → panel/MosaicDashboardPanel.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelDragOverlay.d.ts → panel/MosaicDashboardPanelDragOverlay.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.d.ts → panel/MosaicDashboardPanelLayout.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.js → panel/MosaicDashboardPanelLayout.js} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanels.d.ts → panel/MosaicDashboardPanels.d.ts} +0 -0
- /package/dist/{profiler → data-table-explorer}/types.js +0 -0
- /package/dist/{dashboard → hooks}/useTablesWithColumns.d.ts +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LeafLayout, useExpandGridPanel } from '@sqlrooms/layout';
|
|
3
|
+
import { Button, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '@sqlrooms/ui';
|
|
4
|
+
import { ChevronsRightLeftIcon, GripVerticalIcon, MoveHorizontalIcon, Trash2Icon, } from 'lucide-react';
|
|
5
|
+
import { useCallback } from 'react';
|
|
6
|
+
import { useStoreWithMosaicDashboard, } from '../MosaicDashboardSlice';
|
|
7
|
+
export const MosaicDashboardPanelHeader = ({ dashboardId, dashboard, panel, renderer, selectionName }) => {
|
|
8
|
+
const panelId = panel?.id;
|
|
9
|
+
const removePanel = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.removePanel);
|
|
10
|
+
const { canExpandGridPanel, expandGridPanel, isGridPanelHorizontallyExpanded } = useExpandGridPanel();
|
|
11
|
+
const handleRemove = useCallback(() => {
|
|
12
|
+
if (!panelId)
|
|
13
|
+
return;
|
|
14
|
+
removePanel(dashboardId, panelId);
|
|
15
|
+
}, [dashboardId, panelId, removePanel]);
|
|
16
|
+
const title = panel?.title ?? 'Dashboard panel';
|
|
17
|
+
const Icon = renderer?.icon;
|
|
18
|
+
const HeaderActions = renderer?.headerActions;
|
|
19
|
+
const expandLabel = isGridPanelHorizontallyExpanded
|
|
20
|
+
? 'Shrink panel horizontally'
|
|
21
|
+
: 'Expand panel horizontally';
|
|
22
|
+
const ExpandIcon = isGridPanelHorizontallyExpanded
|
|
23
|
+
? ChevronsRightLeftIcon
|
|
24
|
+
: MoveHorizontalIcon;
|
|
25
|
+
const rendererProps = dashboard && panel
|
|
26
|
+
? { dashboardId, dashboard, panel, selectionName }
|
|
27
|
+
: undefined;
|
|
28
|
+
return (_jsx(LeafLayout.Header, { children: _jsxs("div", { className: "flex items-center justify-between border-b px-2 py-1", children: [_jsxs(LeafLayout.DragHandle, { className: "flex min-w-0 flex-1 items-center gap-1", children: [_jsx(GripVerticalIcon, { className: "mx-1 h-4 w-4 shrink-0" }), Icon ? _jsx(Icon, { className: "h-3.5 w-3.5 shrink-0" }) : null, _jsx("span", { className: "truncate text-xs font-medium", children: title })] }), panel && rendererProps ? (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs("div", { className: "flex items-center gap-0.5", children: [HeaderActions ? _jsx(HeaderActions, { ...rendererProps }) : null, canExpandGridPanel ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", "aria-label": expandLabel, onClick: expandGridPanel, children: _jsx(ExpandIcon, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: expandLabel })] })) : null, _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6", "aria-label": "Remove dashboard panel", onClick: handleRemove, children: _jsx(Trash2Icon, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Remove dashboard panel" })] })] }) })) : null] }) }));
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=MosaicDashboardPanelHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardPanelHeader.js","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanelHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EACL,MAAM,EACN,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,GACX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAK,WAAW,EAAC,MAAM,OAAO,CAAC;AAKtC,OAAO,EAGL,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AAUjC,MAAM,CAAC,MAAM,0BAA0B,GAEnC,CAAC,EAAC,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAC,EAAE,EAAE;IAC/D,MAAM,OAAO,GAAG,KAAK,EAAE,EAAE,CAAC;IAC1B,MAAM,WAAW,GAAG,2BAA2B,CAC7C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAC7C,CAAC;IACF,MAAM,EAAC,kBAAkB,EAAE,eAAe,EAAE,+BAA+B,EAAC,GAC1E,kBAAkB,EAAE,CAAC;IAEvB,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,IAAI,CAAC,OAAO;YAAE,OAAO;QACrB,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;IAExC,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,IAAI,iBAAiB,CAAC;IAChD,MAAM,IAAI,GAAG,QAAQ,EAAE,IAAI,CAAC;IAC5B,MAAM,aAAa,GAAG,QAAQ,EAAE,aAAa,CAAC;IAC9C,MAAM,WAAW,GAAG,+BAA+B;QACjD,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,2BAA2B,CAAC;IAChC,MAAM,UAAU,GAAG,+BAA+B;QAChD,CAAC,CAAC,qBAAqB;QACvB,CAAC,CAAC,kBAAkB,CAAC;IACvB,MAAM,aAAa,GACjB,SAAS,IAAI,KAAK;QAChB,CAAC,CAAC,EAAC,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,EAAC;QAChD,CAAC,CAAC,SAAS,CAAC;IAEhB,OAAO,CACL,KAAC,UAAU,CAAC,MAAM,cAChB,eAAK,SAAS,EAAC,sDAAsD,aACnE,MAAC,UAAU,CAAC,UAAU,IAAC,SAAS,EAAC,wCAAwC,aACvE,KAAC,gBAAgB,IAAC,SAAS,EAAC,uBAAuB,GAAG,EACrD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,SAAS,EAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,IAAI,EACxD,eAAM,SAAS,EAAC,8BAA8B,YAAE,KAAK,GAAQ,IACvC,EAEvB,KAAK,IAAI,aAAa,CAAC,CAAC,CAAC,CACxB,KAAC,eAAe,IAAC,aAAa,EAAE,GAAG,YACjC,eAAK,SAAS,EAAC,2BAA2B,aACvC,aAAa,CAAC,CAAC,CAAC,KAAC,aAAa,OAAK,aAAa,GAAI,CAAC,CAAC,CAAC,IAAI,EAC3D,kBAAkB,CAAC,CAAC,CAAC,CACpB,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,SAAS,gBACP,WAAW,EACvB,OAAO,EAAE,eAAe,YAExB,KAAC,UAAU,IAAC,SAAS,EAAC,aAAa,GAAG,GAC/B,GACM,EACjB,KAAC,cAAc,cAAE,WAAW,GAAkB,IACtC,CACX,CAAC,CAAC,CAAC,IAAI,EACR,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,MAAM,EACX,SAAS,EAAC,SAAS,gBACR,wBAAwB,EACnC,OAAO,EAAE,YAAY,YAErB,KAAC,UAAU,IAAC,SAAS,EAAC,aAAa,GAAG,GAC/B,GACM,EACjB,KAAC,cAAc,yCAAwC,IAC/C,IACN,GACU,CACnB,CAAC,CAAC,CAAC,IAAI,IACJ,GACY,CACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {LeafLayout, useExpandGridPanel} from '@sqlrooms/layout';\nimport {\n Button,\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@sqlrooms/ui';\nimport {\n ChevronsRightLeftIcon,\n GripVerticalIcon,\n MoveHorizontalIcon,\n Trash2Icon,\n} from 'lucide-react';\nimport {FC, useCallback} from 'react';\nimport type {\n MosaicDashboardEntry,\n MosaicDashboardPanelConfig,\n} from '../dashboard-types';\nimport {\n type MosaicDashboardPanelRenderer,\n type MosaicDashboardPanelRendererProps,\n useStoreWithMosaicDashboard,\n} from '../MosaicDashboardSlice';\n\ntype MosaicDashboardPanelHeaderProps = {\n dashboardId: string;\n dashboard?: MosaicDashboardEntry;\n panel?: MosaicDashboardPanelConfig;\n renderer?: MosaicDashboardPanelRenderer;\n selectionName: string;\n};\n\nexport const MosaicDashboardPanelHeader: FC<\n MosaicDashboardPanelHeaderProps\n> = ({dashboardId, dashboard, panel, renderer, selectionName}) => {\n const panelId = panel?.id;\n const removePanel = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.removePanel,\n );\n const {canExpandGridPanel, expandGridPanel, isGridPanelHorizontallyExpanded} =\n useExpandGridPanel();\n\n const handleRemove = useCallback(() => {\n if (!panelId) return;\n removePanel(dashboardId, panelId);\n }, [dashboardId, panelId, removePanel]);\n\n const title = panel?.title ?? 'Dashboard panel';\n const Icon = renderer?.icon;\n const HeaderActions = renderer?.headerActions;\n const expandLabel = isGridPanelHorizontallyExpanded\n ? 'Shrink panel horizontally'\n : 'Expand panel horizontally';\n const ExpandIcon = isGridPanelHorizontallyExpanded\n ? ChevronsRightLeftIcon\n : MoveHorizontalIcon;\n const rendererProps: MosaicDashboardPanelRendererProps | undefined =\n dashboard && panel\n ? {dashboardId, dashboard, panel, selectionName}\n : undefined;\n\n return (\n <LeafLayout.Header>\n <div className=\"flex items-center justify-between border-b px-2 py-1\">\n <LeafLayout.DragHandle className=\"flex min-w-0 flex-1 items-center gap-1\">\n <GripVerticalIcon className=\"mx-1 h-4 w-4 shrink-0\" />\n {Icon ? <Icon className=\"h-3.5 w-3.5 shrink-0\" /> : null}\n <span className=\"truncate text-xs font-medium\">{title}</span>\n </LeafLayout.DragHandle>\n\n {panel && rendererProps ? (\n <TooltipProvider delayDuration={300}>\n <div className=\"flex items-center gap-0.5\">\n {HeaderActions ? <HeaderActions {...rendererProps} /> : null}\n {canExpandGridPanel ? (\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-6 w-6\"\n aria-label={expandLabel}\n onClick={expandGridPanel}\n >\n <ExpandIcon className=\"h-3.5 w-3.5\" />\n </Button>\n </TooltipTrigger>\n <TooltipContent>{expandLabel}</TooltipContent>\n </Tooltip>\n ) : null}\n <Tooltip>\n <TooltipTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-6 w-6\"\n aria-label=\"Remove dashboard panel\"\n onClick={handleRemove}\n >\n <Trash2Icon className=\"h-3.5 w-3.5\" />\n </Button>\n </TooltipTrigger>\n <TooltipContent>Remove dashboard panel</TooltipContent>\n </Tooltip>\n </div>\n </TooltipProvider>\n ) : null}\n </div>\n </LeafLayout.Header>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardPanelLayout.d.ts","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanelLayout.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAC,EAAE,EAA8B,MAAM,OAAO,CAAC;AAE7D,KAAK,+BAA+B,GAAG;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,0BAA0B,EAAE,EAAE,CACzC,+BAA+B,CA0EhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardPanelLayout.js","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanelLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,GAEpB,MAAM,cAAc,CAAC;AACtB,OAAc,EAAK,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAS7D,MAAM,wBAAwB,GAAG,GAAG,CAAC,CAAC,SAAS;AAE/C,MAAM,CAAC,MAAM,0BAA0B,GAEnC,CAAC,EAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAC,EAAE,EAAE;IAClD,MAAM,QAAQ,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAClD,MAAM,CAAC,UAAU,CAClB,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,EAAE,CAAC;YACX,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;QAC7B,CAAC;aAAM,CAAC;YACN,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,iBAAiB,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAElC,OAAO,GAAG,EAAE;YACV,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC;QAEpD,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;YAC1B,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;QAED,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,EAAE,CAAC;YAC5B,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;IACH,CAAC,CAAC;IAEF,sEAAsE;IACtE,IAAI,cAAc,GAAG,wBAAwB,IAAI,MAAM,EAAE,CAAC;QACxD,OAAO,CACL,cAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,sBAAsB,YACrD,QAAQ,GACL,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,GAAG,EAAE,YAAY,EAAE,SAAS,EAAC,QAAQ,YACxC,MAAC,mBAAmB,IAAC,WAAW,EAAC,YAAY,EAAC,SAAS,EAAC,QAAQ,aAC9D,KAAC,cAAc,IACb,GAAG,EAAE,QAAQ,EACb,WAAW,EAAC,KAAK,EACjB,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,KAAK,EACb,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,CAAC,EAChB,SAAS,EAAC,eAAe,EACzB,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,GACM,EACjB,KAAC,eAAe,IAAC,SAAS,EAAC,MAAM,GAAG,EACpC,KAAC,cAAc,cAAE,OAAO,GAAkB,IACtB,GAClB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n type ResizablePanelHandle,\n} from '@sqlrooms/ui';\nimport React, {FC, useEffect, useRef, useState} from 'react';\n\ntype MosaicDashboardPanelLayoutProps = {\n isOpen?: boolean;\n onIsOpenChange?: (isOpen: boolean) => void;\n settings?: React.ReactNode;\n content?: React.ReactNode;\n};\n\nconst MIN_WIDTH_FOR_SPLIT_VIEW = 200; // pixels\n\nexport const MosaicDashboardPanelLayout: FC<\n MosaicDashboardPanelLayoutProps\n> = ({isOpen, onIsOpenChange, settings, content}) => {\n const panelRef = useRef<ResizablePanelHandle>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState<number>(\n window.innerWidth,\n );\n\n useEffect(() => {\n if (isOpen) {\n panelRef.current?.expand();\n } else {\n panelRef.current?.collapse();\n }\n }, [isOpen]);\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContainerWidth(entry.contentRect.width);\n }\n });\n\n resizeObserver.observe(container);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, []);\n\n const onResize = () => {\n const isCollapsed = panelRef.current?.isCollapsed();\n\n if (isCollapsed && isOpen) {\n onIsOpenChange?.(false);\n }\n\n if (!isCollapsed && !isOpen) {\n onIsOpenChange?.(true);\n }\n };\n\n // If container is too small and settings are open, show only settings\n if (containerWidth < MIN_WIDTH_FOR_SPLIT_VIEW && isOpen) {\n return (\n <div ref={containerRef} className=\"h-full overflow-auto\">\n {settings}\n </div>\n );\n }\n\n return (\n <div ref={containerRef} className=\"h-full\">\n <ResizablePanelGroup orientation=\"horizontal\" className=\"h-full\">\n <ResizablePanel\n ref={panelRef}\n defaultSize=\"35%\"\n minSize=\"30%\"\n maxSize=\"70%\"\n collapsible={true}\n collapsedSize={0}\n className=\"overflow-auto\"\n onResize={onResize}\n >\n {settings}\n </ResizablePanel>\n <ResizableHandle className=\"w-px\" />\n <ResizablePanel>{content}</ResizablePanel>\n </ResizablePanelGroup>\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardPanels.d.ts","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanels.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAqGzC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isLayoutDockNode, isLayoutGridNode, LayoutRenderer, } from '@sqlrooms/layout';
|
|
3
|
+
import { useCallback, useEffect, useMemo } from 'react';
|
|
4
|
+
import { useMosaicDashboardContext } from '../MosaicDashboardContext';
|
|
5
|
+
import { MosaicDashboardPanelDragOverlay } from './MosaicDashboardPanelDragOverlay';
|
|
6
|
+
import { MosaicDashboardPanel } from './MosaicDashboardPanel';
|
|
7
|
+
import { getMosaicDashboardDockId, MOSAIC_DASHBOARD_PANEL, useStoreWithMosaicDashboard, } from '../MosaicDashboardSlice';
|
|
8
|
+
import { DataTableSelectorEmptyState } from '../../components/DataTableSelector';
|
|
9
|
+
import { useTablesWithColumns } from '../../hooks/useTablesWithColumns';
|
|
10
|
+
const EMPTY_DASHBOARD_PANELS = [];
|
|
11
|
+
export const MosaicDashboardPanels = () => {
|
|
12
|
+
const { dashboardId } = useMosaicDashboardContext();
|
|
13
|
+
const registerPanel = useStoreWithMosaicDashboard((state) => state.layout.registerPanel);
|
|
14
|
+
const setLayout = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setLayout);
|
|
15
|
+
const panels = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels ??
|
|
16
|
+
EMPTY_DASHBOARD_PANELS);
|
|
17
|
+
const dashboardLayout = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.layout ?? null);
|
|
18
|
+
const dashboardLayoutType = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.layoutType ??
|
|
19
|
+
'dock');
|
|
20
|
+
const tables = useTablesWithColumns();
|
|
21
|
+
const selectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable);
|
|
22
|
+
const setSelectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setSelectedTable);
|
|
23
|
+
const handleTableChange = useCallback((table) => {
|
|
24
|
+
setSelectedTable(dashboardId, table.table.toString());
|
|
25
|
+
}, [dashboardId, setSelectedTable]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
// This renderer is shared by every Mosaic dashboard panel in the room.
|
|
28
|
+
// Dashboard blocks can be transiently unmounted by the surrounding editor,
|
|
29
|
+
// so unregistering on instance cleanup can leave still-mounted dashboards
|
|
30
|
+
// with layout panel shells but no chart renderer.
|
|
31
|
+
registerPanel(MOSAIC_DASHBOARD_PANEL, () => ({
|
|
32
|
+
title: 'Dashboard panel',
|
|
33
|
+
component: MosaicDashboardPanel,
|
|
34
|
+
dragOverlay: MosaicDashboardPanelDragOverlay,
|
|
35
|
+
}));
|
|
36
|
+
}, [registerPanel]);
|
|
37
|
+
const rootLayout = useMemo(() => {
|
|
38
|
+
if (!dashboardLayout)
|
|
39
|
+
return null;
|
|
40
|
+
if (dashboardLayoutType === 'grid') {
|
|
41
|
+
return isLayoutGridNode(dashboardLayout) ? dashboardLayout : null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
type: 'dock',
|
|
45
|
+
id: getMosaicDashboardDockId(dashboardId),
|
|
46
|
+
root: dashboardLayout,
|
|
47
|
+
};
|
|
48
|
+
}, [dashboardId, dashboardLayout, dashboardLayoutType]);
|
|
49
|
+
const handleLayoutChange = useCallback((nextLayout) => {
|
|
50
|
+
const innerLayout = nextLayout && isLayoutDockNode(nextLayout)
|
|
51
|
+
? nextLayout.root
|
|
52
|
+
: nextLayout;
|
|
53
|
+
setLayout(dashboardId, innerLayout);
|
|
54
|
+
}, [dashboardId, setLayout]);
|
|
55
|
+
if (!selectedTable) {
|
|
56
|
+
return (_jsx(DataTableSelectorEmptyState, { onChange: handleTableChange, tables: tables }));
|
|
57
|
+
}
|
|
58
|
+
if (!panels.length || !rootLayout) {
|
|
59
|
+
return (_jsx("div", { className: "flex h-full items-center justify-center p-4", children: _jsx("div", { className: "text-muted-foreground text-sm", children: "Dashboard is empty. Add a panel to get started." }) }));
|
|
60
|
+
}
|
|
61
|
+
return (_jsx("div", { className: "h-full min-h-[360px]", children: _jsx(LayoutRenderer, { rootLayout: rootLayout, onLayoutChange: handleLayoutChange }) }));
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=MosaicDashboardPanels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardPanels.js","sourceRoot":"","sources":["../../../src/dashboard/panel/MosaicDashboardPanels.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAEhB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACtD,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,2BAA2B,EAAC,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AAGtE,MAAM,sBAAsB,GAAiC,EAAE,CAAC;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAa,GAAG,EAAE;IAClD,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAClD,MAAM,aAAa,GAAG,2BAA2B,CAC/C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,aAAa,CACtC,CAAC;IACF,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAC3C,CAAC;IACF,MAAM,MAAM,GAAG,2BAA2B,CACxC,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM;QAChE,sBAAsB,CACzB,CAAC;IACF,MAAM,eAAe,GAAG,2BAA2B,CACjD,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,IAAI,CAC3E,CAAC;IACF,MAAM,mBAAmB,GAAG,2BAA2B,CACrD,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU;QACpE,MAAM,CACT,CAAC;IAEF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,2BAA2B,CAC/C,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,aAAa,CAC1E,CAAC;IACF,MAAM,gBAAgB,GAAG,2BAA2B,CAClD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,gBAAgB,CAClD,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,KAAgB,EAAE,EAAE;QACnB,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC,EACD,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAChC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,uEAAuE;QACvE,2EAA2E;QAC3E,0EAA0E;QAC1E,kDAAkD;QAClD,aAAa,CAAC,sBAAsB,EAAE,GAAG,EAAE,CAAC,CAAC;YAC3C,KAAK,EAAE,iBAAiB;YACxB,SAAS,EAAE,oBAAoB;YAC/B,WAAW,EAAE,+BAA+B;SAC7C,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAEpB,MAAM,UAAU,GAAsB,OAAO,CAAC,GAAG,EAAE;QACjD,IAAI,CAAC,eAAe;YAAE,OAAO,IAAI,CAAC;QAClC,IAAI,mBAAmB,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,CAAC;QACD,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,wBAAwB,CAAC,WAAW,CAAC;YACzC,IAAI,EAAE,eAAe;SACtB,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAExD,MAAM,kBAAkB,GAAG,WAAW,CACpC,CAAC,UAA6B,EAAE,EAAE;QAChC,MAAM,WAAW,GACf,UAAU,IAAI,gBAAgB,CAAC,UAAU,CAAC;YACxC,CAAC,CAAC,UAAU,CAAC,IAAI;YACjB,CAAC,CAAC,UAAU,CAAC;QACjB,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACtC,CAAC,EACD,CAAC,WAAW,EAAE,SAAS,CAAC,CACzB,CAAC;IAEF,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,CACL,KAAC,2BAA2B,IAC1B,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,GACd,CACH,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAClC,OAAO,CACL,cAAK,SAAS,EAAC,6CAA6C,YAC1D,cAAK,SAAS,EAAC,+BAA+B,gEAExC,GACF,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,sBAAsB,YACnC,KAAC,cAAc,IACb,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,kBAAkB,GAClC,GACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n isLayoutDockNode,\n isLayoutGridNode,\n LayoutNode,\n LayoutRenderer,\n} from '@sqlrooms/layout';\nimport {useCallback, useEffect, useMemo} from 'react';\nimport {useMosaicDashboardContext} from '../MosaicDashboardContext';\nimport {MosaicDashboardPanelDragOverlay} from './MosaicDashboardPanelDragOverlay';\nimport {MosaicDashboardPanel} from './MosaicDashboardPanel';\nimport type {MosaicDashboardPanelConfig} from '../dashboard-types';\nimport {\n getMosaicDashboardDockId,\n MOSAIC_DASHBOARD_PANEL,\n useStoreWithMosaicDashboard,\n} from '../MosaicDashboardSlice';\nimport {DataTableSelectorEmptyState} from '../../components/DataTableSelector';\nimport {useTablesWithColumns} from '../../hooks/useTablesWithColumns';\nimport type {DataTable} from '@sqlrooms/db';\n\nconst EMPTY_DASHBOARD_PANELS: MosaicDashboardPanelConfig[] = [];\n\nexport const MosaicDashboardPanels: React.FC = () => {\n const {dashboardId} = useMosaicDashboardContext();\n const registerPanel = useStoreWithMosaicDashboard(\n (state) => state.layout.registerPanel,\n );\n const setLayout = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setLayout,\n );\n const panels = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.panels ??\n EMPTY_DASHBOARD_PANELS,\n );\n const dashboardLayout = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.layout ?? null,\n );\n const dashboardLayoutType = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.layoutType ??\n 'dock',\n );\n\n const tables = useTablesWithColumns();\n const selectedTable = useStoreWithMosaicDashboard(\n (state) =>\n state.mosaicDashboard.config.dashboardsById[dashboardId]?.selectedTable,\n );\n const setSelectedTable = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setSelectedTable,\n );\n\n const handleTableChange = useCallback(\n (table: DataTable) => {\n setSelectedTable(dashboardId, table.table.toString());\n },\n [dashboardId, setSelectedTable],\n );\n\n useEffect(() => {\n // This renderer is shared by every Mosaic dashboard panel in the room.\n // Dashboard blocks can be transiently unmounted by the surrounding editor,\n // so unregistering on instance cleanup can leave still-mounted dashboards\n // with layout panel shells but no chart renderer.\n registerPanel(MOSAIC_DASHBOARD_PANEL, () => ({\n title: 'Dashboard panel',\n component: MosaicDashboardPanel,\n dragOverlay: MosaicDashboardPanelDragOverlay,\n }));\n }, [registerPanel]);\n\n const rootLayout: LayoutNode | null = useMemo(() => {\n if (!dashboardLayout) return null;\n if (dashboardLayoutType === 'grid') {\n return isLayoutGridNode(dashboardLayout) ? dashboardLayout : null;\n }\n return {\n type: 'dock',\n id: getMosaicDashboardDockId(dashboardId),\n root: dashboardLayout,\n };\n }, [dashboardId, dashboardLayout, dashboardLayoutType]);\n\n const handleLayoutChange = useCallback(\n (nextLayout: LayoutNode | null) => {\n const innerLayout =\n nextLayout && isLayoutDockNode(nextLayout)\n ? nextLayout.root\n : nextLayout;\n setLayout(dashboardId, innerLayout);\n },\n [dashboardId, setLayout],\n );\n\n if (!selectedTable) {\n return (\n <DataTableSelectorEmptyState\n onChange={handleTableChange}\n tables={tables}\n />\n );\n }\n\n if (!panels.length || !rootLayout) {\n return (\n <div className=\"flex h-full items-center justify-center p-4\">\n <div className=\"text-muted-foreground text-sm\">\n Dashboard is empty. Add a panel to get started.\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"h-full min-h-[360px]\">\n <LayoutRenderer\n rootLayout={rootLayout}\n onLayoutChange={handleLayoutChange}\n />\n </div>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardAddPanelDropdown.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardAddPanelDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MosaicDashboardAddPanelDropdown.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardAddPanelDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,EAAC,MAAM,OAAO,CAAC;AAc9B,UAAU,oCAAoC;IAC5C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,+BAA+B,EAAE,EAAE,CAC9C,oCAAoC,CAwCrC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@sqlrooms/ui';
|
|
2
|
+
import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Tooltip, TooltipContent, TooltipTrigger, } from '@sqlrooms/ui';
|
|
3
3
|
import { Plus } from 'lucide-react';
|
|
4
4
|
import { useAddPanelActions } from '../useAddPanelActions';
|
|
5
5
|
export const MosaicDashboardAddPanelDropdown = ({ dashboardId }) => {
|
|
6
6
|
const { handleAddPanel, canAddPanel, actions, canAddAnyPanel } = useAddPanelActions(dashboardId);
|
|
7
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children:
|
|
7
|
+
return (_jsxs(DropdownMenu, { modal: false, children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "outline", className: "h-8 w-8", disabled: !canAddAnyPanel, "aria-label": "Add panel", children: _jsx(Plus, { className: "h-3.5 w-3.5" }) }) }) }), _jsx(TooltipContent, { children: "Add panel" })] }), _jsx(DropdownMenuContent, { align: "end", children: actions.map((action) => {
|
|
8
8
|
const Icon = action.icon;
|
|
9
|
-
return (_jsxs(DropdownMenuItem, { onClick: () => handleAddPanel(action), disabled: !canAddPanel(action), children: [Icon ? _jsx(Icon, { className: "mr-2 h-
|
|
9
|
+
return (_jsxs(DropdownMenuItem, { onClick: () => handleAddPanel(action), disabled: !canAddPanel(action), children: [Icon ? _jsx(Icon, { className: "mr-2 h-3.5 w-3.5" }) : null, action.label] }, action.type));
|
|
10
10
|
}) })] }));
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=MosaicDashboardAddPanelDropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardAddPanelDropdown.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardAddPanelDropdown.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"MosaicDashboardAddPanelDropdown.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardAddPanelDropdown.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAMzD,MAAM,CAAC,MAAM,+BAA+B,GAExC,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE;IACpB,MAAM,EAAC,cAAc,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAC,GAC1D,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAElC,OAAO,CACL,MAAC,YAAY,IAAC,KAAK,EAAE,KAAK,aACxB,MAAC,OAAO,eACN,KAAC,cAAc,IAAC,OAAO,kBACrB,KAAC,mBAAmB,IAAC,OAAO,kBAC1B,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,SAAS,EACnB,QAAQ,EAAE,CAAC,cAAc,gBACd,WAAW,YAEtB,KAAC,IAAI,IAAC,SAAS,EAAC,aAAa,GAAG,GACzB,GACW,GACP,EACjB,KAAC,cAAc,4BAA2B,IAClC,EACV,KAAC,mBAAmB,IAAC,KAAK,EAAC,KAAK,YAC7B,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;oBACtB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;oBAEzB,OAAO,CACL,MAAC,gBAAgB,IAEf,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,EACrC,QAAQ,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,aAE7B,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,SAAS,EAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC,IAAI,EACnD,MAAM,CAAC,KAAK,KALR,MAAM,CAAC,IAAI,CAMC,CACpB,CAAC;gBACJ,CAAC,CAAC,GACkB,IACT,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {type FC} from 'react';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n Tooltip,\n TooltipContent,\n TooltipTrigger,\n} from '@sqlrooms/ui';\nimport {Plus} from 'lucide-react';\nimport {useAddPanelActions} from '../useAddPanelActions';\n\ninterface MosaicDashboardAddPanelDropdownProps {\n dashboardId: string;\n}\n\nexport const MosaicDashboardAddPanelDropdown: FC<\n MosaicDashboardAddPanelDropdownProps\n> = ({dashboardId}) => {\n const {handleAddPanel, canAddPanel, actions, canAddAnyPanel} =\n useAddPanelActions(dashboardId);\n\n return (\n <DropdownMenu modal={false}>\n <Tooltip>\n <TooltipTrigger asChild>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"outline\"\n className=\"h-8 w-8\"\n disabled={!canAddAnyPanel}\n aria-label=\"Add panel\"\n >\n <Plus className=\"h-3.5 w-3.5\" />\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent>Add panel</TooltipContent>\n </Tooltip>\n <DropdownMenuContent align=\"end\">\n {actions.map((action) => {\n const Icon = action.icon;\n\n return (\n <DropdownMenuItem\n key={action.type}\n onClick={() => handleAddPanel(action)}\n disabled={!canAddPanel(action)}\n >\n {Icon ? <Icon className=\"mr-2 h-3.5 w-3.5\" /> : null}\n {action.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
interface MosaicDashboardDataTableSelectorProps {
|
|
3
|
+
dashboardId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const MosaicDashboardDataTableSelector: FC<MosaicDashboardDataTableSelectorProps>;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=MosaicDashboardDataTableSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardDataTableSelector.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardDataTableSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAc,MAAM,OAAO,CAAC;AAOtC,UAAU,qCAAqC;IAC7C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gCAAgC,EAAE,EAAE,CAC/C,qCAAqC,CA4BtC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { useStoreWithMosaicDashboard } from '../MosaicDashboardSlice';
|
|
4
|
+
import { DataTableSelector } from '../../components/DataTableSelector';
|
|
5
|
+
import { useTablesWithColumns } from '../../hooks/useTablesWithColumns';
|
|
6
|
+
import { useDataTable } from '@sqlrooms/db';
|
|
7
|
+
export const MosaicDashboardDataTableSelector = ({ dashboardId }) => {
|
|
8
|
+
const tables = useTablesWithColumns();
|
|
9
|
+
const dashboard = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]);
|
|
10
|
+
const selectedTableName = dashboard?.selectedTable;
|
|
11
|
+
const selectedTable = useDataTable(selectedTableName);
|
|
12
|
+
const setSelectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setSelectedTable);
|
|
13
|
+
const handleTableChange = useCallback((table) => {
|
|
14
|
+
setSelectedTable(dashboardId, table.table.toString());
|
|
15
|
+
}, [dashboardId, setSelectedTable]);
|
|
16
|
+
return (_jsx(DataTableSelector, { onChange: handleTableChange, tables: tables, value: selectedTable }));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=MosaicDashboardDataTableSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MosaicDashboardDataTableSelector.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardDataTableSelector.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAK,WAAW,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAC,iBAAiB,EAAC,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAO1C,MAAM,CAAC,MAAM,gCAAgC,GAEzC,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,iBAAiB,GAAG,SAAS,EAAE,aAAa,CAAC;IAEnD,MAAM,aAAa,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAEtD,MAAM,gBAAgB,GAAG,2BAA2B,CAClD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,gBAAgB,CAClD,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,KAAgB,EAAE,EAAE;QACnB,gBAAgB,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC,EACD,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAChC,CAAC;IAEF,OAAO,CACL,KAAC,iBAAiB,IAChB,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,aAAa,GACpB,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {FC, useCallback} from 'react';\nimport {useStoreWithMosaicDashboard} from '../MosaicDashboardSlice';\nimport {DataTableSelector} from '../../components/DataTableSelector';\nimport {useTablesWithColumns} from '../../hooks/useTablesWithColumns';\nimport {useDataTable} from '@sqlrooms/db';\nimport type {DataTable} from '@sqlrooms/db';\n\ninterface MosaicDashboardDataTableSelectorProps {\n dashboardId: string;\n}\n\nexport const MosaicDashboardDataTableSelector: FC<\n MosaicDashboardDataTableSelectorProps\n> = ({dashboardId}) => {\n const tables = useTablesWithColumns();\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const selectedTableName = dashboard?.selectedTable;\n\n const selectedTable = useDataTable(selectedTableName);\n\n const setSelectedTable = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setSelectedTable,\n );\n\n const handleTableChange = useCallback(\n (table: DataTable) => {\n setSelectedTable(dashboardId, table.table.toString());\n },\n [dashboardId, setSelectedTable],\n );\n\n return (\n <DataTableSelector\n onChange={handleTableChange}\n tables={tables}\n value={selectedTable}\n />\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardResetFiltersButton.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardResetFiltersButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"MosaicDashboardResetFiltersButton.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardResetFiltersButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,EAAC,MAAM,OAAO,CAAC;AAI9B,UAAU,sCAAsC;IAC9C,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,iCAAiC,EAAE,EAAE,CAChD,sCAAsC,CAYvC,CAAC"}
|
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { getMosaicDashboardSelectionName, useStoreWithMosaicDashboard, } from '../MosaicDashboardSlice';
|
|
2
|
+
import { useDashboardResetFilters } from '../hooks/useDashboardResetFilters';
|
|
3
|
+
import { ResetFiltersButton } from '../components/ResetFiltersButton';
|
|
5
4
|
export const MosaicDashboardResetFiltersButton = ({ dashboardId }) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const dashboardSelection = useStoreWithMosaicDashboard((state) => state.mosaic.selections[dashboardSelectionName]);
|
|
9
|
-
const [selectionVersion, setSelectionVersion] = useState(0);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (!dashboardSelection) {
|
|
12
|
-
getSelection(dashboardSelectionName, 'crossfilter');
|
|
13
|
-
}
|
|
14
|
-
}, [dashboardSelection, dashboardSelectionName, getSelection]);
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
if (!dashboardSelection) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
const handleSelectionChange = () => {
|
|
20
|
-
setSelectionVersion((value) => value + 1);
|
|
21
|
-
};
|
|
22
|
-
dashboardSelection.addEventListener('value', handleSelectionChange);
|
|
23
|
-
return () => {
|
|
24
|
-
dashboardSelection.removeEventListener('value', handleSelectionChange);
|
|
25
|
-
};
|
|
26
|
-
}, [dashboardSelection]);
|
|
27
|
-
const hasActiveFilters = useMemo(() => Boolean(dashboardSelection?.clauses.length), [dashboardSelection, selectionVersion]);
|
|
28
|
-
const handleResetFilters = () => {
|
|
29
|
-
dashboardSelection?.reset();
|
|
30
|
-
};
|
|
31
|
-
if (!hasActiveFilters) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
return (_jsx(Button, { variant: "link", size: "sm", className: "h-8 px-0", onClick: handleResetFilters, children: "Reset filters" }));
|
|
5
|
+
const { hasActiveFilters, reset } = useDashboardResetFilters({ dashboardId });
|
|
6
|
+
return (_jsx(ResetFiltersButton, { className: "h-8 w-8", disabled: !hasActiveFilters, onClick: reset, tooltip: "Reset all filters" }));
|
|
35
7
|
};
|
|
36
8
|
//# sourceMappingURL=MosaicDashboardResetFiltersButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardResetFiltersButton.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardResetFiltersButton.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"MosaicDashboardResetFiltersButton.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardResetFiltersButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,wBAAwB,EAAC,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAMpE,MAAM,CAAC,MAAM,iCAAiC,GAE1C,CAAC,EAAC,WAAW,EAAC,EAAE,EAAE;IACpB,MAAM,EAAC,gBAAgB,EAAE,KAAK,EAAC,GAAG,wBAAwB,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;IAE1E,OAAO,CACL,KAAC,kBAAkB,IACjB,SAAS,EAAC,SAAS,EACnB,QAAQ,EAAE,CAAC,gBAAgB,EAC3B,OAAO,EAAE,KAAK,EACd,OAAO,EAAC,mBAAmB,GAC3B,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {type FC} from 'react';\nimport {useDashboardResetFilters} from '../hooks/useDashboardResetFilters';\nimport {ResetFiltersButton} from '../components/ResetFiltersButton';\n\ninterface MosaicDashboardResetFiltersButtonProps {\n dashboardId: string;\n}\n\nexport const MosaicDashboardResetFiltersButton: FC<\n MosaicDashboardResetFiltersButtonProps\n> = ({dashboardId}) => {\n const {hasActiveFilters, reset} = useDashboardResetFilters({dashboardId});\n\n return (\n <ResetFiltersButton\n className=\"h-8 w-8\"\n disabled={!hasActiveFilters}\n onClick={reset}\n tooltip=\"Reset all filters\"\n />\n );\n};\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const MosaicDashboardToolbar:
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const MosaicDashboardToolbar: FC;
|
|
3
3
|
//# sourceMappingURL=MosaicDashboardToolbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MosaicDashboardToolbar.d.ts","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAc,MAAM,OAAO,CAAC;AAStC,eAAO,MAAM,sBAAsB,EAAE,EA0CpC,CAAC"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
2
3
|
import { useMosaicDashboardContext } from '../MosaicDashboardContext';
|
|
3
4
|
import { useStoreWithMosaicDashboard } from '../MosaicDashboardSlice';
|
|
4
5
|
import { MosaicDashboardAddPanelDropdown } from './MosaicDashboardAddPanelDropdown';
|
|
5
6
|
import { MosaicDashboardResetFiltersButton } from './MosaicDashboardResetFiltersButton';
|
|
7
|
+
import { MosaicDashboardDataTableSelector } from './MosaicDashboardDataTableSelector';
|
|
8
|
+
import { useDataTable } from '@sqlrooms/db';
|
|
9
|
+
import { BlockCaptionEditor } from '../../components/BlockCaptionEditor';
|
|
6
10
|
export const MosaicDashboardToolbar = () => {
|
|
7
11
|
const { dashboardId } = useMosaicDashboardContext();
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
const dashboard = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]);
|
|
13
|
+
const selectedTableName = dashboard?.selectedTable;
|
|
14
|
+
const dashboardTitle = dashboard?.title ?? '';
|
|
15
|
+
const selectedTable = useDataTable(selectedTableName);
|
|
16
|
+
const tableName = selectedTable?.table.table;
|
|
17
|
+
const setDashboardTitle = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setDashboardTitle);
|
|
18
|
+
const handleTitleChange = useCallback((title) => {
|
|
19
|
+
setDashboardTitle(dashboardId, title || '');
|
|
20
|
+
}, [dashboardId, setDashboardTitle]);
|
|
21
|
+
if (!selectedTableName) {
|
|
11
22
|
return null;
|
|
12
23
|
}
|
|
13
|
-
return (_jsxs("div", { className: "flex items-center justify-between border-b px-5 py-2", children: [_jsx("div", { className: "flex items-center gap-2", children: _jsx(
|
|
24
|
+
return (_jsxs("div", { className: "flex items-center justify-between gap-2 border-b px-5 py-2", children: [_jsx(BlockCaptionEditor, { value: dashboardTitle, placeholder: tableName || 'Dashboard title', onChange: handleTitleChange }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(MosaicDashboardAddPanelDropdown, { dashboardId: dashboardId }), _jsx(MosaicDashboardDataTableSelector, { dashboardId: dashboardId }), _jsx(MosaicDashboardResetFiltersButton, { dashboardId: dashboardId })] })] }));
|
|
14
25
|
};
|
|
15
26
|
//# sourceMappingURL=MosaicDashboardToolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardToolbar.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"MosaicDashboardToolbar.js","sourceRoot":"","sources":["../../../src/dashboard/toolbar/MosaicDashboardToolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAK,WAAW,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAC,+BAA+B,EAAC,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAC,iCAAiC,EAAC,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAC,gCAAgC,EAAC,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAC,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAO,GAAG,EAAE;IAC7C,MAAM,EAAC,WAAW,EAAC,GAAG,yBAAyB,EAAE,CAAC;IAElD,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,iBAAiB,GAAG,SAAS,EAAE,aAAa,CAAC;IACnD,MAAM,cAAc,GAAG,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC;IAE9C,MAAM,aAAa,GAAG,YAAY,CAAC,iBAAiB,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC;IAE7C,MAAM,iBAAiB,GAAG,2BAA2B,CACnD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,iBAAiB,CACnD,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,KAAyB,EAAE,EAAE;QAC5B,iBAAiB,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC,EACD,CAAC,WAAW,EAAE,iBAAiB,CAAC,CACjC,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,eAAK,SAAS,EAAC,4DAA4D,aACzE,KAAC,kBAAkB,IACjB,KAAK,EAAE,cAAc,EACrB,WAAW,EAAE,SAAS,IAAI,iBAAiB,EAC3C,QAAQ,EAAE,iBAAiB,GAC3B,EAEF,eAAK,SAAS,EAAC,yBAAyB,aACtC,KAAC,+BAA+B,IAAC,WAAW,EAAE,WAAW,GAAI,EAC7D,KAAC,gCAAgC,IAAC,WAAW,EAAE,WAAW,GAAI,EAC9D,KAAC,iCAAiC,IAAC,WAAW,EAAE,WAAW,GAAI,IAC3D,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {FC, useCallback} from 'react';\nimport {useMosaicDashboardContext} from '../MosaicDashboardContext';\nimport {useStoreWithMosaicDashboard} from '../MosaicDashboardSlice';\nimport {MosaicDashboardAddPanelDropdown} from './MosaicDashboardAddPanelDropdown';\nimport {MosaicDashboardResetFiltersButton} from './MosaicDashboardResetFiltersButton';\nimport {MosaicDashboardDataTableSelector} from './MosaicDashboardDataTableSelector';\nimport {useDataTable} from '@sqlrooms/db';\nimport {BlockCaptionEditor} from '../../components/BlockCaptionEditor';\n\nexport const MosaicDashboardToolbar: FC = () => {\n const {dashboardId} = useMosaicDashboardContext();\n\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const selectedTableName = dashboard?.selectedTable;\n const dashboardTitle = dashboard?.title ?? '';\n\n const selectedTable = useDataTable(selectedTableName);\n const tableName = selectedTable?.table.table;\n\n const setDashboardTitle = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setDashboardTitle,\n );\n\n const handleTitleChange = useCallback(\n (title: string | undefined) => {\n setDashboardTitle(dashboardId, title || '');\n },\n [dashboardId, setDashboardTitle],\n );\n\n if (!selectedTableName) {\n return null;\n }\n\n return (\n <div className=\"flex items-center justify-between gap-2 border-b px-5 py-2\">\n <BlockCaptionEditor\n value={dashboardTitle}\n placeholder={tableName || 'Dashboard title'}\n onChange={handleTitleChange}\n />\n\n <div className=\"flex items-center gap-2\">\n <MosaicDashboardAddPanelDropdown dashboardId={dashboardId} />\n <MosaicDashboardDataTableSelector dashboardId={dashboardId} />\n <MosaicDashboardResetFiltersButton dashboardId={dashboardId} />\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useStoreWithMosaicDashboard } from './MosaicDashboardSlice';
|
|
3
3
|
import { useSelectedOrFirstTable } from './useSelectedOrFirstTable';
|
|
4
|
-
import { useTablesWithColumns } from '
|
|
4
|
+
import { useTablesWithColumns } from '../hooks/useTablesWithColumns';
|
|
5
5
|
export function useMosaicDashboardAddPanelActionContext(dashboardId) {
|
|
6
6
|
const dashboard = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]);
|
|
7
7
|
const chartTypes = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.chartTypes);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMosaicDashboardAddPanelActionContext.js","sourceRoot":"","sources":["../../src/dashboard/useMosaicDashboardAddPanelActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"useMosaicDashboardAddPanelActionContext.js","sourceRoot":"","sources":["../../src/dashboard/useMosaicDashboardAddPanelActionContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAEnE,MAAM,UAAU,uCAAuC,CACrD,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,UAAU,GAAG,2BAA2B,CAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,CAC5C,CAAC;IAEF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,aAAa,GAAG,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAE3D,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,SAAS;QACT,aAAa;QACb,MAAM;QACN,UAAU;KACX,CAAC,EACF,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,CAAC,CAC5D,CAAC;AACJ,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type MosaicDashboardAddPanelActionContext} from './action-types';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useSelectedOrFirstTable} from './useSelectedOrFirstTable';\nimport {useTablesWithColumns} from '../hooks/useTablesWithColumns';\n\nexport function useMosaicDashboardAddPanelActionContext(\n dashboardId: string,\n): MosaicDashboardAddPanelActionContext {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const chartTypes = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.chartTypes,\n );\n\n const tables = useTablesWithColumns();\n const selectedTable = useSelectedOrFirstTable(dashboardId);\n\n return useMemo<MosaicDashboardAddPanelActionContext>(\n () => ({\n dashboardId,\n dashboard,\n selectedTable,\n tables,\n chartTypes,\n }),\n [dashboard, dashboardId, selectedTable, tables, chartTypes],\n );\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MosaicClient } from '@uwdata/mosaic-core';
|
|
2
|
+
/**
|
|
3
|
+
* Registers Mosaic clients for a dashboard panel so the panel's reset button
|
|
4
|
+
* can track which filters originate from this panel.
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePanelClientRegistration(dashboardId: string | undefined, panelId: string | undefined, clients: MosaicClient[]): void;
|
|
7
|
+
//# sourceMappingURL=usePanelClientRegistration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelClientRegistration.d.ts","sourceRoot":"","sources":["../../src/dashboard/usePanelClientRegistration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAItD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,YAAY,EAAE,GACtB,IAAI,CA6BN"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useStoreWithMosaicDashboard } from './MosaicDashboardSlice';
|
|
3
|
+
/**
|
|
4
|
+
* Registers Mosaic clients for a dashboard panel so the panel's reset button
|
|
5
|
+
* can track which filters originate from this panel.
|
|
6
|
+
*/
|
|
7
|
+
export function usePanelClientRegistration(dashboardId, panelId, clients) {
|
|
8
|
+
const registerPanelClient = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.registerPanelClient);
|
|
9
|
+
const unregisterPanelClient = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.unregisterPanelClient);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!dashboardId || !panelId || clients.length === 0) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
clients.forEach((client) => {
|
|
15
|
+
registerPanelClient(dashboardId, panelId, client);
|
|
16
|
+
});
|
|
17
|
+
return () => {
|
|
18
|
+
clients.forEach((client) => {
|
|
19
|
+
unregisterPanelClient(dashboardId, panelId, client);
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
}, [
|
|
23
|
+
dashboardId,
|
|
24
|
+
panelId,
|
|
25
|
+
clients,
|
|
26
|
+
registerPanelClient,
|
|
27
|
+
unregisterPanelClient,
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=usePanelClientRegistration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelClientRegistration.js","sourceRoot":"","sources":["../../src/dashboard/usePanelClientRegistration.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAEnE;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACxC,WAA+B,EAC/B,OAA2B,EAC3B,OAAuB;IAEvB,MAAM,mBAAmB,GAAG,2BAA2B,CACrD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,mBAAmB,CACrD,CAAC;IACF,MAAM,qBAAqB,GAAG,2BAA2B,CACvD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,qBAAqB,CACvD,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACrD,OAAO;QACT,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACzB,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACzB,qBAAqB,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,WAAW;QACX,OAAO;QACP,OAAO;QACP,mBAAmB;QACnB,qBAAqB;KACtB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {type MosaicClient} from '@uwdata/mosaic-core';\nimport {useEffect} from 'react';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\n\n/**\n * Registers Mosaic clients for a dashboard panel so the panel's reset button\n * can track which filters originate from this panel.\n */\nexport function usePanelClientRegistration(\n dashboardId: string | undefined,\n panelId: string | undefined,\n clients: MosaicClient[],\n): void {\n const registerPanelClient = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.registerPanelClient,\n );\n const unregisterPanelClient = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.unregisterPanelClient,\n );\n\n useEffect(() => {\n if (!dashboardId || !panelId || clients.length === 0) {\n return;\n }\n\n clients.forEach((client) => {\n registerPanelClient(dashboardId, panelId, client);\n });\n\n return () => {\n clients.forEach((client) => {\n unregisterPanelClient(dashboardId, panelId, client);\n });\n };\n }, [\n dashboardId,\n panelId,\n clients,\n registerPanelClient,\n unregisterPanelClient,\n ]);\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type MosaicClient } from '@uwdata/mosaic-core';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the list of registered Mosaic clients for a specific dashboard panel.
|
|
4
|
+
* These clients are used to determine which filters originate from this panel.
|
|
5
|
+
*/
|
|
6
|
+
export declare function usePanelClients(dashboardId: string, panelId: string): MosaicClient[];
|
|
7
|
+
//# sourceMappingURL=usePanelClients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelClients.d.ts","sourceRoot":"","sources":["../../src/dashboard/usePanelClients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAMtD;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,YAAY,EAAE,CAOhB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useStoreWithMosaicDashboard, getMosaicDashboardPanelId, } from './MosaicDashboardSlice';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the list of registered Mosaic clients for a specific dashboard panel.
|
|
4
|
+
* These clients are used to determine which filters originate from this panel.
|
|
5
|
+
*/
|
|
6
|
+
export function usePanelClients(dashboardId, panelId) {
|
|
7
|
+
const panelClientsFromStore = useStoreWithMosaicDashboard((state) => {
|
|
8
|
+
const key = getMosaicDashboardPanelId(dashboardId, panelId);
|
|
9
|
+
return state.mosaicDashboard.runtime.panelClients[key];
|
|
10
|
+
});
|
|
11
|
+
return panelClientsFromStore ?? [];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=usePanelClients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePanelClients.js","sourceRoot":"","sources":["../../src/dashboard/usePanelClients.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,WAAmB,EACnB,OAAe;IAEf,MAAM,qBAAqB,GAAG,2BAA2B,CAAC,CAAC,KAAK,EAAE,EAAE;QAClE,MAAM,GAAG,GAAG,yBAAyB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,OAAO,qBAAqB,IAAI,EAAE,CAAC;AACrC,CAAC","sourcesContent":["import {type MosaicClient} from '@uwdata/mosaic-core';\nimport {\n useStoreWithMosaicDashboard,\n getMosaicDashboardPanelId,\n} from './MosaicDashboardSlice';\n\n/**\n * Returns the list of registered Mosaic clients for a specific dashboard panel.\n * These clients are used to determine which filters originate from this panel.\n */\nexport function usePanelClients(\n dashboardId: string,\n panelId: string,\n): MosaicClient[] {\n const panelClientsFromStore = useStoreWithMosaicDashboard((state) => {\n const key = getMosaicDashboardPanelId(dashboardId, panelId);\n return state.mosaicDashboard.runtime.panelClients[key];\n });\n\n return panelClientsFromStore ?? [];\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useStoreWithMosaicDashboard } from './MosaicDashboardSlice';
|
|
3
|
-
import { useTablesWithColumns } from '
|
|
3
|
+
import { useTablesWithColumns } from '../hooks/useTablesWithColumns';
|
|
4
4
|
/**
|
|
5
5
|
* Returns the last selected table for a dashboard if it exists,
|
|
6
6
|
* otherwise falls back to the first table with columns.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectedOrFirstTable.js","sourceRoot":"","sources":["../../src/dashboard/useSelectedOrFirstTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"useSelectedOrFirstTable.js","sourceRoot":"","sources":["../../src/dashboard/useSelectedOrFirstTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,+BAA+B,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,WAAmB;IAEnB,MAAM,SAAS,GAAG,2BAA2B,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CACpE,CAAC;IACF,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IAEtC,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,MAAM,qBAAqB,GAAG,SAAS,EAAE,iBAAiB,CAAC;QAE3D,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QAED,4CAA4C;QAC5C,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CACnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK,qBAAqB,CACvD,CAAC;QACF,iEAAiE;QACjE,OAAO,iBAAiB,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["import {useMemo} from 'react';\nimport {type DataTable} from '@sqlrooms/db';\nimport {useStoreWithMosaicDashboard} from './MosaicDashboardSlice';\nimport {useTablesWithColumns} from '../hooks/useTablesWithColumns';\n\n/**\n * Returns the last selected table for a dashboard if it exists,\n * otherwise falls back to the first table with columns.\n *\n * @param dashboardId - The dashboard ID\n * @returns The selected table, or the first table, or undefined if no tables exist\n */\nexport function useSelectedOrFirstTable(\n dashboardId: string,\n): DataTable | undefined {\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const tables = useTablesWithColumns();\n\n return useMemo(() => {\n const lastSelectedTableName = dashboard?.lastSelectedTable;\n\n if (!lastSelectedTableName) {\n return tables[0];\n }\n\n // Try to find the last selected table first\n const lastSelectedTable = tables.find(\n (table) => table.table.table === lastSelectedTableName,\n );\n // Fall back to the first table if the selected one doesn't exist\n return lastSelectedTable ?? tables[0];\n }, [dashboard?.lastSelectedTable, tables]);\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ComponentProps, type PropsWithChildren, type ReactElement } from 'react';
|
|
2
|
+
import { Table } from '@sqlrooms/ui';
|
|
3
|
+
import { type DataTableExplorerHeaderProps } from './DataTableExplorerHeader';
|
|
4
|
+
import { type DataTableExplorerRowsProps } from './DataTableExplorerRows';
|
|
5
|
+
import { type DataTableExplorerStatusBarProps } from './DataTableExplorerStatusBar';
|
|
6
|
+
import type { DataTableExplorerOptions, UseDataTableExplorerReturn } from './types';
|
|
7
|
+
import { ResetFiltersButton } from '../dashboard/components/ResetFiltersButton';
|
|
8
|
+
export type DataTableExplorerRootProps = PropsWithChildren<{
|
|
9
|
+
explorer: UseDataTableExplorerReturn;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Provides an existing explorer instance to compound explorer subcomponents.
|
|
13
|
+
*/
|
|
14
|
+
export declare function DataTableExplorerRoot({ children, explorer, }: DataTableExplorerRootProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export type DataTableExplorerProps = PropsWithChildren<DataTableExplorerOptions>;
|
|
16
|
+
export type DataTableExplorerCompoundHeaderProps = Omit<DataTableExplorerHeaderProps, 'explorer'>;
|
|
17
|
+
declare function DataTableExplorerCompoundHeader(props: DataTableExplorerCompoundHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type DataTableExplorerCompoundRowsProps = Omit<DataTableExplorerRowsProps, 'explorer'>;
|
|
19
|
+
declare function DataTableExplorerCompoundRows(props: DataTableExplorerCompoundRowsProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export type DataTableExplorerCompoundStatusBarProps = Omit<DataTableExplorerStatusBarProps, 'explorer'>;
|
|
21
|
+
declare function DataTableExplorerCompoundStatusBar(props: DataTableExplorerCompoundStatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type DataTableExplorerCompoundTableProps = ComponentProps<typeof Table>;
|
|
23
|
+
declare function DataTableExplorerCompoundTable({ className, disableWrapper, style, ...props }: DataTableExplorerCompoundTableProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export type DataTableExplorerCompoundResetButtonProps = Omit<ComponentProps<typeof ResetFiltersButton>, 'disabled' | 'onClick'> & {
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
};
|
|
28
|
+
declare function DataTableExplorerCompoundResetButton({ className, disabled: disabledProp, onClick, ...props }: DataTableExplorerCompoundResetButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
type DataTableExplorerCompoundComponent = ((props: DataTableExplorerProps) => ReactElement) & {
|
|
30
|
+
Header: typeof DataTableExplorerCompoundHeader;
|
|
31
|
+
ResetButton: typeof DataTableExplorerCompoundResetButton;
|
|
32
|
+
Root: typeof DataTableExplorerRoot;
|
|
33
|
+
Rows: typeof DataTableExplorerCompoundRows;
|
|
34
|
+
StatusBar: typeof DataTableExplorerCompoundStatusBar;
|
|
35
|
+
Table: typeof DataTableExplorerCompoundTable;
|
|
36
|
+
};
|
|
37
|
+
export declare const DataTableExplorer: DataTableExplorerCompoundComponent;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=DataTableExplorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTableExplorer.d.ts","sourceRoot":"","sources":["../../src/data-table-explorer/DataTableExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAK,KAAK,EAAC,MAAM,cAAc,CAAC;AAEvC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,+BAA+B,EACrC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,kBAAkB,EAAC,MAAM,4CAA4C,CAAC;AAgB9E,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IACzD,QAAQ,EAAE,0BAA0B,CAAC;CACtC,CAAC,CAAC;AAEH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,QAAQ,GACT,EAAE,0BAA0B,2CAM5B;AAED,MAAM,MAAM,sBAAsB,GAChC,iBAAiB,CAAC,wBAAwB,CAAC,CAAC;AAkB9C,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,4BAA4B,EAC5B,UAAU,CACX,CAAC;AAEF,iBAAS,+BAA+B,CACtC,KAAK,EAAE,oCAAoC,2CAI5C;AAED,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACnD,0BAA0B,EAC1B,UAAU,CACX,CAAC;AAEF,iBAAS,6BAA6B,CACpC,KAAK,EAAE,kCAAkC,2CAI1C;AAED,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACxD,+BAA+B,EAC/B,UAAU,CACX,CAAC;AAEF,iBAAS,kCAAkC,CACzC,KAAK,EAAE,uCAAuC,2CAI/C;AAED,MAAM,MAAM,mCAAmC,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE/E,iBAAS,8BAA8B,CAAC,EACtC,SAAS,EACT,cAAqB,EACrB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,mCAAmC,2CAcrC;AAED,MAAM,MAAM,yCAAyC,GAAG,IAAI,CAC1D,cAAc,CAAC,OAAO,kBAAkB,CAAC,EACzC,UAAU,GAAG,SAAS,CACvB,GAAG;IACF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,iBAAS,oCAAoC,CAAC,EAC5C,SAAS,EACT,QAAQ,EAAE,YAAY,EACtB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,yCAAyC,2CAiB3C;AAED,KAAK,kCAAkC,GAAG,CAAC,CACzC,KAAK,EAAE,sBAAsB,KAC1B,YAAY,CAAC,GAAG;IACnB,MAAM,EAAE,OAAO,+BAA+B,CAAC;IAC/C,WAAW,EAAE,OAAO,oCAAoC,CAAC;IACzD,IAAI,EAAE,OAAO,qBAAqB,CAAC;IACnC,IAAI,EAAE,OAAO,6BAA6B,CAAC;IAC3C,SAAS,EAAE,OAAO,kCAAkC,CAAC;IACrD,KAAK,EAAE,OAAO,8BAA8B,CAAC;CAC9C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,kCAQ5B,CAAC"}
|