vue-devui 1.0.0-rc.13 → 1.0.0-rc.16

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 (114) hide show
  1. package/README.md +161 -156
  2. package/alert/index.umd.js +1 -1
  3. package/auto-complete/index.es.js +241 -82
  4. package/auto-complete/index.umd.js +28 -17
  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 +1384 -220
  17. package/date-picker-pro/index.umd.js +25 -14
  18. package/date-picker-pro/style.css +1 -1
  19. package/drawer/index.es.js +4 -17
  20. package/drawer/index.umd.js +1 -1
  21. package/dropdown/index.es.js +4 -22
  22. package/dropdown/index.umd.js +1 -1
  23. package/editable-select/index.es.js +254 -99
  24. package/editable-select/index.umd.js +1 -1
  25. package/editable-select/style.css +1 -1
  26. package/form/index.es.js +85 -71
  27. package/form/index.umd.js +22 -11
  28. package/fullscreen/index.umd.js +1 -1
  29. package/grid/index.es.js +7 -20
  30. package/grid/index.umd.js +1 -1
  31. package/icon/index.umd.js +1 -1
  32. package/image-preview/index.es.js +12 -23
  33. package/image-preview/index.umd.js +1 -1
  34. package/image-preview/style.css +1 -1
  35. package/input/index.es.js +239 -75
  36. package/input/index.umd.js +27 -16
  37. package/input-number/index.es.js +1 -16
  38. package/input-number/index.umd.js +1 -1
  39. package/layout/index.es.js +1 -1
  40. package/layout/index.umd.js +1 -1
  41. package/loading/index.es.js +15 -38
  42. package/loading/index.umd.js +1 -1
  43. package/message/index.d.ts +7 -0
  44. package/message/index.es.js +534 -0
  45. package/message/index.umd.js +1 -0
  46. package/message/package.json +7 -0
  47. package/message/style.css +1 -0
  48. package/modal/index.es.js +11 -43
  49. package/modal/index.umd.js +1 -1
  50. package/notification/index.es.js +16 -22
  51. package/notification/index.umd.js +1 -1
  52. package/nuxt/components/Message.js +3 -0
  53. package/nuxt/components/animationInjectionKey.js +3 -0
  54. package/nuxt/components/messageProps.js +3 -0
  55. package/nuxt/components/roundInjectionKey.js +3 -0
  56. package/nuxt/components/skeletonItemProps.js +3 -0
  57. package/overlay/index.es.js +1 -1
  58. package/overlay/index.umd.js +1 -1
  59. package/package.json +4 -2
  60. package/pagination/index.es.js +152 -2
  61. package/pagination/index.umd.js +1 -1
  62. package/panel/index.umd.js +1 -1
  63. package/popover/index.es.js +1 -1
  64. package/popover/index.umd.js +4 -4
  65. package/progress/index.umd.js +3 -3
  66. package/radio/index.es.js +91 -75
  67. package/radio/index.umd.js +28 -17
  68. package/radio/style.css +1 -1
  69. package/rate/index.umd.js +1 -1
  70. package/result/index.umd.js +1 -1
  71. package/ripple/index.es.js +5 -18
  72. package/ripple/index.umd.js +1 -1
  73. package/search/index.es.js +255 -78
  74. package/search/index.umd.js +27 -16
  75. package/search/style.css +1 -1
  76. package/select/index.es.js +283 -114
  77. package/select/index.umd.js +27 -16
  78. package/select/style.css +1 -1
  79. package/skeleton/index.es.js +87 -261
  80. package/skeleton/index.umd.js +1 -1
  81. package/skeleton/style.css +1 -1
  82. package/slider/index.umd.js +1 -1
  83. package/splitter/index.es.js +175 -32
  84. package/splitter/index.umd.js +13 -13
  85. package/statistic/index.es.js +0 -21
  86. package/statistic/index.umd.js +1 -1
  87. package/status/index.umd.js +1 -1
  88. package/steps/index.umd.js +1 -1
  89. package/style.css +1 -1
  90. package/switch/index.es.js +85 -71
  91. package/switch/index.umd.js +25 -14
  92. package/table/index.es.js +309 -96
  93. package/table/index.umd.js +25 -14
  94. package/table/style.css +1 -1
  95. package/tabs/index.umd.js +1 -1
  96. package/tag/index.umd.js +1 -1
  97. package/textarea/index.es.js +88 -72
  98. package/textarea/index.umd.js +26 -15
  99. package/time-picker/index.es.js +248 -89
  100. package/time-picker/index.umd.js +25 -14
  101. package/time-select/index.es.js +283 -114
  102. package/time-select/index.umd.js +26 -15
  103. package/time-select/style.css +1 -1
  104. package/timeline/index.umd.js +1 -1
  105. package/tooltip/index.es.js +1 -1
  106. package/tooltip/index.umd.js +4 -4
  107. package/tree/index.es.js +422 -110
  108. package/tree/index.umd.js +25 -14
  109. package/tree/style.css +1 -1
  110. package/upload/index.es.js +168 -49
  111. package/upload/index.umd.js +1 -1
  112. package/vue-devui.es.js +13601 -13023
  113. package/vue-devui.umd.js +32 -21
  114. package/LICENSE +0 -23
