win-chart 2.3.2 → 2.4.0

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 (61) hide show
  1. package/dist/bundle.esm.js +5 -281
  2. package/dist/bundle.esm.js.map +1 -0
  3. package/dist/index.d.ts +1 -183
  4. package/dist/types/components/WinChart.d.ts +3 -0
  5. package/dist/types/index.d.ts +2 -4
  6. package/dist/types/types/index.d.ts +90 -8
  7. package/dist/types/utils/const.d.ts +4 -10
  8. package/dist/types/{components/win-chart/utils → utils}/tool.d.ts +6 -0
  9. package/package.json +8 -10
  10. package/dist/types/api/request.d.ts +0 -25
  11. package/dist/types/components/NoContent.d.ts +0 -11
  12. package/dist/types/components/VisionUserConfigContext.d.ts +0 -3
  13. package/dist/types/components/hover-view.d.ts +0 -11
  14. package/dist/types/components/icon.d.ts +0 -11
  15. package/dist/types/components/panel-title-tab.d.ts +0 -12
  16. package/dist/types/components/win-card/components/ChartContent.d.ts +0 -7
  17. package/dist/types/components/win-card/components/Indicator.d.ts +0 -2
  18. package/dist/types/components/win-card/components/IndicatorArea.d.ts +0 -2
  19. package/dist/types/components/win-card/components/IndicatorInfo.d.ts +0 -11
  20. package/dist/types/components/win-card/components/MatterContent.d.ts +0 -5
  21. package/dist/types/components/win-card/components/MatterList.d.ts +0 -7
  22. package/dist/types/components/win-card/components/SelectDecoration.d.ts +0 -4
  23. package/dist/types/components/win-card/components/WinRankContent.d.ts +0 -1
  24. package/dist/types/components/win-card/index.d.ts +0 -14
  25. package/dist/types/components/win-chart/index.d.ts +0 -3
  26. package/dist/types/components/win-chart/utils/const.d.ts +0 -8
  27. package/dist/types/components/win-icon/index.d.ts +0 -8
  28. package/dist/types/components/win-wrappers/card-wrapper.d.ts +0 -17
  29. package/dist/types/components/win-wrappers/dot-wrapper.d.ts +0 -4
  30. package/dist/types/components/win-wrappers/iframe-wrapper.d.ts +0 -2
  31. package/dist/types/components/win-wrappers/request-wrapper.d.ts +0 -41
  32. package/dist/types/hooks/useCardOptionList.d.ts +0 -2
  33. package/dist/types/hooks/useHasIntersected.d.ts +0 -8
  34. package/dist/types/services/CardService.d.ts +0 -33
  35. package/dist/types/services/IndicatorService.d.ts +0 -19
  36. package/dist/types/services/WorkbenchService.d.ts +0 -17
  37. package/dist/types/types/chart.d.ts +0 -90
  38. package/dist/types/types/enum.d.ts +0 -128
  39. package/dist/types/types/indicator.d.ts +0 -252
  40. package/dist/types/types/interface.d.ts +0 -271
  41. package/dist/types/types/portal.d.ts +0 -180
  42. package/dist/types/types/report.d.ts +0 -25
  43. package/dist/types/types/type.d.ts +0 -9
  44. package/dist/types/types/user.d.ts +0 -26
  45. package/dist/types/utils/arr.d.ts +0 -41
  46. package/dist/types/utils/index.d.ts +0 -10
  47. package/dist/types/utils/init.d.ts +0 -5
  48. package/dist/types/utils/map.d.ts +0 -84
  49. package/dist/types/utils/str.d.ts +0 -12
  50. package/dist/types/utils/url.d.ts +0 -15
  51. package/dist/types/utils/util.d.ts +0 -14
  52. /package/dist/types/components/{win-chart/components/chart-wrapper.d.ts → ChartWrapper.d.ts} +0 -0
  53. /package/dist/types/{components/win-chart/utils → utils}/getAreaSpec.d.ts +0 -0
  54. /package/dist/types/{components/win-chart/utils → utils}/getBarSpec.d.ts +0 -0
  55. /package/dist/types/{components/win-chart/utils → utils}/getChartOptions.d.ts +0 -0
  56. /package/dist/types/{components/win-chart/utils → utils}/getColumnSpec.d.ts +0 -0
  57. /package/dist/types/{components/win-chart/utils → utils}/getDualSpec.d.ts +0 -0
  58. /package/dist/types/{components/win-chart/utils → utils}/getFunnelSpec.d.ts +0 -0
  59. /package/dist/types/{components/win-chart/utils → utils}/getLineSpec.d.ts +0 -0
  60. /package/dist/types/{components/win-chart/utils → utils}/getPieSpec.d.ts +0 -0
  61. /package/dist/types/{components/win-chart/utils → utils}/getRadarSpec.d.ts +0 -0
