bk-magic-vue 2.5.7 → 2.5.8-beta.2

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 (56) hide show
  1. package/dist/bk-magic-vue.css +6 -6
  2. package/dist/bk-magic-vue.js +1740 -1670
  3. package/dist/bk-magic-vue.min.css +1 -1
  4. package/dist/bk-magic-vue.min.css.gz +0 -0
  5. package/dist/bk-magic-vue.min.css.map +1 -1
  6. package/dist/bk-magic-vue.min.js +1 -1
  7. package/dist/bk-magic-vue.min.js.gz +0 -0
  8. package/dist/bk-magic-vue.min.js.map +1 -1
  9. package/lib/big-tree.js +144 -140
  10. package/lib/cascade.js +60 -52
  11. package/lib/checkbox.js +42 -49
  12. package/lib/date-picker.js +93 -31
  13. package/lib/dialog.js +100 -94
  14. package/lib/directives/overflow-tips.js +18 -3
  15. package/lib/directives/tooltips.js +18 -3
  16. package/lib/form-item.js +92 -86
  17. package/lib/icon.js +17 -2
  18. package/lib/image-viewer.js +15 -0
  19. package/lib/image.js +15 -0
  20. package/lib/info-box.js +120 -116
  21. package/lib/message.js +15 -0
  22. package/lib/navigation-menu.js +29 -36
  23. package/lib/notify.js +17 -2
  24. package/lib/option-group.js +42 -49
  25. package/lib/option.js +42 -49
  26. package/lib/pagination.js +78 -72
  27. package/lib/popconfirm.js +18 -3
  28. package/lib/popover.js +18 -3
  29. package/lib/resize-layout.js +15 -0
  30. package/lib/row.js +17 -2
  31. package/lib/search-select.js +317 -319
  32. package/lib/select.js +78 -72
  33. package/lib/sideslider.js +24 -31
  34. package/lib/slider.js +16 -1
  35. package/lib/steps.js +47 -56
  36. package/lib/tab.js +82 -91
  37. package/lib/table-column.js +72 -68
  38. package/lib/table-setting-content.js +42 -49
  39. package/lib/table.js +100 -96
  40. package/lib/tag-input.js +53 -42
  41. package/lib/time-picker.js +44 -26
  42. package/lib/timeline.js +17 -2
  43. package/lib/transfer.js +18 -3
  44. package/lib/tree.js +27 -24
  45. package/lib/ui/bk-magic-vue.css +6 -6
  46. package/lib/ui/bk-magic-vue.min.css +1 -1
  47. package/lib/ui/bk-magic-vue.min.css.gz +0 -0
  48. package/lib/ui/bk-magic-vue.min.css.map +1 -1
  49. package/lib/ui/form.css +6 -6
  50. package/lib/ui/form.min.css +1 -1
  51. package/lib/ui/form.min.css.map +1 -1
  52. package/lib/upload.js +69 -61
  53. package/lib/utils/tippy.js +16 -1
  54. package/lib/version-detail.js +191 -191
  55. package/lib/virtual-render.js +17 -2
  56. package/package.json +1 -1
@@ -7,6 +7,33 @@
7
7
  Vue = Vue && Vue.hasOwnProperty('default') ? Vue['default'] : Vue;
8
8
  path = path && path.hasOwnProperty('default') ? path['default'] : path;
9
9
 
10
+ function _iterableToArrayLimit(arr, i) {
11
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
12
+ if (null != _i) {
13
+ var _s,
14
+ _e,
15
+ _x,
16
+ _r,
17
+ _arr = [],
18
+ _n = !0,
19
+ _d = !1;
20
+ try {
21
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
22
+ if (Object(_i) !== _i) return;
23
+ _n = !1;
24
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
25
+ } catch (err) {
26
+ _d = !0, _e = err;
27
+ } finally {
28
+ try {
29
+ if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
30
+ } finally {
31
+ if (_d) throw _e;
32
+ }
33
+ }
34
+ return _arr;
35
+ }
36
+ }
10
37
  function _regeneratorRuntime() {
11
38
  _regeneratorRuntime = function () {
12
39
  return exports;
@@ -142,14 +169,9 @@
142
169
  };
143
170
  }
144
171
  function maybeInvokeDelegate(delegate, context) {
145
- var method = delegate.iterator[context.method];
146
- if (undefined === method) {
147
- if (context.delegate = null, "throw" === context.method) {
148
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
149
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
150
- }
151
- return ContinueSentinel;
152
- }
172
+ var methodName = context.method,
173
+ method = delegate.iterator[methodName];
174
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
153
175
  var record = tryCatch(method, delegate.iterator, context.arg);
154
176
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
155
177
  var info = record.arg;
@@ -363,7 +385,7 @@
363
385
  descriptor.enumerable = descriptor.enumerable || false;
364
386
  descriptor.configurable = true;
365
387
  if ("value" in descriptor) descriptor.writable = true;
366
- Object.defineProperty(target, descriptor.key, descriptor);
388
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
367
389
  }
368
390
  }
369
391
  function _createClass(Constructor, protoProps, staticProps) {
@@ -375,6 +397,7 @@
375
397
  return Constructor;
376
398
  }
377
399
  function _defineProperty(obj, key, value) {
400
+ key = _toPropertyKey(key);
378
401
  if (key in obj) {
379
402
  Object.defineProperty(obj, key, {
380
403
  value: value,
@@ -464,30 +487,6 @@
464
487
  function _iterableToArray(iter) {
465
488
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
466
489
  }
467
- function _iterableToArrayLimit(arr, i) {
468
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
469
- if (_i == null) return;
470
- var _arr = [];
471
- var _n = true;
472
- var _d = false;
473
- var _s, _e;
474
- try {
475
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
476
- _arr.push(_s.value);
477
- if (i && _arr.length === i) break;
478
- }
479
- } catch (err) {
480
- _d = true;
481
- _e = err;
482
- } finally {
483
- try {
484
- if (!_n && _i["return"] != null) _i["return"]();
485
- } finally {
486
- if (_d) throw _e;
487
- }
488
- }
489
- return _arr;
490
- }
491
490
  function _unsupportedIterableToArray(o, minLen) {
492
491
  if (!o) return;
493
492
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -558,6 +557,20 @@
558
557
  }
559
558
  };
560
559
  }
560
+ function _toPrimitive(input, hint) {
561
+ if (typeof input !== "object" || input === null) return input;
562
+ var prim = input[Symbol.toPrimitive];
563
+ if (prim !== undefined) {
564
+ var res = prim.call(input, hint || "default");
565
+ if (typeof res !== "object") return res;
566
+ throw new TypeError("@@toPrimitive must return a primitive value.");
567
+ }
568
+ return (hint === "string" ? String : Number)(input);
569
+ }
570
+ function _toPropertyKey(arg) {
571
+ var key = _toPrimitive(arg, "string");
572
+ return typeof key === "symbol" ? key : String(key);
573
+ }
561
574
 
562
575
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
563
576
 
@@ -641,7 +654,7 @@
641
654
  return Object.defineProperty(_domCreate('div'), 'a', { get: function () { return 7; } }).a != 7;
642
655
  });
643
656
 
644
- var _toPrimitive = function (it, S) {
657
+ var _toPrimitive$1 = function (it, S) {
645
658
  if (!_isObject(it)) return it;
646
659
  var fn, val;
647
660
  if (S && typeof (fn = it.toString) == 'function' && !_isObject(val = fn.call(it))) return val;
@@ -653,7 +666,7 @@
653
666
  var dP = Object.defineProperty;
654
667
  var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
655
668
  _anObject(O);
656
- P = _toPrimitive(P, true);
669
+ P = _toPrimitive$1(P, true);
657
670
  _anObject(Attributes);
658
671
  if (_ie8DomDefine) try {
659
672
  return dP(O, P, Attributes);
@@ -2743,47 +2756,45 @@
2743
2756
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
2744
2757
  var shouldChange, oldValue, newValue, groupValue;
2745
2758
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2746
- while (1) {
2747
- switch (_context.prev = _context.next) {
2748
- case 0:
2749
- if (!_this.disabled) {
2750
- _context.next = 2;
2751
- break;
2752
- }
2753
- return _context.abrupt("return", false);
2754
- case 2:
2755
- if (!(typeof _this.beforeChange === 'function')) {
2756
- _context.next = 8;
2757
- break;
2758
- }
2759
- _context.next = 5;
2760
- return _this.beforeChange();
2761
- case 5:
2762
- shouldChange = _context.sent;
2763
- if (!(shouldChange === false)) {
2764
- _context.next = 8;
2765
- break;
2766
- }
2767
- return _context.abrupt("return");
2768
- case 8:
2769
- oldValue = _this.localValue;
2770
- if (_this.indeterminate) {
2771
- newValue = _this.localTrueValue;
2772
- } else {
2773
- newValue = oldValue === _this.localTrueValue ? _this.falseValue : _this.localTrueValue;
2774
- }
2775
- _this.localValue = newValue;
2776
- _this.$emit('input', newValue, _this.localTrueValue);
2777
- _this.$emit('change', newValue, oldValue, _this.localTrueValue);
2778
- _this.dispatch('bk-form-item', 'form-change');
2779
- if (_this.parent) {
2780
- groupValue = _this.localTrueValue === undefined ? newValue : _this.localTrueValue;
2781
- _this.parent.handleChange(_this.selected, groupValue);
2782
- }
2783
- case 15:
2784
- case "end":
2785
- return _context.stop();
2786
- }
2759
+ while (1) switch (_context.prev = _context.next) {
2760
+ case 0:
2761
+ if (!_this.disabled) {
2762
+ _context.next = 2;
2763
+ break;
2764
+ }
2765
+ return _context.abrupt("return", false);
2766
+ case 2:
2767
+ if (!(typeof _this.beforeChange === 'function')) {
2768
+ _context.next = 8;
2769
+ break;
2770
+ }
2771
+ _context.next = 5;
2772
+ return _this.beforeChange();
2773
+ case 5:
2774
+ shouldChange = _context.sent;
2775
+ if (!(shouldChange === false)) {
2776
+ _context.next = 8;
2777
+ break;
2778
+ }
2779
+ return _context.abrupt("return");
2780
+ case 8:
2781
+ oldValue = _this.localValue;
2782
+ if (_this.indeterminate) {
2783
+ newValue = _this.localTrueValue;
2784
+ } else {
2785
+ newValue = oldValue === _this.localTrueValue ? _this.falseValue : _this.localTrueValue;
2786
+ }
2787
+ _this.localValue = newValue;
2788
+ _this.$emit('input', newValue, _this.localTrueValue);
2789
+ _this.$emit('change', newValue, oldValue, _this.localTrueValue);
2790
+ _this.dispatch('bk-form-item', 'form-change');
2791
+ if (_this.parent) {
2792
+ groupValue = _this.localTrueValue === undefined ? newValue : _this.localTrueValue;
2793
+ _this.parent.handleChange(_this.selected, groupValue);
2794
+ }
2795
+ case 15:
2796
+ case "end":
2797
+ return _context.stop();
2787
2798
  }
2788
2799
  }, _callee);
2789
2800
  }))();
@@ -4665,261 +4676,277 @@
4665
4676
  staticRenderFns: __vue_staticRenderFns__$d
4666
4677
  }, __vue_inject_styles__$d, __vue_script__$d, __vue_scope_id__$d, __vue_is_functional_template__$d, __vue_module_identifier__$d, false, undefined, undefined, undefined);
4667
4678
 