package/input/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 { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, watch, provide, reactive, onUnmounted, Transition, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, getCurrentInstance, shallowRef } from "vue";
1
+ import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, watch, provide, reactive, onUnmounted, Transition, ref, nextTick, unref, Comment, Text, Fragment, h, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, getCurrentInstance, shallowRef } from "vue";
33
2
  import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
34
3
  const DEFAULT_PREFIX = "icon";
35
4
  const iconProps = {
@@ -1071,7 +1040,7 @@ var lodash = { exports: {} };
1071
1040
  var objectCtorString = funcToString.call(Object2);
1072
1041
  var oldDash = root._;
1073
1042
  var reIsNative = RegExp2("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
1074
- 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;
1043
+ 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;
1075
1044
  var defineProperty = function() {
1076
1045
  try {
1077
1046
  var func = getNative(Object2, "defineProperty");
@@ -1081,11 +1050,11 @@ var lodash = { exports: {} };
1081
1050
  }
1082
1051
  }();
1083
1052
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
1084
- 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;
1085
- var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
1086
- var metaMap = WeakMap2 && new WeakMap2();
1053
+ 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;
1054
+ 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");
1055
+ var metaMap = WeakMap && new WeakMap();
1087
1056
  var realNames = {};
1088
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap2);
1057
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
1089
1058
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined$1, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined$1, symbolToString = symbolProto ? symbolProto.toString : undefined$1;
1090
1059
  function lodash2(value) {
1091
1060
  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
@@ -1540,7 +1509,7 @@ var lodash = { exports: {} };
1540
1509
  if (typeof func != "function") {
1541
1510
  throw new TypeError2(FUNC_ERROR_TEXT);
1542
1511
  }
1543
- return setTimeout(function() {
1512
+ return setTimeout2(function() {
1544
1513
  func.apply(undefined$1, args);
1545
1514
  }, wait);
1546
1515
  }
@@ -2333,7 +2302,7 @@ var lodash = { exports: {} };
2333
2302
  }
2334
2303
  function cloneArrayBuffer(arrayBuffer) {
2335
2304
  var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
2336
- new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
2305
+ new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
2337
2306
  return result2;
2338
2307
  }
2339
2308
  function cloneDataView(dataView, isDeep) {
@@ -2777,8 +2746,8 @@ var lodash = { exports: {} };
2777
2746
  return func(number4);
2778
2747
  };
2779
2748
  }
2780
- var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
2781
- return new Set(values2);
2749
+ var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values2) {
2750
+ return new Set2(values2);
2782
2751
  };
2783
2752
  function createToPairs(keysFunc) {
2784
2753
  return function(object4) {
@@ -2915,7 +2884,7 @@ var lodash = { exports: {} };
2915
2884
  object4 = object4.buffer;
2916
2885
  other = other.buffer;
2917
2886
  case arrayBufferTag:
2918
- if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object4), new Uint8Array2(other))) {
2887
+ if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
2919
2888
  return false;
2920
2889
  }
