vue-devui 1.0.0-rc.14 → 1.0.0-rc.15

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 (109) hide show
  1. package/README.md +1 -0
  2. package/alert/index.umd.js +1 -1
  3. package/auto-complete/index.es.js +90 -81
  4. package/auto-complete/index.umd.js +24 -13
  5. package/auto-complete/style.css +1 -1
  6. package/avatar/index.umd.js +1 -1
  7. package/badge/index.umd.js +1 -1
  8. package/button/index.es.js +21 -42
  9. package/button/index.umd.js +9 -9
  10. package/card/index.umd.js +1 -1
  11. package/checkbox/index.es.js +94 -77
  12. package/checkbox/index.umd.js +26 -15
  13. package/collapse/index.es.js +3 -21
  14. package/collapse/index.umd.js +1 -1
  15. package/countdown/index.umd.js +1 -1
  16. package/date-picker-pro/index.es.js +118 -103
  17. package/date-picker-pro/index.umd.js +23 -12
  18. package/drawer/index.es.js +4 -17
  19. package/drawer/index.umd.js +1 -1
  20. package/dropdown/index.es.js +4 -22
  21. package/dropdown/index.umd.js +1 -1
  22. package/editable-select/index.es.js +104 -99
  23. package/editable-select/index.umd.js +1 -1
  24. package/editable-select/style.css +1 -1
  25. package/form/index.es.js +85 -71
  26. package/form/index.umd.js +22 -11
  27. package/fullscreen/index.umd.js +1 -1
  28. package/grid/index.es.js +7 -20
  29. package/grid/index.umd.js +1 -1
  30. package/icon/index.umd.js +1 -1
  31. package/image-preview/index.es.js +12 -23
  32. package/image-preview/index.umd.js +1 -1
  33. package/input/index.es.js +86 -72
  34. package/input/index.umd.js +24 -13
  35. package/input-number/index.es.js +1 -16
  36. package/input-number/index.umd.js +1 -1
  37. package/layout/index.umd.js +1 -1
  38. package/loading/index.es.js +15 -38
  39. package/loading/index.umd.js +1 -1
  40. package/message/index.d.ts +7 -0
  41. package/message/index.es.js +534 -0
  42. package/message/index.umd.js +1 -0
  43. package/message/package.json +7 -0
  44. package/message/style.css +1 -0
  45. package/modal/index.es.js +11 -43
  46. package/modal/index.umd.js +1 -1
  47. package/notification/index.es.js +16 -22
  48. package/notification/index.umd.js +1 -1
  49. package/nuxt/components/Message.js +3 -0
  50. package/nuxt/components/animationInjectionKey.js +3 -0
  51. package/nuxt/components/messageProps.js +3 -0
  52. package/nuxt/components/roundInjectionKey.js +3 -0
  53. package/nuxt/components/skeletonItemProps.js +3 -0
  54. package/overlay/index.es.js +1 -1
  55. package/overlay/index.umd.js +1 -1
  56. package/package.json +2 -2
  57. package/pagination/index.umd.js +1 -1
  58. package/panel/index.umd.js +1 -1
  59. package/popover/index.es.js +1 -1
  60. package/popover/index.umd.js +4 -4
  61. package/progress/index.umd.js +3 -3
  62. package/radio/index.es.js +91 -75
  63. package/radio/index.umd.js +28 -17
  64. package/radio/style.css +1 -1
  65. package/rate/index.umd.js +1 -1
  66. package/result/index.umd.js +1 -1
  67. package/ripple/index.es.js +5 -18
  68. package/ripple/index.umd.js +1 -1
  69. package/search/index.es.js +102 -75
  70. package/search/index.umd.js +26 -15
  71. package/search/style.css +1 -1
  72. package/select/index.es.js +130 -111
  73. package/select/index.umd.js +26 -15
  74. package/select/style.css +1 -1
  75. package/skeleton/index.es.js +87 -261
  76. package/skeleton/index.umd.js +1 -1
  77. package/skeleton/style.css +1 -1
  78. package/slider/index.umd.js +1 -1
  79. package/splitter/index.es.js +22 -29
  80. package/splitter/index.umd.js +9 -9
  81. package/statistic/index.es.js +0 -21
  82. package/statistic/index.umd.js +1 -1
  83. package/status/index.umd.js +1 -1
  84. package/steps/index.umd.js +1 -1
  85. package/style.css +1 -1
  86. package/switch/index.es.js +85 -71
  87. package/switch/index.umd.js +25 -14
  88. package/table/index.es.js +145 -92
  89. package/table/index.umd.js +22 -11
  90. package/table/style.css +1 -1
  91. package/tabs/index.umd.js +1 -1
  92. package/tag/index.umd.js +1 -1
  93. package/textarea/index.es.js +89 -74
  94. package/textarea/index.umd.js +26 -15
  95. package/time-picker/index.es.js +97 -88
  96. package/time-picker/index.umd.js +25 -14
  97. package/time-select/index.es.js +130 -111
  98. package/time-select/index.umd.js +25 -14
  99. package/time-select/style.css +1 -1
  100. package/timeline/index.umd.js +1 -1
  101. package/tooltip/index.es.js +1 -1
  102. package/tooltip/index.umd.js +4 -4
  103. package/tree/index.es.js +130 -95
  104. package/tree/index.umd.js +20 -9
  105. package/tree/style.css +1 -1
  106. package/upload/index.es.js +17 -48
  107. package/upload/index.umd.js +1 -1
  108. package/vue-devui.es.js +889 -628
  109. package/vue-devui.umd.js +32 -21