4668
- var tinycolor = createCommonjsModule(function (module) {
4669
- (function(Math) {
4670
- var trimLeft = /^\s+/,
4671
- trimRight = /\s+$/,
4672
- tinyCounter = 0,
4673
- mathRound = Math.round,
4674
- mathMin = Math.min,
4675
- mathMax = Math.max,
4676
- mathRandom = Math.random;
4677
- function tinycolor (color, opts) {
4678
- color = (color) ? color : '';
4679
- opts = opts || { };
4679
+ var tinycolor = createCommonjsModule(function (module, exports) {
4680
+ (function (global, factory) {
4681
+ module.exports = factory() ;
4682
+ })(commonjsGlobal, (function () { function _typeof(obj) {
4683
+ "@babel/helpers - typeof";
4684
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
4685
+ return typeof obj;
4686
+ } : function (obj) {
4687
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
4688
+ }, _typeof(obj);
4689
+ }
4690
+ var trimLeft = /^\s+/;
4691
+ var trimRight = /\s+$/;
4692
+ function tinycolor(color, opts) {
4693
+ color = color ? color : "";
4694
+ opts = opts || {};
4680
4695
  if (color instanceof tinycolor) {
4681
- return color;
4696
+ return color;
4682
4697
  }
4683
4698
  if (!(this instanceof tinycolor)) {
4684
- return new tinycolor(color, opts);
4699
+ return new tinycolor(color, opts);
4685
4700
  }
4686
4701
  var rgb = inputToRGB(color);
4687
- this._originalInput = color,
4688
- this._r = rgb.r,
4689
- this._g = rgb.g,
4690
- this._b = rgb.b,
4691
- this._a = rgb.a,
4692
- this._roundA = mathRound(100*this._a) / 100,
4693
- this._format = opts.format || rgb.format;
4702
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
4694
4703
  this._gradientType = opts.gradientType;
4695
- if (this._r < 1) { this._r = mathRound(this._r); }
4696
- if (this._g < 1) { this._g = mathRound(this._g); }
4697
- if (this._b < 1) { this._b = mathRound(this._b); }
4704
+ if (this._r < 1) this._r = Math.round(this._r);
4705
+ if (this._g < 1) this._g = Math.round(this._g);
4706
+ if (this._b < 1) this._b = Math.round(this._b);
4698
4707
  this._ok = rgb.ok;
4699
- this._tc_id = tinyCounter++;
4700
- }
4701
- tinycolor.prototype = {
4702
- isDark: function() {
4703
- return this.getBrightness() < 128;
4708
+ }
4709
+ tinycolor.prototype = {
4710
+ isDark: function isDark() {
4711
+ return this.getBrightness() < 128;
4704
4712
  },
4705
- isLight: function() {
4706
- return !this.isDark();
4713
+ isLight: function isLight() {
4714
+ return !this.isDark();
4707
4715
  },
4708
- isValid: function() {
4709
- return this._ok;
4716
+ isValid: function isValid() {
4717
+ return this._ok;
4710
4718
  },
4711
- getOriginalInput: function() {
4719
+ getOriginalInput: function getOriginalInput() {
4712
4720
  return this._originalInput;
4713
4721
  },
4714
- getFormat: function() {
4715
- return this._format;
4716
- },
4717
- getAlpha: function() {
4718
- return this._a;
4719
- },
4720
- getBrightness: function() {
4721
- var rgb = this.toRgb();
4722
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
4723
- },
4724
- getLuminance: function() {
4725
- var rgb = this.toRgb();
4726
- var RsRGB, GsRGB, BsRGB, R, G, B;
4727
- RsRGB = rgb.r/255;
4728
- GsRGB = rgb.g/255;
4729
- BsRGB = rgb.b/255;
4730
- if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}
4731
- if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}
4732
- if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}
4733
- return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);
4734
- },
4735
- setAlpha: function(value) {
4736
- this._a = boundAlpha(value);
4737
- this._roundA = mathRound(100*this._a) / 100;
4738
- return this;
4722
+ getFormat: function getFormat() {
4723
+ return this._format;
4724
+ },
4725
+ getAlpha: function getAlpha() {
4726
+ return this._a;
4727
+ },
4728
+ getBrightness: function getBrightness() {
4729
+ var rgb = this.toRgb();
4730
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
4731
+ },
4732
+ getLuminance: function getLuminance() {
4733
+ var rgb = this.toRgb();
4734
+ var RsRGB, GsRGB, BsRGB, R, G, B;
4735
+ RsRGB = rgb.r / 255;
4736
+ GsRGB = rgb.g / 255;
4737
+ BsRGB = rgb.b / 255;
4738
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
4739
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
4740
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
4741
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
4742
+ },
4743
+ setAlpha: function setAlpha(value) {
4744
+ this._a = boundAlpha(value);
4745
+ this._roundA = Math.round(100 * this._a) / 100;
4746
+ return this;
4747
+ },
4748
+ toHsv: function toHsv() {
4749
+ var hsv = rgbToHsv(this._r, this._g, this._b);
4750
+ return {
4751
+ h: hsv.h * 360,
4752
+ s: hsv.s,
4753
+ v: hsv.v,
4754
+ a: this._a
4755
+ };
4739
4756
  },
4740
- toHsv: function() {
4741
- var hsv = rgbToHsv(this._r, this._g, this._b);
4742
- return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
4757
+ toHsvString: function toHsvString() {
4758
+ var hsv = rgbToHsv(this._r, this._g, this._b);
4759
+ var h = Math.round(hsv.h * 360),
4760
+ s = Math.round(hsv.s * 100),
4761
+ v = Math.round(hsv.v * 100);
4762
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
4743
4763
  },
4744
- toHsvString: function() {
4745
- var hsv = rgbToHsv(this._r, this._g, this._b);
4746
- var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
4747
- return (this._a == 1) ?
4748
- "hsv(" + h + ", " + s + "%, " + v + "%)" :
4749
- "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
4764
+ toHsl: function toHsl() {
4765
+ var hsl = rgbToHsl(this._r, this._g, this._b);
4766
+ return {
4767
+ h: hsl.h * 360,
4768
+ s: hsl.s,
4769
+ l: hsl.l,
4770
+ a: this._a
4771
+ };
4750
4772
  },
4751
- toHsl: function() {
4752
- var hsl = rgbToHsl(this._r, this._g, this._b);
4753
- return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
4773
+ toHslString: function toHslString() {
4774
+ var hsl = rgbToHsl(this._r, this._g, this._b);
4775
+ var h = Math.round(hsl.h * 360),
4776
+ s = Math.round(hsl.s * 100),
4777
+ l = Math.round(hsl.l * 100);
4778
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
4754
4779
  },
4755
- toHslString: function() {
4756
- var hsl = rgbToHsl(this._r, this._g, this._b);
4757
- var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
4758
- return (this._a == 1) ?
4759
- "hsl(" + h + ", " + s + "%, " + l + "%)" :
4760
- "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
4780
+ toHex: function toHex(allow3Char) {
4781
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
4761
4782
  },
4762
- toHex: function(allow3Char) {
4763
- return rgbToHex(this._r, this._g, this._b, allow3Char);
4783
+ toHexString: function toHexString(allow3Char) {
4784
+ return "#" + this.toHex(allow3Char);
4764
4785
  },
4765
- toHexString: function(allow3Char) {
4766
- return '#' + this.toHex(allow3Char);
4786
+ toHex8: function toHex8(allow4Char) {
4787
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
4767
4788
  },
4768
- toHex8: function(allow4Char) {
4769
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
4789
+ toHex8String: function toHex8String(allow4Char) {
4790
+ return "#" + this.toHex8(allow4Char);
4770
4791
  },
4771
- toHex8String: function(allow4Char) {
4772
- return '#' + this.toHex8(allow4Char);
4792
+ toRgb: function toRgb() {
4793
+ return {
4794
+ r: Math.round(this._r),
4795
+ g: Math.round(this._g),
4796
+ b: Math.round(this._b),
4797
+ a: this._a
4798
+ };
4773
4799
  },
4774
- toRgb: function() {
4775
- return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
4800
+ toRgbString: function toRgbString() {
4801
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
4776
4802
  },
4777
- toRgbString: function() {
4778
- return (this._a == 1) ?
4779
- "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
4780
- "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
4803
+ toPercentageRgb: function toPercentageRgb() {
4804
+ return {
4805
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
4806
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
4807
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
4808
+ a: this._a
4809
+ };
4781
4810
  },
4782
- toPercentageRgb: function() {
4783
- return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
4811
+ toPercentageRgbString: function toPercentageRgbString() {
4812
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
4784
4813
  },
4785
- toPercentageRgbString: function() {
4786
- return (this._a == 1) ?
4787
- "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
4788
- "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
4814
+ toName: function toName() {
4815
+ if (this._a === 0) {
4816
+ return "transparent";
4817
+ }
4818
+ if (this._a < 1) {
4819
+ return false;
4820
+ }
4821
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
4789
4822
  },
4790
- toName: function() {
4791
- if (this._a === 0) {
4792
- return "transparent";
4793
- }
4794
- if (this._a < 1) {
4795
- return false;
4796
- }
4797
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
4798
- },
4799
- toFilter: function(secondColor) {
4800
- var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
4801
- var secondHex8String = hex8String;
4802
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
4803
- if (secondColor) {
4804
- var s = tinycolor(secondColor);
4805
- secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
4806
- }
4807
- return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
4808
- },
4809
- toString: function(format) {
4810
- var formatSet = !!format;
4811
- format = format || this._format;
4812
- var formattedString = false;
4813
- var hasAlpha = this._a < 1 && this._a >= 0;
4814
- var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
4815
- if (needsAlphaFormat) {
4816
- if (format === "name" && this._a === 0) {
4817
- return this.toName();
4818
- }
4819
- return this.toRgbString();
4820
- }
4821
- if (format === "rgb") {
4822
- formattedString = this.toRgbString();
4823
- }
4824
- if (format === "prgb") {
4825
- formattedString = this.toPercentageRgbString();
4826
- }
4827
- if (format === "hex" || format === "hex6") {
4828
- formattedString = this.toHexString();
4829
- }
4830
- if (format === "hex3") {
4831
- formattedString = this.toHexString(true);
4832
- }
4833
- if (format === "hex4") {
4834
- formattedString = this.toHex8String(true);
4835
- }
4836
- if (format === "hex8") {
4837
- formattedString = this.toHex8String();
4838
- }
4839
- if (format === "name") {
4840
- formattedString = this.toName();
4841
- }
4842
- if (format === "hsl") {
4843
- formattedString = this.toHslString();
4844
- }
4845
- if (format === "hsv") {
4846
- formattedString = this.toHsvString();
4823
+ toFilter: function toFilter(secondColor) {
4824
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
4825
+ var secondHex8String = hex8String;
4826
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
4827
+ if (secondColor) {
4828
+ var s = tinycolor(secondColor);
4829
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
4830
+ }
4831
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
4832
+ },
4833
+ toString: function toString(format) {
4834
+ var formatSet = !!format;
4835
+ format = format || this._format;
4836
+ var formattedString = false;
4837
+ var hasAlpha = this._a < 1 && this._a >= 0;
4838
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
4839
+ if (needsAlphaFormat) {
4840
+ if (format === "name" && this._a === 0) {
4841
+ return this.toName();
4847
4842
  }
4848
- return formattedString || this.toHexString();
4843
+ return this.toRgbString();
4844
+ }
4845
+ if (format === "rgb") {
4846
+ formattedString = this.toRgbString();
4847
+ }
4848
+ if (format === "prgb") {
4849
+ formattedString = this.toPercentageRgbString();
4850
+ }
4851
+ if (format === "hex" || format === "hex6") {
4852
+ formattedString = this.toHexString();
4853
+ }
4854
+ if (format === "hex3") {
4855
+ formattedString = this.toHexString(true);
4856
+ }
4857
+ if (format === "hex4") {
4858
+ formattedString = this.toHex8String(true);
4859
+ }
4860
+ if (format === "hex8") {
4861
+ formattedString = this.toHex8String();
4862
+ }
4863
+ if (format === "name") {
4864
+ formattedString = this.toName();
4865
+ }
4866
+ if (format === "hsl") {
4867
+ formattedString = this.toHslString();
4868
+ }
4869
+ if (format === "hsv") {
4870
+ formattedString = this.toHsvString();
4871
+ }
4872
+ return formattedString || this.toHexString();
4849
4873
  },
4850
- clone: function() {
4851
- return tinycolor(this.toString());
4874
+ clone: function clone() {
4875
+ return tinycolor(this.toString());
4852
4876
  },
4853
- _applyModification: function(fn, args) {
4854
- var color = fn.apply(null, [this].concat([].slice.call(args)));
4855
- this._r = color._r;
4856
- this._g = color._g;
4857
- this._b = color._b;
4858
- this.setAlpha(color._a);
4859
- return this;
4877
+ _applyModification: function _applyModification(fn, args) {
4878
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
4879
+ this._r = color._r;
4880
+ this._g = color._g;
4881
+ this._b = color._b;
4882
+ this.setAlpha(color._a);
4883
+ return this;
4860
4884
  },
4861
- lighten: function() {
4862
- return this._applyModification(lighten, arguments);
4885
+ lighten: function lighten() {
4886
+ return this._applyModification(_lighten, arguments);
4863
4887
  },
4864
- brighten: function() {
4865
- return this._applyModification(brighten, arguments);
4888
+ brighten: function brighten() {
4889
+ return this._applyModification(_brighten, arguments);
4866
4890
  },
4867
- darken: function() {
4868
- return this._applyModification(darken, arguments);
4891
+ darken: function darken() {
4892
+ return this._applyModification(_darken, arguments);
4869
4893
  },
4870
- desaturate: function() {
4871
- return this._applyModification(desaturate, arguments);
4894
+ desaturate: function desaturate() {
4895
+ return this._applyModification(_desaturate, arguments);
4872
4896
  },
4873
- saturate: function() {
4874
- return this._applyModification(saturate, arguments);
4897
+ saturate: function saturate() {
4898
+ return this._applyModification(_saturate, arguments);
4875
4899
  },
4876
- greyscale: function() {
4877
- return this._applyModification(greyscale, arguments);
4900
+ greyscale: function greyscale() {
4901
+ return this._applyModification(_greyscale, arguments);
4878
4902
  },
4879
- spin: function() {
4880
- return this._applyModification(spin, arguments);
4903
+ spin: function spin() {
4904
+ return this._applyModification(_spin, arguments);
4881
4905
  },
4882
- _applyCombination: function(fn, args) {
4883
- return fn.apply(null, [this].concat([].slice.call(args)));
4906
+ _applyCombination: function _applyCombination(fn, args) {
4907
+ return fn.apply(null, [this].concat([].slice.call(args)));
4884
4908
  },
4885
- analogous: function() {
4886
- return this._applyCombination(analogous, arguments);
4909
+ analogous: function analogous() {
4910
+ return this._applyCombination(_analogous, arguments);
4887
4911
  },
4888
- complement: function() {
4889
- return this._applyCombination(complement, arguments);
4912
+ complement: function complement() {
4913
+ return this._applyCombination(_complement, arguments);
4890
4914
  },
4891
- monochromatic: function() {
4892
- return this._applyCombination(monochromatic, arguments);
4915
+ monochromatic: function monochromatic() {
4916
+ return this._applyCombination(_monochromatic, arguments);
4893
4917
  },
4894
- splitcomplement: function() {
4895
- return this._applyCombination(splitcomplement, arguments);
4918
+ splitcomplement: function splitcomplement() {
4919
+ return this._applyCombination(_splitcomplement, arguments);
4896
4920
  },
4897
- triad: function() {
4898
- return this._applyCombination(triad, arguments);
4921
+ triad: function triad() {
4922
+ return this._applyCombination(polyad, [3]);
4899
4923
  },
4900
- tetrad: function() {
4901
- return this._applyCombination(tetrad, arguments);
4924
+ tetrad: function tetrad() {
4925
+ return this._applyCombination(polyad, [4]);
4902
4926
  }
4903
- };
4904
- tinycolor.fromRatio = function(color, opts) {
4905
- if (typeof color == "object") {
4906
- var newColor = {};
4907
- for (var i in color) {
4908
- if (color.hasOwnProperty(i)) {
4909
- if (i === "a") {
4910
- newColor[i] = color[i];
4911
- }
4912
- else {
4913
- newColor[i] = convertToPercentage(color[i]);
4914
- }
4915
- }
4927
+ };
4928
+ tinycolor.fromRatio = function (color, opts) {
4929
+ if (_typeof(color) == "object") {
4930
+ var newColor = {};
4931
+ for (var i in color) {
4932
+ if (color.hasOwnProperty(i)) {
4933
+ if (i === "a") {
4934
+ newColor[i] = color[i];
4935
+ } else {
4936
+ newColor[i] = convertToPercentage(color[i]);
4937
+ }
4916
4938
  }
4917
- color = newColor;
4939
+ }
4940
+ color = newColor;
4918
4941
  }
4919
4942
  return tinycolor(color, opts);
4920
- };
4921
- function inputToRGB(color) {
4922
- var rgb = { r: 0, g: 0, b: 0 };
4943
+ };
4944
+ function inputToRGB(color) {
4945
+ var rgb = {
4946
+ r: 0,
4947
+ g: 0,
4948
+ b: 0
4949
+ };
4923
4950
  var a = 1;
4924
4951
  var s = null;
4925
4952
  var v = null;
@@ -4927,338 +4954,362 @@
4927
4954
  var ok = false;
4928
4955
  var format = false;
4929
4956
  if (typeof color == "string") {
4930
- color = stringInputToObject(color);
4931
- }
4932
- if (typeof color == "object") {
4933
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
4934
- rgb = rgbToRgb(color.r, color.g, color.b);
4935
- ok = true;
4936
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
4937
- }
4938
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
4939
- s = convertToPercentage(color.s);
4940
- v = convertToPercentage(color.v);
4941
- rgb = hsvToRgb(color.h, s, v);
4942
- ok = true;
4943
- format = "hsv";
4944
- }
4945
- else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
4946
- s = convertToPercentage(color.s);
4947
- l = convertToPercentage(color.l);
4948
- rgb = hslToRgb(color.h, s, l);
4949
- ok = true;
4950
- format = "hsl";
4951
- }
4952
- if (color.hasOwnProperty("a")) {
4953
- a = color.a;
4954
- }
4957
+ color = stringInputToObject(color);
4958
+ }
4959
+ if (_typeof(color) == "object") {
4960
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
4961
+ rgb = rgbToRgb(color.r, color.g, color.b);
4962
+ ok = true;
4963
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
4964
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
4965
+ s = convertToPercentage(color.s);
4966
+ v = convertToPercentage(color.v);
4967
+ rgb = hsvToRgb(color.h, s, v);
4968
+ ok = true;
4969
+ format = "hsv";
4970
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
4971
+ s = convertToPercentage(color.s);
4972
+ l = convertToPercentage(color.l);
4973
+ rgb = hslToRgb(color.h, s, l);
4974
+ ok = true;
4975
+ format = "hsl";
4976
+ }
4977
+ if (color.hasOwnProperty("a")) {
4978
+ a = color.a;
4979
+ }
4955
4980
  }
4956
4981
  a = boundAlpha(a);
4957
4982
  return {
4958
- ok: ok,
4959
- format: color.format || format,
4960
- r: mathMin(255, mathMax(rgb.r, 0)),
4961
- g: mathMin(255, mathMax(rgb.g, 0)),
4962
- b: mathMin(255, mathMax(rgb.b, 0)),
4963
- a: a
4983
+ ok: ok,
4984
+ format: color.format || format,
4985
+ r: Math.min(255, Math.max(rgb.r, 0)),
4986
+ g: Math.min(255, Math.max(rgb.g, 0)),
4987
+ b: Math.min(255, Math.max(rgb.b, 0)),
4988
+ a: a
4964
4989
  };
4965
- }
4966
- function rgbToRgb(r, g, b){
4990
+ }
4991
+ function rgbToRgb(r, g, b) {
4967
4992
  return {
4968
- r: bound01(r, 255) * 255,
4969
- g: bound01(g, 255) * 255,
4970
- b: bound01(b, 255) * 255
4993
+ r: bound01(r, 255) * 255,
4994
+ g: bound01(g, 255) * 255,
4995
+ b: bound01(b, 255) * 255
4971
4996
  };
4972
- }
4973
- function rgbToHsl(r, g, b) {
4997
+ }
4998
+ function rgbToHsl(r, g, b) {
4974
4999
  r = bound01(r, 255);
4975
5000
  g = bound01(g, 255);
4976
5001
  b = bound01(b, 255);
4977
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
4978
- var h, s, l = (max + min) / 2;
4979
- if(max == min) {
4980
- h = s = 0;
4981
- }
4982
- else {
4983
- var d = max - min;
4984
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
4985
- switch(max) {
4986
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
4987
- case g: h = (b - r) / d + 2; break;
4988
- case b: h = (r - g) / d + 4; break;
4989
- }
4990
- h /= 6;
5002
+ var max = Math.max(r, g, b),
5003
+ min = Math.min(r, g, b);
5004
+ var h,
5005
+ s,
5006
+ l = (max + min) / 2;
5007
+ if (max == min) {
5008
+ h = s = 0;
5009
+ } else {
5010
+ var d = max - min;
5011
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
5012
+ switch (max) {
5013
+ case r:
5014
+ h = (g - b) / d + (g < b ? 6 : 0);
5015
+ break;
5016
+ case g:
5017
+ h = (b - r) / d + 2;
5018
+ break;
5019
+ case b:
5020
+ h = (r - g) / d + 4;
5021
+ break;
5022
+ }
5023
+ h /= 6;
4991
5024
  }
4992
- return { h: h, s: s, l: l };
4993
- }
4994
- function hslToRgb(h, s, l) {
5025
+ return {
5026
+ h: h,
5027
+ s: s,
5028
+ l: l
5029
+ };
5030
+ }
5031
+ function hslToRgb(h, s, l) {
4995
5032
  var r, g, b;
4996
5033
  h = bound01(h, 360);
4997
5034
  s = bound01(s, 100);
4998
5035
  l = bound01(l, 100);
4999
5036
  function hue2rgb(p, q, t) {
5000
- if(t < 0) t += 1;
5001
- if(t > 1) t -= 1;
5002
- if(t < 1/6) return p + (q - p) * 6 * t;
5003
- if(t < 1/2) return q;
5004
- if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
5005
- return p;
5006
- }
5007
- if(s === 0) {
5008
- r = g = b = l;
5009
- }
5010
- else {
5011
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
5012
- var p = 2 * l - q;
5013
- r = hue2rgb(p, q, h + 1/3);
5014
- g = hue2rgb(p, q, h);
5015
- b = hue2rgb(p, q, h - 1/3);
5037
+ if (t < 0) t += 1;
5038
+ if (t > 1) t -= 1;
5039
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
5040
+ if (t < 1 / 2) return q;
5041
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
5042
+ return p;
5043
+ }
5044
+ if (s === 0) {
5045
+ r = g = b = l;
5046
+ } else {
5047
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
5048
+ var p = 2 * l - q;
5049
+ r = hue2rgb(p, q, h + 1 / 3);
5050
+ g = hue2rgb(p, q, h);
5051
+ b = hue2rgb(p, q, h - 1 / 3);
5016
5052
  }
5017
- return { r: r * 255, g: g * 255, b: b * 255 };
5018
- }
5019
- function rgbToHsv(r, g, b) {
5053
+ return {
5054
+ r: r * 255,
5055
+ g: g * 255,
5056
+ b: b * 255
5057
+ };
5058
+ }
5059
+ function rgbToHsv(r, g, b) {
5020
5060
  r = bound01(r, 255);
5021
5061
  g = bound01(g, 255);
5022
5062
  b = bound01(b, 255);
5023
- var max = mathMax(r, g, b), min = mathMin(r, g, b);
5024
- var h, s, v = max;
5063
+ var max = Math.max(r, g, b),
5064
+ min = Math.min(r, g, b);
5065
+ var h,
5066
+ s,
5067
+ v = max;
5025
5068
  var d = max - min;
5026
5069
  s = max === 0 ? 0 : d / max;
5027
- if(max == min) {
5028
- h = 0;
5029
- }
5030
- else {
5031
- switch(max) {
5032
- case r: h = (g - b) / d + (g < b ? 6 : 0); break;
5033
- case g: h = (b - r) / d + 2; break;
5034
- case b: h = (r - g) / d + 4; break;
5035
- }
5036
- h /= 6;
5070
+ if (max == min) {
5071
+ h = 0;
5072
+ } else {
5073
+ switch (max) {
5074
+ case r:
5075
+ h = (g - b) / d + (g < b ? 6 : 0);
5076
+ break;
5077
+ case g:
5078
+ h = (b - r) / d + 2;
5079
+ break;
5080
+ case b:
5081
+ h = (r - g) / d + 4;
5082
+ break;
5083
+ }
5084
+ h /= 6;
5037
5085
  }
5038
- return { h: h, s: s, v: v };
5039
- }
5040
- function hsvToRgb(h, s, v) {
5086
+ return {
5087
+ h: h,
5088
+ s: s,
5089
+ v: v
5090
+ };
5091
+ }
5092
+ function hsvToRgb(h, s, v) {
5041
5093
  h = bound01(h, 360) * 6;
5042
5094
  s = bound01(s, 100);
5043
5095
  v = bound01(v, 100);
5044
5096
  var i = Math.floor(h),
5045
- f = h - i,
5046
- p = v * (1 - s),
5047
- q = v * (1 - f * s),
5048
- t = v * (1 - (1 - f) * s),
5049
- mod = i % 6,
5050
- r = [v, q, p, p, t, v][mod],
5051
- g = [t, v, v, q, p, p][mod],
5052
- b = [p, p, t, v, v, q][mod];
5053
- return { r: r * 255, g: g * 255, b: b * 255 };
5054
- }
5055
- function rgbToHex(r, g, b, allow3Char) {
5056
- var hex = [
5057
- pad2(mathRound(r).toString(16)),
5058
- pad2(mathRound(g).toString(16)),
5059
- pad2(mathRound(b).toString(16))
5060
- ];
5097
+ f = h - i,
5098
+ p = v * (1 - s),
5099
+ q = v * (1 - f * s),
5100
+ t = v * (1 - (1 - f) * s),
5101
+ mod = i % 6,
5102
+ r = [v, q, p, p, t, v][mod],
5103
+ g = [t, v, v, q, p, p][mod],
5104
+ b = [p, p, t, v, v, q][mod];
5105
+ return {
5106
+ r: r * 255,
5107
+ g: g * 255,
5108
+ b: b * 255
5109
+ };
5110
+ }
5111
+ function rgbToHex(r, g, b, allow3Char) {
5112
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
5061
5113
  if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
5062
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
5114
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
5063
5115
  }
5064
5116
  return hex.join("");
5065
- }
5066
- function rgbaToHex(r, g, b, a, allow4Char) {
5067
- var hex = [
5068
- pad2(mathRound(r).toString(16)),
5069
- pad2(mathRound(g).toString(16)),
5070
- pad2(mathRound(b).toString(16)),
5071
- pad2(convertDecimalToHex(a))
5072
- ];
5117
+ }
5118
+ function rgbaToHex(r, g, b, a, allow4Char) {
5119
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
5073
5120
  if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
5074
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
5121
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
5075
5122
  }
5076
5123
  return hex.join("");
5077
- }
5078
- function rgbaToArgbHex(r, g, b, a) {
5079
- var hex = [
5080
- pad2(convertDecimalToHex(a)),
5081
- pad2(mathRound(r).toString(16)),
5082
- pad2(mathRound(g).toString(16)),
5083
- pad2(mathRound(b).toString(16))
5084
- ];
5124
+ }
5125
+ function rgbaToArgbHex(r, g, b, a) {
5126
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
5085
5127
  return hex.join("");
5086
- }
5087
- tinycolor.equals = function (color1, color2) {
5088
- if (!color1 || !color2) { return false; }
5128
+ }
5129
+ tinycolor.equals = function (color1, color2) {
5130
+ if (!color1 || !color2) return false;
5089
5131
  return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
5090
- };
5091
- tinycolor.random = function() {
5132
+ };
5133
+ tinycolor.random = function () {
5092
5134
  return tinycolor.fromRatio({
5093
- r: mathRandom(),
5094
- g: mathRandom(),
5095
- b: mathRandom()
5135
+ r: Math.random(),
5136
+ g: Math.random(),
5137
+ b: Math.random()
5096
5138
  });
5097
- };
5098
- function desaturate(color, amount) {
5099
- amount = (amount === 0) ? 0 : (amount || 10);
5139
+ };
5140
+ function _desaturate(color, amount) {
5141
+ amount = amount === 0 ? 0 : amount || 10;
5100
5142
  var hsl = tinycolor(color).toHsl();
5101
5143
  hsl.s -= amount / 100;
5102
5144
  hsl.s = clamp01(hsl.s);
5103
5145
  return tinycolor(hsl);
5104
- }
5105
- function saturate(color, amount) {
5106
- amount = (amount === 0) ? 0 : (amount || 10);
5146
+ }
5147
+ function _saturate(color, amount) {
5148
+ amount = amount === 0 ? 0 : amount || 10;
5107
5149
  var hsl = tinycolor(color).toHsl();
5108
5150
  hsl.s += amount / 100;
5109
5151
  hsl.s = clamp01(hsl.s);
5110
5152
  return tinycolor(hsl);
5111
- }
5112
- function greyscale(color) {
5153
+ }
5154
+ function _greyscale(color) {
5113
5155
  return tinycolor(color).desaturate(100);
5114
- }
5115
- function lighten (color, amount) {
5116
- amount = (amount === 0) ? 0 : (amount || 10);
5156
+ }
5157
+ function _lighten(color, amount) {
5158
+ amount = amount === 0 ? 0 : amount || 10;
5117
5159
  var hsl = tinycolor(color).toHsl();
5118
5160
  hsl.l += amount / 100;
5119
5161
  hsl.l = clamp01(hsl.l);
5120
5162
  return tinycolor(hsl);
5121
- }
5122
- function brighten(color, amount) {
5123
- amount = (amount === 0) ? 0 : (amount || 10);
5163
+ }
5164
+ function _brighten(color, amount) {
5165
+ amount = amount === 0 ? 0 : amount || 10;
5124
5166
  var rgb = tinycolor(color).toRgb();
5125
- rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
5126
- rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
5127
- rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
5167
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
5168
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
5169
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
5128
5170
  return tinycolor(rgb);
5129
- }
5130
- function darken (color, amount) {
5131
- amount = (amount === 0) ? 0 : (amount || 10);
5171
+ }
5172
+ function _darken(color, amount) {
5173
+ amount = amount === 0 ? 0 : amount || 10;
5132
5174
  var hsl = tinycolor(color).toHsl();
5133
5175
  hsl.l -= amount / 100;
5134
5176
  hsl.l = clamp01(hsl.l);
5135
5177
  return tinycolor(hsl);
5136
- }
5137
- function spin(color, amount) {
5178
+ }
5179
+ function _spin(color, amount) {
5138
5180
  var hsl = tinycolor(color).toHsl();
5139
5181
  var hue = (hsl.h + amount) % 360;
5140
5182
  hsl.h = hue < 0 ? 360 + hue : hue;
5141
5183
  return tinycolor(hsl);
5142
- }
5143
- function complement(color) {
5184
+ }
5185
+ function _complement(color) {
5144
5186
  var hsl = tinycolor(color).toHsl();
5145
5187
  hsl.h = (hsl.h + 180) % 360;
5146
5188
  return tinycolor(hsl);
5147
- }
5148
- function triad(color) {
5149
- var hsl = tinycolor(color).toHsl();
5150
- var h = hsl.h;
5151
- return [
5152
- tinycolor(color),
5153
- tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
5154
- tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
5155
- ];
5156
- }
5157
- function tetrad(color) {
5189
+ }
5190
+ function polyad(color, number) {
5191
+ if (isNaN(number) || number <= 0) {
5192
+ throw new Error("Argument to polyad must be a positive number");
5193
+ }
5158
5194
  var hsl = tinycolor(color).toHsl();
5159
- var h = hsl.h;
5160
- return [
5161
- tinycolor(color),
5162
- tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
5163
- tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
5164
- tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
5165
- ];
5166
- }
5167
- function splitcomplement(color) {
5195
+ var result = [tinycolor(color)];
5196
+ var step = 360 / number;
5197
+ for (var i = 1; i < number; i++) {
5198
+ result.push(tinycolor({
5199
+ h: (hsl.h + i * step) % 360,
5200
+ s: hsl.s,
5201
+ l: hsl.l
5202
+ }));
5203
+ }
5204
+ return result;
5205
+ }
5206
+ function _splitcomplement(color) {
5168
5207
  var hsl = tinycolor(color).toHsl();
5169
5208
  var h = hsl.h;
5170
- return [
5171
- tinycolor(color),
5172
- tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
5173
- tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
5174
- ];
5175
- }
5176
- function analogous(color, results, slices) {
5209
+ return [tinycolor(color), tinycolor({
5210
+ h: (h + 72) % 360,
5211
+ s: hsl.s,
5212
+ l: hsl.l
5213
+ }), tinycolor({
5214
+ h: (h + 216) % 360,
5215
+ s: hsl.s,
5216
+ l: hsl.l
5217
+ })];
5218
+ }
5219
+ function _analogous(color, results, slices) {
5177
5220
  results = results || 6;
5178
5221
  slices = slices || 30;
5179
5222
  var hsl = tinycolor(color).toHsl();
5180
5223
  var part = 360 / slices;
5181
5224
  var ret = [tinycolor(color)];
5182
- for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
5183
- hsl.h = (hsl.h + part) % 360;
5184
- ret.push(tinycolor(hsl));
5225
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
5226
+ hsl.h = (hsl.h + part) % 360;
5227
+ ret.push(tinycolor(hsl));
5185
5228
  }
5186
5229
  return ret;
5187
- }
5188
- function monochromatic(color, results) {
5230
+ }
5231
+ function _monochromatic(color, results) {
5189
5232
  results = results || 6;
5190
5233
  var hsv = tinycolor(color).toHsv();
5191
- var h = hsv.h, s = hsv.s, v = hsv.v;
5234
+ var h = hsv.h,
5235
+ s = hsv.s,
5236
+ v = hsv.v;
5192
5237
  var ret = [];
5193
5238
  var modification = 1 / results;
5194
5239
  while (results--) {
5195
- ret.push(tinycolor({ h: h, s: s, v: v}));
5196
- v = (v + modification) % 1;
5240
+ ret.push(tinycolor({
5241
+ h: h,
5242
+ s: s,
5243
+ v: v
5244
+ }));
5245
+ v = (v + modification) % 1;
5197
5246
  }
5198
5247
  return ret;
5199
- }
5200
- tinycolor.mix = function(color1, color2, amount) {
5201
- amount = (amount === 0) ? 0 : (amount || 50);
5248
+ }
5249
+ tinycolor.mix = function (color1, color2, amount) {
5250
+ amount = amount === 0 ? 0 : amount || 50;
5202
5251
  var rgb1 = tinycolor(color1).toRgb();
5203
5252
  var rgb2 = tinycolor(color2).toRgb();
5204
5253
  var p = amount / 100;
5205
5254
  var rgba = {
5206
- r: ((rgb2.r - rgb1.r) * p) + rgb1.r,
5207
- g: ((rgb2.g - rgb1.g) * p) + rgb1.g,
5208
- b: ((rgb2.b - rgb1.b) * p) + rgb1.b,
5209
- a: ((rgb2.a - rgb1.a) * p) + rgb1.a
5255
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
5256
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
5257
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
5258
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
5210
5259
  };
5211
5260
  return tinycolor(rgba);
5212
- };
5213
- tinycolor.readability = function(color1, color2) {
5261
+ };
5262
+ tinycolor.readability = function (color1, color2) {
5214
5263
  var c1 = tinycolor(color1);
5215
5264
  var c2 = tinycolor(color2);
5216
- return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);
5217
- };
5218
- tinycolor.isReadable = function(color1, color2, wcag2) {
5265
+ return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
5266
+ };
5267
+ tinycolor.isReadable = function (color1, color2, wcag2) {
5219
5268
  var readability = tinycolor.readability(color1, color2);
5220
5269
  var wcag2Parms, out;
5221
5270
  out = false;
5222
5271
  wcag2Parms = validateWCAG2Parms(wcag2);
5223
5272
  switch (wcag2Parms.level + wcag2Parms.size) {
5224
- case "AAsmall":
5225
- case "AAAlarge":
5226
- out = readability >= 4.5;
5227
- break;
5228
- case "AAlarge":
5229
- out = readability >= 3;
5230
- break;
5231
- case "AAAsmall":
5232
- out = readability >= 7;
5233
- break;
5273
+ case "AAsmall":
5274
+ case "AAAlarge":
5275
+ out = readability >= 4.5;
5276
+ break;
5277
+ case "AAlarge":
5278
+ out = readability >= 3;
5279
+ break;
5280
+ case "AAAsmall":
5281
+ out = readability >= 7;
5282
+ break;
5234
5283
  }
5235
5284
  return out;
5236
- };
5237
- tinycolor.mostReadable = function(baseColor, colorList, args) {
5285
+ };
5286
+ tinycolor.mostReadable = function (baseColor, colorList, args) {
5238
5287
  var bestColor = null;
5239
5288
  var bestScore = 0;
5240
5289
  var readability;
5241
- var includeFallbackColors, level, size ;
5290
+ var includeFallbackColors, level, size;
5242
5291
  args = args || {};
5243
- includeFallbackColors = args.includeFallbackColors ;
5292
+ includeFallbackColors = args.includeFallbackColors;
5244
5293
  level = args.level;
5245
5294
  size = args.size;
5246
- for (var i= 0; i < colorList.length ; i++) {
5247
- readability = tinycolor.readability(baseColor, colorList[i]);
5248
- if (readability > bestScore) {
5249
- bestScore = readability;
5250
- bestColor = tinycolor(colorList[i]);
5251
- }
5252
- }
5253
- if (tinycolor.isReadable(baseColor, bestColor, {"level":level,"size":size}) || !includeFallbackColors) {
5254
- return bestColor;
5255
- }
5256
- else {
5257
- args.includeFallbackColors=false;
5258
- return tinycolor.mostReadable(baseColor,["#fff", "#000"],args);
5295
+ for (var i = 0; i < colorList.length; i++) {
5296
+ readability = tinycolor.readability(baseColor, colorList[i]);
5297
+ if (readability > bestScore) {
5298
+ bestScore = readability;
5299
+ bestColor = tinycolor(colorList[i]);
5300
+ }
5301
+ }
5302
+ if (tinycolor.isReadable(baseColor, bestColor, {
5303
+ level: level,
5304
+ size: size
5305
+ }) || !includeFallbackColors) {
5306
+ return bestColor;
5307
+ } else {
5308
+ args.includeFallbackColors = false;
5309
+ return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
5259
5310
  }
5260
- };
5261
- var names = tinycolor.names = {
5311
+ };
5312
+ var names = tinycolor.names = {
5262
5313
  aliceblue: "f0f8ff",
5263
5314
  antiquewhite: "faebd7",
5264
5315
  aqua: "0ff",
@@ -5408,171 +5459,204 @@
5408
5459
  whitesmoke: "f5f5f5",
5409
5460
  yellow: "ff0",
5410
5461
  yellowgreen: "9acd32"
5411
- };
5412
- var hexNames = tinycolor.hexNames = flip(names);
5413
- function flip(o) {
5414
- var flipped = { };
5462
+ };
5463
+ var hexNames = tinycolor.hexNames = flip(names);
5464
+ function flip(o) {
5465
+ var flipped = {};
5415
5466
  for (var i in o) {
5416
- if (o.hasOwnProperty(i)) {
5417
- flipped[o[i]] = i;
5418
- }
5467
+ if (o.hasOwnProperty(i)) {
5468
+ flipped[o[i]] = i;
5469
+ }
5419
5470
  }
5420
5471
  return flipped;
5421
- }
5422
- function boundAlpha(a) {
5472
+ }
5473
+ function boundAlpha(a) {
5423
5474
  a = parseFloat(a);
5424
5475
  if (isNaN(a) || a < 0 || a > 1) {
5425
- a = 1;
5476
+ a = 1;
5426
5477
  }
5427
5478
  return a;
5428
- }
5429
- function bound01(n, max) {
5430
- if (isOnePointZero(n)) { n = "100%"; }
5479
+ }
5480
+ function bound01(n, max) {
5481
+ if (isOnePointZero(n)) n = "100%";
5431
5482
  var processPercent = isPercentage(n);
5432
- n = mathMin(max, mathMax(0, parseFloat(n)));
5483
+ n = Math.min(max, Math.max(0, parseFloat(n)));
5433
5484
  if (processPercent) {
5434
- n = parseInt(n * max, 10) / 100;
5485
+ n = parseInt(n * max, 10) / 100;
5435
5486
  }
5436
- if ((Math.abs(n - max) < 0.000001)) {
5437
- return 1;
5487
+ if (Math.abs(n - max) < 0.000001) {
5488
+ return 1;
5438
5489
  }
5439
- return (n % max) / parseFloat(max);
5440
- }
5441
- function clamp01(val) {
5442
- return mathMin(1, mathMax(0, val));
5443
- }
5444
- function parseIntFromHex(val) {
5490
+ return n % max / parseFloat(max);
5491
+ }
5492
+ function clamp01(val) {
5493
+ return Math.min(1, Math.max(0, val));
5494
+ }
5495
+ function parseIntFromHex(val) {
5445
5496
  return parseInt(val, 16);
5446
- }
5447
- function isOnePointZero(n) {
5448
- return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
5449
- }
5450
- function isPercentage(n) {
5451
- return typeof n === "string" && n.indexOf('%') != -1;
5452
- }
5453
- function pad2(c) {
5454
- return c.length == 1 ? '0' + c : '' + c;
5455
- }
5456
- function convertToPercentage(n) {
5497
+ }
5498
+ function isOnePointZero(n) {
5499
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
5500
+ }
5501
+ function isPercentage(n) {
5502
+ return typeof n === "string" && n.indexOf("%") != -1;
5503
+ }
5504
+ function pad2(c) {
5505
+ return c.length == 1 ? "0" + c : "" + c;
5506
+ }
5507
+ function convertToPercentage(n) {
5457
5508
  if (n <= 1) {
5458
- n = (n * 100) + "%";
5509
+ n = n * 100 + "%";
5459
5510
  }
5460
5511
  return n;
5461
- }
5462
- function convertDecimalToHex(d) {
5512
+ }
5513
+ function convertDecimalToHex(d) {
5463
5514
  return Math.round(parseFloat(d) * 255).toString(16);
5464
- }
5465
- function convertHexToDecimal(h) {
5466
- return (parseIntFromHex(h) / 255);
5467
- }
5468
- var matchers = (function() {
5515
+ }
5516
+ function convertHexToDecimal(h) {
5517
+ return parseIntFromHex(h) / 255;
5518
+ }
5519
+ var matchers = function () {
5469
5520
  var CSS_INTEGER = "[-\\+]?\\d+%?";
5470
5521
  var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
5471
5522
  var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
5472
5523
  var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
5473
5524
  var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
5474
5525
  return {
5475
- CSS_UNIT: new RegExp(CSS_UNIT),
5476
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
5477
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
5478
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
5479
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
5480
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
5481
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
5482
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
5483
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
5484
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
5485
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
5526
+ CSS_UNIT: new RegExp(CSS_UNIT),
5527
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
5528
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
5529
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
5530
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
5531
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
5532
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
5533
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
5534
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
5535
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
5536
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
5486
5537
  };
5487
- })();
5488
- function isValidCSSUnit(color) {
5538
+ }();
5539
+ function isValidCSSUnit(color) {
5489
5540
  return !!matchers.CSS_UNIT.exec(color);
5490
- }
5491
- function stringInputToObject(color) {
5492
- color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
5541
+ }
5542
+ function stringInputToObject(color) {
5543
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
5493
5544
  var named = false;
5494
5545
  if (names[color]) {
5495
- color = names[color];
5496
- named = true;
5497
- }
5498
- else if (color == 'transparent') {
5499
- return { r: 0, g: 0, b: 0, a: 0, format: "name" };
5546
+ color = names[color];
5547
+ named = true;
5548
+ } else if (color == "transparent") {
5549
+ return {
5550
+ r: 0,
5551
+ g: 0,
5552
+ b: 0,
5553
+ a: 0,
5554
+ format: "name"
5555
+ };
5500
5556
  }
5501
5557
  var match;
5502
- if ((match = matchers.rgb.exec(color))) {
5503
- return { r: match[1], g: match[2], b: match[3] };
5558
+ if (match = matchers.rgb.exec(color)) {
5559
+ return {
5560
+ r: match[1],
5561
+ g: match[2],
5562
+ b: match[3]
5563
+ };
5504
5564
  }
5505
- if ((match = matchers.rgba.exec(color))) {
5506
- return { r: match[1], g: match[2], b: match[3], a: match[4] };
5565
+ if (match = matchers.rgba.exec(color)) {
5566
+ return {
5567
+ r: match[1],
5568
+ g: match[2],
5569
+ b: match[3],
5570
+ a: match[4]
5571
+ };
5507
5572
  }
5508
- if ((match = matchers.hsl.exec(color))) {
5509
- return { h: match[1], s: match[2], l: match[3] };
5573
+ if (match = matchers.hsl.exec(color)) {
5574
+ return {
5575
+ h: match[1],
5576
+ s: match[2],
5577
+ l: match[3]
5578
+ };
5510
5579
  }
5511
- if ((match = matchers.hsla.exec(color))) {
5512
- return { h: match[1], s: match[2], l: match[3], a: match[4] };
5580
+ if (match = matchers.hsla.exec(color)) {
5581
+ return {
5582
+ h: match[1],
5583
+ s: match[2],
5584
+ l: match[3],
5585
+ a: match[4]
5586
+ };
5513
5587
  }
5514
- if ((match = matchers.hsv.exec(color))) {
5515
- return { h: match[1], s: match[2], v: match[3] };
5588
+ if (match = matchers.hsv.exec(color)) {
5589
+ return {
5590
+ h: match[1],
5591
+ s: match[2],
5592
+ v: match[3]
5593
+ };
5516
5594
  }
5517
- if ((match = matchers.hsva.exec(color))) {
5518
- return { h: match[1], s: match[2], v: match[3], a: match[4] };
5595
+ if (match = matchers.hsva.exec(color)) {
5596
+ return {
5597
+ h: match[1],
5598
+ s: match[2],
5599
+ v: match[3],
5600
+ a: match[4]
5601
+ };
5519
5602
  }
5520
- if ((match = matchers.hex8.exec(color))) {
5521
- return {
5522
- r: parseIntFromHex(match[1]),
5523
- g: parseIntFromHex(match[2]),
5524
- b: parseIntFromHex(match[3]),
5525
- a: convertHexToDecimal(match[4]),
5526
- format: named ? "name" : "hex8"
5527
- };
5603
+ if (match = matchers.hex8.exec(color)) {
5604
+ return {
5605
+ r: parseIntFromHex(match[1]),
5606
+ g: parseIntFromHex(match[2]),
5607
+ b: parseIntFromHex(match[3]),
5608
+ a: convertHexToDecimal(match[4]),
5609
+ format: named ? "name" : "hex8"
5610
+ };
5528
5611
  }
5529
- if ((match = matchers.hex6.exec(color))) {
5530
- return {
5531
- r: parseIntFromHex(match[1]),
5532
- g: parseIntFromHex(match[2]),
5533
- b: parseIntFromHex(match[3]),
5534
- format: named ? "name" : "hex"
5535
- };
5612
+ if (match = matchers.hex6.exec(color)) {
5613
+ return {
5614
+ r: parseIntFromHex(match[1]),
5615
+ g: parseIntFromHex(match[2]),
5616
+ b: parseIntFromHex(match[3]),
5617
+ format: named ? "name" : "hex"
5618
+ };
5536
5619
  }
5537
- if ((match = matchers.hex4.exec(color))) {
5538
- return {
5539
- r: parseIntFromHex(match[1] + '' + match[1]),
5540
- g: parseIntFromHex(match[2] + '' + match[2]),
5541
- b: parseIntFromHex(match[3] + '' + match[3]),
5542
- a: convertHexToDecimal(match[4] + '' + match[4]),
5543
- format: named ? "name" : "hex8"
5544
- };
5620
+ if (match = matchers.hex4.exec(color)) {
5621
+ return {
5622
+ r: parseIntFromHex(match[1] + "" + match[1]),
5623
+ g: parseIntFromHex(match[2] + "" + match[2]),
5624
+ b: parseIntFromHex(match[3] + "" + match[3]),
5625
+ a: convertHexToDecimal(match[4] + "" + match[4]),
5626
+ format: named ? "name" : "hex8"
5627
+ };
5545
5628
  }
5546
- if ((match = matchers.hex3.exec(color))) {
5547
- return {
5548
- r: parseIntFromHex(match[1] + '' + match[1]),
5549
- g: parseIntFromHex(match[2] + '' + match[2]),
5550
- b: parseIntFromHex(match[3] + '' + match[3]),
5551
- format: named ? "name" : "hex"
5552
- };
5629
+ if (match = matchers.hex3.exec(color)) {
5630
+ return {
5631
+ r: parseIntFromHex(match[1] + "" + match[1]),
5632
+ g: parseIntFromHex(match[2] + "" + match[2]),
5633
+ b: parseIntFromHex(match[3] + "" + match[3]),
5634
+ format: named ? "name" : "hex"
5635
+ };
5553
5636
  }
5554
5637
  return false;
5555
- }
5556
- function validateWCAG2Parms(parms) {
5638
+ }
5639
+ function validateWCAG2Parms(parms) {
5557
5640
  var level, size;
5558
- parms = parms || {"level":"AA", "size":"small"};
5641
+ parms = parms || {
5642
+ level: "AA",
5643
+ size: "small"
5644
+ };
5559
5645
  level = (parms.level || "AA").toUpperCase();
5560
5646
  size = (parms.size || "small").toLowerCase();
5561
5647
  if (level !== "AA" && level !== "AAA") {
5562
- level = "AA";
5648
+ level = "AA";
5563
5649
  }
5564
5650
  if (size !== "small" && size !== "large") {
5565
- size = "small";
5651
+ size = "small";
5566
5652
  }
5567
- return {"level":level, "size":size};
5568
- }
5569
- if ( module.exports) {
5570
- module.exports = tinycolor;
5571
- }
5572
- else {
5573
- window.tinycolor = tinycolor;
5574
- }
5575
- })(Math);
5653
+ return {
5654
+ level: level,
5655
+ size: size
5656
+ };
5657
+ }
5658
+ return tinycolor;
5659
+ }));
5576
5660
  });
5577
5661
 
5578
5662
  function formatColor(colorParam) {
@@ -9052,7 +9136,7 @@
9052
9136
  var gOPD = Object.getOwnPropertyDescriptor;
9053
9137
  var f$6 = _descriptors ? gOPD : function getOwnPropertyDescriptor(O, P) {
9054
9138
  O = _toIobject(O);
9055
- P = _toPrimitive(P, true);
9139
+ P = _toPrimitive$1(P, true);
9056
9140
  if (_ie8DomDefine) try {
9057
9141
  return gOPD(O, P);
9058
9142
  } catch (e) { }
@@ -9103,7 +9187,7 @@
9103
9187
  var $defineProperty = function defineProperty(it, key, D) {
9104
9188
  if (it === ObjectProto$1) $defineProperty(OPSymbols, key, D);
9105
9189
  _anObject(it);
9106
- key = _toPrimitive(key, true);
9190
+ key = _toPrimitive$1(key, true);
9107
9191
  _anObject(D);
9108
9192
  if (_has(AllSymbols, key)) {
9109
9193
  if (!D.enumerable) {
@@ -9128,13 +9212,13 @@
9128
9212
  return P === undefined ? _objectCreate(it) : $defineProperties(_objectCreate(it), P);
9129
9213
  };
9130
9214
  var $propertyIsEnumerable = function propertyIsEnumerable(key) {
9131
- var E = isEnum$1.call(this, key = _toPrimitive(key, true));
9215
+ var E = isEnum$1.call(this, key = _toPrimitive$1(key, true));
9132
9216
  if (this === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return false;
9133
9217
  return E || !_has(this, key) || !_has(AllSymbols, key) || _has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
9134
9218
  };
9135
9219
  var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
9136
9220
  it = _toIobject(it);
9137
- key = _toPrimitive(key, true);
9221
+ key = _toPrimitive$1(key, true);
9138
9222
  if (it === ObjectProto$1 && _has(AllSymbols, key) && !_has(OPSymbols, key)) return;
9139
9223
  var D = gOPD$1(it, key);
9140
9224
  if (D && _has(AllSymbols, key) && !(_has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
@@ -9508,6 +9592,12 @@
9508
9592
 
9509
9593
  var script$l = {
9510
9594
  mixins: [mixin$1, locale.mixin],
9595
+ props: {
9596
+ realPickerType: {
9597
+ type: String,
9598
+ default: ''
9599
+ }
9600
+ },
9511
9601
  data: function data() {
9512
9602
  return {};
9513
9603
  },
@@ -9523,6 +9613,7 @@
9523
9613
  return translatedDays.splice(0, 7 - 0).concat(translatedDays.splice(0, 0));
9524
9614
  },
9525
9615
  cells: function cells() {
9616
+ var _this = this;
9526
9617
  var tableYear = this.tableDate.getFullYear();
9527
9618
  var tableMonth = this.tableDate.getMonth();
9528
9619
  var today = clearHours(new Date());
@@ -9547,7 +9638,8 @@
9547
9638
  disabled: cell.date && disabledTestFn && disabledTestFn(new Date(time)),
9548
9639
  range: dateIsInCurrentMonth && isRange && isInRange(time, rangeStart, rangeEnd),
9549
9640
  start: dateIsInCurrentMonth && isRange && time === minDay,
9550
- end: dateIsInCurrentMonth && isRange && time === maxDay
9641
+ end: dateIsInCurrentMonth && isRange && time === maxDay,
9642
+ pickerType: _this.realPickerType
9551
9643
  });
9552
9644
  }).cells.slice(0);
9553
9645
  }
@@ -9620,6 +9712,12 @@
9620
9712
 
9621
9713
  var script$m = {
9622
9714
  mixins: [mixin$1],
9715
+ props: {
9716
+ realPickerType: {
9717
+ type: String,
9718
+ default: ''
9719
+ }
9720
+ },
9623
9721
  computed: {
9624
9722
  startYear: function startYear() {
9625
9723
  return Math.floor(this.tableDate.getFullYear() / 10) * 10;
@@ -9642,18 +9740,25 @@
9642
9740
  var day = clearHours(cell.date);
9643
9741
  cell.selected = selectedDays.includes(day);
9644
9742
  cell.focused = day === focusedDate;
9743
+ cell.pickerType = this.realPickerType;
9645
9744
  cells.push(cell);
9646
9745
  }
9647
9746
  return cells;
9648
9747
  }
9649
9748
  },
9650
9749
  methods: {
9750
+ getExternalCellClass: function getExternalCellClass(cell) {
9751
+ if (typeof this.cellClass === 'function') {
9752
+ return this.cellClass(cell);
9753
+ }
9754
+ return '';
9755
+ },
9651
9756
  getCellCls: function getCellCls(cell) {
9652
9757
  return ['bk-date-picker-cells-cell', {
9653
9758
  'bk-date-picker-cells-cell-selected': cell.selected,
9654
9759
  'bk-date-picker-cells-cell-disabled': cell.disabled,
9655
9760
  'bk-date-picker-cells-cell-range': cell.range && !cell.start && !cell.end
9656
- }];
9761
+ }, this.getExternalCellClass(cell)];
9657
9762
  }
9658
9763
  }
9659
9764
  };
@@ -9706,6 +9811,12 @@
9706
9811
 
9707
9812
  var script$n = {
9708
9813
  mixins: [mixin$1],
9814
+ props: {
9815
+ realPickerType: {
9816
+ type: String,
9817
+ default: ''
9818
+ }
9819
+ },
9709
9820
  computed: {
9710
9821
  cells: function cells() {
9711
9822
  var cells = [];
@@ -9727,15 +9838,22 @@
9727
9838
  cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(cell.date) && this.selectionMode === 'month';
9728
9839
  cell.selected = selectedDays.includes(day);
9729
9840
  cell.focused = day === focusedDate;
9841
+ cell.pickerType = this.realPickerType;
9730
9842
  cells.push(cell);
9731
9843
  }
9732
9844
  return cells;
9733
9845
  }
9734
9846
  },
9735
9847
  methods: {
9848
+ getExternalCellClass: function getExternalCellClass(cell) {
9849
+ if (typeof this.cellClass === 'function') {
9850
+ return this.cellClass(cell);
9851
+ }
9852
+ return '';
9853
+ },
9736
9854
  getCellCls: function getCellCls(cell) {
9737
9855
  var _ref;
9738
- return ["bk-date-picker-cells-cell", (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref)];
9856
+ return ["bk-date-picker-cells-cell", (_ref = {}, _defineProperty(_ref, "bk-date-picker-cells-cell-selected", cell.selected), _defineProperty(_ref, "bk-date-picker-cells-cell-disabled", cell.disabled), _defineProperty(_ref, "bk-date-picker-cells-cell-range", cell.range && !cell.start && !cell.end), _ref), this.getExternalCellClass(cell)];
9739
9857
  },
9740
9858
  tCell: function tCell(nr) {
9741
9859
  return String(nr).length > 1 ? nr : "0".concat(nr);
@@ -10951,7 +11069,8 @@
10951
11069
  currentView: selectionMode || 'date',
10952
11070
  pickerTable: this.getTableType(selectionMode),
10953
11071
  dates: dates,
10954
- panelDate: this.startDate || dates[0] || new Date()
11072
+ panelDate: this.startDate || dates[0] || new Date(),
11073
+ realPickerType: this.getRealPickerType(selectionMode)
10955
11074
  };
10956
11075
  },
10957
11076
  computed: {
@@ -10969,6 +11088,7 @@
10969
11088
  var handler = function handler(type) {
10970
11089
  return function () {
10971
11090
  _this.pickerTable = _this.getTableType(type);
11091
+ _this.realPickerType = _this.getRealPickerType(type);
10972
11092
  };
10973
11093
  };
10974
11094
  return {
@@ -11002,6 +11122,7 @@
11002
11122
  selectionMode: function selectionMode(type) {
11003
11123
  this.currentView = type;
11004
11124
  this.pickerTable = this.getTableType(type);
11125
+ this.realPickerType = this.getRealPickerType(type);
11005
11126
  },
11006
11127
  focusedDate: function focusedDate(date) {
11007
11128
  var isDifferentYear = date.getFullYear() !== this.panelDate.getFullYear();
@@ -11017,6 +11138,7 @@
11017
11138
  reset: function reset() {
11018
11139
  this.currentView = this.selectionMode;
11019
11140
  this.pickerTable = this.getTableType(this.currentView);
11141
+ this.realPickerType = this.getRealPickerType(this.currentView);
11020
11142
  },
11021
11143
  changeYear: function changeYear(dir) {
11022
11144
  if (this.selectionMode === 'year' || this.pickerTable === 'year-table') {
@@ -11028,6 +11150,9 @@
11028
11150
  getTableType: function getTableType(currentView) {
11029
11151
  return currentView.match(/^time/) ? 'time-picker' : "".concat(currentView, "-table");
11030
11152
  },
11153
+ getRealPickerType: function getRealPickerType(currentView) {
11154
+ return currentView.match(/^time/) ? 'time-picker' : "".concat(currentView);
11155
+ },
11031
11156
  changeMonth: function changeMonth(dir) {
11032
11157
  this.panelDate = siblingMonth(this.panelDate, dir);
11033
11158
  },
@@ -11035,8 +11160,10 @@
11035
11160
  this.panelDate = value;
11036
11161
  if (this.pickerTable === 'year-table') {
11037
11162
  this.pickerTable = 'month-table';
11163
+ this.realPickerType = 'month';
11038
11164
  } else {
11039
11165
  this.pickerTable = this.getTableType(this.currentView);
11166
+ this.realPickerType = this.getRealPickerType(this.currentView);
11040
11167
  }
11041
11168
  },
11042
11169
  handlePick: function handlePick(value, type) {
@@ -11158,7 +11285,8 @@
11158
11285
  "selection-mode": _vm.selectionMode,
11159
11286
  "disabled-date": _vm.disabledDate,
11160
11287
  "focused-date": _vm.focusedDate,
11161
- "cell-class": _vm.cellClass
11288
+ "cell-class": _vm.cellClass,
11289
+ "real-picker-type": _vm.realPickerType
11162
11290
  },
11163
11291
  on: {
11164
11292
  "pick": _vm.panelPickerHandlers,
@@ -12903,44 +13031,42 @@
12903
13031
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
12904
13032
  var shouldClose;
12905
13033
  return _regeneratorRuntime().wrap(function _callee$(_context) {
12906
- while (1) {
12907
- switch (_context.prev = _context.next) {
12908
- case 0:
12909
- shouldClose = true;
12910
- if (!(typeof _this2.beforeClose === 'function')) {
12911
- _context.next = 5;
12912
- break;
12913
- }
12914
- _context.next = 4;
12915
- return _this2.beforeClose();
12916
- case 4:
12917
- shouldClose = _context.sent;
12918
- case 5:
12919
- if (!shouldClose) {
12920
- _context.next = 17;
12921
- break;
12922
- }
12923
- _this2.visible = false;
12924
- typeof _this2.onClose === 'function' && _this2.onClose();
12925
- _this2.$emit('input', false);
12926
- _this2.$emit('cancel');
12927
- _context.t0 = type;
12928
- _context.next = _context.t0 === 'cancel' ? 13 : _context.t0 === 'close' ? 15 : 17;
13034
+ while (1) switch (_context.prev = _context.next) {
13035
+ case 0:
13036
+ shouldClose = true;
13037
+ if (!(typeof _this2.beforeClose === 'function')) {
13038
+ _context.next = 5;
13039
+ break;
13040
+ }
13041
+ _context.next = 4;
13042
+ return _this2.beforeClose();
13043
+ case 4:
13044
+ shouldClose = _context.sent;
13045
+ case 5:
13046
+ if (!shouldClose) {
13047
+ _context.next = 17;
12929
13048
  break;
12930
- case 13:
13049
+ }
13050
+ _this2.visible = false;
13051
+ typeof _this2.onClose === 'function' && _this2.onClose();
13052
+ _this2.$emit('input', false);
13053
+ _this2.$emit('cancel');
13054
+ _context.t0 = type;
13055
+ _context.next = _context.t0 === 'cancel' ? 13 : _context.t0 === 'close' ? 15 : 17;
13056
+ break;
13057
+ case 13:
13058
+ typeof _this2.cancelFn === 'function' && _this2.cancelFn(_this2);
13059
+ return _context.abrupt("break", 17);
13060
+ case 15:
13061
+ if (_this2.closeFn) {
13062
+ typeof _this2.closeFn === 'function' && _this2.closeFn(_this2);
13063
+ } else {
12931
13064
  typeof _this2.cancelFn === 'function' && _this2.cancelFn(_this2);
12932
- return _context.abrupt("break", 17);
12933
- case 15:
12934
- if (_this2.closeFn) {
12935
- typeof _this2.closeFn === 'function' && _this2.closeFn(_this2);
12936
- } else {
12937
- typeof _this2.cancelFn === 'function' && _this2.cancelFn(_this2);
12938
- }
12939
- return _context.abrupt("break", 17);
12940
- case 17:
12941
- case "end":
12942
- return _context.stop();
12943
- }
13065
+ }
13066
+ return _context.abrupt("break", 17);
13067
+ case 17:
13068
+ case "end":
13069
+ return _context.stop();
12944
13070
  }
12945
13071
  }, _callee);
12946
13072
  }))();
@@ -12961,57 +13087,55 @@
12961
13087
  this.$emit('confirm');
12962
13088
  this.$nextTick( _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
12963
13089
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
12964
- while (1) {
12965
- switch (_context2.prev = _context2.next) {
12966
- case 0:
12967
- if (!_this3.loading) {
12968
- _context2.next = 4;
12969
- break;
12970
- }
12971
- _this3.buttonLoading = true;
12972
- _context2.next = 24;
12973
- break;
12974
- case 4:
12975
- if (!(typeof _this3.confirmFn === 'function')) {
12976
- _context2.next = 23;
12977
- break;
12978
- }
12979
- if (!_this3.confirmLoading) {
12980
- _context2.next = 20;
12981
- break;
12982
- }
12983
- _context2.prev = 6;
12984
- _this3.buttonLoading = true;
12985
- _context2.next = 10;
12986
- return _this3.confirmFn(_this3);
12987
- case 10:
12988
- _context2.next = 15;
13090
+ while (1) switch (_context2.prev = _context2.next) {
13091
+ case 0:
13092
+ if (!_this3.loading) {
13093
+ _context2.next = 4;
12989
13094
  break;
12990
- case 12:
12991
- _context2.prev = 12;
12992
- _context2.t0 = _context2["catch"](6);
12993
- console.warn(_context2.t0);
12994
- case 15:
12995
- _context2.prev = 15;
12996
- _this3.buttonLoading = false;
12997
- return _context2.finish(15);
12998
- case 18:
12999
- _context2.next = 21;
13095
+ }
13096
+ _this3.buttonLoading = true;
13097
+ _context2.next = 24;
13098
+ break;
13099
+ case 4:
13100
+ if (!(typeof _this3.confirmFn === 'function')) {
13101
+ _context2.next = 23;
13000
13102
  break;
13001
- case 20:
13002
- _this3.confirmFn(_this3);
13003
- case 21:
13004
- _context2.next = 24;
13103
+ }
13104
+ if (!_this3.confirmLoading) {
13105
+ _context2.next = 20;
13005
13106
  break;
13006
- case 23:
13007
- if (_this3.autoClose) {
13008
- _this3.visible = false;
13009
- _this3.$emit('input', false);
13010
- }
13011
- case 24:
13012
- case "end":
13013
- return _context2.stop();
13014
- }
13107
+ }
13108
+ _context2.prev = 6;
13109
+ _this3.buttonLoading = true;
13110
+ _context2.next = 10;
13111
+ return _this3.confirmFn(_this3);
13112
+ case 10:
13113
+ _context2.next = 15;
13114
+ break;
13115
+ case 12:
13116
+ _context2.prev = 12;
13117
+ _context2.t0 = _context2["catch"](6);
13118
+ console.warn(_context2.t0);
13119
+ case 15:
13120
+ _context2.prev = 15;
13121
+ _this3.buttonLoading = false;
13122
+ return _context2.finish(15);
13123
+ case 18:
13124
+ _context2.next = 21;
13125
+ break;
13126
+ case 20:
13127
+ _this3.confirmFn(_this3);
13128
+ case 21:
13129
+ _context2.next = 24;
13130
+ break;
13131
+ case 23:
13132
+ if (_this3.autoClose) {
13133
+ _this3.visible = false;
13134
+ _this3.$emit('input', false);
13135
+ }
13136
+ case 24:
13137
+ case "end":
13138
+ return _context2.stop();
13015
13139
  }
13016
13140
  }, _callee2, null, [[6, 12, 15, 18]]);
13017
13141
  })));
@@ -28664,60 +28788,58 @@
28664
28788
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
28665
28789
  var result;
28666
28790
  return _regeneratorRuntime().wrap(function _callee$(_context) {
28667
- while (1) {
28668
- switch (_context.prev = _context.next) {
28669
- case 0:
28670
- if (!(rule.required && isEmpty(model))) {
28671
- _context.next = 2;
28672
- break;
28673
- }
28674
- return _context.abrupt("return", false);
28675
- case 2:
28676
- if (!(rule.regex && !rule.regex.test(model))) {
28677
- _context.next = 4;
28678
- break;
28679
- }
28680
- return _context.abrupt("return", false);
28681
- case 4:
28682
- if (!(rule.min && isString(model) && model.length < rule.min)) {
28683
- _context.next = 6;
28684
- break;
28685
- }
28686
- return _context.abrupt("return", false);
28687
- case 6:
28688
- if (!(rule.max && isString(model) && model.length > rule.max)) {
28689
- _context.next = 8;
28690
- break;
28691
- }
28692
- return _context.abrupt("return", false);
28693
- case 8:
28694
- if (!(rule.min && isNumber(model) && model < rule.min)) {
28695
- _context.next = 10;
28696
- break;
28697
- }
28698
- return _context.abrupt("return", false);
28699
- case 10:
28700
- if (!(rule.max && isNumber(model) && model > rule.max)) {
28701
- _context.next = 12;
28702
- break;
28703
- }
28704
- return _context.abrupt("return", false);
28705
- case 12:
28706
- if (!(rule.validator && typeof rule.validator === 'function')) {
28707
- _context.next = 17;
28708
- break;
28709
- }
28710
- _context.next = 15;
28711
- return rule.validator(model);
28712
- case 15:
28713
- result = _context.sent;
28714
- return _context.abrupt("return", result);
28715
- case 17:
28716
- return _context.abrupt("return", true);
28717
- case 18:
28718
- case "end":
28719
- return _context.stop();
28720
- }
28791
+ while (1) switch (_context.prev = _context.next) {
28792
+ case 0:
28793
+ if (!(rule.required && isEmpty(model))) {
28794
+ _context.next = 2;
28795
+ break;
28796
+ }
28797
+ return _context.abrupt("return", false);
28798
+ case 2:
28799
+ if (!(rule.regex && !rule.regex.test(model))) {
28800
+ _context.next = 4;
28801
+ break;
28802
+ }
28803
+ return _context.abrupt("return", false);
28804
+ case 4:
28805
+ if (!(rule.min && isString(model) && model.length < rule.min)) {
28806
+ _context.next = 6;
28807
+ break;
28808
+ }
28809
+ return _context.abrupt("return", false);
28810
+ case 6:
28811
+ if (!(rule.max && isString(model) && model.length > rule.max)) {
28812
+ _context.next = 8;
28813
+ break;
28814
+ }
28815
+ return _context.abrupt("return", false);
28816
+ case 8:
28817
+ if (!(rule.min && isNumber(model) && model < rule.min)) {
28818
+ _context.next = 10;
28819
+ break;
28820
+ }
28821
+ return _context.abrupt("return", false);
28822
+ case 10:
28823
+ if (!(rule.max && isNumber(model) && model > rule.max)) {
28824
+ _context.next = 12;
28825
+ break;
28826
+ }
28827
+ return _context.abrupt("return", false);
28828
+ case 12:
28829
+ if (!(rule.validator && typeof rule.validator === 'function')) {
28830
+ _context.next = 17;
28831
+ break;
28832
+ }
28833
+ _context.next = 15;
28834
+ return rule.validator(model);
28835
+ case 15:
28836
+ result = _context.sent;
28837
+ return _context.abrupt("return", result);
28838
+ case 17:
28839
+ return _context.abrupt("return", true);
28840
+ case 18:
28841
+ case "end":
28842
+ return _context.stop();
28721
28843
  }
28722
28844
  }, _callee);
28723
28845
  }))();
@@ -28755,30 +28877,28 @@
28755
28877
  var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee2(resolve, reject) {
28756
28878
  var curRule, result;
28757
28879
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
28758
- while (1) {
28759
- switch (_context2.prev = _context2.next) {
28760
- case 0:
28761
- curRule = rule;
28762
- _context2.prev = 1;
28763
- _context2.next = 4;
28764
- return self.checkRule(curRule, model);
28765
- case 4:
28766
- result = _context2.sent;
28767
- if (result) {
28768
- resolve(curRule);
28769
- } else {
28770
- reject(curRule);
28771
- }
28772
- _context2.next = 11;
28773
- break;
28774
- case 8:
28775
- _context2.prev = 8;
28776
- _context2.t0 = _context2["catch"](1);
28880
+ while (1) switch (_context2.prev = _context2.next) {
28881
+ case 0:
28882
+ curRule = rule;
28883
+ _context2.prev = 1;
28884
+ _context2.next = 4;
28885
+ return self.checkRule(curRule, model);
28886
+ case 4:
28887
+ result = _context2.sent;
28888
+ if (result) {
28889
+ resolve(curRule);
28890
+ } else {
28777
28891
  reject(curRule);
28778
- case 11:
28779
- case "end":
28780
- return _context2.stop();
28781
- }
28892
+ }
28893
+ _context2.next = 11;
28894
+ break;
28895
+ case 8:
28896
+ _context2.prev = 8;
28897
+ _context2.t0 = _context2["catch"](1);
28898
+ reject(curRule);
28899
+ case 11:
28900
+ case "end":
28901
+ return _context2.stop();
28782
28902
  }
28783
28903
  }, _callee2, null, [[1, 8]]);
28784
28904
  }));
@@ -29018,26 +29138,24 @@
29018
29138
  instance.confirmFn = opts.confirmFn && typeof opts.confirmFn === 'function' ? _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
29019
29139
  var res;
29020
29140
  return _regeneratorRuntime().wrap(function _callee$(_context) {
29021
- while (1) {
29022
- switch (_context.prev = _context.next) {
29023
- case 0:
29024
- instance.closeIcon = false;
29025
- _context.next = 3;
29026
- return opts.confirmFn(instance);
29027
- case 3:
29028
- res = _context.sent;
29029
- instance.closeIcon = opts.closeIcon !== false;
29030
- if (!(!res && typeof res !== 'undefined')) {
29031
- _context.next = 7;
29032
- break;
29033
- }
29034
- return _context.abrupt("return");
29035
- case 7:
29036
- Info.close(id);
29037
- case 8:
29038
- case "end":
29039
- return _context.stop();
29040
- }
29141
+ while (1) switch (_context.prev = _context.next) {
29142
+ case 0:
29143
+ instance.closeIcon = false;
29144
+ _context.next = 3;
29145
+ return opts.confirmFn(instance);
29146
+ case 3:
29147
+ res = _context.sent;
29148
+ instance.closeIcon = opts.closeIcon !== false;
29149
+ if (!(!res && typeof res !== 'undefined')) {
29150
+ _context.next = 7;
29151
+ break;
29152
+ }
29153
+ return _context.abrupt("return");
29154
+ case 7:
29155
+ Info.close(id);
29156
+ case 8:
29157
+ case "end":
29158
+ return _context.stop();
29041
29159
  }
29042
29160
  }, _callee);
29043
29161
  })) : function () {
@@ -29076,7 +29194,7 @@
29076
29194
  };
29077
29195
  Info.close = function (id, optsClose) {
29078
29196
  var len = instancesList.length;
29079
- var _loop = function _loop(index) {
29197
+ var _loop = function _loop() {
29080
29198
  var targetInstance = instancesList[index];
29081
29199
  if (id === targetInstance.id) {
29082
29200
  targetInstance.value = false;
@@ -29091,7 +29209,7 @@
29091
29209
  }
29092
29210
  };
29093
29211
  for (var index = 0; index < len; index++) {
29094
- var _ret = _loop(index);
29212
+ var _ret = _loop();
29095
29213
  if (_ret === "break") break;
29096
29214
  }
29097
29215
  };
@@ -33835,28 +33953,26 @@
33835
33953
  var _this11 = this;
33836
33954
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
33837
33955
  return _regeneratorRuntime().wrap(function _callee$(_context) {
33838
- while (1) {
33839
- switch (_context.prev = _context.next) {
33840
- case 0:
33841
- _context.prev = 0;
33842
- _this11.searchLoading = true;
33843
- _context.next = 4;
33844
- return _this11.remoteMethod(_this11.searchValue);
33845
- case 4:
33846
- _context.next = 9;
33847
- break;
33848
- case 6:
33849
- _context.prev = 6;
33850
- _context.t0 = _context["catch"](0);
33851
- console.error(_context.t0);
33852
- case 9:
33853
- _context.prev = 9;
33854
- _this11.searchLoading = false;
33855
- return _context.finish(9);
33856
- case 12:
33857
- case "end":
33858
- return _context.stop();
33859
- }
33956
+ while (1) switch (_context.prev = _context.next) {
33957
+ case 0:
33958
+ _context.prev = 0;
33959
+ _this11.searchLoading = true;
33960
+ _context.next = 4;
33961
+ return _this11.remoteMethod(_this11.searchValue);
33962
+ case 4:
33963
+ _context.next = 9;
33964
+ break;
33965
+ case 6:
33966
+ _context.prev = 6;
33967
+ _context.t0 = _context["catch"](0);
33968
+ console.error(_context.t0);
33969
+ case 9:
33970
+ _context.prev = 9;
33971
+ _this11.searchLoading = false;
33972
+ return _context.finish(9);
33973
+ case 12:
33974
+ case "end":
33975
+ return _context.stop();
33860
33976
  }
33861
33977
  }, _callee, null, [[0, 6, 9, 12]]);
33862
33978
  }))();
@@ -36539,29 +36655,27 @@
36539
36655
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
36540
36656
  var shouldClose;
36541
36657
  return _regeneratorRuntime().wrap(function _callee$(_context) {
36542
- while (1) {
36543
- switch (_context.prev = _context.next) {
36544
- case 0:
36545
- shouldClose = true;
36546
- if (!(typeof _this2.beforeClose === 'function')) {
36547
- _context.next = 5;
36548
- break;
36549
- }
36550
- _context.next = 4;
36551
- return _this2.beforeClose();
36552
- case 4:
36553
- shouldClose = _context.sent;
36554
- case 5:
36555
- if (shouldClose) {
36556
- _this2.$emit('update:isShow', false);
36557
- setTimeout(function () {
36558
- _this2.$emit('animation-end');
36559
- }, 250);
36560
- }
36561
- case 6:
36562
- case "end":
36563
- return _context.stop();
36564
- }
36658
+ while (1) switch (_context.prev = _context.next) {
36659
+ case 0:
36660
+ shouldClose = true;
36661
+ if (!(typeof _this2.beforeClose === 'function')) {
36662
+ _context.next = 5;
36663
+ break;
36664
+ }
36665
+ _context.next = 4;
36666
+ return _this2.beforeClose();
36667
+ case 4:
36668
+ shouldClose = _context.sent;
36669
+ case 5:
36670
+ if (shouldClose) {
36671
+ _this2.$emit('update:isShow', false);
36672
+ setTimeout(function () {
36673
+ _this2.$emit('animation-end');
36674
+ }, 250);
36675
+ }
36676
+ case 6:
36677
+ case "end":
36678
+ return _context.stop();
36565
36679
  }
36566
36680
  }, _callee);
36567
36681
  }))();
@@ -37602,56 +37716,52 @@
37602
37716
  var _this = this;
37603
37717
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
37604
37718
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
37605
- while (1) {
37606
- switch (_context2.prev = _context2.next) {
37607
- case 0:
37608
- _context2.prev = 0;
37609
- if (!(_this.controllable && index !== _this.curStep)) {
37610
- _context2.next = 7;
37611
- break;
37612
- }
37613
- if (!(typeof _this.beforeChange === 'function')) {
37614
- _context2.next = 5;
37615
- break;
37616
- }
37719
+ while (1) switch (_context2.prev = _context2.next) {
37720
+ case 0:
37721
+ _context2.prev = 0;
37722
+ if (!(_this.controllable && index !== _this.curStep)) {
37723
+ _context2.next = 7;
37724
+ break;
37725
+ }
37726
+ if (!(typeof _this.beforeChange === 'function')) {
37617
37727
  _context2.next = 5;
37618
- return new promise$1( function () {
37619
- var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(resolve, reject) {
37620
- var confirmed;
37621
- return _regeneratorRuntime().wrap(function _callee$(_context) {
37622
- while (1) {
37623
- switch (_context.prev = _context.next) {
37624
- case 0:
37625
- _context.next = 2;
37626
- return _this.beforeChange(index);
37627
- case 2:
37628
- confirmed = _context.sent;
37629
- confirmed ? resolve(confirmed) : reject(confirmed);
37630
- case 4:
37631
- case "end":
37632
- return _context.stop();
37633
- }
37634
- }
37635
- }, _callee);
37636
- }));
37637
- return function (_x, _x2) {
37638
- return _ref.apply(this, arguments);
37639
- };
37640
- }());
37641
- case 5:
37642
- _this.$emit('update:curStep', index);
37643
- _this.$emit('step-changed', index);
37644
- case 7:
37645
- _context2.next = 12;
37646
37728
  break;
37647
- case 9:
37648
- _context2.prev = 9;
37649
- _context2.t0 = _context2["catch"](0);
37650
- console.warn(_context2.t0);
37651
- case 12:
37652
- case "end":
37653
- return _context2.stop();
37654
- }
37729
+ }
37730
+ _context2.next = 5;
37731
+ return new promise$1( function () {
37732
+ var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(resolve, reject) {
37733
+ var confirmed;
37734
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
37735
+ while (1) switch (_context.prev = _context.next) {
37736
+ case 0:
37737
+ _context.next = 2;
37738
+ return _this.beforeChange(index);
37739
+ case 2:
37740
+ confirmed = _context.sent;
37741
+ confirmed ? resolve(confirmed) : reject(confirmed);
37742
+ case 4:
37743
+ case "end":
37744
+ return _context.stop();
37745
+ }
37746
+ }, _callee);
37747
+ }));
37748
+ return function (_x, _x2) {
37749
+ return _ref.apply(this, arguments);
37750
+ };
37751
+ }());
37752
+ case 5:
37753
+ _this.$emit('update:curStep', index);
37754
+ _this.$emit('step-changed', index);
37755
+ case 7:
37756
+ _context2.next = 12;
37757
+ break;
37758
+ case 9:
37759
+ _context2.prev = 9;
37760
+ _context2.t0 = _context2["catch"](0);
37761
+ console.warn(_context2.t0);
37762
+ case 12:
37763
+ case "end":
37764
+ return _context2.stop();
37655
37765
  }
37656
37766
  }, _callee2, null, [[0, 9]]);
37657
37767
  }))();
@@ -38269,93 +38379,89 @@
38269
38379
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
38270
38380
  var toggleStatus, shouldToggle;
38271
38381
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
38272
- while (1) {
38273
- switch (_context2.prev = _context2.next) {
38274
- case 0:
38275
- if (!panel.disabled) {
38276
- _context2.next = 2;
38277
- break;
38278
- }
38279
- return _context2.abrupt("return", false);
38280
- case 2:
38281
- _this3.handleClearHoverTimer();
38282
- toggleStatus = _this3.promise.toggle;
38283
- if (!(panel.name === _this3.localActive)) {
38284
- _context2.next = 7;
38285
- break;
38286
- }
38287
- if (toggleStatus.rejector) {
38288
- toggleStatus.rejector(false);
38289
- }
38290
- return _context2.abrupt("return", false);
38291
- case 7:
38292
- if (!(typeof _this3.beforeToggle === 'function')) {
38293
- _context2.next = 29;
38294
- break;
38295
- }
38296
- if (!toggleStatus.previousPanel) {
38297
- _context2.next = 14;
38298
- break;
38299
- }
38300
- if (!(toggleStatus.previousPanel === panel)) {
38301
- _context2.next = 13;
38302
- break;
38303
- }
38304
- return _context2.abrupt("return", false);
38305
- case 13:
38382
+ while (1) switch (_context2.prev = _context2.next) {
38383
+ case 0:
38384
+ if (!panel.disabled) {
38385
+ _context2.next = 2;
38386
+ break;
38387
+ }
38388
+ return _context2.abrupt("return", false);
38389
+ case 2:
38390
+ _this3.handleClearHoverTimer();
38391
+ toggleStatus = _this3.promise.toggle;
38392
+ if (!(panel.name === _this3.localActive)) {
38393
+ _context2.next = 7;
38394
+ break;
38395
+ }
38396
+ if (toggleStatus.rejector) {
38306
38397
  toggleStatus.rejector(false);
38307
- case 14:
38308
- _context2.prev = 14;
38309
- _context2.next = 17;
38310
- return new promise$1( function () {
38311
- var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(resolve, reject) {
38312
- var confirmed;
38313
- return _regeneratorRuntime().wrap(function _callee$(_context) {
38314
- while (1) {
38315
- switch (_context.prev = _context.next) {
38316
- case 0:
38317
- toggleStatus.previousPanel = panel;
38318
- toggleStatus.rejector = reject;
38319
- _context.next = 4;
38320
- return _this3.beforeToggle(panel.name, panel);
38321
- case 4:
38322
- confirmed = _context.sent;
38323
- confirmed ? resolve(confirmed) : reject(confirmed);
38324
- case 6:
38325
- case "end":
38326
- return _context.stop();
38327
- }
38328
- }
38329
- }, _callee);
38330
- }));
38331
- return function (_x, _x2) {
38332
- return _ref.apply(this, arguments);
38333
- };
38334
- }());
38335
- case 17:
38336
- shouldToggle = _context2.sent;
38337
- if (shouldToggle) {
38338
- _this3.localActive = panel.name;
38339
- }
38340
- _context2.next = 24;
38398
+ }
38399
+ return _context2.abrupt("return", false);
38400
+ case 7:
38401
+ if (!(typeof _this3.beforeToggle === 'function')) {
38402
+ _context2.next = 29;
38341
38403
  break;
38342
- case 21:
38343
- _context2.prev = 21;
38344
- _context2.t0 = _context2["catch"](14);
38345
- console.warn('Previous tab toggle canceled');
38346
- case 24:
38347
- _context2.prev = 24;
38348
- _this3.clearToggleStatus();
38349
- return _context2.finish(24);
38350
- case 27:
38351
- _context2.next = 30;
38404
+ }
38405
+ if (!toggleStatus.previousPanel) {
38406
+ _context2.next = 14;
38352
38407
  break;
38353
- case 29:
38408
+ }
38409
+ if (!(toggleStatus.previousPanel === panel)) {
38410
+ _context2.next = 13;
38411
+ break;
38412
+ }
38413
+ return _context2.abrupt("return", false);
38414
+ case 13:
38415
+ toggleStatus.rejector(false);
38416
+ case 14:
38417
+ _context2.prev = 14;
38418
+ _context2.next = 17;
38419
+ return new promise$1( function () {
38420
+ var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(resolve, reject) {
38421
+ var confirmed;
38422
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
38423
+ while (1) switch (_context.prev = _context.next) {
38424
+ case 0:
38425
+ toggleStatus.previousPanel = panel;
38426
+ toggleStatus.rejector = reject;
38427
+ _context.next = 4;
38428
+ return _this3.beforeToggle(panel.name, panel);
38429
+ case 4:
38430
+ confirmed = _context.sent;
38431
+ confirmed ? resolve(confirmed) : reject(confirmed);
38432
+ case 6:
38433
+ case "end":
38434
+ return _context.stop();
38435
+ }
38436
+ }, _callee);
38437
+ }));
38438
+ return function (_x, _x2) {
38439
+ return _ref.apply(this, arguments);
38440
+ };
38441
+ }());
38442
+ case 17:
38443
+ shouldToggle = _context2.sent;
38444
+ if (shouldToggle) {
38354
38445
  _this3.localActive = panel.name;
38355
- case 30:
38356
- case "end":
38357
- return _context2.stop();
38358
- }
38446
+ }
38447
+ _context2.next = 24;
38448
+ break;
38449
+ case 21:
38450
+ _context2.prev = 21;
38451
+ _context2.t0 = _context2["catch"](14);
38452
+ console.warn('Previous tab toggle canceled');
38453
+ case 24:
38454
+ _context2.prev = 24;
38455
+ _this3.clearToggleStatus();
38456
+ return _context2.finish(24);
38457
+ case 27:
38458
+ _context2.next = 30;
38459
+ break;
38460
+ case 29:
38461
+ _this3.localActive = panel.name;
38462
+ case 30:
38463
+ case "end":
38464
+ return _context2.stop();
38359
38465
  }
38360
38466
  }, _callee2, null, [[14, 21, 24, 27]]);
38361
38467
  }))();
@@ -39308,19 +39414,17 @@
39308
39414
  setTimeout( _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
39309
39415
  var result;
39310
39416
  return _regeneratorRuntime().wrap(function _callee$(_context) {
39311
- while (1) {
39312
- switch (_context.prev = _context.next) {
39313
- case 0:
39314
- promise = null;
39315
- _context.next = 3;
39316
- return handler.apply(void 0, _toConsumableArray(_arguments));
39317
- case 3:
39318
- result = _context.sent;
39319
- resolve(result);
39320
- case 5:
39321
- case "end":
39322
- return _context.stop();
39323
- }
39417
+ while (1) switch (_context.prev = _context.next) {
39418
+ case 0:
39419
+ promise = null;
39420
+ _context.next = 3;
39421
+ return handler.apply(void 0, _toConsumableArray(_arguments));
39422
+ case 3:
39423
+ result = _context.sent;
39424
+ resolve(result);
39425
+ case 5:
39426
+ case "end":
39427
+ return _context.stop();
39324
39428
  }
39325
39429
  }, _callee);
39326
39430
  })), 0);
@@ -41005,30 +41109,28 @@
41005
41109
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
41006
41110
  var row, event, column, result;
41007
41111
  return _regeneratorRuntime().wrap(function _callee$(_context) {
41008
- while (1) {
41009
- switch (_context.prev = _context.next) {
41010
- case 0:
41011
- row = data.row, event = data.event, column = data.column;
41012
- event.stopPropagation();
41013
- if (!(typeof column.beforeExpandChange === 'function')) {
41014
- _context.next = 8;
41015
- break;
41016
- }
41017
- _context.next = 5;
41018
- return column.beforeExpandChange(data);
41019
- case 5:
41020
- result = _context.sent;
41021
- if (result) {
41022
- _context.next = 8;
41023
- break;
41024
- }
41025
- return _context.abrupt("return", false);
41026
- case 8:
41027
- _this3.store.toggleRowExpansion(row);
41028
- case 9:
41029
- case "end":
41030
- return _context.stop();
41031
- }
41112
+ while (1) switch (_context.prev = _context.next) {
41113
+ case 0:
41114
+ row = data.row, event = data.event, column = data.column;
41115
+ event.stopPropagation();
41116
+ if (!(typeof column.beforeExpandChange === 'function')) {
41117
+ _context.next = 8;
41118
+ break;
41119
+ }
41120
+ _context.next = 5;
41121
+ return column.beforeExpandChange(data);
41122
+ case 5:
41123
+ result = _context.sent;
41124
+ if (result) {
41125
+ _context.next = 8;
41126
+ break;
41127
+ }
41128
+ return _context.abrupt("return", false);
41129
+ case 8:
41130
+ _this3.store.toggleRowExpansion(row);
41131
+ case 9:
41132
+ case "end":
41133
+ return _context.stop();
41032
41134
  }
41033
41135
  }, _callee);
41034
41136
  }))();
@@ -42990,27 +43092,25 @@
42990
43092
  var _click = _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
42991
43093
  var result;
42992
43094
  return _regeneratorRuntime().wrap(function _callee$(_context) {
42993
- while (1) {
42994
- switch (_context.prev = _context.next) {
42995
- case 0:
42996
- _context.next = 2;
42997
- return column.beforeSelectAllChange(_this.isAllSelected, {
42998
- column: column,
42999
- store: store
43000
- });
43001
- case 2:
43002
- result = _context.sent;
43003
- if (!(result === false)) {
43004
- _context.next = 5;
43005
- break;
43006
- }
43007
- return _context.abrupt("return");
43008
- case 5:
43009
- _this.toggleAllSelection();
43010
- case 6:
43011
- case "end":
43012
- return _context.stop();
43013
- }
43095
+ while (1) switch (_context.prev = _context.next) {
43096
+ case 0:
43097
+ _context.next = 2;
43098
+ return column.beforeSelectAllChange(_this.isAllSelected, {
43099
+ column: column,
43100
+ store: store
43101
+ });
43102
+ case 2:
43103
+ result = _context.sent;
43104
+ if (!(result === false)) {
43105
+ _context.next = 5;
43106
+ break;
43107
+ }
43108
+ return _context.abrupt("return");
43109
+ case 5:
43110
+ _this.toggleAllSelection();
43111
+ case 6:
43112
+ case "end":
43113
+ return _context.stop();
43014
43114
  }
43015
43115
  }, _callee);
43016
43116
  }));
@@ -43046,30 +43146,28 @@
43046
43146
  var _click2 = _asyncToGenerator( _regeneratorRuntime().mark(function _callee2(event) {
43047
43147
  var result;
43048
43148
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
43049
- while (1) {
43050
- switch (_context2.prev = _context2.next) {
43051
- case 0:
43052
- event.stopPropagation();
43053
- if (!disabled) {
43054
- _context2.next = 3;
43055
- break;
43056
- }
43057
- return _context2.abrupt("return");
43058
- case 3:
43059
- _context2.next = 5;
43060
- return column.beforeSelectChange(store.isSelected(row), {
43061
- row: row,
43062
- column: column,
43063
- store: store,
43064
- $index: $index
43065
- });
43066
- case 5:
43067
- result = _context2.sent;
43068
- result !== false && store.commit('rowSelectedChanged', row);
43069
- case 7:
43070
- case "end":
43071
- return _context2.stop();
43072
- }
43149
+ while (1) switch (_context2.prev = _context2.next) {
43150
+ case 0:
43151
+ event.stopPropagation();
43152
+ if (!disabled) {
43153
+ _context2.next = 3;
43154
+ break;
43155
+ }
43156
+ return _context2.abrupt("return");
43157
+ case 3:
43158
+ _context2.next = 5;
43159
+ return column.beforeSelectChange(store.isSelected(row), {
43160
+ row: row,
43161
+ column: column,
43162
+ store: store,
43163
+ $index: $index
43164
+ });
43165
+ case 5:
43166
+ result = _context2.sent;
43167
+ result !== false && store.commit('rowSelectedChanged', row);
43168
+ case 7:
43169
+ case "end":
43170
+ return _context2.stop();
43073
43171
  }
43074
43172
  }, _callee2);
43075
43173
  }));
@@ -44491,15 +44589,13 @@
44491
44589
  this.showScrollLoading = true;
44492
44590
  setTimeout( _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
44493
44591
  return _regeneratorRuntime().wrap(function _callee$(_context) {
44494
- while (1) {
44495
- switch (_context.prev = _context.next) {
44496
- case 0:
44497
- _context.next = 2;
44498
- return _this4.pageChange(curPage);
44499
- case 2:
44500
- case "end":
44501
- return _context.stop();
44502
- }
44592
+ while (1) switch (_context.prev = _context.next) {
44593
+ case 0:
44594
+ _context.next = 2;
44595
+ return _this4.pageChange(curPage);
44596
+ case 2:
44597
+ case "end":
44598
+ return _context.stop();
44503
44599
  }
44504
44600
  }, _callee);
44505
44601
  })), 500);
