@visactor/vseed 0.0.36 → 0.0.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.
Files changed (123) hide show
  1. package/dist/builder/builder/builder.d.ts +8922 -8928
  2. package/dist/index.cjs +1192 -917
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.js +1160 -903
  5. package/dist/index.js.map +1 -1
  6. package/dist/pipeline/advanced/table/pipes/config/index.d.ts +2 -0
  7. package/dist/pipeline/advanced/table/pipes/config/pivotTableConfig.d.ts +2 -0
  8. package/dist/pipeline/advanced/table/pipes/config/tableConfig.d.ts +2 -0
  9. package/dist/pipeline/advanced/table/pipes/index.d.ts +1 -0
  10. package/dist/pipeline/spec/chart/pipes/series/index.d.ts +1 -1
  11. package/dist/pipeline/spec/chart/pipes/series/series.d.ts +1 -0
  12. package/dist/pipeline/spec/table/pipes/columns/dimensionsToColumns.d.ts +2 -0
  13. package/dist/pipeline/spec/table/pipes/columns/index.d.ts +1 -0
  14. package/dist/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +0 -1
  15. package/dist/pipeline/spec/table/pipes/indicators/index.d.ts +1 -0
  16. package/dist/pipeline/spec/table/pipes/indicators/pivotDataConfig.d.ts +2 -0
  17. package/dist/pipeline/utils/constant.d.ts +2 -0
  18. package/dist/pipeline/utils/dimensions/index.d.ts +1 -0
  19. package/dist/pipeline/utils/dimensions/typeGuard.d.ts +4 -0
  20. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  21. package/dist/pipeline/utils/measures/typeGuard.d.ts +4 -0
  22. package/dist/types/advancedVSeed.d.ts +3841 -3847
  23. package/dist/types/chartType/area/area.d.ts +11 -2
  24. package/dist/types/chartType/area/zArea.d.ts +565 -577
  25. package/dist/types/chartType/areaPercent/areaPercent.d.ts +4 -0
  26. package/dist/types/chartType/areaPercent/zAreaPercent.d.ts +565 -577
  27. package/dist/types/chartType/areaRange/areaRange.d.ts +4 -0
  28. package/dist/types/chartType/areaRange/zAreaRange.d.ts +546 -558
  29. package/dist/types/chartType/bar/bar.d.ts +4 -1183
  30. package/dist/types/chartType/bar/index.d.ts +2 -1
  31. package/dist/types/chartType/bar/zBar.d.ts +1171 -0
  32. package/dist/types/chartType/barParallel/barParallel.d.ts +4 -1183
  33. package/dist/types/chartType/barParallel/index.d.ts +2 -1
  34. package/dist/types/chartType/barParallel/zBarParallel.d.ts +1171 -0
  35. package/dist/types/chartType/barPercent/barPercent.d.ts +4 -1183
  36. package/dist/types/chartType/barPercent/index.d.ts +2 -1
  37. package/dist/types/chartType/barPercent/zBarPercent.d.ts +1171 -0
  38. package/dist/types/chartType/column/column.d.ts +4 -1183
  39. package/dist/types/chartType/column/index.d.ts +2 -1
  40. package/dist/types/chartType/column/zColumn.d.ts +1171 -0
  41. package/dist/types/chartType/columnParallel/columnParallel.d.ts +4 -1183
  42. package/dist/types/chartType/columnParallel/index.d.ts +2 -1
  43. package/dist/types/chartType/columnParallel/zColumnParallel.d.ts +1171 -0
  44. package/dist/types/chartType/columnPercent/columnPercent.d.ts +4 -1183
  45. package/dist/types/chartType/columnPercent/index.d.ts +2 -1
  46. package/dist/types/chartType/columnPercent/zColumnPercent.d.ts +1171 -0
  47. package/dist/types/chartType/donut/donut.d.ts +4 -119
  48. package/dist/types/chartType/donut/index.d.ts +2 -1
  49. package/dist/types/chartType/donut/zDonut.d.ts +119 -0
  50. package/dist/types/chartType/dualAxis/dualAxis.d.ts +9 -0
  51. package/dist/types/chartType/dualAxis/zDualAxis.d.ts +744 -755
  52. package/dist/types/chartType/funnel/funnel.d.ts +4 -89
  53. package/dist/types/chartType/funnel/index.d.ts +2 -1
  54. package/dist/types/chartType/funnel/zFunnel.d.ts +89 -0
  55. package/dist/types/chartType/heatmap/heatmap.d.ts +4 -89
  56. package/dist/types/chartType/heatmap/index.d.ts +2 -1
  57. package/dist/types/chartType/heatmap/zHeatmap.d.ts +89 -0
  58. package/dist/types/chartType/line/index.d.ts +2 -1
  59. package/dist/types/chartType/line/line.d.ts +8 -1367
  60. package/dist/types/chartType/line/zLine.d.ts +1353 -0
  61. package/dist/types/chartType/pie/index.d.ts +2 -1
  62. package/dist/types/chartType/pie/pie.d.ts +4 -119
  63. package/dist/types/chartType/pie/zPie.d.ts +119 -0
  64. package/dist/types/chartType/pivotTable/index.d.ts +2 -1
  65. package/dist/types/chartType/pivotTable/pivotTable.d.ts +48 -60
  66. package/dist/types/chartType/pivotTable/zPivotTable.d.ts +68 -0
  67. package/dist/types/chartType/radar/index.d.ts +2 -1
  68. package/dist/types/chartType/radar/radar.d.ts +4 -119
  69. package/dist/types/chartType/radar/zRadar.d.ts +119 -0
  70. package/dist/types/chartType/rose/index.d.ts +2 -1
  71. package/dist/types/chartType/rose/rose.d.ts +4 -119
  72. package/dist/types/chartType/rose/zRose.d.ts +119 -0
  73. package/dist/types/chartType/roseParallel/index.d.ts +2 -1
  74. package/dist/types/chartType/roseParallel/roseParallel.d.ts +4 -119
  75. package/dist/types/chartType/roseParallel/zRoseParallel.d.ts +119 -0
  76. package/dist/types/chartType/scatter/index.d.ts +2 -1
  77. package/dist/types/chartType/scatter/scatter.d.ts +4 -1191
  78. package/dist/types/chartType/scatter/zScatter.d.ts +1179 -0
  79. package/dist/types/chartType/table/index.d.ts +2 -1
  80. package/dist/types/chartType/table/table.d.ts +49 -64
  81. package/dist/types/chartType/table/zTable.d.ts +68 -0
  82. package/dist/types/dataSelector/selector.d.ts +70 -16
  83. package/dist/types/properties/analysis/analysis.d.ts +1 -1
  84. package/dist/types/properties/analysis/sort.d.ts +2 -4
  85. package/dist/types/properties/analysis/sortLegend.d.ts +2 -3
  86. package/dist/types/properties/annotation/annotation.d.ts +304 -316
  87. package/dist/types/properties/annotation/annotationArea.d.ts +12 -137
  88. package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +27 -148
  89. package/dist/types/properties/annotation/annotationPoint.d.ts +20 -114
  90. package/dist/types/properties/annotation/annotationVerticalLine.d.ts +6 -127
  91. package/dist/types/properties/annotation/index.d.ts +8 -4
  92. package/dist/types/properties/annotation/zAnnotationArea.d.ts +108 -0
  93. package/dist/types/properties/annotation/zAnnotationHorizontalLine.d.ts +105 -0
  94. package/dist/types/properties/annotation/zAnnotationPoint.d.ts +94 -0
  95. package/dist/types/properties/annotation/zAnnotationVerticalLine.d.ts +105 -0
  96. package/dist/types/properties/config/axes/axis.d.ts +44 -58
  97. package/dist/types/properties/config/axes/bandAxis.d.ts +74 -74
  98. package/dist/types/properties/config/axes/linearAxis.d.ts +76 -76
  99. package/dist/types/properties/config/backgroundColor/backgroundColor.d.ts +1 -1
  100. package/dist/types/properties/config/color/color.d.ts +7 -9
  101. package/dist/types/properties/config/config.d.ts +3288 -3282
  102. package/dist/types/properties/config/crosshair/crosshair.d.ts +14 -17
  103. package/dist/types/properties/config/crosshair/index.d.ts +2 -1
  104. package/dist/types/properties/config/crosshair/zCrosshair.d.ts +15 -0
  105. package/dist/types/properties/config/label/label.d.ts +1 -1
  106. package/dist/types/properties/config/legend/legend.d.ts +13 -17
  107. package/dist/types/properties/config/tooltip/tooltip.d.ts +1 -1
  108. package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +2 -2
  109. package/dist/types/properties/dimensions/dimensions.d.ts +6 -29
  110. package/dist/types/properties/dimensions/index.d.ts +2 -1
  111. package/dist/types/properties/dimensions/zDimensions.d.ts +30 -0
  112. package/dist/types/properties/encoding/encoding.d.ts +8 -8
  113. package/dist/types/properties/markStyle/areaStyle.d.ts +20 -20
  114. package/dist/types/properties/markStyle/barStyle.d.ts +24 -24
  115. package/dist/types/properties/markStyle/lineStyle.d.ts +24 -24
  116. package/dist/types/properties/markStyle/markStyle.d.ts +194 -194
  117. package/dist/types/properties/markStyle/pointStyle.d.ts +35 -35
  118. package/dist/types/properties/measures/measures.d.ts +3 -0
  119. package/dist/types/properties/theme/customTheme.d.ts +3336 -3330
  120. package/dist/types/vseed.d.ts +6734 -6851
  121. package/dist/umd/index.js +1202 -939
  122. package/dist/umd/index.js.map +1 -1
  123. package/package.json +1 -1
