@sqlrooms/mosaic 0.29.0-rc.5 → 0.29.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -57
- package/dist/DataPointLimitError.d.ts +9 -0
- package/dist/DataPointLimitError.d.ts.map +1 -0
- package/dist/DataPointLimitError.js +14 -0
- package/dist/DataPointLimitError.js.map +1 -0
- package/dist/MosaicChart.d.ts +6 -6
- package/dist/MosaicChart.d.ts.map +1 -1
- package/dist/MosaicChart.js +6 -6
- package/dist/MosaicChart.js.map +1 -1
- package/dist/MosaicChartBuilder.d.ts +1 -1
- package/dist/MosaicChartBuilder.d.ts.map +1 -1
- package/dist/MosaicChartBuilder.js +1 -1
- package/dist/MosaicChartBuilder.js.map +1 -1
- package/dist/MosaicColorLegend.d.ts.map +1 -1
- package/dist/MosaicColorLegend.js +0 -1
- package/dist/MosaicColorLegend.js.map +1 -1
- package/dist/MosaicSlice.d.ts.map +1 -1
- package/dist/MosaicSlice.js +3 -3
- package/dist/MosaicSlice.js.map +1 -1
- package/dist/VgPlotChart.d.ts +8 -11
- package/dist/VgPlotChart.d.ts.map +1 -1
- package/dist/VgPlotChart.js +77 -90
- package/dist/VgPlotChart.js.map +1 -1
- package/dist/VgPlotChartError.d.ts +7 -0
- package/dist/VgPlotChartError.d.ts.map +1 -0
- package/dist/VgPlotChartError.js +9 -0
- package/dist/VgPlotChartError.js.map +1 -0
- package/dist/ai/ai.d.ts +103 -0
- package/dist/ai/ai.d.ts.map +1 -0
- package/dist/ai/ai.js +419 -0
- package/dist/ai/ai.js.map +1 -0
- package/dist/ai/data-table-explorer-tool.d.ts +40 -0
- package/dist/ai/data-table-explorer-tool.d.ts.map +1 -0
- package/dist/ai/data-table-explorer-tool.js +75 -0
- package/dist/ai/data-table-explorer-tool.js.map +1 -0
- package/dist/ai/list-panels-tool.d.ts +35 -0
- package/dist/ai/list-panels-tool.d.ts.map +1 -0
- package/dist/ai/list-panels-tool.js +66 -0
- package/dist/ai/list-panels-tool.js.map +1 -0
- package/dist/ai/remove-panel-tool.d.ts +31 -0
- package/dist/ai/remove-panel-tool.d.ts.map +1 -0
- package/dist/ai/remove-panel-tool.js +55 -0
- package/dist/ai/remove-panel-tool.js.map +1 -0
- package/dist/ai/tool-helpers.d.ts +34 -0
- package/dist/ai/tool-helpers.d.ts.map +1 -0
- package/dist/ai/tool-helpers.js +93 -0
- package/dist/ai/tool-helpers.js.map +1 -0
- package/dist/ai/tool-schemas.d.ts +9 -0
- package/dist/ai/tool-schemas.d.ts.map +1 -0
- package/dist/ai/tool-schemas.js +22 -0
- package/dist/ai/tool-schemas.js.map +1 -0
- package/dist/ai/tool-types.d.ts +26 -0
- package/dist/ai/tool-types.d.ts.map +1 -0
- package/dist/ai/tool-types.js.map +1 -0
- package/dist/ai/tool-validation.d.ts +3 -0
- package/dist/ai/tool-validation.d.ts.map +1 -0
- package/dist/ai/tool-validation.js.map +1 -0
- package/dist/ai.d.ts +6 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +6 -0
- package/dist/ai.js.map +1 -0
- package/dist/chart-builders/ChartBuilderActions.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContent.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContent.js.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderContext.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderContext.js.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderDialog.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderDialog.js.map +1 -1
- package/dist/chart-builders/ChartBuilderFields.js +2 -2
- package/dist/chart-builders/ChartBuilderFields.js.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.d.ts +2 -2
- package/dist/chart-builders/ChartBuilderRoot.d.ts.map +1 -1
- package/dist/chart-builders/ChartBuilderRoot.js.map +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts +1 -1
- package/dist/chart-builders/chartSpecTitle.d.ts.map +1 -1
- package/dist/chart-builders/chartSpecTitle.js.map +1 -1
- package/dist/chart-builders/chartTypeUtils.d.ts +1 -2
- package/dist/chart-builders/chartTypeUtils.d.ts.map +1 -1
- package/dist/chart-builders/chartTypeUtils.js +0 -1
- package/dist/chart-builders/chartTypeUtils.js.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts +1 -1
- package/dist/chart-builders/createChartBuilderStore.d.ts.map +1 -1
- package/dist/chart-builders/createChartBuilderStore.js.map +1 -1
- package/dist/chart-runtime.d.ts +50 -0
- package/dist/chart-runtime.d.ts.map +1 -0
- package/dist/chart-runtime.js +76 -0
- package/dist/chart-runtime.js.map +1 -0
- package/dist/charts/MosaicChart.d.ts +12 -0
- package/dist/charts/MosaicChart.d.ts.map +1 -0
- package/dist/charts/MosaicChart.js +13 -0
- package/dist/charts/MosaicChart.js.map +1 -0
- package/dist/charts/MosaicChartError.d.ts +8 -0
- package/dist/charts/MosaicChartError.d.ts.map +1 -0
- package/dist/charts/MosaicChartError.js +5 -0
- package/dist/charts/MosaicChartError.js.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts +7 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js +10 -0
- package/dist/charts/MosaicChartRuntimeIssuePanel.js.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts +11 -0
- package/dist/charts/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/MosaicChartSettingsPanel.js +21 -0
- package/dist/charts/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/MosaicChartView.d.ts +13 -0
- package/dist/charts/MosaicChartView.d.ts.map +1 -0
- package/dist/charts/MosaicChartView.js +56 -0
- package/dist/charts/MosaicChartView.js.map +1 -0
- package/dist/charts/addChartPanelAction.d.ts +3 -0
- package/dist/charts/addChartPanelAction.d.ts.map +1 -0
- package/dist/charts/addChartPanelAction.js +14 -0
- package/dist/charts/addChartPanelAction.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts +43 -0
- package/dist/charts/chart-settings/MosaicChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js +74 -0
- package/dist/charts/chart-settings/MosaicChartSettings.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts +13 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js +18 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContent.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts +24 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js +34 -0
- package/dist/charts/chart-settings/MosaicChartSettingsContext.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts +14 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js +17 -0
- package/dist/charts/chart-settings/MosaicChartSettingsPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js +11 -0
- package/dist/charts/chart-settings/MosaicChartSpecViewerPanel.js.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts +9 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.d.ts.map +1 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js +16 -0
- package/dist/charts/chart-settings/MosaicChartTypeSelector.js.map +1 -0
- package/dist/charts/chart-types/base-types.d.ts +168 -0
- package/dist/charts/chart-types/base-types.d.ts.map +1 -0
- package/dist/charts/chart-types/base-types.js.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js +9 -0
- package/dist/charts/chart-types/box-plot/BoxPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/definition.js +24 -0
- package/dist/charts/chart-types/box-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts +67 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js +286 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +118 -0
- package/dist/charts/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts +24 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/constants.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts +14 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/plot.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +18 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js +63 -0
- package/dist/charts/chart-types/box-plot/renderer/useBoxPlotClient.js.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts +6 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/renderer/utils.js.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts +21 -0
- package/dist/charts/chart-types/box-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/schema.js +16 -0
- package/dist/charts/chart-types/box-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts +40 -0
- package/dist/charts/chart-types/box-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/box-plot/tool.js +67 -0
- package/dist/charts/chart-types/box-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js +9 -0
- package/dist/charts/chart-types/bubble-chart/BubbleChartSettings.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/definition.js +24 -0
- package/dist/charts/chart-types/bubble-chart/definition.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/schema.d.ts +23 -0
- package/dist/charts/chart-types/bubble-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/schema.js +17 -0
- package/dist/charts/chart-types/bubble-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/spec.js +31 -0
- package/dist/charts/chart-types/bubble-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/bubble-chart/tool.d.ts +42 -0
- package/dist/charts/chart-types/bubble-chart/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/bubble-chart/tool.js +66 -0
- package/dist/charts/chart-types/bubble-chart/tool.js.map +1 -0
- package/dist/charts/chart-types/chart-config.d.ts +138 -0
- package/dist/charts/chart-types/chart-config.d.ts.map +1 -0
- package/dist/charts/chart-types/chart-config.js +41 -0
- package/dist/charts/chart-types/chart-config.js.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js +9 -0
- package/dist/charts/chart-types/count-plot/CountPlotSettings.js.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/definition.js +19 -0
- package/dist/charts/chart-types/count-plot/definition.js.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.d.ts +19 -0
- package/dist/charts/chart-types/count-plot/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/schema.js +15 -0
- package/dist/charts/chart-types/count-plot/schema.js.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/spec.js +49 -0
- package/dist/charts/chart-types/count-plot/spec.js.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.d.ts +38 -0
- package/dist/charts/chart-types/count-plot/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/count-plot/tool.js +63 -0
- package/dist/charts/chart-types/count-plot/tool.js.map +1 -0
- package/dist/charts/chart-types/createChartTools.d.ts +17 -0
- package/dist/charts/chart-types/createChartTools.d.ts.map +1 -0
- package/dist/charts/chart-types/createChartTools.js +24 -0
- package/dist/charts/chart-types/createChartTools.js.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts +12 -0
- package/dist/charts/chart-types/createDefaultChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js +30 -0
- package/dist/charts/chart-types/createDefaultChartTypes.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js +30 -0
- package/dist/charts/chart-types/custom-spec/CustomSpecSettings.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/definition.js +22 -0
- package/dist/charts/chart-types/custom-spec/definition.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.d.ts +19 -0
- package/dist/charts/chart-types/custom-spec/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/schema.js +12 -0
- package/dist/charts/chart-types/custom-spec/schema.js.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/custom-spec/spec.js.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts +8 -0
- package/dist/charts/chart-types/data-policy-schema.d.ts.map +1 -0
- package/dist/charts/chart-types/data-policy-schema.js +7 -0
- package/dist/charts/chart-types/data-policy-schema.js.map +1 -0
- package/dist/charts/chart-types/errors.d.ts +7 -0
- package/dist/charts/chart-types/errors.d.ts.map +1 -0
- package/dist/charts/chart-types/errors.js +10 -0
- package/dist/charts/chart-types/errors.js.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js +9 -0
- package/dist/charts/chart-types/heatmap/HeatmapSettings.js.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/definition.js +19 -0
- package/dist/charts/chart-types/heatmap/definition.js.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.d.ts +21 -0
- package/dist/charts/chart-types/heatmap/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/schema.js +13 -0
- package/dist/charts/chart-types/heatmap/schema.js.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/spec.js +32 -0
- package/dist/charts/chart-types/heatmap/spec.js.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.d.ts +40 -0
- package/dist/charts/chart-types/heatmap/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/heatmap/tool.js +67 -0
- package/dist/charts/chart-types/heatmap/tool.js.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js +11 -0
- package/dist/charts/chart-types/histogram/HistogramSettings.js.map +1 -0
- package/dist/charts/chart-types/histogram/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/definition.js +19 -0
- package/dist/charts/chart-types/histogram/definition.js.map +1 -0
- package/dist/charts/chart-types/histogram/schema.d.ts +24 -0
- package/dist/charts/chart-types/histogram/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/schema.js +26 -0
- package/dist/charts/chart-types/histogram/schema.js.map +1 -0
- package/dist/charts/chart-types/histogram/spec.d.ts +4 -0
- package/dist/charts/chart-types/histogram/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/spec.js +37 -0
- package/dist/charts/chart-types/histogram/spec.js.map +1 -0
- package/dist/charts/chart-types/histogram/tool.d.ts +40 -0
- package/dist/charts/chart-types/histogram/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/histogram/tool.js +65 -0
- package/dist/charts/chart-types/histogram/tool.js.map +1 -0
- package/dist/charts/chart-types/index.d.ts +42 -0
- package/dist/charts/chart-types/index.d.ts.map +1 -0
- package/dist/charts/chart-types/index.js +53 -0
- package/dist/charts/chart-types/index.js.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js +24 -0
- package/dist/charts/chart-types/line-chart/LineChartSettings.js.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/definition.js +26 -0
- package/dist/charts/chart-types/line-chart/definition.js.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts +70 -0
- package/dist/charts/chart-types/line-chart/schema.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/schema.js +29 -0
- package/dist/charts/chart-types/line-chart/schema.js.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/spec.js +91 -0
- package/dist/charts/chart-types/line-chart/spec.js.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts +64 -0
- package/dist/charts/chart-types/line-chart/tool.d.ts.map +1 -0
- package/dist/charts/chart-types/line-chart/tool.js +75 -0
- package/dist/charts/chart-types/line-chart/tool.js.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts +101 -0
- package/dist/charts/chart-types/mosaicChartTypes.d.ts.map +1 -0
- package/dist/charts/chart-types/mosaicChartTypes.js +20 -0
- package/dist/charts/chart-types/mosaicChartTypes.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js +16 -0
- package/dist/charts/dashboard/MosaicDashboardChartHeaderActions.js.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts +4 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.d.ts.map +1 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js +23 -0
- package/dist/charts/dashboard/MosaicDashboardChartRenderer.js.map +1 -0
- package/dist/charts/useBrushSelectionParams.d.ts +3 -0
- package/dist/charts/useBrushSelectionParams.d.ts.map +1 -0
- package/dist/charts/useBrushSelectionParams.js +16 -0
- package/dist/charts/useBrushSelectionParams.js.map +1 -0
- package/dist/charts/useChartDataPolicy.d.ts +5 -0
- package/dist/charts/useChartDataPolicy.d.ts.map +1 -0
- package/dist/charts/useChartDataPolicy.js +17 -0
- package/dist/charts/useChartDataPolicy.js.map +1 -0
- package/dist/charts/useChartRetainer.d.ts +4 -0
- package/dist/charts/useChartRetainer.d.ts.map +1 -0
- package/dist/charts/useChartRetainer.js +18 -0
- package/dist/charts/useChartRetainer.js.map +1 -0
- package/dist/charts/useChartTypeDefinition.d.ts +3 -0
- package/dist/charts/useChartTypeDefinition.d.ts.map +1 -0
- package/dist/charts/useChartTypeDefinition.js.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts +21 -0
- package/dist/charts/useMosaicChartRenderContext.d.ts.map +1 -0
- package/dist/charts/useMosaicChartRenderContext.js +63 -0
- package/dist/charts/useMosaicChartRenderContext.js.map +1 -0
- package/dist/charts/useParseChartConfig.d.ts +12 -0
- package/dist/charts/useParseChartConfig.d.ts.map +1 -0
- package/dist/charts/useParseChartConfig.js +28 -0
- package/dist/charts/useParseChartConfig.js.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts +7 -0
- package/dist/charts/useRuntimeIssueReporter.d.ts.map +1 -0
- package/dist/charts/useRuntimeIssueReporter.js +19 -0
- package/dist/charts/useRuntimeIssueReporter.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts +15 -0
- package/dist/charts/worksheet/ChartBlockHeader.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockHeader.js +9 -0
- package/dist/charts/worksheet/ChartBlockHeader.js.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts +4 -0
- package/dist/charts/worksheet/ChartBlockRenderer.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js +47 -0
- package/dist/charts/worksheet/ChartBlockRenderer.js.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts +15 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.d.ts.map +1 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js +10 -0
- package/dist/charts/worksheet/ChartSelectorEmptyState.js.map +1 -0
- package/dist/column-types-utils.d.ts +12 -0
- package/dist/column-types-utils.d.ts.map +1 -0
- package/dist/column-types-utils.js +47 -0
- package/dist/column-types-utils.js.map +1 -0
- package/dist/components/AggregationSelector.d.ts +11 -0
- package/dist/components/AggregationSelector.d.ts.map +1 -0
- package/dist/components/AggregationSelector.js.map +1 -0
- package/dist/components/ColumnSelector.d.ts +13 -0
- package/dist/components/ColumnSelector.d.ts.map +1 -0
- package/dist/components/ColumnSelector.js +30 -0
- package/dist/components/ColumnSelector.js.map +1 -0
- package/dist/components/ColumnsContext.d.ts +11 -0
- package/dist/components/ColumnsContext.d.ts.map +1 -0
- package/dist/components/ColumnsContext.js +15 -0
- package/dist/components/ColumnsContext.js.map +1 -0
- package/dist/components/DataTableSelector.d.ts +22 -0
- package/dist/components/DataTableSelector.d.ts.map +1 -0
- package/dist/components/DataTableSelector.js +66 -0
- package/dist/components/DataTableSelector.js.map +1 -0
- package/dist/components/Field.d.ts.map +1 -0
- package/dist/components/Field.js.map +1 -0
- package/dist/components/FieldSelectorInput.d.ts +14 -0
- package/dist/components/FieldSelectorInput.d.ts.map +1 -0
- package/dist/components/FieldSelectorInput.js.map +1 -0
- package/dist/components/MultiFieldSelector.d.ts +14 -0
- package/dist/components/MultiFieldSelector.d.ts.map +1 -0
- package/dist/components/MultiFieldSelector.js +53 -0
- package/dist/components/MultiFieldSelector.js.map +1 -0
- package/dist/components/TableSelector.d.ts +14 -0
- package/dist/components/TableSelector.d.ts.map +1 -0
- package/dist/components/TableSelector.js +23 -0
- package/dist/components/TableSelector.js.map +1 -0
- package/dist/components/TemporalGranularitySelector.d.ts +10 -0
- package/dist/components/TemporalGranularitySelector.d.ts.map +1 -0
- package/dist/components/TemporalGranularitySelector.js +37 -0
- package/dist/components/TemporalGranularitySelector.js.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts +4 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.d.ts.map +1 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js +6 -0
- package/dist/dashboard/DefaultMosaicDashboardBlock.js.map +1 -0
- package/dist/dashboard/MosaicDashboard.d.ts +2 -2
- package/dist/dashboard/MosaicDashboard.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboard.js +16 -37
- package/dist/dashboard/MosaicDashboard.js.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.d.ts +210 -177
- package/dist/dashboard/MosaicDashboardSlice.d.ts.map +1 -1
- package/dist/dashboard/MosaicDashboardSlice.js +109 -91
- package/dist/dashboard/MosaicDashboardSlice.js.map +1 -1
- package/dist/dashboard/action-types.d.ts +25 -0
- package/dist/dashboard/action-types.d.ts.map +1 -0
- package/dist/dashboard/action-types.js +5 -0
- package/dist/dashboard/action-types.js.map +1 -0
- package/dist/dashboard/core-types.d.ts +20 -0
- package/dist/dashboard/core-types.d.ts.map +1 -0
- package/dist/dashboard/core-types.js +15 -0
- package/dist/dashboard/core-types.js.map +1 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts +3 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.d.ts.map +1 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js +11 -0
- package/dist/dashboard/createDefaultMosaicDashboardPanelRenderers.js.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts +12 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.d.ts.map +1 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js +32 -0
- package/dist/dashboard/createMosaicDashboardBlockDefinition.js.map +1 -0
- package/dist/dashboard/dashboard-types.d.ts +449 -0
- package/dist/dashboard/dashboard-types.d.ts.map +1 -0
- package/dist/dashboard/dashboard-types.js +46 -0
- package/dist/dashboard/dashboard-types.js.map +1 -0
- package/dist/dashboard/defaultPanelActions.d.ts +3 -0
- package/dist/dashboard/defaultPanelActions.d.ts.map +1 -0
- package/dist/dashboard/defaultPanelActions.js +7 -0
- package/dist/dashboard/defaultPanelActions.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js +23 -0
- package/dist/dashboard/panel/MosaicDashboardPanel.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelDragOverlay.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts +17 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js +21 -0
- package/dist/dashboard/panel/MosaicDashboardPanelErrorBoundary.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts +13 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js +30 -0
- package/dist/dashboard/panel/MosaicDashboardPanelHeader.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanelLayout.js.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.d.ts.map +1 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js +63 -0
- package/dist/dashboard/panel/MosaicDashboardPanels.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js +12 -0
- package/dist/dashboard/toolbar/MosaicDashboardAddPanelDropdown.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts +7 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js +36 -0
- package/dist/dashboard/toolbar/MosaicDashboardResetFiltersButton.js.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.d.ts.map +1 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js +24 -0
- package/dist/dashboard/toolbar/MosaicDashboardToolbar.js.map +1 -0
- package/dist/dashboard/useAddPanelActions.d.ts +10 -0
- package/dist/dashboard/useAddPanelActions.d.ts.map +1 -0
- package/dist/dashboard/useAddPanelActions.js +26 -0
- package/dist/dashboard/useAddPanelActions.js.map +1 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.d.ts +3 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.d.ts.map +1 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js +18 -0
- package/dist/dashboard/useMosaicDashboardAddPanelActionContext.js.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.d.ts +10 -0
- package/dist/dashboard/useSelectedOrFirstTable.d.ts.map +1 -0
- package/dist/dashboard/useSelectedOrFirstTable.js +25 -0
- package/dist/dashboard/useSelectedOrFirstTable.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorer.d.ts +37 -0
- package/dist/data-table-explorer/DataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorer.js +67 -0
- package/dist/data-table-explorer/DataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts +50 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js +121 -0
- package/dist/data-table-explorer/DataTableExplorerCategoryClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts +28 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerCountClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts +7 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js +195 -0
- package/dist/data-table-explorer/DataTableExplorerHeader.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts +69 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js +179 -0
- package/dist/data-table-explorer/DataTableExplorerHistogramClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts +37 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerPageClient.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerRows.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js +65 -0
- package/dist/data-table-explorer/DataTableExplorerRows.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts +9 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js +28 -0
- package/dist/data-table-explorer/DataTableExplorerStatusBar.js.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts +24 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.d.ts.map +1 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js +51 -0
- package/dist/data-table-explorer/DataTableExplorerUnsupportedSummaryClient.js.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts +3 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.d.ts.map +1 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js +9 -0
- package/dist/data-table-explorer/addDataTableExplorerPanelAction.js.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts +46 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.d.ts.map +1 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js +126 -0
- package/dist/data-table-explorer/createDataTableExplorerStore.js.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts +4 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js +28 -0
- package/dist/data-table-explorer/dashboard/MosaicDashboardDataTableExplorerPanelRenderer.js.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts +64 -0
- package/dist/data-table-explorer/dataTableExplorerController.d.ts.map +1 -0
- package/dist/data-table-explorer/dataTableExplorerController.js +127 -0
- package/dist/data-table-explorer/dataTableExplorerController.js.map +1 -0
- package/dist/data-table-explorer/layout.d.ts +11 -0
- package/dist/data-table-explorer/layout.d.ts.map +1 -0
- package/dist/data-table-explorer/layout.js +23 -0
- package/dist/data-table-explorer/layout.js.map +1 -0
- package/dist/data-table-explorer/types.d.ts +87 -0
- package/dist/data-table-explorer/types.d.ts.map +1 -0
- package/dist/data-table-explorer/types.js.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts +7 -0
- package/dist/data-table-explorer/useDataTableExplorer.d.ts.map +1 -0
- package/dist/data-table-explorer/useDataTableExplorer.js +358 -0
- package/dist/data-table-explorer/useDataTableExplorer.js.map +1 -0
- package/dist/data-table-explorer/utils.d.ts +61 -0
- package/dist/data-table-explorer/utils.d.ts.map +1 -0
- package/dist/data-table-explorer/utils.js +349 -0
- package/dist/data-table-explorer/utils.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts +11 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js +7 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockHeader.js.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts +4 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.d.ts.map +1 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js +35 -0
- package/dist/data-table-explorer/worksheet/DataTableBlockRenderer.js.map +1 -0
- package/dist/editor/MosaicChartContainer.d.ts +4 -4
- package/dist/editor/MosaicChartContainer.js +4 -4
- package/dist/editor/MosaicChartContainer.js.map +1 -1
- package/dist/hooks/useDataTable.d.ts +3 -0
- package/dist/hooks/useDataTable.d.ts.map +1 -0
- package/dist/hooks/useDataTable.js +28 -0
- package/dist/hooks/useDataTable.js.map +1 -0
- package/dist/hooks/useTablesWithColumns.d.ts +9 -0
- package/dist/hooks/useTablesWithColumns.d.ts.map +1 -0
- package/dist/hooks/useTablesWithColumns.js +13 -0
- package/dist/hooks/useTablesWithColumns.js.map +1 -0
- package/dist/index.d.ts +48 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -12
- package/dist/index.js.map +1 -1
- package/dist/schemas/common.d.ts +20 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +15 -0
- package/dist/schemas/common.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/useMosaicClient.d.ts +4 -0
- package/dist/useMosaicClient.d.ts.map +1 -1
- package/dist/useMosaicClient.js +33 -3
- package/dist/useMosaicClient.js.map +1 -1
- package/dist/useVgPlotChartError.d.ts +13 -0
- package/dist/useVgPlotChartError.d.ts.map +1 -0
- package/dist/useVgPlotChartError.js +18 -0
- package/dist/useVgPlotChartError.js.map +1 -0
- package/dist/useVgPlotChartRender.d.ts +24 -0
- package/dist/useVgPlotChartRender.d.ts.map +1 -0
- package/dist/useVgPlotChartRender.js +162 -0
- package/dist/useVgPlotChartRender.js.map +1 -0
- package/dist/useVgPlotChartRetention.d.ts +21 -0
- package/dist/useVgPlotChartRetention.d.ts.map +1 -0
- package/dist/useVgPlotChartRetention.js +63 -0
- package/dist/useVgPlotChartRetention.js.map +1 -0
- package/dist/wrapCoordinatorWithValidation.d.ts +11 -0
- package/dist/wrapCoordinatorWithValidation.d.ts.map +1 -0
- package/dist/wrapCoordinatorWithValidation.js +23 -0
- package/dist/wrapCoordinatorWithValidation.js.map +1 -0
- package/package.json +32 -13
- package/dist/boxplot/BoxPlotClient.d.ts +0 -58
- package/dist/boxplot/BoxPlotClient.d.ts.map +0 -1
- package/dist/boxplot/BoxPlotClient.js +0 -264
- package/dist/boxplot/BoxPlotClient.js.map +0 -1
- package/dist/chart/MosaicDashboardChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChart.js +0 -21
- package/dist/chart/MosaicDashboardChart.js.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.d.ts +0 -16
- package/dist/chart/MosaicDashboardChartContent.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartContent.js +0 -18
- package/dist/chart/MosaicDashboardChartContent.js.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts +0 -4
- package/dist/chart/MosaicDashboardChartHeaderActions.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartHeaderActions.js +0 -16
- package/dist/chart/MosaicDashboardChartHeaderActions.js.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.d.ts +0 -3
- package/dist/chart/MosaicDashboardChartRenderer.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardChartRenderer.js +0 -31
- package/dist/chart/MosaicDashboardChartRenderer.js.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.d.ts +0 -14
- package/dist/chart/MosaicDashboardComponentChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardComponentChart.js +0 -11
- package/dist/chart/MosaicDashboardComponentChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts +0 -10
- package/dist/chart/MosaicDashboardVgPlotChart.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotChart.js +0 -10
- package/dist/chart/MosaicDashboardVgPlotChart.js.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.d.ts +0 -8
- package/dist/chart/MosaicDashboardVgPlotError.d.ts.map +0 -1
- package/dist/chart/MosaicDashboardVgPlotError.js +0 -11
- package/dist/chart/MosaicDashboardVgPlotError.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.d.ts +0 -44
- package/dist/chart/chart-settings/ChartSettings.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettings.js +0 -71
- package/dist/chart/chart-settings/ChartSettings.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts +0 -13
- package/dist/chart/chart-settings/ChartSettingsContent.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContent.js +0 -18
- package/dist/chart/chart-settings/ChartSettingsContent.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts +0 -27
- package/dist/chart/chart-settings/ChartSettingsContext.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsContext.js +0 -35
- package/dist/chart/chart-settings/ChartSettingsContext.js.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts +0 -14
- package/dist/chart/chart-settings/ChartSettingsPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSettingsPanel.js +0 -17
- package/dist/chart/chart-settings/ChartSettingsPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts +0 -9
- package/dist/chart/chart-settings/ChartSpecViewerPanel.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js +0 -11
- package/dist/chart/chart-settings/ChartSpecViewerPanel.js.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts +0 -9
- package/dist/chart/chart-settings/ChartTypeSelector.d.ts.map +0 -1
- package/dist/chart/chart-settings/ChartTypeSelector.js +0 -16
- package/dist/chart/chart-settings/ChartTypeSelector.js.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.d.ts +0 -3
- package/dist/chart/chart-settings/useTableColumns.d.ts.map +0 -1
- package/dist/chart/chart-settings/useTableColumns.js +0 -12
- package/dist/chart/chart-settings/useTableColumns.js.map +0 -1
- package/dist/chart/useBrushSelectionParams.d.ts +0 -3
- package/dist/chart/useBrushSelectionParams.d.ts.map +0 -1
- package/dist/chart/useBrushSelectionParams.js +0 -16
- package/dist/chart/useBrushSelectionParams.js.map +0 -1
- package/dist/chart/useChartRetainer.d.ts +0 -3
- package/dist/chart/useChartRetainer.d.ts.map +0 -1
- package/dist/chart/useChartRetainer.js +0 -11
- package/dist/chart/useChartRetainer.js.map +0 -1
- package/dist/chart/useGenerateSpec.d.ts +0 -13
- package/dist/chart/useGenerateSpec.d.ts.map +0 -1
- package/dist/chart/useGenerateSpec.js +0 -32
- package/dist/chart/useGenerateSpec.js.map +0 -1
- package/dist/chart-builders/AggregationSelector.d.ts +0 -11
- package/dist/chart-builders/AggregationSelector.d.ts.map +0 -1
- package/dist/chart-builders/AggregationSelector.js.map +0 -1
- package/dist/chart-builders/ColumnSelector.d.ts +0 -15
- package/dist/chart-builders/ColumnSelector.d.ts.map +0 -1
- package/dist/chart-builders/ColumnSelector.js +0 -31
- package/dist/chart-builders/ColumnSelector.js.map +0 -1
- package/dist/chart-builders/Field.d.ts.map +0 -1
- package/dist/chart-builders/Field.js.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.d.ts +0 -14
- package/dist/chart-builders/FieldSelectorInput.d.ts.map +0 -1
- package/dist/chart-builders/FieldSelectorInput.js.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.d.ts +0 -14
- package/dist/chart-builders/MultiFieldSelector.d.ts.map +0 -1
- package/dist/chart-builders/MultiFieldSelector.js +0 -53
- package/dist/chart-builders/MultiFieldSelector.js.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.d.ts +0 -10
- package/dist/chart-builders/TemporalGranularitySelector.d.ts.map +0 -1
- package/dist/chart-builders/TemporalGranularitySelector.js +0 -37
- package/dist/chart-builders/TemporalGranularitySelector.js.map +0 -1
- package/dist/chart-builders/constants.d.ts +0 -12
- package/dist/chart-builders/constants.d.ts.map +0 -1
- package/dist/chart-builders/constants.js +0 -47
- package/dist/chart-builders/constants.js.map +0 -1
- package/dist/chart-types/base-types.d.ts +0 -148
- package/dist/chart-types/base-types.d.ts.map +0 -1
- package/dist/chart-types/base-types.js.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/box-plot/BoxPlotSettings.js +0 -9
- package/dist/chart-types/box-plot/BoxPlotSettings.js.map +0 -1
- package/dist/chart-types/box-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/box-plot/definition.js +0 -19
- package/dist/chart-types/box-plot/definition.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotErrorBoundary.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js +0 -115
- package/dist/chart-types/box-plot/renderer/BoxPlotPanelRenderer.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.d.ts +0 -24
- package/dist/chart-types/box-plot/renderer/constants.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/constants.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.d.ts +0 -14
- package/dist/chart-types/box-plot/renderer/plot.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/plot.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts +0 -14
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js +0 -45
- package/dist/chart-types/box-plot/renderer/useBoxPlotClient.js.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.d.ts +0 -6
- package/dist/chart-types/box-plot/renderer/utils.d.ts.map +0 -1
- package/dist/chart-types/box-plot/renderer/utils.js.map +0 -1
- package/dist/chart-types/box-plot/schema.d.ts +0 -16
- package/dist/chart-types/box-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/box-plot/schema.js +0 -11
- package/dist/chart-types/box-plot/schema.js.map +0 -1
- package/dist/chart-types/box-plot/tool.d.ts +0 -44
- package/dist/chart-types/box-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/box-plot/tool.js +0 -59
- package/dist/chart-types/box-plot/tool.js.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js +0 -9
- package/dist/chart-types/bubble-chart/BubbleChartSettings.js.map +0 -1
- package/dist/chart-types/bubble-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/definition.js +0 -19
- package/dist/chart-types/bubble-chart/definition.js.map +0 -1
- package/dist/chart-types/bubble-chart/schema.d.ts +0 -18
- package/dist/chart-types/bubble-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/schema.js +0 -15
- package/dist/chart-types/bubble-chart/schema.js.map +0 -1
- package/dist/chart-types/bubble-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/spec.js +0 -31
- package/dist/chart-types/bubble-chart/spec.js.map +0 -1
- package/dist/chart-types/bubble-chart/tool.d.ts +0 -46
- package/dist/chart-types/bubble-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/bubble-chart/tool.js +0 -58
- package/dist/chart-types/bubble-chart/tool.js.map +0 -1
- package/dist/chart-types/chart-config.d.ts +0 -92
- package/dist/chart-types/chart-config.d.ts.map +0 -1
- package/dist/chart-types/chart-config.js +0 -47
- package/dist/chart-types/chart-config.js.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.d.ts.map +0 -1
- package/dist/chart-types/count-plot/CountPlotSettings.js +0 -9
- package/dist/chart-types/count-plot/CountPlotSettings.js.map +0 -1
- package/dist/chart-types/count-plot/definition.d.ts.map +0 -1
- package/dist/chart-types/count-plot/definition.js +0 -19
- package/dist/chart-types/count-plot/definition.js.map +0 -1
- package/dist/chart-types/count-plot/schema.d.ts +0 -14
- package/dist/chart-types/count-plot/schema.d.ts.map +0 -1
- package/dist/chart-types/count-plot/schema.js +0 -13
- package/dist/chart-types/count-plot/schema.js.map +0 -1
- package/dist/chart-types/count-plot/spec.d.ts.map +0 -1
- package/dist/chart-types/count-plot/spec.js +0 -49
- package/dist/chart-types/count-plot/spec.js.map +0 -1
- package/dist/chart-types/count-plot/tool.d.ts +0 -42
- package/dist/chart-types/count-plot/tool.d.ts.map +0 -1
- package/dist/chart-types/count-plot/tool.js +0 -55
- package/dist/chart-types/count-plot/tool.js.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/CustomSpecSettings.js +0 -30
- package/dist/chart-types/custom-spec/CustomSpecSettings.js.map +0 -1
- package/dist/chart-types/custom-spec/definition.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/definition.js +0 -17
- package/dist/chart-types/custom-spec/definition.js.map +0 -1
- package/dist/chart-types/custom-spec/schema.d.ts +0 -14
- package/dist/chart-types/custom-spec/schema.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/schema.js +0 -10
- package/dist/chart-types/custom-spec/schema.js.map +0 -1
- package/dist/chart-types/custom-spec/spec.d.ts.map +0 -1
- package/dist/chart-types/custom-spec/spec.js.map +0 -1
- package/dist/chart-types/errors.d.ts +0 -23
- package/dist/chart-types/errors.d.ts.map +0 -1
- package/dist/chart-types/errors.js +0 -26
- package/dist/chart-types/errors.js.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.d.ts.map +0 -1
- package/dist/chart-types/heatmap/HeatmapSettings.js +0 -9
- package/dist/chart-types/heatmap/HeatmapSettings.js.map +0 -1
- package/dist/chart-types/heatmap/definition.d.ts.map +0 -1
- package/dist/chart-types/heatmap/definition.js +0 -19
- package/dist/chart-types/heatmap/definition.js.map +0 -1
- package/dist/chart-types/heatmap/schema.d.ts +0 -16
- package/dist/chart-types/heatmap/schema.d.ts.map +0 -1
- package/dist/chart-types/heatmap/schema.js +0 -11
- package/dist/chart-types/heatmap/schema.js.map +0 -1
- package/dist/chart-types/heatmap/spec.d.ts.map +0 -1
- package/dist/chart-types/heatmap/spec.js +0 -32
- package/dist/chart-types/heatmap/spec.js.map +0 -1
- package/dist/chart-types/heatmap/tool.d.ts +0 -44
- package/dist/chart-types/heatmap/tool.d.ts.map +0 -1
- package/dist/chart-types/heatmap/tool.js +0 -59
- package/dist/chart-types/heatmap/tool.js.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.d.ts.map +0 -1
- package/dist/chart-types/histogram/HistogramSettings.js +0 -9
- package/dist/chart-types/histogram/HistogramSettings.js.map +0 -1
- package/dist/chart-types/histogram/definition.d.ts.map +0 -1
- package/dist/chart-types/histogram/definition.js +0 -19
- package/dist/chart-types/histogram/definition.js.map +0 -1
- package/dist/chart-types/histogram/schema.d.ts +0 -14
- package/dist/chart-types/histogram/schema.d.ts.map +0 -1
- package/dist/chart-types/histogram/schema.js +0 -13
- package/dist/chart-types/histogram/schema.js.map +0 -1
- package/dist/chart-types/histogram/spec.d.ts +0 -4
- package/dist/chart-types/histogram/spec.d.ts.map +0 -1
- package/dist/chart-types/histogram/spec.js +0 -36
- package/dist/chart-types/histogram/spec.js.map +0 -1
- package/dist/chart-types/histogram/tool.d.ts +0 -42
- package/dist/chart-types/histogram/tool.d.ts.map +0 -1
- package/dist/chart-types/histogram/tool.js +0 -55
- package/dist/chart-types/histogram/tool.js.map +0 -1
- package/dist/chart-types/index.d.ts +0 -115
- package/dist/chart-types/index.d.ts.map +0 -1
- package/dist/chart-types/index.js +0 -100
- package/dist/chart-types/index.js.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.d.ts.map +0 -1
- package/dist/chart-types/line-chart/LineChartSettings.js +0 -22
- package/dist/chart-types/line-chart/LineChartSettings.js.map +0 -1
- package/dist/chart-types/line-chart/definition.d.ts.map +0 -1
- package/dist/chart-types/line-chart/definition.js +0 -19
- package/dist/chart-types/line-chart/definition.js.map +0 -1
- package/dist/chart-types/line-chart/schema.d.ts +0 -83
- package/dist/chart-types/line-chart/schema.d.ts.map +0 -1
- package/dist/chart-types/line-chart/schema.js +0 -39
- package/dist/chart-types/line-chart/schema.js.map +0 -1
- package/dist/chart-types/line-chart/spec.d.ts.map +0 -1
- package/dist/chart-types/line-chart/spec.js +0 -91
- package/dist/chart-types/line-chart/spec.js.map +0 -1
- package/dist/chart-types/line-chart/tool.d.ts +0 -68
- package/dist/chart-types/line-chart/tool.d.ts.map +0 -1
- package/dist/chart-types/line-chart/tool.js +0 -66
- package/dist/chart-types/line-chart/tool.js.map +0 -1
- package/dist/chart-types/tool-schemas.d.ts +0 -8
- package/dist/chart-types/tool-schemas.d.ts.map +0 -1
- package/dist/chart-types/tool-schemas.js +0 -18
- package/dist/chart-types/tool-schemas.js.map +0 -1
- package/dist/chart-types/tool-types.d.ts +0 -26
- package/dist/chart-types/tool-types.d.ts.map +0 -1
- package/dist/chart-types/tool-types.js.map +0 -1
- package/dist/chart-types/tool-validation.d.ts +0 -3
- package/dist/chart-types/tool-validation.d.ts.map +0 -1
- package/dist/chart-types/tool-validation.js.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.d.ts +0 -3
- package/dist/chart-types/useChartTypeDefinition.d.ts.map +0 -1
- package/dist/chart-types/useChartTypeDefinition.js.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts +0 -17
- package/dist/dashboard/DashboardPanelErrorBoundary.d.ts.map +0 -1
- package/dist/dashboard/DashboardPanelErrorBoundary.js +0 -21
- package/dist/dashboard/DashboardPanelErrorBoundary.js.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts +0 -2
- package/dist/dashboard/MosaicDashboardEmptyState.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardEmptyState.js +0 -50
- package/dist/dashboard/MosaicDashboardEmptyState.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanel.js +0 -26
- package/dist/dashboard/MosaicDashboardPanel.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js +0 -17
- package/dist/dashboard/MosaicDashboardPanelDragOverlay.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts +0 -13
- package/dist/dashboard/MosaicDashboardPanelHeader.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelHeader.js +0 -30
- package/dist/dashboard/MosaicDashboardPanelHeader.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanelLayout.js.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardPanels.js +0 -53
- package/dist/dashboard/MosaicDashboardPanels.js.map +0 -1
- package/dist/dashboard/MosaicDashboardToolbar.d.ts.map +0 -1
- package/dist/dashboard/MosaicDashboardToolbar.js +0 -86
- package/dist/dashboard/MosaicDashboardToolbar.js.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.d.ts +0 -3
- package/dist/dashboard/defaultPanelRenderers.d.ts.map +0 -1
- package/dist/dashboard/defaultPanelRenderers.js +0 -13
- package/dist/dashboard/defaultPanelRenderers.js.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts +0 -3
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.d.ts.map +0 -1
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js +0 -32
- package/dist/profiler/MosaicDashboardProfilerPanelRenderer.js.map +0 -1
- package/dist/profiler/MosaicProfiler.d.ts +0 -32
- package/dist/profiler/MosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/MosaicProfiler.js +0 -57
- package/dist/profiler/MosaicProfiler.js.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.d.ts +0 -7
- package/dist/profiler/MosaicProfilerHeader.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerHeader.js +0 -196
- package/dist/profiler/MosaicProfilerHeader.js.map +0 -1
- package/dist/profiler/MosaicProfilerRows.d.ts +0 -9
- package/dist/profiler/MosaicProfilerRows.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerRows.js +0 -65
- package/dist/profiler/MosaicProfilerRows.js.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.d.ts +0 -9
- package/dist/profiler/MosaicProfilerStatusBar.d.ts.map +0 -1
- package/dist/profiler/MosaicProfilerStatusBar.js +0 -28
- package/dist/profiler/MosaicProfilerStatusBar.js.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.d.ts +0 -50
- package/dist/profiler/ProfilerCategoryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCategoryClient.js +0 -121
- package/dist/profiler/ProfilerCategoryClient.js.map +0 -1
- package/dist/profiler/ProfilerCountClient.d.ts +0 -28
- package/dist/profiler/ProfilerCountClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerCountClient.js +0 -51
- package/dist/profiler/ProfilerCountClient.js.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.d.ts +0 -69
- package/dist/profiler/ProfilerHistogramClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerHistogramClient.js +0 -179
- package/dist/profiler/ProfilerHistogramClient.js.map +0 -1
- package/dist/profiler/ProfilerPageClient.d.ts +0 -37
- package/dist/profiler/ProfilerPageClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerPageClient.js +0 -65
- package/dist/profiler/ProfilerPageClient.js.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts +0 -24
- package/dist/profiler/ProfilerUnsupportedSummaryClient.d.ts.map +0 -1
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js +0 -51
- package/dist/profiler/ProfilerUnsupportedSummaryClient.js.map +0 -1
- package/dist/profiler/createProfilerStore.d.ts +0 -45
- package/dist/profiler/createProfilerStore.d.ts.map +0 -1
- package/dist/profiler/createProfilerStore.js +0 -120
- package/dist/profiler/createProfilerStore.js.map +0 -1
- package/dist/profiler/layout.d.ts +0 -7
- package/dist/profiler/layout.d.ts.map +0 -1
- package/dist/profiler/layout.js +0 -13
- package/dist/profiler/layout.js.map +0 -1
- package/dist/profiler/profilerController.d.ts +0 -64
- package/dist/profiler/profilerController.d.ts.map +0 -1
- package/dist/profiler/profilerController.js +0 -123
- package/dist/profiler/profilerController.js.map +0 -1
- package/dist/profiler/types.d.ts +0 -86
- package/dist/profiler/types.d.ts.map +0 -1
- package/dist/profiler/types.js.map +0 -1
- package/dist/profiler/useMosaicProfiler.d.ts +0 -7
- package/dist/profiler/useMosaicProfiler.d.ts.map +0 -1
- package/dist/profiler/useMosaicProfiler.js +0 -339
- package/dist/profiler/useMosaicProfiler.js.map +0 -1
- package/dist/profiler/utils.d.ts +0 -61
- package/dist/profiler/utils.d.ts.map +0 -1
- package/dist/profiler/utils.js +0 -347
- package/dist/profiler/utils.js.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.d.ts +0 -3
- package/dist/text/MosaicDashboardTextRenderer.d.ts.map +0 -1
- package/dist/text/MosaicDashboardTextRenderer.js +0 -46
- package/dist/text/MosaicDashboardTextRenderer.js.map +0 -1
- /package/dist/{chart-types → ai}/tool-types.js +0 -0
- /package/dist/{chart-types → ai}/tool-validation.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/base-types.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/BoxPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotErrorBoundary.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/BoxPlotPanelRenderer.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/constants.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/plot.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/box-plot/renderer/utils.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/bubble-chart/BubbleChartSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/bubble-chart/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/bubble-chart/spec.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/CountPlotSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/count-plot/spec.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/CustomSpecSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/spec.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/custom-spec/spec.js +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/HeatmapSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/heatmap/spec.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/HistogramSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/histogram/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/LineChartSettings.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/definition.d.ts +0 -0
- /package/dist/{chart-types → charts/chart-types}/line-chart/spec.d.ts +0 -0
- /package/dist/{chart-types → charts}/useChartTypeDefinition.js +0 -0
- /package/dist/{chart-builders → components}/AggregationSelector.js +0 -0
- /package/dist/{chart-builders → components}/Field.d.ts +0 -0
- /package/dist/{chart-builders → components}/Field.js +0 -0
- /package/dist/{chart-builders → components}/FieldSelectorInput.js +0 -0
- /package/dist/dashboard/{MosaicDashboardPanel.d.ts → panel/MosaicDashboardPanel.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelDragOverlay.d.ts → panel/MosaicDashboardPanelDragOverlay.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.d.ts → panel/MosaicDashboardPanelLayout.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanelLayout.js → panel/MosaicDashboardPanelLayout.js} +0 -0
- /package/dist/dashboard/{MosaicDashboardPanels.d.ts → panel/MosaicDashboardPanels.d.ts} +0 -0
- /package/dist/dashboard/{MosaicDashboardToolbar.d.ts → toolbar/MosaicDashboardToolbar.d.ts} +0 -0
- /package/dist/{profiler → data-table-explorer}/types.js +0 -0
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Popover, PopoverContent, PopoverTrigger, } from '@sqlrooms/ui';
|
|
3
|
-
import { BarChart3, Check, ChevronsUpDown, FileText, Plus, TableProperties, } from 'lucide-react';
|
|
4
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
5
|
-
import { useMosaicDashboardContext } from './MosaicDashboardContext';
|
|
6
|
-
import { createMosaicDashboardProfilerPanelConfig, createMosaicDashboardTextPanelConfig, getMosaicDashboardSelectionName, MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE, MOSAIC_DASHBOARD_TEXT_PANEL_TYPE, useStoreWithMosaicDashboard, } from './MosaicDashboardSlice';
|
|
7
|
-
export const MosaicDashboardToolbar = () => {
|
|
8
|
-
const { dashboardId, canCreateChart, addDefaultChart } = useMosaicDashboardContext();
|
|
9
|
-
const dashboard = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.config.dashboardsById[dashboardId]);
|
|
10
|
-
const setSelectedTable = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.setSelectedTable);
|
|
11
|
-
const addPanel = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.addPanel);
|
|
12
|
-
const panelRenderers = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.panelRenderers);
|
|
13
|
-
const addPanelActions = useStoreWithMosaicDashboard((state) => state.mosaicDashboard.addPanelActions);
|
|
14
|
-
const getSelection = useStoreWithMosaicDashboard((state) => state.mosaic.getSelection);
|
|
15
|
-
const dashboardSelectionName = getMosaicDashboardSelectionName(dashboardId);
|
|
16
|
-
const dashboardSelection = useStoreWithMosaicDashboard((state) => state.mosaic.selections[dashboardSelectionName]);
|
|
17
|
-
const tables = useStoreWithMosaicDashboard((state) => state.db.tables);
|
|
18
|
-
const tablesWithColumns = useMemo(() => tables.filter((table) => table.columns && table.columns.length > 0), [tables]);
|
|
19
|
-
const selectedTable = useMemo(() => tablesWithColumns.find((table) => table.tableName === dashboard?.selectedTable), [dashboard?.selectedTable, tablesWithColumns]);
|
|
20
|
-
const [tablePickerOpen, setTablePickerOpen] = useState(false);
|
|
21
|
-
const canAddProfiler = Boolean(dashboard?.selectedTable &&
|
|
22
|
-
panelRenderers[MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE]);
|
|
23
|
-
const canAddText = Boolean(panelRenderers[MOSAIC_DASHBOARD_TEXT_PANEL_TYPE]);
|
|
24
|
-
const addPanelActionContext = useMemo(() => ({
|
|
25
|
-
dashboardId,
|
|
26
|
-
dashboard,
|
|
27
|
-
selectedTable,
|
|
28
|
-
tables: tablesWithColumns,
|
|
29
|
-
}), [dashboard, dashboardId, selectedTable, tablesWithColumns]);
|
|
30
|
-
const addPanelActionEntries = useMemo(() => addPanelActions.map((action) => ({
|
|
31
|
-
action,
|
|
32
|
-
enabled: action.isEnabled
|
|
33
|
-
? action.isEnabled(addPanelActionContext)
|
|
34
|
-
: true,
|
|
35
|
-
})), [addPanelActionContext, addPanelActions]);
|
|
36
|
-
const canAddCustomPanel = addPanelActionEntries.some((entry) => entry.enabled);
|
|
37
|
-
const canAddAnyPanel = canCreateChart || canAddProfiler || canAddText || canAddCustomPanel;
|
|
38
|
-
const [selectionVersion, setSelectionVersion] = useState(0);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (!dashboardSelection) {
|
|
41
|
-
getSelection(dashboardSelectionName, 'crossfilter');
|
|
42
|
-
}
|
|
43
|
-
}, [dashboardSelection, dashboardSelectionName, getSelection]);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (!dashboardSelection) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const handleSelectionChange = () => {
|
|
49
|
-
setSelectionVersion((value) => value + 1);
|
|
50
|
-
};
|
|
51
|
-
dashboardSelection.addEventListener('value', handleSelectionChange);
|
|
52
|
-
return () => {
|
|
53
|
-
dashboardSelection.removeEventListener('value', handleSelectionChange);
|
|
54
|
-
};
|
|
55
|
-
}, [dashboardSelection]);
|
|
56
|
-
const hasActiveFilters = useMemo(() => Boolean(dashboardSelection?.clauses.length), [dashboardSelection, selectionVersion]);
|
|
57
|
-
const handleAddProfiler = () => {
|
|
58
|
-
const panel = dashboard?.selectedTable
|
|
59
|
-
? createMosaicDashboardProfilerPanelConfig({
|
|
60
|
-
source: { tableName: dashboard.selectedTable },
|
|
61
|
-
})
|
|
62
|
-
: createMosaicDashboardProfilerPanelConfig();
|
|
63
|
-
addPanel(dashboardId, panel);
|
|
64
|
-
};
|
|
65
|
-
const handleAddText = () => {
|
|
66
|
-
const panel = createMosaicDashboardTextPanelConfig();
|
|
67
|
-
addPanel(dashboardId, panel);
|
|
68
|
-
};
|
|
69
|
-
const handleAddCustomPanel = (action) => {
|
|
70
|
-
const panel = action.createPanel(addPanelActionContext);
|
|
71
|
-
if (panel) {
|
|
72
|
-
addPanel(dashboardId, panel);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
const handleResetFilters = () => {
|
|
76
|
-
dashboardSelection?.reset();
|
|
77
|
-
};
|
|
78
|
-
return (_jsxs("div", { className: "flex items-center justify-between border-b px-5 py-2", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs(Popover, { open: tablePickerOpen, onOpenChange: setTablePickerOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", role: "combobox", "aria-expanded": tablePickerOpen, className: "w-[200px] justify-between", children: [_jsx("span", { className: "truncate", children: dashboard?.selectedTable || 'Select table…' }), _jsx(ChevronsUpDown, { className: "ml-1 h-3.5 w-3.5 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-[220px] p-0", align: "start", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: "Search tables\u2026" }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No tables found." }), _jsx(CommandGroup, { children: tablesWithColumns.map((table) => (_jsxs(CommandItem, { value: table.tableName, onSelect: (value) => {
|
|
79
|
-
setSelectedTable(dashboardId, value);
|
|
80
|
-
setTablePickerOpen(false);
|
|
81
|
-
}, children: [_jsx(Check, { className: `mr-2 h-3.5 w-3.5 ${dashboard?.selectedTable === table.tableName ? 'opacity-100' : 'opacity-0'}` }), table.tableName] }, table.tableName))) })] })] }) })] }), _jsx(Button, { variant: "link", size: "sm", className: "h-8 px-0", disabled: !hasActiveFilters, onClick: handleResetFilters, children: "Reset filters" })] }), _jsx("div", { className: "flex items-center gap-2", children: _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { size: "sm", variant: "outline", disabled: !canAddAnyPanel, children: [_jsx(Plus, { className: "mr-1 h-4 w-4" }), "Add"] }) }), _jsxs(DropdownMenuContent, { align: "end", children: [_jsxs(DropdownMenuItem, { onClick: addDefaultChart, disabled: !canCreateChart, children: [_jsx(BarChart3, { className: "mr-2 h-4 w-4" }), "Chart"] }), _jsxs(DropdownMenuItem, { onClick: handleAddProfiler, disabled: !canAddProfiler, children: [_jsx(TableProperties, { className: "mr-2 h-4 w-4" }), "Profiler"] }), _jsxs(DropdownMenuItem, { onClick: handleAddText, disabled: !canAddText, children: [_jsx(FileText, { className: "mr-2 h-4 w-4" }), "Text"] }), addPanelActionEntries.map(({ action, enabled }) => {
|
|
82
|
-
const Icon = action.icon;
|
|
83
|
-
return (_jsxs(DropdownMenuItem, { onClick: () => handleAddCustomPanel(action), disabled: !enabled, children: [Icon ? _jsx(Icon, { className: "mr-2 h-4 w-4" }) : null, action.label] }, action.type));
|
|
84
|
-
})] })] }) })] }));
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=MosaicDashboardToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardToolbar.js","sourceRoot":"","sources":["../../src/dashboard/MosaicDashboardToolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,MAAM,EACN,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,EACT,KAAK,EACL,cAAc,EACd,QAAQ,EACR,IAAI,EACJ,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAc,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAC,yBAAyB,EAAC,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAGL,wCAAwC,EACxC,oCAAoC,EACpC,+BAA+B,EAC/B,oCAAoC,EACpC,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,MAAM,sBAAsB,GAAa,GAAG,EAAE;IACnD,MAAM,EAAC,WAAW,EAAE,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MAAM,EAAE,OAAO,EAAC,EAAE,EAAE;oCAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;oCACzB,OAAO,CACL,MAAC,gBAAgB,IAEf,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAC3C,QAAQ,EAAE,CAAC,OAAO,aAEjB,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,SAAS,EAAC,cAAc,GAAG,CAAC,CAAC,CAAC,IAAI,EAC/C,MAAM,CAAC,KAAK,KALR,MAAM,CAAC,IAAI,CAMC,CACpB,CAAC;gCACJ,CAAC,CAAC,IACkB,IACT,GACX,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n Button,\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n Popover,\n PopoverContent,\n PopoverTrigger,\n} from '@sqlrooms/ui';\nimport {\n BarChart3,\n Check,\n ChevronsUpDown,\n FileText,\n Plus,\n TableProperties,\n} from 'lucide-react';\nimport React, {useEffect, useMemo, useState} from 'react';\nimport {useMosaicDashboardContext} from './MosaicDashboardContext';\nimport {\n type MosaicDashboardAddPanelAction,\n type MosaicDashboardAddPanelActionContext,\n createMosaicDashboardProfilerPanelConfig,\n createMosaicDashboardTextPanelConfig,\n getMosaicDashboardSelectionName,\n MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE,\n MOSAIC_DASHBOARD_TEXT_PANEL_TYPE,\n useStoreWithMosaicDashboard,\n} from './MosaicDashboardSlice';\n\nexport const MosaicDashboardToolbar: React.FC = () => {\n const {dashboardId, canCreateChart, addDefaultChart} =\n useMosaicDashboardContext();\n const dashboard = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.config.dashboardsById[dashboardId],\n );\n const setSelectedTable = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.setSelectedTable,\n );\n const addPanel = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.addPanel,\n );\n const panelRenderers = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.panelRenderers,\n );\n const addPanelActions = useStoreWithMosaicDashboard(\n (state) => state.mosaicDashboard.addPanelActions,\n );\n const getSelection = useStoreWithMosaicDashboard(\n (state) => state.mosaic.getSelection,\n );\n const dashboardSelectionName = getMosaicDashboardSelectionName(dashboardId);\n const dashboardSelection = useStoreWithMosaicDashboard(\n (state) => state.mosaic.selections[dashboardSelectionName],\n );\n const tables = useStoreWithMosaicDashboard((state) => state.db.tables);\n const tablesWithColumns = useMemo(\n () => tables.filter((table) => table.columns && table.columns.length > 0),\n [tables],\n );\n const selectedTable = useMemo(\n () =>\n tablesWithColumns.find(\n (table) => table.tableName === dashboard?.selectedTable,\n ),\n [dashboard?.selectedTable, tablesWithColumns],\n );\n const [tablePickerOpen, setTablePickerOpen] = useState(false);\n const canAddProfiler = Boolean(\n dashboard?.selectedTable &&\n panelRenderers[MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE],\n );\n const canAddText = Boolean(panelRenderers[MOSAIC_DASHBOARD_TEXT_PANEL_TYPE]);\n const addPanelActionContext = useMemo<MosaicDashboardAddPanelActionContext>(\n () => ({\n dashboardId,\n dashboard,\n selectedTable,\n tables: tablesWithColumns,\n }),\n [dashboard, dashboardId, selectedTable, tablesWithColumns],\n );\n const addPanelActionEntries = useMemo(\n () =>\n addPanelActions.map((action) => ({\n action,\n enabled: action.isEnabled\n ? action.isEnabled(addPanelActionContext)\n : true,\n })),\n [addPanelActionContext, addPanelActions],\n );\n const canAddCustomPanel = addPanelActionEntries.some(\n (entry) => entry.enabled,\n );\n const canAddAnyPanel =\n canCreateChart || canAddProfiler || canAddText || canAddCustomPanel;\n const [selectionVersion, setSelectionVersion] = useState(0);\n\n useEffect(() => {\n if (!dashboardSelection) {\n getSelection(dashboardSelectionName, 'crossfilter');\n }\n }, [dashboardSelection, dashboardSelectionName, getSelection]);\n\n useEffect(() => {\n if (!dashboardSelection) {\n return;\n }\n\n const handleSelectionChange = () => {\n setSelectionVersion((value) => value + 1);\n };\n\n dashboardSelection.addEventListener('value', handleSelectionChange);\n return () => {\n dashboardSelection.removeEventListener('value', handleSelectionChange);\n };\n }, [dashboardSelection]);\n\n const hasActiveFilters = useMemo(\n () => Boolean(dashboardSelection?.clauses.length),\n [dashboardSelection, selectionVersion],\n );\n\n const handleAddProfiler = () => {\n const panel = dashboard?.selectedTable\n ? createMosaicDashboardProfilerPanelConfig({\n source: {tableName: dashboard.selectedTable},\n })\n : createMosaicDashboardProfilerPanelConfig();\n addPanel(dashboardId, panel);\n };\n\n const handleAddText = () => {\n const panel = createMosaicDashboardTextPanelConfig();\n addPanel(dashboardId, panel);\n };\n\n const handleAddCustomPanel = (action: MosaicDashboardAddPanelAction) => {\n const panel = action.createPanel(addPanelActionContext);\n if (panel) {\n addPanel(dashboardId, panel);\n }\n };\n\n const handleResetFilters = () => {\n dashboardSelection?.reset();\n };\n\n return (\n <div className=\"flex items-center justify-between border-b px-5 py-2\">\n <div className=\"flex items-center gap-2\">\n <Popover open={tablePickerOpen} onOpenChange={setTablePickerOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n size=\"sm\"\n role=\"combobox\"\n aria-expanded={tablePickerOpen}\n className=\"w-[200px] justify-between\"\n >\n <span className=\"truncate\">\n {dashboard?.selectedTable || 'Select table…'}\n </span>\n <ChevronsUpDown className=\"ml-1 h-3.5 w-3.5 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-[220px] p-0\" align=\"start\">\n <Command>\n <CommandInput placeholder=\"Search tables…\" />\n <CommandList>\n <CommandEmpty>No tables found.</CommandEmpty>\n <CommandGroup>\n {tablesWithColumns.map((table) => (\n <CommandItem\n key={table.tableName}\n value={table.tableName}\n onSelect={(value) => {\n setSelectedTable(dashboardId, value);\n setTablePickerOpen(false);\n }}\n >\n <Check\n className={`mr-2 h-3.5 w-3.5 ${dashboard?.selectedTable === table.tableName ? 'opacity-100' : 'opacity-0'}`}\n />\n {table.tableName}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n <Button\n variant=\"link\"\n size=\"sm\"\n className=\"h-8 px-0\"\n disabled={!hasActiveFilters}\n onClick={handleResetFilters}\n >\n Reset filters\n </Button>\n </div>\n <div className=\"flex items-center gap-2\">\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button size=\"sm\" variant=\"outline\" disabled={!canAddAnyPanel}>\n <Plus className=\"mr-1 h-4 w-4\" />\n Add\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem\n onClick={addDefaultChart}\n disabled={!canCreateChart}\n >\n <BarChart3 className=\"mr-2 h-4 w-4\" />\n Chart\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={handleAddProfiler}\n disabled={!canAddProfiler}\n >\n <TableProperties className=\"mr-2 h-4 w-4\" />\n Profiler\n </DropdownMenuItem>\n <DropdownMenuItem onClick={handleAddText} disabled={!canAddText}>\n <FileText className=\"mr-2 h-4 w-4\" />\n Text\n </DropdownMenuItem>\n {addPanelActionEntries.map(({action, enabled}) => {\n const Icon = action.icon;\n return (\n <DropdownMenuItem\n key={action.type}\n onClick={() => handleAddCustomPanel(action)}\n disabled={!enabled}\n >\n {Icon ? <Icon className=\"mr-2 h-4 w-4\" /> : null}\n {action.label}\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultPanelRenderers.d.ts","sourceRoot":"","sources":["../../src/dashboard/defaultPanelRenderers.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAKhC,wBAAgB,0CAA0C,CACxD,cAAc,GAAE,oBAAyB,GACxC,oBAAoB,CAUtB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE, MOSAIC_DASHBOARD_CHART_PANEL_TYPE, MOSAIC_DASHBOARD_TEXT_PANEL_TYPE, } from './MosaicDashboardSlice';
|
|
2
|
-
import { mosaicDashboardProfilerPanelRenderer } from '../profiler/MosaicDashboardProfilerPanelRenderer';
|
|
3
|
-
import { mosaicDashboardChartRenderer } from '../chart/MosaicDashboardChartRenderer';
|
|
4
|
-
import { mosaicDashboardTextRenderer } from '../text/MosaicDashboardTextRenderer';
|
|
5
|
-
export function createDefaultMosaicDashboardPanelRenderers(extraRenderers = {}) {
|
|
6
|
-
return {
|
|
7
|
-
[MOSAIC_DASHBOARD_CHART_PANEL_TYPE]: mosaicDashboardChartRenderer,
|
|
8
|
-
[MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE]: mosaicDashboardProfilerPanelRenderer,
|
|
9
|
-
[MOSAIC_DASHBOARD_TEXT_PANEL_TYPE]: mosaicDashboardTextRenderer,
|
|
10
|
-
...extraRenderers,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=defaultPanelRenderers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultPanelRenderers.js","sourceRoot":"","sources":["../../src/dashboard/defaultPanelRenderers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oCAAoC,EACpC,iCAAiC,EACjC,gCAAgC,GAGjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,oCAAoC,EAAC,MAAM,kDAAkD,CAAC;AACtG,OAAO,EAAC,4BAA4B,EAAC,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAC,2BAA2B,EAAC,MAAM,qCAAqC,CAAC;AAEhF,MAAM,UAAU,0CAA0C,CACxD,iBAAuC,EAAE;IAEzC,OAAO;QACL,CAAC,iCAAiC,CAAC,EACjC,4BAAgD;QAClD,CAAC,oCAAoC,CAAC,EACpC,oCAAwD;QAC1D,CAAC,gCAAgC,CAAC,EAChC,2BAA+C;QACjD,GAAG,cAAc;KAClB,CAAC;AACJ,CAAC","sourcesContent":["import {\n MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE,\n MOSAIC_DASHBOARD_CHART_PANEL_TYPE,\n MOSAIC_DASHBOARD_TEXT_PANEL_TYPE,\n type AnyPanelRenderer,\n type PanelRenderersRecord,\n} from './MosaicDashboardSlice';\nimport {mosaicDashboardProfilerPanelRenderer} from '../profiler/MosaicDashboardProfilerPanelRenderer';\nimport {mosaicDashboardChartRenderer} from '../chart/MosaicDashboardChartRenderer';\nimport {mosaicDashboardTextRenderer} from '../text/MosaicDashboardTextRenderer';\n\nexport function createDefaultMosaicDashboardPanelRenderers(\n extraRenderers: PanelRenderersRecord = {},\n): PanelRenderersRecord {\n return {\n [MOSAIC_DASHBOARD_CHART_PANEL_TYPE]:\n mosaicDashboardChartRenderer as AnyPanelRenderer,\n [MOSAIC_DASHBOARD_PROFILER_PANEL_TYPE]:\n mosaicDashboardProfilerPanelRenderer as AnyPanelRenderer,\n [MOSAIC_DASHBOARD_TEXT_PANEL_TYPE]:\n mosaicDashboardTextRenderer as AnyPanelRenderer,\n ...extraRenderers,\n };\n}\n"]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type MosaicDashboardPanelRenderer, ProfilerPanel } from '../dashboard/MosaicDashboardSlice';
|
|
2
|
-
export declare const mosaicDashboardProfilerPanelRenderer: MosaicDashboardPanelRenderer<ProfilerPanel>;
|
|
3
|
-
//# sourceMappingURL=MosaicDashboardProfilerPanelRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardProfilerPanelRenderer.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicDashboardProfilerPanelRenderer.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,4BAA4B,EACjC,aAAa,EAGd,MAAM,mCAAmC,CAAC;AAyD3C,eAAO,MAAM,oCAAoC,EAAE,4BAA4B,CAAC,aAAa,CAI1F,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { SpinnerPane } from '@sqlrooms/ui';
|
|
3
|
-
import { TablePropertiesIcon } from 'lucide-react';
|
|
4
|
-
import { MosaicProfiler } from './MosaicProfiler';
|
|
5
|
-
import { useStoreWithMosaicDashboard, } from '../dashboard/MosaicDashboardSlice';
|
|
6
|
-
function MosaicDashboardProfilerRenderer({ panel, resolvedSource, selectionName, }) {
|
|
7
|
-
const connection = useStoreWithMosaicDashboard((state) => state.mosaic.connection);
|
|
8
|
-
const tableName = resolvedSource?.tableName;
|
|
9
|
-
const pageSize = typeof panel.config.pageSize === 'number'
|
|
10
|
-
? panel.config.pageSize
|
|
11
|
-
: undefined;
|
|
12
|
-
if (!tableName) {
|
|
13
|
-
return (_jsx("div", { className: "text-muted-foreground flex h-full items-center justify-center p-4 text-sm", children: "Profiler panels require a table source." }));
|
|
14
|
-
}
|
|
15
|
-
if (connection.status === 'loading') {
|
|
16
|
-
return _jsx(SpinnerPane, { className: "h-full w-full" });
|
|
17
|
-
}
|
|
18
|
-
if (connection.status !== 'ready') {
|
|
19
|
-
return (_jsx("div", { className: "text-muted-foreground flex h-full items-center justify-center p-4 text-sm", children: "Mosaic connection is not ready." }));
|
|
20
|
-
}
|
|
21
|
-
const profilerProps = {
|
|
22
|
-
tableName,
|
|
23
|
-
pageSize: pageSize ?? 10,
|
|
24
|
-
selectionName,
|
|
25
|
-
};
|
|
26
|
-
return (_jsx(MosaicProfiler, { ...profilerProps, children: _jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx("div", { className: "min-h-0 flex-1 overflow-auto", children: _jsxs(MosaicProfiler.Table, { children: [_jsx(MosaicProfiler.Header, {}), _jsx(MosaicProfiler.Rows, {})] }) }), _jsx(MosaicProfiler.StatusBar, {})] }) }));
|
|
27
|
-
}
|
|
28
|
-
export const mosaicDashboardProfilerPanelRenderer = {
|
|
29
|
-
component: MosaicDashboardProfilerRenderer,
|
|
30
|
-
icon: TablePropertiesIcon,
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=MosaicDashboardProfilerPanelRenderer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicDashboardProfilerPanelRenderer.js","sourceRoot":"","sources":["../../src/profiler/MosaicDashboardProfilerPanelRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AACzC,OAAO,EAAC,mBAAmB,EAAC,MAAM,cAAc,CAAC;AACjD,OAAO,EAAC,cAAc,EAA2B,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAIL,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,SAAS,+BAA+B,CAAC,EACvC,KAAK,EACL,cAAc,EACd,aAAa,GACc;IAC3B,MAAM,UAAU,GAAG,2BAA2B,CAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CACnC,CAAC;IACF,MAAM,SAAS,GAAG,cAAc,EAAE,SAAS,CAAC;IAC5C,MAAM,QAAQ,GACZ,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,KAAK,QAAQ;QACvC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ;QACvB,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,CACL,cAAK,SAAS,EAAC,2EAA2E,wDAEpF,CACP,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACpC,OAAO,KAAC,WAAW,IAAC,SAAS,EAAC,eAAe,GAAG,CAAC;IACnD,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAClC,OAAO,CACL,cAAK,SAAS,EAAC,2EAA2E,gDAEpF,CACP,CAAC;IACJ,CAAC;IAED,MAAM,aAAa,GAAG;QACpB,SAAS;QACT,QAAQ,EAAE,QAAQ,IAAI,EAAE;QACxB,aAAa;KACgB,CAAC;IAEhC,OAAO,CACL,KAAC,cAAc,OAAK,aAAa,YAC/B,eAAK,SAAS,EAAC,8BAA8B,aAC3C,cAAK,SAAS,EAAC,8BAA8B,YAC3C,MAAC,cAAc,CAAC,KAAK,eACnB,KAAC,cAAc,CAAC,MAAM,KAAG,EACzB,KAAC,cAAc,CAAC,IAAI,KAAG,IACF,GACnB,EACN,KAAC,cAAc,CAAC,SAAS,KAAG,IACxB,GACS,CAClB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,oCAAoC,GAC/C;IACE,SAAS,EAAE,+BAA+B;IAC1C,IAAI,EAAE,mBAAmB;CAC1B,CAAC","sourcesContent":["import {SpinnerPane} from '@sqlrooms/ui';\nimport {TablePropertiesIcon} from 'lucide-react';\nimport {MosaicProfiler, type MosaicProfilerProps} from './MosaicProfiler';\nimport {\n type MosaicDashboardPanelRenderer,\n ProfilerPanel,\n type ProfilerPanelRendererProps,\n useStoreWithMosaicDashboard,\n} from '../dashboard/MosaicDashboardSlice';\n\nfunction MosaicDashboardProfilerRenderer({\n panel,\n resolvedSource,\n selectionName,\n}: ProfilerPanelRendererProps) {\n const connection = useStoreWithMosaicDashboard(\n (state) => state.mosaic.connection,\n );\n const tableName = resolvedSource?.tableName;\n const pageSize =\n typeof panel.config.pageSize === 'number'\n ? panel.config.pageSize\n : undefined;\n\n if (!tableName) {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-4 text-sm\">\n Profiler panels require a table source.\n </div>\n );\n }\n\n if (connection.status === 'loading') {\n return <SpinnerPane className=\"h-full w-full\" />;\n }\n\n if (connection.status !== 'ready') {\n return (\n <div className=\"text-muted-foreground flex h-full items-center justify-center p-4 text-sm\">\n Mosaic connection is not ready.\n </div>\n );\n }\n\n const profilerProps = {\n tableName,\n pageSize: pageSize ?? 10,\n selectionName,\n } satisfies MosaicProfilerProps;\n\n return (\n <MosaicProfiler {...profilerProps}>\n <div className=\"flex h-full min-h-0 flex-col\">\n <div className=\"min-h-0 flex-1 overflow-auto\">\n <MosaicProfiler.Table>\n <MosaicProfiler.Header />\n <MosaicProfiler.Rows />\n </MosaicProfiler.Table>\n </div>\n <MosaicProfiler.StatusBar />\n </div>\n </MosaicProfiler>\n );\n}\n\nexport const mosaicDashboardProfilerPanelRenderer: MosaicDashboardPanelRenderer<ProfilerPanel> =\n {\n component: MosaicDashboardProfilerRenderer,\n icon: TablePropertiesIcon,\n };\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type PropsWithChildren, type ReactElement } from 'react';
|
|
2
|
-
import { Table } from '@sqlrooms/ui';
|
|
3
|
-
import { type MosaicProfilerHeaderProps } from './MosaicProfilerHeader';
|
|
4
|
-
import { type MosaicProfilerRowsProps } from './MosaicProfilerRows';
|
|
5
|
-
import { type MosaicProfilerStatusBarProps } from './MosaicProfilerStatusBar';
|
|
6
|
-
import type { MosaicProfilerOptions, UseMosaicProfilerReturn } from './types';
|
|
7
|
-
export type MosaicProfilerRootProps = PropsWithChildren<{
|
|
8
|
-
profiler: UseMosaicProfilerReturn;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* Provides an existing profiler instance to compound profiler subcomponents.
|
|
12
|
-
*/
|
|
13
|
-
export declare function MosaicProfilerRoot({ children, profiler, }: MosaicProfilerRootProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export type MosaicProfilerProps = PropsWithChildren<MosaicProfilerOptions>;
|
|
15
|
-
export type MosaicProfilerCompoundHeaderProps = Omit<MosaicProfilerHeaderProps, 'profiler'>;
|
|
16
|
-
declare function MosaicProfilerCompoundHeader(props: MosaicProfilerCompoundHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export type MosaicProfilerCompoundRowsProps = Omit<MosaicProfilerRowsProps, 'profiler'>;
|
|
18
|
-
declare function MosaicProfilerCompoundRows(props: MosaicProfilerCompoundRowsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export type MosaicProfilerCompoundStatusBarProps = Omit<MosaicProfilerStatusBarProps, 'profiler'>;
|
|
20
|
-
declare function MosaicProfilerCompoundStatusBar(props: MosaicProfilerCompoundStatusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export type MosaicProfilerCompoundTableProps = ComponentProps<typeof Table>;
|
|
22
|
-
declare function MosaicProfilerCompoundTable({ className, disableWrapper, style, ...props }: MosaicProfilerCompoundTableProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
type MosaicProfilerCompoundComponent = ((props: MosaicProfilerProps) => ReactElement) & {
|
|
24
|
-
Header: typeof MosaicProfilerCompoundHeader;
|
|
25
|
-
Root: typeof MosaicProfilerRoot;
|
|
26
|
-
Rows: typeof MosaicProfilerCompoundRows;
|
|
27
|
-
StatusBar: typeof MosaicProfilerCompoundStatusBar;
|
|
28
|
-
Table: typeof MosaicProfilerCompoundTable;
|
|
29
|
-
};
|
|
30
|
-
export declare const MosaicProfiler: MosaicProfilerCompoundComponent;
|
|
31
|
-
export {};
|
|
32
|
-
//# sourceMappingURL=MosaicProfiler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicProfiler.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfiler.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAEnC,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,KAAK,4B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,eAAO,MAAM,cAAc,EAAE,+BAS5B,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, } from 'react';
|
|
3
|
-
import { Table } from '@sqlrooms/ui';
|
|
4
|
-
import { getProfilerTableWidth } from './layout';
|
|
5
|
-
import { MosaicProfilerHeader, } from './MosaicProfilerHeader';
|
|
6
|
-
import { MosaicProfilerRows, } from './MosaicProfilerRows';
|
|
7
|
-
import { MosaicProfilerStatusBar, } from './MosaicProfilerStatusBar';
|
|
8
|
-
import { useMosaicProfiler } from './useMosaicProfiler';
|
|
9
|
-
const profilerContext = createContext(null);
|
|
10
|
-
function useProfilerCompoundContext() {
|
|
11
|
-
const profiler = useContext(profilerContext);
|
|
12
|
-
if (!profiler) {
|
|
13
|
-
throw new Error('MosaicProfiler compound components must be rendered inside <MosaicProfiler> or <MosaicProfiler.Root>.');
|
|
14
|
-
}
|
|
15
|
-
return profiler;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Provides an existing profiler instance to compound profiler subcomponents.
|
|
19
|
-
*/
|
|
20
|
-
export function MosaicProfilerRoot({ children, profiler, }) {
|
|
21
|
-
return (_jsx(profilerContext.Provider, { value: profiler, children: children }));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Creates a profiler instance and exposes it to compound profiler
|
|
25
|
-
* subcomponents through context.
|
|
26
|
-
*/
|
|
27
|
-
function MosaicProfilerComponent({ children, ...options }) {
|
|
28
|
-
const profiler = useMosaicProfiler(options);
|
|
29
|
-
return (_jsx(MosaicProfilerRoot, { profiler: profiler, children: children }));
|
|
30
|
-
}
|
|
31
|
-
function MosaicProfilerCompoundHeader(props) {
|
|
32
|
-
const profiler = useProfilerCompoundContext();
|
|
33
|
-
return _jsx(MosaicProfilerHeader, { ...props, profiler: profiler });
|
|
34
|
-
}
|
|
35
|
-
function MosaicProfilerCompoundRows(props) {
|
|
36
|
-
const profiler = useProfilerCompoundContext();
|
|
37
|
-
return _jsx(MosaicProfilerRows, { ...props, profiler: profiler });
|
|
38
|
-
}
|
|
39
|
-
function MosaicProfilerCompoundStatusBar(props) {
|
|
40
|
-
const profiler = useProfilerCompoundContext();
|
|
41
|
-
return _jsx(MosaicProfilerStatusBar, { ...props, profiler: profiler });
|
|
42
|
-
}
|
|
43
|
-
function MosaicProfilerCompoundTable({ className, disableWrapper = true, style, ...props }) {
|
|
44
|
-
const profiler = useProfilerCompoundContext();
|
|
45
|
-
const tableWidth = getProfilerTableWidth(profiler.columns);
|
|
46
|
-
return (_jsx(Table, { disableWrapper: disableWrapper, className: ['min-w-full table-fixed', className]
|
|
47
|
-
.filter(Boolean)
|
|
48
|
-
.join(' '), style: { width: `${tableWidth}px`, ...style }, ...props }));
|
|
49
|
-
}
|
|
50
|
-
export const MosaicProfiler = Object.assign(MosaicProfilerComponent, {
|
|
51
|
-
Header: MosaicProfilerCompoundHeader,
|
|
52
|
-
Root: MosaicProfilerRoot,
|
|
53
|
-
Rows: MosaicProfilerCompoundRows,
|
|
54
|
-
StatusBar: MosaicProfilerCompoundStatusBar,
|
|
55
|
-
Table: MosaicProfilerCompoundTable,
|
|
56
|
-
});
|
|
57
|
-
//# sourceMappingURL=MosaicProfiler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicProfiler.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfiler.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AACnC,OAAO,EAAC,qBAAqB,EAAC,MAAM,UAAU,CAAC;AAC/C,OAAO,EACL,oBAAoB,GAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,uBAAuB,GAExB,MAAM,2BAA2B,CAAC;AA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AAI,CAAC;AACpE,CAAC;AAID,SAAS,2BAA2B,CAAC,EACnC,SAAS,EACT,cAAc,GAAG,IAAI,EACrB,KAAK,EACL,GAAG,KAAK,EACyB;IACjC,MAAM,QAAQ,GAAG,0BAA0B,EAAE,CAAC;IAC9C,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,KAAK,IACJ,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC;aAC7C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,EAAC,KAAK,EAAE,GAAG,UAAU,IAAI,EAAE,GAAG,KAAK,EAAC,KACvC,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAYD,MAAM,CAAC,MAAM,cAAc,GAAoC,MAAM,CAAC,MAAM,CAC1E,uBAAuB,EACvB;IACE,MAAM,EAAE,4BAA4B;IACpC,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,0BAA0B;IAChC,SAAS,EAAE,+BAA+B;IAC1C,KAAK,EAAE,2BAA2B;CACnC,CACF,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n type ComponentProps,\n type PropsWithChildren,\n type ReactElement,\n} from 'react';\nimport {Table} from '@sqlrooms/ui';\nimport {getProfilerTableWidth} from './layout';\nimport {\n MosaicProfilerHeader,\n type MosaicProfilerHeaderProps,\n} from './MosaicProfilerHeader';\nimport {\n MosaicProfilerRows,\n type MosaicProfilerRowsProps,\n} from './MosaicProfilerRows';\nimport {\n MosaicProfilerStatusBar,\n type MosaicProfilerStatusBarProps,\n} from './MosaicProfilerStatusBar';\nimport type {MosaicProfilerOptions, UseMosaicProfilerReturn} from './types';\nimport {useMosaicProfiler} from './useMosaicProfiler';\n\nconst profilerContext = createContext<UseMosaicProfilerReturn | null>(null);\n\nfunction useProfilerCompoundContext() {\n const profiler = useContext(profilerContext);\n\n if (!profiler) {\n throw new Error(\n 'MosaicProfiler compound components must be rendered inside <MosaicProfiler> or <MosaicProfiler.Root>.',\n );\n }\n\n return profiler;\n}\n\nexport type MosaicProfilerRootProps = PropsWithChildren<{\n profiler: UseMosaicProfilerReturn;\n}>;\n\n/**\n * Provides an existing profiler instance to compound profiler subcomponents.\n */\nexport function MosaicProfilerRoot({\n children,\n profiler,\n}: MosaicProfilerRootProps) {\n return (\n <profilerContext.Provider value={profiler}>\n {children}\n </profilerContext.Provider>\n );\n}\n\nexport type MosaicProfilerProps = PropsWithChildren<MosaicProfilerOptions>;\n\n/**\n * Creates a profiler instance and exposes it to compound profiler\n * subcomponents through context.\n */\nfunction MosaicProfilerComponent({\n children,\n ...options\n}: MosaicProfilerProps): ReactElement {\n const profiler = useMosaicProfiler(options);\n return (\n <MosaicProfilerRoot profiler={profiler}>{children}</MosaicProfilerRoot>\n );\n}\n\nexport type MosaicProfilerCompoundHeaderProps = Omit<\n MosaicProfilerHeaderProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundHeader(\n props: MosaicProfilerCompoundHeaderProps,\n) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerHeader {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundRowsProps = Omit<\n MosaicProfilerRowsProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundRows(props: MosaicProfilerCompoundRowsProps) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerRows {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundStatusBarProps = Omit<\n MosaicProfilerStatusBarProps,\n 'profiler'\n>;\n\nfunction MosaicProfilerCompoundStatusBar(\n props: MosaicProfilerCompoundStatusBarProps,\n) {\n const profiler = useProfilerCompoundContext();\n return <MosaicProfilerStatusBar {...props} profiler={profiler} />;\n}\n\nexport type MosaicProfilerCompoundTableProps = ComponentProps<typeof Table>;\n\nfunction MosaicProfilerCompoundTable({\n className,\n disableWrapper = true,\n style,\n ...props\n}: MosaicProfilerCompoundTableProps) {\n const profiler = useProfilerCompoundContext();\n const tableWidth = getProfilerTableWidth(profiler.columns);\n\n return (\n <Table\n disableWrapper={disableWrapper}\n className={['min-w-full table-fixed', className]\n .filter(Boolean)\n .join(' ')}\n style={{width: `${tableWidth}px`, ...style}}\n {...props}\n />\n );\n}\n\ntype MosaicProfilerCompoundComponent = ((\n props: MosaicProfilerProps,\n) => ReactElement) & {\n Header: typeof MosaicProfilerCompoundHeader;\n Root: typeof MosaicProfilerRoot;\n Rows: typeof MosaicProfilerCompoundRows;\n StatusBar: typeof MosaicProfilerCompoundStatusBar;\n Table: typeof MosaicProfilerCompoundTable;\n};\n\nexport const MosaicProfiler: MosaicProfilerCompoundComponent = Object.assign(\n MosaicProfilerComponent,\n {\n Header: MosaicProfilerCompoundHeader,\n Root: MosaicProfilerRoot,\n Rows: MosaicProfilerCompoundRows,\n StatusBar: MosaicProfilerCompoundStatusBar,\n Table: MosaicProfilerCompoundTable,\n },\n);\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { UseMosaicProfilerReturn } from './types';
|
|
2
|
-
export type MosaicProfilerHeaderProps = {
|
|
3
|
-
className?: string;
|
|
4
|
-
profiler: Pick<UseMosaicProfilerReturn, 'columns' | 'setSorting' | 'sorting'>;
|
|
5
|
-
};
|
|
6
|
-
export declare function MosaicProfilerHeader({ className, profiler, }: MosaicProfilerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=MosaicProfilerHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicProfilerHeader.d.ts","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerHeader.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAKV,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;CAC/E,CAAC;AAgYF,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,QAAQ,GACT,EAAE,yBAAyB,2CA0E3B"}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Badge, cn, TableHead, TableHeader, TableRow } from '@sqlrooms/ui';
|
|
3
|
-
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
|
-
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import { getProfilerColumnWidthPx, PROFILER_DEFAULT_COLUMN_WIDTH_PX, PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX, PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX, } from './layout';
|
|
6
|
-
import { isProfilerUnsupportedSummaryType } from './utils';
|
|
7
|
-
const COLUMN_WIDTH_CLASS = `min-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px]`;
|
|
8
|
-
const STICKY_ROW_NUMBER_CLASS = `bg-background sticky left-0 top-0 z-40 min-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] border-r px-1 text-center`;
|
|
9
|
-
const STICKY_COLUMN_HEADER_CLASS = 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';
|
|
10
|
-
function getColumnWidthClass(column) {
|
|
11
|
-
return isProfilerUnsupportedSummaryType(column.field.type)
|
|
12
|
-
? `min-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px]`
|
|
13
|
-
: COLUMN_WIDTH_CLASS;
|
|
14
|
-
}
|
|
15
|
-
function setNextSortState(currentSorting, columnId, setSorting) {
|
|
16
|
-
const current = currentSorting.find((entry) => entry.id === columnId);
|
|
17
|
-
if (!current) {
|
|
18
|
-
setSorting([{ desc: false, id: columnId }]);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
if (!current.desc) {
|
|
22
|
-
setSorting([{ desc: true, id: columnId }]);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
setSorting([]);
|
|
26
|
-
}
|
|
27
|
-
function formatPercentOfTotal(value) {
|
|
28
|
-
const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;
|
|
29
|
-
return Intl.NumberFormat(undefined, {
|
|
30
|
-
maximumFractionDigits,
|
|
31
|
-
style: 'percent',
|
|
32
|
-
}).format(value);
|
|
33
|
-
}
|
|
34
|
-
function CategorySummaryCell({ summary, }) {
|
|
35
|
-
const [hoveredKey, setHoveredKey] = useState();
|
|
36
|
-
const totalCount = summary.buckets.reduce((acc, bucket) => acc + bucket.totalCount, 0);
|
|
37
|
-
const activeBucket = summary.buckets.find((bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey);
|
|
38
|
-
const footerLabel = activeBucket
|
|
39
|
-
? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`
|
|
40
|
-
: `${summary.bucketCount.toLocaleString()} categories`;
|
|
41
|
-
return (_jsxs("div", { className: "space-y-0.5 pt-1.5", children: [_jsx("div", { className: "flex h-10 overflow-hidden rounded-sm border", children: summary.buckets.map((bucket) => {
|
|
42
|
-
const width = totalCount > 0
|
|
43
|
-
? `${(bucket.totalCount / totalCount) * 100}%`
|
|
44
|
-
: '0%';
|
|
45
|
-
const fillPct = bucket.totalCount > 0
|
|
46
|
-
? (bucket.filteredCount / bucket.totalCount) * 100
|
|
47
|
-
: 0;
|
|
48
|
-
const isSelected = summary.selectedKey === bucket.key;
|
|
49
|
-
const background = bucket.kind === 'overflow'
|
|
50
|
-
? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`
|
|
51
|
-
: `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;
|
|
52
|
-
return (_jsx("button", { type: "button", disabled: !bucket.selectable, className: cn('relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default', isSelected && 'ring-ring ring-1 ring-inset', !bucket.selectable && 'text-muted-foreground'), style: {
|
|
53
|
-
background,
|
|
54
|
-
flexBasis: width,
|
|
55
|
-
flexGrow: bucket.totalCount,
|
|
56
|
-
}, onClick: () => summary.toggleValue(bucket.key), onMouseEnter: () => setHoveredKey(bucket.key), onMouseLeave: () => setHoveredKey(undefined), children: _jsx("span", { className: "max-w-full truncate px-1", children: bucket.label }) }, bucket.key));
|
|
57
|
-
}) }), _jsx("div", { className: "text-muted-foreground truncate text-[10px] font-normal", children: footerLabel })] }));
|
|
58
|
-
}
|
|
59
|
-
const histogramInteractorIds = new WeakMap();
|
|
60
|
-
let nextHistogramInteractorId = 0;
|
|
61
|
-
function getHistogramInteractorId(interactor) {
|
|
62
|
-
const cachedId = histogramInteractorIds.get(interactor);
|
|
63
|
-
if (cachedId !== undefined) {
|
|
64
|
-
return cachedId;
|
|
65
|
-
}
|
|
66
|
-
const id = ++nextHistogramInteractorId;
|
|
67
|
-
histogramInteractorIds.set(interactor, id);
|
|
68
|
-
return id;
|
|
69
|
-
}
|
|
70
|
-
function createScale(type, domain, range) {
|
|
71
|
-
const [d0, d1] = domain.map((value) => value instanceof Date ? value.getTime() : value);
|
|
72
|
-
const [r0, r1] = range;
|
|
73
|
-
const span = d1 - d0 || 1;
|
|
74
|
-
const rspan = r1 - r0;
|
|
75
|
-
return {
|
|
76
|
-
apply(value) {
|
|
77
|
-
const numeric = value instanceof Date ? value.getTime() : value;
|
|
78
|
-
return r0 + ((numeric - d0) / span) * rspan;
|
|
79
|
-
},
|
|
80
|
-
domain,
|
|
81
|
-
invert(value) {
|
|
82
|
-
const numeric = d0 + ((value - r0) / (rspan || 1)) * span;
|
|
83
|
-
return type === 'utc' ? new Date(numeric) : numeric;
|
|
84
|
-
},
|
|
85
|
-
range,
|
|
86
|
-
type,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function formatDomainValue(value, valueType) {
|
|
90
|
-
if (valueType === 'date') {
|
|
91
|
-
const date = value instanceof Date ? value : new Date(value);
|
|
92
|
-
return date.toISOString().slice(0, 10);
|
|
93
|
-
}
|
|
94
|
-
return Intl.NumberFormat(undefined, {
|
|
95
|
-
maximumFractionDigits: 2,
|
|
96
|
-
}).format(typeof value === 'number' ? value : value.getTime());
|
|
97
|
-
}
|
|
98
|
-
function HistogramSummaryCell({ summary, }) {
|
|
99
|
-
const svgRef = useRef(null);
|
|
100
|
-
const brushRootRef = useRef(null);
|
|
101
|
-
const initializedBrushRef = useRef(undefined);
|
|
102
|
-
const layout = useMemo(() => {
|
|
103
|
-
const width = 122;
|
|
104
|
-
const height = 40;
|
|
105
|
-
const margin = { bottom: 4, left: 4, right: 4, top: 2 };
|
|
106
|
-
const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;
|
|
107
|
-
const nullBarGap = nullBarWidth > 0 ? 3 : 0;
|
|
108
|
-
const totalBins = summary.totalBins.length
|
|
109
|
-
? summary.totalBins
|
|
110
|
-
: summary.filteredBins;
|
|
111
|
-
const domain = totalBins.length > 0
|
|
112
|
-
? [totalBins[0].x0, totalBins[totalBins.length - 1].x1]
|
|
113
|
-
: null;
|
|
114
|
-
const totalMax = Math.max(summary.totalNullCount, ...totalBins.map((bin) => bin.length), 1);
|
|
115
|
-
const xScale = domain
|
|
116
|
-
? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [
|
|
117
|
-
margin.left + nullBarWidth + nullBarGap,
|
|
118
|
-
width - margin.right,
|
|
119
|
-
])
|
|
120
|
-
: null;
|
|
121
|
-
const yScale = createScale('linear', [0, totalMax], [height - margin.bottom, margin.top]);
|
|
122
|
-
return {
|
|
123
|
-
height,
|
|
124
|
-
margin,
|
|
125
|
-
nullBarGap,
|
|
126
|
-
nullBarWidth,
|
|
127
|
-
width,
|
|
128
|
-
xScale,
|
|
129
|
-
yScale,
|
|
130
|
-
};
|
|
131
|
-
}, [summary]);
|
|
132
|
-
useEffect(() => {
|
|
133
|
-
const svg = svgRef.current;
|
|
134
|
-
const brushRoot = brushRootRef.current;
|
|
135
|
-
const interactor = summary.interactor;
|
|
136
|
-
if (!svg || !brushRoot || !interactor || !layout.xScale)
|
|
137
|
-
return;
|
|
138
|
-
const brushKey = [
|
|
139
|
-
getHistogramInteractorId(interactor),
|
|
140
|
-
summary.valueType,
|
|
141
|
-
layout.xScale.domain
|
|
142
|
-
.map((value) => (value instanceof Date ? value.getTime() : value))
|
|
143
|
-
.join(':'),
|
|
144
|
-
layout.xScale.range.join(':'),
|
|
145
|
-
].join('|');
|
|
146
|
-
if (initializedBrushRef.current === brushKey)
|
|
147
|
-
return;
|
|
148
|
-
svg.scale = (channel) => {
|
|
149
|
-
if (channel === 'x')
|
|
150
|
-
return layout.xScale;
|
|
151
|
-
if (channel === 'y')
|
|
152
|
-
return layout.yScale;
|
|
153
|
-
return undefined;
|
|
154
|
-
};
|
|
155
|
-
brushRoot.replaceChildren();
|
|
156
|
-
interactor.init(svg, brushRoot);
|
|
157
|
-
initializedBrushRef.current = brushKey;
|
|
158
|
-
}, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);
|
|
159
|
-
const axisY = layout.height - layout.margin.bottom;
|
|
160
|
-
const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;
|
|
161
|
-
const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;
|
|
162
|
-
const xAxisEnd = layout.xScale?.range[1] ?? layout.width - layout.margin.right;
|
|
163
|
-
return (_jsxs("div", { className: "space-y-0 pt-1.5", children: [_jsxs("svg", { ref: svgRef, width: layout.width, height: layout.height, viewBox: `0 0 ${layout.width} ${layout.height}`, className: "max-w-full overflow-visible", children: [summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.totalNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
|
|
164
|
-
layout.yScale.apply(summary.totalNullCount), fill: "hsl(var(--muted-foreground) / 0.22)" })) : null, summary.totalNullCount > 0 ? (_jsx("rect", { x: layout.margin.left, y: layout.yScale.apply(summary.filteredNullCount), width: layout.nullBarWidth, height: layout.yScale.apply(0) -
|
|
165
|
-
layout.yScale.apply(summary.filteredNullCount), fill: "hsl(var(--chart-1))", opacity: 0.95 })) : null, summary.totalBins.map((bin, index) => {
|
|
166
|
-
const x0 = layout.xScale?.apply(bin.x0) ?? 0;
|
|
167
|
-
const x1 = layout.xScale?.apply(bin.x1) ?? 0;
|
|
168
|
-
const y = layout.yScale.apply(bin.length);
|
|
169
|
-
return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--muted-foreground) / 0.22)" }, `bg-${index}`));
|
|
170
|
-
}), summary.filteredBins.map((bin, index) => {
|
|
171
|
-
const x0 = layout.xScale?.apply(bin.x0) ?? 0;
|
|
172
|
-
const x1 = layout.xScale?.apply(bin.x1) ?? 0;
|
|
173
|
-
const y = layout.yScale.apply(bin.length);
|
|
174
|
-
return (_jsx("rect", { x: x0 + 1, y: y, width: Math.max(x1 - x0 - 1, 1), height: layout.yScale.apply(0) - y, fill: "hsl(var(--chart-1))", opacity: 0.95 }, `fg-${index}`));
|
|
175
|
-
}), _jsx("line", { x1: xAxisStart, x2: xAxisEnd, y1: axisY, y2: axisY, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisStart, x2: xAxisStart, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), _jsx("line", { x1: xAxisEnd, x2: xAxisEnd, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--border))" }), summary.totalNullCount > 0 ? (_jsx("line", { x1: nullBarCenter, x2: nullBarCenter, y1: axisY, y2: axisY + 2.5, stroke: "hsl(var(--chart-1))" })) : null, _jsx("g", { ref: brushRootRef })] }), _jsxs("div", { className: "text-muted-foreground relative h-3.5 text-[10px] font-normal", children: [summary.totalNullCount > 0 ? (_jsx("span", { className: "absolute -translate-x-1/2", style: { left: nullBarCenter }, children: "\u2205" })) : null, _jsx("span", { className: "absolute", style: { left: xAxisStart }, children: summary.totalBins[0]
|
|
176
|
-
? formatDomainValue(summary.totalBins[0].x0, summary.valueType)
|
|
177
|
-
: '0' }), _jsx("span", { className: "absolute -translate-x-full", style: { left: xAxisEnd }, children: summary.totalBins.at(-1)
|
|
178
|
-
? formatDomainValue(summary.totalBins.at(-1).x1, summary.valueType)
|
|
179
|
-
: '0' })] })] }));
|
|
180
|
-
}
|
|
181
|
-
function SummaryCell({ column }) {
|
|
182
|
-
if (column.summary.kind === 'histogram') {
|
|
183
|
-
return _jsx(HistogramSummaryCell, { summary: column.summary });
|
|
184
|
-
}
|
|
185
|
-
if (column.summary.kind === 'category') {
|
|
186
|
-
return _jsx(CategorySummaryCell, { summary: column.summary });
|
|
187
|
-
}
|
|
188
|
-
return (_jsx("div", { className: "text-muted-foreground pt-1.5 text-[10px] font-normal", children: column.summary.label }));
|
|
189
|
-
}
|
|
190
|
-
export function MosaicProfilerHeader({ className, profiler, }) {
|
|
191
|
-
return (_jsxs(_Fragment, { children: [_jsxs("colgroup", { children: [_jsx("col", { style: { width: PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX } }), profiler.columns.map((column) => (_jsx("col", { style: { width: getProfilerColumnWidthPx(column) } }, column.name)))] }), _jsx(TableHeader, { className: cn('sticky top-0 z-30', className), children: _jsxs(TableRow, { children: [_jsx(TableHead, { className: STICKY_ROW_NUMBER_CLASS, children: "#" }), profiler.columns.map((column) => {
|
|
192
|
-
const sortState = profiler.sorting.find((entry) => entry.id === column.name);
|
|
193
|
-
return (_jsx(TableHead, { className: cn(getColumnWidthClass(column), STICKY_COLUMN_HEADER_CLASS), children: _jsxs("div", { className: "min-w-0", children: [_jsxs("button", { type: "button", className: "group relative flex w-full items-start gap-1.5 pr-4 text-left", onClick: () => setNextSortState(profiler.sorting, column.name, profiler.setSorting), children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[13px] leading-tight font-semibold", children: column.name }), _jsx(Badge, { variant: "outline", className: "mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60", children: String(column.field.type) })] }), _jsx("span", { className: "text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center", children: sortState ? (sortState.desc ? (_jsx(ChevronDownIcon, { className: "h-4 w-4" })) : (_jsx(ChevronUpIcon, { className: "h-4 w-4" }))) : (_jsxs("span", { className: "flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60", children: [_jsx(ChevronUpIcon, { className: "-mb-1 h-3 w-3" }), _jsx(ChevronDownIcon, { className: "-mt-1 h-3 w-3" })] })) })] }), _jsx(SummaryCell, { column: column })] }) }, column.name));
|
|
194
|
-
})] }) })] }));
|
|
195
|
-
}
|
|
196
|
-
//# sourceMappingURL=MosaicProfilerHeader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MosaicProfilerHeader.js","sourceRoot":"","sources":["../../src/profiler/MosaicProfilerHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,cAAc,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Q,CAAC,OAAO,EAChB,MAAM,CAAC,IAAI,EACX,QAAQ,CAAC,UAAU,CACpB,aAGH,eAAK,SAAS,EAAC,gBAAgB,aAC7B,cAAK,SAAS,EAAC,kDAAkD,YAC9D,MAAM,CAAC,IAAI,GACR,EACN,KAAC,KAAK,IACJ,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,4DAA4D,YAErE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GACpB,IACJ,EACN,eAAM,SAAS,EAAC,2GAA2G,YACxH,SAAS,CAAC,CAAC,CAAC,CACX,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CACf,KAAC,eAAe,IAAC,SAAS,EAAC,SAAS,GAAG,CACxC,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,IAAC,SAAS,EAAC,SAAS,GAAG,CACtC,CACF,CAAC,CAAC,CAAC,CACF,gBAAM,SAAS,EAAC,uGAAuG,aACrH,KAAC,aAAa,IAAC,SAAS,EAAC,eAAe,GAAG,EAC3C,KAAC,eAAe,IAAC,SAAS,EAAC,eAAe,GAAG,IACxC,CACR,GACI,IACA,EACT,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,GAAI,IAC3B,IA7CD,MAAM,CAAC,IAAI,CA8CN,CACb,CAAC;wBACJ,CAAC,CAAC,IACO,GACC,IACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["import {Badge, cn, TableHead, TableHeader, TableRow} from '@sqlrooms/ui';\nimport {ChevronDownIcon, ChevronUpIcon} from 'lucide-react';\nimport {useEffect, useMemo, useRef, useState} from 'react';\nimport {\n getProfilerColumnWidthPx,\n PROFILER_DEFAULT_COLUMN_WIDTH_PX,\n PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX,\n PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX,\n} from './layout';\nimport type {\n MosaicProfilerCategorySummary,\n MosaicProfilerColumnState,\n MosaicProfilerHistogramSummary,\n MosaicProfilerSorting,\n UseMosaicProfilerReturn,\n} from './types';\nimport {isProfilerUnsupportedSummaryType} from './utils';\n\nexport type MosaicProfilerHeaderProps = {\n className?: string;\n profiler: Pick<UseMosaicProfilerReturn, 'columns' | 'setSorting' | 'sorting'>;\n};\n\nconst COLUMN_WIDTH_CLASS = `min-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_DEFAULT_COLUMN_WIDTH_PX}px]`;\nconst STICKY_ROW_NUMBER_CLASS = `bg-background sticky left-0 top-0 z-40 min-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}px] border-r px-1 text-center`;\nconst STICKY_COLUMN_HEADER_CLASS =\n 'bg-background sticky top-0 z-30 align-top whitespace-nowrap shadow-[inset_0_-1px_0_hsl(var(--border))]';\n\nfunction getColumnWidthClass(column: MosaicProfilerColumnState) {\n return isProfilerUnsupportedSummaryType(column.field.type)\n ? `min-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px] max-w-[${PROFILER_UNSUPPORTED_COLUMN_WIDTH_PX}px]`\n : COLUMN_WIDTH_CLASS;\n}\n\nfunction setNextSortState(\n currentSorting: MosaicProfilerSorting,\n columnId: string,\n setSorting: UseMosaicProfilerReturn['setSorting'],\n) {\n const current = currentSorting.find((entry) => entry.id === columnId);\n if (!current) {\n setSorting([{desc: false, id: columnId}]);\n return;\n }\n if (!current.desc) {\n setSorting([{desc: true, id: columnId}]);\n return;\n }\n setSorting([]);\n}\n\nfunction formatPercentOfTotal(value: number) {\n const maximumFractionDigits = value >= 0.1 ? 0 : value >= 0.01 ? 1 : 2;\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits,\n style: 'percent',\n }).format(value);\n}\n\nfunction CategorySummaryCell({\n summary,\n}: {\n summary: MosaicProfilerCategorySummary;\n}) {\n const [hoveredKey, setHoveredKey] = useState<string>();\n const totalCount = summary.buckets.reduce(\n (acc, bucket) => acc + bucket.totalCount,\n 0,\n );\n const activeBucket = summary.buckets.find(\n (bucket) => bucket.key === hoveredKey || bucket.key === summary.selectedKey,\n );\n const footerLabel = activeBucket\n ? `${activeBucket.label} (${activeBucket.totalCount.toLocaleString()} ${activeBucket.totalCount === 1 ? 'row' : 'rows'}, ${formatPercentOfTotal(totalCount > 0 ? activeBucket.totalCount / totalCount : 0)})`\n : `${summary.bucketCount.toLocaleString()} categories`;\n\n return (\n <div className=\"space-y-0.5 pt-1.5\">\n <div className=\"flex h-10 overflow-hidden rounded-sm border\">\n {summary.buckets.map((bucket) => {\n const width =\n totalCount > 0\n ? `${(bucket.totalCount / totalCount) * 100}%`\n : '0%';\n const fillPct =\n bucket.totalCount > 0\n ? (bucket.filteredCount / bucket.totalCount) * 100\n : 0;\n const isSelected = summary.selectedKey === bucket.key;\n const background =\n bucket.kind === 'overflow'\n ? `repeating-linear-gradient(to right, hsl(var(--border)) 0px, hsl(var(--border)) 2px, transparent 2px, transparent 4px)`\n : `linear-gradient(to top, hsl(var(--chart-1)) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) ${fillPct}%, hsl(var(--muted-foreground) / 0.22) 100%)`;\n\n return (\n <button\n key={bucket.key}\n type=\"button\"\n disabled={!bucket.selectable}\n className={cn(\n 'relative flex h-full items-center justify-center overflow-hidden border-r px-0.5 text-[10px] font-normal text-white transition-opacity disabled:cursor-default',\n isSelected && 'ring-ring ring-1 ring-inset',\n !bucket.selectable && 'text-muted-foreground',\n )}\n style={{\n background,\n flexBasis: width,\n flexGrow: bucket.totalCount,\n }}\n onClick={() => summary.toggleValue(bucket.key)}\n onMouseEnter={() => setHoveredKey(bucket.key)}\n onMouseLeave={() => setHoveredKey(undefined)}\n >\n <span className=\"max-w-full truncate px-1\">{bucket.label}</span>\n </button>\n );\n })}\n </div>\n <div className=\"text-muted-foreground truncate text-[10px] font-normal\">\n {footerLabel}\n </div>\n </div>\n );\n}\n\ntype ScaleLike = {\n apply: (value: number | Date) => number;\n domain: [number | Date, number | Date];\n invert: (value: number) => number | Date;\n range: [number, number];\n type: 'linear' | 'utc';\n};\n\nconst histogramInteractorIds = new WeakMap<object, number>();\nlet nextHistogramInteractorId = 0;\n\nfunction getHistogramInteractorId(interactor: object) {\n const cachedId = histogramInteractorIds.get(interactor);\n if (cachedId !== undefined) {\n return cachedId;\n }\n\n const id = ++nextHistogramInteractorId;\n histogramInteractorIds.set(interactor, id);\n return id;\n}\n\nfunction createScale(\n type: ScaleLike['type'],\n domain: [number | Date, number | Date],\n range: [number, number],\n): ScaleLike {\n const [d0, d1] = domain.map((value) =>\n value instanceof Date ? value.getTime() : value,\n ) as [number, number];\n const [r0, r1] = range;\n const span = d1 - d0 || 1;\n const rspan = r1 - r0;\n\n return {\n apply(value: number | Date) {\n const numeric = value instanceof Date ? value.getTime() : value;\n return r0 + ((numeric - d0) / span) * rspan;\n },\n domain,\n invert(value: number) {\n const numeric = d0 + ((value - r0) / (rspan || 1)) * span;\n return type === 'utc' ? new Date(numeric) : numeric;\n },\n range,\n type,\n };\n}\n\nfunction formatDomainValue(value: number | Date, valueType: 'date' | 'number') {\n if (valueType === 'date') {\n const date = value instanceof Date ? value : new Date(value);\n return date.toISOString().slice(0, 10);\n }\n return Intl.NumberFormat(undefined, {\n maximumFractionDigits: 2,\n }).format(typeof value === 'number' ? value : value.getTime());\n}\n\nfunction HistogramSummaryCell({\n summary,\n}: {\n summary: MosaicProfilerHistogramSummary;\n}) {\n const svgRef = useRef<SVGSVGElement>(null);\n const brushRootRef = useRef<SVGGElement>(null);\n const initializedBrushRef = useRef<string | undefined>(undefined);\n\n const layout = useMemo(() => {\n const width = 122;\n const height = 40;\n const margin = {bottom: 4, left: 4, right: 4, top: 2};\n const nullBarWidth = summary.totalNullCount > 0 ? 5 : 0;\n const nullBarGap = nullBarWidth > 0 ? 3 : 0;\n const totalBins = summary.totalBins.length\n ? summary.totalBins\n : summary.filteredBins;\n const domain: [number | Date, number | Date] | null =\n totalBins.length > 0\n ? [totalBins[0]!.x0, totalBins[totalBins.length - 1]!.x1]\n : null;\n const totalMax = Math.max(\n summary.totalNullCount,\n ...totalBins.map((bin) => bin.length),\n 1,\n );\n const xScale = domain\n ? createScale(summary.valueType === 'date' ? 'utc' : 'linear', domain, [\n margin.left + nullBarWidth + nullBarGap,\n width - margin.right,\n ])\n : null;\n const yScale = createScale(\n 'linear',\n [0, totalMax],\n [height - margin.bottom, margin.top],\n );\n return {\n height,\n margin,\n nullBarGap,\n nullBarWidth,\n width,\n xScale,\n yScale,\n };\n }, [summary]);\n\n useEffect(() => {\n const svg = svgRef.current;\n const brushRoot = brushRootRef.current;\n const interactor = summary.interactor;\n if (!svg || !brushRoot || !interactor || !layout.xScale) return;\n\n const brushKey = [\n getHistogramInteractorId(interactor),\n summary.valueType,\n layout.xScale.domain\n .map((value) => (value instanceof Date ? value.getTime() : value))\n .join(':'),\n layout.xScale.range.join(':'),\n ].join('|');\n if (initializedBrushRef.current === brushKey) return;\n\n (\n svg as SVGSVGElement & {\n scale: (channel: string) => ScaleLike | undefined;\n }\n ).scale = (channel: string) => {\n if (channel === 'x') return layout.xScale!;\n if (channel === 'y') return layout.yScale;\n return undefined;\n };\n\n brushRoot.replaceChildren();\n interactor.init(svg as any, brushRoot);\n initializedBrushRef.current = brushKey;\n }, [layout.xScale, layout.yScale, summary.interactor, summary.valueType]);\n\n const axisY = layout.height - layout.margin.bottom;\n const nullBarCenter = layout.margin.left + layout.nullBarWidth / 2;\n const xAxisStart = layout.xScale?.range[0] ?? layout.margin.left;\n const xAxisEnd =\n layout.xScale?.range[1] ?? layout.width - layout.margin.right;\n\n return (\n <div className=\"space-y-0 pt-1.5\">\n <svg\n ref={svgRef}\n width={layout.width}\n height={layout.height}\n viewBox={`0 0 ${layout.width} ${layout.height}`}\n className=\"max-w-full overflow-visible\"\n >\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.totalNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.totalNullCount)\n }\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n ) : null}\n {summary.totalNullCount > 0 ? (\n <rect\n x={layout.margin.left}\n y={layout.yScale.apply(summary.filteredNullCount)}\n width={layout.nullBarWidth}\n height={\n layout.yScale.apply(0) -\n layout.yScale.apply(summary.filteredNullCount)\n }\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n ) : null}\n {summary.totalBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`bg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--muted-foreground) / 0.22)\"\n />\n );\n })}\n {summary.filteredBins.map((bin, index) => {\n const x0 = layout.xScale?.apply(bin.x0) ?? 0;\n const x1 = layout.xScale?.apply(bin.x1) ?? 0;\n const y = layout.yScale.apply(bin.length);\n return (\n <rect\n key={`fg-${index}`}\n x={x0 + 1}\n y={y}\n width={Math.max(x1 - x0 - 1, 1)}\n height={layout.yScale.apply(0) - y}\n fill=\"hsl(var(--chart-1))\"\n opacity={0.95}\n />\n );\n })}\n <line\n x1={xAxisStart}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisStart}\n x2={xAxisStart}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n <line\n x1={xAxisEnd}\n x2={xAxisEnd}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--border))\"\n />\n {summary.totalNullCount > 0 ? (\n <line\n x1={nullBarCenter}\n x2={nullBarCenter}\n y1={axisY}\n y2={axisY + 2.5}\n stroke=\"hsl(var(--chart-1))\"\n />\n ) : null}\n <g ref={brushRootRef} />\n </svg>\n <div className=\"text-muted-foreground relative h-3.5 text-[10px] font-normal\">\n {summary.totalNullCount > 0 ? (\n <span\n className=\"absolute -translate-x-1/2\"\n style={{left: nullBarCenter}}\n >\n ∅\n </span>\n ) : null}\n <span className=\"absolute\" style={{left: xAxisStart}}>\n {summary.totalBins[0]\n ? formatDomainValue(summary.totalBins[0].x0, summary.valueType)\n : '0'}\n </span>\n <span className=\"absolute -translate-x-full\" style={{left: xAxisEnd}}>\n {summary.totalBins.at(-1)\n ? formatDomainValue(summary.totalBins.at(-1)!.x1, summary.valueType)\n : '0'}\n </span>\n </div>\n </div>\n );\n}\n\nfunction SummaryCell({column}: {column: MosaicProfilerColumnState}) {\n if (column.summary.kind === 'histogram') {\n return <HistogramSummaryCell summary={column.summary} />;\n }\n if (column.summary.kind === 'category') {\n return <CategorySummaryCell summary={column.summary} />;\n }\n return (\n <div className=\"text-muted-foreground pt-1.5 text-[10px] font-normal\">\n {column.summary.label}\n </div>\n );\n}\n\nexport function MosaicProfilerHeader({\n className,\n profiler,\n}: MosaicProfilerHeaderProps) {\n return (\n <>\n <colgroup>\n <col style={{width: PROFILER_ROW_NUMBER_COLUMN_WIDTH_PX}} />\n {profiler.columns.map((column) => (\n <col\n key={column.name}\n style={{width: getProfilerColumnWidthPx(column)}}\n />\n ))}\n </colgroup>\n <TableHeader className={cn('sticky top-0 z-30', className)}>\n <TableRow>\n <TableHead className={STICKY_ROW_NUMBER_CLASS}>#</TableHead>\n {profiler.columns.map((column) => {\n const sortState = profiler.sorting.find(\n (entry) => entry.id === column.name,\n );\n return (\n <TableHead\n key={column.name}\n className={cn(\n getColumnWidthClass(column),\n STICKY_COLUMN_HEADER_CLASS,\n )}\n >\n <div className=\"min-w-0\">\n <button\n type=\"button\"\n className=\"group relative flex w-full items-start gap-1.5 pr-4 text-left\"\n onClick={() =>\n setNextSortState(\n profiler.sorting,\n column.name,\n profiler.setSorting,\n )\n }\n >\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-[13px] leading-tight font-semibold\">\n {column.name}\n </div>\n <Badge\n variant=\"outline\"\n className=\"mt-0.5 max-w-full truncate px-2 py-0 text-[9px] opacity-60\"\n >\n {String(column.field.type)}\n </Badge>\n </div>\n <span className=\"text-muted-foreground pointer-events-none absolute top-1 right-0 flex h-4 w-4 items-center justify-center\">\n {sortState ? (\n sortState.desc ? (\n <ChevronDownIcon className=\"h-4 w-4\" />\n ) : (\n <ChevronUpIcon className=\"h-4 w-4\" />\n )\n ) : (\n <span className=\"flex h-4 w-4 flex-col items-center justify-center opacity-0 transition-opacity group-hover:opacity-60\">\n <ChevronUpIcon className=\"-mb-1 h-3 w-3\" />\n <ChevronDownIcon className=\"-mt-1 h-3 w-3\" />\n </span>\n )}\n </span>\n </button>\n <SummaryCell column={column} />\n </div>\n </TableHead>\n );\n })}\n </TableRow>\n </TableHeader>\n </>\n );\n}\n"]}
|