@@ -47494,59 +47590,57 @@
47494
47590
  var _ref = _asyncToGenerator( _regeneratorRuntime().mark(function _callee(options) {
47495
47591
  var chunkSize, file, blockCount, hash, progressList;
47496
47592
  return _regeneratorRuntime().wrap(function _callee$(_context) {
47497
- while (1) {
47498
- switch (_context.prev = _context.next) {
47499
- case 0:
47500
- chunkSize = options.chunkSize * 1024 * 1024;
47501
- file = options.fileObj.origin;
47502
- if (file) {
47503
- _context.next = 5;
47504
- break;
47505
- }
47506
- _this.$bkMessage({
47507
- theme: 'warning',
47508
- message: '没有获取到文件',
47509
- offsetY: 80
47510
- });
47511
- return _context.abrupt("return");
47512
- case 5:
47513
- blockCount = Math.ceil(file.size / chunkSize);
47514
- _context.next = 8;
47515
- return hashFile(file, chunkSize);
47516
- case 8:
47517
- hash = _context.sent;
47518
- progressList = [];
47519
- sliceUpload(options, file, blockCount, hash, progressList, chunkSize);
47520
- _context.next = 13;
47521
- return promise$1.all(progressList).then(function () {
47522
- var data = {
47523
- size: file.size,
47524
- name: file.name,
47525
- total: blockCount,
47526
- hash: hash
47527
- };
47528
- var req = new XMLHttpRequest();
47529
- req.open(options.method, options.mergeUrl, true);
47530
- req.onreadystatechange = function () {
47531
- if (req.readyState === 4) {
47532
- var reponseText = parseResponse(req.responseText || req.response);
47533
- if (req.status < 200 || req.status >= 300) {
47534
- options.fileObj.progress = 100 + '%';
47535
- options.fileObj.errorMsg = reponseText.message || _t('bk.uploadFile.uploadFailed');
47536
- options.onError(options.fileObj, options.fileList, req.response);
47537
- } else {
47538
- options.onSuccess(reponseText, options.fileObj);
47539
- }
47540
- options.onDone(options.fileObj);
47593
+ while (1) switch (_context.prev = _context.next) {
47594
+ case 0:
47595
+ chunkSize = options.chunkSize * 1024 * 1024;
47596
+ file = options.fileObj.origin;
47597
+ if (file) {
47598
+ _context.next = 5;
47599
+ break;
47600
+ }
47601
+ _this.$bkMessage({
47602
+ theme: 'warning',
47603
+ message: '没有获取到文件',
47604
+ offsetY: 80
47605
+ });
47606
+ return _context.abrupt("return");
47607
+ case 5:
47608
+ blockCount = Math.ceil(file.size / chunkSize);
47609
+ _context.next = 8;
47610
+ return hashFile(file, chunkSize);
47611
+ case 8:
47612
+ hash = _context.sent;
47613
+ progressList = [];
47614
+ sliceUpload(options, file, blockCount, hash, progressList, chunkSize);
47615
+ _context.next = 13;
47616
+ return promise$1.all(progressList).then(function () {
47617
+ var data = {
47618
+ size: file.size,
47619
+ name: file.name,
47620
+ total: blockCount,
47621
+ hash: hash
47622
+ };
47623
+ var req = new XMLHttpRequest();
47624
+ req.open(options.method, options.mergeUrl, true);
47625
+ req.onreadystatechange = function () {
47626
+ if (req.readyState === 4) {
47627
+ var reponseText = parseResponse(req.responseText || req.response);
47628
+ if (req.status < 200 || req.status >= 300) {
47629
+ options.fileObj.progress = 100 + '%';
47630
+ options.fileObj.errorMsg = reponseText.message || _t('bk.uploadFile.uploadFailed');
47631
+ options.onError(options.fileObj, options.fileList, req.response);
47632
+ } else {
47633
+ options.onSuccess(reponseText, options.fileObj);
47541
47634
  }
47542
- };
47543
- req.setRequestHeader('Content-type', 'application/JSON');
47544
- req.send(stringify$1(data));
47545
- });
47546
- case 13:
47547
- case "end":
47548
- return _context.stop();
47549
- }
47635
+ options.onDone(options.fileObj);
47636
+ }
47637
+ };
47638
+ req.setRequestHeader('Content-type', 'application/JSON');
47639
+ req.send(stringify$1(data));
47640
+ });
47641
+ case 13:
47642
+ case "end":
47643
+ return _context.stop();
47550
47644
  }
47551
47645
  }, _callee);
47552
47646
  }));
@@ -51758,53 +51852,51 @@
51758
51852
  var _this3 = this;
51759
51853
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
51760
51854
  return _regeneratorRuntime().wrap(function _callee$(_context) {
51761
- while (1) {
51762
- switch (_context.prev = _context.next) {
51763
- case 0:
51764
- _this3.dialog.show = v;
51765
- if (!v) {
51766
- _context.next = 20;
51767
- break;
51768
- }
51769
- _this3.dialog.width = window.innerWidth >= 1920 ? 1110 : 850;
51770
- _this3.dialog.height = window.innerWidth >= 1920 ? 640 : 520;
51771
- _this3.loading = true;
51772
- _context.t0 = !_this3.versionList.length && typeof _this3.getVersionList === 'function';
51773
- if (!_context.t0) {
51774
- _context.next = 9;
51775
- break;
51776
- }
51855
+ while (1) switch (_context.prev = _context.next) {
51856
+ case 0:
51857
+ _this3.dialog.show = v;
51858
+ if (!v) {
51859
+ _context.next = 20;
51860
+ break;
51861
+ }
51862
+ _this3.dialog.width = window.innerWidth >= 1920 ? 1110 : 850;
51863
+ _this3.dialog.height = window.innerWidth >= 1920 ? 640 : 520;
51864
+ _this3.loading = true;
51865
+ _context.t0 = !_this3.versionList.length && typeof _this3.getVersionList === 'function';
51866
+ if (!_context.t0) {
51777
51867
  _context.next = 9;
51778
- return _this3.getVersionList();
51779
- case 9:
51780
- if (!_this3.versionList.length) {
51781
- _context.next = 19;
51782
- break;
51783
- }
51784
- case 10:
51785
- if (!(!_this3.finished && _this3.dialog.height - 40 > _this3.versionList.length * 55)) {
51786
- _context.next = 17;
51787
- break;
51788
- }
51789
- _context.t1 = typeof _this3.getVersionList === 'function';
51790
- if (!_context.t1) {
51791
- _context.next = 15;
51792
- break;
51793
- }
51794
- _context.next = 15;
51795
- return _this3.getVersionList();
51796
- case 15:
51797
- _context.next = 10;
51798
51868
  break;
51799
- case 17:
51869
+ }
51870
+ _context.next = 9;
51871
+ return _this3.getVersionList();
51872
+ case 9:
51873
+ if (!_this3.versionList.length) {
51800
51874
  _context.next = 19;
51801
- return _this3.handleItemClick(_this3.defaultActiveIndex);
51802
- case 19:
51803
- _this3.loading = false;
51804
- case 20:
51805
- case "end":
51806
- return _context.stop();
51807
- }
51875
+ break;
51876
+ }
51877
+ case 10:
51878
+ if (!(!_this3.finished && _this3.dialog.height - 40 > _this3.versionList.length * 55)) {
51879
+ _context.next = 17;
51880
+ break;
51881
+ }
51882
+ _context.t1 = typeof _this3.getVersionList === 'function';
51883
+ if (!_context.t1) {
51884
+ _context.next = 15;
51885
+ break;
51886
+ }
51887
+ _context.next = 15;
51888
+ return _this3.getVersionList();
51889
+ case 15:
51890
+ _context.next = 10;
51891
+ break;
51892
+ case 17:
51893
+ _context.next = 19;
51894
+ return _this3.handleItemClick(_this3.defaultActiveIndex);
51895
+ case 19:
51896
+ _this3.loading = false;
51897
+ case 20:
51898
+ case "end":
51899
+ return _context.stop();
51808
51900
  }
51809
51901
  }, _callee);
51810
51902
  }))();