@@ -1 +1,2 @@
1
- export * from './table';
1
+ export type * from './table';
2
+ export * from './zTable';
@@ -1,123 +1,108 @@
1
- import { z } from 'zod';
2
1
  import { type Locale } from '../../i18n';
3
2
  import type { DimensionTree, MeasureTree } from '../../properties';
4
3
  import { type BackgroundColor, type Dataset, type Theme } from '../../properties';
5
4
  /**
6
- * 表格类型定义
7
5
  * @description 表格,适用于详细数据展示场景,行列分明,便于查看具体数值
8
6
  * 适用场景:
9
7
  * - 需要展示详细数据明细
10
8
  * - 数据项需要精确比对
11
9
  * - 展示多维度数据属性
10
+ * @warning
12
11
  * 数据要求:
13
12
  * - 至少1个维度字段
14
13
  * - 至少1个度量字段
15
14
  * - 维度字段会作为表格的列标题
16
15
  * 默认开启的功能:
17
16
  * - 默认开启排序、筛选、分页功能
17
+ * @recommend
18
+ * - 推荐字段配置: `任意`个指标, `任意`个维度
19
+ * - 支持数据重塑: 至少`任意`个指标, `任意`个维度
18
20
  */
19
21
  export interface Table {
20
22
  /**
21
- * 表格
22
23
  * @description 标准表格组件,用于展示详细数据
23
24
  * @type {'table'}
24
25
  * @example 'table'
25
26
  */
26
27
  chartType: 'table';
27
28
  /**
28
- * 数据集
29
29
  * @description 符合TidyData规范的且已经聚合的数据集,用于定义图表的数据来源和结构, 用户输入的数据集并不需要进行任何处理, 一个字段对应一列, 一个记录对应一行
30
30
  * @type {Array<Record<string|number, any>>}
31
31
  * @example [{id: 1, name: "A", value: 100}, {id: 2, name: "B", value: 200}]
32
32
  */
33
33
  dataset: Dataset;
34
34
  /**
35
- * 维度
36
35
  * @description 表格的每个维度会对应一列
37
36
  * @type {Dimensions}
38
37
  * @example [{id: "name", alias: "名称"}]
39
38
  */
40
39
  dimensions?: DimensionTree;
41
40
  /**
42
- * 指标
43
41
  * @description 表格的每个指标会对应一行, 并且天生支持指标组合.
44
42
  * @type {Measures}
45
43
  * @example [{id: "value", alias: "数值"}]
46
44
  */
47
45
  measures?: MeasureTree;
48
46
  /**
49
- * 图表的背景颜色
50
47
  * @default transparent 默认为透明背景
51
48
  * @description 背景颜色可以是颜色字符串, 例如'red', 'blue', 也可以是hex, rgb或rgba'#ff0000', 'rgba(255,0,0,0.5)'
52
49
  */
53
50
  backgroundColor?: BackgroundColor;
54
51
  /**
55
- * 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置
52
+ * @description 表格的边框颜色
53
+ */
54
+ borderColor?: string;
55
+ /**
56
+ * @description 表格体的字体大小
57
+ */
58
+ bodyFontSize?: number;
59
+ /**
60
+ * @description 表格体的字体颜色
61
+ */
62
+ bodyFontColor?: string;
63
+ /**
64
+ * @description 表格体的背景颜色
65
+ */
66
+ bodyBackgroundColor?: string;
67
+ /**
68
+ * @description 列表头的字体大小
69
+ */
70
+ headerFontSize?: number;
71
+ /**
72
+ * @description 列表头的字体颜色
73
+ */
74
+ headerFontColor?: string;
75
+ /**
76
+ * @description 列表头的背景颜色
77
+ */
78
+ headerBackgroundColor?: string;
79
+ /**
80
+ * @description 鼠标悬浮在列表头的单元格时的背景颜色, 用于突出显示鼠标所在的单元格
81
+ */
82
+ hoverHeaderBackgroundColor?: string;
83
+ /**
84
+ * @description 鼠标悬浮在列表头的时, 整行的单元格的背景颜色, 用于突出显示鼠标所在的行
85
+ */
86
+ hoverHeaderInlineBackgroundColor?: string;
87
+ /**
88
+ * @description 选中的单元格的边框颜色, 用于突出显示选中的单元格
89
+ */
90
+ selectedBorderColor?: string;
91
+ /**
92
+ * @description 选中的单元格的背景颜色, 用于突出显示选中的单元格
93
+ */
94
+ selectedBackgroundColor?: string;
95
+ /**
56
96
  * @default light 默认为亮色主题
57
- * @description 内置light与dark两种主题, 用户可以通过Builder自定义主题
97
+ * @description 图表的主题, 主题是优先级较低的功能配置, 包含所有图表类型共用的通用配置, 与单类图表类型共用的图表配置, 内置light与dark两种主题, 用户可以通过Builder自定义主题
58
98
  * @example 'dark'
59
99
  * @example 'light'
60
100
  * @example 'customThemeName'
61
101
  */
62
102
  theme?: Theme;
63
103
  /**
64
- * 语言
65
104
  * @description 图表语言配置, 支持'zh-CN'与'en-US'两种语言, 另外可以调用 intl.setLocale('zh-CN') 方法设置语言
66
105
  * @default 'zh-CN'
67
106
  */
68
107
  locale?: Locale;
69
108
  }
