bm-admin-ui 1.0.0-alpha → 1.0.1-alpha

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 (126) hide show
  1. package/es/components/button/index.d.ts +9 -9
  2. package/es/components/button/index.js +1 -1
  3. package/es/components/button/src/button.vue.d.ts +9 -9
  4. package/es/components/float-table/index.d.ts +5 -0
  5. package/es/components/float-table/index.js +448 -0
  6. package/es/components/float-table/src/float-table.vue.d.ts +500 -0
  7. package/es/components/flow-designer/index.js +1 -1
  8. package/es/components/form-designer/index.js +1 -1
  9. package/es/components/index.d.ts +7 -0
  10. package/es/components/index.js +7 -0
  11. package/es/components/multi-cascader-compose/index.d.ts +135 -0
  12. package/es/components/multi-cascader-compose/index.js +1699 -0
  13. package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  14. package/es/components/multi-cascader-compose/src/props.d.ts +32 -0
  15. package/es/components/multi-cascader-compose/types.d.ts +10 -0
  16. package/es/components/over-tooltips/index.d.ts +35 -0
  17. package/es/components/over-tooltips/index.js +117 -0
  18. package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  19. package/es/components/search-filter/index.d.ts +1 -1
  20. package/es/components/search-filter/index.js +593 -29
  21. package/es/components/search-filter/src/search-filter.vue.d.ts +1 -1
  22. package/es/components/shops-filter/index.d.ts +99 -0
  23. package/es/components/shops-filter/index.js +1614 -0
  24. package/es/components/shops-filter/src/shops-filter.d.ts +25 -0
  25. package/es/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  26. package/es/components/staffs-selector/index.d.ts +82 -0
  27. package/es/components/staffs-selector/index.js +1991 -0
  28. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  29. package/es/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  30. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  31. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  32. package/es/components/timeline/index.d.ts +93 -0
  33. package/es/components/timeline/index.js +164 -0
  34. package/es/components/timeline/src/props.d.ts +20 -0
  35. package/es/components/timeline/src/timeline-item.vue.d.ts +51 -0
  36. package/es/components/timeline/src/timeline.vue.d.ts +42 -0
  37. package/es/components/upload/index.d.ts +126 -0
  38. package/es/components/upload/index.js +1839 -0
  39. package/es/components/upload/src/icons.d.ts +13 -0
  40. package/es/components/upload/src/upload.vue.d.ts +125 -0
  41. package/es/components/upload/utils/index.d.ts +7 -0
  42. package/index.esm.js +62925 -1235
  43. package/index.js +63078 -1380
  44. package/lib/components/button/index.d.ts +9 -9
  45. package/lib/components/button/index.js +1 -1
  46. package/lib/components/button/src/button.vue.d.ts +9 -9
  47. package/lib/components/float-table/index.d.ts +5 -0
  48. package/lib/components/float-table/index.js +459 -0
  49. package/lib/components/float-table/src/float-table.vue.d.ts +500 -0
  50. package/lib/components/flow-designer/index.js +1 -1
  51. package/lib/components/form-designer/index.js +1 -1
  52. package/lib/components/index.d.ts +7 -0
  53. package/lib/components/index.js +49 -0
  54. package/lib/components/multi-cascader-compose/index.d.ts +135 -0
  55. package/lib/components/multi-cascader-compose/index.js +1704 -0
  56. package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  57. package/lib/components/multi-cascader-compose/src/props.d.ts +32 -0
  58. package/lib/components/multi-cascader-compose/types.d.ts +10 -0
  59. package/lib/components/over-tooltips/index.d.ts +35 -0
  60. package/lib/components/over-tooltips/index.js +122 -0
  61. package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  62. package/lib/components/search-filter/index.d.ts +1 -1
  63. package/lib/components/search-filter/index.js +592 -28
  64. package/lib/components/search-filter/src/search-filter.vue.d.ts +1 -1
  65. package/lib/components/shops-filter/index.d.ts +99 -0
  66. package/lib/components/shops-filter/index.js +1626 -0
  67. package/lib/components/shops-filter/src/shops-filter.d.ts +25 -0
  68. package/lib/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  69. package/lib/components/staffs-selector/index.d.ts +82 -0
  70. package/lib/components/staffs-selector/index.js +2005 -0
  71. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  72. package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  73. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  74. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  75. package/lib/components/timeline/index.d.ts +93 -0
  76. package/lib/components/timeline/index.js +170 -0
  77. package/lib/components/timeline/src/props.d.ts +20 -0
  78. package/lib/components/timeline/src/timeline-item.vue.d.ts +51 -0
  79. package/lib/components/timeline/src/timeline.vue.d.ts +42 -0
  80. package/lib/components/upload/index.d.ts +126 -0
  81. package/lib/components/upload/index.js +1844 -0
  82. package/lib/components/upload/src/icons.d.ts +13 -0
  83. package/lib/components/upload/src/upload.vue.d.ts +125 -0
  84. package/lib/components/upload/utils/index.d.ts +7 -0
  85. package/package.json +6 -3
  86. package/theme-chalk/button.css +1 -1
  87. package/theme-chalk/float-table.css +1 -0
  88. package/theme-chalk/floating-vue.css +1 -0
  89. package/theme-chalk/flow-designer.css +1 -1
  90. package/theme-chalk/index.css +1 -1
  91. package/theme-chalk/multi-cascader-compose.css +1 -0
  92. package/theme-chalk/over-tooltips.css +1 -0
  93. package/theme-chalk/search-filter.css +1 -1
  94. package/theme-chalk/shops-filter.css +1 -0
  95. package/theme-chalk/staffs-selector.css +1 -0
  96. package/theme-chalk/timeline.css +1 -0
  97. package/theme-chalk/upload.css +1 -0
  98. package/types/components/button/index.d.ts +9 -9
  99. package/types/components/button/src/button.vue.d.ts +9 -9
  100. package/types/components/float-table/index.d.ts +5 -0
  101. package/types/components/float-table/src/float-table.vue.d.ts +500 -0
  102. package/types/components/index.d.ts +7 -0
  103. package/types/components/multi-cascader-compose/index.d.ts +135 -0
  104. package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +135 -0
  105. package/types/components/multi-cascader-compose/src/props.d.ts +32 -0
  106. package/types/components/multi-cascader-compose/types.d.ts +10 -0
  107. package/types/components/over-tooltips/index.d.ts +35 -0
  108. package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
  109. package/types/components/search-filter/index.d.ts +1 -1
  110. package/types/components/search-filter/src/search-filter.vue.d.ts +1 -1
  111. package/types/components/shops-filter/index.d.ts +99 -0
  112. package/types/components/shops-filter/src/shops-filter.d.ts +25 -0
  113. package/types/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
  114. package/types/components/staffs-selector/index.d.ts +82 -0
  115. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +79 -0
  116. package/types/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
  117. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +81 -0
  118. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
  119. package/types/components/timeline/index.d.ts +93 -0
  120. package/types/components/timeline/src/props.d.ts +20 -0
  121. package/types/components/timeline/src/timeline-item.vue.d.ts +51 -0
  122. package/types/components/timeline/src/timeline.vue.d.ts +42 -0
  123. package/types/components/upload/index.d.ts +126 -0
  124. package/types/components/upload/src/icons.d.ts +13 -0
  125. package/types/components/upload/src/upload.vue.d.ts +125 -0
  126. package/types/components/upload/utils/index.d.ts +7 -0
