@visactor/vseed 0.0.20 → 0.0.21
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/builder/builder/builder.d.ts +210 -118
- package/dist/index.cjs +383 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +363 -24
- package/dist/index.js.map +1 -1
- package/dist/pipeline/spec/table/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/table/pipes/theme/bodyStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/cornerHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/frameStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/headerStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/index.d.ts +6 -0
- package/dist/pipeline/spec/table/pipes/theme/rowHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/scrollStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/selectionStyle.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +55 -61
- package/dist/types/chartType/area/area.d.ts +8 -46
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +8 -46
- package/dist/types/chartType/bar/bar.d.ts +9 -46
- package/dist/types/chartType/barParallel/barParallel.d.ts +8 -46
- package/dist/types/chartType/barPercent/barPercent.d.ts +8 -46
- package/dist/types/chartType/column/column.d.ts +8 -46
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +8 -46
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +8 -46
- package/dist/types/chartType/donut/donut.d.ts +8 -46
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +2 -2
- package/dist/types/chartType/funnel/funnel.d.ts +8 -46
- package/dist/types/chartType/line/line.d.ts +8 -46
- package/dist/types/chartType/pie/pie.d.ts +8 -46
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +8 -7
- package/dist/types/chartType/rose/rose.d.ts +9 -46
- package/dist/types/chartType/roseParallel/roseParallel.d.ts +10 -47
- package/dist/types/chartType/scatter/scatter.d.ts +8 -46
- package/dist/types/chartType/table/table.d.ts +6 -44
- package/dist/types/properties/config/config.d.ts +50 -2
- package/dist/types/properties/dimensions/dimensions.d.ts +20 -44
- package/dist/types/properties/measures/measures.d.ts +11 -87
- package/dist/types/properties/theme/customTheme.d.ts +48 -4
- package/dist/types/vseed.d.ts +101 -709
- package/dist/umd/index.js +703 -40
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { clone, groupBy, isArray, isEmpty, isNullish, isNumber, isString, mergeDeep, omit, pick, unique } from "remeda";
|
2
|
+
import { color as external_d3_color_color } from "d3-color";
|
2
3
|
import { z } from "zod";
|
3
4
|
const initAdvancedVSeed = (advancedVSeed, context)=>{
|
4
5
|
const { vseed } = context;
|
@@ -4574,7 +4575,19 @@ const initTable = (spec, context)=>{
|
|
4574
4575
|
heightMode: 'autoHeight',
|
4575
4576
|
autoWrapText: true,
|
4576
4577
|
columnResizeMode: 'all',
|
4577
|
-
showHeader: true
|
4578
|
+
showHeader: true,
|
4579
|
+
tooltip: {
|
4580
|
+
isShowOverflowTextTooltip: true
|
4581
|
+
},
|
4582
|
+
animationAppear: {
|
4583
|
+
duration: 300,
|
4584
|
+
delay: 250,
|
4585
|
+
type: 'one-by-one',
|
4586
|
+
direction: 'row'
|
4587
|
+
},
|
4588
|
+
theme: {
|
4589
|
+
underlayBackgroundColor: 'transparent'
|
4590
|
+
}
|
4578
4591
|
};
|
4579
4592
|
};
|
4580
4593
|
const initPivotTable = (spec, context)=>{
|
@@ -4586,7 +4599,30 @@ const initPivotTable = (spec, context)=>{
|
|
4586
4599
|
widthMode: 'standard',
|
4587
4600
|
heightMode: 'autoHeight',
|
4588
4601
|
autoWrapText: true,
|
4589
|
-
columnResizeMode: 'all'
|
4602
|
+
columnResizeMode: 'all',
|
4603
|
+
columnResizeType: 'column',
|
4604
|
+
showColumnHeader: true,
|
4605
|
+
showRowHeader: true,
|
4606
|
+
select: {
|
4607
|
+
highlightMode: 'cell',
|
4608
|
+
headerSelectMode: 'inline'
|
4609
|
+
},
|
4610
|
+
hover: {
|
4611
|
+
highlightMode: 'cross'
|
4612
|
+
},
|
4613
|
+
tooltip: {
|
4614
|
+
isShowOverflowTextTooltip: true
|
4615
|
+
},
|
4616
|
+
widthAdaptiveMode: 'all',
|
4617
|
+
animationAppear: {
|
4618
|
+
duration: 300,
|
4619
|
+
delay: 250,
|
4620
|
+
type: 'one-by-one',
|
4621
|
+
direction: 'row'
|
4622
|
+
},
|
4623
|
+
theme: {
|
4624
|
+
underlayBackgroundColor: 'transparent'
|
4625
|
+
}
|
4590
4626
|
};
|
4591
4627
|
};
|
4592
4628
|
const measureTreeToColumns = (spec, context)=>{
|
@@ -4595,7 +4631,13 @@ const measureTreeToColumns = (spec, context)=>{
|
|
4595
4631
|
const result = {
|
4596
4632
|
...spec
|
4597
4633
|
};
|
4598
|
-
const
|
4634
|
+
const eachNode = (node)=>{
|
4635
|
+
if ('children' in node) return {};
|
4636
|
+
return {
|
4637
|
+
width: 'auto'
|
4638
|
+
};
|
4639
|
+
};
|
4640
|
+
const columns = treeTreeToColumns(measures, eachNode);
|
4599
4641
|
return {
|
4600
4642
|
...result,
|
4601
4643
|
columns: [
|
@@ -4610,7 +4652,13 @@ const dimensionTreeToColumns = (spec, context)=>{
|
|
4610
4652
|
const result = {
|
4611
4653
|
...spec
|
4612
4654
|
};
|
4613
|
-
const
|
4655
|
+
const eachNode = (node)=>{
|
4656
|
+
if ('children' in node) return {};
|
4657
|
+
return {
|
4658
|
+
width: 'auto'
|
4659
|
+
};
|
4660
|
+
};
|
4661
|
+
const columns = treeTreeToColumns(dimensions, eachNode);
|
4614
4662
|
return {
|
4615
4663
|
...result,
|
4616
4664
|
columns: [
|
@@ -4619,19 +4667,30 @@ const dimensionTreeToColumns = (spec, context)=>{
|
|
4619
4667
|
]
|
4620
4668
|
};
|
4621
4669
|
};
|
4622
|
-
const treeTreeToColumns = (tree
|
4670
|
+
const treeTreeToColumns = (tree, callback)=>{
|
4623
4671
|
const result = tree.map((item)=>{
|
4624
|
-
|
4625
|
-
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4634
|
-
|
4672
|
+
if ('children' in item && Array.isArray(item.children)) {
|
4673
|
+
const groupNode = item;
|
4674
|
+
const field = groupNode.id;
|
4675
|
+
const title = groupNode.alias ?? groupNode.id;
|
4676
|
+
const props = callback?.(groupNode) || {};
|
4677
|
+
return {
|
4678
|
+
field,
|
4679
|
+
title,
|
4680
|
+
columns: treeTreeToColumns(item.children, callback),
|
4681
|
+
...props
|
4682
|
+
};
|
4683
|
+
}
|
4684
|
+
{
|
4685
|
+
const field = item.id;
|
4686
|
+
const title = item.alias ?? item.id;
|
4687
|
+
const props = callback?.(item) || {};
|
4688
|
+
return {
|
4689
|
+
field,
|
4690
|
+
title,
|
4691
|
+
...props
|
4692
|
+
};
|
4693
|
+
}
|
4635
4694
|
});
|
4636
4695
|
return result || [];
|
4637
4696
|
};
|
@@ -4667,6 +4726,7 @@ const pivotIndicators_pivotIndicators = (spec, context)=>{
|
|
4667
4726
|
return {
|
4668
4727
|
...spec,
|
4669
4728
|
indicatorsAsCol: true,
|
4729
|
+
indicatorTitle: intl.i18n`指标名称`,
|
4670
4730
|
indicators: measures.map((item)=>({
|
4671
4731
|
cellType: 'text',
|
4672
4732
|
indicatorKey: item.id,
|
@@ -4675,16 +4735,254 @@ const pivotIndicators_pivotIndicators = (spec, context)=>{
|
|
4675
4735
|
}))
|
4676
4736
|
};
|
4677
4737
|
};
|
4738
|
+
const bodyStyle = (spec, context)=>{
|
4739
|
+
const result = {
|
4740
|
+
...spec
|
4741
|
+
};
|
4742
|
+
const { advancedVSeed } = context;
|
4743
|
+
const { customTheme, chartType } = advancedVSeed;
|
4744
|
+
const themConfig = customTheme?.config?.[chartType];
|
4745
|
+
if (!result.theme || !themConfig) return result;
|
4746
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4747
|
+
const backgroundColor = themConfig.bodyBackgroundColor || '#fff';
|
4748
|
+
const fontColor = themConfig.bodyFontColor || '#1B1F23';
|
4749
|
+
const fontSize = themConfig.bodyFontSize || 12;
|
4750
|
+
const hoverCellBgColor = themConfig.hoverBodyBackgroundColor || '#bedaff';
|
4751
|
+
const hoverInlineColor = external_d3_color_color(hoverCellBgColor)?.copy({
|
4752
|
+
opacity: 0.1
|
4753
|
+
}).toString();
|
4754
|
+
result.theme.bodyStyle = {
|
4755
|
+
borderColor: borderColor,
|
4756
|
+
borderLineWidth: 1,
|
4757
|
+
padding: [
|
4758
|
+
8.6,
|
4759
|
+
12,
|
4760
|
+
8.6,
|
4761
|
+
12
|
4762
|
+
],
|
4763
|
+
textAlign: 'right',
|
4764
|
+
hover: {
|
4765
|
+
cellBgColor: hoverCellBgColor,
|
4766
|
+
inlineRowBgColor: hoverInlineColor,
|
4767
|
+
inlineColumnBgColor: hoverInlineColor
|
4768
|
+
},
|
4769
|
+
color: fontColor,
|
4770
|
+
fontSize: fontSize,
|
4771
|
+
fontStyle: 'normal',
|
4772
|
+
fontWeight: 'normal',
|
4773
|
+
fontVariant: 'normal',
|
4774
|
+
bgColor: backgroundColor,
|
4775
|
+
lineHeight: 1.5 * fontSize
|
4776
|
+
};
|
4777
|
+
return result;
|
4778
|
+
};
|
4779
|
+
const headerStyle = (spec, context)=>{
|
4780
|
+
const result = {
|
4781
|
+
...spec
|
4782
|
+
};
|
4783
|
+
const { advancedVSeed } = context;
|
4784
|
+
const { customTheme, chartType } = advancedVSeed;
|
4785
|
+
const themConfig = customTheme?.config?.[chartType];
|
4786
|
+
if (!result.theme || !themConfig) return result;
|
4787
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4788
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
4789
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
4790
|
+
const fontSize = themConfig.headerFontSize || 12;
|
4791
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
4792
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
4793
|
+
result.theme.headerStyle = {
|
4794
|
+
borderColor: borderColor,
|
4795
|
+
borderLineWidth: 1,
|
4796
|
+
padding: [
|
4797
|
+
8,
|
4798
|
+
12,
|
4799
|
+
8,
|
4800
|
+
12
|
4801
|
+
],
|
4802
|
+
textAlign: 'center',
|
4803
|
+
hover: {
|
4804
|
+
cellBgColor: external_d3_color_color(hoverCellBgColor)?.copy({
|
4805
|
+
opacity: 1
|
4806
|
+
}).brighter(0.5).toString(),
|
4807
|
+
inlineRowBgColor: hoverInlineColor,
|
4808
|
+
inlineColumnBgColor: hoverInlineColor
|
4809
|
+
},
|
4810
|
+
frameStyle: {
|
4811
|
+
borderColor: [
|
4812
|
+
null,
|
4813
|
+
null,
|
4814
|
+
borderColor,
|
4815
|
+
null
|
4816
|
+
],
|
4817
|
+
borderLineWidth: 1
|
4818
|
+
},
|
4819
|
+
fontSize: fontSize,
|
4820
|
+
fontVariant: 'normal',
|
4821
|
+
fontStyle: 'normal',
|
4822
|
+
fontWeight: 'bold',
|
4823
|
+
color: fontColor,
|
4824
|
+
bgColor: backgroundColor,
|
4825
|
+
lineHeight: 1.5 * fontSize
|
4826
|
+
};
|
4827
|
+
return result;
|
4828
|
+
};
|
4829
|
+
const rowHeaderStyle = (spec, context)=>{
|
4830
|
+
const result = {
|
4831
|
+
...spec
|
4832
|
+
};
|
4833
|
+
const { advancedVSeed } = context;
|
4834
|
+
const { customTheme, chartType } = advancedVSeed;
|
4835
|
+
const themConfig = customTheme?.config?.[chartType];
|
4836
|
+
if (!result.theme || !themConfig) return result;
|
4837
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4838
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
4839
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
4840
|
+
const fontSize = themConfig.headerFontSize || 12;
|
4841
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
4842
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
4843
|
+
result.theme.rowHeaderStyle = {
|
4844
|
+
borderColor: borderColor,
|
4845
|
+
borderLineWidth: 1,
|
4846
|
+
padding: [
|
4847
|
+
8.6,
|
4848
|
+
12,
|
4849
|
+
8.6,
|
4850
|
+
12
|
4851
|
+
],
|
4852
|
+
textAlign: 'left',
|
4853
|
+
hover: {
|
4854
|
+
cellBgColor: external_d3_color_color(hoverCellBgColor)?.copy({
|
4855
|
+
opacity: 1
|
4856
|
+
}).brighter(0.5).toString(),
|
4857
|
+
inlineRowBgColor: hoverInlineColor,
|
4858
|
+
inlineColumnBgColor: hoverInlineColor
|
4859
|
+
},
|
4860
|
+
frameStyle: {
|
4861
|
+
borderColor: [
|
4862
|
+
null,
|
4863
|
+
borderColor,
|
4864
|
+
null,
|
4865
|
+
null
|
4866
|
+
],
|
4867
|
+
borderLineWidth: 1
|
4868
|
+
},
|
4869
|
+
fontSize: fontSize,
|
4870
|
+
fontVariant: 'normal',
|
4871
|
+
fontStyle: 'normal',
|
4872
|
+
fontWeight: 'bold',
|
4873
|
+
color: fontColor,
|
4874
|
+
bgColor: backgroundColor,
|
4875
|
+
lineHeight: 1.5 * fontSize
|
4876
|
+
};
|
4877
|
+
return result;
|
4878
|
+
};
|
4879
|
+
const cornerHeaderStyle = (spec, context)=>{
|
4880
|
+
const result = {
|
4881
|
+
...spec
|
4882
|
+
};
|
4883
|
+
const { advancedVSeed } = context;
|
4884
|
+
const { customTheme, chartType } = advancedVSeed;
|
4885
|
+
const themConfig = customTheme?.config?.[chartType];
|
4886
|
+
if (!result.theme || !themConfig) return result;
|
4887
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4888
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
4889
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
4890
|
+
const fontSize = themConfig.headerFontSize || 12;
|
4891
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
4892
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
4893
|
+
result.theme.cornerHeaderStyle = {
|
4894
|
+
borderColor: [
|
4895
|
+
borderColor,
|
4896
|
+
borderColor
|
4897
|
+
],
|
4898
|
+
borderLineWidth: 1,
|
4899
|
+
padding: [
|
4900
|
+
8,
|
4901
|
+
12,
|
4902
|
+
8,
|
4903
|
+
12
|
4904
|
+
],
|
4905
|
+
textAlign: 'left',
|
4906
|
+
hover: {
|
4907
|
+
cellBgColor: external_d3_color_color(hoverCellBgColor)?.copy({
|
4908
|
+
opacity: 1
|
4909
|
+
}).brighter(0.5).toString(),
|
4910
|
+
inlineRowBgColor: hoverInlineColor,
|
4911
|
+
inlineColumnBgColor: hoverInlineColor
|
4912
|
+
},
|
4913
|
+
frameStyle: {
|
4914
|
+
borderColor: [
|
4915
|
+
null,
|
4916
|
+
borderColor,
|
4917
|
+
borderColor,
|
4918
|
+
null
|
4919
|
+
],
|
4920
|
+
borderLineWidth: 1
|
4921
|
+
},
|
4922
|
+
fontSize: fontSize,
|
4923
|
+
fontVariant: 'normal',
|
4924
|
+
fontStyle: 'normal',
|
4925
|
+
fontWeight: 'bold',
|
4926
|
+
color: fontColor,
|
4927
|
+
bgColor: backgroundColor,
|
4928
|
+
lineHeight: 1.5 * fontSize
|
4929
|
+
};
|
4930
|
+
return result;
|
4931
|
+
};
|
4932
|
+
const frameStyle = (spec, context)=>{
|
4933
|
+
const result = {
|
4934
|
+
...spec
|
4935
|
+
};
|
4936
|
+
const { advancedVSeed } = context;
|
4937
|
+
const { customTheme, chartType } = advancedVSeed;
|
4938
|
+
const themConfig = customTheme?.config?.[chartType];
|
4939
|
+
if (!result.theme || !themConfig) return result;
|
4940
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4941
|
+
result.theme.frameStyle = {
|
4942
|
+
borderColor,
|
4943
|
+
borderLineWidth: 0,
|
4944
|
+
cornerRadius: 0
|
4945
|
+
};
|
4946
|
+
return result;
|
4947
|
+
};
|
4948
|
+
const selectionStyle = (spec, context)=>{
|
4949
|
+
const result = {
|
4950
|
+
...spec
|
4951
|
+
};
|
4952
|
+
const { advancedVSeed } = context;
|
4953
|
+
const { customTheme, chartType } = advancedVSeed;
|
4954
|
+
const themConfig = customTheme?.config?.[chartType];
|
4955
|
+
if (!result.theme || !themConfig) return result;
|
4956
|
+
const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)';
|
4957
|
+
result.theme.selectionStyle = {
|
4958
|
+
cellBorderColor: borderColor,
|
4959
|
+
cellBorderLineWidth: 2,
|
4960
|
+
cellBgColor: external_d3_color_color(borderColor)?.copy({
|
4961
|
+
opacity: 0.15
|
4962
|
+
}).toString()
|
4963
|
+
};
|
4964
|
+
return result;
|
4965
|
+
};
|
4678
4966
|
const tableSpecPipeline = [
|
4679
4967
|
initTable,
|
4680
4968
|
dimensionTreeToColumns,
|
4681
|
-
measureTreeToColumns
|
4969
|
+
measureTreeToColumns,
|
4970
|
+
bodyStyle,
|
4971
|
+
headerStyle,
|
4972
|
+
frameStyle,
|
4973
|
+
selectionStyle
|
4682
4974
|
];
|
4683
4975
|
const pivotTableSpecPipeline = [
|
4684
4976
|
initPivotTable,
|
4685
4977
|
pivotColumns,
|
4686
4978
|
pivotRows,
|
4687
|
-
pivotIndicators_pivotIndicators
|
4979
|
+
pivotIndicators_pivotIndicators,
|
4980
|
+
bodyStyle,
|
4981
|
+
headerStyle,
|
4982
|
+
rowHeaderStyle,
|
4983
|
+
cornerHeaderStyle,
|
4984
|
+
frameStyle,
|
4985
|
+
selectionStyle
|
4688
4986
|
];
|
4689
4987
|
const buildAdvanced = (builder)=>{
|
4690
4988
|
const { chartType } = builder.vseed;
|
@@ -4981,8 +5279,22 @@ const darkTheme = ()=>{
|
|
4981
5279
|
labelFontWeight: 400
|
4982
5280
|
}
|
4983
5281
|
};
|
5282
|
+
const tableConfig = {
|
5283
|
+
borderColor: '#4b4e53',
|
5284
|
+
bodyFontSize: 12,
|
5285
|
+
bodyFontColor: '#fdfdfd',
|
5286
|
+
bodyBackgroundColor: 'transparent',
|
5287
|
+
headerFontSize: 12,
|
5288
|
+
headerFontColor: '#fdfdfd',
|
5289
|
+
headerBackgroundColor: '#36393e',
|
5290
|
+
hoverBodyBackgroundColor: '#4284ff66',
|
5291
|
+
hoverHeaderBackgroundColor: '#5f5f5f88',
|
5292
|
+
selectedBorderColor: '#3073F2'
|
5293
|
+
};
|
4984
5294
|
return {
|
4985
5295
|
config: {
|
5296
|
+
table: tableConfig,
|
5297
|
+
pivotTable: tableConfig,
|
4986
5298
|
line: {
|
4987
5299
|
...baseConfig,
|
4988
5300
|
xAxis: bandAxis,
|
@@ -5261,8 +5573,22 @@ const lightTheme = ()=>{
|
|
5261
5573
|
labelFontWeight: 400
|
5262
5574
|
}
|
5263
5575
|
};
|
5576
|
+
const tableConfig = {
|
5577
|
+
borderColor: '#e3e5eb',
|
5578
|
+
bodyFontSize: 12,
|
5579
|
+
bodyFontColor: '#141414',
|
5580
|
+
bodyBackgroundColor: 'transparent',
|
5581
|
+
headerFontSize: 12,
|
5582
|
+
headerFontColor: '#21252c',
|
5583
|
+
headerBackgroundColor: '#f6f7f9',
|
5584
|
+
hoverBodyBackgroundColor: '#bedaff',
|
5585
|
+
hoverHeaderBackgroundColor: '#D9DDE488',
|
5586
|
+
selectedBorderColor: '#4080ff'
|
5587
|
+
};
|
5264
5588
|
return {
|
5265
5589
|
config: {
|
5590
|
+
table: tableConfig,
|
5591
|
+
pivotTable: tableConfig,
|
5266
5592
|
line: {
|
5267
5593
|
...baseConfig,
|
5268
5594
|
xAxis: bandAxis,
|
@@ -5466,7 +5792,7 @@ const zDimension = z.object({
|
|
5466
5792
|
'dimension',
|
5467
5793
|
'rowDimension',
|
5468
5794
|
'columnDimension'
|
5469
|
-
]).default('dimension')
|
5795
|
+
]).default('dimension')
|
5470
5796
|
});
|
5471
5797
|
const zDimensionGroup = z.object({
|
5472
5798
|
id: z.string(),
|
@@ -5510,8 +5836,8 @@ const zNumFormat = z.object({
|
|
5510
5836
|
const zMeasure = z.object({
|
5511
5837
|
id: z.string(),
|
5512
5838
|
alias: z.string().optional(),
|
5513
|
-
autoFormat: z.boolean().default(true)
|
5514
|
-
format: zNumFormat["default"]({})
|
5839
|
+
autoFormat: z.boolean().default(true),
|
5840
|
+
format: zNumFormat["default"]({})
|
5515
5841
|
});
|
5516
5842
|
const zMeasureGroup = z.object({
|
5517
5843
|
id: z.string(),
|
@@ -5719,6 +6045,19 @@ const zLegend = z.object({
|
|
5719
6045
|
const zTooltip = z.object({
|
5720
6046
|
enable: z.boolean().default(true).optional()
|
5721
6047
|
});
|
6048
|
+
const zTableConfig = z.object({
|
6049
|
+
borderColor: z.string().optional(),
|
6050
|
+
bodyFontSize: z.number().optional(),
|
6051
|
+
bodyFontColor: z.string().optional(),
|
6052
|
+
bodyBackgroundColor: z.string().optional(),
|
6053
|
+
hoverBodyBackgroundColor: z.string().optional(),
|
6054
|
+
headerFontSize: z.number().optional(),
|
6055
|
+
headerFontColor: z.string().optional(),
|
6056
|
+
headerBackgroundColor: z.string().optional(),
|
6057
|
+
hoverHeaderBackgroundColor: z.string().optional(),
|
6058
|
+
selectedBorderColor: z.string().optional()
|
6059
|
+
});
|
6060
|
+
const zPivotTableConfig = zTableConfig;
|
5722
6061
|
const zLineConfig = z.object({
|
5723
6062
|
backgroundColor: zBackgroundColor.optional(),
|
5724
6063
|
label: zLabel.optional(),
|
@@ -5807,8 +6146,8 @@ const zFunnelConfig = z.object({
|
|
5807
6146
|
legend: zLegend.optional()
|
5808
6147
|
});
|
5809
6148
|
const zConfig = z.object({
|
5810
|
-
table:
|
5811
|
-
pivotTable:
|
6149
|
+
table: zTableConfig.optional(),
|
6150
|
+
pivotTable: zPivotTableConfig.optional(),
|
5812
6151
|
line: zLineConfig.optional(),
|
5813
6152
|
column: zColumnConfig.optional(),
|
5814
6153
|
columnParallel: zColumnParallelConfig.optional(),
|
@@ -6521,6 +6860,6 @@ const zAdvancedVSeed = z.object({
|
|
6521
6860
|
annotation: zAnnotation,
|
6522
6861
|
locale: zLocale
|
6523
6862
|
});
|
6524
|
-
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, zAdvancedVSeed, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPointStyle, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zStackCornerRadius, zTable, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
6863
|
+
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, zAdvancedVSeed, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
6525
6864
|
|
6526
6865
|
//# sourceMappingURL=index.js.map
|