package/tree/index.es.js CHANGED
@@ -1,35 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { createVNode, defineComponent, toRefs, inject, ref, reactive, getCurrentInstance, watch, provide, onUnmounted, Transition, mergeProps, unref, nextTick, Comment, Text, h, Fragment, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, renderSlot, useSlots, resolveComponent, isVNode, onUpdated, shallowRef, toRaw, watchEffect } from "vue";
1
+ import { createVNode, defineComponent, toRefs, inject, ref, reactive, getCurrentInstance, watch, provide, onUnmounted, Transition, mergeProps, nextTick, unref, Comment, Text, Fragment, h, withDirectives, cloneVNode, computed, onMounted, Teleport, createTextVNode, onBeforeUnmount, toRef, renderSlot, useSlots, resolveComponent, isVNode, onUpdated, shallowRef, toRaw, watchEffect } from "vue";
33
2
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
34
3
  const USE_TREE_TOKEN = "use-tree-token";
35
4
  const TREE_INSTANCE = "tree-instance";
@@ -360,7 +329,8 @@ const commonProps = {
360
329
  default: "md"
361
330
  }
362
331
  };
363
- const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
332
+ const checkboxProps = {
333
+ ...commonProps,
364
334
  checked: {
365
335
  type: Boolean,
366
336
  default: false
@@ -390,8 +360,9 @@ const checkboxProps = __spreadProps(__spreadValues({}, commonProps), {
390
360
  type: Boolean,
391
361
  default: false
392
362
  }
393
- });
394
- const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
363
+ };
364
+ const checkboxGroupProps = {
365
+ ...commonProps,
395
366
  modelValue: {
396
367
  type: Array,
397
368
  required: true
@@ -428,7 +399,7 @@ const checkboxGroupProps = __spreadProps(__spreadValues({}, commonProps), {
428
399
  type: String,
429
400
  default: ""
430
401
  }
431
- });
402
+ };
432
403
  const checkboxGroupInjectionKey = Symbol("d-checkbox-group");