@@ -51814,39 +51906,37 @@
51814
51906
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
51815
51907
  var el, scrollHeight, scrollTop, clientHeight;
51816
51908
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
51817
- while (1) {
51818
- switch (_context2.prev = _context2.next) {
51819
- case 0:
51820
- el = _this4.$refs.leftList;
51821
- scrollHeight = el.scrollHeight;
51822
- scrollTop = el.scrollTop;
51823
- clientHeight = el.clientHeight;
51824
- if (!(!_this4.finished && clientHeight + scrollTop >= scrollHeight && !_this4.scroll)) {
51825
- _context2.next = 16;
51826
- break;
51827
- }
51828
- _this4.left.scroll = true;
51829
- _this4.left.loading = true;
51830
- _context2.t0 = typeof _this4.getVersionList === 'function';
51831
- if (!_context2.t0) {
51832
- _context2.next = 11;
51833
- break;
51834
- }
51909
+ while (1) switch (_context2.prev = _context2.next) {
51910
+ case 0:
51911
+ el = _this4.$refs.leftList;
51912
+ scrollHeight = el.scrollHeight;
51913
+ scrollTop = el.scrollTop;
51914
+ clientHeight = el.clientHeight;
51915
+ if (!(!_this4.finished && clientHeight + scrollTop >= scrollHeight && !_this4.scroll)) {
51916
+ _context2.next = 16;
51917
+ break;
51918
+ }
51919
+ _this4.left.scroll = true;
51920
+ _this4.left.loading = true;
51921
+ _context2.t0 = typeof _this4.getVersionList === 'function';
51922
+ if (!_context2.t0) {
51835
51923
  _context2.next = 11;
51836
- return _this4.getVersionList().catch(function (_) {
51837
- return false;
51838
- });
51839
- case 11:
51840
- _context2.next = 13;
51841
- return _this4.$nextTick();
51842
- case 13:
51843
- el.scrollTo(0, scrollTop - 100);
51844
- _this4.left.loading = false;
51845
- _this4.left.scroll = false;
51846
- case 16:
51847
- case "end":
51848
- return _context2.stop();
51849
- }
51924
+ break;
51925
+ }
51926
+ _context2.next = 11;
51927
+ return _this4.getVersionList().catch(function (_) {
51928
+ return false;
51929
+ });
51930
+ case 11:
51931
+ _context2.next = 13;
51932
+ return _this4.$nextTick();
51933
+ case 13:
51934
+ el.scrollTo(0, scrollTop - 100);
51935
+ _this4.left.loading = false;
51936
+ _this4.left.scroll = false;
51937
+ case 16:
51938
+ case "end":
51939
+ return _context2.stop();
51850
51940
  }
51851
51941
  }, _callee2);
