@dfsj/components 3.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +203 -0
  2. package/LICENSE +22 -0
  3. package/README.md +27 -0
  4. package/dist/components/Boards/index.d.ts +4 -0
  5. package/dist/components/Boards/src/Boards.vue.d.ts +33 -0
  6. package/dist/components/Boards/src/Boards.vue.js +5 -0
  7. package/dist/components/Boards/src/Boards.vue2.js +113 -0
  8. package/dist/components/Boards/src/props.d.ts +27 -0
  9. package/dist/components/Boards/src/props.js +18 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/src/composables/use-month-range-header.d.ts +16 -0
  12. package/dist/components/DatePicker/src/composables/use-month-range-header.js +52 -0
  13. package/dist/components/DatePicker/src/composables/use-range-picker.d.ts +100 -0
  14. package/dist/components/DatePicker/src/composables/use-range-picker.js +99 -0
  15. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.d.ts +19 -0
  16. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue.js +5 -0
  17. package/dist/components/DatePicker/src/date-picker-com/panel-date-range.vue2.js +564 -0
  18. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.d.ts +16 -0
  19. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue.js +5 -0
  20. package/dist/components/DatePicker/src/date-picker-com/panel-month-range.vue2.js +210 -0
  21. package/dist/components/DatePicker/src/index.d.ts +196 -0
  22. package/dist/components/DatePicker/src/index.js +87 -0
  23. package/dist/components/DatePicker/src/panel-utils.d.ts +2 -0
  24. package/dist/components/DatePicker/src/panel-utils.js +25 -0
  25. package/dist/components/Editor/index.d.ts +6 -0
  26. package/dist/components/Editor/src/Editor.vue.d.ts +50 -0
  27. package/dist/components/Editor/src/Editor.vue.js +5 -0
  28. package/dist/components/Editor/src/Editor.vue2.js +138 -0
  29. package/dist/components/Form/index.d.ts +16 -0
  30. package/dist/components/Form/src/Form.vue.d.ts +164 -0
  31. package/dist/components/Form/src/Form.vue.js +5 -0
  32. package/dist/components/Form/src/Form.vue2.js +378 -0
  33. package/dist/components/Form/src/components/useRenderCheckbox.d.ts +4 -0
  34. package/dist/components/Form/src/components/useRenderCheckbox.js +33 -0
  35. package/dist/components/Form/src/components/useRenderRadio.d.ts +4 -0
  36. package/dist/components/Form/src/components/useRenderRadio.js +33 -0
  37. package/dist/components/Form/src/components/useRenderSelect.d.ts +4 -0
  38. package/dist/components/Form/src/components/useRenderSelect.js +52 -0
  39. package/dist/components/Form/src/helper/componentMap.d.ts +5 -0
  40. package/dist/components/Form/src/helper/componentMap.js +35 -0
  41. package/dist/components/Form/src/helper/index.d.ts +7 -0
  42. package/dist/components/Form/src/helper/index.js +109 -0
  43. package/dist/components/Form/src/types/index.d.ts +533 -0
  44. package/dist/components/Form/src/types/index.js +31 -0
  45. package/dist/components/Form/src/useForm.d.ts +1 -0
  46. package/dist/components/Form/src/useForm.js +290 -0
  47. package/dist/components/Highlight/index.d.ts +2 -0
  48. package/dist/components/Highlight/src/Highlight.vue.d.ts +41 -0
  49. package/dist/components/Highlight/src/Highlight.vue.js +5 -0
  50. package/dist/components/Highlight/src/Highlight.vue2.js +62 -0
  51. package/dist/components/Icon/index.d.ts +3 -0
  52. package/dist/components/Icon/src/Icon.vue.d.ts +49 -0
  53. package/dist/components/Icon/src/Icon.vue.js +5 -0
  54. package/dist/components/Icon/src/Icon.vue2.js +123 -0
  55. package/dist/components/Icon/src/SvgIcon.vue.d.ts +45 -0
  56. package/dist/components/Icon/src/SvgIcon.vue.js +7 -0
  57. package/dist/components/Icon/src/SvgIcon.vue2.js +45 -0
  58. package/dist/components/Icon/src/SvgIcon.vue3.js +14 -0
  59. package/dist/components/InputPassword/index.d.ts +2 -0
  60. package/dist/components/InputPassword/src/InputPassword.vue.d.ts +27 -0
  61. package/dist/components/InputPassword/src/InputPassword.vue.js +5 -0
  62. package/dist/components/InputPassword/src/InputPassword.vue2.js +58 -0
  63. package/dist/components/Modal/index.d.ts +2 -0
  64. package/dist/components/Modal/src/BasicModal.vue.d.ts +280 -0
  65. package/dist/components/Modal/src/BasicModal.vue.js +5 -0
  66. package/dist/components/Modal/src/BasicModal.vue2.js +150 -0
  67. package/dist/components/Modal/src/components/ModalFooter.vue.d.ts +86 -0
  68. package/dist/components/Modal/src/components/ModalFooter.vue.js +5 -0
  69. package/dist/components/Modal/src/components/ModalFooter.vue2.js +30 -0
  70. package/dist/components/Modal/src/components/ModalHeader.vue.d.ts +142 -0
  71. package/dist/components/Modal/src/components/ModalHeader.vue.js +5 -0
  72. package/dist/components/Modal/src/components/ModalHeader.vue2.js +63 -0
  73. package/dist/components/Modal/src/config.d.ts +24 -0
  74. package/dist/components/Modal/src/config.js +25 -0
  75. package/dist/components/Modal/src/hooks/useModalDrag.d.ts +24 -0
  76. package/dist/components/Modal/src/hooks/useModalDrag.js +108 -0
  77. package/dist/components/Modal/src/hooks/useTimeout.d.ts +15 -0
  78. package/dist/components/Modal/src/hooks/useTimeout.js +53 -0
  79. package/dist/components/Modal/src/props.d.ts +131 -0
  80. package/dist/components/Modal/src/props.js +107 -0
  81. package/dist/components/Modal/src/utils/index.d.ts +3 -0
  82. package/dist/components/Modal/src/utils/index.js +86 -0
  83. package/dist/components/Stateful/index.d.ts +4 -0
  84. package/dist/components/Stateful/src/State.d.ts +20 -0
  85. package/dist/components/Stateful/src/State.js +82 -0
  86. package/dist/components/Stateful/src/Stateful.vue.d.ts +44 -0
  87. package/dist/components/Stateful/src/Stateful.vue.js +5 -0
  88. package/dist/components/Stateful/src/Stateful.vue2.js +46 -0
  89. package/dist/components/Stateful/src/props.d.ts +39 -0
  90. package/dist/components/Stateful/src/props.js +29 -0
  91. package/dist/components/Table/index.d.ts +14 -0
  92. package/dist/components/Table/src/Table.vue.d.ts +537 -0
  93. package/dist/components/Table/src/Table.vue.js +5 -0
  94. package/dist/components/Table/src/Table.vue2.js +582 -0
  95. package/dist/components/Table/src/components/ColumnSetting.vue.d.ts +30 -0
  96. package/dist/components/Table/src/components/ColumnSetting.vue.js +5 -0
  97. package/dist/components/Table/src/components/ColumnSetting.vue2.js +264 -0
  98. package/dist/components/Table/src/components/TableActions.vue.d.ts +20 -0
  99. package/dist/components/Table/src/components/TableActions.vue.js +5 -0
  100. package/dist/components/Table/src/components/TableActions.vue2.js +108 -0
  101. package/dist/components/Table/src/helper/index.d.ts +2 -0
  102. package/dist/components/Table/src/helper/index.js +11 -0
  103. package/dist/components/Table/src/types/index.d.ts +87 -0
  104. package/dist/components/Table/src/useTable.d.ts +1 -0
  105. package/dist/components/Table/src/useTable.js +284 -0
  106. package/dist/components/UnifyChart/index.d.ts +4 -0
  107. package/dist/components/UnifyChart/src/ChartToolbox.vue.d.ts +63 -0
  108. package/dist/components/UnifyChart/src/ChartToolbox.vue.js +5 -0
  109. package/dist/components/UnifyChart/src/ChartToolbox.vue2.js +83 -0
  110. package/dist/components/UnifyChart/src/UnifyChart.vue.d.ts +185 -0
  111. package/dist/components/UnifyChart/src/UnifyChart.vue.js +5 -0
  112. package/dist/components/UnifyChart/src/UnifyChart.vue2.js +54 -0
  113. package/dist/components/UnifyChart/src/hooks/useLoader.d.ts +11 -0
  114. package/dist/components/UnifyChart/src/hooks/useRender.d.ts +24 -0
  115. package/dist/components/UnifyChart/src/hooks/useRender.js +49 -0
  116. package/dist/components/UnifyChart/src/props.d.ts +145 -0
  117. package/dist/components/UnifyChart/src/props.js +33 -0
  118. package/dist/components/Video/index.d.ts +2 -0
  119. package/dist/components/Video/src/VideoPlayer.vue.d.ts +60 -0
  120. package/dist/components/Video/src/VideoPlayer.vue.js +5 -0
  121. package/dist/components/Video/src/VideoPlayer.vue2.js +107 -0
  122. package/dist/components/Video/src/VideoPlayerToolbar.vue.d.ts +34 -0
  123. package/dist/components/Video/src/VideoPlayerToolbar.vue.js +5 -0
  124. package/dist/components/Video/src/VideoPlayerToolbar.vue2.js +65 -0
  125. package/dist/components/Video/src/abstract/AbstractVideoControl.d.ts +7 -0
  126. package/dist/components/Video/src/abstract/Observable.d.ts +6 -0
  127. package/dist/components/Video/src/abstract/Observable.js +89 -0
  128. package/dist/components/Video/src/abstract/VideoControl.d.ts +32 -0
  129. package/dist/components/Video/src/abstract/VideoControl.js +50 -0
  130. package/dist/components/Video/src/control/DaHua.d.ts +12 -0
  131. package/dist/components/Video/src/control/DaHua.js +156 -0
  132. package/dist/components/Video/src/control/Hikvision.d.ts +28 -0
  133. package/dist/components/Video/src/control/Hikvision.js +251 -0
  134. package/dist/components/Video/src/control/VideoFactory.d.ts +3 -0
  135. package/dist/components/Video/src/control/VideoFactory.js +32 -0
  136. package/dist/components/Video/src/enums/CommonEnum.d.ts +26 -0
  137. package/dist/components/Video/src/enums/CommonEnum.js +31 -0
  138. package/dist/components/Windows/index.d.ts +4 -0
  139. package/dist/components/Windows/src/ModalWrap.vue.d.ts +14 -0
  140. package/dist/components/Windows/src/ModalWrap.vue.js +5 -0
  141. package/dist/components/Windows/src/ModalWrap.vue2.js +90 -0
  142. package/dist/components/Windows/src/Windows.vue.d.ts +18 -0
  143. package/dist/components/Windows/src/Windows.vue.js +7 -0
  144. package/dist/components/Windows/src/Windows.vue2.js +51 -0
  145. package/dist/components/Windows/src/Windows.vue3.js +22 -0
  146. package/dist/components/Windows/src/props.d.ts +20 -0
  147. package/dist/components/Windows/src/props.js +9 -0
  148. package/dist/directives/clickOutside.d.ts +3 -0
  149. package/dist/directives/index.d.ts +2 -0
  150. package/dist/directives/repeatClick.d.ts +3 -0
  151. package/dist/helper/lang.d.ts +1 -0
  152. package/dist/helper/lang.js +546 -0
  153. package/dist/index.d.ts +13 -0
  154. package/dist/index.js +36 -0
  155. package/dist/index.min.css +6 -0
  156. package/dist/node_modules/.pnpm/@vueuse_core@10.7.2_vue@3.4.21/node_modules/@vueuse/core/index.js +268 -0
  157. package/dist/node_modules/.pnpm/@vueuse_shared@10.7.2_vue@3.4.21/node_modules/@vueuse/shared/index.js +34 -0
  158. package/dist/themes/index.d.ts +1 -0
  159. package/dist/themes/index.js +1 -0
  160. package/dist/types/index.d.ts +8 -0
  161. package/dist/utils/index.d.ts +11 -0
  162. package/dist/utils/index.js +24 -0
  163. package/dist/utils/is.d.ts +25 -0
  164. package/dist/utils/is.js +36 -0
  165. package/dist/utils/propTypes.d.ts +10 -0
  166. package/dist/utils/propTypes.js +35 -0
  167. package/dist/utils/tsxHelper.d.ts +5 -0
  168. package/dist/utils/tsxHelper.js +18 -0
  169. package/package.json +64 -0
