@visactor/vseed 0.1.29 → 0.1.31
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/builder.d.ts +864 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js +6 -4
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +18 -13
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +9 -7
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +2 -1
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/corner/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/table/pipes/corner/index.js +2 -0
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js +12 -0
- package/dist/esm/pipeline/spec/table/pipes/corner/titleOnDimension.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/table/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js +5 -3
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
- package/dist/esm/pipeline/utils/chatType.d.ts +1 -0
- package/dist/esm/pipeline/utils/chatType.js +2 -1
- package/dist/esm/pipeline/utils/chatType.js.map +1 -1
- package/dist/esm/theme/common/table.d.ts +3 -1
- package/dist/esm/theme/common/table.js +11 -1
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +37 -19
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +37 -19
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +288 -0
- package/dist/esm/types/properties/config/config.d.ts +297 -0
- package/dist/esm/types/properties/config/config.js +25 -9
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +288 -0
- package/dist/umd/index.js +157 -72
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,14 +1,16 @@
|
|
1
1
|
import { MeasureName } from "../../../../../dataReshape/index.js";
|
2
2
|
import { intl } from "../../../../../i18n/index.js";
|
3
|
+
import { findAllMeasures } from "../../../../utils/measures/find.js";
|
3
4
|
const defaultMeasureName = (advancedVSeed)=>{
|
4
5
|
const result = {
|
5
6
|
...advancedVSeed
|
6
7
|
};
|
7
|
-
const
|
8
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
9
|
+
if (measures.length > 1 && !result.dimensions?.some((dim)=>dim.id === MeasureName)) result.dimensions?.push({
|
8
10
|
id: MeasureName,
|
9
|
-
alias: intl.i18n
|
10
|
-
|
11
|
-
|
11
|
+
alias: intl.i18n`指标名称`,
|
12
|
+
encoding: 'column'
|
13
|
+
});
|
12
14
|
return result;
|
13
15
|
};
|
14
16
|
export { defaultMeasureName };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/advanced/table/pipes/default/defaultMeasureName.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/table/pipes/default/defaultMeasureName.ts"],"sourcesContent":["import { MeasureName } from 'src/dataReshape'\nimport { intl } from 'src/i18n'\nimport type { AdvancedPipe, Dimension } from 'src/types'\n\nexport const defaultMeasureName: AdvancedPipe = (advancedVSeed) => {\n const result = { ...advancedVSeed }\n
|
1
|
+
{"version":3,"file":"pipeline/advanced/table/pipes/default/defaultMeasureName.js","sources":["webpack://@visactor/vseed/./src/pipeline/advanced/table/pipes/default/defaultMeasureName.ts"],"sourcesContent":["import { MeasureName } from 'src/dataReshape'\nimport { intl } from 'src/i18n'\nimport { findAllMeasures } from 'src/pipeline/utils/measures/find'\nimport type { AdvancedPipe, Dimension, DimensionTree } from 'src/types'\n\nexport const defaultMeasureName: AdvancedPipe = (advancedVSeed) => {\n const result = { ...advancedVSeed }\n const measures = findAllMeasures(advancedVSeed.measures as DimensionTree)\n\n // 如果没有指标名称维度,则默认添加指标名称维度\n if (measures.length > 1 && !result.dimensions?.some((dim) => dim.id === MeasureName)) {\n result.dimensions?.push({\n id: MeasureName,\n alias: intl.i18n`指标名称`,\n encoding: 'column',\n } as Dimension)\n }\n\n return result\n}\n"],"names":["defaultMeasureName","advancedVSeed","result","measures","findAllMeasures","dim","MeasureName","intl"],"mappings":";;;AAKO,MAAMA,qBAAmC,CAACC;IAC/C,MAAMC,SAAS;QAAE,GAAGD,aAAa;IAAC;IAClC,MAAME,WAAWC,gBAAgBH,cAAc,QAAQ;IAGvD,IAAIE,SAAS,MAAM,GAAG,KAAK,CAACD,OAAO,UAAU,EAAE,KAAK,CAACG,MAAQA,IAAI,EAAE,KAAKC,cACtEJ,OAAO,UAAU,EAAE,KAAK;QACtB,IAAII;QACJ,OAAOC,KAAK,IAAI,CAAC,IAAI,CAAC;QACtB,UAAU;IACZ;IAGF,OAAOL;AACT"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { selector } from "../../../../../dataSelector/index.js";
|
2
2
|
import { isSubset } from "./utils.js";
|
3
3
|
import { ANNOTATION_Z_INDEX } from "../../../../utils/constant.js";
|
4
|
+
import { isBarLikeChart } from "../../../../utils/chatType.js";
|
4
5
|
const annotationPoint_annotationPoint = (spec, context)=>{
|
5
6
|
const { advancedVSeed } = context;
|
6
7
|
const { annotation } = advancedVSeed;
|
@@ -9,29 +10,31 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
9
10
|
const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
|
10
11
|
annotationPoint
|
11
12
|
];
|
13
|
+
const isHorizontalBar = isBarLikeChart(advancedVSeed);
|
14
|
+
const defaultStyle = isHorizontalBar ? {
|
15
|
+
textAlign: 'right',
|
16
|
+
textBaseline: 'middle'
|
17
|
+
} : {
|
18
|
+
textAlign: 'center',
|
19
|
+
textBaseline: 'top'
|
20
|
+
};
|
12
21
|
const markPoint = annotationPointList.flatMap((annotationPoint)=>{
|
13
|
-
const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign =
|
22
|
+
const { selector: selectorPoint, text = '', textColor = '#ffffff', textFontSize = 12, textFontWeight = 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor, textBackgroundBorderRadius = 4, textBackgroundBorderWidth = 1, textBackgroundColor = '#212121', textBackgroundPadding = 2, textBackgroundVisible = true, offsetX = 0, offsetY = 0 } = annotationPoint;
|
14
23
|
const dataset = advancedVSeed.dataset.flat();
|
15
24
|
const selectedData = selectorPoint ? dataset.filter((datum)=>selector(datum, selectorPoint)) : [];
|
25
|
+
const dx = -10 - (isHorizontalBar ? textFontSize : 0);
|
26
|
+
const dy = isHorizontalBar ? 0 : textFontSize;
|
16
27
|
return selectedData.map((datum)=>({
|
17
28
|
zIndex: ANNOTATION_Z_INDEX,
|
18
29
|
regionRelative: true,
|
19
|
-
|
20
|
-
const targetDatum = data.find((item)=>isSubset(datum, item));
|
21
|
-
if (targetDatum) {
|
22
|
-
const { x, y } = context.dataToPosition(targetDatum);
|
23
|
-
return {
|
24
|
-
x,
|
25
|
-
y
|
26
|
-
};
|
27
|
-
}
|
28
|
-
},
|
30
|
+
coordinate: (data)=>data.find((item)=>isSubset(datum, item)),
|
29
31
|
itemLine: {
|
30
32
|
visible: false
|
31
33
|
},
|
32
34
|
itemContent: {
|
33
35
|
offsetY,
|
34
36
|
offsetX,
|
37
|
+
confine: true,
|
35
38
|
text: {
|
36
39
|
text: text,
|
37
40
|
style: {
|
@@ -43,7 +46,8 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
43
46
|
lineWidth: 1,
|
44
47
|
fontSize: textFontSize,
|
45
48
|
fontWeight: textFontWeight,
|
46
|
-
|
49
|
+
dx,
|
50
|
+
dy
|
47
51
|
},
|
48
52
|
labelBackground: {
|
49
53
|
visible: textBackgroundVisible,
|
@@ -53,7 +57,8 @@ const annotationPoint_annotationPoint = (spec, context)=>{
|
|
53
57
|
fill: textBackgroundColor,
|
54
58
|
stroke: textBackgroundBorderColor,
|
55
59
|
lineWidth: textBackgroundBorderWidth,
|
56
|
-
|
60
|
+
dx,
|
61
|
+
dy
|
57
62
|
}
|
58
63
|
}
|
59
64
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPoint.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPoint.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/annotation/annotationPoint.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/annotation/annotationPoint.ts"],"sourcesContent":["import type { ILineChartSpec } from '@visactor/vchart'\nimport { selector } from '../../../../../dataSelector'\nimport type { Datum, SpecPipe } from 'src/types'\nimport { isSubset } from './utils'\nimport { ANNOTATION_Z_INDEX } from '../../../../utils/constant'\nimport { isBarLikeChart } from 'src/pipeline/utils/chatType'\n\nexport const annotationPoint: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { annotation } = advancedVSeed\n\n if (!annotation || !annotation.annotationPoint) {\n return spec\n }\n\n const { annotationPoint } = annotation\n const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [annotationPoint]\n const isHorizontalBar = isBarLikeChart(advancedVSeed)\n const defaultStyle = isHorizontalBar\n ? {\n textAlign: 'right',\n textBaseline: 'middle',\n }\n : {\n textAlign: 'center',\n textBaseline: 'top',\n }\n\n const markPoint = annotationPointList.flatMap((annotationPoint) => {\n const {\n selector: selectorPoint,\n text = '',\n textColor = '#ffffff',\n textFontSize = 12,\n textFontWeight = 400,\n textAlign = defaultStyle.textAlign,\n textBaseline = defaultStyle.textBaseline,\n textBackgroundBorderColor,\n textBackgroundBorderRadius = 4,\n textBackgroundBorderWidth = 1,\n textBackgroundColor = '#212121',\n textBackgroundPadding = 2,\n textBackgroundVisible = true,\n offsetX = 0,\n offsetY = 0,\n } = annotationPoint\n\n const dataset = advancedVSeed.dataset.flat()\n const selectedData = selectorPoint ? dataset.filter((datum) => selector(datum, selectorPoint)) : []\n const dx = -10 - (isHorizontalBar ? (textFontSize as number) : 0) // 由于vchart tag实现问题,需要设置这个强制偏移量\n const dy = isHorizontalBar ? 0 : (textFontSize as number)\n\n return selectedData.map((datum) => {\n return {\n zIndex: ANNOTATION_Z_INDEX,\n regionRelative: true,\n coordinate: (data: Datum[]) => {\n return data.find((item) => isSubset(datum, item))\n },\n\n itemLine: {\n visible: false,\n },\n itemContent: {\n offsetY,\n offsetX,\n confine: true,\n text: {\n text: text,\n style: {\n visible: true,\n textAlign: textAlign,\n textBaseline: textBaseline,\n fill: textColor,\n stroke: textBackgroundColor,\n lineWidth: 1,\n fontSize: textFontSize,\n fontWeight: textFontWeight,\n dx,\n dy,\n },\n labelBackground: {\n visible: textBackgroundVisible,\n padding: textBackgroundPadding,\n style: {\n cornerRadius: textBackgroundBorderRadius ?? 4,\n fill: textBackgroundColor,\n stroke: textBackgroundBorderColor,\n lineWidth: textBackgroundBorderWidth,\n dx,\n dy,\n },\n },\n },\n },\n }\n })\n }) as ILineChartSpec['markPoint']\n\n return {\n ...spec,\n markPoint,\n }\n}\n"],"names":["annotationPoint","spec","context","advancedVSeed","annotation","annotationPointList","Array","isHorizontalBar","isBarLikeChart","defaultStyle","markPoint","selectorPoint","text","textColor","textFontSize","textFontWeight","textAlign","textBaseline","textBackgroundBorderColor","textBackgroundBorderRadius","textBackgroundBorderWidth","textBackgroundColor","textBackgroundPadding","textBackgroundVisible","offsetX","offsetY","dataset","selectedData","datum","selector","dx","dy","ANNOTATION_Z_INDEX","data","item","isSubset"],"mappings":";;;;AAOO,MAAMA,kCAA4B,CAACC,MAAMC;IAC9C,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,UAAU,EAAE,GAAGD;IAEvB,IAAI,CAACC,cAAc,CAACA,WAAW,eAAe,EAC5C,OAAOH;IAGT,MAAM,EAAED,eAAe,EAAE,GAAGI;IAC5B,MAAMC,sBAAsBC,MAAM,OAAO,CAACN,mBAAmBA,kBAAkB;QAACA;KAAgB;IAChG,MAAMO,kBAAkBC,eAAeL;IACvC,MAAMM,eAAeF,kBACjB;QACE,WAAW;QACX,cAAc;IAChB,IACA;QACE,WAAW;QACX,cAAc;IAChB;IAEJ,MAAMG,YAAYL,oBAAoB,OAAO,CAAC,CAACL;QAC7C,MAAM,EACJ,UAAUW,aAAa,EACvBC,OAAO,EAAE,EACTC,YAAY,SAAS,EACrBC,eAAe,EAAE,EACjBC,iBAAiB,GAAG,EACpBC,YAAYP,aAAa,SAAS,EAClCQ,eAAeR,aAAa,YAAY,EACxCS,yBAAyB,EACzBC,6BAA6B,CAAC,EAC9BC,4BAA4B,CAAC,EAC7BC,sBAAsB,SAAS,EAC/BC,wBAAwB,CAAC,EACzBC,wBAAwB,IAAI,EAC5BC,UAAU,CAAC,EACXC,UAAU,CAAC,EACZ,GAAGzB;QAEJ,MAAM0B,UAAUvB,cAAc,OAAO,CAAC,IAAI;QAC1C,MAAMwB,eAAehB,gBAAgBe,QAAQ,MAAM,CAAC,CAACE,QAAUC,SAASD,OAAOjB,kBAAkB,EAAE;QACnG,MAAMmB,KAAK,MAAOvB,CAAAA,kBAAmBO,eAA0B;QAC/D,MAAMiB,KAAKxB,kBAAkB,IAAKO;QAElC,OAAOa,aAAa,GAAG,CAAC,CAACC,QAChB;gBACL,QAAQI;gBACR,gBAAgB;gBAChB,YAAY,CAACC,OACJA,KAAK,IAAI,CAAC,CAACC,OAASC,SAASP,OAAOM;gBAG7C,UAAU;oBACR,SAAS;gBACX;gBACA,aAAa;oBACXT;oBACAD;oBACA,SAAS;oBACT,MAAM;wBACJ,MAAMZ;wBACN,OAAO;4BACL,SAAS;4BACT,WAAWI;4BACX,cAAcC;4BACd,MAAMJ;4BACN,QAAQQ;4BACR,WAAW;4BACX,UAAUP;4BACV,YAAYC;4BACZe;4BACAC;wBACF;wBACA,iBAAiB;4BACf,SAASR;4BACT,SAASD;4BACT,OAAO;gCACL,cAAcH,8BAA8B;gCAC5C,MAAME;gCACN,QAAQH;gCACR,WAAWE;gCACXU;gCACAC;4BACF;wBACF;oBACF;gBACF;YACF;IAEJ;IAEA,OAAO;QACL,GAAG9B,IAAI;QACPS;IACF;AACF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IBasicDimension } from '@visactor/vtable/es/ts-types/pivot-table/dimension/basic-dimension'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotColumnDimensions: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n\n if (!dimensions) {\n return result\n }\n const columnDimensions = dimensions.filter((dim) => dim.encoding === 'column')\n const columns: IBasicDimension[] = columnDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n }))\n return {\n ...result,\n columns: columns,\n }\n}\n"],"names":["pivotColumnDimensions","spec","context","result","advancedVSeed","dimensions","columnDimensions","dim","columns"],"mappings":"AAIO,MAAMA,wBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAMG,aAAaD,cAAc,UAAU;IAE3C,IAAI,CAACC,YACH,OAAOF;IAET,MAAMG,mBAAmBD,WAAW,MAAM,CAAC,CAACE,MAAQA,AAAiB,aAAjBA,IAAI,QAAQ;IAChE,MAAMC,UAA6BF,iBAAiB,GAAG,CAAC,CAACC,MAAS;YAChE,cAAcA,IAAI,EAAE;YACpB,OAAOA,IAAI,KAAK,IAAIA,IAAI,EAAE;QAC5B;
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport type { IBasicDimension } from '@visactor/vtable/es/ts-types/pivot-table/dimension/basic-dimension'\nimport type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotColumnDimensions: SpecPipe = (spec, context) => {\n const result = { ...spec } as PivotChartConstructorOptions\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n\n if (!dimensions) {\n return result\n }\n const columnDimensions = dimensions.filter((dim) => dim.encoding === 'column')\n const columns: IBasicDimension[] = columnDimensions.map((dim) => ({\n dimensionKey: dim.id,\n title: dim.alias || dim.id,\n }))\n\n console.log('Pivot Column Dimensions:', columns)\n return {\n ...result,\n columns: columns,\n }\n}\n"],"names":["pivotColumnDimensions","spec","context","result","advancedVSeed","dimensions","columnDimensions","dim","columns","console"],"mappings":"AAIO,MAAMA,wBAAkC,CAACC,MAAMC;IACpD,MAAMC,SAAS;QAAE,GAAGF,IAAI;IAAC;IACzB,MAAM,EAAEG,aAAa,EAAE,GAAGF;IAC1B,MAAMG,aAAaD,cAAc,UAAU;IAE3C,IAAI,CAACC,YACH,OAAOF;IAET,MAAMG,mBAAmBD,WAAW,MAAM,CAAC,CAACE,MAAQA,AAAiB,aAAjBA,IAAI,QAAQ;IAChE,MAAMC,UAA6BF,iBAAiB,GAAG,CAAC,CAACC,MAAS;YAChE,cAAcA,IAAI,EAAE;YACpB,OAAOA,IAAI,KAAK,IAAIA,IAAI,EAAE;QAC5B;IAEAE,QAAQ,GAAG,CAAC,4BAA4BD;IACxC,OAAO;QACL,GAAGL,MAAM;QACT,SAASK;IACX;AACF"}
|
@@ -1,17 +1,19 @@
|
|
1
1
|
import { isCombination, isPivot } from "../../../../utils/index.js";
|
2
2
|
const pivotGridStyle = (spec, context)=>{
|
3
|
-
const { vseed } = context;
|
3
|
+
const { vseed, advancedVSeed } = context;
|
4
|
+
const { config, chartType } = advancedVSeed;
|
5
|
+
const themConfig = config?.[chartType]?.pivotGrid ?? {};
|
4
6
|
const onlyCombination = !isPivot(vseed) && isCombination(vseed);
|
5
7
|
const result = {
|
6
8
|
...spec
|
7
9
|
};
|
8
10
|
const transparent = 'rgba(0,0,0,0)';
|
9
|
-
const borderColor = '#e3e5eb';
|
10
|
-
const bodyFontColor = '#141414';
|
11
|
-
const headerFontColor = '#21252c';
|
12
|
-
const headerBackgroundColor = 'rgba(0,0,0,0)';
|
13
|
-
const hoverHeaderBackgroundColor = onlyCombination ? transparent : '#D9DDE4';
|
14
|
-
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : '#D9DDE455';
|
11
|
+
const borderColor = themConfig.borderColor ?? '#e3e5eb';
|
12
|
+
const bodyFontColor = themConfig.bodyFontColor ?? '#141414';
|
13
|
+
const headerFontColor = themConfig.headerFontColor ?? '#21252c';
|
14
|
+
const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)';
|
15
|
+
const hoverHeaderBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4';
|
16
|
+
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
|
15
17
|
return {
|
16
18
|
...result,
|
17
19
|
theme: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed } = context\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = '#e3e5eb'\n const bodyFontColor = '#141414'\n const headerFontColor = '#21252c'\n const headerBackgroundColor = 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination
|
1
|
+
{"version":3,"file":"pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.ts"],"sourcesContent":["import type { PivotChartConstructorOptions } from '@visactor/vtable'\nimport { isCombination, isPivot } from 'src/pipeline/utils'\nimport type { Config, SpecPipe } from 'src/types'\n\nexport const pivotGridStyle: SpecPipe = (spec, context) => {\n const { vseed, advancedVSeed } = context\n const { config, chartType } = advancedVSeed\n const themConfig = (config?.[chartType] as Config['line'])?.pivotGrid ?? {}\n\n const onlyCombination = !isPivot(vseed) && isCombination(vseed)\n\n const result = { ...spec } as PivotChartConstructorOptions\n const transparent = 'rgba(0,0,0,0)'\n\n const borderColor = themConfig.borderColor ?? '#e3e5eb'\n const bodyFontColor = themConfig.bodyFontColor ?? '#141414'\n const headerFontColor = themConfig.headerFontColor ?? '#21252c'\n const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)'\n const hoverHeaderBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4')\n const hoverHeaderInlineBackgroundColor = onlyCombination\n ? transparent\n : (themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455')\n\n return {\n ...result,\n theme: {\n underlayBackgroundColor: transparent,\n bodyStyle: {\n borderColor,\n color: bodyFontColor,\n borderLineWidth: [1, 1, 1, 1],\n bgColor: transparent,\n hover: {\n cellBgColor: 'transparent',\n },\n },\n headerStyle: {\n borderColor,\n fontSize: 12,\n borderLineWidth: 1,\n color: headerFontColor,\n textAlign: 'center',\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n rowHeaderStyle: {\n borderColor,\n fontSize: 12,\n color: headerFontColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerHeaderStyle: {\n borderColor,\n textAlign: 'center',\n fontSize: 12,\n color: headerFontColor,\n fontWeight: 'bold',\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 0, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n inlineRowBgColor: hoverHeaderInlineBackgroundColor || undefined,\n inlineColumnBgColor: hoverHeaderInlineBackgroundColor || undefined,\n },\n },\n cornerRightTopCellStyle: {\n borderColor,\n borderLineWidth: 0,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 0, 1],\n },\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerLeftBottomCellStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 0, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n cornerRightBottomCellStyle: {\n borderColor,\n borderLineWidth: 0,\n bgColor: headerBackgroundColor,\n frameStyle: {\n borderColor,\n borderLineWidth: [1, 1, 1, 1],\n },\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n rightFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n bottomFrozenStyle: {\n borderColor,\n borderLineWidth: 1,\n bgColor: headerBackgroundColor,\n hover: {\n cellBgColor: hoverHeaderBackgroundColor,\n },\n },\n selectionStyle: {\n cellBgColor: '',\n cellBorderColor: '',\n },\n frameStyle: {\n borderColor,\n cornerRadius: 4,\n },\n },\n }\n}\n"],"names":["pivotGridStyle","spec","context","vseed","advancedVSeed","config","chartType","themConfig","onlyCombination","isPivot","isCombination","result","transparent","borderColor","bodyFontColor","headerFontColor","headerBackgroundColor","hoverHeaderBackgroundColor","hoverHeaderInlineBackgroundColor","undefined"],"mappings":";AAIO,MAAMA,iBAA2B,CAACC,MAAMC;IAC7C,MAAM,EAAEC,KAAK,EAAEC,aAAa,EAAE,GAAGF;IACjC,MAAM,EAAEG,MAAM,EAAEC,SAAS,EAAE,GAAGF;IAC9B,MAAMG,aAAcF,QAAQ,CAACC,UAAU,EAAqB,aAAa,CAAC;IAE1E,MAAME,kBAAkB,CAACC,QAAQN,UAAUO,cAAcP;IAEzD,MAAMQ,SAAS;QAAE,GAAGV,IAAI;IAAC;IACzB,MAAMW,cAAc;IAEpB,MAAMC,cAAcN,WAAW,WAAW,IAAI;IAC9C,MAAMO,gBAAgBP,WAAW,aAAa,IAAI;IAClD,MAAMQ,kBAAkBR,WAAW,eAAe,IAAI;IACtD,MAAMS,wBAAwBT,WAAW,qBAAqB,IAAI;IAClE,MAAMU,6BAA6BT,kBAC/BI,cACCL,WAAW,0BAA0B,IAAI;IAC9C,MAAMW,mCAAmCV,kBACrCI,cACCL,WAAW,gCAAgC,IAAI;IAEpD,OAAO;QACL,GAAGI,MAAM;QACT,OAAO;YACL,yBAAyBC;YACzB,WAAW;gBACTC;gBACA,OAAOC;gBACP,iBAAiB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC7B,SAASF;gBACT,OAAO;oBACL,aAAa;gBACf;YACF;YACA,aAAa;gBACXC;gBACA,UAAU;gBACV,iBAAiB;gBACjB,OAAOE;gBACP,WAAW;gBACX,SAASC;gBACT,OAAO;oBACL,aAAaC;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,gBAAgB;gBACdN;gBACA,UAAU;gBACV,OAAOE;gBACP,iBAAiB;gBACjB,SAASC;gBACT,OAAO;oBACL,aAAaC;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,mBAAmB;gBACjBN;gBACA,WAAW;gBACX,UAAU;gBACV,OAAOE;gBACP,YAAY;gBACZ,iBAAiB;gBACjB,SAASC;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;oBACb,kBAAkBC,oCAAoCC;oBACtD,qBAAqBD,oCAAoCC;gBAC3D;YACF;YACA,yBAAyB;gBACvBN;gBACA,iBAAiB;gBACjB,YAAY;oBACVA;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,2BAA2B;gBACzBJ;gBACA,iBAAiB;oBAAC;oBAAG;oBAAG;oBAAG;iBAAE;gBAC7B,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,4BAA4B;gBAC1BJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,YAAY;oBACVH;oBACA,iBAAiB;wBAAC;wBAAG;wBAAG;wBAAG;qBAAE;gBAC/B;gBACA,OAAO;oBACL,aAAaI;gBACf;YACF;YACA,kBAAkB;gBAChBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,mBAAmB;gBACjBJ;gBACA,iBAAiB;gBACjB,SAASG;gBACT,OAAO;oBACL,aAAaC;gBACf;YACF;YACA,gBAAgB;gBACd,aAAa;gBACb,iBAAiB;YACnB;YACA,YAAY;gBACVJ;gBACA,cAAc;YAChB;QACF;IACF;AACF"}
|
@@ -1,9 +1,10 @@
|
|
1
|
-
import { bodyStyle, cornerHeaderStyle, frameStyle, headerStyle, initPivotTable, pivotColumns, pivotIndicators, pivotRows, rowHeaderStyle, selectionStyle } from "../pipes/index.js";
|
1
|
+
import { bodyStyle, cornerHeaderStyle, frameStyle, headerStyle, initPivotTable, pivotColumns, pivotIndicators, pivotRows, rowHeaderStyle, selectionStyle, titleOnDimension } from "../pipes/index.js";
|
2
2
|
import { dataConfig } from "../pipes/indicators/pivotDataConfig.js";
|
3
3
|
const pivotTableSpecPipeline = [
|
4
4
|
initPivotTable,
|
5
5
|
pivotColumns,
|
6
6
|
pivotRows,
|
7
|
+
titleOnDimension,
|
7
8
|
pivotIndicators,
|
8
9
|
bodyStyle,
|
9
10
|
headerStyle,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipeline/pivotTable.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipeline/pivotTable.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n initPivotTable,\n pivotColumns,\n pivotRows,\n pivotIndicators,\n bodyStyle,\n headerStyle,\n rowHeaderStyle,\n cornerHeaderStyle,\n frameStyle,\n selectionStyle,\n} from '../pipes'\nimport { dataConfig } from '../pipes/indicators/pivotDataConfig'\n\nexport const pivotTableSpecPipeline: SpecPipeline = [\n initPivotTable,\n pivotColumns,\n pivotRows,\n pivotIndicators,\n bodyStyle,\n headerStyle,\n rowHeaderStyle,\n cornerHeaderStyle,\n frameStyle,\n selectionStyle,\n dataConfig,\n]\n"],"names":["pivotTableSpecPipeline","initPivotTable","pivotColumns","pivotRows","pivotIndicators","bodyStyle","headerStyle","rowHeaderStyle","cornerHeaderStyle","frameStyle","selectionStyle","dataConfig"],"mappings":";;
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipeline/pivotTable.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipeline/pivotTable.ts"],"sourcesContent":["import type { SpecPipeline } from 'src/types'\nimport {\n initPivotTable,\n pivotColumns,\n pivotRows,\n pivotIndicators,\n bodyStyle,\n headerStyle,\n rowHeaderStyle,\n cornerHeaderStyle,\n frameStyle,\n selectionStyle,\n titleOnDimension,\n} from '../pipes'\nimport { dataConfig } from '../pipes/indicators/pivotDataConfig'\n\nexport const pivotTableSpecPipeline: SpecPipeline = [\n initPivotTable,\n pivotColumns,\n pivotRows,\n titleOnDimension,\n pivotIndicators,\n bodyStyle,\n headerStyle,\n rowHeaderStyle,\n cornerHeaderStyle,\n frameStyle,\n selectionStyle,\n dataConfig,\n]\n"],"names":["pivotTableSpecPipeline","initPivotTable","pivotColumns","pivotRows","titleOnDimension","pivotIndicators","bodyStyle","headerStyle","rowHeaderStyle","cornerHeaderStyle","frameStyle","selectionStyle","dataConfig"],"mappings":";;AAgBO,MAAMA,yBAAuC;IAClDC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;CACD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { titleOnDimension } from './titleOnDimension';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
const titleOnDimension = (spec)=>{
|
2
|
+
const { rows = [], columns = [] } = spec;
|
3
|
+
return {
|
4
|
+
...spec,
|
5
|
+
corner: {
|
6
|
+
titleOnDimension: rows.length <= 1 && columns.length >= 1 ? 'column' : 'row'
|
7
|
+
}
|
8
|
+
};
|
9
|
+
};
|
10
|
+
export { titleOnDimension };
|
11
|
+
|
12
|
+
//# sourceMappingURL=titleOnDimension.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/corner/titleOnDimension.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/corner/titleOnDimension.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport type { SpecPipe } from 'src/types'\n\nexport const titleOnDimension: SpecPipe = (spec) => {\n const { rows = [], columns = [] } = spec as any\n\n return {\n ...spec,\n corner: {\n titleOnDimension: (rows as any[]).length <= 1 && (columns as any[]).length >= 1 ? 'column' : 'row',\n },\n }\n}\n"],"names":["titleOnDimension","spec","rows","columns"],"mappings":"AAIO,MAAMA,mBAA6B,CAACC;IACzC,MAAM,EAAEC,OAAO,EAAE,EAAEC,UAAU,EAAE,EAAE,GAAGF;IAEpC,OAAO;QACL,GAAGA,IAAI;QACP,QAAQ;YACN,kBAAmBC,KAAe,MAAM,IAAI,KAAMC,QAAkB,MAAM,IAAI,IAAI,WAAW;QAC/F;IACF;AACF"}
|
@@ -5,16 +5,18 @@ const pivotIndicators = (spec, context)=>{
|
|
5
5
|
const { advancedVSeed } = context;
|
6
6
|
const { measures, datasetReshapeInfo } = advancedVSeed;
|
7
7
|
const { foldInfo } = datasetReshapeInfo[0];
|
8
|
+
const hasRow = spec?.rows?.length > 0;
|
9
|
+
const foldMapValues = Object.values(foldInfo.foldMap);
|
8
10
|
return {
|
9
11
|
...spec,
|
10
|
-
indicatorsAsCol: true,
|
11
12
|
indicatorTitle: intl.i18n`指标名称`,
|
12
|
-
|
13
|
+
indicatorsAsCol: hasRow,
|
14
|
+
hideIndicatorName: hasRow,
|
13
15
|
indicators: [
|
14
16
|
{
|
15
17
|
cellType: 'text',
|
16
18
|
indicatorKey: foldInfo.measureValue,
|
17
|
-
title: '
|
19
|
+
title: foldMapValues.length > 1 ? '' : foldMapValues[0],
|
18
20
|
width: 'auto',
|
19
21
|
format: fieldFormat(measures, foldInfo)
|
20
22
|
}
|
@@ -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 } from '@visactor/vtable'\nimport type { BaseTableAPI, FieldFormat } from '@visactor/vtable/es/ts-types'\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\n return {\n ...spec,\n
|
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 } from '@visactor/vtable'\nimport type { BaseTableAPI, FieldFormat } from '@visactor/vtable/es/ts-types'\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): FieldFormat => {\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":";;;AAOO,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"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/spec/table/pipes/rows/pivotRows.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/rows/pivotRows.ts"],"sourcesContent":["import type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotRows: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n const { encoding } = advancedVSeed\n const rows = dimensions.filter((item) => encoding.row?.includes(item.id))\n return {\n ...spec,\n rows: rows.map((item) => {\n return {\n dimensionKey: item.id,\n title: item.alias || item.id,\n width: 'auto',\n }\n }),\n }\n}\n"],"names":["pivotRows","spec","context","advancedVSeed","dimensions","encoding","rows","item"],"mappings":"AAEO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAME,aAAaD,cAAc,UAAU;IAC3C,MAAM,EAAEE,QAAQ,EAAE,GAAGF;IACrB,MAAMG,OAAOF,WAAW,MAAM,CAAC,CAACG,OAASF,SAAS,GAAG,EAAE,SAASE,KAAK,EAAE;
|
1
|
+
{"version":3,"file":"pipeline/spec/table/pipes/rows/pivotRows.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/rows/pivotRows.ts"],"sourcesContent":["import type { Dimensions, SpecPipe } from 'src/types'\n\nexport const pivotRows: SpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const dimensions = advancedVSeed.dimensions as Dimensions\n const { encoding } = advancedVSeed\n const rows = dimensions.filter((item) => encoding.row?.includes(item.id))\n\n return {\n ...spec,\n rows: rows.map((item) => {\n return {\n dimensionKey: item.id,\n title: item.alias || item.id,\n width: 'auto',\n }\n }),\n }\n}\n"],"names":["pivotRows","spec","context","advancedVSeed","dimensions","encoding","rows","item"],"mappings":"AAEO,MAAMA,YAAsB,CAACC,MAAMC;IACxC,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAME,aAAaD,cAAc,UAAU;IAC3C,MAAM,EAAEE,QAAQ,EAAE,GAAGF;IACrB,MAAMG,OAAOF,WAAW,MAAM,CAAC,CAACG,OAASF,SAAS,GAAG,EAAE,SAASE,KAAK,EAAE;IAEvE,OAAO;QACL,GAAGN,IAAI;QACP,MAAMK,KAAK,GAAG,CAAC,CAACC,OACP;gBACL,cAAcA,KAAK,EAAE;gBACrB,OAAOA,KAAK,KAAK,IAAIA,KAAK,EAAE;gBAC5B,OAAO;YACT;IAEJ;AACF"}
|
@@ -5,6 +5,7 @@ export declare const isRadar: (vseed: VSeed) => vseed is import("../../types").R
|
|
5
5
|
export declare const isAreaPercent: (vseed: VSeed) => vseed is import("../../types").AreaPercent;
|
6
6
|
export declare const isColumnPercent: (vseed: VSeed) => vseed is import("../../types").ColumnPercent;
|
7
7
|
export declare const isBarPercent: (vseed: VSeed) => vseed is import("../../types").BarPercent;
|
8
|
+
export declare const isBarLikeChart: (vseed: VSeed) => vseed is import("../../types").Bar | import("../../types").BarParallel | import("../../types").BarPercent;
|
8
9
|
export declare const isVTable: (vseed: VSeed) => boolean;
|
9
10
|
export declare const isVChart: (vseed: VSeed) => boolean;
|
10
11
|
/**
|
@@ -8,6 +8,7 @@ const isRadar = (vseed)=>vseed.chartType === ChartTypeEnum.Radar;
|
|
8
8
|
const isAreaPercent = (vseed)=>vseed.chartType === ChartTypeEnum.AreaPercent;
|
9
9
|
const isColumnPercent = (vseed)=>vseed.chartType === ChartTypeEnum.ColumnPercent;
|
10
10
|
const isBarPercent = (vseed)=>vseed.chartType === ChartTypeEnum.BarPercent;
|
11
|
+
const isBarLikeChart = (vseed)=>vseed.chartType === ChartTypeEnum.Bar || vseed.chartType === ChartTypeEnum.BarPercent || vseed.chartType === ChartTypeEnum.BarParallel;
|
11
12
|
const isVTable = (vseed)=>[
|
12
13
|
'table',
|
13
14
|
'pivotTable'
|
@@ -49,6 +50,6 @@ const isCombination = (vseed)=>{
|
|
49
50
|
const hasMeasureGroup = measures && measures.some((measure)=>measure && measure.children);
|
50
51
|
return hasMeasureGroup;
|
51
52
|
};
|
52
|
-
export { isAreaPercent, isBarPercent, isColumnPercent, isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
|
53
|
+
export { isAreaPercent, isBarLikeChart, isBarPercent, isColumnPercent, isCombination, isPivot, isPivotChart, isPivotTable, isRadar, isTable, isVChart, isVTable };
|
53
54
|
|
54
55
|
//# sourceMappingURL=chatType.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import { type Dimensions, type DimensionGroup, type DimensionTree, type VSeed, type Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n\n return dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n}\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","dimension","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAAW;AAE/C,MAAMI,kBAAkB,CAACL,QACvBA,MAAM,SAAS,KAAKC,cAAc,aAAa;AAEjD,MAAMK,eAAe,CAACN,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAG9C,MAAMM,
|
1
|
+
{"version":3,"file":"pipeline/utils/chatType.js","sources":["webpack://@visactor/vseed/./src/pipeline/utils/chatType.ts"],"sourcesContent":["import { type Dimensions, type DimensionGroup, type DimensionTree, type VSeed, type Measure } from 'src/types'\nimport { measureDepth } from './measures'\nimport { isMeasureTreeWithChildren, isMeasureTreeWithParentId } from '../advanced/chart/pipes/measures/utils'\nimport { unique } from 'remeda'\nimport { ChartTypeEnum, DEFAULT_PARENT_ID } from './constant'\n\nexport const isTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Table\n}\nexport const isPivotTable = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.PivotTable\n}\nexport const isRadar = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.Radar\n}\nexport const isAreaPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.AreaPercent\n}\nexport const isColumnPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.ColumnPercent\n}\nexport const isBarPercent = (vseed: VSeed) => {\n return vseed.chartType === ChartTypeEnum.BarPercent\n}\n\nexport const isBarLikeChart = (vseed: VSeed) => {\n return (\n vseed.chartType === ChartTypeEnum.Bar ||\n vseed.chartType === ChartTypeEnum.BarPercent ||\n vseed.chartType === ChartTypeEnum.BarParallel\n )\n}\n\nexport const isVTable = (vseed: VSeed) => {\n return ['table', 'pivotTable'].includes(vseed.chartType)\n}\nexport const isVChart = (vseed: VSeed): boolean => {\n return !isVTable(vseed)\n}\n\n/**\n * @description 透视图表或组合图\n * - 透视图表定义: 存在 column 或 row的 encoding\n * - 组合图表定义: 存在多组指标的情况\n * - 透视组合图表: 存在 column 或 row的 encoding 且 存在多组指标的情况\n * 上述三者都只能使用 VTable.PivotChart 绘制\n */\nexport const isPivotChart = (vseed: VSeed) => {\n if (isVTable(vseed)) {\n return false\n }\n\n if (isPivot(vseed)) {\n return true\n }\n\n return isCombination(vseed)\n}\n\n/**\n * @description 存在column 或 row的encoding\n */\nexport const isPivot = (vseed: VSeed) => {\n const { dimensions = [] } = vseed as {\n dimensions: Dimensions\n }\n\n return dimensions && dimensions.some((dimension) => dimension.encoding === 'row' || dimension.encoding === 'column')\n}\n/**\n * @description 不存在column 或 row的encoding, 但是有多组指标的情况\n */\nexport const isCombination = (vseed: VSeed) => {\n if (isMeasureTreeWithParentId(vseed.measures)) {\n const parentIds = vseed.measures?.map((measure: Measure) => measure.parentId || DEFAULT_PARENT_ID)\n return parentIds && unique(parentIds).length > 1\n }\n\n if (vseed.chartType === 'dualAxis' || vseed.chartType === 'scatter') {\n if (vseed.chartType === 'scatter') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.scatterMeasures && vseed.scatterMeasures.length > 1) {\n return true\n }\n return false\n }\n if (vseed.chartType === 'dualAxis') {\n if (isMeasureTreeWithChildren(vseed.measures)) {\n const depth = measureDepth(vseed.measures)\n return depth === 3\n }\n\n if (vseed.dualMeasures && vseed.dualMeasures.length > 1) {\n return true\n }\n }\n\n return false\n }\n\n const { measures = [] } = vseed as {\n measures: DimensionTree\n dimensions: Dimensions\n }\n\n const hasMeasureGroup = measures && measures.some((measure: DimensionGroup) => measure && measure.children)\n\n return hasMeasureGroup\n}\n"],"names":["isTable","vseed","ChartTypeEnum","isPivotTable","isRadar","isAreaPercent","isColumnPercent","isBarPercent","isBarLikeChart","isVTable","isVChart","isPivotChart","isPivot","isCombination","dimensions","dimension","isMeasureTreeWithParentId","parentIds","measure","DEFAULT_PARENT_ID","unique","isMeasureTreeWithChildren","depth","measureDepth","measures","hasMeasureGroup"],"mappings":";;;;AAMO,MAAMA,UAAU,CAACC,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMC,eAAe,CAACF,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAE9C,MAAME,UAAU,CAACH,QACfA,MAAM,SAAS,KAAKC,cAAc,KAAK;AAEzC,MAAMG,gBAAgB,CAACJ,QACrBA,MAAM,SAAS,KAAKC,cAAc,WAAW;AAE/C,MAAMI,kBAAkB,CAACL,QACvBA,MAAM,SAAS,KAAKC,cAAc,aAAa;AAEjD,MAAMK,eAAe,CAACN,QACpBA,MAAM,SAAS,KAAKC,cAAc,UAAU;AAG9C,MAAMM,iBAAiB,CAACP,QAE3BA,MAAM,SAAS,KAAKC,cAAc,GAAG,IACrCD,MAAM,SAAS,KAAKC,cAAc,UAAU,IAC5CD,MAAM,SAAS,KAAKC,cAAc,WAAW;AAI1C,MAAMO,WAAW,CAACR,QAChB;QAAC;QAAS;KAAa,CAAC,QAAQ,CAACA,MAAM,SAAS;AAElD,MAAMS,WAAW,CAACT,QAChB,CAACQ,SAASR;AAUZ,MAAMU,eAAe,CAACV;IAC3B,IAAIQ,SAASR,QACX,OAAO;IAGT,IAAIW,QAAQX,QACV,OAAO;IAGT,OAAOY,cAAcZ;AACvB;AAKO,MAAMW,UAAU,CAACX;IACtB,MAAM,EAAEa,aAAa,EAAE,EAAE,GAAGb;IAI5B,OAAOa,cAAcA,WAAW,IAAI,CAAC,CAACC,YAAcA,AAAuB,UAAvBA,UAAU,QAAQ,IAAcA,AAAuB,aAAvBA,UAAU,QAAQ;AACxG;AAIO,MAAMF,gBAAgB,CAACZ;IAC5B,IAAIe,0BAA0Bf,MAAM,QAAQ,GAAG;QAC7C,MAAMgB,YAAYhB,MAAM,QAAQ,EAAE,IAAI,CAACiB,UAAqBA,QAAQ,QAAQ,IAAIC;QAChF,OAAOF,aAAaG,OAAOH,WAAW,MAAM,GAAG;IACjD;IAEA,IAAIhB,AAAoB,eAApBA,MAAM,SAAS,IAAmBA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;QACnE,IAAIA,AAAoB,cAApBA,MAAM,SAAS,EAAgB;YACjC,IAAIoB,0BAA0BpB,MAAM,QAAQ,GAAG;gBAC7C,MAAMqB,QAAQC,aAAatB,MAAM,QAAQ;gBACzC,OAAOqB,AAAU,MAAVA;YACT;YAEA,IAAIrB,MAAM,eAAe,IAAIA,MAAM,eAAe,CAAC,MAAM,GAAG,GAC1D,OAAO;YAET,OAAO;QACT;QACA,IAAIA,AAAoB,eAApBA,MAAM,SAAS,EAAiB;YAClC,IAAIoB,0BAA0BpB,MAAM,QAAQ,GAAG;gBAC7C,MAAMqB,QAAQC,aAAatB,MAAM,QAAQ;gBACzC,OAAOqB,AAAU,MAAVA;YACT;YAEA,IAAIrB,MAAM,YAAY,IAAIA,MAAM,YAAY,CAAC,MAAM,GAAG,GACpD,OAAO;QAEX;QAEA,OAAO;IACT;IAEA,MAAM,EAAEuB,WAAW,EAAE,EAAE,GAAGvB;IAK1B,MAAMwB,kBAAkBD,YAAYA,SAAS,IAAI,CAAC,CAACN,UAA4BA,WAAWA,QAAQ,QAAQ;IAE1G,OAAOO;AACT"}
|
@@ -1,3 +1,5 @@
|
|
1
|
-
import type { TableConfig } from '../../types';
|
1
|
+
import type { PivotChartGridConfig, TableConfig } from '../../types';
|
2
2
|
export declare const getLightTableConfig: () => TableConfig;
|
3
3
|
export declare const getDarkTableConfig: () => TableConfig;
|
4
|
+
export declare const getLightPivotChartGridConfig: () => PivotChartGridConfig;
|
5
|
+
export declare const getDarkPivotChartGridConfig: () => PivotChartGridConfig;
|
@@ -29,6 +29,16 @@ const getDarkTableConfig = ()=>({
|
|
29
29
|
selectedBorderColor: '#3073f2',
|
30
30
|
selectedBackgroundColor: '#4284ff33'
|
31
31
|
});
|
32
|
-
|
32
|
+
const pickPivotChartGridConfig = (tableConfig)=>({
|
33
|
+
borderColor: tableConfig.borderColor,
|
34
|
+
bodyFontColor: tableConfig.bodyFontColor,
|
35
|
+
headerFontColor: tableConfig.headerFontColor,
|
36
|
+
headerBackgroundColor: tableConfig.headerBackgroundColor,
|
37
|
+
hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,
|
38
|
+
hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor
|
39
|
+
});
|
40
|
+
const getLightPivotChartGridConfig = ()=>pickPivotChartGridConfig(getLightTableConfig());
|
41
|
+
const getDarkPivotChartGridConfig = ()=>pickPivotChartGridConfig(getDarkTableConfig());
|
42
|
+
export { getDarkPivotChartGridConfig, getDarkTableConfig, getLightPivotChartGridConfig, getLightTableConfig };
|
33
43
|
|
34
44
|
//# sourceMappingURL=table.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["import type { TableConfig } from 'src/types'\n\nexport const getLightTableConfig = (): TableConfig => ({\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\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 = (): TableConfig => ({\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\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"],"names":["getLightTableConfig","getDarkTableConfig"],"mappings":"AAEO,MAAMA,sBAAsB,IAAoB;QACrD,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;QAEzB,iBAAiB;IACnB;AAEO,MAAMC,qBAAqB,IAAoB;QACpD,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;IAC3B"}
|
1
|
+
{"version":3,"file":"theme/common/table.js","sources":["webpack://@visactor/vseed/./src/theme/common/table.ts"],"sourcesContent":["import type { PivotChartGridConfig, TableConfig } from 'src/types'\n\nexport const getLightTableConfig = (): TableConfig => ({\n borderColor: '#e3e5eb',\n\n bodyFontSize: 12,\n bodyFontColor: '#141414',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\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 = (): TableConfig => ({\n borderColor: '#4b4e53',\n\n bodyFontSize: 12,\n bodyFontColor: '#fdfdfd',\n bodyBackgroundColor: 'transparent',\n\n headerFontSize: 12,\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: TableConfig) => {\n return {\n borderColor: tableConfig.borderColor,\n bodyFontColor: tableConfig.bodyFontColor,\n headerFontColor: tableConfig.headerFontColor,\n headerBackgroundColor: tableConfig.headerBackgroundColor,\n hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,\n hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor,\n }\n}\n\nexport const getLightPivotChartGridConfig = (): PivotChartGridConfig => {\n return pickPivotChartGridConfig(getLightTableConfig())\n}\n\nexport const getDarkPivotChartGridConfig = (): PivotChartGridConfig => {\n return pickPivotChartGridConfig(getDarkTableConfig())\n}\n"],"names":["getLightTableConfig","getDarkTableConfig","pickPivotChartGridConfig","tableConfig","getLightPivotChartGridConfig","getDarkPivotChartGridConfig"],"mappings":"AAEO,MAAMA,sBAAsB,IAAoB;QACrD,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;QAEzB,iBAAiB;IACnB;AAEO,MAAMC,qBAAqB,IAAoB;QACpD,aAAa;QAEb,cAAc;QACd,eAAe;QACf,qBAAqB;QAErB,gBAAgB;QAChB,iBAAiB;QACjB,uBAAuB;QAEvB,0BAA0B;QAC1B,gCAAgC;QAChC,4BAA4B;QAC5B,kCAAkC;QAElC,qBAAqB;QACrB,yBAAyB;IAC3B;AAEA,MAAMC,2BAA2B,CAACC,cACzB;QACL,aAAaA,YAAY,WAAW;QACpC,eAAeA,YAAY,aAAa;QACxC,iBAAiBA,YAAY,eAAe;QAC5C,uBAAuBA,YAAY,qBAAqB;QACxD,4BAA4BA,YAAY,0BAA0B;QAClE,kCAAkCA,YAAY,gCAAgC;IAChF;AAGK,MAAMC,+BAA+B,IACnCF,yBAAyBF;AAG3B,MAAMK,8BAA8B,IAClCH,yBAAyBD"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkTableConfig, getDefaultLabel, getDefaultLegend } from "../common/index.js";
|
1
|
+
import { getDarkColor, getDarkCrosshairLine, getDarkCrosshairRect, getDarkPivotChartGridConfig, getDarkTableConfig, getDefaultLabel, getDefaultLegend } from "../common/index.js";
|
2
2
|
import { getDefaultTooltip } from "../common/tooltip.js";
|
3
3
|
import { getDarkBandAxis, getDarkLinearAxis } from "../common/axes.js";
|
4
4
|
const darkTheme = ()=>{
|
@@ -35,7 +35,8 @@ const darkTheme = ()=>{
|
|
35
35
|
...baseConfig,
|
36
36
|
xAxis: bandAxis,
|
37
37
|
yAxis: linearAxis,
|
38
|
-
crosshairLine: crosshairLine
|
38
|
+
crosshairLine: crosshairLine,
|
39
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
39
40
|
},
|
40
41
|
column: {
|
41
42
|
...baseConfig,
|
@@ -47,7 +48,8 @@ const darkTheme = ()=>{
|
|
47
48
|
4,
|
48
49
|
0,
|
49
50
|
0
|
50
|
-
]
|
51
|
+
],
|
52
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
51
53
|
},
|
52
54
|
columnParallel: {
|
53
55
|
...baseConfig,
|
@@ -59,7 +61,8 @@ const darkTheme = ()=>{
|
|
59
61
|
4,
|
60
62
|
0,
|
61
63
|
0
|
62
|
-
]
|
64
|
+
],
|
65
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
63
66
|
},
|
64
67
|
columnPercent: {
|
65
68
|
...baseConfig,
|
@@ -71,7 +74,8 @@ const darkTheme = ()=>{
|
|
71
74
|
4,
|
72
75
|
0,
|
73
76
|
0
|
74
|
-
]
|
77
|
+
],
|
78
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
75
79
|
},
|
76
80
|
bar: {
|
77
81
|
...baseConfig,
|
@@ -83,7 +87,8 @@ const darkTheme = ()=>{
|
|
83
87
|
4,
|
84
88
|
4,
|
85
89
|
0
|
86
|
-
]
|
90
|
+
],
|
91
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
87
92
|
},
|
88
93
|
barParallel: {
|
89
94
|
...baseConfig,
|
@@ -95,7 +100,8 @@ const darkTheme = ()=>{
|
|
95
100
|
4,
|
96
101
|
4,
|
97
102
|
0
|
98
|
-
]
|
103
|
+
],
|
104
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
99
105
|
},
|
100
106
|
barPercent: {
|
101
107
|
...baseConfig,
|
@@ -107,19 +113,22 @@ const darkTheme = ()=>{
|
|
107
113
|
4,
|
108
114
|
4,
|
109
115
|
0
|
110
|
-
]
|
116
|
+
],
|
117
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
111
118
|
},
|
112
119
|
area: {
|
113
120
|
...baseConfig,
|
114
121
|
xAxis: bandAxis,
|
115
122
|
yAxis: linearAxis,
|
116
|
-
crosshairLine: crosshairLine
|
123
|
+
crosshairLine: crosshairLine,
|
124
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
117
125
|
},
|
118
126
|
areaPercent: {
|
119
127
|
...baseConfig,
|
120
128
|
xAxis: bandAxis,
|
121
129
|
yAxis: linearAxis,
|
122
|
-
crosshairLine: crosshairLine
|
130
|
+
crosshairLine: crosshairLine,
|
131
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
123
132
|
},
|
124
133
|
scatter: {
|
125
134
|
...baseConfig,
|
@@ -146,7 +155,8 @@ const darkTheme = ()=>{
|
|
146
155
|
...baseConfig.label,
|
147
156
|
showValue: false,
|
148
157
|
showValuePercent: false
|
149
|
-
}
|
158
|
+
},
|
159
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
150
160
|
},
|
151
161
|
dualAxis: {
|
152
162
|
...baseConfig,
|
@@ -162,7 +172,8 @@ const darkTheme = ()=>{
|
|
162
172
|
primary: 'column',
|
163
173
|
secondary: 'line'
|
164
174
|
},
|
165
|
-
crosshairRect
|
175
|
+
crosshairRect,
|
176
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
166
177
|
},
|
167
178
|
pie: {
|
168
179
|
...baseConfig,
|
@@ -171,7 +182,8 @@ const darkTheme = ()=>{
|
|
171
182
|
showValuePercent: true,
|
172
183
|
labelLayout: 'labelLine',
|
173
184
|
showDimension: true
|
174
|
-
}
|
185
|
+
},
|
186
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
175
187
|
},
|
176
188
|
donut: {
|
177
189
|
...baseConfig,
|
@@ -180,10 +192,12 @@ const darkTheme = ()=>{
|
|
180
192
|
showValuePercent: true,
|
181
193
|
labelLayout: 'labelLine',
|
182
194
|
showDimension: true
|
183
|
-
}
|
195
|
+
},
|
196
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
184
197
|
},
|
185
198
|
radar: {
|
186
|
-
...baseConfig
|
199
|
+
...baseConfig,
|
200
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
187
201
|
},
|
188
202
|
rose: {
|
189
203
|
...baseConfig,
|
@@ -191,7 +205,8 @@ const darkTheme = ()=>{
|
|
191
205
|
...baseConfig.label,
|
192
206
|
showValuePercent: true,
|
193
207
|
showDimension: true
|
194
|
-
}
|
208
|
+
},
|
209
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
195
210
|
},
|
196
211
|
roseParallel: {
|
197
212
|
...baseConfig,
|
@@ -199,17 +214,20 @@ const darkTheme = ()=>{
|
|
199
214
|
...baseConfig.label,
|
200
215
|
showValuePercent: true,
|
201
216
|
showDimension: true
|
202
|
-
}
|
217
|
+
},
|
218
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
203
219
|
},
|
204
220
|
funnel: {
|
205
|
-
...baseConfig
|
221
|
+
...baseConfig,
|
222
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
206
223
|
},
|
207
224
|
heatmap: {
|
208
225
|
...baseConfig,
|
209
226
|
label: {
|
210
227
|
...baseConfig.label,
|
211
228
|
labelColorSmartInvert: true
|
212
|
-
}
|
229
|
+
},
|
230
|
+
pivotGrid: getDarkPivotChartGridConfig()
|
213
231
|
}
|
214
232
|
}
|
215
233
|
};
|