2921
2890
  return true;
@@ -3077,7 +3046,7 @@ var lodash = { exports: {} };
3077
3046
  return result2;
3078
3047
  };
3079
3048
  var getTag = baseGetTag;
3080
- if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
3049
+ 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) {
3081
3050
  getTag = function(value) {
3082
3051
  var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined$1, ctorString = Ctor ? toSource(Ctor) : "";
3083
3052
  if (ctorString) {
@@ -3349,7 +3318,7 @@ var lodash = { exports: {} };
3349
3318
  return object4[key];
3350
3319
  }
3351
3320
  var setData = shortOut(baseSetData);
3352
- var setTimeout = ctxSetTimeout || function(func, wait) {
3321
+ var setTimeout2 = ctxSetTimeout || function(func, wait) {
3353
3322
  return root.setTimeout(func, wait);
3354
3323
  };
3355
3324
  var setToString = shortOut(baseSetToString);
@@ -4141,7 +4110,7 @@ var lodash = { exports: {} };
4141
4110
  }
4142
4111
  function leadingEdge(time) {
4143
4112
  lastInvokeTime = time;
4144
- timerId = setTimeout(timerExpired, wait);
4113
+ timerId = setTimeout2(timerExpired, wait);
4145
4114
  return leading ? invokeFunc(time) : result2;
4146
4115
  }
4147
4116
  function remainingWait(time) {
@@ -4157,7 +4126,7 @@ var lodash = { exports: {} };
4157
4126
  if (shouldInvoke(time)) {
4158
4127
  return trailingEdge(time);
4159
4128
  }
4160
- timerId = setTimeout(timerExpired, remainingWait(time));
4129
+ timerId = setTimeout2(timerExpired, remainingWait(time));
4161
4130
  }
4162
4131
  function trailingEdge(time) {
4163
4132
  timerId = undefined$1;
@@ -4188,12 +4157,12 @@ var lodash = { exports: {} };
4188
4157
  }
4189
4158
  if (maxing) {
4190
4159
  clearTimeout(timerId);
4191
- timerId = setTimeout(timerExpired, wait);
4160
+ timerId = setTimeout2(timerExpired, wait);
4192
4161
  return invokeFunc(lastCallTime);
4193
4162
  }
4194
4163
  }
4195
4164
  if (timerId === undefined$1) {
4196
- timerId = setTimeout(timerExpired, wait);
4165
+ timerId = setTimeout2(timerExpired, wait);
4197
4166
  }
4198
4167
  return result2;
4199
4168
  }
@@ -5794,7 +5763,10 @@ function useFormValidation(itemContexts) {
5794
5763
  try {
5795
5764
  await field.validate("");
5796
5765
  } catch (err) {
5797
- errors = __spreadValues(__spreadValues({}, errors), err);
5766
+ errors = {
5767
+ ...errors,
5768
+ ...err
5769
+ };
5798
5770
  }
5799
5771
  }