70
- export declare const zTable: z.ZodObject<{
71
- chartType: z.ZodLiteral<"table">;
72
- dataset: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>>>;
73
- dimensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
74
- id: z.ZodString;
75
- alias: z.ZodOptional<z.ZodString>;
76
- location: z.ZodDefault<z.ZodEnum<{
77
- dimension: "dimension";
78
- rowDimension: "rowDimension";
79
- columnDimension: "columnDimension";
80
- }>>;
81
- }, z.core.$strip>>>;
82
- measures: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
83
- id: z.ZodString;
84
- alias: z.ZodOptional<z.ZodString>;
85
- autoFormat: z.ZodDefault<z.ZodBoolean>;
86
- format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
87
- type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
88
- number: "number";
89
- percent: "percent";
90
- permille: "permille";
91
- scientific: "scientific";
92
- }>>>;
93
- ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
94
- symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
95
- thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
96
- prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
97
- suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
98
- fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
99
- significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
100
- roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
101
- morePrecision: "morePrecision";
102
- lessPrecision: "lessPrecision";
103
- }>>>;
104
- roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
105
- floor: "floor";
106
- ceil: "ceil";
107
- expand: "expand";
108
- trunc: "trunc";
109
- halfCeil: "halfCeil";
110
- halfFloor: "halfFloor";
111
- halfExpand: "halfExpand";
112
- halfTrunc: "halfTrunc";
113
- halfEven: "halfEven";
114
- }>>>;
115
- }, z.core.$strip>>>;
116
- }, z.core.$strip>]>>>;
117
- backgroundColor: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodString>>>;
118
- theme: z.ZodOptional<z.ZodString>;
119
- locale: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
120
- "zh-CN": "zh-CN";
121
- "en-US": "en-US";
122
- }>>>;
123
- }, z.core.$strip>;
@@ -0,0 +1,68 @@
1
+ import { z } from 'zod';
2
+ export declare const zTable: z.ZodObject<{
3
+ chartType: z.ZodLiteral<"table">;
4
+ dataset: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>>>>;
5
+ dimensions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ alias: z.ZodOptional<z.ZodString>;
8
+ location: z.ZodDefault<z.ZodEnum<{
9
+ dimension: "dimension";
10
+ rowDimension: "rowDimension";
11
+ columnDimension: "columnDimension";
12
+ }>>;
13
+ }, z.core.$strip>>>>;
14
+ measures: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodUnion<[z.ZodType<import("../..").MeasureGroup, unknown, z.core.$ZodTypeInternals<import("../..").MeasureGroup, unknown>>, z.ZodObject<{
15
+ id: z.ZodString;
16
+ alias: z.ZodOptional<z.ZodString>;
17
+ autoFormat: z.ZodDefault<z.ZodBoolean>;
18
+ format: z.ZodDefault<z.ZodOptional<z.ZodObject<{
19
+ type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
20
+ number: "number";
21
+ percent: "percent";
22
+ permille: "permille";
23
+ scientific: "scientific";
24
+ }>>>;
25
+ ratio: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
26
+ symbol: z.ZodOptional<z.ZodDefault<z.ZodString>>;
27
+ thousandSeparator: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
28
+ prefix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
29
+ suffix: z.ZodOptional<z.ZodDefault<z.ZodString>>;
30
+ fractionDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
31
+ significantDigits: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
32
+ roundingPriority: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
33
+ morePrecision: "morePrecision";
34
+ lessPrecision: "lessPrecision";
35
+ }>>>;
36
+ roundingMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
37
+ floor: "floor";
38
+ ceil: "ceil";
39
+ expand: "expand";
40
+ trunc: "trunc";
41
+ halfCeil: "halfCeil";
42
+ halfFloor: "halfFloor";
43
+ halfExpand: "halfExpand";
44
+ halfTrunc: "halfTrunc";
45
+ halfEven: "halfEven";
46
+ }>>>;
47
+ }, z.core.$strip>>>;
48
+ }, z.core.$strip>]>>>>;
49
+ backgroundColor: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>>;
50
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ bodyFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
52
+ bodyFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ bodyBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ hoverBodyBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ hoverBodyInlineBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ headerFontSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
57
+ headerFontColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
+ headerBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ hoverHeaderBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ hoverHeaderInlineBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ selectedBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ selectedBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ theme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ locale: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodEnum<{
65
+ "zh-CN": "zh-CN";
66
+ "en-US": "en-US";
67
+ }>>>>;
68
+ }, z.core.$strip>;
@@ -2,23 +2,77 @@ import { z } from 'zod';
2
2
  import type { Datum } from '../properties';