@@ -0,0 +1,284 @@
1
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
+ import _regeneratorRuntime from '@babel/runtime/regenerator';
3
+ import { ElMessageBox, ElMessage } from 'element-plus';
4
+ import { ref, watch, unref, onMounted, nextTick } from 'vue';
5
+
6
+ var t = function t(v) {
7
+ return v;
8
+ };
9
+ var useTable = function useTable(config) {
10
+ var _config$immediate = config.immediate,
11
+ immediate = _config$immediate === void 0 ? true : _config$immediate;
12
+ var loading = ref(false);
13
+ var currentPage = ref(1);
14
+ var pageSize = ref(10);
15
+ var total = ref(0);
16
+ var dataList = ref([]);
17
+ watch(function () {
18
+ return currentPage.value;
19
+ }, function () {
20
+ methods.getList();
21
+ });
22
+ watch(function () {
23
+ return pageSize.value;
24
+ }, function () {
25
+ if (unref(currentPage) === 1) {
26
+ methods.getList();
27
+ } else {
28
+ currentPage.value = 1;
29
+ methods.getList();
30
+ }
31
+ });
32
+ onMounted(function () {
33
+ if (immediate) {
34
+ methods.getList();
35
+ }
36
+ });
37
+ var tableRef = ref();
38
+ var elTableRef = ref();
39
+ var register = function register(ref, elRef) {
40
+ tableRef.value = ref;
41
+ elTableRef.value = unref(elRef);
42
+ };
43
+ var getTable = /*#__PURE__*/function () {
44
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
45
+ var table;
46
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
47
+ while (1) switch (_context.prev = _context.next) {
48
+ case 0:
49
+ _context.next = 2;
50
+ return nextTick();
51
+ case 2:
52
+ table = unref(tableRef);
53
+ if (!table) {
54
+ console.error('The table is not registered. Please use the register method to register');
55
+ }
56
+ return _context.abrupt("return", table);
57
+ case 5:
58
+ case "end":
59
+ return _context.stop();
60
+ }
61
+ }, _callee);
62
+ }));
63
+ return function getTable() {
64
+ return _ref.apply(this, arguments);
65
+ };
66
+ }();
67
+ var methods = {
68
+ getList: function () {
69
+ var _getList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
70
+ var res;
71
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
72
+ while (1) switch (_context2.prev = _context2.next) {
73
+ case 0:
74
+ loading.value = true;
75
+ _context2.prev = 1;
76
+ _context2.next = 4;
77
+ return config === null || config === void 0 ? void 0 : config.fetchDataApi();
78
+ case 4:
79
+ res = _context2.sent;
80
+ console.log('fetchDataApi res', res);
81
+ if (res) {
82
+ dataList.value = res.list;
83
+ total.value = res.total || 0;
84
+ }
85
+ _context2.next = 12;
86
+ break;
87
+ case 9:
88
+ _context2.prev = 9;
89
+ _context2.t0 = _context2["catch"](1);
90
+ console.log('fetchDataApi error');
91
+ case 12:
92
+ _context2.prev = 12;
93
+ loading.value = false;
94
+ return _context2.finish(12);
95
+ case 15:
96
+ case "end":
97
+ return _context2.stop();
98
+ }
99
+ }, _callee2, null, [[1, 9, 12, 15]]);
100
+ }));
101
+ function getList() {
102
+ return _getList.apply(this, arguments);
103
+ }
104
+ return getList;
105
+ }(),
106
+ setProps: function () {
107
+ var _setProps = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
108
+ var props,
109
+ table,
110
+ _args3 = arguments;
111
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
112
+ while (1) switch (_context3.prev = _context3.next) {
113
+ case 0:
114
+ props = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
115
+ _context3.next = 3;
116
+ return getTable();
117
+ case 3:
118
+ table = _context3.sent;
119
+ table === null || table === void 0 || table.setProps(props);
120
+ case 5:
121
+ case "end":
122
+ return _context3.stop();
123
+ }
124
+ }, _callee3);
125
+ }));
126
+ function setProps() {
127
+ return _setProps.apply(this, arguments);
128
+ }
129
+ return setProps;
130
+ }(),
131
+ setColumn: function () {
132
+ var _setColumn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(columnProps) {
133
+ var table;
134
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
135
+ while (1) switch (_context4.prev = _context4.next) {
136
+ case 0:
137
+ _context4.next = 2;
138
+ return getTable();
139
+ case 2:
140
+ table = _context4.sent;
141
+ table === null || table === void 0 || table.setColumn(columnProps);
142
+ case 4:
143
+ case "end":
144
+ return _context4.stop();
145
+ }
146
+ }, _callee4);
147
+ }));
148
+ function setColumn(_x) {
149
+ return _setColumn.apply(this, arguments);
150
+ }
151
+ return setColumn;
152
+ }(),
153
+ addColumn: function () {
154
+ var _addColumn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(tableColumn, index) {
155
+ var table;
156
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
157
+ while (1) switch (_context5.prev = _context5.next) {
158
+ case 0:
159
+ _context5.next = 2;
160
+ return getTable();
161
+ case 2:
162
+ table = _context5.sent;
163
+ table === null || table === void 0 || table.addColumn(tableColumn, index);
164
+ case 4:
165
+ case "end":
166
+ return _context5.stop();
167
+ }
168
+ }, _callee5);
169
+ }));
170
+ function addColumn(_x2, _x3) {
171
+ return _addColumn.apply(this, arguments);
172
+ }
173
+ return addColumn;
174
+ }(),
175
+ delColumn: function () {
176
+ var _delColumn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(field) {
177
+ var table;
178
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
179
+ while (1) switch (_context6.prev = _context6.next) {
180
+ case 0:
181
+ _context6.next = 2;
182
+ return getTable();
183
+ case 2:
184
+ table = _context6.sent;
185
+ table === null || table === void 0 || table.delColumn(field);
186
+ case 4:
187
+ case "end":
188
+ return _context6.stop();
189
+ }
190
+ }, _callee6);
191
+ }));
192
+ function delColumn(_x4) {
193
+ return _delColumn.apply(this, arguments);
194
+ }
195
+ return delColumn;
196
+ }(),
197
+ getElTableExpose: function () {
198
+ var _getElTableExpose = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {
199
+ return _regeneratorRuntime.wrap(function _callee7$(_context7) {
200
+ while (1) switch (_context7.prev = _context7.next) {
201
+ case 0:
202
+ _context7.next = 2;
203
+ return getTable();
204
+ case 2:
205
+ return _context7.abrupt("return", unref(elTableRef));
206
+ case 3:
207
+ case "end":
208
+ return _context7.stop();
209
+ }
210
+ }, _callee7);
211
+ }));
212
+ function getElTableExpose() {
213
+ return _getElTableExpose.apply(this, arguments);
214
+ }
215
+ return getElTableExpose;
216
+ }(),
217
+ refresh: function refresh() {
218
+ methods.getList();
219
+ },
220
+ delList: function () {
221
+ var _delList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(idsLength) {
222
+ var fetchDelApi;
223
+ return _regeneratorRuntime.wrap(function _callee9$(_context9) {
224
+ while (1) switch (_context9.prev = _context9.next) {
225
+ case 0:
226
+ fetchDelApi = config.fetchDelApi;
227
+ if (fetchDelApi) {
228
+ _context9.next = 4;
229
+ break;
230
+ }
231
+ console.warn('fetchDelApi is undefined');
232
+ return _context9.abrupt("return");
233
+ case 4:
234
+ ElMessageBox.confirm(t('common.delMessage'), t('common.delWarning'), {
235
+ confirmButtonText: t('common.delOk'),
236
+ cancelButtonText: t('common.delCancel'),
237
+ type: 'warning'
238
+ }).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
239
+ var res, current;
240
+ return _regeneratorRuntime.wrap(function _callee8$(_context8) {
241
+ while (1) switch (_context8.prev = _context8.next) {
242
+ case 0:
243
+ _context8.next = 2;
244
+ return fetchDelApi();
245
+ case 2:
246
+ res = _context8.sent;
247
+ if (res) {
248
+ ElMessage.success(t('common.delSuccess'));
249
+ current = unref(total) % unref(pageSize) === idsLength || unref(pageSize) === 1 ? unref(currentPage) > 1 ? unref(currentPage) - 1 : unref(currentPage) : unref(currentPage);
250
+ currentPage.value = current;
251
+ methods.getList();
252
+ }
253
+ case 4:
254
+ case "end":
255
+ return _context8.stop();
256
+ }
257
+ }, _callee8);
258
+ })));
259
+ case 5:
260
+ case "end":
261
+ return _context9.stop();
262
+ }
263
+ }, _callee9);
264
+ }));
265
+ function delList(_x5) {
266
+ return _delList.apply(this, arguments);
267
+ }
268
+ return delList;
269
+ }()
270
+ };
271
+ return {
272
+ tableRegister: register,
273
+ tableMethods: methods,
274
+ tableState: {
275
+ currentPage: currentPage,
276
+ pageSize: pageSize,
277
+ total: total,
278
+ dataList: dataList,
279
+ loading: loading
280
+ }
281
+ };
282
+ };
283
+
284
+ export { useTable };
@@ -0,0 +1,4 @@
1
+ export * from "./src/props";
2
+ import UnifyChart from "./src/UnifyChart.vue";
3
+ import ChartToolbox from "./src/ChartToolbox.vue";
4
+ export { UnifyChart, ChartToolbox };
@@ -0,0 +1,63 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ instance: import("vue-types").VueTypeValidableDef<{
3
+ [key: string]: any;
4
+ }, import("vue-types/dist/types").ValidatorFunction<{
5
+ [key: string]: any;
6
+ }>> & {
7
+ default: () => {
8
+ [key: string]: any;
9
+ };
10
+ } & {
11
+ default: () => {
12
+ [key: string]: any;
13
+ };
14
+ };
15
+ iconSize: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/types").ValidatorFunction<number>> & {
16
+ default: number;
17
+ } & {
18
+ default: number;
19
+ };
20
+ toggleTable: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
21
+ default: (...args: any[]) => any;
22
+ };
23
+ toggleStatistic: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
24
+ default: (...args: any[]) => any;
25
+ };
26
+ toolbox: () => any[];
27
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
28
+ [key: string]: any;
29
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
30
+ instance: import("vue-types").VueTypeValidableDef<{
31
+ [key: string]: any;
32
+ }, import("vue-types/dist/types").ValidatorFunction<{
33
+ [key: string]: any;
34
+ }>> & {
35
+ default: () => {
36
+ [key: string]: any;
37
+ };
38
+ } & {
39
+ default: () => {
40
+ [key: string]: any;
41
+ };
42
+ };
43
+ iconSize: import("vue-types").VueTypeValidableDef<number, import("vue-types/dist/types").ValidatorFunction<number>> & {
44
+ default: number;
45
+ } & {
46
+ default: number;
47
+ };
48
+ toggleTable: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
49
+ default: (...args: any[]) => any;
50
+ };
51
+ toggleStatistic: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
52
+ default: (...args: any[]) => any;
53
+ };
54
+ toolbox: () => any[];
55
+ }>>, {
56
+ instance: {
57
+ [key: string]: any;
58
+ };
59
+ iconSize: number;
60
+ toggleTable: (...args: any[]) => any;
61
+ toggleStatistic: (...args: any[]) => any;
62
+ }, {}>;
63
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './ChartToolbox.vue2.js';
2
+
3
+ script.__file = "src/components/UnifyChart/src/ChartToolbox.vue";
4
+
5
+ export { script as default };
@@ -0,0 +1,83 @@
1
+ import { normalizeClass, defineComponent, ref, toRefs, openBlock, createElementBlock, unref, createVNode, createCommentVNode, createBlock, renderSlot } from 'vue';
2
+ import { toolboxProps, EToolbox } from './props.js';
3
+ import '../../Icon/src/Icon.vue.js';
4
+ import '../../Icon/src/SvgIcon.vue.js';
5
+ import { isEmpty } from '../../../utils/is.js';
6
+ import { useDownLoad } from '@dfsj/echarts';
7
+ import script$1 from '../../Icon/src/Icon.vue2.js';
8
+
9
+ var _hoisted_1 = {
10
+ key: 0,
11
+ "class": normalizeClass("tools-container absolute top-0 right-0")
12
+ };
13
+ var _hoisted_2 = {
14
+ key: 0
15
+ };
16
+ var _hoisted_3 = {
17
+ key: 1
18
+ };
19
+ var _hoisted_4 = {
20
+ key: 2
21
+ };
22
+ var prefixCls = 'ec-chart-toolbox-wrap';
23
+ var script = defineComponent({
24
+ __name: 'ChartToolbox',
25
+ props: toolboxProps,
26
+ setup: function setup(__props) {
27
+ var props = __props;
28
+ var isOpenTable = ref(false);
29
+ var _toRefs = toRefs(props),
30
+ iconSize = _toRefs.iconSize,
31
+ toolbox = _toRefs.toolbox;
32
+ var toggleStatistic = props.toggleStatistic,
33
+ toggleTable = props.toggleTable,
34
+ getInstance = props.instance;
35
+ function handleTable(ev) {
36
+ isOpenTable.value = !isOpenTable.value;
37
+ toggleTable();
38
+ }
39
+ function handleStatistic(ev) {
40
+ toggleStatistic();
41
+ }
42
+ function handleDownload(ev) {
43
+ var _useDownLoad = useDownLoad(getInstance),
44
+ downloadImg = _useDownLoad.downloadImg;
45
+ downloadImg({
46
+ backgroundColor: '#000'
47
+ });
48
+ }
49
+ var hasTool = function hasTool(tool) {
50
+ var _toolbox$value;
51
+ return toolbox === null || toolbox === void 0 || (_toolbox$value = toolbox.value) === null || _toolbox$value === void 0 ? void 0 : _toolbox$value.includes(tool);
52
+ };
53
+ return function (_ctx, _cache) {
54
+ return openBlock(), createElementBlock("div", {
55
+ "class": normalizeClass("".concat(prefixCls, " h-full w-full relative"))
56
+ }, [!unref(isEmpty)(unref(toolbox)) ? (openBlock(), createElementBlock("div", _hoisted_1, [hasTool(unref(EToolbox).Download) ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(unref(script$1), {
57
+ color: '#f2973d',
58
+ onClick: handleDownload,
59
+ size: unref(iconSize),
60
+ icon: 'mdi:cloud-arrow-down'
61
+ }, null, 8, ["size"])])) : createCommentVNode("v-if", true), hasTool(unref(EToolbox).Statistic) ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(script$1), {
62
+ color: '#0885ec',
63
+ onClick: handleStatistic,
64
+ size: unref(iconSize),
65
+ icon: 'mdi:chart-arc'
66
+ }, null, 8, ["size"])])) : createCommentVNode("v-if", true), hasTool(unref(EToolbox).Table) ? (openBlock(), createElementBlock("div", _hoisted_4, [isOpenTable.value ? (openBlock(), createBlock(unref(script$1), {
67
+ key: 0,
68
+ color: '#4caf50',
69
+ onClick: handleTable,
70
+ size: unref(iconSize),
71
+ icon: 'mdi:chart-line'
72
+ }, null, 8, ["size"])) : (openBlock(), createBlock(unref(script$1), {
73
+ key: 1,
74
+ color: '#4caf50',
75
+ onClick: handleTable,
76
+ size: unref(iconSize),
77
+ icon: 'mdi:table'
78
+ }, null, 8, ["size"]))])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 2);
79
+ };
80
+ }
81
+ });
82
+
83
+ export { script as default };
@@ -0,0 +1,185 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ data: import("vue-types").VueTypeValidableDef<{
3
+ [key: string]: any;
4
+ }, import("vue-types/dist/types").ValidatorFunction<{
5
+ [key: string]: any;
6
+ }>> & {
7
+ default: () => {
8
+ [key: string]: any;
9
+ };
10
+ } & {
11
+ default: () => {
12
+ [key: string]: any;
13
+ };
14
+ };
15
+ options: import("vue-types").VueTypeValidableDef<{
16
+ [key: string]: any;
17
+ }, import("vue-types/dist/types").ValidatorFunction<{
18
+ [key: string]: any;
19
+ }>> & {
20
+ default: () => {
21
+ [key: string]: any;
22
+ };
23
+ } & {
24
+ default: () => {
25
+ [key: string]: any;
26
+ };
27
+ };
28
+ width: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
29
+ default: string;
30
+ } & {
31
+ default: string;
32
+ };
33
+ height: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
34
+ default: string;
35
+ } & {
36
+ default: string;
37
+ };
38
+ target: import("vue-types").VueTypeValidableDef<{
39
+ [key: string]: any;
40
+ }, import("vue-types/dist/types").ValidatorFunction<{
41
+ [key: string]: any;
42
+ }>> & {
43
+ default: () => {
44
+ [key: string]: any;
45
+ };
46
+ } & {
47
+ default: () => {
48
+ [key: string]: any;
49
+ };
50
+ };
51
+ convert: () => import("./props").Convert;
52
+ datasource: import("vue-types").VueTypeValidableDef<{
53
+ [key: string]: any;
54
+ }, import("vue-types/dist/types").ValidatorFunction<{
55
+ [key: string]: any;
56
+ }>> & {
57
+ default: () => {
58
+ [key: string]: any;
59
+ };
60
+ } & {
61
+ default: () => {
62
+ [key: string]: any;
63
+ };
64
+ };
65
+ toolbox: () => any[];
66
+ chartHooks: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
67
+ default: (...args: any[]) => any;
68
+ };
69
+ stateful: import("vue-types").VueTypeValidableDef<{
70
+ [key: string]: any;
71
+ }, import("vue-types/dist/types").ValidatorFunction<{
72
+ [key: string]: any;
73
+ }>> & {
74
+ default: () => {
75
+ [key: string]: any;
76
+ };
77
+ } & {
78
+ default: () => {
79
+ [key: string]: any;
80
+ };
81
+ };
82
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
83
+ [key: string]: any;
84
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
85
+ data: import("vue-types").VueTypeValidableDef<{
86
+ [key: string]: any;
87
+ }, import("vue-types/dist/types").ValidatorFunction<{
88
+ [key: string]: any;
89
+ }>> & {
90
+ default: () => {
91
+ [key: string]: any;
92
+ };
93
+ } & {
94
+ default: () => {
95
+ [key: string]: any;
96
+ };
97
+ };
98
+ options: import("vue-types").VueTypeValidableDef<{
99
+ [key: string]: any;
100
+ }, import("vue-types/dist/types").ValidatorFunction<{
101
+ [key: string]: any;
102
+ }>> & {
103
+ default: () => {
104
+ [key: string]: any;
105
+ };
106
+ } & {
107
+ default: () => {
108
+ [key: string]: any;
109
+ };
110
+ };
111
+ width: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
112
+ default: string;
113
+ } & {
114
+ default: string;
115
+ };
116
+ height: import("vue-types").VueTypeValidableDef<string, import("vue-types/dist/types").ValidatorFunction<string>> & {
117
+ default: string;
118
+ } & {
119
+ default: string;
120
+ };
121
+ target: import("vue-types").VueTypeValidableDef<{
122
+ [key: string]: any;
123
+ }, import("vue-types/dist/types").ValidatorFunction<{
124
+ [key: string]: any;
125
+ }>> & {
126
+ default: () => {
127
+ [key: string]: any;
128
+ };
129
+ } & {
130
+ default: () => {
131
+ [key: string]: any;
132
+ };
133
+ };
134
+ convert: () => import("./props").Convert;
135
+ datasource: import("vue-types").VueTypeValidableDef<{
136
+ [key: string]: any;
137
+ }, import("vue-types/dist/types").ValidatorFunction<{
138
+ [key: string]: any;
139
+ }>> & {
140
+ default: () => {
141
+ [key: string]: any;
142
+ };
143
+ } & {
144
+ default: () => {
145
+ [key: string]: any;
146
+ };
147
+ };
148
+ toolbox: () => any[];
149
+ chartHooks: import("vue-types").VueTypeValidableDef<(...args: any[]) => any, import("vue-types/dist/types").ValidatorFunction<(...args: any[]) => any>> & {
150
+ default: (...args: any[]) => any;
151
+ };
152
+ stateful: import("vue-types").VueTypeValidableDef<{
153
+ [key: string]: any;
154
+ }, import("vue-types/dist/types").ValidatorFunction<{
155
+ [key: string]: any;
156
+ }>> & {
157
+ default: () => {
158
+ [key: string]: any;
159
+ };
160
+ } & {
161
+ default: () => {
162
+ [key: string]: any;
163
+ };
164
+ };
165
+ }>>, {
166
+ data: {
167
+ [key: string]: any;
168
+ };
169
+ options: {
170
+ [key: string]: any;
171
+ };
172
+ width: string;
173
+ height: string;
174
+ target: {
175
+ [key: string]: any;
176
+ };
177
+ datasource: {
178
+ [key: string]: any;
179
+ };
180
+ chartHooks: (...args: any[]) => any;
181
+ stateful: {
182
+ [key: string]: any;
183
+ };
184
+ }, {}>;
185
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import script from './UnifyChart.vue2.js';
2
+
3
+ script.__file = "src/components/UnifyChart/src/UnifyChart.vue";
4
+
5
+ export { script as default };
@@ -0,0 +1,54 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import { defineComponent, ref, toRefs, computed, openBlock, createBlock, withCtx, createVNode, normalizeProps, guardReactiveProps, unref, createElementVNode, normalizeStyle } from 'vue';
3
+ import './ChartToolbox.vue.js';
4
+ import { useRender } from './hooks/useRender.js';
5
+ import { unifyChartProps } from './props.js';
6
+ import '../../Stateful/src/Stateful.vue.js';
7
+ import script$1 from '../../Stateful/src/Stateful.vue2.js';
8
+ import script$2 from './ChartToolbox.vue2.js';
9
+
10
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
+ var script = defineComponent({
13
+ __name: 'UnifyChart',
14
+ props: unifyChartProps,
15
+ setup: function setup(__props) {
16
+ var chartRef = ref(null);
17
+ var props = __props;
18
+ var _toRefs = toRefs(props),
19
+ data = _toRefs.data;
20
+ _toRefs.stateful;
21
+ var compState = computed(function () {
22
+ var _props$stateful;
23
+ return (_props$stateful = props.stateful) === null || _props$stateful === void 0 ? void 0 : _props$stateful.stringify;
24
+ });
25
+ var chartHooks = props.chartHooks,
26
+ convert = props.convert;
27
+ var _useRender = useRender(_objectSpread(_objectSpread({}, chartHooks(chartRef)), convert), data, props.toolbox),
28
+ getBindValue = _useRender.getBindValue;
29
+ return function (_ctx, _cache) {
30
+ return openBlock(), createBlock(script$1, {
31
+ value: compState.value
32
+ }, {
33
+ "default": withCtx(function () {
34
+ return [createVNode(script$2, normalizeProps(guardReactiveProps(unref(getBindValue))), {
35
+ "default": withCtx(function () {
36
+ return [createElementVNode("div", {
37
+ ref_key: "chartRef",
38
+ ref: chartRef,
39
+ style: normalizeStyle({
40
+ height: props.height,
41
+ width: props.width
42
+ })
43
+ }, null, 4)];
44
+ }),
45
+ _: 1
46
+ }, 16)];
47
+ }),
48
+ _: 1
49
+ }, 8, ["value"]);
50
+ };
51
+ }
52
+ });
53
+
54
+ export { script as default };