433
404
  const formProps = {
434
405
  data: {
@@ -1196,7 +1167,7 @@ var lodash = { exports: {} };
1196
1167
  var objectCtorString = funcToString.call(Object2);
1197
1168
  var oldDash = root._;
1198
1169
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1199
- var Buffer2 = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
1170
+ var Buffer = moduleExports ? context.Buffer : undefined$1, Symbol2 = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined$1, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined$1, symIterator = Symbol2 ? Symbol2.iterator : undefined$1, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined$1;
1200
1171
  var defineProperty = function() {
1201
1172
  try {
1202
1173
  var func = getNative(Object2, "defineProperty");
@@ -1206,11 +1177,11 @@ var lodash = { exports: {} };
1206
1177
  }
1207
1178
  }();
1208
1179
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1209
- var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
1210
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1211
- var metaMap = WeakMap2 && new WeakMap2();
1180
+ var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
1181
+ var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1182
+ var metaMap = WeakMap && new WeakMap();
1212
1183
  var realNames = {};
1213
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
1184
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
1214
1185
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1215
1186
  function lodash2(value) {
1216
1187
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -2458,7 +2429,7 @@ var lodash = { exports: {} };
2458
2429
  }
2459
2430
  function cloneArrayBuffer(arrayBuffer) {
2460
2431
  var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
2461
- new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
2432
+ new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
2462
2433
  return result2;
2463
2434
  }
2464
2435
  function cloneDataView(dataView, isDeep) {
@@ -3040,7 +3011,7 @@ var lodash = { exports: {} };
3040
3011
  object4 = object4.buffer;
3041
3012
  other = other.buffer;
3042
3013
  case arrayBufferTag:
3043
- if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
3014
+ if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
3044
3015
  return false;
3045
3016
  }
3046
3017
  return true;
@@ -3202,7 +3173,7 @@ var lodash = { exports: {} };
3202
3173
  return result2;
3203
3174
  };
3204
3175
  var getTag = baseGetTag;
3205
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3176
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
3206
3177
  getTag = function(value) {
3207
3178
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3208
3179
  if (ctorString) {
@@ -5919,7 +5890,10 @@ function useFormValidation(itemContexts) {
5919
5890
  try {
5920
5891
  await field.validate("");
5921
5892
  } catch (err) {
5922
- errors = __spreadValues(__spreadValues({}, errors), err);
5893
+ errors = {
5894
+ ...errors,
5895
+ ...err
5896
+ };
5923
5897
  }
5924
5898
  }
5925
5899
  if (!Object.keys(errors).length) {
@@ -5976,11 +5950,12 @@ defineComponent({
5976
5950
  }, {
5977
5951
  deep: true
5978
5952
  });
5979
- provide(FORM_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
5953
+ provide(FORM_TOKEN, reactive({
5954
+ ...toRefs(props),
5980
5955
  emit: ctx.emit,
5981
5956
  addItemContext,
5982
5957
  removeItemContext
5983
- })));
5958
+ }));
5984
5959
  ctx.expose({
5985
5960
  validate,
5986
5961
  validateFields,
@@ -6857,7 +6832,7 @@ var FormControl = defineComponent({
6857
6832
  }
6858
6833
  });
6859
6834
  function _extends() {
6860
- _extends = Object.assign || function(target) {
6835
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
6861
6836
  for (var i = 1; i < arguments.length; i++) {
6862
6837
  var source = arguments[i];
6863
6838
  for (var key in source) {
@@ -6876,13 +6851,13 @@ function _inheritsLoose(subClass, superClass) {
6876
6851
  _setPrototypeOf(subClass, superClass);
6877
6852
  }
6878
6853
  function _getPrototypeOf(o) {
6879
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
6854
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
6880
6855
  return o2.__proto__ || Object.getPrototypeOf(o2);
6881
6856
  };
6882
6857
  return _getPrototypeOf(o);
6883
6858
  }
6884
6859
  function _setPrototypeOf(o, p) {
6885
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
6860
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
6886
6861
  o2.__proto__ = p2;
6887
6862
  return o2;
6888
6863
  };
@@ -6905,7 +6880,7 @@ function _isNativeReflectConstruct() {
6905
6880
  }
6906
6881
  function _construct(Parent, args, Class) {
6907
6882
  if (_isNativeReflectConstruct()) {
6908
- _construct = Reflect.construct;
6883
+ _construct = Reflect.construct.bind();
6909
6884
  } else {
6910
6885
  _construct = function _construct2(Parent2, args2, Class2) {
6911
6886
  var a = [null];
@@ -7183,9 +7158,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
7183
7158
  errors.push(format(options.messages.whitespace, rule.fullField));
7184
7159
  }
7185
7160
  };
7161
+ var urlReg;
7162
+ var getUrlRegex = function() {
7163
+ if (urlReg) {
7164
+ return urlReg;
7165
+ }
7166
+ var word = "[a-fA-F\\d:]";
7167
+ var b = function b2(options) {
7168
+ return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
7169
+ };
7170
+ var v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
7171
+ var v6seg = "[a-fA-F\\d]{1,4}";
7172
+ var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim();
7173
+ var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
7174
+ var v4exact = new RegExp("^" + v4 + "$");
7175
+ var v6exact = new RegExp("^" + v6 + "$");
7176
+ var ip = function ip2(options) {
7177
+ return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
7178
+ };
7179
+ ip.v4 = function(options) {
7180
+ return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
7181
+ };
7182
+ ip.v6 = function(options) {
7183
+ return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
7184
+ };
7185
+ var protocol = "(?:(?:[a-z]+:)?//)";
7186
+ var auth = "(?:\\S+(?::\\S*)?@)?";
7187
+ var ipv4 = ip.v4().source;
7188
+ var ipv6 = ip.v6().source;
7189
+ var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
7190
+ var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
7191
+ var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
7192
+ var port = "(?::\\d{2,5})?";
7193
+ var path = '(?:[/?#][^\\s"]*)?';
7194
+ var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
7195
+ urlReg = new RegExp("(?:^" + regex + "$)", "i");
7196
+ return urlReg;
7197
+ };
7186
7198
  var pattern$2 = {
7187
7199
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
7188
- url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i"),
7189
7200
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
7190
7201
  };
7191
7202
  var types = {
@@ -7227,7 +7238,7 @@ var types = {
7227
7238
  return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
7228
7239
  },
7229
7240
  url: function url(value) {
7230
- return typeof value === "string" && value.length <= 2048 && !!value.match(pattern$2.url);
7241
+ return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
7231
7242
  },
7232
7243
  hex: function hex(value) {
7233
7244
  return typeof value === "string" && !!value.match(pattern$2.hex);
@@ -7802,7 +7813,17 @@ var Schema = /* @__PURE__ */ function() {
7802
7813
  if (rule.asyncValidator) {
7803
7814
  res = rule.asyncValidator(rule, data.value, cb, data.source, options);
7804
7815
  } else if (rule.validator) {
7805
- res = rule.validator(rule, data.value, cb, data.source, options);
7816
+ try {
7817
+ res = rule.validator(rule, data.value, cb, data.source, options);
7818
+ } catch (error) {
7819
+ console.error == null ? void 0 : console.error(error);
7820
+ if (!options.suppressValidatorError) {
7821
+ setTimeout(function() {
7822
+ throw error;
7823
+ }, 0);
7824
+ }
7825
+ cb(error.message);
7826
+ }
7806
7827
  if (res === true) {
7807
7828
  cb();
7808
7829
  } else if (res === false) {
@@ -7923,10 +7944,7 @@ function useFormItemValidate(props, _rules) {
7923
7944
  } else {
7924
7945
  return rule.trigger === triggerVal;
7925
7946
  }
7926
- }).map((_a) => {
7927
- var rule = __objRest(_a, []);
7928
- return rule;
7929
- });
7947
+ }).map(({ ...rule }) => rule);
7930
7948
  };
7931
7949
  const onValidateSuccess = () => {
7932
7950
  validateState.value = "success";
@@ -7999,15 +8017,12 @@ defineComponent({
7999
8017
  props: formItemProps,
8000
8018
  setup(props, ctx) {
8001
8019
  const formContext = inject(FORM_TOKEN);
8002
- const _a = toRefs(props), {
8020
+ const {
8003
8021
  messageType: itemMessageType,
8004
8022
  popPosition: itemPopPosition,
8005
- showFeedback: itemShowFeedback
8006
- } = _a, otherProps = __objRest(_a, [
8007
- "messageType",
8008
- "popPosition",
8009
- "showFeedback"
8010
- ]);
8023
+ showFeedback: itemShowFeedback,
8024
+ ...otherProps
8025
+ } = toRefs(props);
8011
8026
  const {
8012
8027
  label,
8013
8028
  helpTips,
@@ -8037,7 +8052,8 @@ defineComponent({
8037
8052
  labelAlign: formContext.labelAlign
8038
8053
  }));
8039
8054
  provide(LABEL_DATA, labelData);
8040
- const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
8055
+ const context = reactive({
8056
+ ...otherProps,
8041
8057
  showFeedback,
8042
8058
  messageType,
8043
8059
  popPosition,
@@ -8047,7 +8063,7 @@ defineComponent({
8047
8063
  validate,
8048
8064
  resetField,
8049
8065
  clearValidate
8050
- }));
8066
+ });
8051
8067
  provide(FORM_ITEM_TOKEN, context);
8052
8068
  ctx.expose({
8053
8069
  resetField,
@@ -8072,8 +8088,8 @@ defineComponent({
8072
8088
  "extra-info": extraInfo.value
8073
8089
  }, {
8074
8090
  default: () => {
8075
- var _a2, _b;
8076
- return [(_b = (_a2 = ctx.slots).default) == null ? void 0 : _b.call(_a2)];
8091
+ var _a, _b;
8092
+ return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
8077
8093
  }
8078
8094
  })]);
8079
8095
  }
@@ -8374,9 +8390,10 @@ defineComponent({
8374
8390
  value: opt
8375
8391
  });
8376
8392
  } else if (typeof opt === "object") {
8377
- mergedOpt = Object.assign({}, defaultOpt, __spreadProps(__spreadValues({}, opt), {
8393
+ mergedOpt = Object.assign({}, defaultOpt, {
8394
+ ...opt,
8378
8395
  label: opt.name
8379
- }));
8396
+ });
8380
8397
  }
8381
8398
  return createVNode(Checkbox, mergedOpt, null);
8382
8399
  });
@@ -9017,10 +9034,11 @@ var ResizeObserver$1 = defineComponent({
9017
9034
  Object.assign(state, size);
9018
9035
  if (onResize) {
9019
9036
  Promise.resolve().then(() => {
9020
- onResize(__spreadProps(__spreadValues({}, size), {
9037
+ onResize({
9038
+ ...size,
9021
9039
  offsetWidth,
9022
9040
  offsetHeight
9023
- }), target);
9041
+ }, target);
9024
9042
  });
9025
9043
  }
9026
9044
  }
@@ -9083,13 +9101,14 @@ var ResizeObserverContainer = defineComponent({
9083
9101
  position: "relative",
9084
9102
  overflow: "hidden"
9085
9103
  };
9086
- innerStyle.value = __spreadProps(__spreadValues({}, innerStyle.value), {
9104
+ innerStyle.value = {
9105
+ ...innerStyle.value,
9087
9106
  transform: `translateY(${offset2.value}px)`,
9088
9107
  position: "absolute",
9089
9108
  left: 0,
9090
9109
  right: 0,
9091
9110
  top: 0
9092
- });
9111
+ };
9093
9112
  }
9094
9113
  }, {
9095
9114
  immediate: true
@@ -9577,9 +9596,10 @@ var VirtualList = defineComponent({
9577
9596
  const componentStyle = computed(() => {
9578
9597
  let cs = null;
9579
9598
  if (props.height) {
9580
- cs = __spreadValues({
9581
- maxHeight: isVirtual.value ? props.height + "px" : void 0
9582
- }, ScrollStyle);
9599
+ cs = {
9600
+ maxHeight: isVirtual.value ? props.height + "px" : void 0,
9601
+ ...ScrollStyle
9602
+ };
9583
9603
  if (isVirtual.value) {
9584
9604
  cs.overflowY = "hidden";
9585
9605
  if (state.scrollMoving) {
@@ -9715,7 +9735,7 @@ function generateInnerTree(tree2, key = "children", level = 0, path = []) {
9715
9735
  newItem.parentId = parentNode.id;
9716
9736
  }
9717
9737
  if (!newItem[key]) {
9718
- return acc.concat(__spreadProps(__spreadValues({}, newItem), { isLeaf: newItem.isLeaf === false ? false : true }));
9738
+ return acc.concat({ ...newItem, isLeaf: newItem.isLeaf === false ? false : true });
9719
9739
  } else {
9720
9740
  return acc.concat(omit(newItem, "children"), generateInnerTree(newItem[key], key, level, path));
9721
9741
  }
@@ -9725,8 +9745,8 @@ const DEFAULT_CONFIG = {
9725
9745
  expanded: false,
9726
9746
  recursive: true
9727
9747
  };
9728
- const nodeMap = /* @__PURE__ */ new Map();
9729
9748
  function useCore() {
9749
+ const nodeMap = /* @__PURE__ */ new Map();
9730
9750
  return function useCore2(data) {
9731
9751
  const getLevel = (node) => {
9732
9752
  var _a;
@@ -9736,7 +9756,14 @@ function useCore() {
9736
9756
  if (node.isLeaf) {
9737
9757
  return [];
9738
9758
  }
9739
- if (node.id && nodeMap.has(node.id)) {
9759
+ let mapKey = node.id || "";
9760
+ if (userConfig.expanded) {
9761
+ mapKey += "_expanded";
9762
+ }
9763
+ if (userConfig.recursive) {
9764
+ mapKey += "_recursive";
9765
+ }
9766
+ if (node.id && nodeMap.has(mapKey)) {
9740
9767
  const cacheNode = nodeMap.get(node.id);
9741
9768
  if (cacheNode) {
9742
9769
  return cacheNode;
@@ -9760,7 +9787,7 @@ function useCore() {
9760
9787
  });
9761
9788
  };
9762
9789
  const result = [];
9763
- const config = __spreadValues(__spreadValues({}, DEFAULT_CONFIG), userConfig);
9790
+ const config = { ...DEFAULT_CONFIG, ...userConfig };
9764
9791
  const treeData = config.expanded ? getInnerExpendedTree() : data;
9765
9792
  const startIndex = treeData.value.findIndex((item) => item.id === node.id);
9766
9793
  for (let i = startIndex + 1; i < treeData.value.length && getLevel(node) < treeData.value[i].level; i++) {
@@ -9771,7 +9798,7 @@ function useCore() {
9771
9798
  }
9772
9799
  }
9773
9800
  if (node.id) {
9774
- nodeMap.set(node.id, result);
9801
+ nodeMap.set(mapKey, result);
9775
9802
  }
9776
9803
  return result;
9777
9804
  };
@@ -9874,17 +9901,19 @@ function useLazyLoad() {
9874
9901
  };
9875
9902
  };
9876
9903
  }
9877
- const DEFAULT_TREE_PLUGINS = [useCore(), useToggle()];
9904
+ const DEFAULT_TREE_PLUGINS = [useToggle()];
9878
9905
  function useTree(tree2, plugins = [], context) {
9879
9906
  const treeData = ref(generateInnerTree(tree2));
9880
9907
  const core = useCore()(treeData);
9881
9908
  const lazyLode = useLazyLoad()(treeData, core, context);
9882
9909
  const pluginMethods = DEFAULT_TREE_PLUGINS.concat(plugins).reduce((acc, plugin) => {
9883
- return __spreadValues(__spreadValues({}, acc), plugin(treeData, core, context, lazyLode));
9910
+ return { ...acc, ...plugin(treeData, core, context, lazyLode) };
9884
9911
  }, {});
9885
- return __spreadValues({
9886
- treeData
9887
- }, pluginMethods);
9912
+ return {
9913
+ treeData,
9914
+ ...pluginMethods,
9915
+ ...core
9916
+ };
9888
9917
  }
9889
9918
  function useCheck(options = ref({ checkStrategy: "both" })) {
9890
9919
  return function useCheck2(data, core, context) {
@@ -9893,6 +9922,11 @@ function useCheck(options = ref({ checkStrategy: "both" })) {
9893
9922
  setNodeValue(node, "checked", true);
9894
9923
  context.emit("check-change", node);
9895
9924
  };
9925
+ const setNodeValueInAvailable = (node, key, value) => {
9926
+ if (!node.disableCheck) {
9927
+ setNodeValue(node, key, value);
9928
+ }
9929
+ };
9896
9930
  const uncheckNode = (node) => {
9897
9931
  setNodeValue(node, "checked", false);
9898
9932
  context.emit("check-change", node);
@@ -9908,15 +9942,15 @@ function useCheck(options = ref({ checkStrategy: "both" })) {
9908
9942
  let childChecked = checked;
9909
9943
  if (checked) {
9910
9944
  if (!parentNode.checked) {
9911
- setNodeValue(parentNode, "checked", true);
9945
+ setNodeValueInAvailable(parentNode, "checked", true);
9912
9946
  }
9913
9947
  } else {
9914
9948
  const siblingNodes = getChildren(parentNode);
9915
9949
  const checkedSiblingNodes = siblingNodes.filter((item) => item.checked && item.id !== node.id);
9916
9950
  if (checkedSiblingNodes.length === 0) {
9917
- setNodeValue(parentNode, "checked", false);
9951
+ setNodeValueInAvailable(parentNode, "checked", false);
9918
9952
  } else {
9919
- setNodeValue(parentNode, "checked", true);
9953
+ setNodeValueInAvailable(parentNode, "checked", true);
9920
9954
  childChecked = true;
9921
9955
  }
9922
9956
  }
@@ -9930,13 +9964,13 @@ function useCheck(options = ref({ checkStrategy: "both" })) {
9930
9964
  setNodeValue(node, "checked", false);
9931
9965
  context.emit("check-change", node);
9932
9966
  if (["downward", "both"].includes(options.value.checkStrategy)) {
9933
- getChildren(node).forEach((item) => setNodeValue(item, "checked", false));
9967
+ getChildren(node).forEach((item) => setNodeValueInAvailable(item, "checked", false));
9934
9968
  }
9935
9969
  } else {
9936
9970
  setNodeValue(node, "checked", true);
9937
9971
  context.emit("check-change", node);
9938
9972
  if (["downward", "both"].includes(options.value.checkStrategy)) {
9939
- getChildren(node).forEach((item) => setNodeValue(item, "checked", true));
9973
+ getChildren(node).forEach((item) => setNodeValueInAvailable(item, "checked", true));
9940
9974
  }
9941
9975
  }
9942
9976
  if (["upward", "both"].includes(options.value.checkStrategy)) {
@@ -10011,13 +10045,14 @@ function useOperate() {
10011
10045
  if (lastChild) {
10012
10046
  setNodeValue(lastChild, "parentChildNodeCount", children.length + 1);
10013
10047
  }
10014
- const currentNode = ref(__spreadProps(__spreadValues({}, node), {
10048
+ const currentNode = ref({
10049
+ ...node,
10015
10050
  level: getLevel(parentNode) + 1,
10016
10051
  parentId: parentNode.id,
10017
10052
  isLeaf: true,
10018
10053
  parentChildNodeCount: children.length + 1,
10019
10054
  currentIndex: (lastChild == null ? void 0 : lastChild.currentIndex) + 1
10020
- }));
10055
+ });
10021
10056
  if (currentNode.value.id === void 0) {
10022
10057
  currentNode.value.id = randomId();
10023
10058
  }