@advt-gpt-chart/package 0.0.9

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 (89) hide show
  1. package/README.md +55 -0
  2. package/dist/Area/index.d.ts +3 -0
  3. package/dist/Area/types.d.ts +9 -0
  4. package/dist/Bar/index.d.ts +3 -0
  5. package/dist/Bar/types.d.ts +9 -0
  6. package/dist/ChartCodeRender/Loading.d.ts +2 -0
  7. package/dist/ChartCodeRender/VisChart.d.ts +11 -0
  8. package/dist/ChartCodeRender/index.d.ts +8 -0
  9. package/dist/ChartCodeRender/type.d.ts +54 -0
  10. package/dist/ChartContainer/chartContextProvider.d.ts +10 -0
  11. package/dist/ChartContainer/index.d.ts +9 -0
  12. package/dist/ChartContainer/style.d.ts +5 -0
  13. package/dist/ConfigProvider/context.d.ts +3 -0
  14. package/dist/ConfigProvider/hooks/index.d.ts +1 -0
  15. package/dist/ConfigProvider/hooks/useConfig.d.ts +32 -0
  16. package/dist/ConfigProvider/index.d.ts +7 -0
  17. package/dist/Donut/index.d.ts +3 -0
  18. package/dist/Donut/types.d.ts +8 -0
  19. package/dist/Funnel/index.d.ts +3 -0
  20. package/dist/Funnel/types.d.ts +8 -0
  21. package/dist/GPTVis/Lite.d.ts +19 -0
  22. package/dist/GPTVis/hooks/useContext.d.ts +8 -0
  23. package/dist/GPTVis/hooks/useEvent.d.ts +1 -0
  24. package/dist/GPTVis/index.d.ts +6 -0
  25. package/dist/Gauge/index.d.ts +3 -0
  26. package/dist/Gauge/types.d.ts +8 -0
  27. package/dist/Heatmap/index.d.ts +3 -0
  28. package/dist/Heatmap/types.d.ts +8 -0
  29. package/dist/Indicator/contants.d.ts +5 -0
  30. package/dist/Indicator/index.d.ts +3 -0
  31. package/dist/Indicator/styles.d.ts +7 -0
  32. package/dist/Indicator/types.d.ts +15 -0
  33. package/dist/Line/index.d.ts +3 -0
  34. package/dist/Line/types.d.ts +9 -0
  35. package/dist/Pie/index.d.ts +3 -0
  36. package/dist/Pie/types.d.ts +8 -0
  37. package/dist/Radar/index.d.ts +3 -0
  38. package/dist/Radar/types.d.ts +9 -0
  39. package/dist/Radar/utils.d.ts +2 -0
  40. package/dist/Rank/index.d.ts +3 -0
  41. package/dist/Rank/types.d.ts +9 -0
  42. package/dist/Scatter/index.d.ts +3 -0
  43. package/dist/Scatter/types.d.ts +9 -0
  44. package/dist/Table/index.d.ts +3 -0
  45. package/dist/Table/theme.d.ts +2 -0
  46. package/dist/Table/types.d.ts +7 -0
  47. package/dist/Text/VisText.d.ts +3 -0
  48. package/dist/Text/config.d.ts +19 -0
  49. package/dist/Text/custom-icons/index.d.ts +2 -0
  50. package/dist/Text/index.d.ts +3 -0
  51. package/dist/Text/mini-charts/hooks/getElementFontSize.d.ts +1 -0
  52. package/dist/Text/mini-charts/hooks/index.d.ts +1 -0
  53. package/dist/Text/mini-charts/hooks/useSvgWrapper.d.ts +5 -0
  54. package/dist/Text/mini-charts/index.d.ts +2 -0
  55. package/dist/Text/mini-charts/line/SingleLineChart.d.ts +3 -0
  56. package/dist/Text/mini-charts/line/index.d.ts +1 -0
  57. package/dist/Text/mini-charts/line/scaleLinear.d.ts +4 -0
  58. package/dist/Text/mini-charts/line/useLineCompute.d.ts +6 -0
  59. package/dist/Text/mini-charts/proportion/getArcPath.d.ts +1 -0
  60. package/dist/Text/mini-charts/proportion/index.d.ts +3 -0
  61. package/dist/Text/theme.d.ts +24 -0
  62. package/dist/Text/types.d.ts +20 -0
  63. package/dist/Text/utils/getThemeColor.d.ts +11 -0
  64. package/dist/Text/utils/index.d.ts +2 -0
  65. package/dist/Text/utils/useAntdDarkAlgorithm.d.ts +2 -0
  66. package/dist/VChartBase/constants.d.ts +54 -0
  67. package/dist/VChartBase/index.d.ts +3 -0
  68. package/dist/VChartBase/tooltip.d.ts +1 -0
  69. package/dist/VChartBase/transformed.d.ts +129 -0
  70. package/dist/VChartBase/types.d.ts +15 -0
  71. package/dist/VChartBase/utils.d.ts +15 -0
  72. package/dist/constants/index.d.ts +2 -0
  73. package/dist/constants/light.d.ts +2 -0
  74. package/dist/export.d.ts +34 -0
  75. package/dist/index.d.ts +11 -0
  76. package/dist/index.es.js +136615 -0
  77. package/dist/index.es.js.br +0 -0
  78. package/dist/index.umd.js +825 -0
  79. package/dist/index.umd.js.br +0 -0
  80. package/dist/types/chart.d.ts +27 -0
  81. package/dist/types/config.d.ts +16 -0
  82. package/dist/types/index.d.ts +4 -0
  83. package/dist/types.d.ts +1 -0
  84. package/dist/utils/config.d.ts +2 -0
  85. package/dist/utils/date.d.ts +3 -0
  86. package/dist/utils/echart.d.ts +4 -0
  87. package/dist/utils/index.d.ts +0 -0
  88. package/dist/version.d.ts +2 -0
  89. package/package.json +94 -0
