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,1626 @@
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 vue = require('vue');
7
+ var input = require('ant-design-vue/lib/input');
8
+ var Checkbox = require('ant-design-vue/lib/checkbox');
9
+ var Button = require('ant-design-vue/lib/button');
10
+ var Popover = require('ant-design-vue/lib/popover');
11
+ var Empty = require('ant-design-vue/lib/empty');
12
+
13
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
+
15
+ var Checkbox__default = /*#__PURE__*/_interopDefaultLegacy(Checkbox);
16
+ var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
17
+ var Popover__default = /*#__PURE__*/_interopDefaultLegacy(Popover);
18
+ var Empty__default = /*#__PURE__*/_interopDefaultLegacy(Empty);
19
+
20
+ /**
21
+ * Take input from [0, n] and return it as [0, 1]
22
+ * @hidden
23
+ */
24
+ function bound01(n, max) {
25
+ if (isOnePointZero(n)) {
26
+ n = '100%';
27
+ }
28
+ var isPercent = isPercentage(n);
29
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
30
+ // Automatically convert percentage into number
31
+ if (isPercent) {
32
+ n = parseInt(String(n * max), 10) / 100;
33
+ }
34
+ // Handle floating point rounding errors
35
+ if (Math.abs(n - max) < 0.000001) {
36
+ return 1;
37
+ }
38
+ // Convert into [0, 1] range if it isn't already
39
+ if (max === 360) {
40
+ // If n is a hue given in degrees,
41
+ // wrap around out-of-range values into [0, 360] range
42
+ // then convert into [0, 1].
43
+ n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));
44
+ }
45
+ else {
46
+ // If n not a hue given in degrees
47
+ // Convert into [0, 1] range if it isn't already.
48
+ n = (n % max) / parseFloat(String(max));
49
+ }
50
+ return n;
51
+ }
52
+ /**
53
+ * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
54
+ * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
55
+ * @hidden
56
+ */
57
+ function isOnePointZero(n) {
58
+ return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
59
+ }
60
+ /**
61
+ * Check to see if string passed in is a percentage
62
+ * @hidden
63
+ */
64
+ function isPercentage(n) {
65
+ return typeof n === 'string' && n.indexOf('%') !== -1;
66
+ }
67
+ /**
68
+ * Return a valid alpha value [0,1] with all invalid values being set to 1
69
+ * @hidden
70
+ */
71
+ function boundAlpha(a) {
72
+ a = parseFloat(a);
73
+ if (isNaN(a) || a < 0 || a > 1) {
74
+ a = 1;
75
+ }
76
+ return a;
77
+ }
78
+ /**
79
+ * Replace a decimal with it's percentage value
80
+ * @hidden
81
+ */
82
+ function convertToPercentage(n) {
83
+ if (n <= 1) {
84
+ return Number(n) * 100 + "%";
85
+ }
86
+ return n;
87
+ }
88
+ /**
89
+ * Force a hex value to have 2 characters
90
+ * @hidden
91
+ */
92
+ function pad2(c) {
93
+ return c.length === 1 ? '0' + c : String(c);
94
+ }
95
+
96
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
97
+ // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
98
+ /**
99
+ * Handle bounds / percentage checking to conform to CSS color spec
100
+ * <http://www.w3.org/TR/css3-color/>
101
+ * *Assumes:* r, g, b in [0, 255] or [0, 1]
102
+ * *Returns:* { r, g, b } in [0, 255]
103
+ */
104
+ function rgbToRgb(r, g, b) {
105
+ return {
106
+ r: bound01(r, 255) * 255,
107
+ g: bound01(g, 255) * 255,
108
+ b: bound01(b, 255) * 255,
109
+ };
110
+ }
111
+ function hue2rgb(p, q, t) {
112
+ if (t < 0) {
113
+ t += 1;
114
+ }
115
+ if (t > 1) {
116
+ t -= 1;
117
+ }
118
+ if (t < 1 / 6) {
119
+ return p + (q - p) * (6 * t);
120
+ }
121
+ if (t < 1 / 2) {
122
+ return q;
123
+ }
124
+ if (t < 2 / 3) {
125
+ return p + (q - p) * (2 / 3 - t) * 6;
126
+ }
127
+ return p;
128
+ }
129
+ /**
130
+ * Converts an HSL color value to RGB.
131
+ *
132
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
133
+ * *Returns:* { r, g, b } in the set [0, 255]
134
+ */
135
+ function hslToRgb(h, s, l) {
136
+ var r;
137
+ var g;
138
+ var b;
139
+ h = bound01(h, 360);
140
+ s = bound01(s, 100);
141
+ l = bound01(l, 100);
142
+ if (s === 0) {
143
+ // achromatic
144
+ g = l;
145
+ b = l;
146
+ r = l;
147
+ }
148
+ else {
149
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
150
+ var p = 2 * l - q;
151
+ r = hue2rgb(p, q, h + 1 / 3);
152
+ g = hue2rgb(p, q, h);
153
+ b = hue2rgb(p, q, h - 1 / 3);
154
+ }
155
+ return { r: r * 255, g: g * 255, b: b * 255 };
156
+ }
157
+ /**
158
+ * Converts an RGB color value to HSV
159
+ *
160
+ * *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
161
+ * *Returns:* { h, s, v } in [0,1]
162
+ */
163
+ function rgbToHsv(r, g, b) {
164
+ r = bound01(r, 255);
165
+ g = bound01(g, 255);
166
+ b = bound01(b, 255);
167
+ var max = Math.max(r, g, b);
168
+ var min = Math.min(r, g, b);
169
+ var h = 0;
170
+ var v = max;
171
+ var d = max - min;
172
+ var s = max === 0 ? 0 : d / max;
173
+ if (max === min) {
174
+ h = 0; // achromatic
175
+ }
176
+ else {
177
+ switch (max) {
178
+ case r:
179
+ h = (g - b) / d + (g < b ? 6 : 0);
180
+ break;
181
+ case g:
182
+ h = (b - r) / d + 2;
183
+ break;
184
+ case b:
185
+ h = (r - g) / d + 4;
186
+ break;
187
+ }
188
+ h /= 6;
189
+ }
190
+ return { h: h, s: s, v: v };
191
+ }
192
+ /**
193
+ * Converts an HSV color value to RGB.
194
+ *
195
+ * *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
196
+ * *Returns:* { r, g, b } in the set [0, 255]
197
+ */
198
+ function hsvToRgb(h, s, v) {
199
+ h = bound01(h, 360) * 6;
200
+ s = bound01(s, 100);
201
+ v = bound01(v, 100);
202
+ var i = Math.floor(h);
203
+ var f = h - i;
204
+ var p = v * (1 - s);
205
+ var q = v * (1 - f * s);
206
+ var t = v * (1 - (1 - f) * s);
207
+ var mod = i % 6;
208
+ var r = [v, q, p, p, t, v][mod];
209
+ var g = [t, v, v, q, p, p][mod];
210
+ var b = [p, p, t, v, v, q][mod];
211
+ return { r: r * 255, g: g * 255, b: b * 255 };
212
+ }
213
+ /**
214
+ * Converts an RGB color to hex
215
+ *
216
+ * Assumes r, g, and b are contained in the set [0, 255]
217
+ * Returns a 3 or 6 character hex
218
+ */
219
+ function rgbToHex(r, g, b, allow3Char) {
220
+ var hex = [
221
+ pad2(Math.round(r).toString(16)),
222
+ pad2(Math.round(g).toString(16)),
223
+ pad2(Math.round(b).toString(16)),
224
+ ];
225
+ // Return a 3 character hex if possible
226
+ if (allow3Char &&
227
+ hex[0].startsWith(hex[0].charAt(1)) &&
228
+ hex[1].startsWith(hex[1].charAt(1)) &&
229
+ hex[2].startsWith(hex[2].charAt(1))) {
230
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
231
+ }
232
+ return hex.join('');
233
+ }
234
+ /** Converts a hex value to a decimal */
235
+ function convertHexToDecimal(h) {
236
+ return parseIntFromHex(h) / 255;
237
+ }
238
+ /** Parse a base-16 hex value into a base-10 integer */
239
+ function parseIntFromHex(val) {
240
+ return parseInt(val, 16);
241
+ }
242
+
243
+ // https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
244
+ /**
245
+ * @hidden
246
+ */
247
+ var names = {
248
+ aliceblue: '#f0f8ff',
249
+ antiquewhite: '#faebd7',
250
+ aqua: '#00ffff',
251
+ aquamarine: '#7fffd4',
252
+ azure: '#f0ffff',
253
+ beige: '#f5f5dc',
254
+ bisque: '#ffe4c4',
255
+ black: '#000000',
256
+ blanchedalmond: '#ffebcd',
257
+ blue: '#0000ff',
258
+ blueviolet: '#8a2be2',
259
+ brown: '#a52a2a',
260
+ burlywood: '#deb887',
261
+ cadetblue: '#5f9ea0',
262
+ chartreuse: '#7fff00',
263
+ chocolate: '#d2691e',
264
+ coral: '#ff7f50',
265
+ cornflowerblue: '#6495ed',
266
+ cornsilk: '#fff8dc',
267
+ crimson: '#dc143c',
268
+ cyan: '#00ffff',
269
+ darkblue: '#00008b',
270
+ darkcyan: '#008b8b',
271
+ darkgoldenrod: '#b8860b',
272
+ darkgray: '#a9a9a9',
273
+ darkgreen: '#006400',
274
+ darkgrey: '#a9a9a9',
275
+ darkkhaki: '#bdb76b',
276
+ darkmagenta: '#8b008b',
277
+ darkolivegreen: '#556b2f',
278
+ darkorange: '#ff8c00',
279
+ darkorchid: '#9932cc',
280
+ darkred: '#8b0000',
281
+ darksalmon: '#e9967a',
282
+ darkseagreen: '#8fbc8f',
283
+ darkslateblue: '#483d8b',
284
+ darkslategray: '#2f4f4f',
285
+ darkslategrey: '#2f4f4f',
286
+ darkturquoise: '#00ced1',
287
+ darkviolet: '#9400d3',
288
+ deeppink: '#ff1493',
289
+ deepskyblue: '#00bfff',
290
+ dimgray: '#696969',
291
+ dimgrey: '#696969',
292
+ dodgerblue: '#1e90ff',
293
+ firebrick: '#b22222',
294
+ floralwhite: '#fffaf0',
295
+ forestgreen: '#228b22',
296
+ fuchsia: '#ff00ff',
297
+ gainsboro: '#dcdcdc',
298
+ ghostwhite: '#f8f8ff',
299
+ goldenrod: '#daa520',
300
+ gold: '#ffd700',
301
+ gray: '#808080',
302
+ green: '#008000',
303
+ greenyellow: '#adff2f',
304
+ grey: '#808080',
305
+ honeydew: '#f0fff0',
306
+ hotpink: '#ff69b4',
307
+ indianred: '#cd5c5c',
308
+ indigo: '#4b0082',
309
+ ivory: '#fffff0',
310
+ khaki: '#f0e68c',
311
+ lavenderblush: '#fff0f5',
312
+ lavender: '#e6e6fa',
313
+ lawngreen: '#7cfc00',
314
+ lemonchiffon: '#fffacd',
315
+ lightblue: '#add8e6',
316
+ lightcoral: '#f08080',
317
+ lightcyan: '#e0ffff',
318
+ lightgoldenrodyellow: '#fafad2',
319
+ lightgray: '#d3d3d3',
320
+ lightgreen: '#90ee90',
321
+ lightgrey: '#d3d3d3',
322
+ lightpink: '#ffb6c1',
323
+ lightsalmon: '#ffa07a',
324
+ lightseagreen: '#20b2aa',
325
+ lightskyblue: '#87cefa',
326
+ lightslategray: '#778899',
327
+ lightslategrey: '#778899',
328
+ lightsteelblue: '#b0c4de',
329
+ lightyellow: '#ffffe0',
330
+ lime: '#00ff00',
331
+ limegreen: '#32cd32',
332
+ linen: '#faf0e6',
333
+ magenta: '#ff00ff',
334
+ maroon: '#800000',
335
+ mediumaquamarine: '#66cdaa',
336
+ mediumblue: '#0000cd',
337
+ mediumorchid: '#ba55d3',
338
+ mediumpurple: '#9370db',
339
+ mediumseagreen: '#3cb371',
340
+ mediumslateblue: '#7b68ee',
341
+ mediumspringgreen: '#00fa9a',
342
+ mediumturquoise: '#48d1cc',
343
+ mediumvioletred: '#c71585',
344
+ midnightblue: '#191970',
345
+ mintcream: '#f5fffa',
346
+ mistyrose: '#ffe4e1',
347
+ moccasin: '#ffe4b5',
348
+ navajowhite: '#ffdead',
349
+ navy: '#000080',
350
+ oldlace: '#fdf5e6',
351
+ olive: '#808000',
352
+ olivedrab: '#6b8e23',
353
+ orange: '#ffa500',
354
+ orangered: '#ff4500',
355
+ orchid: '#da70d6',
356
+ palegoldenrod: '#eee8aa',
357
+ palegreen: '#98fb98',
358
+ paleturquoise: '#afeeee',
359
+ palevioletred: '#db7093',
360
+ papayawhip: '#ffefd5',
361
+ peachpuff: '#ffdab9',
362
+ peru: '#cd853f',
363
+ pink: '#ffc0cb',
364
+ plum: '#dda0dd',
365
+ powderblue: '#b0e0e6',
366
+ purple: '#800080',
367
+ rebeccapurple: '#663399',
368
+ red: '#ff0000',
369
+ rosybrown: '#bc8f8f',
370
+ royalblue: '#4169e1',
371
+ saddlebrown: '#8b4513',
372
+ salmon: '#fa8072',
373
+ sandybrown: '#f4a460',
374
+ seagreen: '#2e8b57',
375
+ seashell: '#fff5ee',
376
+ sienna: '#a0522d',
377
+ silver: '#c0c0c0',
378
+ skyblue: '#87ceeb',
379
+ slateblue: '#6a5acd',
380
+ slategray: '#708090',
381
+ slategrey: '#708090',
382
+ snow: '#fffafa',
383
+ springgreen: '#00ff7f',
384
+ steelblue: '#4682b4',
385
+ tan: '#d2b48c',
386
+ teal: '#008080',
387
+ thistle: '#d8bfd8',
388
+ tomato: '#ff6347',
389
+ turquoise: '#40e0d0',
390
+ violet: '#ee82ee',
391
+ wheat: '#f5deb3',
392
+ white: '#ffffff',
393
+ whitesmoke: '#f5f5f5',
394
+ yellow: '#ffff00',
395
+ yellowgreen: '#9acd32',
396
+ };
397
+
398
+ /**
399
+ * Given a string or object, convert that input to RGB
400
+ *
401
+ * Possible string inputs:
402
+ * ```
403
+ * "red"
404
+ * "#f00" or "f00"
405
+ * "#ff0000" or "ff0000"
406
+ * "#ff000000" or "ff000000"
407
+ * "rgb 255 0 0" or "rgb (255, 0, 0)"
408
+ * "rgb 1.0 0 0" or "rgb (1, 0, 0)"
409
+ * "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
410
+ * "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
411
+ * "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
412
+ * "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
413
+ * "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
414
+ * ```
415
+ */
416
+ function inputToRGB(color) {
417
+ var rgb = { r: 0, g: 0, b: 0 };
418
+ var a = 1;
419
+ var s = null;
420
+ var v = null;
421
+ var l = null;
422
+ var ok = false;
423
+ var format = false;
424
+ if (typeof color === 'string') {
425
+ color = stringInputToObject(color);
426
+ }
427
+ if (typeof color === 'object') {
428
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
429
+ rgb = rgbToRgb(color.r, color.g, color.b);
430
+ ok = true;
431
+ format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';
432
+ }
433
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
434
+ s = convertToPercentage(color.s);
435
+ v = convertToPercentage(color.v);
436
+ rgb = hsvToRgb(color.h, s, v);
437
+ ok = true;
438
+ format = 'hsv';
439
+ }
440
+ else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
441
+ s = convertToPercentage(color.s);
442
+ l = convertToPercentage(color.l);
443
+ rgb = hslToRgb(color.h, s, l);
444
+ ok = true;
445
+ format = 'hsl';
446
+ }
447
+ if (Object.prototype.hasOwnProperty.call(color, 'a')) {
448
+ a = color.a;
449
+ }
450
+ }
451
+ a = boundAlpha(a);
452
+ return {
453
+ ok: ok,
454
+ format: color.format || format,
455
+ r: Math.min(255, Math.max(rgb.r, 0)),
456
+ g: Math.min(255, Math.max(rgb.g, 0)),
457
+ b: Math.min(255, Math.max(rgb.b, 0)),
458
+ a: a,
459
+ };
460
+ }
461
+ // <http://www.w3.org/TR/css3-values/#integers>
462
+ var CSS_INTEGER = '[-\\+]?\\d+%?';
463
+ // <http://www.w3.org/TR/css3-values/#number-value>
464
+ var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
465
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
466
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
467
+ // Actual matching.
468
+ // Parentheses and commas are optional, but not required.
469
+ // Whitespace can take the place of commas or opening paren
470
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
471
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
472
+ var matchers = {
473
+ CSS_UNIT: new RegExp(CSS_UNIT),
474
+ rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
475
+ rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),
476
+ hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),
477
+ hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),
478
+ hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),
479
+ hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),
480
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
481
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
482
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
483
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
484
+ };
485
+ /**
486
+ * Permissive string parsing. Take in a number of formats, and output an object
487
+ * based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
488
+ */
489
+ function stringInputToObject(color) {
490
+ color = color.trim().toLowerCase();
491
+ if (color.length === 0) {
492
+ return false;
493
+ }
494
+ var named = false;
495
+ if (names[color]) {
496
+ color = names[color];
497
+ named = true;
498
+ }
499
+ else if (color === 'transparent') {
500
+ return { r: 0, g: 0, b: 0, a: 0, format: 'name' };
501
+ }
502
+ // Try to match string input using regular expressions.
503
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
504
+ // Just return an object and let the conversion functions handle that.
505
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
506
+ var match = matchers.rgb.exec(color);
507
+ if (match) {
508
+ return { r: match[1], g: match[2], b: match[3] };
509
+ }
510
+ match = matchers.rgba.exec(color);
511
+ if (match) {
512
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
513
+ }
514
+ match = matchers.hsl.exec(color);
515
+ if (match) {
516
+ return { h: match[1], s: match[2], l: match[3] };
517
+ }
518
+ match = matchers.hsla.exec(color);
519
+ if (match) {
520
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
521
+ }
522
+ match = matchers.hsv.exec(color);
523
+ if (match) {
524
+ return { h: match[1], s: match[2], v: match[3] };
525
+ }
526
+ match = matchers.hsva.exec(color);
527
+ if (match) {
528
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
529
+ }
530
+ match = matchers.hex8.exec(color);
531
+ if (match) {
532
+ return {
533
+ r: parseIntFromHex(match[1]),
534
+ g: parseIntFromHex(match[2]),
535
+ b: parseIntFromHex(match[3]),
536
+ a: convertHexToDecimal(match[4]),
537
+ format: named ? 'name' : 'hex8',
538
+ };
539
+ }
540
+ match = matchers.hex6.exec(color);
541
+ if (match) {
542
+ return {
543
+ r: parseIntFromHex(match[1]),
544
+ g: parseIntFromHex(match[2]),
545
+ b: parseIntFromHex(match[3]),
546
+ format: named ? 'name' : 'hex',
547
+ };
548
+ }
549
+ match = matchers.hex4.exec(color);
550
+ if (match) {
551
+ return {
552
+ r: parseIntFromHex(match[1] + match[1]),
553
+ g: parseIntFromHex(match[2] + match[2]),
554
+ b: parseIntFromHex(match[3] + match[3]),
555
+ a: convertHexToDecimal(match[4] + match[4]),
556
+ format: named ? 'name' : 'hex8',
557
+ };
558
+ }
559
+ match = matchers.hex3.exec(color);
560
+ if (match) {
561
+ return {
562
+ r: parseIntFromHex(match[1] + match[1]),
563
+ g: parseIntFromHex(match[2] + match[2]),
564
+ b: parseIntFromHex(match[3] + match[3]),
565
+ format: named ? 'name' : 'hex',
566
+ };
567
+ }
568
+ return false;
569
+ }
570
+ /**
571
+ * Check to see if it looks like a CSS unit
572
+ * (see `matchers` above for definition).
573
+ */
574
+ function isValidCSSUnit(color) {
575
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
576
+ }
577
+
578
+ var hueStep = 2; // 色相阶梯
579
+
580
+ var saturationStep = 0.16; // 饱和度阶梯,浅色部分
581
+
582
+ var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
583
+
584
+ var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
585
+
586
+ var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
587
+
588
+ var lightColorCount = 5; // 浅色数量,主色上
589
+
590
+ var darkColorCount = 4; // 深色数量,主色下
591
+ // 暗色主题颜色映射关系表
592
+
593
+ var darkColorMap = [{
594
+ index: 7,
595
+ opacity: 0.15
596
+ }, {
597
+ index: 6,
598
+ opacity: 0.25
599
+ }, {
600
+ index: 5,
601
+ opacity: 0.3
602
+ }, {
603
+ index: 5,
604
+ opacity: 0.45
605
+ }, {
606
+ index: 5,
607
+ opacity: 0.65
608
+ }, {
609
+ index: 5,
610
+ opacity: 0.85
611
+ }, {
612
+ index: 4,
613
+ opacity: 0.9
614
+ }, {
615
+ index: 3,
616
+ opacity: 0.95
617
+ }, {
618
+ index: 2,
619
+ opacity: 0.97
620
+ }, {
621
+ index: 1,
622
+ opacity: 0.98
623
+ }]; // Wrapper function ported from TinyColor.prototype.toHsv
624
+ // Keep it here because of `hsv.h * 360`
625
+
626
+ function toHsv(_ref) {
627
+ var r = _ref.r,
628
+ g = _ref.g,
629
+ b = _ref.b;
630
+ var hsv = rgbToHsv(r, g, b);
631
+ return {
632
+ h: hsv.h * 360,
633
+ s: hsv.s,
634
+ v: hsv.v
635
+ };
636
+ } // Wrapper function ported from TinyColor.prototype.toHexString
637
+ // Keep it here because of the prefix `#`
638
+
639
+
640
+ function toHex(_ref2) {
641
+ var r = _ref2.r,
642
+ g = _ref2.g,
643
+ b = _ref2.b;
644
+ return "#".concat(rgbToHex(r, g, b, false));
645
+ } // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
646
+ // Amount in range [0, 1]
647
+ // Assume color1 & color2 has no alpha, since the following src code did so.
648
+
649
+
650
+ function mix(rgb1, rgb2, amount) {
651
+ var p = amount / 100;
652
+ var rgb = {
653
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
654
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
655
+ b: (rgb2.b - rgb1.b) * p + rgb1.b
656
+ };
657
+ return rgb;
658
+ }
659
+
660
+ function getHue(hsv, i, light) {
661
+ var hue; // 根据色相不同,色相转向不同
662
+
663
+ if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
664
+ hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
665
+ } else {
666
+ hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
667
+ }
668
+
669
+ if (hue < 0) {
670
+ hue += 360;
671
+ } else if (hue >= 360) {
672
+ hue -= 360;
673
+ }
674
+
675
+ return hue;
676
+ }
677
+
678
+ function getSaturation(hsv, i, light) {
679
+ // grey color don't change saturation
680
+ if (hsv.h === 0 && hsv.s === 0) {
681
+ return hsv.s;
682
+ }
683
+
684
+ var saturation;
685
+
686
+ if (light) {
687
+ saturation = hsv.s - saturationStep * i;
688
+ } else if (i === darkColorCount) {
689
+ saturation = hsv.s + saturationStep;
690
+ } else {
691
+ saturation = hsv.s + saturationStep2 * i;
692
+ } // 边界值修正
693
+
694
+
695
+ if (saturation > 1) {
696
+ saturation = 1;
697
+ } // 第一格的 s 限制在 0.06-0.1 之间
698
+
699
+
700
+ if (light && i === lightColorCount && saturation > 0.1) {
701
+ saturation = 0.1;
702
+ }
703
+
704
+ if (saturation < 0.06) {
705
+ saturation = 0.06;
706
+ }
707
+
708
+ return Number(saturation.toFixed(2));
709
+ }
710
+
711
+ function getValue(hsv, i, light) {
712
+ var value;
713
+
714
+ if (light) {
715
+ value = hsv.v + brightnessStep1 * i;
716
+ } else {
717
+ value = hsv.v - brightnessStep2 * i;
718
+ }
719
+
720
+ if (value > 1) {
721
+ value = 1;
722
+ }
723
+
724
+ return Number(value.toFixed(2));
725
+ }
726
+
727
+ function generate$1(color) {
728
+ var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
729
+ var patterns = [];
730
+ var pColor = inputToRGB(color);
731
+
732
+ for (var i = lightColorCount; i > 0; i -= 1) {
733
+ var hsv = toHsv(pColor);
734
+ var colorString = toHex(inputToRGB({
735
+ h: getHue(hsv, i, true),
736
+ s: getSaturation(hsv, i, true),
737
+ v: getValue(hsv, i, true)
738
+ }));
739
+ patterns.push(colorString);
740
+ }
741
+
742
+ patterns.push(toHex(pColor));
743
+
744
+ for (var _i = 1; _i <= darkColorCount; _i += 1) {
745
+ var _hsv = toHsv(pColor);
746
+
747
+ var _colorString = toHex(inputToRGB({
748
+ h: getHue(_hsv, _i),
749
+ s: getSaturation(_hsv, _i),
750
+ v: getValue(_hsv, _i)
751
+ }));
752
+
753
+ patterns.push(_colorString);
754
+ } // dark theme patterns
755
+
756
+
757
+ if (opts.theme === 'dark') {
758
+ return darkColorMap.map(function (_ref3) {
759
+ var index = _ref3.index,
760
+ opacity = _ref3.opacity;
761
+ var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));
762
+ return darkColorString;
763
+ });
764
+ }
765
+
766
+ return patterns;
767
+ }
768
+
769
+ var presetPrimaryColors = {
770
+ red: '#F5222D',
771
+ volcano: '#FA541C',
772
+ orange: '#FA8C16',
773
+ gold: '#FAAD14',
774
+ yellow: '#FADB14',
775
+ lime: '#A0D911',
776
+ green: '#52C41A',
777
+ cyan: '#13C2C2',
778
+ blue: '#1890FF',
779
+ geekblue: '#2F54EB',
780
+ purple: '#722ED1',
781
+ magenta: '#EB2F96',
782
+ grey: '#666666'
783
+ };
784
+ var presetPalettes = {};
785
+ var presetDarkPalettes = {};
786
+ Object.keys(presetPrimaryColors).forEach(function (key) {
787
+ presetPalettes[key] = generate$1(presetPrimaryColors[key]);
788
+ presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
789
+
790
+ presetDarkPalettes[key] = generate$1(presetPrimaryColors[key], {
791
+ theme: 'dark',
792
+ backgroundColor: '#141414'
793
+ });
794
+ presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
795
+ });
796
+ presetPalettes.red;
797
+ presetPalettes.volcano;
798
+ presetPalettes.gold;
799
+ presetPalettes.orange;
800
+ presetPalettes.yellow;
801
+ presetPalettes.lime;
802
+ presetPalettes.green;
803
+ presetPalettes.cyan;
804
+ presetPalettes.blue;
805
+ presetPalettes.geekblue;
806
+ presetPalettes.purple;
807
+ presetPalettes.magenta;
808
+ presetPalettes.grey;
809
+
810
+ // https://github.com/substack/insert-css
811
+ var containers = []; // will store container HTMLElement references
812
+
813
+ var styleElements = []; // will store {prepend: HTMLElement, append: HTMLElement}
814
+
815
+ var usage = 'insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).';
816
+
817
+ function createStyleElement() {
818
+ var styleElement = document.createElement('style');
819
+ styleElement.setAttribute('type', 'text/css');
820
+ return styleElement;
821
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
822
+
823
+
824
+ function insertCss(css, options) {
825
+ options = options || {};
826
+
827
+ if (css === undefined) {
828
+ throw new Error(usage);
829
+ }
830
+
831
+ var position = options.prepend === true ? 'prepend' : 'append';
832
+ var container = options.container !== undefined ? options.container : document.querySelector('head');
833
+ var containerId = containers.indexOf(container); // first time we see this container, create the necessary entries
834
+
835
+ if (containerId === -1) {
836
+ containerId = containers.push(container) - 1;
837
+ styleElements[containerId] = {};
838
+ } // try to get the correponding container + position styleElement, create it otherwise
839
+
840
+
841
+ var styleElement;
842
+
843
+ if (styleElements[containerId] !== undefined && styleElements[containerId][position] !== undefined) {
844
+ styleElement = styleElements[containerId][position];
845
+ } else {
846
+ styleElement = styleElements[containerId][position] = createStyleElement();
847
+
848
+ if (position === 'prepend') {
849
+ container.insertBefore(styleElement, container.childNodes[0]);
850
+ } else {
851
+ container.appendChild(styleElement);
852
+ }
853
+ } // strip potential UTF-8 BOM if css was read from a file
854
+
855
+
856
+ if (css.charCodeAt(0) === 0xfeff) {
857
+ css = css.substr(1, css.length);
858
+ } // actually add the stylesheet
859
+
860
+
861
+ if (styleElement.styleSheet) {
862
+ styleElement.styleSheet.cssText += css;
863
+ } else {
864
+ styleElement.textContent += css;
865
+ }
866
+
867
+ return styleElement;
868
+ }
869
+
870
+ function _objectSpread$5(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$5(target, key, source[key]); }); } return target; }
871
+
872
+ function _defineProperty$5(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; }
873
+ function warn(valid, message) {
874
+ // Support uglify
875
+ if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
876
+ console.error("Warning: ".concat(message));
877
+ }
878
+ }
879
+ function warning(valid, message) {
880
+ warn(valid, "[@ant-design/icons-vue] ".concat(message));
881
+ } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
882
+
883
+ function isIconDefinition(target) {
884
+ return typeof target === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && (typeof target.icon === 'object' || typeof target.icon === 'function');
885
+ }
886
+ function generate(node, key, rootProps) {
887
+ if (!rootProps) {
888
+ return vue.h(node.tag, _objectSpread$5({
889
+ key: key
890
+ }, node.attrs), (node.children || []).map(function (child, index) {
891
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
892
+ }));
893
+ }
894
+
895
+ return vue.h(node.tag, _objectSpread$5({
896
+ key: key
897
+ }, rootProps, node.attrs), (node.children || []).map(function (child, index) {
898
+ return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
899
+ }));
900
+ }
901
+ function getSecondaryColor(primaryColor) {
902
+ // choose the second color
903
+ return generate$1(primaryColor)[0];
904
+ }
905
+ function normalizeTwoToneColors(twoToneColor) {
906
+ if (!twoToneColor) {
907
+ return [];
908
+ }
909
+
910
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
911
+ } // These props make sure that the SVG behaviours like general text.
912
+ 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";
913
+ var cssInjectedFlag = false;
914
+ var useInsertStyles = function useInsertStyles() {
915
+ var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
916
+ vue.nextTick(function () {
917
+ if (!cssInjectedFlag) {
918
+ if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
919
+ insertCss(styleStr, {
920
+ prepend: true
921
+ });
922
+ }
923
+
924
+ cssInjectedFlag = true;
925
+ }
926
+ });
927
+ };
928
+
929
+ var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
930
+
931
+ 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; }
932
+
933
+ 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; }
934
+
935
+ function _objectSpread$4(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$4(target, key, source[key]); }); } return target; }
936
+
937
+ function _defineProperty$4(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; }
938
+ var twoToneColorPalette = {
939
+ primaryColor: '#333',
940
+ secondaryColor: '#E6E6E6',
941
+ calculated: false
942
+ };
943
+
944
+ function setTwoToneColors(_ref) {
945
+ var primaryColor = _ref.primaryColor,
946
+ secondaryColor = _ref.secondaryColor;
947
+ twoToneColorPalette.primaryColor = primaryColor;
948
+ twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
949
+ twoToneColorPalette.calculated = !!secondaryColor;
950
+ }
951
+
952
+ function getTwoToneColors() {
953
+ return _objectSpread$4({}, twoToneColorPalette);
954
+ }
955
+
956
+ var IconBase = function IconBase(props, context) {
957
+ var _props$context$attrs = _objectSpread$4({}, props, context.attrs),
958
+ icon = _props$context$attrs.icon,
959
+ primaryColor = _props$context$attrs.primaryColor,
960
+ secondaryColor = _props$context$attrs.secondaryColor,
961
+ restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
962
+
963
+ var colors = twoToneColorPalette;
964
+
965
+ if (primaryColor) {
966
+ colors = {
967
+ primaryColor: primaryColor,
968
+ secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
969
+ };
970
+ }
971
+
972
+ useInsertStyles();
973
+ warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
974
+
975
+ if (!isIconDefinition(icon)) {
976
+ return null;
977
+ }
978
+
979
+ var target = icon;
980
+
981
+ if (target && typeof target.icon === 'function') {
982
+ target = _objectSpread$4({}, target, {
983
+ icon: target.icon(colors.primaryColor, colors.secondaryColor)
984
+ });
985
+ }
986
+
987
+ return generate(target.icon, "svg-".concat(target.name), _objectSpread$4({}, restProps, {
988
+ 'data-icon': target.name,
989
+ width: '1em',
990
+ height: '1em',
991
+ fill: 'currentColor',
992
+ 'aria-hidden': 'true'
993
+ })); // },
994
+ };
995
+
996
+ IconBase.props = {
997
+ icon: Object,
998
+ primaryColor: String,
999
+ secondaryColor: String,
1000
+ focusable: String
1001
+ };
1002
+ IconBase.inheritAttrs = false;
1003
+ IconBase.displayName = 'IconBase';
1004
+ IconBase.getTwoToneColors = getTwoToneColors;
1005
+ IconBase.setTwoToneColors = setTwoToneColors;
1006
+ var VueIcon = IconBase;
1007
+
1008
+ function _slicedToArray$1(arr, i) { return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1(); }
1009
+
1010
+ 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."); }
1011
+
1012
+ 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); }
1013
+
1014
+ 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; }
1015
+
1016
+ 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; }
1017
+
1018
+ function _arrayWithHoles$1(arr) { if (Array.isArray(arr)) return arr; }
1019
+ function setTwoToneColor(twoToneColor) {
1020
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1021
+ _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2),
1022
+ primaryColor = _normalizeTwoToneColo2[0],
1023
+ secondaryColor = _normalizeTwoToneColo2[1];
1024
+
1025
+ return VueIcon.setTwoToneColors({
1026
+ primaryColor: primaryColor,
1027
+ secondaryColor: secondaryColor
1028
+ });
1029
+ }
1030
+ function getTwoToneColor() {
1031
+ var colors = VueIcon.getTwoToneColors();
1032
+
1033
+ if (!colors.calculated) {
1034
+ return colors.primaryColor;
1035
+ }
1036
+
1037
+ return [colors.primaryColor, colors.secondaryColor];
1038
+ }
1039
+
1040
+ var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
1041
+
1042
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
1043
+
1044
+ 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."); }
1045
+
1046
+ 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); }
1047
+
1048
+ 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; }
1049
+
1050
+ 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; }
1051
+
1052
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1053
+
1054
+ 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; }
1055
+
1056
+ 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; }
1057
+
1058
+ 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; }
1059
+
1060
+ 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; }
1061
+
1062
+ setTwoToneColor('#1890ff');
1063
+
1064
+ var Icon = function Icon(props, context) {
1065
+ var _classObj;
1066
+
1067
+ var _props$context$attrs = _objectSpread$3({}, props, context.attrs),
1068
+ cls = _props$context$attrs["class"],
1069
+ icon = _props$context$attrs.icon,
1070
+ spin = _props$context$attrs.spin,
1071
+ rotate = _props$context$attrs.rotate,
1072
+ tabindex = _props$context$attrs.tabindex,
1073
+ twoToneColor = _props$context$attrs.twoToneColor,
1074
+ onClick = _props$context$attrs.onClick,
1075
+ restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
1076
+
1077
+ var classObj = (_classObj = {
1078
+ anticon: true
1079
+ }, _defineProperty$3(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$3(_classObj, cls, cls), _classObj);
1080
+ var svgClassString = spin === '' || !!spin || icon.name === 'loading' ? 'anticon-spin' : '';
1081
+ var iconTabIndex = tabindex;
1082
+
1083
+ if (iconTabIndex === undefined && onClick) {
1084
+ iconTabIndex = -1;
1085
+ restProps.tabindex = iconTabIndex;
1086
+ }
1087
+
1088
+ var svgStyle = rotate ? {
1089
+ msTransform: "rotate(".concat(rotate, "deg)"),
1090
+ transform: "rotate(".concat(rotate, "deg)")
1091
+ } : undefined;
1092
+
1093
+ var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
1094
+ _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
1095
+ primaryColor = _normalizeTwoToneColo2[0],
1096
+ secondaryColor = _normalizeTwoToneColo2[1];
1097
+
1098
+ return vue.createVNode("span", _objectSpread$3({
1099
+ "role": "img",
1100
+ "aria-label": icon.name
1101
+ }, restProps, {
1102
+ "onClick": onClick,
1103
+ "class": classObj
1104
+ }), [vue.createVNode(VueIcon, {
1105
+ "class": svgClassString,
1106
+ "icon": icon,
1107
+ "primaryColor": primaryColor,
1108
+ "secondaryColor": secondaryColor,
1109
+ "style": svgStyle
1110
+ }, null)]);
1111
+ };
1112
+
1113
+ Icon.props = {
1114
+ spin: Boolean,
1115
+ rotate: Number,
1116
+ icon: Object,
1117
+ twoToneColor: String
1118
+ };
1119
+ Icon.displayName = 'AntdIcon';
1120
+ Icon.inheritAttrs = false;
1121
+ Icon.getTwoToneColor = getTwoToneColor;
1122
+ Icon.setTwoToneColor = setTwoToneColor;
1123
+ var AntdIcon = Icon;
1124
+
1125
+ // This icon file is generated automatically.
1126
+ 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" };
1127
+ var CloseCircleFilledSvg = CloseCircleFilled$2;
1128
+
1129
+ 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; }
1130
+
1131
+ 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; }
1132
+
1133
+ var CloseCircleFilled = function CloseCircleFilled(props, context) {
1134
+ var p = _objectSpread$2({}, props, context.attrs);
1135
+
1136
+ return vue.createVNode(AntdIcon, _objectSpread$2({}, p, {
1137
+ "icon": CloseCircleFilledSvg
1138
+ }), null);
1139
+ };
1140
+
1141
+ CloseCircleFilled.displayName = 'CloseCircleFilled';
1142
+ CloseCircleFilled.inheritAttrs = false;
1143
+ var CloseCircleFilled$1 = CloseCircleFilled;
1144
+
1145
+ // This icon file is generated automatically.
1146
+ var DeleteOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" } }] }, "name": "delete", "theme": "outlined" };
1147
+ var DeleteOutlinedSvg = DeleteOutlined$2;
1148
+
1149
+ 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; }
1150
+
1151
+ 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; }
1152
+
1153
+ var DeleteOutlined = function DeleteOutlined(props, context) {
1154
+ var p = _objectSpread$1({}, props, context.attrs);
1155
+
1156
+ return vue.createVNode(AntdIcon, _objectSpread$1({}, p, {
1157
+ "icon": DeleteOutlinedSvg
1158
+ }), null);
1159
+ };
1160
+
1161
+ DeleteOutlined.displayName = 'DeleteOutlined';
1162
+ DeleteOutlined.inheritAttrs = false;
1163
+ var DeleteOutlined$1 = DeleteOutlined;
1164
+
1165
+ // This icon file is generated automatically.
1166
+ var DownOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
1167
+ var DownOutlinedSvg = DownOutlined$2;
1168
+
1169
+ 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; }
1170
+
1171
+ 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; }
1172
+
1173
+ var DownOutlined = function DownOutlined(props, context) {
1174
+ var p = _objectSpread({}, props, context.attrs);
1175
+
1176
+ return vue.createVNode(AntdIcon, _objectSpread({}, p, {
1177
+ "icon": DownOutlinedSvg
1178
+ }), null);
1179
+ };
1180
+
1181
+ DownOutlined.displayName = 'DownOutlined';
1182
+ DownOutlined.inheritAttrs = false;
1183
+ var DownOutlined$1 = DownOutlined;
1184
+
1185
+ var _export_sfc = (sfc, props) => {
1186
+ const target = sfc.__vccOpts || sfc;
1187
+ for (const [key, val] of props) {
1188
+ target[key] = val;
1189
+ }
1190
+ return target;
1191
+ };
1192
+
1193
+ const _sfc_main = vue.defineComponent({
1194
+ name: "BmShopsFilter",
1195
+ components: {
1196
+ DownOutlined: DownOutlined$1,
1197
+ DeleteOutlined: DeleteOutlined$1,
1198
+ CloseCircleFilled: CloseCircleFilled$1,
1199
+ InputSearch: input.InputSearch,
1200
+ Checkbox: Checkbox__default["default"],
1201
+ Button: Button__default["default"],
1202
+ Popover: Popover__default["default"],
1203
+ Empty: Empty__default["default"]
1204
+ },
1205
+ props: {
1206
+ labelTitle: {
1207
+ type: String,
1208
+ default: "\u5E97\u94FA"
1209
+ },
1210
+ showAlways: {
1211
+ type: Boolean,
1212
+ default: false
1213
+ },
1214
+ displayParams: {
1215
+ type: Object,
1216
+ default: () => {
1217
+ return {
1218
+ width: "436px",
1219
+ labelOffset: "0px",
1220
+ labelWidth: "98px",
1221
+ searchWidth: "240px",
1222
+ listMaxHeight: "366px"
1223
+ };
1224
+ }
1225
+ },
1226
+ loadFilter: {
1227
+ type: Function,
1228
+ default: () => {
1229
+ return Promise.resolve([]);
1230
+ }
1231
+ },
1232
+ loadData: {
1233
+ type: Function,
1234
+ default: () => {
1235
+ return Promise.reject("\u672A\u58F0\u660E\u5E97\u94FA\u6570\u636E\u8BF7\u6C42\u51FD\u6570");
1236
+ }
1237
+ }
1238
+ },
1239
+ emits: ["update:selected", "change"],
1240
+ setup(props, { emit }) {
1241
+ const state = vue.reactive({
1242
+ isActive: false,
1243
+ searchVal: "",
1244
+ selected: [],
1245
+ shopList: [],
1246
+ shopListByCode: {},
1247
+ checkAll: false,
1248
+ hasCheck: false,
1249
+ inverSelect: false,
1250
+ shopCheck: {},
1251
+ filterSelects: [],
1252
+ filterArr: []
1253
+ });
1254
+ const methods = {
1255
+ triggleActive() {
1256
+ if (!props.showAlways)
1257
+ state.isActive = !state.isActive;
1258
+ if (state.shopList && !state.shopList.length)
1259
+ methods.fetchData();
1260
+ },
1261
+ outSideClick() {
1262
+ state.isActive = false;
1263
+ },
1264
+ changeFilterSelect(index, code) {
1265
+ let filter = state.filterArr[index];
1266
+ if (filter.multiple) {
1267
+ if (!code) {
1268
+ state.filterSelects[index] = [];
1269
+ } else {
1270
+ let list = state.filterSelects[index];
1271
+ list.indexOf(code) > -1 ? list.splice(list.indexOf(code), 1) : list.push(code);
1272
+ }
1273
+ } else {
1274
+ state.filterSelects[index] = code;
1275
+ }
1276
+ methods.fetchData();
1277
+ },
1278
+ onCheckAllChange(e) {
1279
+ state.inverSelect = false;
1280
+ let checked = e.target.checked;
1281
+ state.shopList.forEach((item) => {
1282
+ state.shopCheck[item.shopCode] = checked;
1283
+ });
1284
+ },
1285
+ checkboxChange() {
1286
+ let hasCheck = false;
1287
+ let checkAll = true;
1288
+ state.shopList.some((item) => {
1289
+ if (state.shopCheck[item.shopCode]) {
1290
+ hasCheck = true;
1291
+ return true;
1292
+ }
1293
+ });
1294
+ state.shopList.every((item) => {
1295
+ if (!state.shopCheck[item.shopCode]) {
1296
+ checkAll = false;
1297
+ return false;
1298
+ }
1299
+ return true;
1300
+ });
1301
+ state.checkAll = checkAll;
1302
+ state.hasCheck = state.checkAll ? false : hasCheck;
1303
+ },
1304
+ invertChange() {
1305
+ state.checkAll = false;
1306
+ state.shopList.forEach((item) => {
1307
+ state.shopCheck[item.shopCode] = !state.shopCheck[item.shopCode];
1308
+ });
1309
+ },
1310
+ clearAll() {
1311
+ state.inverSelect = false;
1312
+ state.checkAll = false;
1313
+ state.hasCheck = false;
1314
+ state.shopList.forEach((item) => {
1315
+ state.shopCheck[item.shopCode] = false;
1316
+ });
1317
+ },
1318
+ fetchData() {
1319
+ let params = {};
1320
+ let filters = state.filterArr;
1321
+ filters.forEach((item, index) => {
1322
+ params[String(item.paramsStr)] = state.filterSelects[index] || "";
1323
+ });
1324
+ params["search"] = state.searchVal;
1325
+ props.loadData(params).then((data) => {
1326
+ state.shopList = data;
1327
+ data.forEach((item) => {
1328
+ return state.shopListByCode[item.shopCode] = item.shopName;
1329
+ });
1330
+ methods.checkboxChange();
1331
+ });
1332
+ },
1333
+ clearAllSelected(e) {
1334
+ e && e.stopPropagation();
1335
+ state.searchVal = "";
1336
+ state.shopCheck = {};
1337
+ state.inverSelect = false;
1338
+ state.checkAll = false;
1339
+ },
1340
+ filterIsActive(filterIndex, code) {
1341
+ let select = state.filterSelects[filterIndex];
1342
+ let filter = state.filterArr[filterIndex];
1343
+ let isMultiple = filter && filter.multiple;
1344
+ if (!isMultiple) {
1345
+ return select === code;
1346
+ } else {
1347
+ return select.indexOf(code) > -1;
1348
+ }
1349
+ }
1350
+ };
1351
+ props.loadFilter().then((data) => {
1352
+ state.filterArr = data;
1353
+ state.filterSelects = state.filterArr.map((item) => {
1354
+ return item.multiple ? [] : "";
1355
+ });
1356
+ }).finally(() => {
1357
+ methods.fetchData();
1358
+ });
1359
+ vue.watch(() => state.shopCheck, () => {
1360
+ let list = [];
1361
+ for (let [key, value] of Object.entries(state.shopCheck)) {
1362
+ value && list.push(key);
1363
+ }
1364
+ state.selected = list;
1365
+ emit("update:selected", list);
1366
+ emit("change", list);
1367
+ methods.checkboxChange();
1368
+ }, { deep: true });
1369
+ if (props.showAlways) {
1370
+ state.isActive = true;
1371
+ }
1372
+ vue.onMounted(() => {
1373
+ if (!props.showAlways)
1374
+ document.addEventListener("click", methods.outSideClick);
1375
+ });
1376
+ vue.onUnmounted(() => {
1377
+ if (!props.showAlways)
1378
+ document.removeEventListener("click", methods.outSideClick);
1379
+ });
1380
+ return {
1381
+ ...vue.toRefs(state),
1382
+ ...methods
1383
+ };
1384
+ }
1385
+ });
1386
+ const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("span", null, "\u8BF7\u9009\u62E9", -1);
1387
+ const _hoisted_2 = { class: "input-icon active-icon" };
1388
+ const _hoisted_3 = { class: "pop-seleted-title" };
1389
+ const _hoisted_4 = /* @__PURE__ */ vue.createTextVNode(" \u5DF2\u9009\u62E9");
1390
+ const _hoisted_5 = /* @__PURE__ */ vue.createTextVNode("\u9879 ");
1391
+ const _hoisted_6 = { class: "__shops-filter-list" };
1392
+ const _hoisted_7 = {
1393
+ key: 0,
1394
+ class: "__shops-filter-tabs"
1395
+ };
1396
+ const _hoisted_8 = { class: "label" };
1397
+ const _hoisted_9 = { class: "__shops-filter-areas" };
1398
+ const _hoisted_10 = ["onClick"];
1399
+ const _hoisted_11 = ["onClick"];
1400
+ const _hoisted_12 = { class: "__shops-filter-selecting" };
1401
+ const _hoisted_13 = /* @__PURE__ */ vue.createTextVNode(" \u5DF2\u9009\u62E9");
1402
+ const _hoisted_14 = /* @__PURE__ */ vue.createTextVNode("\u9879 ");
1403
+ const _hoisted_15 = { class: "__checkbox-operate-box" };
1404
+ const _hoisted_16 = /* @__PURE__ */ vue.createTextVNode("\u5168\u9009");
1405
+ const _hoisted_17 = /* @__PURE__ */ vue.createTextVNode("\u53CD\u9009");
1406
+ const _hoisted_18 = /* @__PURE__ */ vue.createTextVNode("\u6E05\u7A7A");
1407
+ const _hoisted_19 = {
1408
+ key: 0,
1409
+ class: "__shops-filter-selecting"
1410
+ };
1411
+ const _hoisted_20 = /* @__PURE__ */ vue.createTextVNode(" \u5DF2\u9009\u62E9");
1412
+ const _hoisted_21 = /* @__PURE__ */ vue.createTextVNode("\u9879 ");
1413
+ const _hoisted_22 = /* @__PURE__ */ vue.createElementVNode("span", { style: { "color": "#9393a3" } }, "\u6682\u65E0\u6570\u636E", -1);
1414
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1415
+ const _component_down_outlined = vue.resolveComponent("down-outlined");
1416
+ const _component_close_circle_filled = vue.resolveComponent("close-circle-filled");
1417
+ const _component_Popover = vue.resolveComponent("Popover");
1418
+ const _component_input_search = vue.resolveComponent("input-search");
1419
+ const _component_Checkbox = vue.resolveComponent("Checkbox");
1420
+ const _component_delete_outlined = vue.resolveComponent("delete-outlined");
1421
+ const _component_Button = vue.resolveComponent("Button");
1422
+ const _component_Empty = vue.resolveComponent("Empty");
1423
+ return vue.openBlock(), vue.createElementBlock("div", {
1424
+ class: "__shops-filter-component",
1425
+ onClick: _cache[8] || (_cache[8] = vue.withModifiers(() => {
1426
+ }, ["stop"]))
1427
+ }, [
1428
+ vue.createElementVNode("span", {
1429
+ class: "__shops-filter-label",
1430
+ style: vue.normalizeStyle({
1431
+ width: _ctx.displayParams?.labelWidth || "",
1432
+ marginRight: _ctx.displayParams?.labelOffset || "0"
1433
+ })
1434
+ }, vue.toDisplayString(_ctx.labelTitle) + ":", 5),
1435
+ vue.createElementVNode("div", {
1436
+ class: vue.normalizeClass(["__shops-filter-input-box", { "active-box": !_ctx.showAlways && _ctx.isActive }]),
1437
+ style: vue.normalizeStyle({ width: _ctx.displayParams?.width || "436px" }),
1438
+ onClick: _cache[3] || (_cache[3] = (...args) => _ctx.triggleActive && _ctx.triggleActive(...args))
1439
+ }, [
1440
+ _ctx.selected && !_ctx.selected.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1441
+ _hoisted_1,
1442
+ vue.createElementVNode("span", _hoisted_2, [
1443
+ vue.createVNode(_component_down_outlined)
1444
+ ])
1445
+ ], 64)) : _ctx.selected && _ctx.selected.length ? (vue.openBlock(), vue.createBlock(_component_Popover, {
1446
+ key: 1,
1447
+ title: "",
1448
+ "overlay-class-name": "__shops-filter-popover"
1449
+ }, {
1450
+ content: vue.withCtx(() => [
1451
+ vue.createElementVNode("div", {
1452
+ class: "pop-seleted",
1453
+ style: vue.normalizeStyle({ "min-width": _ctx.displayParams?.width || "436px" })
1454
+ }, [
1455
+ vue.createElementVNode("div", _hoisted_3, [
1456
+ _hoisted_4,
1457
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
1458
+ _hoisted_5
1459
+ ]),
1460
+ vue.createElementVNode("div", {
1461
+ class: "pop-seleted-shops",
1462
+ onWheel: _cache[0] || (_cache[0] = vue.withModifiers(() => {
1463
+ }, ["stop"]))
1464
+ }, [
1465
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
1466
+ return vue.openBlock(), vue.createElementBlock("div", {
1467
+ key: item,
1468
+ class: "pop-seleted-item"
1469
+ }, vue.toDisplayString(_ctx.shopListByCode[item]), 1);
1470
+ }), 128))
1471
+ ], 32)
1472
+ ], 4)
1473
+ ]),
1474
+ default: vue.withCtx(() => [
1475
+ vue.createElementVNode("div", _hoisted_6, [
1476
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.selected, (item) => {
1477
+ return vue.openBlock(), vue.createElementBlock("div", {
1478
+ key: item,
1479
+ class: "selected-tag"
1480
+ }, vue.toDisplayString(_ctx.shopListByCode[item]), 1);
1481
+ }), 128)),
1482
+ vue.createElementVNode("div", {
1483
+ class: "delete-icon",
1484
+ onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.clearAllSelected && _ctx.clearAllSelected(...args), ["stop"])),
1485
+ onMouseover: _cache[2] || (_cache[2] = vue.withModifiers(() => {
1486
+ }, ["stop"]))
1487
+ }, [
1488
+ vue.createVNode(_component_close_circle_filled, { style: { "color": "#9393a3" } })
1489
+ ], 32)
1490
+ ])
1491
+ ]),
1492
+ _: 1
1493
+ })) : vue.createCommentVNode("v-if", true)
1494
+ ], 6),
1495
+ vue.withDirectives(vue.createElementVNode("div", {
1496
+ class: "__shops-filter-search-input",
1497
+ style: vue.normalizeStyle({ width: _ctx.displayParams?.searchWidth || "240px" })
1498
+ }, [
1499
+ vue.createVNode(_component_input_search, {
1500
+ modelValue: _ctx.searchVal,
1501
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.searchVal = $event),
1502
+ placeholder: "\u641C\u7D22\u5E97\u94FA\u540D\u79F0",
1503
+ "allow-clear": true,
1504
+ onSearch: _ctx.fetchData
1505
+ }, null, 8, ["modelValue", "onSearch"])
1506
+ ], 4), [
1507
+ [vue.vShow, _ctx.isActive]
1508
+ ]),
1509
+ vue.withDirectives(vue.createElementVNode("div", {
1510
+ class: vue.normalizeClass(["__shops-filter-content", { "__shops-filter-no-absolute": _ctx.showAlways }])
1511
+ }, [
1512
+ _ctx.filterArr && _ctx.filterArr.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
1513
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.filterArr, (item, index) => {
1514
+ return vue.openBlock(), vue.createElementBlock("div", {
1515
+ key: item.paramsStr,
1516
+ class: "__shops-filter-area-tabs"
1517
+ }, [
1518
+ vue.createElementVNode("div", _hoisted_8, vue.toDisplayString(item.label) + ":", 1),
1519
+ vue.createElementVNode("div", _hoisted_9, [
1520
+ vue.createElementVNode("span", {
1521
+ class: vue.normalizeClass({
1522
+ active: !(item.multiple ? _ctx.filterSelects[index].length : !!_ctx.filterSelects[index])
1523
+ }),
1524
+ onClick: vue.withModifiers(($event) => _ctx.changeFilterSelect(index, ""), ["self"])
1525
+ }, "\u5168\u90E8", 10, _hoisted_10),
1526
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.list, (element) => {
1527
+ return vue.openBlock(), vue.createElementBlock("span", {
1528
+ key: element.code,
1529
+ class: vue.normalizeClass({ active: _ctx.filterIsActive(index, element.code) }),
1530
+ onClick: vue.withModifiers(($event) => _ctx.changeFilterSelect(index, element.code), ["self"])
1531
+ }, vue.toDisplayString(element.label), 11, _hoisted_11);
1532
+ }), 128))
1533
+ ])
1534
+ ]);
1535
+ }), 128)),
1536
+ vue.createElementVNode("div", _hoisted_12, [
1537
+ _hoisted_13,
1538
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
1539
+ _hoisted_14
1540
+ ])
1541
+ ])) : vue.createCommentVNode("v-if", true),
1542
+ _ctx.shopList && _ctx.shopList.length ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1543
+ vue.createElementVNode("div", _hoisted_15, [
1544
+ vue.createVNode(_component_Checkbox, {
1545
+ checked: _ctx.checkAll,
1546
+ "onUpdate:checked": _cache[5] || (_cache[5] = ($event) => _ctx.checkAll = $event),
1547
+ indeterminate: _ctx.hasCheck,
1548
+ onChange: _ctx.onCheckAllChange
1549
+ }, {
1550
+ default: vue.withCtx(() => [
1551
+ _hoisted_16
1552
+ ]),
1553
+ _: 1
1554
+ }, 8, ["checked", "indeterminate", "onChange"]),
1555
+ vue.createVNode(_component_Checkbox, {
1556
+ checked: _ctx.inverSelect,
1557
+ "onUpdate:checked": _cache[6] || (_cache[6] = ($event) => _ctx.inverSelect = $event),
1558
+ onChange: _ctx.invertChange
1559
+ }, {
1560
+ default: vue.withCtx(() => [
1561
+ _hoisted_17
1562
+ ]),
1563
+ _: 1
1564
+ }, 8, ["checked", "onChange"]),
1565
+ vue.createVNode(_component_Button, {
1566
+ type: "text",
1567
+ onClick: _ctx.clearAll
1568
+ }, {
1569
+ icon: vue.withCtx(() => [
1570
+ vue.createVNode(_component_delete_outlined)
1571
+ ]),
1572
+ default: vue.withCtx(() => [
1573
+ _hoisted_18
1574
+ ]),
1575
+ _: 1
1576
+ }, 8, ["onClick"]),
1577
+ _ctx.filterArr && !_ctx.filterArr.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
1578
+ _hoisted_20,
1579
+ vue.createElementVNode("span", null, vue.toDisplayString(_ctx.selected.length), 1),
1580
+ _hoisted_21
1581
+ ])) : vue.createCommentVNode("v-if", true)
1582
+ ]),
1583
+ vue.createElementVNode("div", {
1584
+ class: "__shops-checkbox-box",
1585
+ style: vue.normalizeStyle({ maxHeight: _ctx.displayParams.listMaxHeight || "366px" })
1586
+ }, [
1587
+ vue.createElementVNode("div", {
1588
+ class: "__shops-checkbox-grid",
1589
+ onWheel: _cache[7] || (_cache[7] = vue.withModifiers(() => {
1590
+ }, ["stop"]))
1591
+ }, [
1592
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.shopList, (item) => {
1593
+ return vue.openBlock(), vue.createElementBlock("div", {
1594
+ key: item.shopCode
1595
+ }, [
1596
+ vue.createVNode(_component_Checkbox, {
1597
+ checked: _ctx.shopCheck[item.shopCode],
1598
+ "onUpdate:checked": ($event) => _ctx.shopCheck[item.shopCode] = $event
1599
+ }, {
1600
+ default: vue.withCtx(() => [
1601
+ vue.createTextVNode(vue.toDisplayString(item.shopName), 1)
1602
+ ]),
1603
+ _: 2
1604
+ }, 1032, ["checked", "onUpdate:checked"])
1605
+ ]);
1606
+ }), 128))
1607
+ ], 32)
1608
+ ], 4)
1609
+ ], 64)) : vue.createCommentVNode("v-if", true),
1610
+ _ctx.shopList && !_ctx.shopList.length ? (vue.openBlock(), vue.createBlock(_component_Empty, { key: 2 }, {
1611
+ description: vue.withCtx(() => [
1612
+ _hoisted_22
1613
+ ]),
1614
+ _: 1
1615
+ })) : vue.createCommentVNode("v-if", true)
1616
+ ], 2), [
1617
+ [vue.vShow, _ctx.isActive]
1618
+ ])
1619
+ ]);
1620
+ }
1621
+ var shopsFilter = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "shops-filter.vue"]]);
1622
+
1623
+ const BmShopsFilter = withInstall.withInstall(shopsFilter);
1624
+
1625
+ exports.BmShopsFilter = BmShopsFilter;
1626
+ exports["default"] = BmShopsFilter;