5800
5772
  if (!Object.keys(errors).length) {
@@ -5851,11 +5823,12 @@ defineComponent({
5851
5823
  }, {
5852
5824
  deep: true
5853
5825
  });
5854
- provide(FORM_TOKEN, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
5826
+ provide(FORM_TOKEN, reactive({
5827
+ ...toRefs(props),
5855
5828
  emit: ctx.emit,
5856
5829
  addItemContext,
5857
5830
  removeItemContext
5858
- })));
5831
+ }));
5859
5832
  ctx.expose({
5860
5833
  validate,
5861
5834
  validateFields,
@@ -6693,7 +6666,7 @@ var FormControl = defineComponent({
6693
6666
  }
6694
6667
  });
6695
6668
  function _extends() {
6696
- _extends = Object.assign || function(target) {
6669
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
6697
6670
  for (var i = 1; i < arguments.length; i++) {
6698
6671
  var source = arguments[i];
6699
6672
  for (var key in source) {
@@ -6712,13 +6685,13 @@ function _inheritsLoose(subClass, superClass) {
6712
6685
  _setPrototypeOf(subClass, superClass);
6713
6686
  }
6714
6687
  function _getPrototypeOf(o) {
6715
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
6688
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
6716
6689
  return o2.__proto__ || Object.getPrototypeOf(o2);
6717
6690
  };
6718
6691
  return _getPrototypeOf(o);
6719
6692
  }
6720
6693
  function _setPrototypeOf(o, p) {
6721
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
6694
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
6722
6695
  o2.__proto__ = p2;
6723
6696
  return o2;
6724
6697
  };
@@ -6741,7 +6714,7 @@ function _isNativeReflectConstruct() {
6741
6714
  }
6742
6715
  function _construct(Parent, args, Class) {
6743
6716
  if (_isNativeReflectConstruct()) {
6744
- _construct = Reflect.construct;
6717
+ _construct = Reflect.construct.bind();
6745
6718
  } else {
6746
6719
  _construct = function _construct2(Parent2, args2, Class2) {
6747
6720
  var a = [null];
@@ -7019,9 +6992,45 @@ var whitespace = function whitespace2(rule, value, source, errors, options) {
7019
6992
  errors.push(format(options.messages.whitespace, rule.fullField));
7020
6993
  }
7021
6994
  };
6995
+ var urlReg;
6996
+ var getUrlRegex = function() {
6997
+ if (urlReg) {
6998
+ return urlReg;
6999
+ }
7000
+ var word = "[a-fA-F\\d:]";
7001
+ var b = function b2(options) {
7002
+ return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : "";
7003
+ };
7004
+ 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}";
7005
+ var v6seg = "[a-fA-F\\d]{1,4}";
7006
+ 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();
7007
+ var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)");
7008
+ var v4exact = new RegExp("^" + v4 + "$");
7009
+ var v6exact = new RegExp("^" + v6 + "$");
7010
+ var ip = function ip2(options) {
7011
+ return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", "g");
7012
+ };
7013
+ ip.v4 = function(options) {
7014
+ return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), "g");
7015
+ };
7016
+ ip.v6 = function(options) {
7017
+ return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), "g");
7018
+ };
7019
+ var protocol = "(?:(?:[a-z]+:)?//)";
7020
+ var auth = "(?:\\S+(?::\\S*)?@)?";
7021
+ var ipv4 = ip.v4().source;
7022
+ var ipv6 = ip.v6().source;
7023
+ var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)";
7024
+ var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*";
7025
+ var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";
7026
+ var port = "(?::\\d{2,5})?";
7027
+ var path = '(?:[/?#][^\\s"]*)?';
7028
+ var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path;
7029
+ urlReg = new RegExp("(?:^" + regex + "$)", "i");
7030
+ return urlReg;
7031
+ };
7022
7032
  var pattern$2 = {
7023
7033
  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,}))$/,
7024
- 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"),
7025
7034
  hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
7026
7035
  };