51852
51942
  }))();
@@ -51856,27 +51946,25 @@
51856
51946
  var v = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
51857
51947
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee3() {
51858
51948
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
51859
- while (1) {
51860
- switch (_context3.prev = _context3.next) {
51861
- case 0:
51862
- _this5.active = v;
51863
- _this5.loading = true;
51864
- _context3.t0 = typeof _this5.getVersionDetail === 'function';
51865
- if (!_context3.t0) {
51866
- _context3.next = 6;
51867
- break;
51868
- }
51949
+ while (1) switch (_context3.prev = _context3.next) {
51950
+ case 0:
51951
+ _this5.active = v;
51952
+ _this5.loading = true;
51953
+ _context3.t0 = typeof _this5.getVersionDetail === 'function';
51954
+ if (!_context3.t0) {
51869
51955
  _context3.next = 6;
51870
- return _this5.getVersionDetail(_this5.versionList[v]).catch(function (_) {
51871
- return false;
51872
- });
51873
- case 6:
51874
- _this5.loading = false;
51875
- _this5.$emit('selected', v, _this5.versionList[v]);
51876
- case 8:
51877
- case "end":
51878
- return _context3.stop();
51879
- }
51956
+ break;
51957
+ }
51958
+ _context3.next = 6;
51959
+ return _this5.getVersionDetail(_this5.versionList[v]).catch(function (_) {
51960
+ return false;
51961
+ });
51962
+ case 6:
51963
+ _this5.loading = false;
51964
+ _this5.$emit('selected', v, _this5.versionList[v]);
51965
+ case 8:
51966
+ case "end":
51967
+ return _context3.stop();
51880
51968
  }
51881
51969
  }, _callee3);
