@visactor/vseed 0.1.37 → 0.1.38
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/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +4147 -965
- package/dist/esm/builder/register/all.js +3 -1
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -0
- package/dist/esm/builder/register/chartType/boxplot.js +9 -0
- package/dist/esm/builder/register/chartType/boxplot.js.map +1 -0
- package/dist/esm/builder/register/chartType/histogram.d.ts +1 -0
- package/dist/esm/builder/register/chartType/histogram.js +9 -0
- package/dist/esm/builder/register/chartType/histogram.js.map +1 -0
- package/dist/esm/builder/register/chartType/index.d.ts +2 -0
- package/dist/esm/builder/register/chartType/index.js +3 -1
- package/dist/esm/dataReshape/constant.d.ts +10 -0
- package/dist/esm/dataReshape/constant.js +11 -1
- package/dist/esm/dataReshape/constant.js.map +1 -1
- package/dist/esm/dataReshape/unfoldDimensions.js +2 -2
- package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +34 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +31 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js +80 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js +78 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +8 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.d.ts +4 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.js +5 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js +84 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +86 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +0 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +5 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js +4 -8
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +37 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +15 -4
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +37 -14
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js +126 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +98 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +69 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js +1 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/type.d.ts +13 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/type.js +0 -0
- package/dist/esm/pipeline/utils/constant.d.ts +2 -0
- package/dist/esm/pipeline/utils/constant.js +3 -1
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/theme/common/regressionLine.d.ts +4 -0
- package/dist/esm/theme/common/regressionLine.js +16 -0
- package/dist/esm/theme/common/regressionLine.js.map +1 -0
- package/dist/esm/theme/common/table.d.ts +17 -8
- package/dist/esm/theme/common/table.js +11 -8
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +18 -0
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +18 -0
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +1441 -17
- package/dist/esm/types/advancedVSeed.js +3 -2
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +9 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +9 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +9 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +9 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +9 -0
- package/dist/esm/types/chartType/boxplot/boxplot.d.ts +144 -0
- package/dist/esm/types/chartType/boxplot/boxplot.js +0 -0
- package/dist/esm/types/chartType/boxplot/index.d.ts +2 -0
- package/dist/esm/types/chartType/boxplot/index.js +1 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +1185 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js +30 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +25 -0
- package/dist/esm/types/chartType/column/zColumn.js +3 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +9 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +9 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +9 -0
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +9 -0
- package/dist/esm/types/chartType/histogram/histogram.d.ts +127 -0
- package/dist/esm/types/chartType/histogram/histogram.js +0 -0
- package/dist/esm/types/chartType/histogram/index.d.ts +2 -0
- package/dist/esm/types/chartType/histogram/index.js +1 -0
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +1377 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js +32 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -0
- package/dist/esm/types/chartType/index.d.ts +3 -0
- package/dist/esm/types/chartType/index.js +2 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +9 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +9 -0
- package/dist/esm/types/chartType/radar/zRadar.d.ts +9 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +9 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +9 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +9 -0
- package/dist/esm/types/properties/chartType/chartType.d.ts +3 -1
- package/dist/esm/types/properties/chartType/chartType.js +3 -1
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +4 -0
- package/dist/esm/types/properties/config/bar.d.ts +6 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +326 -0
- package/dist/esm/types/properties/config/boxplot.js +27 -0
- package/dist/esm/types/properties/config/boxplot.js.map +1 -0
- package/dist/esm/types/properties/config/column.d.ts +6 -0
- package/dist/esm/types/properties/config/config.d.ts +697 -0
- package/dist/esm/types/properties/config/config.js +5 -1
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/dualAxis.d.ts +2 -0
- package/dist/esm/types/properties/config/funnel.d.ts +2 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +2 -0
- package/dist/esm/types/properties/config/histogram.d.ts +339 -0
- package/dist/esm/types/properties/config/histogram.js +32 -0
- package/dist/esm/types/properties/config/histogram.js.map +1 -0
- package/dist/esm/types/properties/config/index.d.ts +1 -0
- package/dist/esm/types/properties/config/index.js +1 -0
- package/dist/esm/types/properties/config/line.d.ts +2 -0
- package/dist/esm/types/properties/config/pie.d.ts +6 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
- package/dist/esm/types/properties/config/rose.d.ts +4 -0
- package/dist/esm/types/properties/config/scatter.d.ts +2 -0
- package/dist/esm/types/properties/config/whiskers/index.d.ts +3 -0
- package/dist/esm/types/properties/config/whiskers/index.js +5 -0
- package/dist/esm/types/properties/config/whiskers/index.js.map +1 -0
- package/dist/esm/types/properties/encoding/encoding.d.ts +36 -0
- package/dist/esm/types/properties/encoding/measureEncoding.d.ts +1 -1
- package/dist/esm/types/properties/encoding/zEncoding.d.ts +9 -0
- package/dist/esm/types/properties/encoding/zEncoding.js +10 -1
- package/dist/esm/types/properties/encoding/zEncoding.js.map +1 -1
- package/dist/esm/types/properties/index.d.ts +1 -0
- package/dist/esm/types/properties/index.js +1 -0
- package/dist/esm/types/properties/regressionLine/histogramRegressionLine.d.ts +45 -0
- package/dist/esm/types/properties/regressionLine/histogramRegressionLine.js +0 -0
- package/dist/esm/types/properties/regressionLine/index.d.ts +2 -0
- package/dist/esm/types/properties/regressionLine/index.js +1 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.d.ts +11 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js +17 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +1935 -541
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +2717 -0
- package/dist/esm/types/zVseed.js +4 -2
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +1741 -148
- package/dist/umd/index.js.map +1 -1
- package/package.json +6 -4
|
@@ -2,4 +2,6 @@ import { tooltip } from "./tooltip.js";
|
|
|
2
2
|
import { tooltipPrimary, tooltipSecondary } from "./tooltipDualAxis.js";
|
|
3
3
|
import { tooltipScatter } from "./tooltipScatter.js";
|
|
4
4
|
import { tooltipHeatmap } from "./tooltipHeatmap.js";
|
|
5
|
-
|
|
5
|
+
import { tooltipBoxplot } from "./tooltipBoxplot.js";
|
|
6
|
+
import { tooltipHistogram } from "./tooltipHistogram.js";
|
|
7
|
+
export { tooltip, tooltipBoxplot, tooltipHeatmap, tooltipHistogram, tooltipPrimary, tooltipScatter, tooltipSecondary };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { isNullish, pipe, uniqueBy } from "remeda";
|
|
2
|
+
import { createFormatterByMeasure, findAllMeasures } from "../../../../utils/index.js";
|
|
3
|
+
import { ColorEncoding, MaxMeasureId, MedianMeasureId, MinMeasureId, OutliersMeasureId, Q1MeasureValue, Q3MeasureValue, XEncoding } from "../../../../../dataReshape/index.js";
|
|
4
|
+
const boxPlotMeasureKeys = [
|
|
5
|
+
MaxMeasureId,
|
|
6
|
+
Q3MeasureValue,
|
|
7
|
+
MedianMeasureId,
|
|
8
|
+
Q1MeasureValue,
|
|
9
|
+
MinMeasureId
|
|
10
|
+
];
|
|
11
|
+
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
12
|
+
const tooltipBoxplot = (spec, context)=>{
|
|
13
|
+
const result = {
|
|
14
|
+
...spec
|
|
15
|
+
};
|
|
16
|
+
const { advancedVSeed, vseed } = context;
|
|
17
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
18
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
19
|
+
const { tooltip = {
|
|
20
|
+
enable: true
|
|
21
|
+
} } = baseConfig;
|
|
22
|
+
const { enable } = tooltip;
|
|
23
|
+
const meas = findAllMeasures(vseed.measures);
|
|
24
|
+
const valueMeasure = meas.find((item)=>'value' === item.encoding || isNullish(item.encoding));
|
|
25
|
+
const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
|
|
26
|
+
result.tooltip = {
|
|
27
|
+
visible: enable,
|
|
28
|
+
mark: {
|
|
29
|
+
title: {
|
|
30
|
+
visible: false
|
|
31
|
+
},
|
|
32
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding),
|
|
33
|
+
updateContent: (prev, data)=>{
|
|
34
|
+
const datum = data?.[0]?.datum?.[0];
|
|
35
|
+
if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {
|
|
36
|
+
const tooltipItems = (prev ?? []).filter((item)=>!boxPlotMeasureKeys.includes(item.key));
|
|
37
|
+
const outerlierMeasure = meas.find((item)=>item.id === OutliersMeasureId);
|
|
38
|
+
const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter;
|
|
39
|
+
tooltipItems.push({
|
|
40
|
+
...tooltipItems[0],
|
|
41
|
+
key: outerlierMeasure?.alias ?? OutliersMeasureId,
|
|
42
|
+
value: formatter(datum?.[VCHART_OUTLIER_KEY])
|
|
43
|
+
});
|
|
44
|
+
return tooltipItems;
|
|
45
|
+
}
|
|
46
|
+
return (prev ?? []).map((entry)=>{
|
|
47
|
+
if (boxPlotMeasureKeys.includes(entry.key)) {
|
|
48
|
+
const mea = meas.find((item)=>item.id === entry.key);
|
|
49
|
+
const formatter = mea ? createFormatterByMeasure(mea) : defaultFormatter;
|
|
50
|
+
return {
|
|
51
|
+
...entry,
|
|
52
|
+
value: formatter(datum?.[entry.key]),
|
|
53
|
+
key: mea?.alias ?? entry.key
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
return entry;
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
dimension: {
|
|
61
|
+
visible: false
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return result;
|
|
65
|
+
};
|
|
66
|
+
const createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
67
|
+
const dims = pipe(dimensions.filter((item)=>tooltip.includes(item.id)), uniqueBy((item)=>item.id), uniqueBy((item)=>item.alias));
|
|
68
|
+
const dimContent = dims.map((item)=>({
|
|
69
|
+
visible: true,
|
|
70
|
+
hasShape: true,
|
|
71
|
+
shapeType: 'rectRound',
|
|
72
|
+
key: item.alias ?? item.id,
|
|
73
|
+
value: (datum)=>{
|
|
74
|
+
if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {
|
|
75
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
76
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
77
|
+
}
|
|
78
|
+
return datum?.[item.id];
|
|
79
|
+
}
|
|
80
|
+
}));
|
|
81
|
+
const defaultContent = boxPlotMeasureKeys.map((key)=>({
|
|
82
|
+
visible: true,
|
|
83
|
+
hasShape: true,
|
|
84
|
+
shapeType: 'rectRound',
|
|
85
|
+
key,
|
|
86
|
+
value: (datum)=>{
|
|
87
|
+
if (!datum) return '';
|
|
88
|
+
return datum[key];
|
|
89
|
+
}
|
|
90
|
+
}));
|
|
91
|
+
return [
|
|
92
|
+
...dimContent,
|
|
93
|
+
defaultContent
|
|
94
|
+
];
|
|
95
|
+
};
|
|
96
|
+
export { tooltipBoxplot };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=tooltipBoxplot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport { createFormatterByMeasure, findAllMeasures } from '../../../../utils'\nimport type { Dimension, Dimensions, Encoding, Spec, SpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern, ITooltipLineActual, TooltipData } from '@visactor/vchart'\nimport {\n ColorEncoding,\n MaxMeasureId,\n MedianMeasureId,\n MinMeasureId,\n OutliersMeasureId,\n Q1MeasureValue,\n Q3MeasureValue,\n XEncoding,\n} from 'src/dataReshape'\n\nconst boxPlotMeasureKeys = [MaxMeasureId, Q3MeasureValue, MedianMeasureId, Q1MeasureValue, MinMeasureId]\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipBoxplot: SpecPipe = (spec, context): Partial<Spec> => {\n const result = { ...spec }\n const { advancedVSeed, vseed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n const meas = findAllMeasures(vseed.measures)\n const valueMeasure = meas.find((item) => item.encoding === 'value' || isNullish(item.encoding))\n const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v: unknown) => v\n\n result.tooltip = {\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding),\n updateContent: (prev: ITooltipLineActual[] | undefined, data: TooltipData | undefined) => {\n const datum = (data as any)?.[0]?.datum?.[0]\n\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n const tooltipItems: ITooltipLineActual[] = (prev ?? []).filter(\n (item: any) => !boxPlotMeasureKeys.includes(item.key as string),\n )\n const outerlierMeasure = meas.find((item) => item.id === OutliersMeasureId)\n const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter\n\n tooltipItems.push({\n ...(tooltipItems[0] as any),\n key: outerlierMeasure?.alias ?? OutliersMeasureId,\n value: formatter(datum?.[VCHART_OUTLIER_KEY] as number) as string,\n } as ITooltipLineActual)\n\n return tooltipItems\n }\n\n return (prev ?? []).map((entry) => {\n if (boxPlotMeasureKeys.includes((entry as any).key as string)) {\n const mea = meas.find((item) => item.id === (entry as any).key)\n const formatter = mea ? createFormatterByMeasure(mea) : defaultFormatter\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return {\n ...(entry as any),\n value: formatter(datum?.[(entry as any).key] as number) as string,\n key: mea?.alias ?? (entry as any).key,\n }\n }\n\n return entry\n }) as ITooltipLineActual[]\n },\n },\n dimension: {\n visible: false,\n },\n }\n return result as unknown as ISpec\n}\n\nconst createMarkContent = (tooltip: string[], dimensions: Dimensions, encoding: Encoding) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item: Dimension) => item.id),\n uniqueBy((item: Dimension) => item.alias),\n )\n\n const dimContent = dims.map((item: Dimension) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias ?? item.id,\n value: (datum: Datum | undefined) => {\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n if (encoding.color?.includes(item.id)) {\n return datum?.[ColorEncoding] as string\n }\n if (encoding.x?.includes(item.id)) {\n return datum?.[XEncoding] as string\n }\n }\n\n return datum?.[item.id] as string\n },\n }))\n\n const defaultContent = boxPlotMeasureKeys.map((key: string) => {\n return {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key,\n value: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return datum[key] as string | number\n },\n }\n })\n\n return [...dimContent, defaultContent] as ITooltipLinePattern[]\n}\n"],"names":["boxPlotMeasureKeys","MaxMeasureId","Q3MeasureValue","MedianMeasureId","Q1MeasureValue","MinMeasureId","VCHART_OUTLIER_KEY","tooltipBoxplot","spec","context","result","advancedVSeed","vseed","chartType","dimensions","encoding","baseConfig","tooltip","enable","meas","findAllMeasures","valueMeasure","item","isNullish","defaultFormatter","createFormatterByMeasure","v","createMarkContent","prev","data","datum","tooltipItems","outerlierMeasure","OutliersMeasureId","formatter","entry","mea","dims","pipe","uniqueBy","dimContent","ColorEncoding","XEncoding","defaultContent","key"],"mappings":";;;AAeA,MAAMA,qBAAqB;IAACC;IAAcC;IAAgBC;IAAiBC;IAAgBC;CAAa;AACxG,MAAMC,qBAAqB;AAEpB,MAAMC,iBAA2B,CAACC,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAEC,KAAK,EAAE,GAAGH;IACjC,MAAM,EAAEI,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGJ;IAC5C,MAAMK,aAAaL,cAAc,MAAM,CAACE,UAAU;IAClD,MAAM,EAAEI,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGD;IACvC,MAAM,EAAEE,MAAM,EAAE,GAAGD;IACnB,MAAME,OAAOC,gBAAgBR,MAAM,QAAQ;IAC3C,MAAMS,eAAeF,KAAK,IAAI,CAAC,CAACG,OAASA,AAAkB,YAAlBA,KAAK,QAAQ,IAAgBC,UAAUD,KAAK,QAAQ;IAC7F,MAAME,mBAAmBH,eAAeI,yBAAyBJ,gBAAgB,CAACK,IAAeA;IAEjGhB,OAAO,OAAO,GAAG;QACf,SAASQ;QACT,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASS,kBAAkBZ,SAAS,OAAO,IAAI,EAAE,EAAED,YAAYC;YAC/D,eAAe,CAACa,MAAwCC;gBACtD,MAAMC,QAASD,MAAc,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;gBAE5C,IAAI,CAACN,UAAUO,OAAO,CAACxB,mBAAmB,GAAG;oBAC3C,MAAMyB,eAAsCH,AAAAA,CAAAA,QAAQ,EAAC,EAAG,MAAM,CAC5D,CAACN,OAAc,CAACtB,mBAAmB,QAAQ,CAACsB,KAAK,GAAG;oBAEtD,MAAMU,mBAAmBb,KAAK,IAAI,CAAC,CAACG,OAASA,KAAK,EAAE,KAAKW;oBACzD,MAAMC,YAAYF,mBAAmBP,yBAAyBO,oBAAoBR;oBAElFO,aAAa,IAAI,CAAC;wBAChB,GAAIA,YAAY,CAAC,EAAE;wBACnB,KAAKC,kBAAkB,SAASC;wBAChC,OAAOC,UAAUJ,OAAO,CAACxB,mBAAmB;oBAC9C;oBAEA,OAAOyB;gBACT;gBAEA,OAAQH,AAAAA,CAAAA,QAAQ,EAAC,EAAG,GAAG,CAAC,CAACO;oBACvB,IAAInC,mBAAmB,QAAQ,CAAEmC,MAAc,GAAG,GAAa;wBAC7D,MAAMC,MAAMjB,KAAK,IAAI,CAAC,CAACG,OAASA,KAAK,EAAE,KAAMa,MAAc,GAAG;wBAC9D,MAAMD,YAAYE,MAAMX,yBAAyBW,OAAOZ;wBAGxD,OAAO;4BACL,GAAIW,KAAK;4BACT,OAAOD,UAAUJ,OAAO,CAAEK,MAAc,GAAG,CAAC;4BAC5C,KAAKC,KAAK,SAAUD,MAAc,GAAG;wBACvC;oBACF;oBAEA,OAAOA;gBACT;YACF;QACF;QACA,WAAW;YACT,SAAS;QACX;IACF;IACA,OAAOzB;AACT;AAEA,MAAMiB,oBAAoB,CAACV,SAAmBH,YAAwBC;IACpE,MAAMsB,OAAOC,KACXxB,WAAW,MAAM,CAAC,CAACQ,OAASL,QAAQ,QAAQ,CAACK,KAAK,EAAE,IACpDiB,SAAS,CAACjB,OAAoBA,KAAK,EAAE,GACrCiB,SAAS,CAACjB,OAAoBA,KAAK,KAAK;IAG1C,MAAMkB,aAAaH,KAAK,GAAG,CAAC,CAACf,OAAqB;YAChD,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAKA,KAAK,KAAK,IAAIA,KAAK,EAAE;YAC1B,OAAO,CAACQ;gBACN,IAAI,CAACP,UAAUO,OAAO,CAACxB,mBAAmB,GAAG;oBAC3C,IAAIS,SAAS,KAAK,EAAE,SAASO,KAAK,EAAE,GAClC,OAAOQ,OAAO,CAACW,cAAc;oBAE/B,IAAI1B,SAAS,CAAC,EAAE,SAASO,KAAK,EAAE,GAC9B,OAAOQ,OAAO,CAACY,UAAU;gBAE7B;gBAEA,OAAOZ,OAAO,CAACR,KAAK,EAAE,CAAC;YACzB;QACF;IAEA,MAAMqB,iBAAiB3C,mBAAmB,GAAG,CAAC,CAAC4C,MACtC;YACL,SAAS;YACT,UAAU;YACV,WAAW;YACXA;YACA,OAAO,CAACd;gBACN,IAAI,CAACA,OACH,OAAO;gBAET,OAAOA,KAAK,CAACc,IAAI;YACnB;QACF;IAGF,OAAO;WAAIJ;QAAYG;KAAe;AACxC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { isNullish, pipe, uniqueBy } from "remeda";
|
|
2
|
+
import { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from "../../../../../dataReshape/index.js";
|
|
3
|
+
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
4
|
+
const tooltipHistogram = (spec, context)=>{
|
|
5
|
+
const result = {
|
|
6
|
+
...spec
|
|
7
|
+
};
|
|
8
|
+
const { advancedVSeed } = context;
|
|
9
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
10
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
11
|
+
const { tooltip = {
|
|
12
|
+
enable: true
|
|
13
|
+
} } = baseConfig;
|
|
14
|
+
const { enable } = tooltip;
|
|
15
|
+
result.tooltip = {
|
|
16
|
+
visible: enable,
|
|
17
|
+
mark: {
|
|
18
|
+
title: {
|
|
19
|
+
visible: false
|
|
20
|
+
},
|
|
21
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
22
|
+
},
|
|
23
|
+
dimension: {
|
|
24
|
+
title: {
|
|
25
|
+
visible: false
|
|
26
|
+
},
|
|
27
|
+
content: createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
const createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
33
|
+
const dims = pipe(dimensions.filter((item)=>tooltip.includes(item.id)), uniqueBy((item)=>item.id), uniqueBy((item)=>item.alias));
|
|
34
|
+
const dimContent = dims.map((item)=>({
|
|
35
|
+
visible: true,
|
|
36
|
+
hasShape: true,
|
|
37
|
+
shapeType: 'rectRound',
|
|
38
|
+
key: item.alias ?? item.id,
|
|
39
|
+
value: (datum)=>{
|
|
40
|
+
if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {
|
|
41
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
42
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
43
|
+
}
|
|
44
|
+
return datum?.[item.id];
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
const defaultContent = [
|
|
48
|
+
{
|
|
49
|
+
visible: true,
|
|
50
|
+
hasShape: true,
|
|
51
|
+
shapeType: 'rectRound',
|
|
52
|
+
key: (datum)=>{
|
|
53
|
+
if (!datum) return '';
|
|
54
|
+
return `${datum[BinStartMeasureId]} ~ ${datum[BinEndMeasureId]}`;
|
|
55
|
+
},
|
|
56
|
+
value: (datum)=>{
|
|
57
|
+
if (!datum) return '';
|
|
58
|
+
return datum[FoldMeasureValue];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
return [
|
|
63
|
+
...dimContent,
|
|
64
|
+
defaultContent
|
|
65
|
+
];
|
|
66
|
+
};
|
|
67
|
+
export { tooltipHistogram };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=tooltipHistogram.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.ts"],"sourcesContent":["import { pipe, uniqueBy, isNullish } from 'remeda'\nimport type { Dimension, Dimensions, Encoding, Spec, SpecPipe, Tooltip } from 'src/types'\nimport type { Datum, ISpec, ITooltipLinePattern } from '@visactor/vchart'\nimport { BinEndMeasureId, BinStartMeasureId, ColorEncoding, FoldMeasureValue, XEncoding } from 'src/dataReshape'\n\nconst VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE'\n\nexport const tooltipHistogram: SpecPipe = (spec, context): Partial<Spec> => {\n const result = { ...spec }\n const { advancedVSeed } = context\n const { chartType, dimensions, encoding } = advancedVSeed\n const baseConfig = advancedVSeed.config[chartType] as { tooltip: Tooltip }\n const { tooltip = { enable: true } } = baseConfig\n const { enable } = tooltip\n\n result.tooltip = {\n visible: enable,\n mark: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding),\n },\n dimension: {\n title: {\n visible: false,\n },\n content: createMarkContent(encoding.tooltip || [], dimensions, encoding as Encoding),\n },\n }\n return result as unknown as ISpec\n}\n\nconst createMarkContent = (tooltip: string[], dimensions: Dimensions, encoding: Encoding) => {\n const dims = pipe(\n dimensions.filter((item) => tooltip.includes(item.id)),\n uniqueBy((item: Dimension) => item.id),\n uniqueBy((item: Dimension) => item.alias),\n )\n\n const dimContent = dims.map((item: Dimension) => ({\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: item.alias ?? item.id,\n value: (datum: Datum | undefined) => {\n if (!isNullish(datum?.[VCHART_OUTLIER_KEY])) {\n if (encoding.color?.includes(item.id)) {\n return datum?.[ColorEncoding] as string\n }\n if (encoding.x?.includes(item.id)) {\n return datum?.[XEncoding] as string\n }\n }\n\n return datum?.[item.id] as string\n },\n }))\n\n const defaultContent = [\n {\n visible: true,\n hasShape: true,\n shapeType: 'rectRound',\n key: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return `${datum[BinStartMeasureId]} ~ ${datum[BinEndMeasureId]}`\n },\n value: (datum: Datum | undefined) => {\n if (!datum) {\n return ''\n }\n return datum[FoldMeasureValue] as string | number\n },\n },\n ]\n\n return [...dimContent, defaultContent] as ITooltipLinePattern[]\n}\n"],"names":["VCHART_OUTLIER_KEY","tooltipHistogram","spec","context","result","advancedVSeed","chartType","dimensions","encoding","baseConfig","tooltip","enable","createMarkContent","dims","pipe","item","uniqueBy","dimContent","datum","isNullish","ColorEncoding","XEncoding","defaultContent","BinStartMeasureId","BinEndMeasureId","FoldMeasureValue"],"mappings":";;AAKA,MAAMA,qBAAqB;AAEpB,MAAMC,mBAA6B,CAACC,MAAMC;IAC/C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,UAAU,EAAEC,QAAQ,EAAE,GAAGH;IAC5C,MAAMI,aAAaJ,cAAc,MAAM,CAACC,UAAU;IAClD,MAAM,EAAEI,UAAU;QAAE,QAAQ;IAAK,CAAC,EAAE,GAAGD;IACvC,MAAM,EAAEE,MAAM,EAAE,GAAGD;IAEnBN,OAAO,OAAO,GAAG;QACf,SAASO;QACT,MAAM;YACJ,OAAO;gBACL,SAAS;YACX;YACA,SAASC,kBAAkBJ,SAAS,OAAO,IAAI,EAAE,EAAED,YAAYC;QACjE;QACA,WAAW;YACT,OAAO;gBACL,SAAS;YACX;YACA,SAASI,kBAAkBJ,SAAS,OAAO,IAAI,EAAE,EAAED,YAAYC;QACjE;IACF;IACA,OAAOJ;AACT;AAEA,MAAMQ,oBAAoB,CAACF,SAAmBH,YAAwBC;IACpE,MAAMK,OAAOC,KACXP,WAAW,MAAM,CAAC,CAACQ,OAASL,QAAQ,QAAQ,CAACK,KAAK,EAAE,IACpDC,SAAS,CAACD,OAAoBA,KAAK,EAAE,GACrCC,SAAS,CAACD,OAAoBA,KAAK,KAAK;IAG1C,MAAME,aAAaJ,KAAK,GAAG,CAAC,CAACE,OAAqB;YAChD,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAKA,KAAK,KAAK,IAAIA,KAAK,EAAE;YAC1B,OAAO,CAACG;gBACN,IAAI,CAACC,UAAUD,OAAO,CAAClB,mBAAmB,GAAG;oBAC3C,IAAIQ,SAAS,KAAK,EAAE,SAASO,KAAK,EAAE,GAClC,OAAOG,OAAO,CAACE,cAAc;oBAE/B,IAAIZ,SAAS,CAAC,EAAE,SAASO,KAAK,EAAE,GAC9B,OAAOG,OAAO,CAACG,UAAU;gBAE7B;gBAEA,OAAOH,OAAO,CAACH,KAAK,EAAE,CAAC;YACzB;QACF;IAEA,MAAMO,iBAAiB;QACrB;YACE,SAAS;YACT,UAAU;YACV,WAAW;YACX,KAAK,CAACJ;gBACJ,IAAI,CAACA,OACH,OAAO;gBAET,OAAO,GAAGA,KAAK,CAACK,kBAAkB,CAAC,GAAG,EAAEL,KAAK,CAACM,gBAAgB,EAAE;YAClE;YACA,OAAO,CAACN;gBACN,IAAI,CAACA,OACH,OAAO;gBAET,OAAOA,KAAK,CAACO,iBAAiB;YAChC;QACF;KACD;IAED,OAAO;WAAIR;QAAYK;KAAe;AACxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/columns/measuresToColumns.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/columns/measuresToColumns.ts"],"sourcesContent":["import type { ColumnsDefine, ListTableConstructorOptions } from '@visactor/vtable'\nimport
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/columns/measuresToColumns.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/columns/measuresToColumns.ts"],"sourcesContent":["import type { ColumnsDefine, ListTableConstructorOptions } from '@visactor/vtable'\nimport { createFormatterByMeasure, isMeasure } from 'src/pipeline/utils'\nimport type { MeasureGroup, Measure, MeasureTree, SpecPipe, Datum } from 'src/types'\n\nexport const measureTreeToColumns: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const measures = (advancedVSeed as unknown as { measures: MeasureTree }).measures\n const result = { ...spec } as ListTableConstructorOptions\n\n const eachNode = (node: Measure | MeasureGroup) => {\n if (isMeasure(node)) {\n return {\n width: 'auto',\n fieldFormat: fieldFormat(node),\n }\n }\n\n return {}\n }\n const columns = treeTreeToColumns<Measure, MeasureGroup>(measures, eachNode)\n return {\n ...result,\n columns: [...(result.columns || []), ...columns] as ListTableConstructorOptions['columns'],\n }\n}\n\nconst fieldFormat = (node: Measure) => {\n const formatter = createFormatterByMeasure(node)\n\n return (datum: Datum) => {\n const { id } = node\n const value = datum[id] as number | string | undefined\n return formatter(value)\n }\n}\nconst treeTreeToColumns = <\n T extends { id: string; alias?: string },\n U extends { id: string; alias?: string; children?: (T | U)[] },\n>(\n tree: (T | U)[],\n callback?: (node: T | U) => object,\n): ColumnsDefine[] => {\n const result = tree.map((item) => {\n if ('children' in item && Array.isArray(item.children)) {\n const groupNode = item as unknown as U\n const field = groupNode.id\n const title = groupNode.alias ?? groupNode.id\n const props = callback?.(groupNode) || {}\n // group\n return {\n field,\n title,\n columns: treeTreeToColumns(item.children, callback),\n ...props,\n }\n } else {\n const field = item.id\n const title = item.alias ?? item.id\n const props = callback?.(item) || {}\n // leaf\n return {\n field,\n title,\n ...props,\n }\n }\n }) as unknown as ColumnsDefine[]\n\n return result || []\n}\n"],"names":["measureTreeToColumns","spec","context","advancedVSeed","measures","result","eachNode","node","isMeasure","fieldFormat","columns","treeTreeToColumns","formatter","createFormatterByMeasure","datum","id","value","tree","callback","item","Array","groupNode","field","title","props"],"mappings":";AAIO,MAAMA,uBAAiC,CAACC,MAAMC;IACnD,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAME,WAAYD,cAAuD,QAAQ;IACjF,MAAME,SAAS;QAAE,GAAGJ,IAAI;IAAC;IAEzB,MAAMK,WAAW,CAACC;QAChB,IAAIC,UAAUD,OACZ,OAAO;YACL,OAAO;YACP,aAAaE,YAAYF;QAC3B;QAGF,OAAO,CAAC;IACV;IACA,MAAMG,UAAUC,kBAAyCP,UAAUE;IACnE,OAAO;QACL,GAAGD,MAAM;QACT,SAAS;eAAKA,OAAO,OAAO,IAAI,EAAE;eAAMK;SAAQ;IAClD;AACF;AAEA,MAAMD,cAAc,CAACF;IACnB,MAAMK,YAAYC,yBAAyBN;IAE3C,OAAO,CAACO;QACN,MAAM,EAAEC,EAAE,EAAE,GAAGR;QACf,MAAMS,QAAQF,KAAK,CAACC,GAAG;QACvB,OAAOH,UAAUI;IACnB;AACF;AACA,MAAML,oBAAoB,CAIxBM,MACAC;IAEA,MAAMb,SAASY,KAAK,GAAG,CAAC,CAACE;QACvB,IAAI,cAAcA,QAAQC,MAAM,OAAO,CAACD,KAAK,QAAQ,GAAG;YACtD,MAAME,YAAYF;YAClB,MAAMG,QAAQD,UAAU,EAAE;YAC1B,MAAME,QAAQF,UAAU,KAAK,IAAIA,UAAU,EAAE;YAC7C,MAAMG,QAAQN,WAAWG,cAAc,CAAC;YAExC,OAAO;gBACLC;gBACAC;gBACA,SAASZ,kBAAkBQ,KAAK,QAAQ,EAAED;gBAC1C,GAAGM,KAAK;YACV;QACF;QAAO;YACL,MAAMF,QAAQH,KAAK,EAAE;YACrB,MAAMI,QAAQJ,KAAK,KAAK,IAAIA,KAAK,EAAE;YACnC,MAAMK,QAAQN,WAAWC,SAAS,CAAC;YAEnC,OAAO;gBACLG;gBACAC;gBACA,GAAGC,KAAK;YACV;QACF;IACF;IAEA,OAAOnB,UAAU,EAAE;AACrB"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { AggregationType } from "@visactor/vtable/es/ts-types";
|
|
2
1
|
import { findAllMeasures } from "../../../../utils/index.js";
|
|
3
2
|
const dataConfig = (spec, context)=>{
|
|
4
3
|
const { advancedVSeed } = context;
|
|
5
4
|
const measures = findAllMeasures(advancedVSeed.measures);
|
|
6
5
|
const aggregationRules = measures.map((measure)=>({
|
|
7
6
|
field: measure.id,
|
|
8
|
-
aggregationType:
|
|
7
|
+
aggregationType: 'NONE',
|
|
9
8
|
indicatorKey: measure.id
|
|
10
9
|
}));
|
|
11
10
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/indicators/pivotDataConfig.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/indicators/pivotDataConfig.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/indicators/pivotDataConfig.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/indicators/pivotDataConfig.ts"],"sourcesContent":["import { findAllMeasures } from 'src/pipeline/utils'\nimport type { SpecPipe } from 'src/types'\n\nexport const dataConfig: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const measures = findAllMeasures(advancedVSeed.measures)\n\n const aggregationRules = measures.map((measure) => ({\n field: measure.id,\n aggregationType: 'NONE',\n indicatorKey: measure.id,\n }))\n\n return {\n ...spec,\n dataConfig: {\n aggregationRules,\n },\n }\n}\n"],"names":["dataConfig","spec","context","advancedVSeed","measures","findAllMeasures","aggregationRules","measure"],"mappings":";AAGO,MAAMA,aAAuB,CAACC,MAAMC;IACzC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAME,WAAWC,gBAAgBF,cAAc,QAAQ;IAEvD,MAAMG,mBAAmBF,SAAS,GAAG,CAAC,CAACG,UAAa;YAClD,OAAOA,QAAQ,EAAE;YACjB,iBAAiB;YACjB,cAAcA,QAAQ,EAAE;QAC1B;IAEA,OAAO;QACL,GAAGN,IAAI;QACP,YAAY;YACVK;QACF;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/indicators/pivotIndicators.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/indicators/pivotIndicators.ts"],"sourcesContent":["import type { PivotChartConstructorOptions
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/indicators/pivotIndicators.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/indicators/pivotIndicators.ts"],"sourcesContent":["import type { PivotChartConstructorOptions, BaseTableAPI } from '@visactor/vtable'\nimport { isNumber } from 'remeda'\nimport { intl } from 'src/i18n'\nimport { createFormatterByMeasure, findMeasureById } from 'src/pipeline/utils'\nimport type { Datum, FoldInfo, MeasureTree, SpecPipe } from 'src/types'\n\nexport const pivotIndicators: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { measures, datasetReshapeInfo } = advancedVSeed\n const { foldInfo } = datasetReshapeInfo[0]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const hasRow = ((spec as any)?.rows as any[])?.length > 0\n const foldMapValues = Object.values(foldInfo.foldMap)\n\n return {\n ...spec,\n indicatorTitle: intl.i18n`指标名称`,\n indicatorsAsCol: hasRow,\n hideIndicatorName: hasRow,\n indicators: [\n {\n cellType: 'text',\n indicatorKey: foldInfo.measureValue,\n title: foldMapValues.length > 1 ? '' : foldMapValues[0],\n width: 'auto',\n format: fieldFormat(measures, foldInfo as FoldInfo),\n },\n ] as unknown as PivotChartConstructorOptions['indicators'],\n }\n}\n\nconst fieldFormat = (measures: MeasureTree, foldInfo: FoldInfo) => {\n return (value: number | string, col?: number, row?: number, table?: BaseTableAPI) => {\n if (!isNumber(col) || !isNumber(row) || !table) {\n return value\n }\n\n const datum = table.getCellOriginRecord(col, row) as Datum[]\n if (!datum[0]) {\n return value\n }\n const { measureId: foldMeasureId } = foldInfo\n const measureId = datum[0][foldMeasureId] as string\n const measure = findMeasureById(measures, measureId)\n const formatter = createFormatterByMeasure(measure)\n return formatter(value)\n }\n}\n"],"names":["pivotIndicators","spec","context","advancedVSeed","measures","datasetReshapeInfo","foldInfo","hasRow","foldMapValues","Object","intl","fieldFormat","value","col","row","table","isNumber","datum","foldMeasureId","measureId","measure","findMeasureById","formatter","createFormatterByMeasure"],"mappings":";;;AAMO,MAAMA,kBAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,QAAQ,EAAEC,kBAAkB,EAAE,GAAGF;IACzC,MAAM,EAAEG,QAAQ,EAAE,GAAGD,kBAAkB,CAAC,EAAE;IAE1C,MAAME,SAAWN,MAAc,MAAgB,SAAS;IACxD,MAAMO,gBAAgBC,OAAO,MAAM,CAACH,SAAS,OAAO;IAEpD,OAAO;QACL,GAAGL,IAAI;QACP,gBAAgBS,KAAK,IAAI,CAAC,IAAI,CAAC;QAC/B,iBAAiBH;QACjB,mBAAmBA;QACnB,YAAY;YACV;gBACE,UAAU;gBACV,cAAcD,SAAS,YAAY;gBACnC,OAAOE,cAAc,MAAM,GAAG,IAAI,KAAKA,aAAa,CAAC,EAAE;gBACvD,OAAO;gBACP,QAAQG,YAAYP,UAAUE;YAChC;SACD;IACH;AACF;AAEA,MAAMK,cAAc,CAACP,UAAuBE,WACnC,CAACM,OAAwBC,KAAcC,KAAcC;QAC1D,IAAI,CAACC,SAASH,QAAQ,CAACG,SAASF,QAAQ,CAACC,OACvC,OAAOH;QAGT,MAAMK,QAAQF,MAAM,mBAAmB,CAACF,KAAKC;QAC7C,IAAI,CAACG,KAAK,CAAC,EAAE,EACX,OAAOL;QAET,MAAM,EAAE,WAAWM,aAAa,EAAE,GAAGZ;QACrC,MAAMa,YAAYF,KAAK,CAAC,EAAE,CAACC,cAAc;QACzC,MAAME,UAAUC,gBAAgBjB,UAAUe;QAC1C,MAAMG,YAAYC,yBAAyBH;QAC3C,OAAOE,UAAUV;IACnB"}
|
|
@@ -12,6 +12,7 @@ const bodyStyle = (spec, context)=>{
|
|
|
12
12
|
const fontSize = themeConfig.bodyFontSize || 12;
|
|
13
13
|
const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff';
|
|
14
14
|
const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff';
|
|
15
|
+
if (!result.theme) result.theme = {};
|
|
15
16
|
result.theme.bodyStyle = {
|
|
16
17
|
borderColor: borderColor,
|
|
17
18
|
borderLineWidth: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/bodyStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/bodyStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/bodyStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/bodyStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const bodyStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { chartType, config } = advancedVSeed\n const themeConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themeConfig) return result\n\n // basic\n const borderColor = themeConfig.borderColor || 'rgb(224, 224, 224)'\n const backgroundColor = themeConfig.bodyBackgroundColor || '#fff'\n const fontColor = themeConfig.bodyFontColor || '#1B1F23'\n const fontSize = themeConfig.bodyFontSize || 12\n // Interaction\n const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff'\n const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff'\n\n if (!result.theme) result.theme = {}\n ;(result.theme as ThemeLike).bodyStyle = {\n borderColor: borderColor,\n borderLineWidth: 1,\n padding: [8, 12, 8, 12],\n textAlign: 'right',\n hover: {\n cellBgColor: hoverCellBgColor,\n inlineRowBgColor: hoverInlineColor,\n inlineColumnBgColor: hoverInlineColor,\n },\n color: fontColor,\n fontSize: fontSize,\n fontStyle: 'normal',\n fontWeight: 'normal',\n fontVariant: 'normal',\n bgColor: backgroundColor,\n lineHeight: fontSize * 1.5,\n }\n\n return result\n}\n"],"names":["bodyStyle","spec","context","result","advancedVSeed","chartType","config","themeConfig","borderColor","backgroundColor","fontColor","fontSize","hoverCellBgColor","hoverInlineColor"],"mappings":"AAGO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,SAAS,EAAEC,MAAM,EAAE,GAAGF;IAC9B,MAAMG,cAAcD,QAAQ,CAACD,UAAU;IAEvC,IAAI,CAACF,OAAO,KAAK,IAAI,CAACI,aAAa,OAAOJ;IAG1C,MAAMK,cAAcD,YAAY,WAAW,IAAI;IAC/C,MAAME,kBAAkBF,YAAY,mBAAmB,IAAI;IAC3D,MAAMG,YAAYH,YAAY,aAAa,IAAI;IAC/C,MAAMI,WAAWJ,YAAY,YAAY,IAAI;IAE7C,MAAMK,mBAAmBL,YAAY,wBAAwB,IAAI;IACjE,MAAMM,mBAAmBN,YAAY,8BAA8B,IAAI;IAEvE,IAAI,CAACJ,OAAO,KAAK,EAAEA,OAAO,KAAK,GAAG,CAAC;IACjCA,OAAO,KAAK,CAAe,SAAS,GAAG;QACvC,aAAaK;QACb,iBAAiB;QACjB,SAAS;YAAC;YAAG;YAAI;YAAG;SAAG;QACvB,WAAW;QACX,OAAO;YACL,aAAaI;YACb,kBAAkBC;YAClB,qBAAqBA;QACvB;QACA,OAAOH;QACP,UAAUC;QACV,WAAW;QACX,YAAY;QACZ,aAAa;QACb,SAASF;QACT,YAAYE,AAAW,MAAXA;IACd;IAEA,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/cornerHeaderStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/cornerHeaderStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/cornerHeaderStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/cornerHeaderStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const cornerHeaderStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themConfig) return result\n\n // basic\n const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)'\n const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5'\n const fontColor = themConfig.headerFontColor || '#1B1F23'\n const fontSize = themConfig.headerFontSize || 12\n // Interaction\n const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor\n const hoverCellColor = themConfig.hoverHeaderBackgroundColor\n\n ;(result.theme as ThemeLike).cornerHeaderStyle = {\n borderColor: [borderColor, borderColor],\n borderLineWidth: 1,\n padding: [8, 12, 8, 12],\n textAlign: 'left',\n hover: {\n cellBgColor: hoverCellColor || undefined,\n inlineRowBgColor: hoverInlineColor || undefined,\n inlineColumnBgColor: hoverInlineColor || undefined,\n },\n frameStyle: {\n borderColor: borderColor,\n borderLineWidth: [0, 1, 1, 0],\n },\n fontSize: fontSize,\n fontVariant: 'normal',\n fontStyle: 'normal',\n fontWeight: 'bold',\n color: fontColor,\n bgColor: backgroundColor,\n lineHeight: fontSize * 1.5,\n }\n\n return result\n}\n"],"names":["cornerHeaderStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","borderColor","backgroundColor","fontColor","fontSize","hoverInlineColor","hoverCellColor","undefined"],"mappings":"AAGO,MAAMA,oBAA8B,CAACC,MAAMC;IAChD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAaF,QAAQ,CAACC,UAAU;IAEtC,IAAI,CAACH,OAAO,KAAK,IAAI,CAACI,YAAY,OAAOJ;IAGzC,MAAMK,cAAcD,WAAW,WAAW,IAAI;IAC9C,MAAME,kBAAkBF,WAAW,qBAAqB,IAAI;IAC5D,MAAMG,YAAYH,WAAW,eAAe,IAAI;IAChD,MAAMI,WAAWJ,WAAW,cAAc,IAAI;IAE9C,MAAMK,mBAAmBL,WAAW,gCAAgC;IACpE,MAAMM,iBAAiBN,WAAW,0BAA0B;IAE1DJ,OAAO,KAAK,CAAe,iBAAiB,GAAG;QAC/C,aAAa;YAACK;YAAaA;SAAY;QACvC,iBAAiB;QACjB,SAAS;YAAC;YAAG;YAAI;YAAG;SAAG;QACvB,WAAW;QACX,OAAO;YACL,aAAaK,kBAAkBC;YAC/B,kBAAkBF,oBAAoBE;YACtC,qBAAqBF,oBAAoBE;QAC3C;QACA,YAAY;YACV,aAAaN;YACb,iBAAiB;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;QAC/B;QACA,UAAUG;QACV,aAAa;QACb,WAAW;QACX,YAAY;QACZ,OAAOD;QACP,SAASD;QACT,YAAYE,AAAW,MAAXA;IACd;IAEA,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/frameStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/frameStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/frameStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/frameStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const frameStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themConfig) return result\n\n const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)'\n\n ;(result.theme as ThemeLike).frameStyle = {\n borderColor,\n borderLineWidth: 1,\n cornerRadius: 4,\n }\n\n return result\n}\n"],"names":["frameStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","borderColor"],"mappings":"AAGO,MAAMA,aAAuB,CAACC,MAAMC;IACzC,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAaF,QAAQ,CAACC,UAAU;IAEtC,IAAI,CAACH,OAAO,KAAK,IAAI,CAACI,YAAY,OAAOJ;IAEzC,MAAMK,cAAcD,WAAW,WAAW,IAAI;IAE5CJ,OAAO,KAAK,CAAe,UAAU,GAAG;QACxCK;QACA,iBAAiB;QACjB,cAAc;IAChB;IAEA,OAAOL;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/headerStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/headerStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/headerStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/headerStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const headerStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themConfig) return result\n\n // basic\n const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)'\n const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5'\n const fontColor = themConfig.headerFontColor || '#1B1F23'\n const fontSize = themConfig.headerFontSize || 12\n // Interaction\n const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff'\n const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor || '#bedaff'\n\n ;(result.theme as ThemeLike).headerStyle = {\n borderColor: borderColor,\n borderLineWidth: 1,\n padding: [8, 12, 8, 12],\n textAlign: 'center',\n hover: {\n cellBgColor: hoverCellBgColor,\n inlineRowBgColor: hoverInlineColor,\n inlineColumnBgColor: hoverInlineColor,\n },\n frameStyle: {\n borderColor: borderColor,\n borderLineWidth: [0, 0, 1, 0],\n },\n fontSize: fontSize,\n fontVariant: 'normal',\n fontStyle: 'normal',\n fontWeight: 'bold',\n color: fontColor,\n bgColor: backgroundColor,\n lineHeight: fontSize * 1.5,\n }\n\n return result\n}\n"],"names":["headerStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","borderColor","backgroundColor","fontColor","fontSize","hoverCellBgColor","hoverInlineColor"],"mappings":"AAGO,MAAMA,cAAwB,CAACC,MAAMC;IAC1C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAaF,QAAQ,CAACC,UAAU;IAEtC,IAAI,CAACH,OAAO,KAAK,IAAI,CAACI,YAAY,OAAOJ;IAGzC,MAAMK,cAAcD,WAAW,WAAW,IAAI;IAC9C,MAAME,kBAAkBF,WAAW,qBAAqB,IAAI;IAC5D,MAAMG,YAAYH,WAAW,eAAe,IAAI;IAChD,MAAMI,WAAWJ,WAAW,cAAc,IAAI;IAE9C,MAAMK,mBAAmBL,WAAW,0BAA0B,IAAI;IAClE,MAAMM,mBAAmBN,WAAW,gCAAgC,IAAI;IAEtEJ,OAAO,KAAK,CAAe,WAAW,GAAG;QACzC,aAAaK;QACb,iBAAiB;QACjB,SAAS;YAAC;YAAG;YAAI;YAAG;SAAG;QACvB,WAAW;QACX,OAAO;YACL,aAAaI;YACb,kBAAkBC;YAClB,qBAAqBA;QACvB;QACA,YAAY;YACV,aAAaL;YACb,iBAAiB;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;QAC/B;QACA,UAAUG;QACV,aAAa;QACb,WAAW;QACX,YAAY;QACZ,OAAOD;QACP,SAASD;QACT,YAAYE,AAAW,MAAXA;IACd;IAEA,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/rowHeaderStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/rowHeaderStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/rowHeaderStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/rowHeaderStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const rowHeaderStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themConfig) return result\n\n // basic\n const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)'\n const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5'\n const fontColor = themConfig.headerFontColor || '#1B1F23'\n const fontSize = themConfig.headerFontSize || 12\n // Interaction\n const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff'\n const hoverInlineColor = themConfig.hoverHeaderInlineBackgroundColor || '#bedaff'\n\n ;(result.theme as ThemeLike).rowHeaderStyle = {\n borderColor: borderColor,\n borderLineWidth: 1,\n padding: [8, 12, 8, 12],\n textAlign: 'left',\n hover: {\n cellBgColor: hoverCellBgColor,\n inlineRowBgColor: hoverInlineColor,\n inlineColumnBgColor: hoverInlineColor,\n },\n frameStyle: {\n borderColor: borderColor,\n borderLineWidth: [0, 1, 0, 0],\n },\n fontSize: fontSize,\n fontVariant: 'normal',\n fontStyle: 'normal',\n fontWeight: 'bold',\n color: fontColor,\n bgColor: backgroundColor,\n lineHeight: fontSize * 1.5,\n }\n\n return result\n}\n"],"names":["rowHeaderStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","borderColor","backgroundColor","fontColor","fontSize","hoverCellBgColor","hoverInlineColor"],"mappings":"AAGO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAaF,QAAQ,CAACC,UAAU;IAEtC,IAAI,CAACH,OAAO,KAAK,IAAI,CAACI,YAAY,OAAOJ;IAGzC,MAAMK,cAAcD,WAAW,WAAW,IAAI;IAC9C,MAAME,kBAAkBF,WAAW,qBAAqB,IAAI;IAC5D,MAAMG,YAAYH,WAAW,eAAe,IAAI;IAChD,MAAMI,WAAWJ,WAAW,cAAc,IAAI;IAE9C,MAAMK,mBAAmBL,WAAW,0BAA0B,IAAI;IAClE,MAAMM,mBAAmBN,WAAW,gCAAgC,IAAI;IAEtEJ,OAAO,KAAK,CAAe,cAAc,GAAG;QAC5C,aAAaK;QACb,iBAAiB;QACjB,SAAS;YAAC;YAAG;YAAI;YAAG;SAAG;QACvB,WAAW;QACX,OAAO;YACL,aAAaI;YACb,kBAAkBC;YAClB,qBAAqBA;QACvB;QACA,YAAY;YACV,aAAaL;YACb,iBAAiB;gBAAC;gBAAG;gBAAG;gBAAG;aAAE;QAC/B;QACA,UAAUG;QACV,aAAa;QACb,WAAW;QACX,YAAY;QACZ,OAAOD;QACP,SAASD;QACT,YAAYE,AAAW,MAAXA;IACd;IAEA,OAAOR;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/scrollStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/scrollStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/scrollStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/scrollStyle.ts"],"sourcesContent":["import type { SpecPipe } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const frameStyle: SpecPipe = (spec) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n if (!result.theme) return result\n ;(result.theme as ThemeLike).scrollStyle = {\n hoverOn: true,\n visible: 'focus',\n width: 7,\n }\n\n return result\n}\n"],"names":["frameStyle","spec","result"],"mappings":"AAGO,MAAMA,aAAuB,CAACC;IACnC,MAAMC,SAAS;QAAE,GAAGD,IAAI;IAAC;IACzB,IAAI,CAACC,OAAO,KAAK,EAAE,OAAOA;IACxBA,OAAO,KAAK,CAAe,WAAW,GAAG;QACzC,SAAS;QACT,SAAS;QACT,OAAO;IACT;IAEA,OAAOA;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/theme/selectionStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/selectionStyle.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/theme/selectionStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/theme/selectionStyle.ts"],"sourcesContent":["import type { SpecPipe, TableConfig } from 'src/types'\nimport type { ThemeLike, WithTheme } from './type'\n\nexport const selectionStyle: SpecPipe = (spec, context) => {\n const result = { ...spec } as Partial<typeof spec> & WithTheme\n const { advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = config?.[chartType] as TableConfig\n\n if (!result.theme || !themConfig) return result\n\n const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)'\n const backgroundColor = themConfig.selectedBackgroundColor || 'rgb(224, 224, 224, 0.5)'\n\n ;(result.theme as ThemeLike).selectionStyle = {\n cellBorderColor: borderColor,\n cellBorderLineWidth: 2,\n cellBgColor: backgroundColor,\n }\n\n return result\n}\n"],"names":["selectionStyle","spec","context","result","advancedVSeed","config","chartType","themConfig","borderColor","backgroundColor"],"mappings":"AAGO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAaF,QAAQ,CAACC,UAAU;IAEtC,IAAI,CAACH,OAAO,KAAK,IAAI,CAACI,YAAY,OAAOJ;IAEzC,MAAMK,cAAcD,WAAW,mBAAmB,IAAI;IACtD,MAAME,kBAAkBF,WAAW,uBAAuB,IAAI;IAE5DJ,OAAO,KAAK,CAAe,cAAc,GAAG;QAC5C,iBAAiBK;QACjB,qBAAqB;QACrB,aAAaC;IACf;IAEA,OAAON;AACT"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ThemeLike = {
|
|
2
|
+
bodyStyle?: unknown;
|
|
3
|
+
headerStyle?: unknown;
|
|
4
|
+
rowHeaderStyle?: unknown;
|
|
5
|
+
cornerHeaderStyle?: unknown;
|
|
6
|
+
frameStyle?: unknown;
|
|
7
|
+
selectionStyle?: unknown;
|
|
8
|
+
scrollStyle?: unknown;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
export type WithTheme = {
|
|
12
|
+
theme?: ThemeLike;
|
|
13
|
+
};
|
|
File without changes
|
|
@@ -25,5 +25,7 @@ export declare const ChartTypeEnum: {
|
|
|
25
25
|
readonly Radar: "radar";
|
|
26
26
|
readonly Funnel: "funnel";
|
|
27
27
|
readonly Heatmap: "heatmap";
|
|
28
|
+
readonly Boxplot: "boxPlot";
|
|
29
|
+
readonly Histogram: "histogram";
|
|
28
30
|
};
|
|
29
31
|
export declare const DATUM_HIDE_KEY = "__VSEED_HideItem__";
|
|
@@ -24,7 +24,9 @@ const ChartTypeEnum = {
|
|
|
24
24
|
Donut: 'donut',
|
|
25
25
|
Radar: 'radar',
|
|
26
26
|
Funnel: 'funnel',
|
|
27
|
-
Heatmap: 'heatmap'
|
|
27
|
+
Heatmap: 'heatmap',
|
|
28
|
+
Boxplot: 'boxPlot',
|
|
29
|
+
Histogram: 'histogram'
|
|
28
30
|
};
|
|
29
31
|
const DATUM_HIDE_KEY = '__VSEED_HideItem__';
|
|
30
32
|
export { ANNOTATION_Z_INDEX, ChartTypeEnum, DATUM_HIDE_KEY, DEFAULT_PARENT_ID, DUAL_AXIS_CHART_COLUMN_Z_INDEX, DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX, DUAL_AXIS_LABEL_Z_INDEX, LINEAR_AXIS_INNER_OFFSET_TOP };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n} as const\n\n// Heatmap hide cell\nexport const DATUM_HIDE_KEY = '__VSEED_HideItem__'\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum","DATUM_HIDE_KEY"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;
|
|
1
|
+
{"version":3,"file":"pipeline/utils/constant.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/constant.ts"],"sourcesContent":["// 标注层 z-index\nexport const ANNOTATION_Z_INDEX = 1000\n// 线性轴 顶部空隙 预留5px\nexport const LINEAR_AXIS_INNER_OFFSET_TOP = 7\n// 双轴图 柱图 ZIndex\nexport const DUAL_AXIS_CHART_COLUMN_Z_INDEX = 1000\n// 双轴图 非柱图 ZIndex\nexport const DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX = 1001\n// 双轴图 标注层 ZIndex\nexport const DUAL_AXIS_LABEL_Z_INDEX = 1002\n// 默认父级id\nexport const DEFAULT_PARENT_ID = '__DefaultParentId__'\n\n// 图表类型枚举\nexport const ChartTypeEnum = {\n Table: 'table',\n PivotTable: 'pivotTable',\n // cartesian\n Line: 'line',\n Column: 'column',\n ColumnPercent: 'columnPercent',\n ColumnParallel: 'columnParallel',\n Bar: 'bar',\n BarPercent: 'barPercent',\n BarParallel: 'barParallel',\n Area: 'area',\n AreaPercent: 'areaPercent',\n DualAxis: 'dualAxis',\n Scatter: 'scatter',\n // polar\n Rose: 'rose',\n RoseParallel: 'roseParallel',\n Pie: 'pie',\n Donut: 'donut',\n Radar: 'radar',\n // other\n Funnel: 'funnel',\n Heatmap: 'heatmap',\n Boxplot: 'boxPlot',\n Histogram: 'histogram',\n} as const\n\n// Heatmap hide cell\nexport const DATUM_HIDE_KEY = '__VSEED_HideItem__'\n"],"names":["ANNOTATION_Z_INDEX","LINEAR_AXIS_INNER_OFFSET_TOP","DUAL_AXIS_CHART_COLUMN_Z_INDEX","DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX","DUAL_AXIS_LABEL_Z_INDEX","DEFAULT_PARENT_ID","ChartTypeEnum","DATUM_HIDE_KEY"],"mappings":"AACO,MAAMA,qBAAqB;AAE3B,MAAMC,+BAA+B;AAErC,MAAMC,iCAAiC;AAEvC,MAAMC,qCAAqC;AAE3C,MAAMC,0BAA0B;AAEhC,MAAMC,oBAAoB;AAG1B,MAAMC,gBAAgB;IAC3B,OAAO;IACP,YAAY;IAEZ,MAAM;IACN,QAAQ;IACR,eAAe;IACf,gBAAgB;IAChB,KAAK;IACL,YAAY;IACZ,aAAa;IACb,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IAET,MAAM;IACN,cAAc;IACd,KAAK;IACL,OAAO;IACP,OAAO;IAEP,QAAQ;IACR,SAAS;IACT,SAAS;IACT,WAAW;AACb;AAGO,MAAMC,iBAAiB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { HistogramRegressionLine } from '../../types/properties/regressionLine';
|
|
2
|
+
export declare const getDefaultHistogramRegressionLine: () => Partial<HistogramRegressionLine>;
|
|
3
|
+
export declare const getLightHistogramRegressionLine: () => Partial<HistogramRegressionLine>;
|
|
4
|
+
export declare const getDarkHistogramRegressionLine: () => Partial<HistogramRegressionLine>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const getDefaultHistogramRegressionLine = ()=>({
|
|
2
|
+
lineWidth: 2,
|
|
3
|
+
textFontSize: 12,
|
|
4
|
+
textFontWeight: 400
|
|
5
|
+
});
|
|
6
|
+
const getLightHistogramRegressionLine = ()=>({
|
|
7
|
+
...getDefaultHistogramRegressionLine(),
|
|
8
|
+
textColor: '#364159'
|
|
9
|
+
});
|
|
10
|
+
const getDarkHistogramRegressionLine = ()=>({
|
|
11
|
+
...getDefaultHistogramRegressionLine(),
|
|
12
|
+
textColor: '#ffffff'
|
|
13
|
+
});
|
|
14
|
+
export { getDarkHistogramRegressionLine, getDefaultHistogramRegressionLine, getLightHistogramRegressionLine };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=regressionLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme/common/regressionLine.js","sources":["webpack://@visactor/vseed/./src/theme/common/regressionLine.ts"],"sourcesContent":["import type { HistogramRegressionLine } from 'src/types/properties/regressionLine'\n\nexport const getDefaultHistogramRegressionLine = (): Partial<HistogramRegressionLine> => {\n return {\n lineWidth: 2,\n textFontSize: 12,\n textFontWeight: 400,\n }\n}\n\nexport const getLightHistogramRegressionLine = (): Partial<HistogramRegressionLine> => {\n return {\n ...getDefaultHistogramRegressionLine(),\n textColor: '#364159',\n }\n}\n\nexport const getDarkHistogramRegressionLine = (): Partial<HistogramRegressionLine> => {\n return {\n ...getDefaultHistogramRegressionLine(),\n textColor: '#ffffff',\n }\n}\n"],"names":["getDefaultHistogramRegressionLine","getLightHistogramRegressionLine","getDarkHistogramRegressionLine"],"mappings":"AAEO,MAAMA,oCAAoC,IACxC;QACL,WAAW;QACX,cAAc;QACd,gBAAgB;IAClB;AAGK,MAAMC,kCAAkC,IACtC;QACL,GAAGD,mCAAmC;QACtC,WAAW;IACb;AAGK,MAAME,iCAAiC,IACrC;QACL,GAAGF,mCAAmC;QACtC,WAAW;IACb"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
borderColor: string;
|
|
1
|
+
export declare const getDefaultTableConfig: () => {
|
|
3
2
|
bodyFontSize: number;
|
|
4
|
-
bodyFontColor: string;
|
|
5
3
|
bodyBackgroundColor: string;
|
|
6
4
|
headerFontSize: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const getLightTableConfig: () => {
|
|
7
|
+
borderColor: string;
|
|
8
|
+
bodyFontColor: string;
|
|
7
9
|
headerFontColor: string;
|
|
8
10
|
headerBackgroundColor: string;
|
|
9
11
|
hoverBodyBackgroundColor: string;
|
|
@@ -13,13 +15,13 @@ export declare const getLightTableConfig: () => {
|
|
|
13
15
|
selectedBorderColor: string;
|
|
14
16
|
selectedBackgroundColor: string;
|
|
15
17
|
backgroundColor: string;
|
|
18
|
+
bodyFontSize: number;
|
|
19
|
+
bodyBackgroundColor: string;
|
|
20
|
+
headerFontSize: number;
|
|
16
21
|
};
|
|
17
22
|
export declare const getDarkTableConfig: () => {
|
|
18
23
|
borderColor: string;
|
|
19
|
-
bodyFontSize: number;
|
|
20
24
|
bodyFontColor: string;
|
|
21
|
-
bodyBackgroundColor: string;
|
|
22
|
-
headerFontSize: number;
|
|
23
25
|
headerFontColor: string;
|
|
24
26
|
headerBackgroundColor: string;
|
|
25
27
|
hoverBodyBackgroundColor: string;
|
|
@@ -28,20 +30,27 @@ export declare const getDarkTableConfig: () => {
|
|
|
28
30
|
hoverHeaderInlineBackgroundColor: string;
|
|
29
31
|
selectedBorderColor: string;
|
|
30
32
|
selectedBackgroundColor: string;
|
|
33
|
+
bodyFontSize: number;
|
|
34
|
+
bodyBackgroundColor: string;
|
|
35
|
+
headerFontSize: number;
|
|
31
36
|
};
|
|
32
37
|
export declare const getLightPivotChartGridConfig: () => {
|
|
38
|
+
outlineBorderLineWidth: number;
|
|
39
|
+
frameCornerRadius: number;
|
|
33
40
|
borderColor: any;
|
|
34
41
|
bodyFontColor: any;
|
|
35
42
|
headerFontColor: any;
|
|
36
|
-
headerBackgroundColor:
|
|
43
|
+
headerBackgroundColor: string;
|
|
37
44
|
hoverHeaderBackgroundColor: any;
|
|
38
45
|
hoverHeaderInlineBackgroundColor: any;
|
|
39
46
|
};
|
|
40
47
|
export declare const getDarkPivotChartGridConfig: () => {
|
|
48
|
+
outlineBorderLineWidth: number;
|
|
49
|
+
frameCornerRadius: number;
|
|
41
50
|
borderColor: any;
|
|
42
51
|
bodyFontColor: any;
|
|
43
52
|
headerFontColor: any;
|
|
44
|
-
headerBackgroundColor:
|
|
53
|
+
headerBackgroundColor: string;
|
|
45
54
|
hoverHeaderBackgroundColor: any;
|
|
46
55
|
hoverHeaderInlineBackgroundColor: any;
|
|
47
56
|
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
const getDefaultTableConfig = ()=>({
|
|
2
|
+
bodyFontSize: 12,
|
|
3
|
+
bodyBackgroundColor: 'transparent',
|
|
4
|
+
headerFontSize: 12
|
|
5
|
+
});
|
|
1
6
|
const getLightTableConfig = ()=>({
|
|
7
|
+
...getDefaultTableConfig(),
|
|
2
8
|
borderColor: '#e3e5eb',
|
|
3
|
-
bodyFontSize: 12,
|
|
4
9
|
bodyFontColor: '#141414',
|
|
5
|
-
bodyBackgroundColor: 'transparent',
|
|
6
|
-
headerFontSize: 12,
|
|
7
10
|
headerFontColor: '#21252c',
|
|
8
11
|
headerBackgroundColor: '#f6f7f9',
|
|
9
12
|
hoverBodyBackgroundColor: '#bedaff',
|
|
@@ -15,11 +18,9 @@ const getLightTableConfig = ()=>({
|
|
|
15
18
|
backgroundColor: 'transparent'
|
|
16
19
|
});
|
|
17
20
|
const getDarkTableConfig = ()=>({
|
|
21
|
+
...getDefaultTableConfig(),
|
|
18
22
|
borderColor: '#4b4e53',
|
|
19
|
-
bodyFontSize: 12,
|
|
20
23
|
bodyFontColor: '#fdfdfd',
|
|
21
|
-
bodyBackgroundColor: 'transparent',
|
|
22
|
-
headerFontSize: 12,
|
|
23
24
|
headerFontColor: '#fdfdfd',
|
|
24
25
|
headerBackgroundColor: '#36393e',
|
|
25
26
|
hoverBodyBackgroundColor: '#4284ff66',
|
|
@@ -30,15 +31,17 @@ const getDarkTableConfig = ()=>({
|
|
|
30
31
|
selectedBackgroundColor: '#4284ff33'
|
|
31
32
|
});
|
|
32
33
|
const pickPivotChartGridConfig = (tableConfig)=>({
|
|
34
|
+
outlineBorderLineWidth: 0,
|
|
35
|
+
frameCornerRadius: 0,
|
|
33
36
|
borderColor: tableConfig.borderColor,
|
|
34
37
|
bodyFontColor: tableConfig.bodyFontColor,
|
|
35
38
|
headerFontColor: tableConfig.headerFontColor,
|
|
36
|
-
headerBackgroundColor:
|
|
39
|
+
headerBackgroundColor: 'transparent',
|
|
37
40
|
hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,
|
|
38
41
|
hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor
|
|
39
42
|
});
|
|
40
43
|
const getLightPivotChartGridConfig = ()=>pickPivotChartGridConfig(getLightTableConfig());
|
|
41
44
|
const getDarkPivotChartGridConfig = ()=>pickPivotChartGridConfig(getDarkTableConfig());
|
|
42
|
-
export { getDarkPivotChartGridConfig, getDarkTableConfig, getLightPivotChartGridConfig, getLightTableConfig };
|
|
45
|
+
export { getDarkPivotChartGridConfig, getDarkTableConfig, getDefaultTableConfig, getLightPivotChartGridConfig, getLightTableConfig };
|
|
43
46
|
|
|
44
47
|
//# sourceMappingURL=table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["export const
|
|
1
|
+
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["export const getDefaultTableConfig = () => ({\n bodyFontSize: 12,\n bodyBackgroundColor: 'transparent',\n headerFontSize: 12,\n})\n\nexport const getLightTableConfig = () => ({\n ...getDefaultTableConfig(),\n borderColor: '#e3e5eb',\n\n bodyFontColor: '#141414',\n\n headerFontColor: '#21252c',\n headerBackgroundColor: '#f6f7f9',\n\n hoverBodyBackgroundColor: '#bedaff',\n hoverBodyInlineBackgroundColor: '#bedaff33',\n hoverHeaderBackgroundColor: '#D9DDE4',\n hoverHeaderInlineBackgroundColor: '#D9DDE455',\n\n selectedBorderColor: '#4080ff',\n selectedBackgroundColor: '#bedaff33',\n\n backgroundColor: 'transparent',\n})\n\nexport const getDarkTableConfig = () => ({\n ...getDefaultTableConfig(),\n borderColor: '#4b4e53',\n\n bodyFontColor: '#fdfdfd',\n headerFontColor: '#fdfdfd',\n headerBackgroundColor: '#36393e',\n\n hoverBodyBackgroundColor: '#4284ff66',\n hoverBodyInlineBackgroundColor: '#4284ff10',\n hoverHeaderBackgroundColor: '#6f7984cc',\n hoverHeaderInlineBackgroundColor: '#4b4f54',\n\n selectedBorderColor: '#3073f2',\n selectedBackgroundColor: '#4284ff33',\n})\n\nconst pickPivotChartGridConfig = (tableConfig: any) => {\n return {\n outlineBorderLineWidth: 0,\n frameCornerRadius: 0,\n borderColor: tableConfig.borderColor,\n bodyFontColor: tableConfig.bodyFontColor,\n headerFontColor: tableConfig.headerFontColor,\n headerBackgroundColor: 'transparent',\n hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,\n hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor,\n }\n}\n\nexport const getLightPivotChartGridConfig = () => {\n return pickPivotChartGridConfig(getLightTableConfig())\n}\n\nexport const getDarkPivotChartGridConfig = () => {\n return pickPivotChartGridConfig(getDarkTableConfig())\n}\n"],"names":["getDefaultTableConfig","getLightTableConfig","getDarkTableConfig","pickPivotChartGridConfig","tableConfig","getLightPivotChartGridConfig","getDarkPivotChartGridConfig"],"mappings":"AAAO,MAAMA,wBAAwB,IAAO;QAC1C,cAAc;QACd,qBAAqB;QACrB,gBAAgB;IAClB;AAEO,MAAMC,sBAAsB,IAAO;QACxC,GAAGD,uBAAuB;QAC1B,aAAa;QAEb,eAAe;QAEf,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;QAEzB,iBAAiB;IACnB;AAEO,MAAME,qBAAqB,IAAO;QACvC,GAAGF,uBAAuB;QAC1B,aAAa;QAEb,eAAe;QACf,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;IAC3B;AAEA,MAAMG,2BAA2B,CAACC,cACzB;QACL,wBAAwB;QACxB,mBAAmB;QACnB,aAAaA,YAAY,WAAW;QACpC,eAAeA,YAAY,aAAa;QACxC,iBAAiBA,YAAY,eAAe;QAC5C,uBAAuB;QACvB,4BAA4BA,YAAY,0BAA0B;QAClE,kCAAkCA,YAAY,gCAAgC;IAChF;AAGK,MAAMC,+BAA+B,IACnCF,yBAAyBF;AAG3B,MAAMK,8BAA8B,IAClCH,yBAAyBD"}
|