g-ui-web 1.4.44 → 1.4.45

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.
@@ -35,8 +35,8 @@ declare const GRankingList: ({
35
35
  }>> & Readonly<{}>, {
36
36
  props: {
37
37
  readonly type: string;
38
- readonly icon: boolean;
39
38
  readonly sort: string;
39
+ readonly icon: boolean;
40
40
  readonly description: string;
41
41
  readonly index: number;
42
42
  readonly dbOptions: Record<string, any>;
@@ -46,8 +46,8 @@ declare const GRankingList: ({
46
46
  rankingListRef: globalThis.Ref<null, null>;
47
47
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
48
48
  type: string;
49
- icon: boolean;
50
49
  sort: string;
50
+ icon: boolean;
51
51
  description: string;
52
52
  index: number;
53
53
  dbOptions: Record<string, any>;
@@ -96,8 +96,8 @@ declare const GRankingList: ({
96
96
  }>> & Readonly<{}>, {
97
97
  props: {
98
98
  readonly type: string;
99
- readonly icon: boolean;
100
99
  readonly sort: string;
100
+ readonly icon: boolean;
101
101
  readonly description: string;
102
102
  readonly index: number;
103
103
  readonly dbOptions: Record<string, any>;
@@ -107,8 +107,8 @@ declare const GRankingList: ({
107
107
  rankingListRef: globalThis.Ref<null, null>;
108
108
  }, {}, {}, {}, {
109
109
  type: string;
110
- icon: boolean;
111
110
  sort: string;
111
+ icon: boolean;
112
112
  description: string;
113
113
  index: number;
114
114
  dbOptions: Record<string, any>;
@@ -154,8 +154,8 @@ declare const GRankingList: ({
154
154
  }>> & Readonly<{}>, {
155
155
  props: {
156
156
  readonly type: string;
157
- readonly icon: boolean;
158
157
  readonly sort: string;
158
+ readonly icon: boolean;
159
159
  readonly description: string;
160
160
  readonly index: number;
161
161
  readonly dbOptions: Record<string, any>;
@@ -165,8 +165,8 @@ declare const GRankingList: ({
165
165
  rankingListRef: globalThis.Ref<null, null>;
166
166
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
167
167
  type: string;
168
- icon: boolean;
169
168
  sort: string;
169
+ icon: boolean;
170
170
  description: string;
171
171
  index: number;
172
172
  dbOptions: Record<string, any>;
@@ -52,8 +52,8 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
52
52
  }>, {
53
53
  props: {
54
54
  readonly type: string;
55
- readonly icon: boolean;
56
55
  readonly sort: string;
56
+ readonly icon: boolean;
57
57
  readonly description: string;
58
58
  readonly index: number;
59
59
  readonly dbOptions: Record<string, any>;
@@ -96,8 +96,8 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
96
96
  };
97
97
  }>> & Readonly<{}>, {
98
98
  type: string;
99
- icon: boolean;
100
99
  sort: string;
100
+ icon: boolean;
101
101
  description: string;
102
102
  index: number;
103
103
  dbOptions: Record<string, any>;
@@ -30,8 +30,8 @@ declare const GRankingTable: ({
30
30
  };
31
31
  }>> & Readonly<{}>, {
32
32
  props: {
33
- readonly icon: boolean;
34
33
  readonly sort: string;
34
+ readonly icon: boolean;
35
35
  readonly description: string;
36
36
  readonly dbOptions: Record<string, any>;
37
37
  readonly limit: number;
@@ -40,8 +40,8 @@ declare const GRankingTable: ({
40
40
  };
41
41
  rankingTableRef: globalThis.Ref<null, null>;
42
42
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
43
- icon: boolean;
44
43
  sort: string;
44
+ icon: boolean;
45
45
  description: string;
46
46
  dbOptions: Record<string, any>;
47
47
  limit: number;
@@ -85,8 +85,8 @@ declare const GRankingTable: ({
85
85
  };
86
86
  }>> & Readonly<{}>, {
87
87
  props: {
88
- readonly icon: boolean;
89
88
  readonly sort: string;
89
+ readonly icon: boolean;
90
90
  readonly description: string;
91
91
  readonly dbOptions: Record<string, any>;
92
92
  readonly limit: number;
@@ -95,8 +95,8 @@ declare const GRankingTable: ({
95
95
  };
96
96
  rankingTableRef: globalThis.Ref<null, null>;
97
97
  }, {}, {}, {}, {
98
- icon: boolean;
99
98
  sort: string;
99
+ icon: boolean;
100
100
  description: string;
101
101
  dbOptions: Record<string, any>;
102
102
  limit: number;
@@ -137,8 +137,8 @@ declare const GRankingTable: ({
137
137
  };
138
138
  }>> & Readonly<{}>, {
139
139
  props: {
140
- readonly icon: boolean;
141
140
  readonly sort: string;
141
+ readonly icon: boolean;
142
142
  readonly description: string;
143
143
  readonly dbOptions: Record<string, any>;
144
144
  readonly limit: number;
@@ -147,8 +147,8 @@ declare const GRankingTable: ({
147
147
  };
148
148
  rankingTableRef: globalThis.Ref<null, null>;
149
149
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
150
- icon: boolean;
151
150
  sort: string;
151
+ icon: boolean;
152
152
  description: string;
153
153
  dbOptions: Record<string, any>;
154
154
  limit: number;
@@ -45,8 +45,8 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
45
45
  };
46
46
  }>, {
47
47
  props: {
48
- readonly icon: boolean;
49
48
  readonly sort: string;
49
+ readonly icon: boolean;
50
50
  readonly description: string;
51
51
  readonly dbOptions: Record<string, any>;
52
52
  readonly limit: number;
@@ -84,8 +84,8 @@ declare const __VLS_component: import('vue').DefineComponent<globalThis.ExtractP
84
84
  default: string;
85
85
  };
86
86
  }>> & Readonly<{}>, {
87
- icon: boolean;
88
87
  sort: string;
88
+ icon: boolean;
89
89
  description: string;
90
90
  dbOptions: Record<string, any>;
91
91
  limit: number;
@@ -28,11 +28,11 @@ declare const GTargetDeviation: ({
28
28
  props: any;
29
29
  targetDeviationRef: globalThis.Ref<null, null>;
30
30
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
31
+ max: string;
31
32
  type: string;
32
33
  size: string;
33
34
  dbOptions: Record<string, any>;
34
35
  tooltip: unknown[];
35
- max: string;
36
36
  min: string;
37
37
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
38
38
  P: {};
@@ -70,11 +70,11 @@ declare const GTargetDeviation: ({
70
70
  props: any;
71
71
  targetDeviationRef: globalThis.Ref<null, null>;
72
72
  }, {}, {}, {}, {
73
+ max: string;
73
74
  type: string;
74
75
  size: string;
75
76
  dbOptions: Record<string, any>;
76
77
  tooltip: unknown[];
77
- max: string;
78
78
  min: string;
79
79
  }>;
80
80
  __isFragment?: never;
@@ -109,11 +109,11 @@ declare const GTargetDeviation: ({
109
109
  props: any;
110
110
  targetDeviationRef: globalThis.Ref<null, null>;
111
111
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
112
+ max: string;
112
113
  type: string;
113
114
  size: string;
114
115
  dbOptions: Record<string, any>;
115
116
  tooltip: unknown[];
116
- max: string;
117
117
  min: string;
118
118
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin) & Record<string, any>;
119
119
  export default GTargetDeviation;
@@ -52,11 +52,11 @@ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropType
52
52
  default: () => {};
53
53
  };
54
54
  }>> & Readonly<{}>, {
55
+ max: string;
55
56
  type: string;
56
57
  size: string;
57
58
  dbOptions: Record<string, any>;
58
59
  tooltip: unknown[];
59
- max: string;
60
60
  min: string;
61
61
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
62
62
  export default _default;
@@ -54,4 +54,66 @@ export declare const typeIsEmpty: (item: any) => boolean;
54
54
  export default class ExportTable {
55
55
  constructor(exportConfig: any, searchParam: any[], header: any);
56
56
  }
57
+ /**
58
+ * 单位配置项
59
+ */
60
+ interface UnitConfig {
61
+ field: string;
62
+ unit: string;
63
+ }
64
+ /**
65
+ * 单位处理结果
66
+ */
67
+ interface UnitResult {
68
+ data: Record<string, any>[];
69
+ unitMap: Record<string, string>;
70
+ }
71
+ /**
72
+ * 合计配置
73
+ */
74
+ interface SummaryConfig {
75
+ sumFields: string[];
76
+ avgFields?: string[];
77
+ labelField?: string;
78
+ labelText?: string;
79
+ }
80
+ /**
81
+ * 单位处理函数
82
+ * @param data 原始数据数组
83
+ * @param unitConfigs 单位配置数组
84
+ * @param options.inferBy 推断方式:'avg' 按平均值(默认),'max' 按最大值
85
+ * @returns 处理后的数据和单位映射
86
+ */
87
+ export declare const formatUnit: (data: Record<string, any>[], unitConfigs: UnitConfig[], options?: {
88
+ inferBy?: "avg" | "max";
89
+ }) => UnitResult;
90
+ /**
91
+ * 同比计算函数
92
+ * @param data 原始数据数组
93
+ * @param config 配置项
94
+ * @returns 添加同比结果的数据数组
95
+ */
96
+ export declare const calcYearOverYear: (data: Record<string, any>[], config: {
97
+ timeField: string;
98
+ valueFields: string[];
99
+ }) => Record<string, any>[];
100
+ /**
101
+ * 环比计算函数
102
+ * @param data 原始数据数组
103
+ * @param config 配置项
104
+ * @returns 添加环比结果的数据数组
105
+ */
106
+ export declare const calcPeriodOverPeriod: (data: Record<string, any>[], config: {
107
+ timeField: string;
108
+ valueFields: string[];
109
+ }) => Record<string, any>[];
110
+ /**
111
+ * 合计计算函数
112
+ * @param data 原始数据数组
113
+ * @param config 合计配置
114
+ * @returns 添加合计行的数据数组
115
+ * @note sumFields 仅适用于可累加的数值字段(如金额、数量等)
116
+ * 百分比、比率类字段请使用 avgFields 求平均,不可放入 sumFields 求和
117
+ */
118
+ export declare const calcSummary: (data: Record<string, any>[], config: SummaryConfig) => Record<string, any>[];
57
119
  export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "g-ui-web",
3
3
  "private": false,
4
4
  "description": "可视化组件库",
5
- "version": "1.4.44",
5
+ "version": "1.4.45",
6
6
  "author": "wyu",
7
7
  "license": "MIT",
8
8
  "type": "module",