hfn-components 0.2.5 → 0.2.7

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 (69) hide show
  1. package/component.ts +13 -0
  2. package/defaults.ts +5 -0
  3. package/index.ts +6 -0
  4. package/make-installer.ts +17 -0
  5. package/package.json +2 -2
  6. package/plugin.ts +1 -0
  7. package/dist/index.css +0 -1
  8. package/es/_virtual/_plugin-vue_export-helper.mjs +0 -9
  9. package/es/component.d.ts +0 -3
  10. package/es/component.mjs +0 -10
  11. package/es/components/chart/index.d.ts +0 -171
  12. package/es/components/chart/index.mjs +0 -7
  13. package/es/components/chart/src/HtChart.d.ts +0 -65
  14. package/es/components/chart/src/HtChart.mjs +0 -86
  15. package/es/components/chart/src/HtChart.vue.d.ts +0 -177
  16. package/es/components/chart/src/HtChart.vue.mjs +0 -91
  17. package/es/components/chart/src/HtChart.vue2.mjs +0 -104
  18. package/es/components/chart/src/chartConfig.d.ts +0 -7
  19. package/es/components/chart/src/chartConfig.mjs +0 -88
  20. package/es/components/chart/style/index.d.ts +0 -1
  21. package/es/components/chart/style/index.mjs +0 -1
  22. package/es/components/elTable/index.d.ts +0 -714
  23. package/es/components/elTable/index.mjs +0 -7
  24. package/es/components/elTable/src/columnDeal.vue.d.ts +0 -37
  25. package/es/components/elTable/src/columnDeal.vue.mjs +0 -35
  26. package/es/components/elTable/src/columnDeal.vue2.mjs +0 -19
  27. package/es/components/elTable/src/elTable.d.ts +0 -38
  28. package/es/components/elTable/src/elTable.mjs +0 -30
  29. package/es/components/elTable/src/elTable.vue.d.ts +0 -713
  30. package/es/components/elTable/src/elTable.vue.mjs +0 -56
  31. package/es/components/elTable/src/elTable.vue2.mjs +0 -29
  32. package/es/components/index.d.ts +0 -2
  33. package/es/components/index.mjs +0 -4
  34. package/es/components/table/HtTable.d.ts +0 -142
  35. package/es/components/table/HtTable.mjs +0 -136
  36. package/es/components/table/HtTable.vue.d.ts +0 -1847
  37. package/es/components/table/HtTable.vue.mjs +0 -449
  38. package/es/components/table/HtTable.vue2.mjs +0 -124
  39. package/es/components/table/index.d.ts +0 -1845
  40. package/es/components/table/index.mjs +0 -7
  41. package/es/constants/index.d.ts +0 -2
  42. package/es/constants/index.mjs +0 -2
  43. package/es/constants/key.d.ts +0 -1
  44. package/es/constants/key.mjs +0 -3
  45. package/es/constants/table.d.ts +0 -61
  46. package/es/constants/table.mjs +0 -73
  47. package/es/defaults.d.ts +0 -4
  48. package/es/defaults.mjs +0 -7
  49. package/es/index.d.ts +0 -5
  50. package/es/index.mjs +0 -10
  51. package/es/make-installer.d.ts +0 -4
  52. package/es/make-installer.mjs +0 -14
  53. package/es/plugin.d.ts +0 -2
  54. package/es/plugin.mjs +0 -3
  55. package/es/utils/chart.d.ts +0 -7
  56. package/es/utils/chart.mjs +0 -172
  57. package/es/utils/common.d.ts +0 -3
  58. package/es/utils/common.mjs +0 -15
  59. package/es/utils/index.d.ts +0 -4
  60. package/es/utils/index.mjs +0 -4
  61. package/es/utils/table.d.ts +0 -2
  62. package/es/utils/table.mjs +0 -31
  63. package/es/utils/tool.d.ts +0 -2
  64. package/es/utils/tool.mjs +0 -42
  65. package/global.d.ts +0 -14
  66. package/theme-chalk/ht-chart.css +0 -1
  67. package/theme-chalk/index.css +0 -1
  68. package/theme-chalk/src/chart.scss +0 -53
  69. package/theme-chalk/src/index.scss +0 -1