7027
7036
  var types = {
@@ -7063,7 +7072,7 @@ var types = {
7063
7072
  return typeof value === "string" && value.length <= 320 && !!value.match(pattern$2.email);
7064
7073
  },
7065
7074
  url: function url(value) {
7066
- return typeof value === "string" && value.length <= 2048 && !!value.match(pattern$2.url);
7075
+ return typeof value === "string" && value.length <= 2048 && !!value.match(getUrlRegex());
7067
7076
  },
7068
7077
  hex: function hex(value) {
7069
7078
  return typeof value === "string" && !!value.match(pattern$2.hex);
@@ -7638,7 +7647,17 @@ var Schema = /* @__PURE__ */ function() {
7638
7647
  if (rule.asyncValidator) {
7639
7648
  res = rule.asyncValidator(rule, data.value, cb, data.source, options);
7640
7649
  } else if (rule.validator) {
7641
- res = rule.validator(rule, data.value, cb, data.source, options);
7650
+ try {
7651
+ res = rule.validator(rule, data.value, cb, data.source, options);
7652
+ } catch (error) {
7653
+ console.error == null ? void 0 : console.error(error);
7654
+ if (!options.suppressValidatorError) {
7655
+ setTimeout(function() {
7656
+ throw error;
7657
+ }, 0);
7658
+ }
7659
+ cb(error.message);
7660
+ }
7642
7661
  if (res === true) {
7643
7662
  cb();
7644
7663
  } else if (res === false) {
@@ -7759,10 +7778,7 @@ function useFormItemValidate(props, _rules) {
7759
7778
  } else {
7760
7779
  return rule.trigger === triggerVal;
7761
7780
  }
7762
- }).map((_a) => {
7763
- var rule = __objRest(_a, []);
7764
- return rule;
7765
- });
7781
+ }).map(({ ...rule }) => rule);
7766
7782
  };