3
3
  export type ValueSelector = string | number;
4
4
  export type PartialDatumSelector = Datum;
5
+ /**
6
+ * @description 指标选择器, 用于选择数据项中指标字段的值
7
+ */
5
8
  export type MeasureSelector = {
9
+ /**
10
+ * @description 指标字段, measures 某一项的 id
11
+ */
6
12
  field: string;
13
+ /**
14
+ * @description 操作符
15
+ * - =: 选择数据项中指标字段的值等于 value 的数据项
16
+ * - ==: 选择数据项中指标字段的值等于 value 的数据项
17
+ * - !=: 选择数据项中指标字段的值不等于 value 的数据项
18
+ * - >: 选择数据项中指标字段的值大于 value 的数据项
19
+ * - <: 选择数据项中指标字段的值小于 value 的数据项
20
+ * - >=: 选择数据项中指标字段的值大于等于 value 的数据项
21
+ * - <=: 选择数据项中指标字段的值小于等于 value 的数据项
22
+ * - between: 选择数据项中指标字段的值在 value 之间的 data item
23
+ */
7
24
  operator?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between';
25
+ /**
26
+ * @description 操作符
27
+ * - =: 选择数据项中指标字段的值等于 value 的数据项
28
+ * - ==: 选择数据项中指标字段的值等于 value 的数据项
29
+ * - !=: 选择数据项中指标字段的值不等于 value 的数据项
30
+ * - >: 选择数据项中指标字段的值大于 value 的数据项
31
+ * - <: 选择数据项中指标字段的值小于 value 的数据项
32
+ * - >=: 选择数据项中指标字段的值大于等于 value 的数据项
33
+ * - <=: 选择数据项中指标字段的值小于等于 value 的数据项
34
+ * - between: 选择数据项中指标字段的值在 value 之间的 data item
35
+ * same as operator
36
+ */
8
37
  op?: '=' | '==' | '!=' | '>' | '<' | '>=' | '<=' | 'between';
38
+ /**
39
+ * @description 选择数据项中指标字段的值
40
+ * - 仅 op 为 between 时, value 为长度为2的数组, 数组中的元素为指标字段的最小值和最大值
41
+ * - 其他情况, value 为指标字段的单个值
42
+ */
9
43
  value: string | number | Array<string | number>;
10
44
  };
