@advt-gpt-chart/package 2.1.0 → 2.1.1
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/Chart/ChartBase/constants.d.ts +24 -8
- package/dist/Chart/ChartBase/transformed.d.ts +0 -1
- package/dist/Chart/ChartCodeRender/type.d.ts +1 -2
- package/dist/Chart/ChartControllers/TimeRange/types.d.ts +0 -2
- package/dist/Chart/ChartControllers/utils.d.ts +0 -14
- package/dist/Chart/ChartWrapper/ChartHeader.d.ts +1 -3
- package/dist/Chart/ChartWrapper/ChartWrapper.d.ts +1 -1
- package/dist/Chart/ChartWrapper/style.d.ts +5 -4
- package/dist/Chart/ChartWrapper/utils.d.ts +0 -2
- package/dist/Chart/DataSource/useChartDataQuery.d.ts +1 -1
- package/dist/Chart/Dataset/types.d.ts +0 -9
- package/dist/Chart/Dataset/useDataset.d.ts +4 -12
- package/dist/Charts/Indicator/styles.d.ts +2 -6
- package/dist/GPTVis/hooks/useChartStore.d.ts +0 -1
- package/dist/index.es.js +108745 -130931
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +956 -1549
- package/dist/index.umd.js.gz +0 -0
- package/dist/locale/en-US.d.ts +0 -14
- package/dist/locale/zh-CN.d.ts +0 -14
- package/dist/locale/zh-TW.d.ts +0 -14
- package/dist/types/chart.d.ts +0 -25
- package/dist/utils/downloadAsImage.d.ts +1 -1
- package/dist/utils/useTools.d.ts +3 -4
- package/dist/version.d.ts +1 -1
- package/package.json +105 -107
- package/dist/Chart/ChartControllers/DataFormat/DataFormat.d.ts +0 -6
- package/dist/Chart/ChartControllers/DataFormat/styles.d.ts +0 -3
- package/dist/Chart/ChartControllers/DataFormat/types.d.ts +0 -0
- package/dist/Chart/ChartControllers/DataFormat/utils.d.ts +0 -12
- package/dist/Chart/ChartWrapper/ChartMenu.d.ts +0 -2
- package/dist/Chart/ChartWrapper/contants.d.ts +0 -4
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/locale/en-US.d.ts
CHANGED
|
@@ -100,18 +100,4 @@ export declare const en_US: {
|
|
|
100
100
|
metricError: string;
|
|
101
101
|
chartDataLoadingFailed: string;
|
|
102
102
|
drillDataLoadingFailed: string;
|
|
103
|
-
DownloadImage: string;
|
|
104
|
-
DownloadExcel: string;
|
|
105
|
-
MetricDataFormat: string;
|
|
106
|
-
fullscreen: string;
|
|
107
|
-
formatType: string;
|
|
108
|
-
decimalPlaces: string;
|
|
109
|
-
metrics: string;
|
|
110
|
-
none: string;
|
|
111
|
-
number: string;
|
|
112
|
-
percentage_raw: string;
|
|
113
|
-
percentage_scaled: string;
|
|
114
|
-
temperature: string;
|
|
115
|
-
currency: string;
|
|
116
|
-
custom_unit: string;
|
|
117
103
|
};
|
package/dist/locale/zh-CN.d.ts
CHANGED
|
@@ -100,18 +100,4 @@ export declare const zh_CN: {
|
|
|
100
100
|
metricError: string;
|
|
101
101
|
chartDataLoadingFailed: string;
|
|
102
102
|
drillDataLoadingFailed: string;
|
|
103
|
-
DownloadImage: string;
|
|
104
|
-
DownloadExcel: string;
|
|
105
|
-
MetricDataFormat: string;
|
|
106
|
-
fullscreen: string;
|
|
107
|
-
formatType: string;
|
|
108
|
-
decimalPlaces: string;
|
|
109
|
-
metrics: string;
|
|
110
|
-
none: string;
|
|
111
|
-
number: string;
|
|
112
|
-
percentage_raw: string;
|
|
113
|
-
percentage_scaled: string;
|
|
114
|
-
temperature: string;
|
|
115
|
-
currency: string;
|
|
116
|
-
custom_unit: string;
|
|
117
103
|
};
|
package/dist/locale/zh-TW.d.ts
CHANGED
|
@@ -100,18 +100,4 @@ export declare const zh_TW: {
|
|
|
100
100
|
metricError: string;
|
|
101
101
|
chartDataLoadingFailed: string;
|
|
102
102
|
drillDataLoadingFailed: string;
|
|
103
|
-
DownloadImage: string;
|
|
104
|
-
DownloadExcel: string;
|
|
105
|
-
MetricDataFormat: string;
|
|
106
|
-
fullscreen: string;
|
|
107
|
-
formatType: string;
|
|
108
|
-
decimalPlaces: string;
|
|
109
|
-
metrics: string;
|
|
110
|
-
none: string;
|
|
111
|
-
number: string;
|
|
112
|
-
percentage_raw: string;
|
|
113
|
-
percentage_scaled: string;
|
|
114
|
-
temperature: string;
|
|
115
|
-
currency: string;
|
|
116
|
-
custom_unit: string;
|
|
117
103
|
};
|
package/dist/types/chart.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ChartJson } from '../Chart/ChartCodeRender/type';
|
|
3
|
-
import { OptionType } from '../Chart/ChartControllers/TimeRange/types';
|
|
4
3
|
import { TimeGrainType } from '../utils';
|
|
5
4
|
export declare enum ChartType {
|
|
6
5
|
Area = "area",
|
|
@@ -54,7 +53,6 @@ export declare const handleChartTypeChange: (chartType: ChartType, preChartJson:
|
|
|
54
53
|
dataSource?: import("../Chart/DataSource/types").DataSource;
|
|
55
54
|
columns?: import("../Chart/Dataset/types").FieldInfoItem[];
|
|
56
55
|
timeGrain?: TimeGrainType;
|
|
57
|
-
dataFormat?: import("../Chart/Dataset/types").DataFormat;
|
|
58
56
|
};
|
|
59
57
|
export type ChangeInfo = {
|
|
60
58
|
metrics: string[];
|
|
@@ -78,28 +76,5 @@ export declare const handleChartDataSourceChange: ({ metrics, dimensions, timeGr
|
|
|
78
76
|
dataSource?: import("../Chart/DataSource/types").DataSource;
|
|
79
77
|
columns?: import("../Chart/Dataset/types").FieldInfoItem[];
|
|
80
78
|
timeGrain?: TimeGrainType;
|
|
81
|
-
dataFormat?: import("../Chart/Dataset/types").DataFormat;
|
|
82
|
-
};
|
|
83
|
-
export type QueryDataInfo = {
|
|
84
|
-
metrics?: OptionType[];
|
|
85
|
-
dimensions?: OptionType[];
|
|
86
|
-
chartJson: ChartJson;
|
|
87
|
-
isInit?: Boolean;
|
|
88
|
-
};
|
|
89
|
-
export declare const transformQueryData2ChartJson: ({ metrics: dataMetrics, dimensions: dataDimensions, chartJson, isInit, }: QueryDataInfo) => {
|
|
90
|
-
metrics: string[];
|
|
91
|
-
dimensions: string[];
|
|
92
|
-
type: ChartType;
|
|
93
|
-
data: DataItem[];
|
|
94
|
-
chartId?: string;
|
|
95
|
-
chartName?: string;
|
|
96
|
-
xField?: string;
|
|
97
|
-
yField?: string;
|
|
98
|
-
nameField?: string;
|
|
99
|
-
valField?: string;
|
|
100
|
-
dataSource?: import("../Chart/DataSource/types").DataSource;
|
|
101
|
-
columns?: import("../Chart/Dataset/types").FieldInfoItem[];
|
|
102
|
-
timeGrain?: TimeGrainType;
|
|
103
|
-
dataFormat?: import("../Chart/Dataset/types").DataFormat;
|
|
104
79
|
};
|
|
105
80
|
export {};
|
|
@@ -8,4 +8,4 @@ import { SyntheticEvent } from 'react';
|
|
|
8
8
|
* @param isExactSelector if false, searches for the closest ancestor that matches selector.
|
|
9
9
|
* @returns event handler
|
|
10
10
|
*/
|
|
11
|
-
export default function downloadAsImage(selector: string, description: string, isExactSelector?: boolean): (event
|
|
11
|
+
export default function downloadAsImage(selector: string, description: string, isExactSelector?: boolean): (event: SyntheticEvent) => Promise<void> | null;
|
package/dist/utils/useTools.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { FieldInfoItem
|
|
1
|
+
import { FieldInfoItem } from '../Chart/Dataset/types';
|
|
2
2
|
import { GenericDataType } from './data';
|
|
3
3
|
import { TimeGrainValue } from './date';
|
|
4
4
|
export declare const formatTimeTool: (value: string | number, formatStr?: string) => string | number;
|
|
5
5
|
export declare const getFieldTypeTool: (fieldInfo: FieldInfoItem[], fieldName: string, value?: any) => GenericDataType | undefined;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const formatValueTool: (fieldInfo: FieldInfoItem[], fieldName: string, value: any, formatStr?: string) => any;
|
|
7
7
|
export declare const formatTimestampTool: (fieldInfo: FieldInfoItem[] | undefined, fieldName: string, value: any) => any;
|
|
8
|
-
export declare const formatNumberTool: (value: any, dataFormat: MetricFormat) => any;
|
|
9
8
|
export declare const useTools: () => {
|
|
10
9
|
formatTime: (value: string | number, formatStr?: string) => string | number;
|
|
11
10
|
getFieldType: (fieldName: string, value?: any) => GenericDataType | undefined;
|
|
12
|
-
formatValue: (fieldName: string, value: any,
|
|
11
|
+
formatValue: (fieldName: string, value: any, formatStr?: string) => any;
|
|
13
12
|
getAxesType: (fieldName: string) => "linear" | "band";
|
|
14
13
|
};
|
|
15
14
|
export declare function estimateTimeGrain(data: any[], timeFieldNames: string[]): TimeGrainValue;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const version = "2.
|
|
1
|
+
declare const version = "2.1.1";
|
|
2
2
|
export default version;
|
package/package.json
CHANGED
|
@@ -1,108 +1,106 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@advt-gpt-chart/package",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "2.1.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"main": "dist/index.umd.js",
|
|
10
|
-
"module": "dist/index.es.js",
|
|
11
|
-
"typings": "dist/index.d.ts",
|
|
12
|
-
"scripts": {
|
|
13
|
-
"dev": "vite",
|
|
14
|
-
"build": "vite build && tsc -p ./tsconfig.types.json",
|
|
15
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
16
|
-
"lint-fix": "eslint . --fix",
|
|
17
|
-
"preview": "vite preview",
|
|
18
|
-
"storybook": "storybook dev -p 6006",
|
|
19
|
-
"docs-dev": "dumi dev",
|
|
20
|
-
"build-storybook": "storybook build",
|
|
21
|
-
"test": "jest",
|
|
22
|
-
"publish-local": "vite build && tsc -p ./tsconfig.types.json && yalc publish",
|
|
23
|
-
"publish-local-update": "vite build && tsc -p ./tsconfig.types.json && yalc push --replace",
|
|
24
|
-
"publish-gitlab": "npm publish --registry https://gitlab.wise-paas.com/api/v4/projects/8545/packages/npm/",
|
|
25
|
-
"publish-npm": "npm publish --registry https://registry.npmjs.org/ --access public",
|
|
26
|
-
"json-server": "json-server --watch ./public/db.json --port 3008"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@antv/event-emitter": "^0.1.3",
|
|
30
|
-
"@codemirror/lang-sql": "^6.9.0",
|
|
31
|
-
"@uiw/react-codemirror": "^4.24.1",
|
|
32
|
-
"@visactor/react-vchart": "^2.0.3",
|
|
33
|
-
"@visactor/vchart": "^2.0.3",
|
|
34
|
-
"@visactor/vdataset": "^1.0.9",
|
|
35
|
-
"@visactor/vmind": "^2.0.10",
|
|
36
|
-
"@visactor/vtable": "^1.19.7",
|
|
37
|
-
"antd": "^
|
|
38
|
-
"axios": "^1.10.0",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"react-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/addon-
|
|
60
|
-
"@storybook/addon-
|
|
61
|
-
"@storybook/
|
|
62
|
-
"@storybook/
|
|
63
|
-
"@storybook/
|
|
64
|
-
"@storybook/
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@testing-library/
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@types/
|
|
71
|
-
"@types/
|
|
72
|
-
"@types/
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"eslint": "^
|
|
81
|
-
"eslint-plugin-react": "^
|
|
82
|
-
"eslint-plugin-
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
"react-dom": ">=17.0.0 <19.0.0"
|
|
107
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@advt-gpt-chart/package",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "dist/index.umd.js",
|
|
10
|
+
"module": "dist/index.es.js",
|
|
11
|
+
"typings": "dist/index.d.ts",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"build": "vite build && tsc -p ./tsconfig.types.json",
|
|
15
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
16
|
+
"lint-fix": "eslint . --fix",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"storybook": "storybook dev -p 6006",
|
|
19
|
+
"docs-dev": "dumi dev",
|
|
20
|
+
"build-storybook": "storybook build",
|
|
21
|
+
"test": "jest",
|
|
22
|
+
"publish-local": "vite build && tsc -p ./tsconfig.types.json && yalc publish",
|
|
23
|
+
"publish-local-update": "vite build && tsc -p ./tsconfig.types.json && yalc push --replace",
|
|
24
|
+
"publish-gitlab": "npm publish --registry https://gitlab.wise-paas.com/api/v4/projects/8545/packages/npm/",
|
|
25
|
+
"publish-npm": "npm publish --registry https://registry.npmjs.org/ --access public",
|
|
26
|
+
"json-server": "json-server --watch ./public/db.json --port 3008"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@antv/event-emitter": "^0.1.3",
|
|
30
|
+
"@codemirror/lang-sql": "^6.9.0",
|
|
31
|
+
"@uiw/react-codemirror": "^4.24.1",
|
|
32
|
+
"@visactor/react-vchart": "^2.0.3",
|
|
33
|
+
"@visactor/vchart": "^2.0.3",
|
|
34
|
+
"@visactor/vdataset": "^1.0.9",
|
|
35
|
+
"@visactor/vmind": "^2.0.10",
|
|
36
|
+
"@visactor/vtable": "^1.19.7",
|
|
37
|
+
"antd": "^5.25.4",
|
|
38
|
+
"axios": "^1.10.0",
|
|
39
|
+
"dayjs": "^1.11.13",
|
|
40
|
+
"dom-to-image-more": "^3.6.0",
|
|
41
|
+
"lodash-es": "^4.17.21",
|
|
42
|
+
"nanoid": "^5.1.5",
|
|
43
|
+
"react-intl": "^7.1.11",
|
|
44
|
+
"react-markdown": "^10.1.0",
|
|
45
|
+
"rehype-raw": "^7.0.0",
|
|
46
|
+
"remark-gfm": "^4.0.1",
|
|
47
|
+
"styled-components": "^6.1.18",
|
|
48
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
49
|
+
"zustand": "^4.5.2"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@ant-design/icons": "^6.0.0",
|
|
53
|
+
"@ant-design/x": "^1.4.0",
|
|
54
|
+
"@chromatic-com/storybook": "4.0.0",
|
|
55
|
+
"@eslint/js": "^9.28.0",
|
|
56
|
+
"@storybook/addon-actions": "^9.0.4",
|
|
57
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
58
|
+
"@storybook/addon-interactions": "^8.6.14",
|
|
59
|
+
"@storybook/addon-links": "^9.0.4",
|
|
60
|
+
"@storybook/addon-onboarding": "^9.0.4",
|
|
61
|
+
"@storybook/blocks": "^8.6.14",
|
|
62
|
+
"@storybook/react": "^9.0.4",
|
|
63
|
+
"@storybook/react-vite": "^9.0.4",
|
|
64
|
+
"@storybook/test": "^8.6.14",
|
|
65
|
+
"@testing-library/dom": "^10.4.0",
|
|
66
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
67
|
+
"@testing-library/react": "^16.3.0",
|
|
68
|
+
"@types/jest": "^29.5.14",
|
|
69
|
+
"@types/lodash-es": "^4.17.12",
|
|
70
|
+
"@types/node": "^22.15.29",
|
|
71
|
+
"@types/react": "^18.2.79",
|
|
72
|
+
"@types/react-dom": "^18.2.25",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
74
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
75
|
+
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
|
76
|
+
"@vitejs/plugin-react": "^4.5.1",
|
|
77
|
+
"dumi": "^2.4.21",
|
|
78
|
+
"eslint": "^9.28.0",
|
|
79
|
+
"eslint-plugin-react": "^7.37.5",
|
|
80
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
81
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
82
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
83
|
+
"eslint-plugin-storybook": "^9.0.4",
|
|
84
|
+
"globals": "^16.2.0",
|
|
85
|
+
"jest": "^29.7.0",
|
|
86
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
87
|
+
"prettier": "^3.5.3",
|
|
88
|
+
"react": "^18.2.0",
|
|
89
|
+
"react-dom": "^18.2.0",
|
|
90
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
91
|
+
"storybook": "^9.0.4",
|
|
92
|
+
"terser": "^5.40.0",
|
|
93
|
+
"ts-jest": "^29.3.4",
|
|
94
|
+
"ts-node": "^10.9.2",
|
|
95
|
+
"tslib": "^2.8.1",
|
|
96
|
+
"typescript": "^5.8.3",
|
|
97
|
+
"typescript-eslint": "^8.33.1",
|
|
98
|
+
"vite": "^6.3.5",
|
|
99
|
+
"vite-plugin-compression": "^0.5.1"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"antd": ">=4.0.0",
|
|
103
|
+
"react": ">=17.0.0 <19.0.0",
|
|
104
|
+
"react-dom": ">=17.0.0 <19.0.0"
|
|
105
|
+
}
|
|
108
106
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const StyleFormatModal: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
|
-
theme?: string;
|
|
3
|
-
}>> & string;
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const formatTypeInitOptions: ({
|
|
2
|
-
key: string;
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
desc?: undefined;
|
|
6
|
-
} | {
|
|
7
|
-
key: string;
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
desc: string;
|
|
11
|
-
})[];
|
|
12
|
-
export declare function getUnit(unit?: string): string;
|