7767
7783
  const onValidateSuccess = () => {
7768
7784
  validateState.value = "success";
@@ -7835,15 +7851,12 @@ defineComponent({
7835
7851
  props: formItemProps,
7836
7852
  setup(props, ctx) {
7837
7853
  const formContext = inject(FORM_TOKEN);
7838
- const _a = toRefs(props), {
7854
+ const {
7839
7855
  messageType: itemMessageType,
7840
7856
  popPosition: itemPopPosition,
7841
- showFeedback: itemShowFeedback
7842
- } = _a, otherProps = __objRest(_a, [
7843
- "messageType",
7844
- "popPosition",
7845
- "showFeedback"
7846
- ]);
7857
+ showFeedback: itemShowFeedback,
7858
+ ...otherProps
7859
+ } = toRefs(props);
7847
7860
  const {
7848
7861
  label,
7849
7862
  helpTips,
@@ -7873,7 +7886,8 @@ defineComponent({
7873
7886
  labelAlign: formContext.labelAlign
7874
7887
  }));
7875
7888
  provide(LABEL_DATA, labelData);
7876
- const context = reactive(__spreadProps(__spreadValues({}, otherProps), {
7889
+ const context = reactive({
7890
+ ...otherProps,
7877
7891
  showFeedback,
7878
7892
  messageType,
7879
7893
  popPosition,
@@ -7883,7 +7897,7 @@ defineComponent({
7883
7897
  validate,
7884
7898
  resetField,
7885
7899
  clearValidate
7886
- }));
7900
+ });
7887
7901
  provide(FORM_ITEM_TOKEN, context);
7888
7902
  ctx.expose({
7889
7903
  resetField,
@@ -7908,8 +7922,8 @@ defineComponent({
7908
7922
  "extra-info": extraInfo.value
7909
7923
  }, {
7910
7924
  default: () => {
7911
- var _a2, _b;
7912
- return [(_b = (_a2 = ctx.slots).default) == null ? void 0 : _b.call(_a2)];
7925
+ var _a, _b;
7926
+ return [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)];
7913
7927
  }
7914
7928
  })]);
7915
7929
  }
@@ -7947,7 +7961,7 @@ function useInputRender(props, ctx) {
7947
7961
  const slots = ctx.slots;
7948
7962
  const inputDisabled = computed(() => disabled.value || (formContext == null ? void 0 : formContext.disabled));
7949
7963
  const inputSize = computed(() => (size == null ? void 0 : size.value) || (formContext == null ? void 0 : formContext.size) || "");
7950
- const _a = ctx.attrs, { style, class: customClass } = _a, otherAttrs = __objRest(_a, ["style", "class"]);
7964
+ const { style, class: customClass, ...otherAttrs } = ctx.attrs;
7951
7965
  const customStyle = { style };
7952
7966
  const wrapClasses = computed(() => ({
7953
7967
  [ns2.e("wrapper")]: true,
@@ -8015,6 +8029,155 @@ function useInputFunction(input2) {
8015
8029
  return { select, focus, blur };
8016
8030
  }
8017
8031
  var input = "";
8032
+ function deepAssign(...objects) {
8033
+ const isObject2 = (obj) => obj && typeof obj === "object";
8034
+ return objects.reduce((prev, from) => {
8035
+ Object.keys(from).forEach((key) => {
8036
+ const pVal = prev[key];
8037
+ const oVal = from[key];
8038
+ if (Array.isArray(pVal) && Array.isArray(oVal)) {
8039
+ prev[key] = Array.from(/* @__PURE__ */ new Set([...oVal, ...pVal]));
8040
+ } else if (isObject2(pVal) && isObject2(oVal)) {
8041
+ prev[key] = deepAssign(pVal, oVal);
8042
+ } else {
8043
+ prev[key] = oVal;
8044
+ }
8045
+ });
8046
+ return prev;
8047
+ }, {});
8048
+ }
8049
+ var zhCN = {
8050
+ pagination: {
8051
+ totalItemText: "\u6240\u6709\u6761\u76EE",
8052
+ goToText: "\u8DF3\u81F3"
8053
+ },
8054
+ accordion: {
8055
+ loading: "\u52A0\u8F7D\u4E2D",
8056
+ noData: "\u6CA1\u6709\u6570\u636E"
8057
+ },
8058
+ autoCompleteDropdown: {
8059
+ latestInput: "\u6700\u8FD1\u8F93\u5165"
8060
+ },
8061
+ cascaderList: {
8062
+ noData: "\u6CA1\u6709\u6570\u636E"
8063
+ },
8064
+ colorPicker: {
8065
+ foundationPanel: "\u57FA\u7840\u9762\u677F",
8066
+ advancedPanel: "\u9AD8\u7EA7\u9762\u677F"
8067
+ },
8068
+ datePickerPro: {
8069
+ ok: "\u786E\u5B9A",
8070
+ placeholder: "\u8BF7\u9009\u62E9\u65E5\u671F",
8071
+ month1: "1\u6708",
8072
+ month2: "2\u6708",
8073
+ month3: "3\u6708",
8074
+ month4: "4\u6708",
8075
+ month5: "5\u6708",
8076
+ month6: "6\u6708",
8077
+ month7: "7\u6708",
8078
+ month8: "8\u6708",
8079
+ month9: "9\u6708",
8080
+ month10: "10\u6708",
8081
+ month11: "11\u6708",
8082
+ month12: "12\u6708",
8083
+ year: "\u5E74",
8084
+ startPlaceholder: "\u8BF7\u9009\u62E9\u5F00\u59CB\u65E5\u671F",
8085
+ endPlaceholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65E5\u671F",
8086
+ getWeekDays() {
8087
+ return ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"];
8088
+ },
8089
+ getTimeArr() {
8090
+ return ["\u65F6", "\u5206", "\u79D2"];
8091
+ },
8092
+ getYearMonthStr(year, month) {
8093
+ return `${year}\u5E74${month}\u6708`;
8094
+ }
8095
+ },
8096
+ editableSelect: {
8097
+ noRelatedRecords: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8098
+ noData: "\u6CA1\u6709\u6570\u636E"
8099
+ },
8100
+ input: {
8101
+ placeholder: "\u8BF7\u8F93\u5165"
8102
+ },
8103
+ splitterBar: {
8104
+ collapse: "\u6536\u8D77",
8105
+ expand: "\u5C55\u5F00"
8106
+ },
8107
+ stepsGuide: {
8108
+ previous: "\u4E0A\u4E00\u6B65",
8109
+ continue: "\u6211\u77E5\u9053\u5566\uFF0C\u7EE7\u7EED",
8110
+ ok: "\u6211\u77E5\u9053\u5566"
8111
+ },
8112
+ table: {
8113
+ selectAll: "\u5168\u9009",
8114
+ ok: "\u786E\u5B9A"
8115
+ },
8116
+ timePopup: {
8117
+ ok: "\u786E\u5B9A"
8118
+ },
8119
+ transfer: {
8120
+ unit: "\u9879",
8121
+ panelUnit: "\u9879",
8122
+ headerUnit: "\u9879",
8123
+ noData: "\u6682\u65E0\u6570\u636E",
8124
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22"
8125
+ },
8126
+ tree: {
8127
+ loading: "\u52A0\u8F7D\u4E2D",
8128
+ newNode: "\u65B0\u8282\u70B9",
8129
+ selectPlaceholder: "\u8BF7\u9009\u62E9"
8130
+ },
8131
+ upload: {
8132
+ placeholder: "\u9009\u62E9\u6587\u4EF6",
8133
+ getExistSameNameFilesMsg(sameNames) {
8134
+ return `\u60A8\u4E0A\u4F20\u7684 "${sameNames}" \u5B58\u5728\u91CD\u540D\u6587\u4EF6, \u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
8135
+ },
8136
+ getAllFilesBeyondMaximalFileSizeMsg(maximalSize) {
8137
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u672C\u6B21\u4E0A\u4F20\u7684\u6240\u6709\u6587\u4EF6\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
8138
+ },
8139
+ getBeyondMaximalFileSizeMsg(filename, maximalSize) {
8140
+ return `\u6700\u5927\u652F\u6301\u4E0A\u4F20${maximalSize}MB\u7684\u6587\u4EF6, \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u8D85\u8FC7\u53EF\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F`;
8141
+ },
8142
+ getNotAllowedFileTypeMsg(filename, scope) {
8143
+ return `\u652F\u6301\u7684\u6587\u4EF6\u7C7B\u578B: "${scope}", \u60A8\u4E0A\u4F20\u7684\u6587\u4EF6"${filename}"\u4E0D\u5728\u5141\u8BB8\u8303\u56F4\u5185\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6`;
8144
+ }
8145
+ },
8146
+ search: {
8147
+ placeholder: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57"
8148
+ },
8149
+ select: {
8150
+ placeholder: "\u8BF7\u9009\u62E9",
8151
+ noDataText: "\u65E0\u6570\u636E",
8152
+ noMatchText: "\u627E\u4E0D\u5230\u76F8\u5173\u8BB0\u5F55",
8153
+ loadingText: "\u52A0\u8F7D\u4E2D..."
8154
+ },
8155
+ tagInput: {
8156
+ maxTagsText: "\u5DF2\u8FBE\u5230\u6700\u5927\u4E2A\u6570\uFF1A"
8157
+ },
8158
+ timeSelect: {
8159
+ placeholder: "\u8BF7\u9009\u62E9\u65F6\u95F4"
8160
+ }
8161
+ };
8162
+ const lang = ref("zh-CN");
8163
+ let langMessages = reactive({
8164
+ [lang.value]: zhCN
8165
+ });
8166
+ const Locale = {
8167
+ messages() {
8168
+ return langMessages[lang.value];
8169
+ },
8170
+ lang() {
8171
+ return lang.value;
8172
+ },
8173
+ use(newLang, newMessages2) {
8174
+ lang.value = newLang;
8175
+ this.add({ [newLang]: newMessages2 });
8176
+ },
8177
+ add(newMessages2 = {}) {
8178
+ langMessages = deepAssign(langMessages, newMessages2);
8179
+ }
8180
+ };
8018
8181
  const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
8019
8182
  function get(object4, path) {
8020
8183
  const keys = path.split(".");
@@ -8028,7 +8191,8 @@ function get(object4, path) {
8028
8191
  function createI18nTranslate(name, app, newPrefix) {
8029
8192
  const prefix = newPrefix || camelize(name) + ".";
8030
8193
  return (path) => {
8031
- const messages2 = app == null ? void 0 : app.appContext.config.globalProperties.langMessages.value;
8194
+ var _a;
8195
+ const messages2 = ((_a = app == null ? void 0 : app.appContext.config.globalProperties.langMessages) == null ? void 0 : _a.value) || Locale.messages();
8032
8196
  const message = get(messages2, prefix + path) || get(messages2, path);
8033
8197
  return message;
8034
8198
  };