45
+ /**
46
+ * @description 维度选择器, 用于选择数据项中维度字段的值
47
+ */
11
48
  export type DimensionSelector = {
49
+ /**
50
+ * @description 维度字段, dimensions 某一项的 id
51
+ */
12
52
  field: string;
53
+ /**
54
+ * @description 操作符
55
+ * - in: 选择数据项中维度字段的值在 value 中的数据项
56
+ * - not in: 选择数据项中维度字段的值不在 value 中的数据项
57
+ */
13
58
  operator?: 'in' | 'not in';
59
+ /**
60
+ * @description 操作符
61
+ * - in: 选择数据项中维度字段的值在 value 中的数据项
62
+ * - not in: 选择数据项中维度字段的值不在 value 中的数据项
63
+ * same as operator
64
+ */
14
65
  op?: 'in' | 'not in';
66
+ /**
67
+ * @description 选择数据项中维度字段的值, 支持数组
68
+ */
15
69
  value: string | number | Array<string | number>;
16
70
  };
17
71
  export type Selector = ValueSelector | PartialDatumSelector | MeasureSelector | DimensionSelector;
18
72
  export type Selectors = Array<Selector>;
19
73
  export declare const zSelector: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
20
74
  field: z.ZodString;
21
- operator: z.ZodOptional<z.ZodEnum<{
75
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
22
76
  "=": "=";
23
77
  "==": "==";
24
78
  "!=": "!=";
@@ -27,8 +81,8 @@ export declare const zSelector: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z
27
81
  ">=": ">=";
28
82
  "<=": "<=";
29
83
  between: "between";
30
- }>>;
31
- op: z.ZodOptional<z.ZodEnum<{
84
+ }>>>;
85
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
32
86
  "=": "=";
