@advt-gpt-chart/package 0.0.11 → 0.0.23
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 +101 -0
- package/dist/{VChartBase → Chart/ChartBase}/transformed.d.ts +1 -1
- package/dist/{VChartBase → Chart/ChartBase}/types.d.ts +5 -1
- package/dist/{ChartCodeRender → Chart/ChartCodeRender}/index.d.ts +1 -0
- package/dist/{ChartCodeRender → Chart/ChartCodeRender}/type.d.ts +16 -5
- package/dist/Chart/ChartCodeRender/visChart/ChartStoreContext.d.ts +18 -0
- package/dist/Chart/ChartCodeRender/visChart/VisChart.d.ts +3 -0
- package/dist/Chart/ChartCodeRender/visChart/style.d.ts +2 -0
- package/dist/Chart/ChartCodeRender/visChart/types.d.ts +16 -0
- package/dist/Chart/ChartControllers/Filter/FilterController.d.ts +9 -0
- package/dist/Chart/ChartControllers/Filter/FilterModal.d.ts +8 -0
- package/dist/Chart/ChartControllers/Filter/FiltersController.d.ts +7 -0
- package/dist/Chart/ChartControllers/Filter/styles.d.ts +6 -0
- package/dist/Chart/ChartControllers/Filter/types.d.ts +16 -0
- package/dist/Chart/ChartControllers/Filter/utils.d.ts +33 -0
- package/dist/Chart/ChartControllers/TimeRange/AdvancedContent.d.ts +7 -0
- package/dist/Chart/ChartControllers/TimeRange/CustomContent.d.ts +7 -0
- package/dist/Chart/ChartControllers/TimeRange/TimeRangePopover.d.ts +9 -0
- package/dist/Chart/ChartControllers/TimeRange/index.d.ts +7 -0
- package/dist/Chart/ChartControllers/TimeRange/styles.d.ts +12 -0
- package/dist/Chart/ChartControllers/TimeRange/types.d.ts +55 -0
- package/dist/Chart/ChartControllers/TimeRange/utils.d.ts +77 -0
- package/dist/Chart/ChartControllers/index.d.ts +15 -0
- package/dist/Chart/ChartControllers/style.d.ts +3 -0
- package/dist/Chart/ChartControllers/utils.d.ts +12 -0
- package/dist/Chart/ChartEvents/ChartContextMenu/ChartContextMenu.d.ts +10 -0
- package/dist/Chart/ChartEvents/ChartContextMenu/styles.d.ts +1 -0
- package/dist/Chart/ChartEvents/ChartContextMenu/utils.d.ts +5 -0
- package/dist/Chart/ChartEvents/DrillBy/DrillByChart.d.ts +7 -0
- package/dist/Chart/ChartEvents/DrillBy/styles.d.ts +1 -0
- package/dist/Chart/ChartWrapper/ChartHeader.d.ts +5 -0
- package/dist/Chart/ChartWrapper/ChartWrapper.d.ts +9 -0
- package/dist/Chart/ChartWrapper/style.d.ts +9 -0
- package/dist/Chart/ChartWrapper/utils.d.ts +22 -0
- package/dist/Chart/DataSource/index.d.ts +9 -0
- package/dist/Chart/DataSource/metricInsight.d.ts +10 -0
- package/dist/Chart/DataSource/simpleJson.d.ts +0 -0
- package/dist/Chart/DataSource/types.d.ts +24 -0
- package/dist/Chart/DataSource/useChartDataQuery.d.ts +15 -0
- package/dist/Chart/Dataset/types.d.ts +7 -0
- package/dist/{Area → Charts/Area}/types.d.ts +1 -1
- package/dist/{Bar → Charts/Bar}/types.d.ts +1 -1
- package/dist/{Donut → Charts/Donut}/types.d.ts +1 -1
- package/dist/{Funnel → Charts/Funnel}/types.d.ts +1 -1
- package/dist/{Gauge → Charts/Gauge}/types.d.ts +1 -1
- package/dist/{Heatmap → Charts/Heatmap}/types.d.ts +1 -1
- package/dist/{Indicator → Charts/Indicator}/types.d.ts +2 -2
- package/dist/{Line → Charts/Line}/types.d.ts +1 -1
- package/dist/{Pie → Charts/Pie}/types.d.ts +1 -1
- package/dist/{Radar → Charts/Radar}/types.d.ts +1 -1
- package/dist/{Radar → Charts/Radar}/utils.d.ts +1 -1
- package/dist/{Rank → Charts/Rank}/types.d.ts +1 -1
- package/dist/{Scatter → Charts/Scatter}/types.d.ts +1 -1
- package/dist/{Table → Charts/Table}/types.d.ts +4 -2
- package/dist/ConfigProvider/hooks/useConfig.d.ts +14 -11
- package/dist/GPTVis/Lite.d.ts +4 -0
- package/dist/GPTVis/hooks/useContext.d.ts +1 -0
- package/dist/GPTVis/hooks/useStore.d.ts +43 -0
- package/dist/components/ErrorMessage.d.ts +7 -0
- package/dist/components/FormatOptions.d.ts +1 -0
- package/dist/components/Loading.d.ts +5 -0
- package/dist/components/VButton.d.ts +5 -0
- package/dist/components/VCalendar.d.ts +6 -0
- package/dist/components/VSelect.d.ts +5 -0
- package/dist/components/VTimePicker.d.ts +5 -0
- package/dist/export.d.ts +26 -26
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +176125 -109719
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +10206 -210
- package/dist/index.umd.js.gz +0 -0
- package/dist/locale/antdLocale.d.ts +5 -0
- package/dist/locale/dayjsLocale.d.ts +2 -0
- package/dist/locale/en-US.d.ts +95 -0
- package/dist/locale/index.d.ts +7 -0
- package/dist/locale/utils.d.ts +7 -0
- package/dist/locale/zh-CN.d.ts +95 -0
- package/dist/locale/zh-TW.d.ts +91 -0
- package/dist/services/constants.d.ts +2 -0
- package/dist/services/index.d.ts +74 -0
- package/dist/services/types.d.ts +14 -0
- package/dist/theme/antdTheme.d.ts +15 -0
- package/dist/types/chart.d.ts +50 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/data.d.ts +17 -0
- package/dist/utils/date.d.ts +13 -1
- package/dist/utils/downloadAsImage.d.ts +11 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/useTools.d.ts +6 -0
- package/dist/version.d.ts +1 -1
- package/package.json +17 -7
- package/dist/ChartCodeRender/Loading.d.ts +0 -2
- package/dist/ChartCodeRender/VisChart.d.ts +0 -11
- package/dist/ChartContainer/chartContextProvider.d.ts +0 -10
- package/dist/ChartContainer/index.d.ts +0 -9
- package/dist/ChartContainer/style.d.ts +0 -5
- package/dist/VChartBase/constants.d.ts +0 -54
- /package/dist/{VChartBase → Chart/ChartBase}/index.d.ts +0 -0
- /package/dist/{VChartBase → Chart/ChartBase}/tooltip.d.ts +0 -0
- /package/dist/{VChartBase → Chart/ChartBase}/utils.d.ts +0 -0
- /package/dist/{Area → Charts/Area}/index.d.ts +0 -0
- /package/dist/{Bar → Charts/Bar}/index.d.ts +0 -0
- /package/dist/{Donut → Charts/Donut}/index.d.ts +0 -0
- /package/dist/{Funnel → Charts/Funnel}/index.d.ts +0 -0
- /package/dist/{Gauge → Charts/Gauge}/index.d.ts +0 -0
- /package/dist/{Heatmap → Charts/Heatmap}/index.d.ts +0 -0
- /package/dist/{Indicator → Charts/Indicator}/contants.d.ts +0 -0
- /package/dist/{Indicator → Charts/Indicator}/index.d.ts +0 -0
- /package/dist/{Indicator → Charts/Indicator}/styles.d.ts +0 -0
- /package/dist/{Line → Charts/Line}/index.d.ts +0 -0
- /package/dist/{Pie → Charts/Pie}/index.d.ts +0 -0
- /package/dist/{Radar → Charts/Radar}/index.d.ts +0 -0
- /package/dist/{Rank → Charts/Rank}/index.d.ts +0 -0
- /package/dist/{Scatter → Charts/Scatter}/index.d.ts +0 -0
- /package/dist/{Table → Charts/Table}/index.d.ts +0 -0
- /package/dist/{Table → Charts/Table}/theme.d.ts +0 -0
- /package/dist/{constants → theme}/light.d.ts +0 -0
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const en_US: {
|
|
2
|
+
timeRange: string;
|
|
3
|
+
custom: string;
|
|
4
|
+
today: string;
|
|
5
|
+
last7Days: string;
|
|
6
|
+
last30Days: string;
|
|
7
|
+
last1Year: string;
|
|
8
|
+
lastNUnits: string;
|
|
9
|
+
periodAgoNUnits: string;
|
|
10
|
+
unitday: string;
|
|
11
|
+
unitweek: string;
|
|
12
|
+
unitmonth: string;
|
|
13
|
+
unitquarter: string;
|
|
14
|
+
unityear: string;
|
|
15
|
+
thisWeek: string;
|
|
16
|
+
thisMonth: string;
|
|
17
|
+
thisQuarter: string;
|
|
18
|
+
thisYear: string;
|
|
19
|
+
weekToDate: string;
|
|
20
|
+
monthToDate: string;
|
|
21
|
+
quarterToDate: string;
|
|
22
|
+
yearToDate: string;
|
|
23
|
+
advanced: string;
|
|
24
|
+
startTime: string;
|
|
25
|
+
endTime: string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
modalApply: string;
|
|
28
|
+
apply: string;
|
|
29
|
+
lastPeriod: string;
|
|
30
|
+
periodAgo: string;
|
|
31
|
+
periodBoundary: string;
|
|
32
|
+
currentNUnit: string;
|
|
33
|
+
previousNUnits: string;
|
|
34
|
+
configuration: string;
|
|
35
|
+
periodRange: string;
|
|
36
|
+
boundaryType: string;
|
|
37
|
+
inputLast: string;
|
|
38
|
+
inputPrevious: string;
|
|
39
|
+
current: string;
|
|
40
|
+
previous: string;
|
|
41
|
+
day: string;
|
|
42
|
+
week: string;
|
|
43
|
+
month: string;
|
|
44
|
+
quarter: string;
|
|
45
|
+
year: string;
|
|
46
|
+
first: string;
|
|
47
|
+
last: string;
|
|
48
|
+
metric: string;
|
|
49
|
+
dimension: string;
|
|
50
|
+
timeGrain: string;
|
|
51
|
+
resetToDefault: string;
|
|
52
|
+
saveAsDefault: string;
|
|
53
|
+
metricTime: string;
|
|
54
|
+
basic: string;
|
|
55
|
+
customSql: string;
|
|
56
|
+
column: string;
|
|
57
|
+
condition: string;
|
|
58
|
+
value: string;
|
|
59
|
+
conditionType: string;
|
|
60
|
+
filterConditionSQL: string;
|
|
61
|
+
equal: string;
|
|
62
|
+
notEqual: string;
|
|
63
|
+
isNull: string;
|
|
64
|
+
isNotNull: string;
|
|
65
|
+
greaterThan: string;
|
|
66
|
+
greaterThanOrEqualto: string;
|
|
67
|
+
lessThan: string;
|
|
68
|
+
lessThanEqualTo: string;
|
|
69
|
+
contains: string;
|
|
70
|
+
notContains: string;
|
|
71
|
+
StartsWith: string;
|
|
72
|
+
doesNotStartWith: string;
|
|
73
|
+
endsWith: string;
|
|
74
|
+
doesNotEndWith: string;
|
|
75
|
+
in: string;
|
|
76
|
+
notIn: string;
|
|
77
|
+
filterConditionPlaceholder: string;
|
|
78
|
+
bar: string;
|
|
79
|
+
donut: string;
|
|
80
|
+
line: string;
|
|
81
|
+
table: string;
|
|
82
|
+
area: string;
|
|
83
|
+
funnel: string;
|
|
84
|
+
gauge: string;
|
|
85
|
+
heatmap: string;
|
|
86
|
+
indicator: string;
|
|
87
|
+
pie: string;
|
|
88
|
+
radar: string;
|
|
89
|
+
rank: string;
|
|
90
|
+
scatter: string;
|
|
91
|
+
total: string;
|
|
92
|
+
drillDown: string;
|
|
93
|
+
metricError: string;
|
|
94
|
+
chartDataLoadingFailed: string;
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const zh_CN: {
|
|
2
|
+
timeRange: string;
|
|
3
|
+
custom: string;
|
|
4
|
+
today: string;
|
|
5
|
+
last7Days: string;
|
|
6
|
+
last30Days: string;
|
|
7
|
+
last1Year: string;
|
|
8
|
+
lastNUnits: string;
|
|
9
|
+
periodAgoNUnits: string;
|
|
10
|
+
unitday: string;
|
|
11
|
+
unitweek: string;
|
|
12
|
+
unitmonth: string;
|
|
13
|
+
unitquarter: string;
|
|
14
|
+
unityear: string;
|
|
15
|
+
thisWeek: string;
|
|
16
|
+
thisMonth: string;
|
|
17
|
+
thisQuarter: string;
|
|
18
|
+
thisYear: string;
|
|
19
|
+
weekToDate: string;
|
|
20
|
+
monthToDate: string;
|
|
21
|
+
quarterToDate: string;
|
|
22
|
+
yearToDate: string;
|
|
23
|
+
advanced: string;
|
|
24
|
+
startTime: string;
|
|
25
|
+
endTime: string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
modalApply: string;
|
|
28
|
+
apply: string;
|
|
29
|
+
lastPeriod: string;
|
|
30
|
+
periodAgo: string;
|
|
31
|
+
periodBoundary: string;
|
|
32
|
+
currentNUnit: string;
|
|
33
|
+
previousNUnits: string;
|
|
34
|
+
configuration: string;
|
|
35
|
+
periodRange: string;
|
|
36
|
+
boundaryType: string;
|
|
37
|
+
inputLast: string;
|
|
38
|
+
inputPrevious: string;
|
|
39
|
+
current: string;
|
|
40
|
+
previous: string;
|
|
41
|
+
day: string;
|
|
42
|
+
week: string;
|
|
43
|
+
month: string;
|
|
44
|
+
quarter: string;
|
|
45
|
+
year: string;
|
|
46
|
+
first: string;
|
|
47
|
+
last: string;
|
|
48
|
+
metric: string;
|
|
49
|
+
dimension: string;
|
|
50
|
+
timeGrain: string;
|
|
51
|
+
resetToDefault: string;
|
|
52
|
+
saveAsDefault: string;
|
|
53
|
+
metricTime: string;
|
|
54
|
+
basic: string;
|
|
55
|
+
customSql: string;
|
|
56
|
+
column: string;
|
|
57
|
+
condition: string;
|
|
58
|
+
value: string;
|
|
59
|
+
conditionType: string;
|
|
60
|
+
filterConditionSQL: string;
|
|
61
|
+
equal: string;
|
|
62
|
+
notEqual: string;
|
|
63
|
+
isNull: string;
|
|
64
|
+
isNotNull: string;
|
|
65
|
+
greaterThan: string;
|
|
66
|
+
greaterThanOrEqualto: string;
|
|
67
|
+
lessThan: string;
|
|
68
|
+
lessThanEqualTo: string;
|
|
69
|
+
contains: string;
|
|
70
|
+
notContains: string;
|
|
71
|
+
StartsWith: string;
|
|
72
|
+
doesNotStartWith: string;
|
|
73
|
+
endsWith: string;
|
|
74
|
+
doesNotEndWith: string;
|
|
75
|
+
in: string;
|
|
76
|
+
notIn: string;
|
|
77
|
+
filterConditionPlaceholder: string;
|
|
78
|
+
bar: string;
|
|
79
|
+
donut: string;
|
|
80
|
+
line: string;
|
|
81
|
+
table: string;
|
|
82
|
+
area: string;
|
|
83
|
+
funnel: string;
|
|
84
|
+
gauge: string;
|
|
85
|
+
heatmap: string;
|
|
86
|
+
indicator: string;
|
|
87
|
+
pie: string;
|
|
88
|
+
radar: string;
|
|
89
|
+
rank: string;
|
|
90
|
+
scatter: string;
|
|
91
|
+
total: string;
|
|
92
|
+
drillDown: string;
|
|
93
|
+
metricError: string;
|
|
94
|
+
chartDataLoadingFailed: string;
|
|
95
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare const zh_TW: {
|
|
2
|
+
timeRange: string;
|
|
3
|
+
custom: string;
|
|
4
|
+
today: string;
|
|
5
|
+
last7Days: string;
|
|
6
|
+
last30Days: string;
|
|
7
|
+
last1Year: string;
|
|
8
|
+
lastNUnits: string;
|
|
9
|
+
periodAgoNUnits: string;
|
|
10
|
+
unitday: string;
|
|
11
|
+
unitweek: string;
|
|
12
|
+
unitmonth: string;
|
|
13
|
+
unitquarter: string;
|
|
14
|
+
unityear: string;
|
|
15
|
+
thisWeek: string;
|
|
16
|
+
thisMonth: string;
|
|
17
|
+
thisQuarter: string;
|
|
18
|
+
thisYear: string;
|
|
19
|
+
weekToDate: string;
|
|
20
|
+
monthToDate: string;
|
|
21
|
+
quarterToDate: string;
|
|
22
|
+
yearToDate: string;
|
|
23
|
+
advanced: string;
|
|
24
|
+
startTime: string;
|
|
25
|
+
endTime: string;
|
|
26
|
+
cancel: string;
|
|
27
|
+
modalApply: string;
|
|
28
|
+
apply: string;
|
|
29
|
+
lastPeriod: string;
|
|
30
|
+
periodAgo: string;
|
|
31
|
+
periodBoundary: string;
|
|
32
|
+
currentNUnit: string;
|
|
33
|
+
previousNUnits: string;
|
|
34
|
+
configuration: string;
|
|
35
|
+
periodRange: string;
|
|
36
|
+
boundaryType: string;
|
|
37
|
+
inputLast: string;
|
|
38
|
+
inputPrevious: string;
|
|
39
|
+
current: string;
|
|
40
|
+
previous: string;
|
|
41
|
+
day: string;
|
|
42
|
+
week: string;
|
|
43
|
+
month: string;
|
|
44
|
+
quarter: string;
|
|
45
|
+
year: string;
|
|
46
|
+
first: string;
|
|
47
|
+
last: string;
|
|
48
|
+
metric: string;
|
|
49
|
+
dimension: string;
|
|
50
|
+
timeGrain: string;
|
|
51
|
+
resetToDefault: string;
|
|
52
|
+
saveAsDefault: string;
|
|
53
|
+
metricTime: string;
|
|
54
|
+
basic: string;
|
|
55
|
+
customSql: string;
|
|
56
|
+
column: string;
|
|
57
|
+
condition: string;
|
|
58
|
+
value: string;
|
|
59
|
+
conditionType: string;
|
|
60
|
+
filterConditionSQL: string;
|
|
61
|
+
equal: string;
|
|
62
|
+
notEqual: string;
|
|
63
|
+
isNull: string;
|
|
64
|
+
isNotNull: string;
|
|
65
|
+
greaterThan: string;
|
|
66
|
+
greaterThanOrEqualto: string;
|
|
67
|
+
lessThan: string;
|
|
68
|
+
lessThanEqualTo: string;
|
|
69
|
+
contains: string;
|
|
70
|
+
notContains: string;
|
|
71
|
+
StartsWith: string;
|
|
72
|
+
doesNotStartWith: string;
|
|
73
|
+
endsWith: string;
|
|
74
|
+
doesNotEndWith: string;
|
|
75
|
+
in: string;
|
|
76
|
+
notIn: string;
|
|
77
|
+
filterConditionPlaceholder: string;
|
|
78
|
+
bar: string;
|
|
79
|
+
donut: string;
|
|
80
|
+
line: string;
|
|
81
|
+
table: string;
|
|
82
|
+
area: string;
|
|
83
|
+
funnel: string;
|
|
84
|
+
gauge: string;
|
|
85
|
+
heatmap: string;
|
|
86
|
+
indicator: string;
|
|
87
|
+
pie: string;
|
|
88
|
+
radar: string;
|
|
89
|
+
rank: string;
|
|
90
|
+
scatter: string;
|
|
91
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RawAxiosRequestHeaders } from 'axios';
|
|
2
|
+
import { Host, InitConfig, ParseMethod, Protocol, RequestConfig } from './types';
|
|
3
|
+
declare class backService {
|
|
4
|
+
private instance;
|
|
5
|
+
baseURL: string;
|
|
6
|
+
host: Host;
|
|
7
|
+
protocol: Protocol;
|
|
8
|
+
timeout: number;
|
|
9
|
+
headers: RawAxiosRequestHeaders;
|
|
10
|
+
constructor({ baseURL, host, protocol, timeout, headers, }?: InitConfig);
|
|
11
|
+
get<T extends ParseMethod = 'json'>(requestConfig: RequestConfig & {
|
|
12
|
+
parseMethod?: T;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
message: string;
|
|
15
|
+
data?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
data: any;
|
|
18
|
+
message?: undefined;
|
|
19
|
+
}>;
|
|
20
|
+
delete<T extends ParseMethod = 'json'>(requestConfig: RequestConfig & {
|
|
21
|
+
parseMethod?: T;
|
|
22
|
+
}): Promise<{
|
|
23
|
+
message: string;
|
|
24
|
+
data?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
data: any;
|
|
27
|
+
message?: undefined;
|
|
28
|
+
}>;
|
|
29
|
+
put<T extends ParseMethod = 'json'>(requestConfig: RequestConfig & {
|
|
30
|
+
parseMethod?: T;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
message: string;
|
|
33
|
+
data?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
data: any;
|
|
36
|
+
message?: undefined;
|
|
37
|
+
}>;
|
|
38
|
+
post<T extends ParseMethod = 'json'>(requestConfig: RequestConfig & {
|
|
39
|
+
parseMethod?: T;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
message: string;
|
|
42
|
+
data?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
data: any;
|
|
45
|
+
message?: undefined;
|
|
46
|
+
}>;
|
|
47
|
+
patch<T extends ParseMethod = 'json'>(requestConfig: RequestConfig & {
|
|
48
|
+
parseMethod?: T;
|
|
49
|
+
}): Promise<{
|
|
50
|
+
message: string;
|
|
51
|
+
data?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
data: any;
|
|
54
|
+
message?: undefined;
|
|
55
|
+
}>;
|
|
56
|
+
ping(): Promise<{
|
|
57
|
+
message: string;
|
|
58
|
+
data?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
data: any;
|
|
61
|
+
message?: undefined;
|
|
62
|
+
}>;
|
|
63
|
+
request<T extends ParseMethod = 'json'>(config: RequestConfig & {
|
|
64
|
+
parseMethod?: T;
|
|
65
|
+
}): Promise<{
|
|
66
|
+
message: string;
|
|
67
|
+
data?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
data: any;
|
|
70
|
+
message?: undefined;
|
|
71
|
+
}>;
|
|
72
|
+
}
|
|
73
|
+
declare const service: backService;
|
|
74
|
+
export default service;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AxiosRequestConfig, RawAxiosRequestHeaders } from 'axios';
|
|
2
|
+
export type Protocol = 'http:' | 'https:' | undefined;
|
|
3
|
+
export type Host = string;
|
|
4
|
+
export type RequestTimeout = number | undefined;
|
|
5
|
+
export type ParseMethod = 'json' | 'json-bigint' | 'text' | 'raw' | null | undefined;
|
|
6
|
+
export interface InitConfig {
|
|
7
|
+
baseURL?: string;
|
|
8
|
+
host?: Host;
|
|
9
|
+
protocol?: Protocol;
|
|
10
|
+
headers?: RawAxiosRequestHeaders;
|
|
11
|
+
timeout?: RequestTimeout;
|
|
12
|
+
retry?: number;
|
|
13
|
+
}
|
|
14
|
+
export type RequestConfig = AxiosRequestConfig & InitConfig;
|
package/dist/types/chart.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { ChartJson } from '../Chart/ChartCodeRender/type';
|
|
2
3
|
export declare enum ChartType {
|
|
3
4
|
Area = "area",
|
|
4
5
|
Bar = "bar",
|
|
@@ -15,13 +16,61 @@ export declare enum ChartType {
|
|
|
15
16
|
Table = "table",
|
|
16
17
|
Indicator = "indicator"
|
|
17
18
|
}
|
|
19
|
+
export declare const chartTypeOptions: {
|
|
20
|
+
key: string;
|
|
21
|
+
label: string;
|
|
22
|
+
icon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
23
|
+
}[];
|
|
18
24
|
export type Charts = keyof typeof ChartType;
|
|
19
25
|
export type DataItem = {
|
|
20
26
|
[key: string]: string | number;
|
|
21
27
|
};
|
|
22
28
|
export type DataType = DataItem[] | DataItem[][];
|
|
23
29
|
export interface BaseChartProps {
|
|
24
|
-
|
|
30
|
+
chartStyle?: CSSProperties;
|
|
25
31
|
className?: string;
|
|
26
32
|
children?: ReactNode;
|
|
27
33
|
}
|
|
34
|
+
declare const ChartCategory: {
|
|
35
|
+
cartesian: ChartType[];
|
|
36
|
+
polar: ChartType[];
|
|
37
|
+
table: ChartType[];
|
|
38
|
+
};
|
|
39
|
+
export type ChartCategoryType = keyof typeof ChartCategory;
|
|
40
|
+
export declare function getChartCategory(chartType: ChartType): ChartCategoryType | 'unknown';
|
|
41
|
+
export declare const handleChartTypeChange: (chartType: ChartType, preChartJson: ChartJson) => {
|
|
42
|
+
type: ChartType;
|
|
43
|
+
data: DataItem[];
|
|
44
|
+
chartId?: string;
|
|
45
|
+
chartName?: string;
|
|
46
|
+
xField?: string;
|
|
47
|
+
yField?: string;
|
|
48
|
+
nameField?: string;
|
|
49
|
+
valField?: string;
|
|
50
|
+
dimensions?: string[];
|
|
51
|
+
metrics?: string[];
|
|
52
|
+
dataSource?: import("../Chart/DataSource/types").DataSource;
|
|
53
|
+
columns?: import("../Chart/Dataset/types").FieldInfoItem[];
|
|
54
|
+
};
|
|
55
|
+
export type ChangeInfo = {
|
|
56
|
+
metrics: string[];
|
|
57
|
+
dimensions: string[];
|
|
58
|
+
chartJson: ChartJson;
|
|
59
|
+
data: DataItem[];
|
|
60
|
+
isInit?: Boolean;
|
|
61
|
+
};
|
|
62
|
+
export declare const handleChartDataSourceChange: ({ metrics, dimensions, chartJson, data, isInit, }: ChangeInfo) => {
|
|
63
|
+
metrics: string[];
|
|
64
|
+
dimensions: string[];
|
|
65
|
+
data: DataItem[];
|
|
66
|
+
type: ChartType;
|
|
67
|
+
chartId?: string;
|
|
68
|
+
chartName?: string;
|
|
69
|
+
xField?: string;
|
|
70
|
+
yField?: string;
|
|
71
|
+
nameField?: string;
|
|
72
|
+
valField?: string;
|
|
73
|
+
dataSource?: import("../Chart/DataSource/types").DataSource;
|
|
74
|
+
columns?: import("../Chart/Dataset/types").FieldInfoItem[];
|
|
75
|
+
};
|
|
76
|
+
export {};
|
package/dist/types/config.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum GenericDataType {
|
|
2
|
+
Number = 0,
|
|
3
|
+
String = 1,
|
|
4
|
+
Timestamp = 2,
|
|
5
|
+
Date = 3,
|
|
6
|
+
Boolean = 4
|
|
7
|
+
}
|
|
8
|
+
export declare const fieldTypeMap: {
|
|
9
|
+
timestamp: GenericDataType;
|
|
10
|
+
datetime: GenericDataType;
|
|
11
|
+
timestamptz: GenericDataType;
|
|
12
|
+
date: GenericDataType;
|
|
13
|
+
time: GenericDataType;
|
|
14
|
+
number: GenericDataType;
|
|
15
|
+
bigint: GenericDataType;
|
|
16
|
+
string: GenericDataType;
|
|
17
|
+
};
|
package/dist/utils/date.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
export declare const DATE_FORMAT = "YYYY/MM/DD HH:mm:ss";
|
|
2
|
+
export declare const DATE_FORMAT_API = "YYYY-MM-DD HH:mm:ss";
|
|
1
3
|
export declare const DATE_FORMATS: string[];
|
|
4
|
+
export declare const timeGrainFormater: {
|
|
5
|
+
s: string;
|
|
6
|
+
m: string;
|
|
7
|
+
h: string;
|
|
8
|
+
day: string;
|
|
9
|
+
week: string;
|
|
10
|
+
month: string;
|
|
11
|
+
quarter: string;
|
|
12
|
+
year: string;
|
|
13
|
+
};
|
|
2
14
|
export declare function matchesDateFormat(value: string): boolean;
|
|
3
|
-
export declare const
|
|
15
|
+
export declare const formatTimeFn: (value: string | number, formatStr?: string) => string | number;
|
|
4
16
|
export declare const formatTimeData: (data: any[], fields: string[]) => any[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SyntheticEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Create an event handler for turning an element into an image
|
|
4
|
+
*
|
|
5
|
+
* @param selector css selector of the parent element which should be turned into image
|
|
6
|
+
* @param description name or a short description of what is being printed.
|
|
7
|
+
* Value will be normalized, and a date as well as a file extension will be added.
|
|
8
|
+
* @param isExactSelector if false, searches for the closest ancestor that matches selector.
|
|
9
|
+
* @returns event handler
|
|
10
|
+
*/
|
|
11
|
+
export default function downloadAsImage(selector: string, description: string, isExactSelector?: boolean): (event: SyntheticEvent) => Promise<void> | null;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GenericDataType } from './data';
|
|
2
|
+
export declare const useTools: () => {
|
|
3
|
+
formatTime: (value: string | number, formatStr?: string) => string | number;
|
|
4
|
+
getFieldType: (fieldName: string, value?: any) => GenericDataType | undefined;
|
|
5
|
+
formatValue: (fieldName: string, value: any, formatStr?: string) => any;
|
|
6
|
+
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.0.
|
|
1
|
+
declare const _default: "0.0.23";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@advt-gpt-chart/package",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.23",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -22,24 +22,33 @@
|
|
|
22
22
|
"publish-local": "vite build && tsc -p ./tsconfig.types.json && yalc publish",
|
|
23
23
|
"publish-local-update": "vite build && tsc -p ./tsconfig.types.json && yalc push --replace",
|
|
24
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"
|
|
25
|
+
"publish-npm": "npm publish --registry https://registry.npmjs.org/ --access public",
|
|
26
|
+
"json-server": "json-server --watch ./public/db.json --port 3008"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
29
|
"@antv/event-emitter": "^0.1.3",
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@visactor/
|
|
32
|
-
"@visactor/
|
|
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",
|
|
33
37
|
"antd": "^5.25.4",
|
|
38
|
+
"axios": "^1.10.0",
|
|
34
39
|
"dayjs": "^1.11.13",
|
|
40
|
+
"dom-to-image-more": "^3.6.0",
|
|
35
41
|
"lodash-es": "^4.17.21",
|
|
42
|
+
"nanoid": "^5.1.5",
|
|
36
43
|
"react": "^18.2.0",
|
|
37
44
|
"react-dom": "^18.2.0",
|
|
38
45
|
"react-intl": "^7.1.11",
|
|
39
46
|
"react-markdown": "^10.1.0",
|
|
40
47
|
"rehype-raw": "^7.0.0",
|
|
41
48
|
"remark-gfm": "^4.0.1",
|
|
42
|
-
"styled-components": "^6.1.18"
|
|
49
|
+
"styled-components": "^6.1.18",
|
|
50
|
+
"vite-plugin-svgr": "^4.3.0",
|
|
51
|
+
"zustand": "^5.0.6"
|
|
43
52
|
},
|
|
44
53
|
"devDependencies": {
|
|
45
54
|
"@ant-design/icons": "^6.0.0",
|
|
@@ -65,6 +74,7 @@
|
|
|
65
74
|
"@types/react-dom": "^18.2.25",
|
|
66
75
|
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
67
76
|
"@typescript-eslint/parser": "^8.33.1",
|
|
77
|
+
"@vitejs/plugin-basic-ssl": "^2.1.0",
|
|
68
78
|
"@vitejs/plugin-react": "^4.5.1",
|
|
69
79
|
"dumi": "^2.4.21",
|
|
70
80
|
"eslint": "^9.28.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ChartComponents } from './type';
|
|
3
|
-
type RenderVisChartProps = {
|
|
4
|
-
content: string;
|
|
5
|
-
components: ChartComponents;
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
loadingTimeout: number;
|
|
8
|
-
style?: React.CSSProperties;
|
|
9
|
-
};
|
|
10
|
-
export declare const RenderVisChart: React.FC<RenderVisChartProps>;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ChartConfigType {
|
|
3
|
-
theme?: string;
|
|
4
|
-
}
|
|
5
|
-
export type ChartConfigProviderProps = {
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
} & ChartConfigType;
|
|
8
|
-
export declare const ChartConfigContext: React.Context<ChartConfigType>;
|
|
9
|
-
export declare const ChartConfigProvider: React.FC<ChartConfigProviderProps>;
|
|
10
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseChartProps } from '../types';
|
|
3
|
-
export interface ChartContainerProps extends BaseChartProps {
|
|
4
|
-
Chart?: React.ReactNode;
|
|
5
|
-
chartTheme?: string;
|
|
6
|
-
chartName?: string;
|
|
7
|
-
}
|
|
8
|
-
declare function ChartContainer({ Chart, containerStyle, className, chartTheme, chartName }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { ChartContainer };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const StyleChartContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
-
theme: string;
|
|
4
|
-
style?: React.CSSProperties;
|
|
5
|
-
}>> & string;
|