51882
51970
  }))();
@@ -52758,61 +52846,59 @@
52758
52846
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
52759
52847
  var include, list, filter;
52760
52848
  return _regeneratorRuntime().wrap(function _callee$(_context) {
52761
- while (1) {
52762
- switch (_context.prev = _context.next) {
52763
- case 0:
52764
- include = _this5.input.value.includes(_this5.explainCode);
52765
- list = [];
52766
- if (!(include && _this5.menuChildInstance)) {
52767
- _context.next = 16;
52768
- break;
52769
- }
52770
- filter = text.replace(_this5.curItem[_this5.displayKey] + _this5.explainCode, '');
52771
- if (!(_this5.curItem.remote && typeof _this5.remoteMethod === 'function')) {
52772
- _context.next = 12;
52773
- break;
52774
- }
52775
- _this5.menuChildInstance.loading = true;
52776
- _context.next = 8;
52777
- return _this5.remoteMethod(filter, _this5.curItem, _this5.menu.active).finally(function () {
52778
- _this5.menuChildInstance.loading = false;
52779
- });
52780
- case 8:
52781
- list = _context.sent;
52782
- if (list && list.length) {
52783
- _this5.showChildMenu(list, filter, !!list.length);
52784
- } else {
52785
- _this5.hidePopper();
52786
- }
52787
- _context.next = 14;
52849
+ while (1) switch (_context.prev = _context.next) {
52850
+ case 0:
52851
+ include = _this5.input.value.includes(_this5.explainCode);
52852
+ list = [];
52853
+ if (!(include && _this5.menuChildInstance)) {
52854
+ _context.next = 16;
52788
52855
  break;
52789
- case 12:
52790
- list = _this5.handleFilter(filter);
52856
+ }
52857
+ filter = text.replace(_this5.curItem[_this5.displayKey] + _this5.explainCode, '');
52858
+ if (!(_this5.curItem.remote && typeof _this5.remoteMethod === 'function')) {
52859
+ _context.next = 12;
52860
+ break;
52861
+ }
52862
+ _this5.menuChildInstance.loading = true;
52863
+ _context.next = 8;
52864
+ return _this5.remoteMethod(filter, _this5.curItem, _this5.menu.active).finally(function () {
52865
+ _this5.menuChildInstance.loading = false;
52866
+ });
52867
+ case 8:
52868
+ list = _context.sent;
52869
+ if (list && list.length) {
52870
+ _this5.showChildMenu(list, filter, !!list.length);
52871
+ } else {
52872
+ _this5.hidePopper();
52873
+ }
52874
+ _context.next = 14;
52875
+ break;
52876
+ case 12:
52877
+ list = _this5.handleFilter(filter);
52878
+ if (list && list.length) {
52879
+ _this5.showChildMenu(list, filter, !!list.length);
52880
+ } else {
52881
+ _this5.hidePopper();
52882
+ }
52883
+ case 14:
52884
+ _context.next = 17;
52885
+ break;
52886
+ case 16:
52887
+ if (!include && _this5.menuInstance) {
52888
+ list = _this5.handleFilter(text);
52791
52889
  if (list && list.length) {
52792
- _this5.showChildMenu(list, filter, !!list.length);
52890
+ _this5.menuInstance.filter = text;
52891
+ _this5.menuInstance.list = list;
52892
+ _this5.showPopper(_this5.menuInstance.$el);
52793
52893
  } else {
52794
- _this5.hidePopper();
52795
- }
52796
- case 14:
52797
- _context.next = 17;
52798
- break;
52799
- case 16:
52800
- if (!include && _this5.menuInstance) {
52801
- list = _this5.handleFilter(text);
52802
- if (list && list.length) {
52803
- _this5.menuInstance.filter = text;
52804
- _this5.menuInstance.list = list;
52805
- _this5.showPopper(_this5.menuInstance.$el);
52806
- } else {
52807
- if (_this5.$refs.input.innerText) {
52808
- _this5.hidePopper();
52809
- }
52894
+ if (_this5.$refs.input.innerText) {
52895
+ _this5.hidePopper();
52810
52896
  }
52811
52897
  }
52812
- case 17:
52813
- case "end":
52814
- return _context.stop();
52815
- }
52898
+ }
52899
+ case 17:
52900
+ case "end":
52901
+ return _context.stop();
52816
52902
  }
52817
52903
  }, _callee);
52818
52904
  }))();