33
87
  "==": "==";
34
88
  "!=": "!=";
@@ -37,23 +91,23 @@ export declare const zSelector: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z
37
91
  ">=": ">=";
38
92
  "<=": "<=";
39
93
  between: "between";
40
- }>>;
94
+ }>>>;
41
95
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
42
96
  }, z.core.$strip>, z.ZodObject<{
43
97
  field: z.ZodString;
44
- operator: z.ZodOptional<z.ZodEnum<{
98
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
45
99
  in: "in";
46
100
  "not in": "not in";
47
- }>>;
48
- op: z.ZodOptional<z.ZodEnum<{
101
+ }>>>;
102
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
49
103
  in: "in";
50
104
  "not in": "not in";
51
- }>>;
105
+ }>>>;
52
106
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
53
107
  }, z.core.$strip>]>;
54
108
  export declare const zSelectors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
55
109
  field: z.ZodString;
56
- operator: z.ZodOptional<z.ZodEnum<{
110
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
57
111
  "=": "=";
58
112
  "==": "==";
59
113
  "!=": "!=";
@@ -62,8 +116,8 @@ export declare const zSelectors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.
62
116
  ">=": ">=";
63
117
  "<=": "<=";
64
118
  between: "between";
65
- }>>;
66
- op: z.ZodOptional<z.ZodEnum<{
119
+ }>>>;
120
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
67
121
  "=": "=";
