win-chart 1.0.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.
- package/.eslintrc.json +3 -0
- package/.prettierrc.json +5 -0
- package/README.md +0 -0
- package/localhost-key.pem +28 -0
- package/localhost.pem +25 -0
- package/package.json +65 -0
- package/rsbuild.config.ts +48 -0
- package/src/api/README.md +15 -0
- package/src/api/index.js +5 -0
- package/src/api/layout/index.js +32 -0
- package/src/api/request.ts +87 -0
- package/src/api/url-map/index.js +10 -0
- package/src/api/user/index.js +12 -0
- package/src/components/FilterContext.tsx +6 -0
- package/src/components/GlobalStyle.tsx +25 -0
- package/src/components/HalfScreenBrowser.tsx +95 -0
- package/src/components/ImgBox.tsx +19 -0
- package/src/components/JumpBtn.tsx +38 -0
- package/src/components/MCardWrapper.tsx +33 -0
- package/src/components/NoContent/index.tsx +85 -0
- package/src/components/ResponsiveReactGridLayout.tsx +218 -0
- package/src/components/SliderDecoration.tsx +27 -0
- package/src/components/VisionUserConfigContext.ts +6 -0
- package/src/components/WinMenu/README.md +11 -0
- package/src/components/WinMenu/WinHeader.tsx +5 -0
- package/src/components/WinMenu/components/ExtraBox.tsx +61 -0
- package/src/components/WinMenu/components/FullMenuBox.tsx +80 -0
- package/src/components/WinMenu/components/FullMenuContainer.tsx +50 -0
- package/src/components/WinMenu/components/FullMenuItem.tsx +128 -0
- package/src/components/WinMenu/components/LangSwitch.tsx +84 -0
- package/src/components/WinMenu/components/LogoBox.tsx +29 -0
- package/src/components/WinMenu/components/PinDialog.tsx +72 -0
- package/src/components/WinMenu/components/PinnedMenuBox.tsx +183 -0
- package/src/components/WinMenu/components/UserBox.tsx +83 -0
- package/src/components/WinMenu/hooks/useUserInfo.ts +21 -0
- package/src/components/WinMenu/hooks/useUserMenu.ts +35 -0
- package/src/components/WinMenu/index.tsx +100 -0
- package/src/components/WinMenu/services/WinService.ts +79 -0
- package/src/components/WinMenu/services/request.ts +53 -0
- package/src/components/WinMenu/utils/const.ts +80 -0
- package/src/components/WinMenu/utils/enum.ts +19 -0
- package/src/components/WinMenu/utils/interface.ts +61 -0
- package/src/components/WinMenu/utils/map.ts +39 -0
- package/src/components/WinMenu/utils/tool.ts +142 -0
- package/src/components/WinMenu/utils/type.ts +1 -0
- package/src/components/hover-view.tsx +48 -0
- package/src/components/icon.tsx +44 -0
- package/src/components/indicator-remark.tsx +25 -0
- package/src/components/none-content.tsx +93 -0
- package/src/components/panel-tab.tsx +150 -0
- package/src/components/panel-title-tab.tsx +60 -0
- package/src/components/win-card/components/ChartContent.tsx +47 -0
- package/src/components/win-card/components/Indicator.tsx +42 -0
- package/src/components/win-card/components/IndicatorArea.tsx +63 -0
- package/src/components/win-card/components/IndicatorInfo.tsx +78 -0
- package/src/components/win-card/components/MatterContent.tsx +121 -0
- package/src/components/win-card/components/MatterList.tsx +141 -0
- package/src/components/win-card/components/NoticeContent.tsx +73 -0
- package/src/components/win-card/components/NoticeList.tsx +68 -0
- package/src/components/win-card/components/SelectDecoration.tsx +34 -0
- package/src/components/win-card/components/WinRankContent.tsx +102 -0
- package/src/components/win-card/index.tsx +298 -0
- package/src/components/win-card/utils/interface.ts +12 -0
- package/src/components/win-card/utils/tool.ts +11 -0
- package/src/components/win-card-mobile/components/ChartContent.tsx +47 -0
- package/src/components/win-card-mobile/components/DualLineBar.tsx +61 -0
- package/src/components/win-card-mobile/components/Indicator.tsx +42 -0
- package/src/components/win-card-mobile/components/IndicatorArea.tsx +65 -0
- package/src/components/win-card-mobile/components/IndicatorInfo.tsx +83 -0
- package/src/components/win-card-mobile/components/SelectDecoration.tsx +28 -0
- package/src/components/win-card-mobile/index.tsx +235 -0
- package/src/components/win-card-mobile/utils/interface.ts +12 -0
- package/src/components/win-card-mobile/utils/tool.ts +9 -0
- package/src/components/win-chart/components/chart-wrapper.tsx +5 -0
- package/src/components/win-chart/index.tsx +59 -0
- package/src/components/win-chart/theme/win-dark.json +372 -0
- package/src/components/win-chart/theme/win-light.json +372 -0
- package/src/components/win-chart/utils/const.ts +37 -0
- package/src/components/win-chart/utils/getAreaSpec.ts +150 -0
- package/src/components/win-chart/utils/getBarSpec.ts +60 -0
- package/src/components/win-chart/utils/getChartOptions.ts +59 -0
- package/src/components/win-chart/utils/getColumnSpec.ts +112 -0
- package/src/components/win-chart/utils/getDualSpec.ts +79 -0
- package/src/components/win-chart/utils/getFunnelSpec.ts +70 -0
- package/src/components/win-chart/utils/getLineSpec.ts +53 -0
- package/src/components/win-chart/utils/getPieSpec.ts +124 -0
- package/src/components/win-chart/utils/getRadarSpec.ts +87 -0
- package/src/components/win-chart/utils/tool.ts +163 -0
- package/src/components/win-chart/utils/type.ts +96 -0
- package/src/components/win-icon/index.tsx +97 -0
- package/src/components/win-v/components/EmptyBox.tsx +9 -0
- package/src/components/win-v/components/VDialog.tsx +173 -0
- package/src/components/win-v/components/VDialogBtn.tsx +119 -0
- package/src/components/win-v/components/VDialogMsg.tsx +325 -0
- package/src/components/win-v/components/VInput.tsx +15 -0
- package/src/components/win-v/components/VRemindMsgList.tsx +303 -0
- package/src/components/win-v/components/VRobot.tsx +97 -0
- package/src/components/win-v/hooks/useVDialogCore.ts +102 -0
- package/src/components/win-v/hooks/useVDialogOperate.ts +132 -0
- package/src/components/win-v/hooks/useVDialogState.ts +52 -0
- package/src/components/win-v/hooks/useVRemindMsgShow.ts +15 -0
- package/src/components/win-v/index.tsx +205 -0
- package/src/components/win-wrappers/card-wrapper.tsx +103 -0
- package/src/components/win-wrappers/dot-wrapper.tsx +18 -0
- package/src/components/win-wrappers/iframe-wrapper.tsx +7 -0
- package/src/components/win-wrappers/request-wrapper.tsx +190 -0
- package/src/global.d.ts +53 -0
- package/src/hooks/useCardOptionList.ts +23 -0
- package/src/hooks/useCostFiltersDicList.ts +22 -0
- package/src/hooks/useFbiUrl.ts +22 -0
- package/src/hooks/useHalfScreenState.ts +50 -0
- package/src/hooks/useHasIntersected.ts +36 -0
- package/src/hooks/useIndicatorCardInfo.ts +26 -0
- package/src/hooks/useIndicatorCardQueryList.ts +22 -0
- package/src/hooks/useIndicatorClassifyList.ts +25 -0
- package/src/hooks/useIndicatorDetailsDateList.ts +22 -0
- package/src/hooks/useIndicatorDetailsInfo.ts +49 -0
- package/src/hooks/useIndicatorDetailsTrend.ts +25 -0
- package/src/hooks/useIndicatorDicList.ts +22 -0
- package/src/hooks/useIndicatorLabelList.ts +20 -0
- package/src/hooks/useIndicatorList.ts +24 -0
- package/src/hooks/useIndicatorRangeList.ts +20 -0
- package/src/hooks/useIndicatorTypeList.ts +20 -0
- package/src/hooks/useIndicatorUnitList.ts +21 -0
- package/src/hooks/useListenQuery.ts +29 -0
- package/src/hooks/useMobile.ts +58 -0
- package/src/hooks/useNotice.ts +42 -0
- package/src/hooks/useOrgLevelList.ts +23 -0
- package/src/hooks/usePageSelection.ts +121 -0
- package/src/hooks/usePageState.ts +22 -0
- package/src/hooks/usePendingList.ts +27 -0
- package/src/hooks/usePortalPageInfo.ts +43 -0
- package/src/hooks/useRefreshByLocationChange.ts +16 -0
- package/src/hooks/useReportIndicatorList.ts +21 -0
- package/src/hooks/useReportInfo.ts +45 -0
- package/src/hooks/useReportPersonList.ts +21 -0
- package/src/hooks/useScriptLoader.ts +22 -0
- package/src/hooks/useUnreadMsgList.ts +26 -0
- package/src/hooks/useUserAvatar.ts +23 -0
- package/src/hooks/useVReportInfo.ts +50 -0
- package/src/hooks/useVisionUserConfig.ts +25 -0
- package/src/hooks/useWorkbenchOptions.ts +63 -0
- package/src/index.tsx +20 -0
- package/src/services/CardService.ts +91 -0
- package/src/services/CommonService.ts +23 -0
- package/src/services/CostService.ts +56 -0
- package/src/services/DialogService.ts +74 -0
- package/src/services/IndicatorService.ts +406 -0
- package/src/services/PageService.ts +204 -0
- package/src/services/ReportService.ts +335 -0
- package/src/services/WorkbenchService.ts +411 -0
- package/src/styles/README.md +12 -0
- package/src/styles/index.scss +9 -0
- package/src/styles/mixins/index.scss +25 -0
- package/src/styles/next-cover.scss +4 -0
- package/src/styles/normalize.scss +27 -0
- package/src/styles/utilities/index.scss +5 -0
- package/src/styles/vars/index.scss +17 -0
- package/src/types/enum-workbench.ts +29 -0
- package/src/types/enum.ts +156 -0
- package/src/types/index.ts +19 -0
- package/src/types/indicator.ts +299 -0
- package/src/types/interface.ts +303 -0
- package/src/types/portal.ts +211 -0
- package/src/types/report.ts +28 -0
- package/src/types/type.ts +11 -0
- package/src/types/user.ts +28 -0
- package/src/utils/README.md +4 -0
- package/src/utils/arms.ts +59 -0
- package/src/utils/arr.ts +123 -0
- package/src/utils/const-workbench.ts +9 -0
- package/src/utils/const.ts +18 -0
- package/src/utils/index.ts +18 -0
- package/src/utils/init.ts +5 -0
- package/src/utils/map-workbench.ts +66 -0
- package/src/utils/map.ts +377 -0
- package/src/utils/number.ts +101 -0
- package/src/utils/page.ts +81 -0
- package/src/utils/str.ts +26 -0
- package/src/utils/tools.ts +44 -0
- package/src/utils/tree.ts +145 -0
- package/src/utils/url.ts +40 -0
- package/src/utils/util.ts +99 -0
- package/src/utils/workbench.ts +25 -0
- package/tsconfig.json +33 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export interface ITreeNode {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
children?: ITreeNode[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 树形递归查找
|
|
8
|
+
* @param tree
|
|
9
|
+
* @param fn
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export function treeFind<T extends ITreeNode>(
|
|
13
|
+
tree: T[],
|
|
14
|
+
fn: (item: T) => boolean,
|
|
15
|
+
): T | undefined {
|
|
16
|
+
if (Array.isArray(tree)) {
|
|
17
|
+
for (const item of tree) {
|
|
18
|
+
if (fn(item)) {
|
|
19
|
+
return item;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (item.children) {
|
|
23
|
+
const res = treeFind(item.children as any, fn);
|
|
24
|
+
if (res) {
|
|
25
|
+
return res;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 树型转平面结构
|
|
36
|
+
* @param tree
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export function treeFlatToArr<T extends ITreeNode>(tree: T[]) {
|
|
40
|
+
const outArr: T[] = [];
|
|
41
|
+
|
|
42
|
+
const treeFlat = (tree: ITreeNode[], outArr: ITreeNode[]) => {
|
|
43
|
+
for (const item of tree) {
|
|
44
|
+
outArr.push(item);
|
|
45
|
+
if (item.children) {
|
|
46
|
+
treeFlat(item.children, outArr);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
treeFlat(tree, outArr);
|
|
52
|
+
|
|
53
|
+
return outArr;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 查找某个节点 value 值集合
|
|
58
|
+
* @param tree
|
|
59
|
+
* @param key
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
export function getChildrenValueList<T extends ITreeNode>(
|
|
63
|
+
tree: T[],
|
|
64
|
+
key: string,
|
|
65
|
+
) {
|
|
66
|
+
const item = treeFind(tree, (item) => item.value === key);
|
|
67
|
+
if (item) {
|
|
68
|
+
const childrenArrList = treeFlatToArr([item]);
|
|
69
|
+
return childrenArrList.map((item) => item.value);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return [];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 获取树型结构中某个字段值集合
|
|
77
|
+
* @param {*} arr
|
|
78
|
+
* @param {*} key
|
|
79
|
+
*/
|
|
80
|
+
export function getListValueByKey<T extends ITreeNode>(arr: T[], key: string) {
|
|
81
|
+
const data = arr.map((item) => {
|
|
82
|
+
let tempArr: T[] = [];
|
|
83
|
+
if (item.children) {
|
|
84
|
+
tempArr = getListValueByKey(item.children, key);
|
|
85
|
+
}
|
|
86
|
+
return [item[key], ...tempArr];
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return data.flat();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 树型映射
|
|
94
|
+
* @param tree
|
|
95
|
+
* @param fn
|
|
96
|
+
* @returns
|
|
97
|
+
*/
|
|
98
|
+
export function treeMap<T extends ITreeNode>(
|
|
99
|
+
tree: T[],
|
|
100
|
+
fn: (tree: T) => ITreeNode,
|
|
101
|
+
) {
|
|
102
|
+
if (Array.isArray(tree)) {
|
|
103
|
+
return tree.map((item) => {
|
|
104
|
+
const newItem = fn(item);
|
|
105
|
+
if (item.children) {
|
|
106
|
+
newItem.children = treeMap(item.children as any, fn);
|
|
107
|
+
}
|
|
108
|
+
return newItem as T;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 数组转换成下拉列表
|
|
117
|
+
* @param {*} list 源数据
|
|
118
|
+
* @param {*} labelIndex label索引
|
|
119
|
+
* @param {*} valueIndex value索引
|
|
120
|
+
* @returns [{ label:'xxx', value:'xxx', key:'xxx', children:[] }]
|
|
121
|
+
*/
|
|
122
|
+
export function addTreeListProps<T extends ITreeNode>(
|
|
123
|
+
list: T[],
|
|
124
|
+
labelIndex: string,
|
|
125
|
+
valueIndex: string,
|
|
126
|
+
) {
|
|
127
|
+
if (Array.isArray(list)) {
|
|
128
|
+
return list.map((item) => {
|
|
129
|
+
const temp = {
|
|
130
|
+
...item,
|
|
131
|
+
label: item[labelIndex],
|
|
132
|
+
value: item[valueIndex],
|
|
133
|
+
key: item[valueIndex],
|
|
134
|
+
};
|
|
135
|
+
if (item.children) {
|
|
136
|
+
temp.children = addTreeListProps(item.children, labelIndex, valueIndex);
|
|
137
|
+
} else {
|
|
138
|
+
delete temp.children;
|
|
139
|
+
}
|
|
140
|
+
return temp;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return [];
|
|
145
|
+
}
|
package/src/utils/url.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import qs from 'qs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 获取地址栏参数
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export const getSearchParams = () => {
|
|
8
|
+
const search = (str: string) => qs.parse(str, { ignoreQueryPrefix: true });
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
...search(globalThis.location.search),
|
|
12
|
+
...search(globalThis.location.hash.split('?')[1]),
|
|
13
|
+
} as Record<string, string | undefined>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 拼接 Query
|
|
18
|
+
* @param url
|
|
19
|
+
* @param searchObj
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export const handleAddQuery = (
|
|
23
|
+
url: string,
|
|
24
|
+
searchObj: { [p: string]: any },
|
|
25
|
+
) => {
|
|
26
|
+
const query = Object.entries(searchObj)
|
|
27
|
+
.filter((item) => ![null, undefined].includes(item[1]))
|
|
28
|
+
.map((item) => item.join('='))
|
|
29
|
+
.join('&');
|
|
30
|
+
|
|
31
|
+
return url.includes('?') ? `${url}&${query}` : `${url}?${query}`;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 获取外部链接跳转处理
|
|
36
|
+
* @param url
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export const getHandleOpenLink = (url?: string | null) => () =>
|
|
40
|
+
!!url && globalThis.open(url);
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { IKeyValueItem, IListItem, IResponse, OperateType } from 'src/types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 过滤接口返回内容
|
|
6
|
+
* @param {*} res
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export function handleResult<T>({ success, data, errorMsg }: IResponse<T>): T {
|
|
10
|
+
if (!success) {
|
|
11
|
+
throw new Error(errorMsg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 获取值列表值
|
|
19
|
+
* @param list
|
|
20
|
+
* @param value
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export function getListLabel<T>(list: IListItem<T>[], value?: T) {
|
|
24
|
+
return list.find((item) => item.value === value)?.label;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 格式化日期 时间
|
|
29
|
+
* @param {String} value 时间戳
|
|
30
|
+
* @returns {String}
|
|
31
|
+
*/
|
|
32
|
+
export const formatDate = (value?: any) => {
|
|
33
|
+
if (!value) {
|
|
34
|
+
return '- -';
|
|
35
|
+
}
|
|
36
|
+
return dayjs(value).format('YYYY-MM-DD');
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* 删除对象中的空值
|
|
40
|
+
* @param {}
|
|
41
|
+
* @returns {}
|
|
42
|
+
*/
|
|
43
|
+
export const getTidyObject = (obj = {}) => {
|
|
44
|
+
return (
|
|
45
|
+
Object.entries(obj)
|
|
46
|
+
// .filter((item) => !!item[1] || item[1] === false)
|
|
47
|
+
.filter((item) => item[1] !== undefined && item[1] !== null)
|
|
48
|
+
.reduce((pre, cur) => {
|
|
49
|
+
const [k, v] = cur;
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
pre[k] = v;
|
|
52
|
+
return pre;
|
|
53
|
+
}, {})
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 生成随机的莫兰迪色
|
|
59
|
+
* @returns
|
|
60
|
+
*/
|
|
61
|
+
export function generateRandomMorandiColor() {
|
|
62
|
+
const hue = Math.floor(Math.random() * 300) + 330; // 生成330-360之间的色调
|
|
63
|
+
const saturation = Math.floor(Math.random() * 10) + 40; // 生成40-50之间的饱和度
|
|
64
|
+
const lightness = Math.floor(Math.random() * 10) + 80; // 生成80-90之间的亮度
|
|
65
|
+
|
|
66
|
+
// 转换为HSL颜色格式字符串
|
|
67
|
+
const color = 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)';
|
|
68
|
+
return color;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* data 转 from Data
|
|
73
|
+
* @param obj
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export function objectToFormData(obj: IKeyValueItem) {
|
|
77
|
+
const formData = new FormData();
|
|
78
|
+
|
|
79
|
+
for (const key in obj) {
|
|
80
|
+
if (Object.hasOwn(obj, key)) {
|
|
81
|
+
formData.append(key, obj[key]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return formData;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const getOperateTitle = (type: OperateType) => {
|
|
89
|
+
switch (type) {
|
|
90
|
+
case OperateType.ADD:
|
|
91
|
+
return '新增';
|
|
92
|
+
case OperateType.EDIT:
|
|
93
|
+
return '编辑';
|
|
94
|
+
case OperateType.VIEW:
|
|
95
|
+
return '查看';
|
|
96
|
+
default:
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResponsiveProps } from '@/components/ResponsiveReactGridLayout';
|
|
2
|
+
|
|
3
|
+
export const defaultResponsiveProps: ResponsiveProps = {
|
|
4
|
+
isResizable: false,
|
|
5
|
+
verticalCompact: true,
|
|
6
|
+
preventCollision: false,
|
|
7
|
+
cols: { lg: 6, md: 6, sm: 6, xs: 6, xxs: 2 },
|
|
8
|
+
margin: [16, 16],
|
|
9
|
+
rowHeight: 128,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const CardSelectorDs = [
|
|
13
|
+
{
|
|
14
|
+
label: '指标类型',
|
|
15
|
+
value: 'INDICATOR',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: '图表类型',
|
|
19
|
+
value: 'CHART',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: '自定义卡片',
|
|
23
|
+
value: 'CUSTOM',
|
|
24
|
+
},
|
|
25
|
+
];
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"buildOnSave": false,
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"experimentalDecorators": true,
|
|
6
|
+
"baseUrl": ".",
|
|
7
|
+
"outDir": "build",
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"target": "es2019",
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
14
|
+
"lib": ["ES2022", "dom"],
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"allowJs": true,
|
|
17
|
+
"rootDir": "./",
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"noImplicitReturns": false,
|
|
20
|
+
"noImplicitThis": true,
|
|
21
|
+
"noImplicitAny": false,
|
|
22
|
+
"importHelpers": true,
|
|
23
|
+
"strictNullChecks": true,
|
|
24
|
+
"noUnusedLocals": true,
|
|
25
|
+
"skipLibCheck": true,
|
|
26
|
+
"types": ["node"],
|
|
27
|
+
"paths": {
|
|
28
|
+
"@/*": ["./src/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src"],
|
|
32
|
+
"exclude": ["node_modules", "build", "public"]
|
|
33
|
+
}
|