@@ -52962,76 +53048,74 @@
52962
53048
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
52963
53049
  var isChild, isRemote, list;
52964
53050
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
52965
- while (1) {
52966
- switch (_context2.prev = _context2.next) {
52967
- case 0:
52968
- isChild = item.children && item.children.length;
52969
- if (!isCondition) {
52970
- _context2.next = 14;
52971
- break;
52972
- }
52973
- _this9.$refs.input.blur();
52974
- if (!_this9.menuChildInstance || _this9.menuChildInstance.multiable || _this9.menuChildInstance.multiable !== _this9.curItem.multiable) {
52975
- _this9.initChildMenu();
52976
- }
52977
- _this9.menuChildInstance.isChildCondition = isCondition;
52978
- _this9.menuChildInstance.error = '';
52979
- _this9.menuChildInstance.loading = false;
52980
- _this9.menuChildInstance.checked = _this9.menu.checked;
52981
- _this9.showPopper(_this9.menuChildInstance.$el);
52982
- _this9.menu.child = false;
52983
- _this9.menuChildInstance.list = item.conditions;
52984
- setTimeout(function () {
52985
- _this9.$refs.input.focus();
52986
- }, 20);
52987
- _context2.next = 37;
53051
+ while (1) switch (_context2.prev = _context2.next) {
53052
+ case 0:
53053
+ isChild = item.children && item.children.length;
53054
+ if (!isCondition) {
53055
+ _context2.next = 14;
52988
53056
  break;
52989
- case 14:
52990
- isRemote = _this9.curItem.remote && typeof _this9.remoteMethod === 'function';
52991
- if (!(isChild || isRemote)) {
52992
- _context2.next = 35;
52993
- break;
52994
- }
52995
- _this9.$refs.input.blur();
52996
- if (!_this9.menuChildInstance || _this9.menuChildInstance.multiable || _this9.menuChildInstance.multiable !== _this9.curItem.multiable) {
52997
- _this9.initChildMenu();
52998
- }
52999
- _this9.menuChildInstance.isChildCondition = isCondition;
53000
- _this9.menuChildInstance.error = '';
53001
- _this9.menuChildInstance.loading = isRemote;
53002
- _this9.menuChildInstance.checked = _this9.menu.checked;
53003
- _this9.showPopper(_this9.menuChildInstance.$el);
53004
- _this9.menu.child = true;
53005
- if (!isRemote) {
53006
- _context2.next = 31;
53007
- break;
53008
- }
53009
- _context2.next = 27;
53010
- return _this9.remoteMethod(_this9.input.value, item, index).finally(function () {
53011
- _this9.menuChildInstance.loading = false;
53012
- });
53013
- case 27:
53014
- list = _context2.sent;
53015
- _this9.menuChildInstance.list = list;
53016
- _context2.next = 32;
53057
+ }
53058
+ _this9.$refs.input.blur();
53059
+ if (!_this9.menuChildInstance || _this9.menuChildInstance.multiable || _this9.menuChildInstance.multiable !== _this9.curItem.multiable) {
53060
+ _this9.initChildMenu();
53061
+ }
53062
+ _this9.menuChildInstance.isChildCondition = isCondition;
53063
+ _this9.menuChildInstance.error = '';
53064
+ _this9.menuChildInstance.loading = false;
53065
+ _this9.menuChildInstance.checked = _this9.menu.checked;
53066
+ _this9.showPopper(_this9.menuChildInstance.$el);
53067
+ _this9.menu.child = false;
53068
+ _this9.menuChildInstance.list = item.conditions;
53069
+ setTimeout(function () {
53070
+ _this9.$refs.input.focus();
53071
+ }, 20);
53072
+ _context2.next = 37;
53073
+ break;
53074
+ case 14:
53075
+ isRemote = _this9.curItem.remote && typeof _this9.remoteMethod === 'function';
53076
+ if (!(isChild || isRemote)) {
53077
+ _context2.next = 35;
53017
53078
  break;
53018
- case 31:
53019
- _this9.menuChildInstance.list = item.children;
53020
- case 32:
53021
- setTimeout(function () {
53022
- _this9.$refs.input.focus();
53023
- }, 20);
53024
- _context2.next = 37;
53079
+ }
53080
+ _this9.$refs.input.blur();
53081
+ if (!_this9.menuChildInstance || _this9.menuChildInstance.multiable || _this9.menuChildInstance.multiable !== _this9.curItem.multiable) {
53082
+ _this9.initChildMenu();
53083
+ }
53084
+ _this9.menuChildInstance.isChildCondition = isCondition;
53085
+ _this9.menuChildInstance.error = '';
53086
+ _this9.menuChildInstance.loading = isRemote;
53087
+ _this9.menuChildInstance.checked = _this9.menu.checked;
53088
+ _this9.showPopper(_this9.menuChildInstance.$el);
53089
+ _this9.menu.child = true;
53090
+ if (!isRemote) {
53091
+ _context2.next = 31;
53025
53092
  break;
53026
- case 35:
53027
- _this9.hidePopper();
53028
- setTimeout(function () {
53029
- _this9.handleInputFocus();
53030
- }, 20);
53031
- case 37:
53032
- case "end":
53033
- return _context2.stop();
53034
- }
53093
+ }
53094
+ _context2.next = 27;
53095
+ return _this9.remoteMethod(_this9.input.value, item, index).finally(function () {
53096
+ _this9.menuChildInstance.loading = false;
53097
+ });
53098
+ case 27:
53099
+ list = _context2.sent;
53100
+ _this9.menuChildInstance.list = list;
53101
+ _context2.next = 32;
53102
+ break;
53103
+ case 31:
53104
+ _this9.menuChildInstance.list = item.children;
53105
+ case 32:
53106
+ setTimeout(function () {
53107
+ _this9.$refs.input.focus();
53108
+ }, 20);
53109
+ _context2.next = 37;
53110
+ break;
53111
+ case 35:
53112
+ _this9.hidePopper();
53113
+ setTimeout(function () {
53114
+ _this9.handleInputFocus();
53115
+ }, 20);
53116
+ case 37:
53117
+ case "end":
53118
+ return _context2.stop();
53035
53119
  }
53036
53120
  }, _callee2);
53037
53121
  }))();
@@ -53166,48 +53250,46 @@
53166
53250
  var needEmitKeyEnter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
53167
53251
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee3() {
53168
53252
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
53169
- while (1) {
53170
- switch (_context3.prev = _context3.next) {
53171
- case 0:
53172
- _context3.next = 2;
53173
- return new promise$1(function (resolve) {
53174
- if (!_this12.input.value) {
53175
- resolve();
53176
- } else if (_this12.input.value === _this12.curItem[_this12.displayKey] + _this12.explainCode) {
53177
- e.preventDefault();
53178
- if (!_this12.menuChildInstance) {
53179
- _this12.initChildMenu();
53253
+ while (1) switch (_context3.prev = _context3.next) {
53254
+ case 0:
53255
+ _context3.next = 2;
53256
+ return new promise$1(function (resolve) {
53257
+ if (!_this12.input.value) {
53258
+ resolve();
53259
+ } else if (_this12.input.value === _this12.curItem[_this12.displayKey] + _this12.explainCode) {
53260
+ e.preventDefault();
53261
+ if (!_this12.menuChildInstance) {
53262
+ _this12.initChildMenu();
53263
+ }
53264
+ _this12.menuChildInstance.error = _this12.defaultEmptyText;
53265
+ _this12.$nextTick(function (_) {
53266
+ _this12.showPopper(_this12.menuChildInstance.$el);
53267
+ });
53268
+ _this12.handleInputFocus();
53269
+ resolve();
53270
+ } else {
53271
+ e.preventDefault();
53272
+ setTimeout(function () {
53273
+ if (_this12.menu.id !== null) {
53274
+ var _this12$handleEnter;
53275
+ var val = _this12.input.value.replace(_this12.curItem[_this12.displayKey] + _this12.explainCode, '');
53276
+ if (keys$1(_this12.menu.childCondition).length) {
53277
+ val = val.replace(_this12.menu.childCondition[_this12.displayKey], '');
53278
+ }
53279
+ _this12.handleEnter(_this12.input.value, (_this12$handleEnter = {}, _defineProperty(_this12$handleEnter, _this12.primaryKey, val), _defineProperty(_this12$handleEnter, _this12.displayKey, val), _this12$handleEnter), true, needShowPopover);
53280
+ } else {
53281
+ var _this12$handleEnter2;
53282
+ _this12.handleEnter(_this12.input.value, (_this12$handleEnter2 = {}, _defineProperty(_this12$handleEnter2, _this12.primaryKey, _this12.input.value), _defineProperty(_this12$handleEnter2, _this12.displayKey, _this12.input.value), _this12$handleEnter2), false, needShowPopover);
53180
53283
  }
53181
- _this12.menuChildInstance.error = _this12.defaultEmptyText;
53182
- _this12.$nextTick(function (_) {
53183
- _this12.showPopper(_this12.menuChildInstance.$el);
53184
- });
53185
- _this12.handleInputFocus();
53186
53284
  resolve();
53187
- } else {
53188
- e.preventDefault();
53189
- setTimeout(function () {
53190
- if (_this12.menu.id !== null) {
53191
- var _this12$handleEnter;
53192
- var val = _this12.input.value.replace(_this12.curItem[_this12.displayKey] + _this12.explainCode, '');
53193
- if (keys$1(_this12.menu.childCondition).length) {
53194
- val = val.replace(_this12.menu.childCondition[_this12.displayKey], '');
53195
- }
53196
- _this12.handleEnter(_this12.input.value, (_this12$handleEnter = {}, _defineProperty(_this12$handleEnter, _this12.primaryKey, val), _defineProperty(_this12$handleEnter, _this12.displayKey, val), _this12$handleEnter), true, needShowPopover);
53197
- } else {
53198
- var _this12$handleEnter2;
53199
- _this12.handleEnter(_this12.input.value, (_this12$handleEnter2 = {}, _defineProperty(_this12$handleEnter2, _this12.primaryKey, _this12.input.value), _defineProperty(_this12$handleEnter2, _this12.displayKey, _this12.input.value), _this12$handleEnter2), false, needShowPopover);
53200
- }
53201
- resolve();
53202
- }, 10);
53203
- }
53204
- });
53205
- case 2:
53206
- needEmitKeyEnter && _this12.$emit('key-enter', e);
53207
- case 3:
53208
- case "end":
53209
- return _context3.stop();
53210
- }
53285
+ }, 10);
53286
+ }
53287
+ });
53288
+ case 2:
53289
+ needEmitKeyEnter && _this12.$emit('key-enter', e);
53290
+ case 3:
53291
+ case "end":
53292
+ return _context3.stop();
53211
53293
  }
53212
53294
  }, _callee3);
53213
53295
  }))();
@@ -53217,41 +53299,39 @@
53217
53299
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee4() {
53218
53300
  var validate, selection;
53219
53301
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
53220
- while (1) {
53221
- switch (_context4.prev = _context4.next) {
53222
- case 0:
53223
- validate = true;
53224
- if (!(_this13.curItem && _this13.curItem.validate && typeof _this13.curItem.validate === 'function')) {
53225
- _context4.next = 8;
53226
- break;
53227
- }
53228
- _context4.next = 4;
53229
- return _this13.curItem.validate(_toConsumableArray(valList), _this13.curItem);
53230
- case 4:
53231
- validate = _context4.sent;
53232
- if (typeof validate === 'string') {
53233
- _this13.validateStr = validate;
53234
- validate = false;
53235
- } else {
53236
- validate && (_this13.validateStr = '');
53237
- }
53238
- _context4.next = 9;
53302
+ while (1) switch (_context4.prev = _context4.next) {
53303
+ case 0:
53304
+ validate = true;
53305
+ if (!(_this13.curItem && _this13.curItem.validate && typeof _this13.curItem.validate === 'function')) {
53306
+ _context4.next = 8;
53239
53307
  break;
53240
- case 8:
53241
- _this13.validateStr = '';
53242
- case 9:
53243
- if (!validate) {
53244
- selection = window.getSelection();
53245
- if (selection.focusOffset === 0) {
53246
- selection.selectAllChildren(_this13.$refs.input);
53247
- selection.collapseToEnd();
53248
- }
53308
+ }
53309
+ _context4.next = 4;
53310
+ return _this13.curItem.validate(_toConsumableArray(valList), _this13.curItem);
53311
+ case 4:
53312
+ validate = _context4.sent;
53313
+ if (typeof validate === 'string') {
53314
+ _this13.validateStr = validate;
53315
+ validate = false;
53316
+ } else {
53317
+ validate && (_this13.validateStr = '');
53318
+ }
53319
+ _context4.next = 9;
53320
+ break;
53321
+ case 8:
53322
+ _this13.validateStr = '';
53323
+ case 9:
53324
+ if (!validate) {
53325
+ selection = window.getSelection();
53326
+ if (selection.focusOffset === 0) {
53327
+ selection.selectAllChildren(_this13.$refs.input);
53328
+ selection.collapseToEnd();
53249
53329
  }
53250
- return _context4.abrupt("return", validate);
53251
- case 11:
53252
- case "end":
53253
- return _context4.stop();
53254
- }
53330
+ }
53331
+ return _context4.abrupt("return", validate);
53332
+ case 11:
53333
+ case "end":
53334
+ return _context4.stop();
53255
53335
  }
53256
53336
  }, _callee4);
53257
53337
  }))();