@@ -1,33 +0,0 @@
1
- import { IIndicatorCardConfig, IListItem } from '@/types';
2
- export declare class CardService {
3
- /**
4
- * 查询卡片配置
5
- * @param request
6
- * @returns
7
- */
8
- static getConfigInfo(id: number): Promise<IIndicatorCardConfig>;
9
- /**
10
- * 新增卡片配置
11
- * @param data
12
- * @returns
13
- */
14
- static addConfigInfo(data: Partial<IIndicatorCardConfig>): Promise<Partial<IIndicatorCardConfig>>;
15
- /**
16
- * 新增卡片配置
17
- * @param data
18
- * @returns
19
- */
20
- static updateConfigInfo(data: Partial<IIndicatorCardConfig>): Promise<Partial<IIndicatorCardConfig>>;
21
- /**
22
- * 查询卡片下拉列表
23
- * @param id
24
- * @returns
25
- */
26
- static queryOptionList(id: number): Promise<IListItem<string>[]>;
27
- /**
28
- * 删除卡片
29
- * @param id
30
- * @returns
31
- */
32
- static delete(id: number): Promise<boolean>;
33
- }
@@ -1,19 +0,0 @@
1
- import { IIndicatorCardConfig, IIndicatorDataInfo } from '@/types';
2
- export declare class IndicatorService {
3
- /**
4
- * 指标服务通用接口
5
- * @param request
6
- * @returns
7
- */
8
- static getConfigInfo(request?: {
9
- url: string;
10
- }): Promise<IIndicatorCardConfig>;
11
- /**
12
- * 指标服务通用接口 List
13
- * @param request
14
- * @returns
15
- */
16
- static getDataInfoList(request?: {
17
- url: string;
18
- }): Promise<IIndicatorDataInfo>;
19
- }
@@ -1,17 +0,0 @@
1
- import { ICnTableData, IMatterInfo, IRankInfo } from '@/types';
2
- export declare class WorkbenchService {
3
- /**
4
- * 获取事项数据
5
- * @returns
6
- */
7
- static getMatterDataList(data?: {
8
- workflowType: string;
9
- currentPage?: number;
10
- pageSize?: number;
11
- }): Promise<ICnTableData<IMatterInfo>>;
12
- /**
13
- * 查询红黑榜单
14
- * @returns
15
- */
16
- static queryWinRankList(): Promise<IRankInfo[]>;
17
- }
@@ -1,90 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * 标准图表数据
4
- */
5
- export interface IChartInfo {
6
- label: string;
7
- value: number;
8
- type?: string;
9
- }
10
- export interface IWinChartProps {
11
- theme?: 'light' | 'dark';
12
- sort?: 'asc' | 'desc';
13
- color?: string[];
14
- chartType?: WinChartType;
15
- xAxisLabelRotate?: number;
16
- xAxisLabelLength?: number;
17
- data?: IChartInfo[];
18
- extraData?: IChartInfo[];
19
- className?: string;
20
- style?: React.CSSProperties;
21
- /**
22
- * label 与 value 取值互换 (只作用饼图、环图、雷达图图表)
23
- */
24
- reserveValueWithLabelType?: boolean;
25
- /**
26
- * Y 轴起始值
27
- */
28
- yStart?: number[];
29
- /**
30
- * 系列配置
31
- */
32
- extraSeriesOption?: echarts.SeriesOption[];
33
- /**
34
- * 自定义配置,优先级最高,会覆盖默认配置(采用deepmerge,只覆盖差异部分)
35
- */
36
- extraOption?: echarts.EChartsOption;
37
- }
38
- /**
39
- * 图表类型
40
- */
41
- export declare enum WinChartType {
42
- /**
43
- * MINI面积图
44
- */
45
- MINI_AREA = 0,
46
- /**
47
- * 面积图
48
- */
49
- AREA = 1,
50
- /**
51
- * 双轴图
52
- */
53
- DUAL_LINE_BAR = 2,
54
- /**
55
- * 堆叠双轴图
56
- */
57
- STACK_DUAL_LINE_BAR = 3,
58
- /**
59
- * 柱状图
60
- */
61
- COLUMN = 4,
62
- /**
63
- * 堆叠柱状图
64
- */
65
- STACK_COLUMN = 5,
66
- /**
67
- * 折线图
68
- */
69
- LINE = 6,
70
- /**
71
- * 条形图
72
- */
73
- BAR = 7,
74
- /**
75
- * 漏斗图
76
- */
77
- FUNNEL = 8,
78
- /**
79
- * 饼图
80
- */
81
- PIE = 9,
82
- /**
83
- * 环形图
84
- */
85
- CYCLE = 10,
86
- /**
87
- * 雷达图
88
- */
89
- RADAR = 11
90
- }
@@ -1,128 +0,0 @@
1
- /**
2
- * 页面操作类型
3
- */
4
- export declare enum OperateType {
5
- /**
6
- * 默认
7
- */
8
- NONE = "none",
9
- /**
10
- * 添加
11
- */
12
- ADD = "add",
13
- /**
14
- * 复制
15
- */
16
- COPY = "copy",
17
- /**
18
- * 编辑
19
- */
20
- EDIT = "edit",
21
- /**
22
- * 查看
23
- */
24
- VIEW = "view",
25
- /**
26
- * 删除
27
- */
28
- DELETE = "delete",
29
- /**
30
- * 反馈
31
- */
32
- FEEDBACK = "feedback",
33
- /**
34
- * 追评
35
- */
36
- REVIEW = "review",
37
- /**
38
- * 批量导入
39
- */
40
- BATCH_ADD = "batch_add",
41
- /**
42
- * 批量操作
43
- */
44
- BATCH_OPERATE = "batch_operate",
45
- /**
46
- * 授权
47
- */
48
- AUTHORIZED = "authorized"
49
- }
50
- export declare enum WinCardChartType {
51
- /**
52
- * 指标卡片
53
- */
54
- INDICATOR = "INDICATOR",
55
- /**
56
- * 指标加面积图
57
- */
58
- INDICATOR_AREA = "INDICATOR_AREA",
59
- /**
60
- * 指标加面积图
61
- */
62
- AREA_CHART = "AREA_CHART",
63
- /**
64
- * 折线图卡片
65
- */
66
- LINE_CHART = "LINE_CHART",
67
- /**
68
- * 柱状图
69
- */
70
- COLUMN_CHART = "COLUMN_CHART",
71
- /**
72
- * 堆叠柱状图
73
- */
74
- STACK_COLUMN_CHART = "STACK_COLUMN_CHART",
75
- /**
76
- * 条形图
77
- */
78
- BAR_CHART = "BAR_CHART",
79
- /**
80
- * 双轴图
81
- */
82
- DUAL_LINE_BAR_CHART = "DUAL_LINE_COLUMN_CHART",
83
- /**
84
- * 漏斗图
85
- */
86
- FUNNEL_CHART = "FUNNEL_CHART",
87
- /**
88
- * 饼图
89
- */
90
- PIE_CHART = "PIE_CHART",
91
- /**
92
- * 饼图(以指标项展示)
93
- */
94
- PIE_CHART_RESERVE = "PIE_CHART_RESERVE",
95
- /**
96
- * 环图
97
- */
98
- CYCLE_CHART = "CYCLE_CHART",
99
- /**
100
- * 雷达图
101
- */
102
- RADAR_CHART = "RADAR_CHART",
103
- /**
104
- * 雷达图(以指标项展示)
105
- */
106
- RADAR_CHART_RESERVE = "RADAR_CHART_RESERVE",
107
- /**
108
- * 自定义卡片
109
- */
110
- CUSTOM_CARD = "CUSTOM_CARD"
111
- }
112
- /**
113
- * 事项类别
114
- */
115
- export declare enum MatterType {
116
- /**
117
- * 待办
118
- */
119
- PENDING = "PENDING",
120
- /**
121
- * 我发出的
122
- */
123
- CREATE = "CREATE",
124
- /**
125
- * 已办事项
126
- */
127
- COMPLETE = "COMPLETE"
128
- }
@@ -1,252 +0,0 @@
1
- import { IChartInfo } from './chart';
2
- import { WinCardChartType } from './enum';
3
- import { IListItem } from './interface';
4
- import { WinCardStatus } from './type';
5
- export type IndicatorLabel = 'OKR' | 'CORE' | 'ORDINARY';
6
- interface IIndicatorConfig {
7
- id: number;
8
- /**
9
- * 单位
10
- */
11
- unit: string;
12
- /**
13
- * 指标所在侧 0 左 1 右
14
- */
15
- yAxis: number;
16
- /**
17
- * 指标别名
18
- */
19
- alias?: string;
20
- /**
21
- * 是否堆叠
22
- */
23
- isStack?: boolean;
24
- extra?: {
25
- /**
26
- * 默认 0 日期 0 目标 1
27
- */
28
- subTitle: number;
29
- };
30
- }
31
- export type IndicatorCardSize = 'min' | 'medium' | 'max';
32
- export interface IIndicatorCardConfig {
33
- subscribed?: boolean;
34
- name: string;
35
- id: number;
36
- type: string;
37
- dataAccCode: string;
38
- /**
39
- * 业务分类
40
- */
41
- bizCode: string;
42
- /**
43
- * 卡片类型
44
- */
45
- chartType: WinCardChartType;
46
- /**
47
- * 占多少个网格
48
- */
49
- colWidth: number;
50
- colHeight: number;
51
- description: string;
52
- detailUrl: string;
53
- status: WinCardStatus;
54
- /**
55
- * 排序
56
- */
57
- rankOrder: number;
58
- commonConfig: {
59
- orgLevel: string;
60
- labelField: string;
61
- limit: number;
62
- color?: string[];
63
- yStart?: number[];
64
- xAxisLabelRotate?: number;
65
- xAxisLabelLength?: number;
66
- sort?: 'asc' | 'desc';
67
- };
68
- indicatorConfig: IIndicatorConfig[];
69
- sizeMap: {
70
- min: [1, 2];
71
- medium: [1, 4];
72
- max: [2, 4];
73
- };
74
- size: IndicatorCardSize;
75
- }
76
- interface IIndicatorListInfo extends IChartInfo {
77
- indicatorId: number;
78
- }
79
- export interface IIndicatorDataInfo {
80
- indicator?: {
81
- instanceId: number;
82
- date: string;
83
- value: string;
84
- expected: string;
85
- };
86
- list0?: IChartInfo[];
87
- list1?: IIndicatorListInfo[];
88
- }
89
- export interface IIndicatorInfo {
90
- /**
91
- * 指标 ID
92
- */
93
- indicatorId: number;
94
- /**
95
- * 指标 Code
96
- */
97
- indicatorCode: string;
98
- /**
99
- * 指标名称
100
- */
101
- indicatorName: string;
102
- /**
103
- * 指标标签
104
- */
105
- indicatorLabel: 'OKR' | 'CORE' | 'ORDINARY';
106
- indicatorType: string;
107
- /**
108
- * 指标内部筛选默认名称
109
- */
110
- selectLabel: string;
111
- /**
112
- * 内部下拉选项值
113
- */
114
- valueCode: string;
115
- /**
116
- * 值
117
- */
118
- value: number;
119
- /**
120
- * 统计时间
121
- */
122
- date: string;
123
- /**
124
- * 目标值
125
- */
126
- expectValue: number;
127
- /**
128
- * 目标达成率
129
- */
130
- ratio: number;
131
- /**
132
- * 是否订阅
133
- */
134
- followed: boolean;
135
- /**
136
- * 模版 有目标值 1 无目标值 2
137
- */
138
- cardTemplate: '1' | '2';
139
- /**
140
- * 指标实例说明
141
- */
142
- desc: string;
143
- /**
144
- * 单位
145
- */
146
- unit?: string;
147
- /**
148
- * 数据字典名称
149
- */
150
- name: string;
151
- /**
152
- * 展示名称(分层)
153
- */
154
- label: string;
155
- /**
156
- * 偏差值
157
- */
158
- diffValue: number;
159
- /**
160
- * 同比
161
- */
162
- yearCompare: number;
163
- /**
164
- * 周期环比
165
- */
166
- chain: number;
167
- /**
168
- * 日环比
169
- */
170
- dod: number;
171
- /**
172
- * 是否可以下钻
173
- */
174
- downShow: boolean;
175
- downId: number;
176
- downName: string;
177
- downType: string;
178
- uniqueCode: string;
179
- }
180
- export interface IBizTotal {
181
- label: string;
182
- area?: number;
183
- income: number;
184
- cost: number;
185
- }
186
- export interface IShowData {
187
- code: string;
188
- type: string;
189
- value1: IIndicatorInfo[];
190
- value2: IIndicatorInfo[];
191
- }
192
- export interface IRiskInfo {
193
- riskId: string;
194
- riskLevel: string;
195
- riskLevelDesc: string;
196
- riskDescription: string;
197
- statusDesc: string;
198
- parkName: string;
199
- name: string;
200
- time: string;
201
- statusCode: string;
202
- }
203
- export interface IRegionInfo {
204
- region: string;
205
- operatingProjectArea: string;
206
- operatingProjectCnt: string;
207
- progressProjectArea: string;
208
- progressProjectCnt: string;
209
- }
210
- export interface IIndicatorTableDataQuery {
211
- level?: string;
212
- name?: string;
213
- subId?: number;
214
- type?: string;
215
- }
216
- /**
217
- * 指标中心详情而信息
218
- */
219
- export interface IIndicatorDetailsInfo {
220
- style: 1 | 2;
221
- name: string;
222
- desc: string;
223
- listValue: IIndicatorInfo[];
224
- timeValue: IListItem<number>[];
225
- dimension: string;
226
- targetShow: boolean;
227
- downId?: number;
228
- unit: string;
229
- }
230
- export interface IIndicatorInfoQuery {
231
- subId?: number | string;
232
- name?: string;
233
- type?: string;
234
- indicatorDate?: string;
235
- originId?: number | string;
236
- }
237
- export interface IIndicatorChangeInfo {
238
- code: string;
239
- name: string;
240
- value: string;
241
- unit: string;
242
- diff: string;
243
- children: IIndicatorChangeInfo[];
244
- key: string;
245
- url?: string;
246
- }
247
- export interface IIndicatorMsgChangeInfo {
248
- lastVisitDay: string;
249
- msg: string;
250
- indicators: IIndicatorChangeInfo[];
251
- }
252
- export {};