68
122
  "==": "==";
69
123
  "!=": "!=";
@@ -72,17 +126,17 @@ export declare const zSelectors: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.
72
126
  ">=": ">=";
73
127
  "<=": "<=";
74
128
  between: "between";
75
- }>>;
129
+ }>>>;
76
130
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
77
131
  }, z.core.$strip>, z.ZodObject<{
78
132
  field: z.ZodString;
79
- operator: z.ZodOptional<z.ZodEnum<{
133
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
80
134
  in: "in";
81
135
  "not in": "not in";
82
- }>>;
83
- op: z.ZodOptional<z.ZodEnum<{
136
+ }>>>;
137
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
84
138
  in: "in";
85
139
  "not in": "not in";
86
- }>>;
140
+ }>>>;
87
141
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
88
142
  }, z.core.$strip>]>>;
@@ -1,4 +1,4 @@
1
1
  import { z } from 'zod';
2
2
  export declare const zAnalysis: z.ZodObject<{
3
- orderMapping: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
3
+ orderMapping: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>>;
4
4
  }, z.core.$strip>;
@@ -4,8 +4,8 @@ export declare const zSort: z.ZodObject<{
4
4
  asc: "asc";
5
5
  desc: "desc";
6
6
  }>>;
7
- orderBy: z.ZodOptional<z.ZodString>;
8
- customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
7
+ orderBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ customOrder: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodAny>>>;
9
9
  }, z.core.$strip>;
10
10
  /**
11
11
  * @description 类目轴排序配置, 支持根据维度或指标排序, 以及自定义排序顺序
@@ -19,14 +19,12 @@ export declare const zSort: z.ZodObject<{
19
19
  export type Sort = {
20
20
  /**
21
21
  * @description 排序顺序, 可选值为 'asc' 或 'desc'
22
- * @default 'asc'
23
22
  * @enum ['asc', 'desc']
24
23
  * @example order:'asc'
25
24
  */
26
25
  order?: 'asc' | 'desc';
27
26
  /**
28
27
  * @description 排序依赖的字段, 可以是维度id或指标id
29
- * @default ''
30
28
  * @example
31
29
  * - orderBy:'date'
32
30
  * - orderBy:'profit'
@@ -4,8 +4,8 @@ export declare const zSortLegend: z.ZodObject<{
4
4
  asc: "asc";
5
5
  desc: "desc";
6
6
  }>>;
7
- orderBy: z.ZodOptional<z.ZodString>;
8
- customOrder: z.ZodOptional<z.ZodArray<z.ZodAny>>;
7
+ orderBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ customOrder: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodAny>>>;
9
9
  }, z.core.$strip>;
10
10
  /**
11
11
  * @description 图例排序配置, 支持根据维度或指标排序, 以及自定义排序顺序; 排序数组遵循从左到右或从上到下的顺序
@@ -26,7 +26,6 @@ export type SortLegend = {
26
26
  order?: 'asc' | 'desc';
27
27
  /**
28
28
  * @description 排序依赖的字段, 可以是维度id或指标id
29
- * @default ''
30
29
  * @example
31
30
  * - orderBy:'date'
32
31
  * - orderBy:'profit'