@@ -53263,87 +53343,85 @@
53263
53343
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee5() {
53264
53344
  var values, data, validate, _validate;
53265
53345
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
53266
- while (1) {
53267
- switch (_context5.prev = _context5.next) {
53268
- case 0:
53269
- if (!child) {
53270
- _context5.next = 19;
53271
- break;
53272
- }
53273
- if (!(_this14.input.value === _this14.defaultCondition[_this14.displayKey])) {
53274
- _context5.next = 5;
53275
- break;
53276
- }
53277
- _this14.chip.list.push(_this14.defaultCondition);
53278
- _context5.next = 17;
53346
+ while (1) switch (_context5.prev = _context5.next) {
53347
+ case 0:
53348
+ if (!child) {
53349
+ _context5.next = 19;
53279
53350
  break;
53280
- case 5:
53281
- values = [];
53282
- if (keys$1(_this14.menu.checked).length) {
53283
- values = values$1(_this14.menu.checked);
53284
- } else {
53285
- values.push(item);
53286
- }
53287
- data = _extends({}, _this14.curItem, {
53288
- values: values
53289
- });
53290
- if (keys$1(_this14.menu.childCondition).length) {
53291
- data['condition'] = _this14.menu.childCondition;
53292
- }
53293
- if (data.children) {
53294
- delete data.children;
53295
- }
53296
- if (data.conditions) {
53297
- delete data.conditions;
53298
- }
53299
- _context5.next = 13;
53300
- return _this14.handleValidate(values);
53301
- case 13:
53302
- validate = _context5.sent;
53303
- if (validate) {
53304
- _context5.next = 16;
53305
- break;
53306
- }
53307
- return _context5.abrupt("return");
53308
- case 16:
53309
- _this14.chip.list.push(data);
53310
- case 17:
53311
- _context5.next = 25;
53351
+ }
53352
+ if (!(_this14.input.value === _this14.defaultCondition[_this14.displayKey])) {
53353
+ _context5.next = 5;
53312
53354
  break;
53313
- case 19:
53314
- _context5.next = 21;
53315
- return _this14.handleValidate([item]);
53316
- case 21:
53317
- _validate = _context5.sent;
53318
- if (_validate) {
53319
- _context5.next = 24;
53320
- break;
53321
- }
53322
- return _context5.abrupt("return");
53323
- case 24:
53324
- _this14.chip.list.push(item);
53325
- case 25:
53326
- _this14.menu.checked = {};
53327
- _this14.menu.active = -1;
53328
- _this14.menu.id = null;
53329
- _this14.input.value = '';
53330
- _this14.menu.childCondition = {};
53331
- _this14.updateInput();
53332
- if (_this14.menuInstance) {
53333
- _this14.menuInstance.filter = '';
53334
- }
53335
- if (needShowPopover) {
53336
- _this14.$nextTick(function (_) {
53337
- return _this14.showMenu(_this14.showPopoverTagChange);
53338
- });
53339
- _this14.$refs.input.focus();
53340
- }
53341
- _this14.$emit('change', _this14.chip.list);
53342
- _this14.dispatch('bk-form-item', 'form-change');
53343
- case 35:
53344
- case "end":
53345
- return _context5.stop();
53346
- }
53355
+ }
53356
+ _this14.chip.list.push(_this14.defaultCondition);
53357
+ _context5.next = 17;
53358
+ break;
53359
+ case 5:
53360
+ values = [];
53361
+ if (keys$1(_this14.menu.checked).length) {
53362
+ values = values$1(_this14.menu.checked);
53363
+ } else {
53364
+ values.push(item);
53365
+ }
53366
+ data = _extends({}, _this14.curItem, {
53367
+ values: values
53368
+ });
53369
+ if (keys$1(_this14.menu.childCondition).length) {
53370
+ data['condition'] = _this14.menu.childCondition;
53371
+ }
53372
+ if (data.children) {
53373
+ delete data.children;
53374
+ }
53375
+ if (data.conditions) {
53376
+ delete data.conditions;
53377
+ }
53378
+ _context5.next = 13;
53379
+ return _this14.handleValidate(values);
53380
+ case 13:
53381
+ validate = _context5.sent;
53382
+ if (validate) {
53383
+ _context5.next = 16;
53384
+ break;
53385
+ }
53386
+ return _context5.abrupt("return");
53387
+ case 16:
53388
+ _this14.chip.list.push(data);
53389
+ case 17:
53390
+ _context5.next = 25;
53391
+ break;
53392
+ case 19:
53393
+ _context5.next = 21;
53394
+ return _this14.handleValidate([item]);
53395
+ case 21:
53396
+ _validate = _context5.sent;
53397
+ if (_validate) {
53398
+ _context5.next = 24;
53399
+ break;
53400
+ }
53401
+ return _context5.abrupt("return");
53402
+ case 24:
53403
+ _this14.chip.list.push(item);
53404
+ case 25:
53405
+ _this14.menu.checked = {};
53406
+ _this14.menu.active = -1;
53407
+ _this14.menu.id = null;
53408
+ _this14.input.value = '';
53409
+ _this14.menu.childCondition = {};
53410
+ _this14.updateInput();
53411
+ if (_this14.menuInstance) {
53412
+ _this14.menuInstance.filter = '';
53413
+ }
53414
+ if (needShowPopover) {
53415
+ _this14.$nextTick(function (_) {
53416
+ return _this14.showMenu(_this14.showPopoverTagChange);
53417
+ });
53418
+ _this14.$refs.input.focus();
53419
+ }
53420
+ _this14.$emit('change', _this14.chip.list);
53421
+ _this14.dispatch('bk-form-item', 'form-change');
53422
+ case 35:
53423
+ case "end":
53424
+ return _context5.stop();
53347
53425
  }
53348
53426
  }, _callee5);
53349
53427
  }))();
@@ -53832,44 +53910,42 @@
53832
53910
  this.tree.$nextTick( _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
53833
53911
  var _yield$_this2$tree$la, _yield$_this2$tree$la2, leaf, _yield$_this2$tree$la3, data, newNodes;
53834
53912
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53835
- while (1) {
53836
- switch (_context.prev = _context.next) {
53837
- case 0:
53838
- if (!(expanded && _this2.lazy)) {
53839
- _context.next = 21;
53840
- break;
53841
- }
53842
- _this2.setState('loading', true);
53843
- _this2.setState('lazy', false);
53844
- _context.prev = 3;
53845
- _context.next = 6;
53846
- return _this2.tree.lazyMethod(_this2);
53847
- case 6:
53848
- _yield$_this2$tree$la = _context.sent;
53849
- _yield$_this2$tree$la2 = _yield$_this2$tree$la.leaf;
53850
- leaf = _yield$_this2$tree$la2 === void 0 ? [] : _yield$_this2$tree$la2;
53851
- _yield$_this2$tree$la3 = _yield$_this2$tree$la.data;
53852
- data = _yield$_this2$tree$la3 === void 0 ? [] : _yield$_this2$tree$la3;
53853
- newNodes = _this2.tree.addNode(data, _this2.id);
53854
- newNodes.forEach(function (node) {
53855
- if (leaf.includes(node.id)) {
53856
- node.setState('lazy', false);
53857
- }
53858
- });
53859
- _context.next = 18;
53913
+ while (1) switch (_context.prev = _context.next) {
53914
+ case 0:
53915
+ if (!(expanded && _this2.lazy)) {
53916
+ _context.next = 21;
53860
53917
  break;
53861
- case 15:
53862
- _context.prev = 15;
53863
- _context.t0 = _context["catch"](3);
53864
- console.error(_context.t0);
53865
- case 18:
53866
- _context.prev = 18;
53867
- _this2.setState('loading', false);
53868
- return _context.finish(18);
53869
- case 21:
53870
- case "end":
53871
- return _context.stop();
53872
- }
53918
+ }
53919
+ _this2.setState('loading', true);
53920
+ _this2.setState('lazy', false);
53921
+ _context.prev = 3;
53922
+ _context.next = 6;
53923
+ return _this2.tree.lazyMethod(_this2);
53924
+ case 6:
53925
+ _yield$_this2$tree$la = _context.sent;
53926
+ _yield$_this2$tree$la2 = _yield$_this2$tree$la.leaf;
53927
+ leaf = _yield$_this2$tree$la2 === void 0 ? [] : _yield$_this2$tree$la2;
53928
+ _yield$_this2$tree$la3 = _yield$_this2$tree$la.data;
53929
+ data = _yield$_this2$tree$la3 === void 0 ? [] : _yield$_this2$tree$la3;
53930
+ newNodes = _this2.tree.addNode(data, _this2.id);
53931
+ newNodes.forEach(function (node) {
53932
+ if (leaf.includes(node.id)) {
53933
+ node.setState('lazy', false);
53934
+ }
53935
+ });
53936
+ _context.next = 18;
53937
+ break;
53938
+ case 15:
53939
+ _context.prev = 15;
53940
+ _context.t0 = _context["catch"](3);
53941
+ console.error(_context.t0);
53942
+ case 18:
53943
+ _context.prev = 18;
53944
+ _this2.setState('loading', false);
53945
+ return _context.finish(18);
53946
+ case 21:
53947
+ case "end":
53948
+ return _context.stop();
53873
53949
  }
53874
53950
  }, _callee, null, [[3, 15, 18, 21]]);
53875
53951
  })));
@@ -54488,49 +54564,47 @@
54488
54564
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
54489
54565
  var mergeOptions, node, response;
54490
54566
  return _regeneratorRuntime().wrap(function _callee$(_context) {
54491
- while (1) {
54492
- switch (_context.prev = _context.next) {
54493
- case 0:
54494
- _context.prev = 0;
54495
- if (!(!_this8.selectable || nodeId === _this8.selected)) {
54496
- _context.next = 3;
54497
- break;
54498
- }
54499
- return _context.abrupt("return", false);
54500
- case 3:
54501
- mergeOptions = _objectSpread({
54502
- emitEvent: false,
54503
- beforeSelect: true
54504
- }, options);
54505
- node = _this8.getNodeById(nodeId);
54506
- if (!(mergeOptions.beforeSelect && typeof _this8.beforeSelect === 'function')) {
54507
- _context.next = 11;
54508
- break;
54509
- }
54510
- _context.next = 8;
54511
- return _this8.beforeSelect(node);
54512
- case 8:
54513
- response = _context.sent;
54514
- if (response) {
54515
- _context.next = 11;
54516
- break;
54517
- }
54518
- return _context.abrupt("return", false);
54519
- case 11:
54520
- _this8.selected = nodeId;
54521
- if (mergeOptions.emitEvent) {
54522
- _this8.$emit('select-change', node);
54523
- }
54524
- _context.next = 18;
54567
+ while (1) switch (_context.prev = _context.next) {
54568
+ case 0:
54569
+ _context.prev = 0;
54570
+ if (!(!_this8.selectable || nodeId === _this8.selected)) {
54571
+ _context.next = 3;
54525
54572
  break;
54526
- case 15:
54527
- _context.prev = 15;
54528
- _context.t0 = _context["catch"](0);
54529
- console.warn(_context.t0.message);
54530
- case 18:
54531
- case "end":
54532
- return _context.stop();
54533
- }
54573
+ }
54574
+ return _context.abrupt("return", false);
54575
+ case 3:
54576
+ mergeOptions = _objectSpread({
54577
+ emitEvent: false,
54578
+ beforeSelect: true
54579
+ }, options);
54580
+ node = _this8.getNodeById(nodeId);
54581
+ if (!(mergeOptions.beforeSelect && typeof _this8.beforeSelect === 'function')) {
54582
+ _context.next = 11;
54583
+ break;
54584
+ }
54585
+ _context.next = 8;
54586
+ return _this8.beforeSelect(node);
54587
+ case 8:
54588
+ response = _context.sent;
54589
+ if (response) {
54590
+ _context.next = 11;
54591
+ break;
54592
+ }
54593
+ return _context.abrupt("return", false);
54594
+ case 11:
54595
+ _this8.selected = nodeId;
54596
+ if (mergeOptions.emitEvent) {
54597
+ _this8.$emit('select-change', node);
54598
+ }
54599
+ _context.next = 18;
54600
+ break;
54601
+ case 15:
54602
+ _context.prev = 15;
54603
+ _context.t0 = _context["catch"](0);
54604
+ console.warn(_context.t0.message);
54605
+ case 18:
54606
+ case "end":
54607
+ return _context.stop();
54534
54608
  }
54535
54609
  }, _callee, null, [[0, 15]]);
54536
54610
  }))();
@@ -54557,57 +54631,55 @@
54557
54631
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee2() {
54558
54632
  var isMultiple, ids, mergeOptions, nodes, response;
54559
54633
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
54560
- while (1) {
54561
- switch (_context2.prev = _context2.next) {
54562
- case 0:
54563
- _context2.prev = 0;
54564
- isMultiple = isArray$1(nodeId);
54565
- ids = isMultiple ? nodeId : [nodeId];
54566
- if (!ids.length) {
54567
- _context2.next = 14;
54568
- break;
54569
- }
54570
- mergeOptions = _objectSpread({
54571
- emitEvent: false,
54572
- beforeCheck: true,
54573
- checked: true
54574
- }, options);
54575
- nodes = ids.map(function (id) {
54576
- return _this9.getNodeById(id);
54577
- });
54578
- if (!(mergeOptions.beforeCheck && typeof _this9.beforeCheck === 'function')) {
54579
- _context2.next = 12;
54580
- break;
54581
- }
54582
- _context2.next = 9;
54583
- return _this9.beforeCheck(nodes.length > 1 ? nodes : nodes[0], mergeOptions.checked);
54584
- case 9:
54585
- response = _context2.sent;
54586
- if (response) {
54587
- _context2.next = 12;
54588
- break;
54589
- }
54590
- return _context2.abrupt("return", false);
54591
- case 12:
54592
- nodes.forEach(function (node) {
54593
- node.checked = mergeOptions.checked;
54594
- });
54595
- if (mergeOptions.emitEvent) {
54596
- setTimeout(function () {
54597
- _this9.$emit('check-change', _this9.checked, isMultiple ? nodes : nodes[0]);
54598
- }, 0);
54599
- }
54600
- case 14:
54601
- _context2.next = 19;
54634
+ while (1) switch (_context2.prev = _context2.next) {
54635
+ case 0:
54636
+ _context2.prev = 0;
54637
+ isMultiple = isArray$1(nodeId);
54638
+ ids = isMultiple ? nodeId : [nodeId];
54639
+ if (!ids.length) {
54640
+ _context2.next = 14;
54602
54641
  break;
54603
- case 16:
54604
- _context2.prev = 16;
54605
- _context2.t0 = _context2["catch"](0);
54606
- console.warn(_context2.t0.message);
54607
- case 19:
54608
- case "end":
54609
- return _context2.stop();
54610
- }
54642
+ }
54643
+ mergeOptions = _objectSpread({
54644
+ emitEvent: false,
54645
+ beforeCheck: true,
54646
+ checked: true
54647
+ }, options);
54648
+ nodes = ids.map(function (id) {
54649
+ return _this9.getNodeById(id);
54650
+ });
54651
+ if (!(mergeOptions.beforeCheck && typeof _this9.beforeCheck === 'function')) {
54652
+ _context2.next = 12;
54653
+ break;
54654
+ }
54655
+ _context2.next = 9;
54656
+ return _this9.beforeCheck(nodes.length > 1 ? nodes : nodes[0], mergeOptions.checked);
54657
+ case 9:
54658
+ response = _context2.sent;
54659
+ if (response) {
54660
+ _context2.next = 12;
54661
+ break;
54662
+ }
54663
+ return _context2.abrupt("return", false);
54664
+ case 12:
54665
+ nodes.forEach(function (node) {
54666
+ node.checked = mergeOptions.checked;
54667
+ });
54668
+ if (mergeOptions.emitEvent) {
54669
+ setTimeout(function () {
54670
+ _this9.$emit('check-change', _this9.checked, isMultiple ? nodes : nodes[0]);
54671
+ }, 0);
54672
+ }
54673
+ case 14:
54674
+ _context2.next = 19;
54675
+ break;
54676
+ case 16:
54677
+ _context2.prev = 16;
54678
+ _context2.t0 = _context2["catch"](0);
54679
+ console.warn(_context2.t0.message);
54680
+ case 19:
54681
+ case "end":
54682
+ return _context2.stop();
54611
54683
  }
54612
54684
  }, _callee2, null, [[0, 16]]);
54613
54685
  }))();
@@ -55464,36 +55536,34 @@
55464
55536
  return _asyncToGenerator( _regeneratorRuntime().mark(function _callee() {
55465
55537
  var canChange, id;
55466
55538
  return _regeneratorRuntime().wrap(function _callee$(_context) {
55467
- while (1) {
55468
- switch (_context.prev = _context.next) {
55469
- case 0:
55470
- canChange = false;
55471
- _context.prev = 1;
55472
- _context.next = 4;
55473
- return _this3.beforeNavChange(item.id, _this3.activeId, _extends({}, item.$props, item.$attrs));
55474
- case 4:
55475
- canChange = _context.sent;
55476
- _context.next = 10;
55477
- break;
55478
- case 7:
55479
- _context.prev = 7;
55480
- _context.t0 = _context["catch"](1);
55481
- canChange = typeof _context.t0 === 'boolean' ? _context.t0 : false;
55482
- case 10:
55483
- if (canChange) {
55484
- id = item.id;
55485
- if (id) {
55486
- _this3.item = item;
55487
- _this3.activeId = id;
55488
- }
55489
- _this3.$emit('select', _this3.activeId, _extends({}, item.$props, item.$attrs));
55490
- } else if (_this3.activeId === item.id) {
55539
+ while (1) switch (_context.prev = _context.next) {
55540
+ case 0:
55541
+ canChange = false;
55542
+ _context.prev = 1;
55543
+ _context.next = 4;
55544
+ return _this3.beforeNavChange(item.id, _this3.activeId, _extends({}, item.$props, item.$attrs));
55545
+ case 4:
55546
+ canChange = _context.sent;
55547
+ _context.next = 10;
55548
+ break;
55549
+ case 7:
55550
+ _context.prev = 7;
55551
+ _context.t0 = _context["catch"](1);
55552
+ canChange = typeof _context.t0 === 'boolean' ? _context.t0 : false;
55553
+ case 10:
55554
+ if (canChange) {
55555
+ id = item.id;
55556
+ if (id) {
55491
55557
  _this3.item = item;
55558
+ _this3.activeId = id;
55492
55559
  }
55493
- case 11:
55494
- case "end":
55495
- return _context.stop();
55496
- }
55560
+ _this3.$emit('select', _this3.activeId, _extends({}, item.$props, item.$attrs));
55561
+ } else if (_this3.activeId === item.id) {
55562
+ _this3.item = item;
55563
+ }
55564
+ case 11:
55565
+ case "end":
55566
+ return _context.stop();
55497
55567
  }
55498
55568
  }, _callee, null, [[1, 7]]);
55499
55569
  }))();
@@ -57100,7 +57170,7 @@
57100
57170
  isArray$1(item) && valueList.push(item.length);
57101
57171
  });
57102
57172
  var value = Math.max.apply(Math, valueList);
57103
- var _loop = function _loop(i) {
57173
+ var _loop = function _loop() {
57104
57174
  var checkInfo = function checkInfo(arr) {
57105
57175
  arr.forEach(function (arrItem) {
57106
57176
  if (arrItem.children && arrItem.children.length) {
@@ -57117,7 +57187,7 @@
57117
57187
  checkInfo(_this8.cascadeList);
57118
57188
  };
57119
57189
  for (var i = 0; i <= value; i++) {
57120
- _loop(i);
57190
+ _loop();
57121
57191
  }
57122
57192
  }
57123
57193
  },