package/component.ts ADDED
@@ -0,0 +1,13 @@
1
+ // import { HtTable } from '@hfn-components/components/table'
2
+ import { HtElTable } from '@hfn-components/components/elTable'
3
+ import { HtChart } from '@hfn-components/components/chart'
4
+ import { HtPieChart } from '@hfn-components/components/pieChart'
5
+
6
+ import type { Plugin } from 'vue'
7
+
8
+ export default [
9
+ // HtTable,
10
+ HtChart,
11
+ HtElTable,
12
+ HtPieChart
13
+ ] as Plugin[]
package/defaults.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { makeInstaller } from './make-installer'
2
+ import Components from './component'
3
+ import Plugins from './plugin'
4
+
5
+ export default makeInstaller([...Components, ...Plugins])
package/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ import installer from './defaults'
2
+ export * from './make-installer'
3
+ export * from '@hfn-components/components'
4
+
5
+ export const install = installer.install
6
+ export default installer
@@ -0,0 +1,17 @@
1
+ import type { App, Plugin } from 'vue'
2
+ import { INSTALLED_KEY } from '@hfn-components/constants'
3
+
4
+ export const makeInstaller = (components: Plugin[] = []) => {
5
+ const install = (app: App) => {
6
+ if (app[INSTALLED_KEY]) return
7
+
8
+ app[INSTALLED_KEY] = true
9
+ components.forEach(c => app.use(c))
10
+
11
+ // if (options) provideGlobalConfig(options, app, true)
12
+ }
13
+
14
+ return {
15
+ install
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "es/index.mjs",
@@ -11,7 +11,7 @@
11
11
  "keywords": [],
12
12
  "author": "",
13
13
  "license": "ISC",
14
- "devDependencies":{
14
+ "devDependencies": {
15
15
  "ant-design-vue": "3.2.20",
16
16
  "@ant-design/icons-vue": "^7.0.1",
17
17
  "element-plus": "^2.7.7"
package/plugin.ts ADDED
@@ -0,0 +1 @@
1
+ export default []
package/dist/index.css DELETED
@@ -1 +0,0 @@
1
- .echart-box{display:flex;flex-direction:column;height:100%;position:relative;width:100%}.echart-content{flex:auto}.echart-lenged{box-sizing:border-box;display:flex;flex-wrap:wrap;font-size:12px;height:auto;margin-top:6px;padding-right:22px;position:relative;width:100%;z-index:999}.bg-span{height:2px;width:14px}.bg-span,.bg-span-bar{display:inline-block;margin-right:6px}.bg-span-bar{border-radius:2px;height:10px;width:16px}.span-box{cursor:pointer;margin-left:5px;margin-right:6px}.noData,.span-box{align-items:center;display:flex}.noData{bottom:0;color:#ccc;font-size:16px;height:100%;justify-content:center;position:absolute;width:100%}
@@ -1,9 +0,0 @@
1
- var _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
7
- };
8
-
9
- export { _export_sfc as default };
package/es/component.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { Plugin } from 'vue';
2
- declare const _default: Plugin[];
3
- export default _default;
package/es/component.mjs DELETED
@@ -1,10 +0,0 @@
1
- import { HtElTable } from './components/elTable/index.mjs';
2
- import { HtChart } from './components/chart/index.mjs';
3
-
4
- var Components = [
5
- // HtTable,
6
- HtChart,
7
- HtElTable
8
- ];
9
-
10
- export { Components as default };
@@ -1,171 +0,0 @@
1
- export declare const HtChart: import("hfn-components/es/utils").SFCWithInstall<import("vue").DefineComponent<{
2
- readonly chartData: {
3
- readonly type: import("vue").PropType<any[]>;
4
- readonly default: () => never[];
5
- };
6
- readonly chartId: {
7
- readonly type: StringConstructor;
8
- readonly default: "";
9
- };
10
- readonly chartType: {
11
- readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
12
- readonly default: "";
13
- };
14
- readonly xAxisData: {
15
- readonly type: import("vue").PropType<string[]>;
16
- readonly default: readonly [];
17
- };
18
- readonly collation: {
19
- readonly type: StringConstructor;
20
- readonly default: "des";
21
- };
22
- readonly isReturn: {
23
- readonly type: BooleanConstructor;
24
- readonly default: false;
25
- };
26
- readonly isPercent: {
27
- readonly type: BooleanConstructor;
28
- readonly default: false;
29
- };
30
- readonly floatNumber: {
31
- readonly type: NumberConstructor;
32
- readonly default: 4;
33
- };
34
- readonly titleText: {
35
- readonly type: StringConstructor;
36
- readonly default: "";
37
- };
38
- readonly yAxisUnit: {
39
- readonly type: StringConstructor;
40
- readonly default: "";
41
- };
42
- readonly tooltipUnit: {
43
- readonly type: StringConstructor;
44
- readonly default: "";
45
- };
46
- readonly watchResize: {
47
- readonly type: BooleanConstructor;
48
- readonly default: false;
49
- };
50
- readonly showLegend: {
51
- readonly type: BooleanConstructor;
52
- readonly default: true;
53
- };
54
- readonly downLoadAutn: {
55
- readonly type: BooleanConstructor;
56
- readonly default: false;
57
- };
58
- readonly lineColor: {
59
- readonly type: import("vue").PropType<string[]>;
60
- readonly default: readonly [];
61
- };
62
- }, {
63
- props: import("@vue/shared").LooseRequired<{
64
- readonly chartData: any[];
65
- readonly chartId: string;
66
- readonly chartType: import("hfn-components/es/utils").chartType;
67
- readonly xAxisData: string[];
68
- readonly collation: string;
69
- readonly isReturn: boolean;
70
- readonly isPercent: boolean;
71
- readonly floatNumber: number;
72
- readonly titleText: string;
73
- readonly yAxisUnit: string;
74
- readonly tooltipUnit: string;
75
- readonly watchResize: boolean;
76
- readonly showLegend: boolean;
77
- readonly downLoadAutn: boolean;
78
- readonly lineColor: string[];
79
- } & {}>;
80
- myChart: import("vue").ShallowRef<any>;
81
- isEmpty: import("vue").Ref<boolean>;
82
- echartOptions: any;
83
- drawGraph: () => void;
84
- lengedDeal: () => void;
85
- echartInit: () => void;
86
- chartResize: () => void;
87
- allLegend: import("vue").Ref<import("./src/HtChart.vue").Legend[]>;
88
- noData: import("vue").Ref<boolean>;
89
- legendStatus: (item: import("./src/HtChart.vue").Legend, index: number) => void;
90
- legendEnter: (index: number) => void;
91
- legendLeave: () => void;
92
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
93
- readonly chartData: {
94
- readonly type: import("vue").PropType<any[]>;
95
- readonly default: () => never[];
96
- };
97
- readonly chartId: {
98
- readonly type: StringConstructor;
99
- readonly default: "";
100
- };
101
- readonly chartType: {
102
- readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
103
- readonly default: "";
104
- };
105
- readonly xAxisData: {
106
- readonly type: import("vue").PropType<string[]>;
107
- readonly default: readonly [];
108
- };
109
- readonly collation: {
110
- readonly type: StringConstructor;
111
- readonly default: "des";
112
- };
113
- readonly isReturn: {
114
- readonly type: BooleanConstructor;
115
- readonly default: false;
116
- };
117
- readonly isPercent: {
118
- readonly type: BooleanConstructor;
119
- readonly default: false;
120
- };
121
- readonly floatNumber: {
122
- readonly type: NumberConstructor;
123
- readonly default: 4;
124
- };
125
- readonly titleText: {
126
- readonly type: StringConstructor;
127
- readonly default: "";
128
- };
129
- readonly yAxisUnit: {
130
- readonly type: StringConstructor;
131
- readonly default: "";
132
- };
133
- readonly tooltipUnit: {
134
- readonly type: StringConstructor;
135
- readonly default: "";
136
- };
137
- readonly watchResize: {
138
- readonly type: BooleanConstructor;
139
- readonly default: false;
140
- };
141
- readonly showLegend: {
142
- readonly type: BooleanConstructor;
143
- readonly default: true;
144
- };
145
- readonly downLoadAutn: {
146
- readonly type: BooleanConstructor;
147
- readonly default: false;
148
- };
149
- readonly lineColor: {
150
- readonly type: import("vue").PropType<string[]>;
151
- readonly default: readonly [];
152
- };
153
- }>>, {
154
- readonly chartData: any[];
155
- readonly chartId: string;
156
- readonly chartType: import("hfn-components/es/utils").chartType;
157
- readonly xAxisData: string[];
158
- readonly collation: string;
159
- readonly isReturn: boolean;
160
- readonly isPercent: boolean;
161
- readonly floatNumber: number;
162
- readonly titleText: string;
163
- readonly yAxisUnit: string;
164
- readonly tooltipUnit: string;
165
- readonly watchResize: boolean;
166
- readonly showLegend: boolean;
167
- readonly downLoadAutn: boolean;
168
- readonly lineColor: string[];
169
- }, {}>> & Record<string, any>;
170
- export default HtChart;
171
- export * from './src/HtChart';
@@ -1,7 +0,0 @@
1
- import chart from './src/HtChart.vue.mjs';
2
- import { withInstall } from '../../utils/common.mjs';
3
- export { chartProps } from './src/HtChart.mjs';
4
-
5
- const HtChart = withInstall(chart);
6
-
7
- export { HtChart, HtChart as default };
@@ -1,65 +0,0 @@
1
- import { PropType, ExtractPropTypes } from 'vue';
2
- import type { chartType } from 'hfn-components/es/utils';
3
- export declare const chartProps: {
4
- readonly chartData: {
5
- readonly type: PropType<any[]>;
6
- readonly default: () => never[];
7
- };
8
- readonly chartId: {
9
- readonly type: StringConstructor;
10
- readonly default: "";
11
- };
12
- readonly chartType: {
13
- readonly type: PropType<chartType>;
14
- readonly default: "";
15
- };
16
- readonly xAxisData: {
17
- readonly type: PropType<string[]>;
18
- readonly default: readonly [];
19
- };
20
- readonly collation: {
21
- readonly type: StringConstructor;
22
- readonly default: "des";
23
- };
24
- readonly isReturn: {
25
- readonly type: BooleanConstructor;
26
- readonly default: false;
27
- };
28
- readonly isPercent: {
29
- readonly type: BooleanConstructor;
30
- readonly default: false;
31
- };
32
- readonly floatNumber: {
33
- readonly type: NumberConstructor;
34
- readonly default: 4;
35
- };
36
- readonly titleText: {
37
- readonly type: StringConstructor;
38
- readonly default: "";
39
- };
40
- readonly yAxisUnit: {
41
- readonly type: StringConstructor;
42
- readonly default: "";
43
- };
44
- readonly tooltipUnit: {
45
- readonly type: StringConstructor;
46
- readonly default: "";
47
- };
48
- readonly watchResize: {
49
- readonly type: BooleanConstructor;
50
- readonly default: false;
51
- };
52
- readonly showLegend: {
53
- readonly type: BooleanConstructor;
54
- readonly default: true;
55
- };
56
- readonly downLoadAutn: {
57
- readonly type: BooleanConstructor;
58
- readonly default: false;
59
- };
60
- readonly lineColor: {
61
- readonly type: PropType<string[]>;
62
- readonly default: readonly [];
63
- };
64
- };
65
- export type chartProp = ExtractPropTypes<typeof chartProps>;
@@ -1,86 +0,0 @@
1
- const chartProps = {
2
- //图表数据
3
- chartData: {
4
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
- type: Array,
6
- default: () => []
7
- },
8
- //图表id
9
- chartId: {
10
- type: String,
11
- default: ""
12
- },
13
- //图表高度
14
- // chartHeight: {
15
- // type: String,
16
- // default: ''
17
- // },
18
- chartType: {
19
- type: String,
20
- default: ""
21
- },
22
- //是否为类目轴
23
- // isCategory: {
24
- // type: Boolean,
25
- // default: false
26
- // },
27
- //是类目轴时x轴数据
28
- xAxisData: {
29
- type: Array,
30
- default: []
31
- },
32
- collation: {
33
- type: String,
34
- default: "des"
35
- },
36
- //是否为收益率
37
- isReturn: {
38
- type: Boolean,
39
- default: false
40
- },
41
- //是否有百分比
42
- isPercent: {
43
- type: Boolean,
44
- default: false
45
- },
46
- //保留几位小数
47
- floatNumber: {
48
- type: Number,
49
- default: 4
50
- },
51
- //y轴文本
52
- titleText: {
53
- type: String,
54
- default: ""
55
- },
56
- //Y轴单位
57
- yAxisUnit: {
58
- type: String,
59
- default: ""
60
- },
61
- //tooltip单位
62
- tooltipUnit: {
63
- type: String,
64
- default: ""
65
- },
66
- //图表重新加载
67
- watchResize: {
68
- type: Boolean,
69
- default: false
70
- },
71
- showLegend: {
72
- type: Boolean,
73
- default: true
74
- },
75
- //数据下载
76
- downLoadAutn: {
77
- type: Boolean,
78
- default: false
79
- },
80
- lineColor: {
81
- type: Array,
82
- default: []
83
- }
84
- };
85
-
86
- export { chartProps };
@@ -1,177 +0,0 @@
1
- import type { Ref } from 'vue';
2
- export interface Legend {
3
- name: string;
4
- lineType: string;
5
- isShow: boolean;
6
- color: string;
7
- }
8
- declare const _default: import("vue").DefineComponent<{
9
- readonly chartData: {
10
- readonly type: import("vue").PropType<any[]>;
11
- readonly default: () => never[];
12
- };
13
- readonly chartId: {
14
- readonly type: StringConstructor;
15
- readonly default: "";
16
- };
17
- readonly chartType: {
18
- readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
19
- readonly default: "";
20
- };
21
- readonly xAxisData: {
22
- readonly type: import("vue").PropType<string[]>;
23
- readonly default: readonly [];
24
- };
25
- readonly collation: {
26
- readonly type: StringConstructor;
27
- readonly default: "des";
28
- };
29
- readonly isReturn: {
30
- readonly type: BooleanConstructor;
31
- readonly default: false;
32
- };
33
- readonly isPercent: {
34
- readonly type: BooleanConstructor;
35
- readonly default: false;
36
- };
37
- readonly floatNumber: {
38
- readonly type: NumberConstructor;
39
- readonly default: 4;
40
- };
41
- readonly titleText: {
42
- readonly type: StringConstructor;
43
- readonly default: "";
44
- };
45
- readonly yAxisUnit: {
46
- readonly type: StringConstructor;
47
- readonly default: "";
48
- };
49
- readonly tooltipUnit: {
50
- readonly type: StringConstructor;
51
- readonly default: "";
52
- };
53
- readonly watchResize: {
54
- readonly type: BooleanConstructor;
55
- readonly default: false;
56
- };
57
- readonly showLegend: {
58
- readonly type: BooleanConstructor;
59
- readonly default: true;
60
- };
61
- readonly downLoadAutn: {
62
- readonly type: BooleanConstructor;
63
- readonly default: false;
64
- };
65
- readonly lineColor: {
66
- readonly type: import("vue").PropType<string[]>;
67
- readonly default: readonly [];
68
- };
69
- }, {
70
- props: import("@vue/shared").LooseRequired<{
71
- readonly chartData: any[];
72
- readonly chartId: string;
73
- readonly chartType: import("hfn-components/es/utils").chartType;
74
- readonly xAxisData: string[];
75
- readonly collation: string;
76
- readonly isReturn: boolean;
77
- readonly isPercent: boolean;
78
- readonly floatNumber: number;
79
- readonly titleText: string;
80
- readonly yAxisUnit: string;
81
- readonly tooltipUnit: string;
82
- readonly watchResize: boolean;
83
- readonly showLegend: boolean;
84
- readonly downLoadAutn: boolean;
85
- readonly lineColor: string[];
86
- } & {}>;
87
- myChart: import("vue").ShallowRef<any>;
88
- isEmpty: Ref<boolean>;
89
- echartOptions: any;
90
- drawGraph: () => void;
91
- lengedDeal: () => void;
92
- echartInit: () => void;
93
- chartResize: () => void;
94
- allLegend: Ref<Legend[]>;
95
- noData: Ref<boolean>;
96
- legendStatus: (item: Legend, index: number) => void;
97
- legendEnter: (index: number) => void;
98
- legendLeave: () => void;
99
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
100
- readonly chartData: {
101
- readonly type: import("vue").PropType<any[]>;
102
- readonly default: () => never[];
103
- };
104
- readonly chartId: {
105
- readonly type: StringConstructor;
106
- readonly default: "";
107
- };
108
- readonly chartType: {
109
- readonly type: import("vue").PropType<import("hfn-components/es/utils").chartType>;
110
- readonly default: "";
111
- };
112
- readonly xAxisData: {
113
- readonly type: import("vue").PropType<string[]>;
114
- readonly default: readonly [];
115
- };
116
- readonly collation: {
117
- readonly type: StringConstructor;
118
- readonly default: "des";
119
- };
120
- readonly isReturn: {
121
- readonly type: BooleanConstructor;
122
- readonly default: false;
123
- };
124
- readonly isPercent: {
125
- readonly type: BooleanConstructor;
126
- readonly default: false;
127
- };
128
- readonly floatNumber: {
129
- readonly type: NumberConstructor;
130
- readonly default: 4;
131
- };
132
- readonly titleText: {
133
- readonly type: StringConstructor;
134
- readonly default: "";
135
- };
136
- readonly yAxisUnit: {
137
- readonly type: StringConstructor;
138
- readonly default: "";
139
- };
140
- readonly tooltipUnit: {
141
- readonly type: StringConstructor;
142
- readonly default: "";
143
- };
144
- readonly watchResize: {
145
- readonly type: BooleanConstructor;
146
- readonly default: false;
147
- };
148
- readonly showLegend: {
149
- readonly type: BooleanConstructor;
150
- readonly default: true;
151
- };
152
- readonly downLoadAutn: {
153
- readonly type: BooleanConstructor;
154
- readonly default: false;
155
- };
156
- readonly lineColor: {
157
- readonly type: import("vue").PropType<string[]>;
158
- readonly default: readonly [];
159
- };
160
- }>>, {
161
- readonly chartData: any[];
162
- readonly chartId: string;
163
- readonly chartType: import("hfn-components/es/utils").chartType;
164
- readonly xAxisData: string[];
165
- readonly collation: string;
166
- readonly isReturn: boolean;
167
- readonly isPercent: boolean;
168
- readonly floatNumber: number;
169
- readonly titleText: string;
170
- readonly yAxisUnit: string;
171
- readonly tooltipUnit: string;
172
- readonly watchResize: boolean;
173
- readonly showLegend: boolean;
174
- readonly downLoadAutn: boolean;
175
- readonly lineColor: string[];
176
- }, {}>;
177
- export default _default;