Binary file
@@ -0,0 +1,27 @@
1
+ import type { CSSProperties, ReactNode } from 'react';
2
+ export declare enum ChartType {
3
+ Area = "area",
4
+ Bar = "bar",
5
+ Donut = "donut",
6
+ Funnel = "funnel",
7
+ Gauge = "gauge",
8
+ Heatmap = "heatmap",
9
+ Line = "line",
10
+ Pie = "pie",
11
+ Radar = "radar",
12
+ Rank = "rank",
13
+ Scatter = "scatter",
14
+ VisText = "vis-text",
15
+ Table = "table",
16
+ Indicator = "indicator"
17
+ }
18
+ export type Charts = keyof typeof ChartType;
19
+ export type DataItem = {
20
+ [key: string]: string | number;
21
+ };
22
+ export type DataType = DataItem[] | DataItem[][];
23
+ export interface BaseChartProps {
24
+ containerStyle?: CSSProperties;
25
+ className?: string;
26
+ children?: ReactNode;
27
+ }
@@ -0,0 +1,16 @@
1
+ import type { Charts } from './chart';
2
+ export type CommonGlobalConfig = {
3
+ theme?: string;
4
+ [key: string]: any;
5
+ };
6
+ export type VChartGlobalConfig = {
7
+ color?: string[];
8
+ [key: string]: any;
9
+ };
10
+ type ComponentsGlobalConfig = Partial<Record<Charts, Record<string, any>>>;
11
+ export type GlobalConfig = {
12
+ common?: CommonGlobalConfig;
13
+ vchart?: VChartGlobalConfig;
14
+ components?: ComponentsGlobalConfig;
15
+ };
16
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from '../VChartBase/types';
2
+ export * from '../VChartBase/types';
3
+ export * from './chart';
4
+ export type { GlobalConfig } from './config';
@@ -0,0 +1 @@
1
+ export * from './types/index';
@@ -0,0 +1,2 @@
1
+ import type { GlobalConfig } from '../types';
2
+ export declare const mergeGlobalConfig: (config: GlobalConfig) => GlobalConfig;
@@ -0,0 +1,3 @@
1
+ export declare const DATE_FORMATS: string[];
2
+ export declare function matchesDateFormat(value: string): boolean;
3
+ export declare const formatTime: (value: string | number, formatStr?: string) => string | number;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 将 GPT-Vis 图表的配置转换为图表的配置
3
+ */
4
+ export declare function transform2ChartProps<T extends Record<string, any>>(props: T): T;
File without changes
@@ -0,0 +1,2 @@
1
+ declare const _default: "0.0.8";
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "@advt-gpt-chart/package",
3
+ "private": false,
4
+ "version": "0.0.9",
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
+ },
27
+ "dependencies": {
28
+ "@antv/event-emitter": "^0.1.3",
29
+ "@visactor/react-vchart": "^1.13.11",
30
+ "@visactor/vchart": "^1.13.11",
31
+ "@visactor/vdataset": "^1.0.6",
32
+ "@visactor/vtable": "^1.18.4",
33
+ "antd": "^5.25.4",
34
+ "dayjs": "^1.11.13",
35
+ "lodash-es": "^4.17.21",
36
+ "react": "^18.2.0",
37
+ "react-dom": "^18.2.0",
38
+ "react-intl": "^7.1.11",
39
+ "react-markdown": "^10.1.0",
40
+ "rehype-raw": "^7.0.0",
41
+ "remark-gfm": "^4.0.1",
42
+ "styled-components": "^6.1.18"
43
+ },
44
+ "devDependencies": {
45
+ "@ant-design/icons": "^6.0.0",
46
+ "@ant-design/x": "^1.4.0",
47
+ "@chromatic-com/storybook": "4.0.0",
48
+ "@eslint/js": "^9.28.0",
49
+ "@storybook/addon-actions": "^9.0.4",
50
+ "@storybook/addon-essentials": "^8.6.14",
51
+ "@storybook/addon-interactions": "^8.6.14",
52
+ "@storybook/addon-links": "^9.0.4",
53
+ "@storybook/addon-onboarding": "^9.0.4",
54
+ "@storybook/blocks": "^8.6.14",
55
+ "@storybook/react": "^9.0.4",
56
+ "@storybook/react-vite": "^9.0.4",
57
+ "@storybook/test": "^8.6.14",
58
+ "@testing-library/dom": "^10.4.0",
59
+ "@testing-library/jest-dom": "^6.6.3",
60
+ "@testing-library/react": "^16.3.0",
61
+ "@types/jest": "^29.5.14",
62
+ "@types/lodash-es": "^4.17.12",
63
+ "@types/node": "^22.15.29",
64
+ "@types/react": "^18.2.79",
65
+ "@types/react-dom": "^18.2.25",
66
+ "@typescript-eslint/eslint-plugin": "^8.33.1",
67
+ "@typescript-eslint/parser": "^8.33.1",
68
+ "@vitejs/plugin-react": "^4.5.1",
69
+ "dumi": "^2.4.21",
70
+ "eslint": "^9.28.0",
71
+ "eslint-plugin-react": "^7.37.5",
72
+ "eslint-plugin-react-hooks": "^5.2.0",
73
+ "eslint-plugin-react-refresh": "^0.4.20",
74
+ "eslint-plugin-simple-import-sort": "^12.1.1",
75
+ "eslint-plugin-storybook": "^9.0.4",
76
+ "globals": "^16.2.0",
77
+ "jest": "^29.7.0",
78
+ "jest-environment-jsdom": "^29.7.0",
79
+ "prettier": "^3.5.3",
80
+ "rollup-plugin-visualizer": "^6.0.3",
81
+ "storybook": "^9.0.4",
82
+ "terser": "^5.40.0",
83
+ "ts-jest": "^29.3.4",
84
+ "ts-node": "^10.9.2",
85
+ "tslib": "^2.8.1",
86
+ "typescript": "^5.8.3",
87
+ "typescript-eslint": "^8.33.1",
88
+ "vite": "^6.3.5",
89
+ "vite-plugin-compression": "^0.5.1"
90
+ },
91
+ "peerDependencies": {
92
+ "antd": ">=4.0.0"
93
+ }
94
+ }