@@ -0,0 +1,2005 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
+ var AModal = require('ant-design-vue/lib/modal');
7
+ var vue = require('vue');
8
+ var Empty = require('ant-design-vue/lib/empty');
9
+ var AInput = require('ant-design-vue/lib/input');
10
+ var Checkbox = require('ant-design-vue/lib/checkbox');
11
+ var ATree = require('ant-design-vue/lib/tree');
12
+ var ARadio = require('ant-design-vue/lib/radio');
13
+
14
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
+
16
+ var AModal__default = /*#__PURE__*/_interopDefaultLegacy(AModal);
17
+ var Empty__default = /*#__PURE__*/_interopDefaultLegacy(Empty);
18
+ var AInput__default = /*#__PURE__*/_interopDefaultLegacy(AInput);
19
+ var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
20
+ var ATree__default = /*#__PURE__*/_interopDefaultLegacy(ATree);
21
+ var ARadio__default = /*#__PURE__*/_interopDefaultLegacy(ARadio);
22
+
23
+ /**
24
+ * Take input from [0, n] and return it as [0, 1]
25
+ * @hidden
26
+ */
27
+ function bound01(n, max) {
28
+ if (isOnePointZero(n)) {
29
+ n = '100%';
30
+ }
31
+ var isPercent = isPercentage(n);
32
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
33
+ // Automatically convert percentage into number
34
+ if (isPercent) {
35
+ n = parseInt(String(n * max), 10) / 100;
36
+ }
37
+ // Handle floating point rounding errors
38
+ if (Math.abs(n - max) < 0.000001) {
39
+ return 1;
40
+ }
41
+ // Convert into [0, 1] range if it isn't already
42
+ if (max === 360) {
43
+ // If n is a hue given in degrees,
44
+ // wrap around out-of-range values into [0, 360] range
45
+ // then convert into [0, 1].
46
+ n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));
47
+ }
48
+ else {
49
+ // If n not a hue given in degrees
50
+ // Convert into [0, 1] range if it isn't already.
51
+ n = (n % max) / parseFloat(String(max));
52
+ }
53
+ return n;
54
+ }
55
+ /**
56
+ * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
57
+ * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
58
+ * @hidden
59
+ */
60
+ function isOnePointZero(n) {
61
+ return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
62
+ }
63
+ /**
64
+ * Check to see if string passed in is a percentage
65
+ * @hidden
66
+ */
67
+ function isPercentage(n) {
68
+ return typeof n === 'string' && n.indexOf('%') !== -1;
69
+ }
70
+ /**
71
+ * Return a valid alpha value [0,1] with all invalid values being set to 1
72
+ * @hidden
73
+ */
74
+ function boundAlpha(a) {
75
+ a = parseFloat(a);
76
+ if (isNaN(a) || a < 0 || a > 1) {
77
+ a = 1;
78
+ }
79
+ return a;
80
+ }
81
+ /**
82
+ * Replace a decimal with it's percentage value
83
+ * @hidden
84
+ */
85
+ function convertToPercentage(n) {
86
+ if (n <= 1) {
87
+ return Number(n) * 100 + "%";
88
+ }
89
+ return n;
90
+ }
91
+ /**
92
+ * Force a hex value to have 2 characters
93
+ * @hidden
94
+ */
95
+ function pad2(c) {
96
+ return c.length === 1 ? '0' + c : String(c);
97
+ }
98
+
99
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
100
+ // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
101
+ /**
102
+ * Handle bounds / percentage checking to conform to CSS color spec
103
+ * <http://www.w3.org/TR/css3-color/>
104
+ * *Assumes:* r, g, b in [0, 255] or [0, 1]
105
+ * *Returns:* { r, g, b } in [0, 255]
106
+ */
107
+ function rgbToRgb(r, g, b) {
108
+ return {
109
+ r: bound01(r, 255) * 255,
110
+ g: bound01(g, 255) * 255,
111
+ b: bound01(b, 255) * 255,
112
+ };
113
+ }
114
+ function hue2rgb(p, q, t) {
115
+ if (t < 0) {
116
+ t += 1;
117
+ }
118
+ if (t > 1) {
119
+ t -= 1;
120
+ }
121
+ if (t < 1 / 6) {
122
+ return p + (q - p) * (6 * t);
123
+ }
124
+ if (t < 1 / 2) {
125
+ return q;
126
+ }
127
+ if (t < 2 / 3) {
128
+ return p + (q - p) * (2 / 3 - t) * 6;
129
+ }
130
+ return p;
131
+ }
132
+ /**
133
+ * Converts an HSL color value to RGB.
134
+ *
135
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
136
+ * *Returns:* { r, g, b } in the set [0, 255]
137
+ */
138
+ function hslToRgb(h, s, l) {
139
+ var r;
140
+ var g;
141
+ var b;
142
+ h = bound01(h, 360);
143
+ s = bound01(s, 100);
144
+ l = bound01(l, 100);
145
+ if (s === 0) {
146
+ // achromatic
147
+ g = l;
148
+ b = l;
149
+ r = l;
150
+ }
151
+ else {
152
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
153
+ var p = 2 * l - q;
154
+ r = hue2rgb(p, q, h + 1 / 3);
155
+ g = hue2rgb(p, q, h);
156
+ b = hue2rgb(p, q, h - 1 / 3);
157
+ }
158
+ return { r: r * 255, g: g * 255, b: b * 255 };
159
+ }
160
+ /**
161
+ * Converts an RGB color value to HSV
162
+ *
163
+ * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
164
+ * *Returns:* { h, s, v } in [0,1]
165
+ */
166
+ function rgbToHsv(r, g, b) {
167
+ r = bound01(r, 255);
168
+ g = bound01(g, 255);
169
+ b = bound01(b, 255);
170
+ var max = Math.max(r, g, b);
171
+ var min = Math.min(r, g, b);
172
+ var h = 0;
173
+ var v = max;
174
+ var d = max - min;
175
+ var s = max === 0 ? 0 : d / max;
176
+ if (max === min) {
177
+ h = 0; // achromatic
178
+ }
179
+ else {
180
+ switch (max) {
181
+ case r:
182
+ h = (g - b) / d + (g < b ? 6 : 0);
183
+ break;
184
+ case g:
185
+ h = (b - r) / d + 2;
186
+ break;
187
+ case b:
188
+ h = (r - g) / d + 4;
189
+ break;
190
+ }
191
+ h /= 6;
192
+ }
193
+ return { h: h, s: s, v: v };
194
+ }
195
+ /**
196
+ * Converts an HSV color value to RGB.
197
+ *
198
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
199
+ * *Returns:* { r, g, b } in the set [0, 255]
200
+ */
201
+ function hsvToRgb(h, s, v) {
202
+ h = bound01(h, 360) * 6;
203
+ s = bound01(s, 100);
204
+ v = bound01(v, 100);
205
+ var i = Math.floor(h);
206
+ var f = h - i;
207
+ var p = v * (1 - s);
208
+ var q = v * (1 - f * s);
209
+ var t = v * (1 - (1 - f) * s);
210
+ var mod = i % 6;
211
+ var r = [v, q, p, p, t, v][mod];
212
+ var g = [t, v, v, q, p, p][mod];
213
+ var b = [p, p, t, v, v, q][mod];
214
+ return { r: r * 255, g: g * 255, b: b * 255 };
215
+ }
216
+ /**
217
+ * Converts an RGB color to hex
218
+ *
219
+ * Assumes r, g, and b are contained in the set [0, 255]
220
+ * Returns a 3 or 6 character hex
221
+ */
222
+ function rgbToHex(r, g, b, allow3Char) {
223
+ var hex = [
224
+ pad2(Math.round(r).toString(16)),
225
+ pad2(Math.round(g).toString(16)),
226
+ pad2(Math.round(b).toString(16)),
227
+ ];
228
+ // Return a 3 character hex if possible
229
+ if (allow3Char &&
230
+ hex[0].startsWith(hex[0].charAt(1)) &&
231
+ hex[1].startsWith(hex[1].charAt(1)) &&
232
+ hex[2].startsWith(hex[2].charAt(1))) {
233
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
234
+ }
235
+ return hex.join('');
236
+ }
237
+ /** Converts a hex value to a decimal */
238
+ function convertHexToDecimal(h) {
239
+ return parseIntFromHex(h) / 255;
240
+ }
241
+ /** Parse a base-16 hex value into a base-10 integer */
242
+ function parseIntFromHex(val) {
243
+ return parseInt(val, 16);
244
+ }
245
+
246
+ // https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
247
+ /**
248
+ * @hidden
249
+ */
250
+ var names = {
251
+ aliceblue: '#f0f8ff',
252
+ antiquewhite: '#faebd7',
253
+ aqua: '#00ffff',
254
+ aquamarine: '#7fffd4',
255
+ azure: '#f0ffff',
256
+ beige: '#f5f5dc',
257
+ bisque: '#ffe4c4',
258
+ black: '#000000',
259
+ blanchedalmond: '#ffebcd',
260
+ blue: '#0000ff',
261
+ blueviolet: '#8a2be2',
262
+ brown: '#a52a2a',
263
+ burlywood: '#deb887',
264
+ cadetblue: '#5f9ea0',
265
+ chartreuse: '#7fff00',
266
+ chocolate: '#d2691e',
267
+ coral: '#ff7f50',
268
+ cornflowerblue: '#6495ed',
269
+ cornsilk: '#fff8dc',
270
+ crimson: '#dc143c',
271
+ cyan: '#00ffff',
272
+ darkblue: '#00008b',
273
+ darkcyan: '#008b8b',
274
+ darkgoldenrod: '#b8860b',
275
+ darkgray: '#a9a9a9',
276
+ darkgreen: '#006400',
277
+ darkgrey: '#a9a9a9',
278
+ darkkhaki: '#bdb76b',
279
+ darkmagenta: '#8b008b',
280
+ darkolivegreen: '#556b2f',
281
+ darkorange: '#ff8c00',
282
+ darkorchid: '#9932cc',
283
+ darkred: '#8b0000',
284
+ darksalmon: '#e9967a',
285
+ darkseagreen: '#8fbc8f',
286
+ darkslateblue: '#483d8b',
287
+ darkslategray: '#2f4f4f',
288
+ darkslategrey: '#2f4f4f',
289
+ darkturquoise: '#00ced1',
290
+ darkviolet: '#9400d3',
291
+ deeppink: '#ff1493',
292
+ deepskyblue: '#00bfff',
293
+ dimgray: '#696969',
294
+ dimgrey: '#696969',
295
+ dodgerblue: '#1e90ff',
296
+ firebrick: '#b22222',
297
+ floralwhite: '#fffaf0',
298
+ forestgreen: '#228b22',
299
+ fuchsia: '#ff00ff',
300
+ gainsboro: '#dcdcdc',
301
+ ghostwhite: '#f8f8ff',
302
+ goldenrod: '#daa520',
303
+ gold: '#ffd700',
304
+ gray: '#808080',
305
+ green: '#008000',
306
+ greenyellow: '#adff2f',
307
+ grey: '#808080',
308
+ honeydew: '#f0fff0',
309
+ hotpink: '#ff69b4',
310
+ indianred: '#cd5c5c',
311
+ indigo: '#4b0082',
312
+ ivory: '#fffff0',
313
+ khaki: '#f0e68c',
314
+ lavenderblush: '#fff0f5',
315
+ lavender: '#e6e6fa',
316
+ lawngreen: '#7cfc00',
317
+ lemonchiffon: '#fffacd',
318
+ lightblue: '#add8e6',
319
+ lightcoral: '#f08080',
320
+ lightcyan: '#e0ffff',
321
+ lightgoldenrodyellow: '#fafad2',
322
+ lightgray: '#d3d3d3',
323
+ lightgreen: '#90ee90',
324
+ lightgrey: '#d3d3d3',
325
+ lightpink: '#ffb6c1',
326
+ lightsalmon: '#ffa07a',
327
+ lightseagreen: '#20b2aa',
328
+ lightskyblue: '#87cefa',
329
+ lightslategray: '#778899',
330
+ lightslategrey: '#778899',
331
+ lightsteelblue: '#b0c4de',
332
+ lightyellow: '#ffffe0',
333
+ lime: '#00ff00',
334
+ limegreen: '#32cd32',
335
+ linen: '#faf0e6',
336
+ magenta: '#ff00ff',
337
+ maroon: '#800000',
338
+ mediumaquamarine: '#66cdaa',
339
+ mediumblue: '#0000cd',
340
+ mediumorchid: '#ba55d3',
341
+ mediumpurple: '#9370db',
342
+ mediumseagreen: '#3cb371',
343
+ mediumslateblue: '#7b68ee',
344
+ mediumspringgreen: '#00fa9a',
345
+ mediumturquoise: '#48d1cc',
346
+ mediumvioletred: '#c71585',
347
+ midnightblue: '#191970',
348
+ mintcream: '#f5fffa',
349
+ mistyrose: '#ffe4e1',
350
+ moccasin: '#ffe4b5',
351
+ navajowhite: '#ffdead',
352
+ navy: '#000080',
353
+ oldlace: '#fdf5e6',
354
+ olive: '#808000',
355
+ olivedrab: '#6b8e23',
356
+ orange: '#ffa500',
357
+ orangered: '#ff4500',
358
+ orchid: '#da70d6',
359
+ palegoldenrod: '#eee8aa',
360
+ palegreen: '#98fb98',
361
+ paleturquoise: '#afeeee',
362
+ palevioletred: '#db7093',
363
+ papayawhip: '#ffefd5',
364
+ peachpuff: '#ffdab9',
365
+ peru: '#cd853f',
366
+ pink: '#ffc0cb',
367
+ plum: '#dda0dd',
368
+ powderblue: '#b0e0e6',
369
+ purple: '#800080',
370
+ rebeccapurple: '#663399',
371
+ red: '#ff0000',
372
+ rosybrown: '#bc8f8f',
373
+ royalblue: '#4169e1',
374
+ saddlebrown: '#8b4513',
375
+ salmon: '#fa8072',
376
+ sandybrown: '#f4a460',
377
+ seagreen: '#2e8b57',
378
+ seashell: '#fff5ee',
379
+ sienna: '#a0522d',
380
+ silver: '#c0c0c0',
381
+ skyblue: '#87ceeb',
382
+ slateblue: '#6a5acd',
383
+ slategray: '#708090',
384
+ slategrey: '#708090',
385
+ snow: '#fffafa',
386
+ springgreen: '#00ff7f',
387
+ steelblue: '#4682b4',
388
+ tan: '#d2b48c',
389
+ teal: '#008080',
390
+ thistle: '#d8bfd8',
391
+ tomato: '#ff6347',
392
+ turquoise: '#40e0d0',
393
+ violet: '#ee82ee',
394
+ wheat: '#f5deb3',
395
+ white: '#ffffff',
396
+ whitesmoke: '#f5f5f5',
397
+ yellow: '#ffff00',
398
+ yellowgreen: '#9acd32',
399
+ };
400
+
401
+ /**
402
+ * Given a string or object, convert that input to RGB
403
+ *
404
+ * Possible string inputs:
405
+ * ```
406
+ * "red"
407
+ * "#f00" or "f00"
408
+ * "#ff0000" or "ff0000"
409
+ * "#ff000000" or "ff000000"
410
+ * "rgb 255 0 0" or "rgb (255, 0, 0)"
411
+ * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
412
+ * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
413
+ * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
414
+ * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
415
+ * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
416
+ * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
417
+ * ```
418
+ */
419
+ function inputToRGB(color) {
420
+ var rgb = { r: 0, g: 0, b: 0 };
421
+ var a = 1;
422
+ var s = null;
423
+ var v = null;
424
+ var l = null;
425
+ var ok = false;
426
+ var format = false;
427
+ if (typeof color === 'string') {
428
+ color = stringInputToObject(color);
429
+ }
430
+ if (typeof color === 'object') {
431
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
432
+ rgb = rgbToRgb(color.r, color.g, color.b);
433
+ ok = true;
434
+ format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';
435
+ }
436
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
437
+ s = convertToPercentage(color.s);
438
+ v = convertToPercentage(color.v);
439
+ rgb = hsvToRgb(color.h, s, v);
440
+ ok = true;
441
+ format = 'hsv';
442
+ }
443
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
444
+ s = convertToPercentage(color.s);
445
+ l = convertToPercentage(color.l);
446
+ rgb = hslToRgb(color.h, s, l);
447
+ ok = true;
448
+ format = 'hsl';
449
+ }
450
+ if (Object.prototype.hasOwnProperty.call(color, 'a')) {
451
+ a = color.a;
452
+ }
453
+ }
454
+ a = boundAlpha(a);
455
+ return {
456
+ ok: ok,
457
+ format: color.format || format,
458
+ r: Math.min(255, Math.max(rgb.r, 0)),
459
+ g: Math.min(255, Math.max(rgb.g, 0)),
460
+ b: Math.min(255, Math.max(rgb.b, 0)),
461
+ a: a,
462
+ };
463
+ }
464
+ // <http://www.w3.org/TR/css3-values/#integers>
465
+ var CSS_INTEGER = '[-\\+]?\\d+%?';
466
+ // <http://www.w3.org/TR/css3-values/#number-value>
467
+ var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
468
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
469
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
470
+ // Actual matching.
471
+ // Parentheses and commas are optional, but not required.
472
+ // Whitespace can take the place of commas or opening paren
473
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
474
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
475
+ var matchers = {
476
+ CSS_UNIT: new RegExp(CSS_UNIT),
477
+ rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
478
+ rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),
479
+ hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),
480
+ hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),
481
+ hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),
482
+ hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),
483
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
484
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
485
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
486
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
487
+ };
488
+ /**
489
+ * Permissive string parsing. Take in a number of formats, and output an object
490
+ * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
491
+ */
492
+ function stringInputToObject(color) {
493
+ color = color.trim().toLowerCase();
494
+ if (color.length === 0) {
495
+ return false;
496
+ }
497
+ var named = false;
498
+ if (names[color]) {
499
+ color = names[color];
500
+ named = true;
501
+ }
502
+ else if (color === 'transparent') {
503
+ return { r: 0, g: 0, b: 0, a: 0, format: 'name' };
504
+ }
505
+ // Try to match string input using regular expressions.
506
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
507
+ // Just return an object and let the conversion functions handle that.
508
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
509
+ var match = matchers.rgb.exec(color);
510
+ if (match) {
511
+ return { r: match[1], g: match[2], b: match[3] };
512
+ }
513
+ match = matchers.rgba.exec(color);
514
+ if (match) {
515
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
516
+ }
517
+ match = matchers.hsl.exec(color);
518
+ if (match) {
519
+ return { h: match[1], s: match[2], l: match[3] };
520
+ }
521
+ match = matchers.hsla.exec(color);
522
+ if (match) {
523
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
524
+ }
525
+ match = matchers.hsv.exec(color);
526
+ if (match) {
527
+ return { h: match[1], s: match[2], v: match[3] };
528
+ }
529
+ match = matchers.hsva.exec(color);
530
+ if (match) {
531
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
532
+ }
533
+ match = matchers.hex8.exec(color);
534
+ if (match) {
535
+ return {
536
+ r: parseIntFromHex(match[1]),
537
+ g: parseIntFromHex(match[2]),
538
+ b: parseIntFromHex(match[3]),
539
+ a: convertHexToDecimal(match[4]),
540
+ format: named ? 'name' : 'hex8',
541
+ };
542
+ }
543
+ match = matchers.hex6.exec(color);
544
+ if (match) {
545
+ return {
546
+ r: parseIntFromHex(match[1]),
547
+ g: parseIntFromHex(match[2]),
548
+ b: parseIntFromHex(match[3]),
549
+ format: named ? 'name' : 'hex',
550
+ };
551
+ }
552
+ match = matchers.hex4.exec(color);
553
+ if (match) {
554
+ return {
555
+ r: parseIntFromHex(match[1] + match[1]),
556
+ g: parseIntFromHex(match[2] + match[2]),
557
+ b: parseIntFromHex(match[3] + match[3]),
558
+ a: convertHexToDecimal(match[4] + match[4]),
559
+ format: named ? 'name' : 'hex8',
560
+ };
561
+ }
562
+ match = matchers.hex3.exec(color);
563
+ if (match) {
564
+ return {
565
+ r: parseIntFromHex(match[1] + match[1]),
566
+ g: parseIntFromHex(match[2] + match[2]),
567
+ b: parseIntFromHex(match[3] + match[3]),
568
+ format: named ? 'name' : 'hex',
569
+ };
570
+ }
571
+ return false;
572
+ }
573
+ /**
574
+ * Check to see if it looks like a CSS unit
575
+ * (see `matchers` above for definition).
576
+ */
577
+ function isValidCSSUnit(color) {
578
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
579
+ }
580
+
581
+ var hueStep = 2; // 色相阶梯
582
+
583
+ var saturationStep = 0.16; // 饱和度阶梯,浅色部分
584
+
585
+ var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
586
+
587
+ var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
588
+
589
+ var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
590
+
591
+ var lightColorCount = 5; // 浅色数量,主色上
592
+
593
+ var darkColorCount = 4; // 深色数量,主色下
594
+ // 暗色主题颜色映射关系表
595
+
596
+ var darkColorMap = [{
597
+ index: 7,
598
+ opacity: 0.15
599
+ }, {
600
+ index: 6,
601
+ opacity: 0.25
602
+ }, {
603
+ index: 5,
604
+ opacity: 0.3
605
+ }, {
606
+ index: 5,
607
+ opacity: 0.45
608
+ }, {
609
+ index: 5,
610
+ opacity: 0.65
611
+ }, {
612
+ index: 5,
613
+ opacity: 0.85
614
+ }, {
615
+ index: 4,
616
+ opacity: 0.9
617
+ }, {
618
+ index: 3,
619
+ opacity: 0.95
620
+ }, {
621
+ index: 2,
622
+ opacity: 0.97
623
+ }, {
624
+ index: 1,
625
+ opacity: 0.98
626
+ }]; // Wrapper function ported from TinyColor.prototype.toHsv
627
+ // Keep it here because of `hsv.h * 360`
628
+
629
+ function toHsv(_ref) {
630
+ var r = _ref.r,
631
+ g = _ref.g,
632
+ b = _ref.b;
633
+ var hsv = rgbToHsv(r, g, b);
634
+ return {
635
+ h: hsv.h * 360,
636
+ s: hsv.s,
637
+ v: hsv.v
638
+ };
639
+ } // Wrapper function ported from TinyColor.prototype.toHexString
640
+ // Keep it here because of the prefix `#`
641
+
642
+
643
+ function toHex(_ref2) {
644
+ var r = _ref2.r,
645
+ g = _ref2.g,
646
+ b = _ref2.b;
647
+ return "#".concat(rgbToHex(r, g, b, false));
648
+ } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
649
+ // Amount in range [0, 1]
650
+ // Assume color1 & color2 has no alpha, since the following src code did so.
651
+
652
+
653
+ function mix(rgb1, rgb2, amount) {
654
+ var p = amount / 100;
655
+ var rgb = {
656
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
657
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
658
+ b: (rgb2.b - rgb1.b) * p + rgb1.b
659
+ };
660
+ return rgb;
661
+ }
662
+
663
+ function getHue(hsv, i, light) {
664
+ var hue; // 根据色相不同,色相转向不同
665
+
666
+ if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
667
+ hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
668
+ } else {
669
+ hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
670
+ }
671
+
672
+ if (hue < 0) {
673
+ hue += 360;
674
+ } else if (hue >= 360) {
675
+ hue -= 360;
676
+ }
677
+
678
+ return hue;
679
+ }
680
+
681
+ function getSaturation(hsv, i, light) {
682
+ // grey color don't change saturation
683
+ if (hsv.h === 0 && hsv.s === 0) {
684
+ return hsv.s;
685
+ }
686
+
687
+ var saturation;
688
+
689
+ if (light) {
690
+ saturation = hsv.s - saturationStep * i;
691
+ } else if (i === darkColorCount) {
692
+ saturation = hsv.s + saturationStep;
693
+ } else {
694
+ saturation = hsv.s + saturationStep2 * i;
695
+ } // 边界值修正
696
+
697
+
698
+ if (saturation > 1) {
699
+ saturation = 1;
700
+ } // 第一格的 s 限制在 0.06-0.1 之间
701
+
702
+
703
+ if (light && i === lightColorCount && saturation > 0.1) {
704
+ saturation = 0.1;
705
+ }
706
+
707
+ if (saturation < 0.06) {
708
+ saturation = 0.06;
709
+ }
710
+
711
+ return Number(saturation.toFixed(2));
712
+ }
713
+
714
+ function getValue(hsv, i, light) {
715
+ var value;
716
+
717
+ if (light) {
718
+ value = hsv.v + brightnessStep1 * i;
719
+ } else {
720
+ value = hsv.v - brightnessStep2 * i;
721
+ }
722
+
723
+ if (value > 1) {
724
+ value = 1;
725
+ }
726
+
727
+ return Number(value.toFixed(2));
728
+ }
729
+
730
+ function generate$1(color) {
731
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
732
+ var patterns = [];
733
+ var pColor = inputToRGB(color);
734
+
735
+ for (var i = lightColorCount; i > 0; i -= 1) {
736
+ var hsv = toHsv(pColor);
737
+ var colorString = toHex(inputToRGB({
738
+ h: getHue(hsv, i, true),
739
+ s: getSaturation(hsv, i, true),
740
+ v: getValue(hsv, i, true)
741
+ }));
742
+ patterns.push(colorString);
743
+ }
744
+
745
+ patterns.push(toHex(pColor));
746
+
747
+ for (var _i = 1; _i <= darkColorCount; _i += 1) {
748
+ var _hsv = toHsv(pColor);
749
+
750
+ var _colorString = toHex(inputToRGB({
751
+ h: getHue(_hsv, _i),
752
+ s: getSaturation(_hsv, _i),
753
+ v: getValue(_hsv, _i)
754
+ }));
755
+
756
+ patterns.push(_colorString);
757
+ } // dark theme patterns
758
+
759
+
760
+ if (opts.theme === 'dark') {
761
+ return darkColorMap.map(function (_ref3) {
762
+ var index = _ref3.index,
763
+ opacity = _ref3.opacity;
764
+ var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));
765
+ return darkColorString;
766
+ });
767
+ }
768
+
769
+ return patterns;
770
+ }
771
+
772
+ var presetPrimaryColors = {
773
+ red: '#F5222D',
774
+ volcano: '#FA541C',
775
+ orange: '#FA8C16',
776
+ gold: '#FAAD14',
777
+ yellow: '#FADB14',
778
+ lime: '#A0D911',
779
+ green: '#52C41A',
780
+ cyan: '#13C2C2',
781
+ blue: '#1890FF',
782
+ geekblue: '#2F54EB',
783
+ purple: '#722ED1',
784
+ magenta: '#EB2F96',
785
+ grey: '#666666'
786
+ };
787
+ var presetPalettes = {};
788
+ var presetDarkPalettes = {};
789
+ Object.keys(presetPrimaryColors).forEach(function (key) {
790
+ presetPalettes[key] = generate$1(presetPrimaryColors[key]);
791
+ presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
792
+
793
+ presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
794
+ theme: 'dark',
795
+ backgroundColor: '#141414'
796
+ });
797
+ presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
798
+ });
799
+ presetPalettes.red;
800
+ presetPalettes.volcano;
801
+ presetPalettes.gold;
802
+ presetPalettes.orange;
803
+ presetPalettes.yellow;
804
+ presetPalettes.lime;
805
+ presetPalettes.green;
806
+ presetPalettes.cyan;
807
+ presetPalettes.blue;
808
+ presetPalettes.geekblue;
809
+ presetPalettes.purple;
810
+ presetPalettes.magenta;
811
+ presetPalettes.grey;
812
+
813
+ // https://github.com/substack/insert-css
814
+ var containers = []; // will store container HTMLElement references
815
+
816
+ var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
817
+
818
+ var usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';
819
+
820
+ function createStyleElement() {
821
+ var styleElement = document.createElement('style');
822
+ styleElement.setAttribute('type', 'text/css');
823
+ return styleElement;
824
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
825
+
826
+
827
+ function insertCss(css, options) {
828
+ options = options || {};
829
+
830
+ if (css === undefined) {
831
+ throw new Error(usage);
832
+ }
833
+
834
+ var position = options.prepend === true ? 'prepend' : 'append';
835
+ var container = options.container !== undefined ? options.container : document.querySelector('head');
836
+ var containerId = containers.indexOf(container); // first time we see this container, create the necessary entries
837
+
838
+ if (containerId === -1) {
839
+ containerId = containers.push(container) - 1;
840
+ styleElements[containerId] = {};
841
+ } // try to get the correponding container + position styleElement, create it otherwise
842
+
843
+
844
+ var styleElement;
845
+
846
+ if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {
847
+ styleElement = styleElements[containerId][position];
848
+ } else {
849
+ styleElement = styleElements[containerId][position] = createStyleElement();
850
+
851
+ if (position === 'prepend') {
852
+ container.insertBefore(styleElement, container.childNodes[0]);
853
+ } else {
854
+ container.appendChild(styleElement);
855
+ }
856
+ } // strip potential UTF-8 BOM if css was read from a file
857
+
858
+
859
+ if (css.charCodeAt(0) === 0xfeff) {
860
+ css = css.substr(1, css.length);
861
+ } // actually add the stylesheet
862
+
863
+
864
+ if (styleElement.styleSheet) {
865
+ styleElement.styleSheet.cssText += css;
866
+ } else {
867
+ styleElement.textContent += css;
868
+ }
869
+
870
+ return styleElement;
871
+ }
872
+
873
+ function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$3(target, key, source[key]); }); } return target; }
874
+
875
+ function _defineProperty$3(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
876
+ function warn(valid, message) {
877
+ // Support uglify
878
+ if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
879
+ console.error("Warning: ".concat(message));
880
+ }
881
+ }
882
+ function warning(valid, message) {
883
+ warn(valid, "[@ant-design/icons-vue] ".concat(message));
884
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
885
+
886
+ function isIconDefinition(target) {
887
+ return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');
888
+ }
889
+ function generate(node, key, rootProps) {
890
+ if (!rootProps) {
891
+ return vue.h(node.tag, _objectSpread$3({
892
+ key: key
893
+ }, node.attrs), (node.children || []).map(function (child, index) {
894
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
895
+ }));
896
+ }
897
+
898
+ return vue.h(node.tag, _objectSpread$3({
899
+ key: key
900
+ }, rootProps, node.attrs), (node.children || []).map(function (child, index) {
901
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
902
+ }));
903
+ }
904
+ function getSecondaryColor(primaryColor) {
905
+ // choose the second color
906
+ return generate$1(primaryColor)[0];
907
+ }
908
+ function normalizeTwoToneColors(twoToneColor) {
909
+ if (!twoToneColor) {
910
+ return [];
911
+ }
912
+
913
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
914
+ } // These props make sure that the SVG behaviours like general text.
915
+ var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
916
+ var cssInjectedFlag = false;
917
+ var useInsertStyles = function useInsertStyles() {
918
+ var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
919
+ vue.nextTick(function () {
920
+ if (!cssInjectedFlag) {
921
+ if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
922
+ insertCss(styleStr, {
923
+ prepend: true
924
+ });
925
+ }
926
+
927
+ cssInjectedFlag = true;
928
+ }
929
+ });
930
+ };
931
+
932
+ var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
933
+
934
+ function _objectWithoutProperties$1(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$1(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
935
+
936
+ function _objectWithoutPropertiesLoose$1(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
937
+
938
+ function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$2(target, key, source[key]); }); } return target; }
939
+
940
+ function _defineProperty$2(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
941
+ var twoToneColorPalette = {
942
+ primaryColor: '#333',
943
+ secondaryColor: '#E6E6E6',
944
+ calculated: false
945
+ };
946
+
947
+ function setTwoToneColors(_ref) {
948
+ var primaryColor = _ref.primaryColor,
949
+ secondaryColor = _ref.secondaryColor;
950
+ twoToneColorPalette.primaryColor = primaryColor;
951
+ twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
952
+ twoToneColorPalette.calculated = !!secondaryColor;
953
+ }
954
+
955
+ function getTwoToneColors() {
956
+ return _objectSpread$2({}, twoToneColorPalette);
957
+ }
958
+
959
+ var IconBase = function IconBase(props, context) {
960
+ var _props$context$attrs = _objectSpread$2({}, props, context.attrs),
961
+ icon = _props$context$attrs.icon,
962
+ primaryColor = _props$context$attrs.primaryColor,
963
+ secondaryColor = _props$context$attrs.secondaryColor,
964
+ restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
965
+
966
+ var colors = twoToneColorPalette;
967
+
968
+ if (primaryColor) {
969
+ colors = {
970
+ primaryColor: primaryColor,
971
+ secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
972
+ };
973
+ }
974
+
975
+ useInsertStyles();
976
+ warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
977
+
978
+ if (!isIconDefinition(icon)) {
979
+ return null;
980
+ }
981
+
982
+ var target = icon;
983
+
984
+ if (target && typeof target.icon === 'function') {
985
+ target = _objectSpread$2({}, target, {
986
+ icon: target.icon(colors.primaryColor, colors.secondaryColor)
987
+ });
988
+ }
989
+
990
+ return generate(target.icon, "svg-".concat(target.name), _objectSpread$2({}, restProps, {
991
+ 'data-icon': target.name,
992
+ width: '1em',
993
+ height: '1em',
994
+ fill: 'currentColor',
995
+ 'aria-hidden': 'true'
996
+ })); // },
997
+ };
998
+
999
+ IconBase.props = {
1000
+ icon: Object,
1001
+ primaryColor: String,
1002
+ secondaryColor: String,
1003
+ focusable: String
1004
+ };
1005
+ IconBase.inheritAttrs = false;
1006
+ IconBase.displayName = 'IconBase';
1007
+ IconBase.getTwoToneColors = getTwoToneColors;
1008
+ IconBase.setTwoToneColors = setTwoToneColors;
1009
+ var VueIcon = IconBase;
1010
+
1011
+ function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1(); }
1012
+
1013
+ function _nonIterableRest$1() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1014
+
1015
+ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
1016
+
1017
+ function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1018
+
1019
+ function _iterableToArrayLimit$1(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1020
+
1021
+ function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }
1022
+ function setTwoToneColor(twoToneColor) {
1023
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1024
+ _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
1025
+ primaryColor = _normalizeTwoToneColo2[0],
1026
+ secondaryColor = _normalizeTwoToneColo2[1];
1027
+
1028
+ return VueIcon.setTwoToneColors({
1029
+ primaryColor: primaryColor,
1030
+ secondaryColor: secondaryColor
1031
+ });
1032
+ }
1033
+ function getTwoToneColor() {
1034
+ var colors = VueIcon.getTwoToneColors();
1035
+
1036
+ if (!colors.calculated) {
1037
+ return colors.primaryColor;
1038
+ }
1039
+
1040
+ return [colors.primaryColor, colors.secondaryColor];
1041
+ }
1042
+
1043
+ var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
1044
+
1045
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1046
+
1047
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1048
+
1049
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1050
+
1051
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1052
+
1053
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1054
+
1055
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1056
+
1057
+ function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } return target; }
1058
+
1059
+ function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1060
+
1061
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
1062
+
1063
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
1064
+
1065
+ setTwoToneColor('#1890ff');
1066
+
1067
+ var Icon = function Icon(props, context) {
1068
+ var _classObj;
1069
+
1070
+ var _props$context$attrs = _objectSpread$1({}, props, context.attrs),
1071
+ cls = _props$context$attrs["class"],
1072
+ icon = _props$context$attrs.icon,
1073
+ spin = _props$context$attrs.spin,
1074
+ rotate = _props$context$attrs.rotate,
1075
+ tabindex = _props$context$attrs.tabindex,
1076
+ twoToneColor = _props$context$attrs.twoToneColor,
1077
+ onClick = _props$context$attrs.onClick,
1078
+ restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
1079
+
1080
+ var classObj = (_classObj = {
1081
+ anticon: true
1082
+ }, _defineProperty$1(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$1(_classObj, cls, cls), _classObj);
1083
+ var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
1084
+ var iconTabIndex = tabindex;
1085
+
1086
+ if (iconTabIndex === undefined && onClick) {
1087
+ iconTabIndex = -1;
1088
+ restProps.tabindex = iconTabIndex;
1089
+ }
1090
+
1091
+ var svgStyle = rotate ? {
1092
+ msTransform: "rotate(".concat(rotate, "deg)"),
1093
+ transform: "rotate(".concat(rotate, "deg)")
1094
+ } : undefined;
1095
+
1096
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1097
+ _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
1098
+ primaryColor = _normalizeTwoToneColo2[0],
1099
+ secondaryColor = _normalizeTwoToneColo2[1];
1100
+
1101
+ return vue.createVNode("span", _objectSpread$1({
1102
+ "role": "img",
1103
+ "aria-label": icon.name
1104
+ }, restProps, {
1105
+ "onClick": onClick,
1106
+ "class": classObj
1107
+ }), [vue.createVNode(VueIcon, {
1108
+ "class": svgClassString,
1109
+ "icon": icon,
1110
+ "primaryColor": primaryColor,
1111
+ "secondaryColor": secondaryColor,
1112
+ "style": svgStyle
1113
+ }, null)]);
1114
+ };
1115
+
1116
+ Icon.props = {
1117
+ spin: Boolean,
1118
+ rotate: Number,
1119
+ icon: Object,
1120
+ twoToneColor: String
1121
+ };
1122
+ Icon.displayName = 'AntdIcon';
1123
+ Icon.inheritAttrs = false;
1124
+ Icon.getTwoToneColor = getTwoToneColor;
1125
+ Icon.setTwoToneColor = setTwoToneColor;
1126
+ var AntdIcon = Icon;
1127
+
1128
+ // This icon file is generated automatically.
1129
+ var CloseCircleFilled$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" } }] }, "name": "close-circle", "theme": "filled" };
1130
+ var CloseCircleFilledSvg = CloseCircleFilled$2;
1131
+
1132
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
1133
+
1134
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1135
+
1136
+ var CloseCircleFilled = function CloseCircleFilled(props, context) {
1137
+ var p = _objectSpread({}, props, context.attrs);
1138
+
1139
+ return vue.createVNode(AntdIcon, _objectSpread({}, p, {
1140
+ "icon": CloseCircleFilledSvg
1141
+ }), null);
1142
+ };
1143
+
1144
+ CloseCircleFilled.displayName = 'CloseCircleFilled';
1145
+ CloseCircleFilled.inheritAttrs = false;
1146
+ var CloseCircleFilled$1 = CloseCircleFilled;
1147
+
1148
+ var _export_sfc = (sfc, props) => {
1149
+ const target = sfc.__vccOpts || sfc;
1150
+ for (const [key, val] of props) {
1151
+ target[key] = val;
1152
+ }
1153
+ return target;
1154
+ };
1155
+
1156
+ const _sfc_main$3 = vue.defineComponent({
1157
+ components: { CloseCircleFilled: CloseCircleFilled$1, Empty: Empty__default["default"], AInput: AInput__default["default"], Checkbox: Checkbox__default["default"], ATree: ATree__default["default"] },
1158
+ props: {
1159
+ limit: {
1160
+ type: Number,
1161
+ default: 0
1162
+ },
1163
+ list: {
1164
+ type: Array,
1165
+ default: () => []
1166
+ },
1167
+ selected: {
1168
+ type: Array,
1169
+ default: () => []
1170
+ },
1171
+ dataMap: {
1172
+ type: Map,
1173
+ default: () => /* @__PURE__ */ new Map()
1174
+ },
1175
+ isTree: {
1176
+ type: Boolean,
1177
+ default: false
1178
+ },
1179
+ curlistKeys: {
1180
+ type: Set,
1181
+ default: () => /* @__PURE__ */ new Set()
1182
+ }
1183
+ },
1184
+ emits: ["fetchList", "update:selected"],
1185
+ setup(props, { emit }) {
1186
+ const state = vue.reactive({
1187
+ searchVal: "",
1188
+ selectAll: false,
1189
+ indeterminate: false,
1190
+ emptyPic: Empty__default["default"].PRESENTED_IMAGE_SIMPLE,
1191
+ listChecked: {},
1192
+ isFulfill: false,
1193
+ departmentChecked: {}
1194
+ });
1195
+ const methods = {
1196
+ changeAllOption() {
1197
+ let status = state.selectAll;
1198
+ let length = props.selected.length;
1199
+ props.list.forEach((item) => {
1200
+ if (status && props.limit > 0 && length++ >= props.limit)
1201
+ return;
1202
+ state.listChecked[item.key] = status;
1203
+ });
1204
+ },
1205
+ search() {
1206
+ let data = state.searchVal ? { searchVal: state.searchVal } : false;
1207
+ emit("fetchList", data);
1208
+ },
1209
+ setState() {
1210
+ let indeterminate = false;
1211
+ let selectAll = true;
1212
+ props.list.forEach((item) => {
1213
+ if (!state.listChecked[item.key]) {
1214
+ selectAll = false;
1215
+ } else {
1216
+ indeterminate = true;
1217
+ }
1218
+ });
1219
+ state.selectAll = selectAll;
1220
+ state.indeterminate = selectAll ? false : indeterminate;
1221
+ },
1222
+ deleteOption(key) {
1223
+ if (props.isTree) {
1224
+ let list = [].concat(state.departmentChecked);
1225
+ let result = [];
1226
+ list.forEach((item) => {
1227
+ if (!(item === key || props.dataMap.get(item) && key === props.dataMap.get(item)["parent"])) {
1228
+ result.push(item);
1229
+ }
1230
+ });
1231
+ state.departmentChecked = Array.from(new Set(result));
1232
+ } else {
1233
+ state.listChecked[key] = false;
1234
+ }
1235
+ },
1236
+ getSelectName(key) {
1237
+ let data = props.dataMap.get(String(key)) || null;
1238
+ return data ? data.title : "\u672A\u77E5";
1239
+ }
1240
+ };
1241
+ vue.watch(() => state.listChecked, () => {
1242
+ let list = [];
1243
+ for (let [key, value] of Object.entries(state.listChecked)) {
1244
+ value && list.push(key);
1245
+ }
1246
+ if (props.limit > 0 && list.length >= props.limit)
1247
+ state.isFulfill = true;
1248
+ else
1249
+ state.isFulfill = false;
1250
+ methods.setState();
1251
+ emit("update:selected", list);
1252
+ }, { deep: true });
1253
+ vue.watch(() => state.departmentChecked, () => {
1254
+ let flatMap = props.dataMap;
1255
+ let curlistKeys = props.curlistKeys;
1256
+ let hadselected = new Set(props.selected);
1257
+ let curselect = new Set(state.departmentChecked);
1258
+ for (let key of hadselected) {
1259
+ if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
1260
+ hadselected.delete(key);
1261
+ }
1262
+ }
1263
+ for (let key of curselect) {
1264
+ let obj = flatMap.get(key);
1265
+ if (obj && !curselect.has(obj["parent"])) {
1266
+ hadselected.add(key);
1267
+ }
1268
+ }
1269
+ emit("update:selected", Array.from(hadselected));
1270
+ }, { deep: true });
1271
+ vue.watch(() => props.list, () => {
1272
+ !props.isTree && methods.setState();
1273
+ });
1274
+ vue.onMounted(() => {
1275
+ let list = props.selected;
1276
+ list && list.forEach((key) => {
1277
+ state.listChecked[key] = true;
1278
+ });
1279
+ });
1280
+ return {
1281
+ ...vue.toRefs(state),
1282
+ ...methods
1283
+ };
1284
+ }
1285
+ });
1286
+ const _hoisted_1$3 = { class: "multiple-selector" };
1287
+ const _hoisted_2$2 = { class: "__selector-modal-panel" };
1288
+ const _hoisted_3$2 = { class: "__search-panel" };
1289
+ const _hoisted_4$2 = { class: "__selector-modal-options" };
1290
+ const _hoisted_5$2 = { class: "__selector-modal-options-item fixed-option" };
1291
+ const _hoisted_6$1 = /* @__PURE__ */ vue.createTextVNode("\u5168\u9009");
1292
+ const _hoisted_7$1 = { class: "department-option-item" };
1293
+ const _hoisted_8$1 = {
1294
+ key: 0,
1295
+ class: "department-desc"
1296
+ };
1297
+ const _hoisted_9$1 = {
1298
+ key: 2,
1299
+ class: "noData",
1300
+ style: { "height": "280px" }
1301
+ };
1302
+ const _hoisted_10$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
1303
+ const _hoisted_11$1 = { class: "__selector-chosen-panel" };
1304
+ const _hoisted_12$1 = { class: "__chosen-panel-tip" };
1305
+ const _hoisted_13$1 = {
1306
+ key: 0,
1307
+ class: "__limit-tip"
1308
+ };
1309
+ const _hoisted_14$1 = { class: "__chosen-panel-list" };
1310
+ const _hoisted_15$1 = { class: "__tiem-title" };
1311
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
1312
+ const _component_search_outlined = vue.resolveComponent("search-outlined");
1313
+ const _component_AInput = vue.resolveComponent("AInput");
1314
+ const _component_Checkbox = vue.resolveComponent("Checkbox");
1315
+ const _component_ATree = vue.resolveComponent("ATree");
1316
+ const _component_Empty = vue.resolveComponent("Empty");
1317
+ const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
1318
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
1319
+ vue.createElementVNode("div", _hoisted_2$2, [
1320
+ vue.createElementVNode("div", _hoisted_3$2, [
1321
+ vue.createVNode(_component_AInput, {
1322
+ value: _ctx.searchVal,
1323
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
1324
+ placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u7F16\u53F7",
1325
+ onChange: _ctx.search
1326
+ }, {
1327
+ suffix: vue.withCtx(() => [
1328
+ vue.createVNode(_component_search_outlined, { style: { color: "#9393A3" } })
1329
+ ]),
1330
+ _: 1
1331
+ }, 8, ["value", "onChange"]),
1332
+ vue.createElementVNode("div", _hoisted_4$2, [
1333
+ !_ctx.isTree ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1334
+ vue.createElementVNode("div", _hoisted_5$2, [
1335
+ vue.withDirectives(vue.createVNode(_component_Checkbox, {
1336
+ checked: _ctx.selectAll,
1337
+ "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => _ctx.selectAll = $event),
1338
+ indeterminate: _ctx.indeterminate,
1339
+ onChange: _ctx.changeAllOption
1340
+ }, {
1341
+ default: vue.withCtx(() => [
1342
+ _hoisted_6$1
1343
+ ]),
1344
+ _: 1
1345
+ }, 8, ["checked", "indeterminate", "onChange"]), [
1346
+ [vue.vShow, _ctx.list.length]
1347
+ ])
1348
+ ]),
1349
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1350
+ return vue.openBlock(), vue.createElementBlock("div", {
1351
+ key: item.key,
1352
+ class: "__selector-modal-options-item"
1353
+ }, [
1354
+ vue.createVNode(_component_Checkbox, {
1355
+ checked: _ctx.listChecked[item.key],
1356
+ "onUpdate:checked": ($event) => _ctx.listChecked[item.key] = $event,
1357
+ class: "__selector-modal-option-check",
1358
+ disabled: _ctx.isFulfill
1359
+ }, {
1360
+ default: vue.withCtx(() => [
1361
+ vue.createTextVNode(vue.toDisplayString(item.title), 1)
1362
+ ]),
1363
+ _: 2
1364
+ }, 1032, ["checked", "onUpdate:checked", "disabled"])
1365
+ ]);
1366
+ }), 128))
1367
+ ], 64)) : _ctx.isTree ? (vue.openBlock(), vue.createBlock(_component_ATree, {
1368
+ key: 1,
1369
+ checkedKeys: _ctx.departmentChecked,
1370
+ "onUpdate:checkedKeys": _cache[2] || (_cache[2] = ($event) => _ctx.departmentChecked = $event),
1371
+ checkable: "",
1372
+ "tree-data": _ctx.list
1373
+ }, {
1374
+ title: vue.withCtx(({ title, description }) => [
1375
+ vue.createElementVNode("div", _hoisted_7$1, [
1376
+ vue.createElementVNode("span", null, vue.toDisplayString(title), 1),
1377
+ description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_8$1, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
1378
+ ])
1379
+ ]),
1380
+ _: 1
1381
+ }, 8, ["checkedKeys", "tree-data"])) : vue.createCommentVNode("v-if", true),
1382
+ _ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$1, [
1383
+ vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
1384
+ description: vue.withCtx(() => [
1385
+ vue.createElementVNode("span", _hoisted_10$1, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
1386
+ ]),
1387
+ _: 1
1388
+ }, 8, ["image"])
1389
+ ])) : vue.createCommentVNode("v-if", true)
1390
+ ])
1391
+ ])
1392
+ ]),
1393
+ vue.createElementVNode("div", _hoisted_11$1, [
1394
+ vue.createElementVNode("div", _hoisted_12$1, [
1395
+ vue.createElementVNode("span", null, "\u5DF2\u9009\u62E9" + vue.toDisplayString(_ctx.selected && _ctx.selected.length || 0) + "\u4EBA", 1),
1396
+ _ctx.limit ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13$1, "\u6700\u591A\u9009\u62E9" + vue.toDisplayString(_ctx.limit) + "\u4EBA", 1)) : vue.createCommentVNode("v-if", true)
1397
+ ]),
1398
+ vue.createElementVNode("div", _hoisted_14$1, [
1399
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
1400
+ return vue.openBlock(), vue.createElementBlock("div", {
1401
+ key: item + "checked",
1402
+ class: "__chosen-panel-list-item"
1403
+ }, [
1404
+ vue.createElementVNode("span", _hoisted_15$1, vue.toDisplayString(_ctx.getSelectName(item)), 1),
1405
+ vue.createVNode(_component_CloseCircleFilled, {
1406
+ style: { "color": "#ced1d9" },
1407
+ onMousedown: vue.withModifiers(($event) => _ctx.deleteOption(item), ["stop"])
1408
+ }, null, 8, ["onMousedown"])
1409
+ ]);
1410
+ }), 128))
1411
+ ])
1412
+ ])
1413
+ ]);
1414
+ }
1415
+ var multipleCmp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__file", "multipleCmp.vue"]]);
1416
+
1417
+ const _sfc_main$2 = vue.defineComponent({
1418
+ name: "RadioCmp",
1419
+ components: { ARadio: ARadio__default["default"], AInput: AInput__default["default"], ARadioGroup: ARadio.Group },
1420
+ props: {
1421
+ list: {
1422
+ type: Array,
1423
+ default: () => []
1424
+ },
1425
+ selected: {
1426
+ type: String || Number || Object,
1427
+ default: ""
1428
+ }
1429
+ },
1430
+ emits: ["fetchList", "update:selected"],
1431
+ setup(_, { emit }) {
1432
+ const searchVal = vue.ref("");
1433
+ const emptyPic = Empty__default["default"].PRESENTED_IMAGE_SIMPLE;
1434
+ function search() {
1435
+ let data = searchVal.value ? { searchVal: searchVal.value } : false;
1436
+ emit("fetchList", data);
1437
+ }
1438
+ function radioChange(e) {
1439
+ emit("update:selected", e.target.value);
1440
+ }
1441
+ return {
1442
+ searchVal,
1443
+ emptyPic,
1444
+ search,
1445
+ radioChange
1446
+ };
1447
+ }
1448
+ });
1449
+ const _hoisted_1$2 = { class: "radio-selector-panel" };
1450
+ const _hoisted_2$1 = { class: "__search-panel withoutpad" };
1451
+ const _hoisted_3$1 = {
1452
+ key: 0,
1453
+ class: "__selector-modal-options __radio-panel"
1454
+ };
1455
+ const _hoisted_4$1 = {
1456
+ key: 1,
1457
+ class: "noData"
1458
+ };
1459
+ const _hoisted_5$1 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
1460
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
1461
+ const _component_search_outlined = vue.resolveComponent("search-outlined");
1462
+ const _component_a_input = vue.resolveComponent("a-input");
1463
+ const _component_ARadio = vue.resolveComponent("ARadio");
1464
+ const _component_ARadioGroup = vue.resolveComponent("ARadioGroup");
1465
+ const _component_Empty = vue.resolveComponent("Empty");
1466
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
1467
+ vue.createElementVNode("div", _hoisted_2$1, [
1468
+ vue.createVNode(_component_a_input, {
1469
+ value: _ctx.searchVal,
1470
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
1471
+ placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u7F16\u53F7",
1472
+ onChange: _ctx.search
1473
+ }, {
1474
+ suffix: vue.withCtx(() => [
1475
+ vue.createVNode(_component_search_outlined, { style: { color: "#9393A3" } })
1476
+ ]),
1477
+ _: 1
1478
+ }, 8, ["value", "onChange"]),
1479
+ _ctx.list && _ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1, [
1480
+ vue.createVNode(_component_ARadioGroup, {
1481
+ value: _ctx.selected,
1482
+ style: { width: "100%" },
1483
+ onChange: _ctx.radioChange
1484
+ }, {
1485
+ default: vue.withCtx(() => [
1486
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1487
+ return vue.openBlock(), vue.createBlock(_component_ARadio, {
1488
+ key: item.key,
1489
+ class: "__radio-option",
1490
+ value: item.key
1491
+ }, {
1492
+ default: vue.withCtx(() => [
1493
+ vue.createTextVNode(vue.toDisplayString(item.title), 1)
1494
+ ]),
1495
+ _: 2
1496
+ }, 1032, ["value"]);
1497
+ }), 128))
1498
+ ]),
1499
+ _: 1
1500
+ }, 8, ["value", "onChange"])
1501
+ ])) : vue.createCommentVNode("v-if", true),
1502
+ _ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [
1503
+ vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
1504
+ description: vue.withCtx(() => [
1505
+ vue.createElementVNode("span", _hoisted_5$1, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
1506
+ ]),
1507
+ _: 1
1508
+ }, 8, ["image"])
1509
+ ])) : vue.createCommentVNode("v-if", true)
1510
+ ])
1511
+ ]);
1512
+ }
1513
+ var radioCmp = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__file", "radioCmp.vue"]]);
1514
+
1515
+ const _sfc_main$1 = vue.defineComponent({
1516
+ name: "VariedCmp",
1517
+ components: { CloseCircleFilled: CloseCircleFilled$1, AInput: AInput__default["default"], Checkbox: Checkbox__default["default"], ATree: ATree__default["default"] },
1518
+ props: {
1519
+ list: {
1520
+ type: Array,
1521
+ default: () => []
1522
+ },
1523
+ selected: {
1524
+ type: Array,
1525
+ default: () => []
1526
+ },
1527
+ dataMap: {
1528
+ type: Map,
1529
+ default: () => /* @__PURE__ */ new Map()
1530
+ },
1531
+ curlistKeys: {
1532
+ type: Set,
1533
+ default: () => /* @__PURE__ */ new Set()
1534
+ }
1535
+ },
1536
+ emits: ["fetchList", "update:selected"],
1537
+ setup(props, { emit }) {
1538
+ const emptyPic = Empty__default["default"].PRESENTED_IMAGE_SIMPLE;
1539
+ const activeKey = vue.ref(0);
1540
+ const searchVal = vue.ref("");
1541
+ const staffsChecked = vue.ref({});
1542
+ const groupChecked = vue.ref({});
1543
+ const departmentChecked = vue.ref([]);
1544
+ const shopChecked = vue.ref({});
1545
+ const inputPlaceHolder = vue.computed(() => {
1546
+ if (activeKey.value === 2) {
1547
+ return "\u8BF7\u8F93\u5165\u90E8\u95E8\u641C\u7D22";
1548
+ } else if (activeKey.value === 3) {
1549
+ return "\u8BF7\u8F93\u5165\u5DE5\u4F5C\u7EC4\u641C\u7D22";
1550
+ } else if (activeKey.value === 4) {
1551
+ return "\u8BF7\u8F93\u5165\u5E97\u94FA\u641C\u7D22";
1552
+ }
1553
+ return "\u8BF7\u8F93\u5165\u4EBA\u540D\u641C\u7D22";
1554
+ });
1555
+ const areas = vue.readonly([
1556
+ { title: "\u6210\u5458", key: 0, paramStr: "staff" },
1557
+ { title: "\u90E8\u95E8", key: 1, paramStr: "department" },
1558
+ { title: "\u5DE5\u4F5C\u7EC4", key: 2, paramStr: "group" },
1559
+ { title: "\u5E97\u94FA", key: 3, paramStr: "shop" }
1560
+ ]);
1561
+ const methods = {
1562
+ deleteOption(key) {
1563
+ let object = new Object();
1564
+ if (object.hasOwnProperty.call(staffsChecked.value, key)) {
1565
+ staffsChecked.value[key] = false;
1566
+ } else if (object.hasOwnProperty.call(shopChecked.value, key)) {
1567
+ shopChecked.value[key] = false;
1568
+ } else if (object.hasOwnProperty.call(groupChecked.value, key)) {
1569
+ groupChecked.value[key] = false;
1570
+ } else {
1571
+ let list = [].concat(departmentChecked.value);
1572
+ let result = [];
1573
+ list.forEach((item) => {
1574
+ if (!(item === key || props.dataMap.get(item) && key === props.dataMap.get(item)["parent"])) {
1575
+ result.push(item);
1576
+ }
1577
+ });
1578
+ departmentChecked.value = Array.from(new Set(result));
1579
+ }
1580
+ },
1581
+ changeArea(item) {
1582
+ activeKey.value = item.key;
1583
+ searchVal.value = "";
1584
+ if (activeKey.value === 1) {
1585
+ methods.search();
1586
+ } else
1587
+ emit("fetchList", false);
1588
+ },
1589
+ search() {
1590
+ emit("fetchList", {
1591
+ searchVal: searchVal.value,
1592
+ area: areas[activeKey.value].paramStr
1593
+ });
1594
+ },
1595
+ getSelectName(key) {
1596
+ let data = props.dataMap.get(String(key)) || null;
1597
+ return data ? data.title : "\u672A\u77E5";
1598
+ }
1599
+ };
1600
+ vue.watch(() => departmentChecked, () => {
1601
+ let flatMap = props.dataMap;
1602
+ let curlistKeys = props.curlistKeys;
1603
+ let hadselected = new Set(props.selected);
1604
+ let curselect = new Set(departmentChecked.value);
1605
+ for (let key of hadselected) {
1606
+ if (curlistKeys.has(key) && (!curselect.has(key) || curselect.has(key) && curselect.has(flatMap.get(key)["parent"]))) {
1607
+ hadselected.delete(key);
1608
+ }
1609
+ }
1610
+ for (let key of curselect) {
1611
+ let obj = flatMap.get(key);
1612
+ if (obj && !curselect.has(obj["parent"])) {
1613
+ hadselected.add(key);
1614
+ }
1615
+ }
1616
+ emit("update:selected", Array.from(hadselected));
1617
+ }, { deep: true });
1618
+ vue.watch(() => staffsChecked, () => {
1619
+ let set = new Set(props.selected.length ? props.selected : null);
1620
+ for (let [key, value] of Object.entries(staffsChecked.value)) {
1621
+ if (value) {
1622
+ set.add(key);
1623
+ } else {
1624
+ set.has(key) && set.delete(key);
1625
+ }
1626
+ }
1627
+ emit("update:selected", Array.from(set));
1628
+ }, { deep: true });
1629
+ vue.watch(() => shopChecked, () => {
1630
+ let set = new Set(props.selected.length ? props.selected : null);
1631
+ for (let [key, value] of Object.entries(shopChecked.value)) {
1632
+ if (value) {
1633
+ set.add(key);
1634
+ } else {
1635
+ set.has(key) && set.delete(key);
1636
+ }
1637
+ }
1638
+ emit("update:selected", Array.from(set));
1639
+ }, { deep: true });
1640
+ vue.watch(() => groupChecked, () => {
1641
+ let set = new Set(props.selected.length ? props.selected : null);
1642
+ for (let [key, value] of Object.entries(groupChecked.value)) {
1643
+ if (value) {
1644
+ set.add(key);
1645
+ } else {
1646
+ set.has(key) && set.delete(key);
1647
+ }
1648
+ }
1649
+ emit("update:selected", Array.from(set));
1650
+ }, { deep: true });
1651
+ vue.onMounted(() => {
1652
+ let list = props.selected;
1653
+ list && list.forEach((key) => {
1654
+ staffsChecked.value[key] = true;
1655
+ groupChecked.value[key] = true;
1656
+ shopChecked.value[key] = true;
1657
+ departmentChecked.value.push(key);
1658
+ });
1659
+ });
1660
+ return {
1661
+ emptyPic,
1662
+ activeKey,
1663
+ searchVal,
1664
+ staffsChecked,
1665
+ groupChecked,
1666
+ departmentChecked,
1667
+ shopChecked,
1668
+ inputPlaceHolder,
1669
+ areas,
1670
+ ...methods
1671
+ };
1672
+ }
1673
+ });
1674
+ const _hoisted_1$1 = { class: "varied-selector-panel" };
1675
+ const _hoisted_2 = { class: "__selector-modal-panel-withGroup" };
1676
+ const _hoisted_3 = { class: "varied-area-tabs" };
1677
+ const _hoisted_4 = ["onClick"];
1678
+ const _hoisted_5 = { class: "area-panel" };
1679
+ const _hoisted_6 = {
1680
+ key: 0,
1681
+ class: "noData"
1682
+ };
1683
+ const _hoisted_7 = { style: { "color": "#9393a3", "font-size": "12px", "font-weight": "400" } };
1684
+ const _hoisted_8 = {
1685
+ key: 0,
1686
+ class: "__selector-modal-options"
1687
+ };
1688
+ const _hoisted_9 = {
1689
+ key: 1,
1690
+ class: "__selector-modal-options"
1691
+ };
1692
+ const _hoisted_10 = { class: "department-option-item" };
1693
+ const _hoisted_11 = {
1694
+ key: 0,
1695
+ class: "department-desc"
1696
+ };
1697
+ const _hoisted_12 = {
1698
+ key: 2,
1699
+ class: "__selector-modal-options"
1700
+ };
1701
+ const _hoisted_13 = {
1702
+ key: 3,
1703
+ class: "__selector-modal-options"
1704
+ };
1705
+ const _hoisted_14 = { class: "__selector-chosen-panel" };
1706
+ const _hoisted_15 = { class: "__chosen-panel-list" };
1707
+ const _hoisted_16 = { class: "__tiem-title" };
1708
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1709
+ const _component_search_outlined = vue.resolveComponent("search-outlined");
1710
+ const _component_a_input = vue.resolveComponent("a-input");
1711
+ const _component_Empty = vue.resolveComponent("Empty");
1712
+ const _component_Checkbox = vue.resolveComponent("Checkbox");
1713
+ const _component_a_tree = vue.resolveComponent("a-tree");
1714
+ const _component_CloseCircleFilled = vue.resolveComponent("CloseCircleFilled");
1715
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
1716
+ vue.createElementVNode("div", _hoisted_2, [
1717
+ vue.createElementVNode("div", _hoisted_3, [
1718
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.areas, (item) => {
1719
+ return vue.openBlock(), vue.createElementBlock("div", {
1720
+ key: item.key,
1721
+ class: vue.normalizeClass(["area-tabs-item", { active: item.key === _ctx.activeKey }]),
1722
+ onClick: vue.withModifiers(($event) => _ctx.changeArea(item), ["stop"])
1723
+ }, vue.toDisplayString(item.title), 11, _hoisted_4);
1724
+ }), 128))
1725
+ ]),
1726
+ vue.createVNode(_component_a_input, {
1727
+ value: _ctx.searchVal,
1728
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.searchVal = $event),
1729
+ placeholder: _ctx.inputPlaceHolder,
1730
+ onChange: _ctx.search
1731
+ }, {
1732
+ suffix: vue.withCtx(() => [
1733
+ vue.createVNode(_component_search_outlined, { style: { color: "#9393A3" } })
1734
+ ]),
1735
+ _: 1
1736
+ }, 8, ["value", "placeholder", "onChange"]),
1737
+ vue.createElementVNode("div", _hoisted_5, [
1738
+ _ctx.list && !_ctx.list.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
1739
+ vue.createVNode(_component_Empty, { image: _ctx.emptyPic }, {
1740
+ description: vue.withCtx(() => [
1741
+ vue.createElementVNode("span", _hoisted_7, vue.toDisplayString(!!_ctx.searchVal ? "\u6682\u65E0\u6570\u636E" : "\u8BF7\u5148\u641C\u7D22\u4EBA\u5458\u5173\u952E\u5B57"), 1)
1742
+ ]),
1743
+ _: 1
1744
+ }, 8, ["image"])
1745
+ ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1746
+ _ctx.activeKey === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
1747
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1748
+ return vue.openBlock(), vue.createElementBlock("div", {
1749
+ key: item.key,
1750
+ class: "__selector-modal-options-item"
1751
+ }, [
1752
+ vue.createVNode(_component_Checkbox, {
1753
+ checked: _ctx.staffsChecked[item.key],
1754
+ "onUpdate:checked": ($event) => _ctx.staffsChecked[item.key] = $event,
1755
+ class: "__selector-modal-option-check"
1756
+ }, {
1757
+ default: vue.withCtx(() => [
1758
+ vue.createTextVNode(vue.toDisplayString(item.title), 1)
1759
+ ]),
1760
+ _: 2
1761
+ }, 1032, ["checked", "onUpdate:checked"])
1762
+ ]);
1763
+ }), 128))
1764
+ ])) : _ctx.activeKey === 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
1765
+ vue.createVNode(_component_a_tree, {
1766
+ checkedKeys: _ctx.departmentChecked,
1767
+ "onUpdate:checkedKeys": _cache[1] || (_cache[1] = ($event) => _ctx.departmentChecked = $event),
1768
+ "default-expand-all": _ctx.searchVal === "",
1769
+ checkable: "",
1770
+ "tree-data": _ctx.list
1771
+ }, {
1772
+ title: vue.withCtx(({ title, description }) => [
1773
+ vue.createElementVNode("div", _hoisted_10, [
1774
+ vue.createElementVNode("span", null, vue.toDisplayString(title), 1),
1775
+ description ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_11, vue.toDisplayString(description), 1)) : vue.createCommentVNode("v-if", true)
1776
+ ])
1777
+ ]),
1778
+ _: 1
1779
+ }, 8, ["checkedKeys", "default-expand-all", "tree-data"])
1780
+ ])) : _ctx.activeKey === 2 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_12, [
1781
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1782
+ return vue.openBlock(), vue.createElementBlock("div", {
1783
+ key: item.key,
1784
+ class: "__selector-modal-options-item"
1785
+ }, [
1786
+ vue.createVNode(_component_Checkbox, {
1787
+ checked: _ctx.groupChecked[item.key],
1788
+ "onUpdate:checked": ($event) => _ctx.groupChecked[item.key] = $event,
1789
+ class: "__selector-modal-option-check"
1790
+ }, {
1791
+ default: vue.withCtx(() => [
1792
+ vue.createTextVNode(vue.toDisplayString(item.title), 1)
1793
+ ]),
1794
+ _: 2
1795
+ }, 1032, ["checked", "onUpdate:checked"])
1796
+ ]);
1797
+ }), 128))
1798
+ ])) : _ctx.activeKey === 3 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_13, [
1799
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.list, (item) => {
1800
+ return vue.openBlock(), vue.createElementBlock("div", {
1801
+ key: item.key,
1802
+ class: "__selector-modal-options-item"
1803
+ }, [
1804
+ vue.createVNode(_component_Checkbox, {
1805
+ checked: _ctx.shopChecked[item.key],
1806
+ "onUpdate:checked": ($event) => _ctx.shopChecked[item.key] = $event,
1807
+ class: "__selector-modal-option-check"
1808
+ }, {
1809
+ default: vue.withCtx(() => [
1810
+ vue.createTextVNode(vue.toDisplayString(item.title), 1)
1811
+ ]),
1812
+ _: 2
1813
+ }, 1032, ["checked", "onUpdate:checked"])
1814
+ ]);
1815
+ }), 128))
1816
+ ])) : vue.createCommentVNode("v-if", true)
1817
+ ], 2112))
1818
+ ])
1819
+ ]),
1820
+ vue.createElementVNode("div", _hoisted_14, [
1821
+ vue.createElementVNode("div", _hoisted_15, [
1822
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
1823
+ return vue.openBlock(), vue.createElementBlock("div", {
1824
+ key: item + "checked",
1825
+ class: "__chosen-panel-list-item"
1826
+ }, [
1827
+ vue.createElementVNode("span", _hoisted_16, vue.toDisplayString(_ctx.getSelectName(item)), 1),
1828
+ vue.createVNode(_component_CloseCircleFilled, {
1829
+ onMousedown: vue.withModifiers(($event) => _ctx.deleteOption(item), ["stop"])
1830
+ }, null, 8, ["onMousedown"])
1831
+ ]);
1832
+ }), 128))
1833
+ ])
1834
+ ])
1835
+ ]);
1836
+ }
1837
+ var VariedCmp = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__file", "variedCmp.vue"]]);
1838
+
1839
+ const MODE = {
1840
+ RADIO: "radio",
1841
+ MULTIPLE: "multiple",
1842
+ VARIED: "varied"
1843
+ };
1844
+ const _sfc_main = vue.defineComponent({
1845
+ name: "BmStaffsSelector",
1846
+ components: { AModal: AModal__default["default"], multipleCmp, radioCmp, VariedCmp },
1847
+ props: {
1848
+ visible: {
1849
+ type: Boolean,
1850
+ default: false
1851
+ },
1852
+ mode: {
1853
+ type: String,
1854
+ default: MODE.MULTIPLE
1855
+ },
1856
+ limit: {
1857
+ type: Number,
1858
+ default: 0
1859
+ },
1860
+ title: {
1861
+ type: String,
1862
+ default: "\u4EBA\u5458\u9009\u62E9\u5668"
1863
+ },
1864
+ load: {
1865
+ type: Function,
1866
+ default: () => {
1867
+ return Promise.resolve([]);
1868
+ }
1869
+ },
1870
+ select: {
1871
+ type: Array || Object,
1872
+ defualt: () => []
1873
+ },
1874
+ forceStatic: {
1875
+ type: Boolean,
1876
+ default: false
1877
+ }
1878
+ },
1879
+ emits: ["update:visible", "update:select"],
1880
+ setup(props, { emit }) {
1881
+ const methods = {
1882
+ modalCancel() {
1883
+ emit("update:visible", !props.visible);
1884
+ },
1885
+ fetch(params) {
1886
+ if (typeof params === "boolean") {
1887
+ state.list = [];
1888
+ } else {
1889
+ props.load(params).then((data) => {
1890
+ state.list = data.map((item) => {
1891
+ return item;
1892
+ });
1893
+ state.dataMap = methods.flatListFunc(data);
1894
+ });
1895
+ }
1896
+ },
1897
+ flatListFunc(list) {
1898
+ let queue = [...list];
1899
+ let map = new Map(state.dataMap);
1900
+ let curlistKeys = /* @__PURE__ */ new Set();
1901
+ let treedata = false;
1902
+ while (queue.length) {
1903
+ let curnode = queue.shift();
1904
+ map.set(curnode.key, curnode);
1905
+ curlistKeys.add(curnode.key);
1906
+ let children = curnode.children;
1907
+ if (children) {
1908
+ children = children.map((obj) => {
1909
+ treedata = true;
1910
+ obj["parent"] = curnode && curnode.key || null;
1911
+ return obj;
1912
+ });
1913
+ }
1914
+ queue = queue.concat(children || []);
1915
+ }
1916
+ state.multipTree = props.forceStatic ? false : treedata;
1917
+ state.curlistKeys = curlistKeys;
1918
+ return map;
1919
+ },
1920
+ summitSelect() {
1921
+ if (typeof state.selected === "string") {
1922
+ emit("update:select", state.dataMap.get(state.selected));
1923
+ } else if (state.selected instanceof Array) {
1924
+ emit("update:select", state.selected.map((item) => state.dataMap.get(item)));
1925
+ }
1926
+ state.list = [];
1927
+ methods.modalCancel();
1928
+ }
1929
+ };
1930
+ const state = vue.reactive({
1931
+ list: [],
1932
+ selected: props.mode === "radio" ? "" : [],
1933
+ dataMap: /* @__PURE__ */ new Map(),
1934
+ curlistKeys: /* @__PURE__ */ new Set(),
1935
+ multipTree: false,
1936
+ width: vue.computed(() => {
1937
+ if (props.mode === MODE.MULTIPLE) {
1938
+ return 648;
1939
+ } else if (props.mode === MODE.RADIO) {
1940
+ return 480;
1941
+ }
1942
+ return 648;
1943
+ })
1944
+ });
1945
+ return {
1946
+ ...methods,
1947
+ ...vue.toRefs(state)
1948
+ };
1949
+ }
1950
+ });
1951
+ const _hoisted_1 = { class: "selector-content" };
1952
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1953
+ const _component_radioCmp = vue.resolveComponent("radioCmp");
1954
+ const _component_VariedCmp = vue.resolveComponent("VariedCmp");
1955
+ const _component_multipleCmp = vue.resolveComponent("multipleCmp");
1956
+ const _component_AModal = vue.resolveComponent("AModal");
1957
+ return vue.openBlock(), vue.createBlock(_component_AModal, {
1958
+ class: "staffs-selector-modal",
1959
+ title: _ctx.title,
1960
+ visible: _ctx.visible,
1961
+ width: _ctx.width,
1962
+ "ok-text": "\u786E\u5B9A",
1963
+ "cancel-text": "\u53D6\u6D88",
1964
+ "destroy-on-close": true,
1965
+ onCancel: _ctx.modalCancel,
1966
+ onOk: _ctx.summitSelect
1967
+ }, {
1968
+ default: vue.withCtx(() => [
1969
+ vue.createElementVNode("div", _hoisted_1, [
1970
+ _ctx.mode === "radio" ? (vue.openBlock(), vue.createBlock(_component_radioCmp, {
1971
+ key: 0,
1972
+ selected: _ctx.selected,
1973
+ "onUpdate:selected": _cache[0] || (_cache[0] = ($event) => _ctx.selected = $event),
1974
+ list: _ctx.list,
1975
+ onFetchList: _ctx.fetch
1976
+ }, null, 8, ["selected", "list", "onFetchList"])) : _ctx.mode === "varied" ? (vue.openBlock(), vue.createBlock(_component_VariedCmp, {
1977
+ key: 1,
1978
+ selected: _ctx.selected,
1979
+ "onUpdate:selected": _cache[1] || (_cache[1] = ($event) => _ctx.selected = $event),
1980
+ list: _ctx.list,
1981
+ "curlist-keys": _ctx.curlistKeys,
1982
+ "data-map": _ctx.dataMap,
1983
+ onFetchList: _ctx.fetch
1984
+ }, null, 8, ["selected", "list", "curlist-keys", "data-map", "onFetchList"])) : (vue.openBlock(), vue.createBlock(_component_multipleCmp, {
1985
+ key: 2,
1986
+ selected: _ctx.selected,
1987
+ "onUpdate:selected": _cache[2] || (_cache[2] = ($event) => _ctx.selected = $event),
1988
+ limit: _ctx.limit,
1989
+ list: _ctx.list,
1990
+ "curlist-keys": _ctx.curlistKeys,
1991
+ "is-tree": _ctx.multipTree,
1992
+ "data-map": _ctx.dataMap,
1993
+ onFetchList: _ctx.fetch
1994
+ }, null, 8, ["selected", "limit", "list", "curlist-keys", "is-tree", "data-map", "onFetchList"]))
1995
+ ])
1996
+ ]),
1997
+ _: 1
1998
+ }, 8, ["title", "visible", "width", "onCancel", "onOk"]);
1999
+ }
2000
+ var staffsSelector = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "staffs-selector.vue"]]);
2001
+
2002
+ const BmStaffsSelector = withInstall.withInstall(staffsSelector);
2003
+
2004
+ exports.BmStaffsSelector = BmStaffsSelector;
2005
+ exports["default"] = BmStaffsSelector;