@unicom-cloud/ui 0.8.70 → 0.8.71

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 (257) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +2 -2
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +2 -2
  5. package/Badge.js +2 -2
  6. package/Breadcrumb.js +2 -2
  7. package/Button.js +1 -1
  8. package/Calendar.js +1 -1
  9. package/Card.js +1 -1
  10. package/Carousel.js +1 -1
  11. package/Cascader.js +1 -1
  12. package/Checkbox.js +1 -1
  13. package/Collapse.js +1 -1
  14. package/ColorPicker.js +1 -1
  15. package/Comment.js +1 -1
  16. package/ConfigProvider.js +1 -1
  17. package/Copy.js +1 -1
  18. package/DatePicker.js +1 -1
  19. package/Descriptions.js +1 -1
  20. package/Divider.js +1 -1
  21. package/Draggable.js +1 -1
  22. package/Dropdown.js +2 -2
  23. package/Empty.js +1 -1
  24. package/Icon.js +1 -1
  25. package/IconHover.js +1 -1
  26. package/Image.js +1 -1
  27. package/InputNumber.js +1 -1
  28. package/Layout.js +1 -1
  29. package/Link.js +1 -1
  30. package/List.js +1 -1
  31. package/Mentions.js +1 -1
  32. package/Menu.js +1 -1
  33. package/Message.js +2 -2
  34. package/Modal.js +1 -1
  35. package/Notice.js +2 -2
  36. package/Notification.js +2 -2
  37. package/OverflowEllipsis.js +1 -1
  38. package/PageHeader.js +1 -1
  39. package/Popconfirm.js +1 -1
  40. package/Popover.js +1 -1
  41. package/Progress.js +1 -1
  42. package/Radio.js +1 -1
  43. package/Rate.js +1 -1
  44. package/ResizeBox.js +1 -1
  45. package/Result.js +1 -1
  46. package/Skeleton.js +1 -1
  47. package/Slider.js +1 -1
  48. package/Space.js +1 -1
  49. package/SpeechSynthesis.js +3 -3
  50. package/Spin.js +1 -1
  51. package/Statistic.js +1 -1
  52. package/Steps.js +1 -1
  53. package/Switch.js +2 -2
  54. package/Table.js +1 -1
  55. package/Tabs.js +1 -1
  56. package/Tag.js +1 -1
  57. package/Tooltip.js +1 -1
  58. package/Transfer.js +1 -1
  59. package/Tree.js +1 -1
  60. package/Trigger.js +3 -3
  61. package/affix/index.js +1 -1
  62. package/alert/index.js +2 -2
  63. package/anchor/Anchor.js +1 -1
  64. package/anchor/Link.js +1 -1
  65. package/auto-complete/index.js +1 -1
  66. package/avatar/Avatar.js +1 -1
  67. package/avatar/Group.js +1 -1
  68. package/back-top/index.js +2 -2
  69. package/badge/Count.js +1 -1
  70. package/badge/index.js +2 -2
  71. package/breadcrumb/index.js +2 -2
  72. package/button/Group.js +1 -1
  73. package/button/index.js +1 -1
  74. package/calendar/index.js +2 -2
  75. package/card/Grid.js +1 -1
  76. package/card/Meta.js +1 -1
  77. package/card/index.js +1 -1
  78. package/carousel/Arrow.js +1 -1
  79. package/carousel/Indicator.js +1 -1
  80. package/carousel/index.js +1 -1
  81. package/cascader/Cascader.js +2 -2
  82. package/cascader/index.js +1 -1
  83. package/cascader/util.js +1 -1
  84. package/checkbox/Checkbox.js +2 -2
  85. package/checkbox/Group.js +2 -2
  86. package/checkbox/index.js +1 -1
  87. package/chunk/{Cm9BS47C.js → 8V534cS3.js} +3 -3
  88. package/chunk/{CCv-5KFt.js → BHL-PzAD.js} +149 -152
  89. package/chunk/{B80D01PB.js → BlElSWJg.js} +2 -2
  90. package/chunk/{Bh8AO6R8.js → BzPNDYAX.js} +1 -1
  91. package/chunk/{tIRvN_q7.js → C5X9bDyX.js} +3 -3
  92. package/chunk/C6AJxF7d.js +1820 -0
  93. package/chunk/CQTxhsUk.js +170 -0
  94. package/chunk/{DFf75sXd.js → CUs1AOCZ.js} +2 -2
  95. package/chunk/{CASwN1hB.js → CZWGeRVA.js} +188 -183
  96. package/chunk/{C48SmsN-.js → ClaNycDy.js} +27 -18
  97. package/chunk/{-C2QiGwq.js → D2DSUGNT.js} +1 -1
  98. package/chunk/{DonYzv30.js → DV7ywe_q.js} +1 -1
  99. package/chunk/{YUHbzjGj.js → Dm1NCTkX.js} +3 -3
  100. package/chunk/{CSk3yQDO.js → EHx6bIK_.js} +3 -3
  101. package/chunk/{iOWILwNv.js → I1dqAgn_.js} +3 -3
  102. package/chunk/{DzVH9IBy.js → fFjj2KuF.js} +1 -1
  103. package/chunk/{bgmEVbGy.js → pEI3aB9Z.js} +2 -2
  104. package/collapse/Collapse.js +2 -2
  105. package/collapse/Item.js +3 -3
  106. package/collapse/index.js +1 -1
  107. package/color-picker/ControlBar.js +1 -1
  108. package/color-picker/InputAlpha.js +1 -1
  109. package/color-picker/InputHex.js +1 -1
  110. package/color-picker/InputRgb.js +1 -1
  111. package/color-picker/Palette.js +1 -1
  112. package/color-picker/Panel.js +2 -2
  113. package/color-picker/index.js +1 -1
  114. package/comment/index.js +1 -1
  115. package/config-provider/ConfigProvider.js +1 -1
  116. package/config-provider/context.js +1 -1
  117. package/config-provider/index.js +2 -2
  118. package/copy/index.js +1 -1
  119. package/date-picker/Picker.js +1 -1
  120. package/date-picker/PickerRange.js +2 -2
  121. package/date-picker/index.js +1 -1
  122. package/descriptions/index.js +1 -1
  123. package/divider/index.js +1 -1
  124. package/draggable/index.js +1 -1
  125. package/drawer/Drawer.js +3 -3
  126. package/dropdown/Button.js +1 -1
  127. package/dropdown/index.js +2 -2
  128. package/empty/index.js +1 -1
  129. package/form/Form.js +1 -1
  130. package/form/FormItem.js +2 -2
  131. package/form/util.js +11 -11
  132. package/grid/Col.js +1 -1
  133. package/grid/Row.js +1 -1
  134. package/grid/grid-item.js +1 -1
  135. package/grid/grid.js +1 -1
  136. package/hooks/index.js +1 -1
  137. package/hooks/useOverrideRef.js +1 -1
  138. package/icon/index.js +1 -1
  139. package/icon-hover/index.js +1 -1
  140. package/image/Image.js +2 -2
  141. package/image/ImagePreview.js +4 -4
  142. package/image/ImagePreviewArrow.js +1 -1
  143. package/image/ImagePreviewGroup.js +1 -1
  144. package/image/index.js +1 -1
  145. package/index.js +16 -16
  146. package/input/Group.js +1 -1
  147. package/input/Input.js +1 -1
  148. package/input/InputElement.js +1 -1
  149. package/input/Password.js +1 -1
  150. package/input/Search.js +1 -1
  151. package/input/Textarea.js +1 -1
  152. package/input-number/index.js +1 -1
  153. package/input-tag/InputTag.js +2 -2
  154. package/layout/Content.js +1 -1
  155. package/layout/Footer.js +1 -1
  156. package/layout/Header.js +1 -1
  157. package/layout/Sider.js +1 -1
  158. package/layout/index.js +1 -1
  159. package/link/index.js +1 -1
  160. package/list/Item.js +1 -1
  161. package/list/Meta.js +1 -1
  162. package/list/index.js +1 -1
  163. package/locale/en-US.js +1 -1
  164. package/locale/tr-TR.js +1 -1
  165. package/mentions/index.js +1 -1
  166. package/menu/Menu.js +2 -2
  167. package/menu/OverflowWrap.js +1 -1
  168. package/menu/index.js +2 -2
  169. package/message/index.js +2 -2
  170. package/message/useMessage.js +1 -1
  171. package/modal/Confirm.js +2 -2
  172. package/modal/Modal.js +4 -4
  173. package/modal/index.js +1 -1
  174. package/notice/index.js +2 -2
  175. package/notification/index.js +2 -2
  176. package/notification/useNotification.js +1 -1
  177. package/overflow-ellipsis/OverflowItem.js +1 -1
  178. package/overflow-ellipsis/index.js +1 -1
  179. package/package.json +1 -1
  180. package/page-header/index.js +1 -1
  181. package/pagination/PageItem.js +1 -1
  182. package/pagination/PageJumper.js +1 -1
  183. package/pagination/PageOption.js +1 -1
  184. package/pagination/Pagination.js +1 -1
  185. package/picker/Input.js +1 -1
  186. package/picker/InputRange.js +1 -1
  187. package/popconfirm/index.js +1 -1
  188. package/popover/index.js +1 -1
  189. package/progress/index.js +1 -1
  190. package/radio/Group.js +2 -2
  191. package/radio/Radio.js +2 -2
  192. package/radio/index.js +2 -2
  193. package/rate/index.js +1 -1
  194. package/resize-box/ResizeTrigger.js +1 -1
  195. package/resize-box/Split.js +1 -1
  196. package/resize-box/SplitGroup.js +1 -1
  197. package/resize-box/index.js +1 -1
  198. package/result/index.js +1 -1
  199. package/select/Option.js +1 -1
  200. package/select/Select.js +2 -2
  201. package/select-view/Core.js +1 -1
  202. package/skeleton/index.js +1 -1
  203. package/slider/Button.js +1 -1
  204. package/slider/index.js +1 -1
  205. package/space/index.js +1 -1
  206. package/speech-synthesis/index.js +39 -39
  207. package/spin/DotLoading.js +1 -1
  208. package/spin/index.js +1 -1
  209. package/statistic/Countdown.js +1 -1
  210. package/statistic/index.js +1 -1
  211. package/steps/index.js +1 -1
  212. package/switch/index.js +2 -2
  213. package/table/Table.js +2 -2
  214. package/table/index.js +3 -3
  215. package/tabs/Tab.js +2 -2
  216. package/tabs/TabContent.js +2 -2
  217. package/tabs/TabPane.js +1 -1
  218. package/tabs/index.js +2 -2
  219. package/tag/index.js +1 -1
  220. package/time-picker/Picker.js +1 -1
  221. package/time-picker/TimePicker.js +1 -1
  222. package/timeline/Item.js +1 -1
  223. package/timeline/Timeline.js +1 -1
  224. package/tooltip/index.js +1 -1
  225. package/transfer/Item.js +2 -2
  226. package/transfer/List.js +2 -2
  227. package/transfer/index.js +1 -1
  228. package/tree/Animation.js +3 -3
  229. package/tree/Node.js +3 -3
  230. package/tree/NodeList.js +1 -1
  231. package/tree/Tree.js +2 -2
  232. package/tree/index.js +1 -1
  233. package/tree-select/Select.js +1 -1
  234. package/trigger/index.js +3 -3
  235. package/types/locale/en-US.d.ts +12 -12
  236. package/types/locale/tr-TR.d.ts +12 -12
  237. package/types/table/interface.d.ts +3 -1
  238. package/types/utils/react19Adapter.d.ts +1 -0
  239. package/typography/Base.js +1 -1
  240. package/typography/Ellipsis.js +11 -11
  241. package/typography/Paragraph.js +1 -1
  242. package/typography/Typography.js +1 -1
  243. package/typography/index.js +11 -11
  244. package/upload/TriggerNode.js +1 -1
  245. package/upload/Upload.js +2 -2
  246. package/upload/Uploader.js +2 -2
  247. package/utils/CSSTransition.js +1 -1
  248. package/utils/contextHolder.js +1 -1
  249. package/utils/index.js +4 -4
  250. package/utils/react19Adapter.js +3 -0
  251. package/utils/reactDOM.js +1 -1
  252. package/verification-code/VerificationCode.js +1 -1
  253. package/version/index.js +1 -1
  254. package/virtual-list/VirtualList.js +1 -1
  255. package/watermark/Watermark.js +1 -1
  256. package/chunk/DC-pxreh.js +0 -1817
  257. package/chunk/DcYqcuGl.js +0 -166
@@ -1,98 +1,98 @@
1
- import { H as b, z as V, G as w } from "./URXCKjXr.js";
2
- import c from "lodash/isObject.js";
3
- import M from "lodash/isArray.js";
4
- import y from "lodash/isString.js";
5
- import O from "lodash/isNumber.js";
1
+ import { H as c, z as x, G as w } from "./URXCKjXr.js";
2
+ import b from "lodash/isObject.js";
3
+ import p from "lodash/isArray.js";
4
+ import M from "lodash/isString.js";
5
+ import _ from "lodash/isNumber.js";
6
6
  import E from "lodash/isEqual.js";
7
- import S from "lodash/isBoolean.js";
8
- import _ from "lodash/isFunction.js";
9
- const d = "#{field} is not a #{type} type", z = {
10
- required: "#{field} is required",
7
+ import O from "lodash/isBoolean.js";
8
+ import z from "lodash/isFunction.js";
9
+ const S = {
10
+ required: "#{field} 是必填项",
11
11
  type: {
12
- ip: d,
13
- email: d,
14
- url: d,
15
- string: d,
16
- number: d,
17
- array: d,
18
- object: d,
19
- boolean: d
12
+ string: "#{field} 不是合法的文本类型",
13
+ number: "#{field} 不是合法的数字类型",
14
+ boolean: "#{field} 不是合法的布尔类型",
15
+ array: "#{field} 不是合法的数组类型",
16
+ object: "#{field} 不是合法的对象类型",
17
+ url: "#{field} 不是合法的 url 地址",
18
+ email: "#{field} 不是合法的邮箱地址",
19
+ ip: "#{field} 不是合法的 IP 地址"
20
20
  },
21
21
  number: {
22
- min: "`#{value}` is not greater than `#{min}`",
23
- max: "`#{value}` is not less than `#{max}`",
24
- equal: "`#{value}` is not equal to `#{equal}`",
25
- range: "`#{value}` is not in range `#{min} ~ #{max}`",
26
- positive: "`#{value}` is not a positive number",
27
- negative: "`#{value}` is not a negative number"
28
- },
29
- string: {
30
- maxLength: "#{field} cannot be longer than #{maxLength} characters",
31
- minLength: "#{field} must be at least #{minLength} characters",
32
- length: "#{field} must be exactly #{length} characters",
33
- match: "`#{value}` does not match pattern #{pattern}",
34
- uppercase: "`#{value}` must be all uppercase",
35
- lowercase: "`#{value}` must be all lowercased"
22
+ min: "`#{value}` 小于最小值 `#{min}`",
23
+ max: "`#{value}` 大于最大值 `#{max}`",
24
+ equal: "`#{value}` 不等于 `#{equal}`",
25
+ range: "`#{value}` 不在 `#{min} ~ #{max}` 范围内",
26
+ positive: "`#{value}` 不是正数",
27
+ negative: "`#{value}` 不是负数"
36
28
  },
37
29
  array: {
38
- length: "#{field} must be exactly #{length} in length",
39
- minLength: "#{field} cannot be less than #{minLength} in length",
40
- maxLength: "#{field} cannot be greater than #{maxLength} in length",
41
- includes: "#{field} is not includes #{includes}",
42
- deepEqual: "#{field} is not deep equal with #{deepEqual}",
43
- empty: "#{field} is not an empty array"
30
+ length: "#{field} 个数不等于 #{length}",
31
+ minLength: "#{field} 个数最少为 #{minLength}",
32
+ maxLength: "#{field} 个数最多为 #{maxLength}",
33
+ includes: "#{field} 不包含 #{includes}",
34
+ deepEqual: "#{field} 不等于 #{deepEqual}",
35
+ empty: "#{field} 不是空数组"
36
+ },
37
+ string: {
38
+ minLength: "字符数最少为 #{minLength}",
39
+ maxLength: "字符数最多为 #{maxLength}",
40
+ length: "字符数必须是 #{length}",
41
+ match: "`#{value}` 不符合模式 #{pattern}",
42
+ uppercase: "`#{value}` 必须全大写",
43
+ lowercase: "`#{value}` 必须全小写"
44
44
  },
45
45
  object: {
46
- deepEqual: "#{field} is not deep equal to expected value",
47
- hasKeys: "#{field} does not contain required fields",
48
- empty: "#{field} is not an empty object"
46
+ deepEqual: "#{field} 不等于期望值",
47
+ hasKeys: "#{field} 不包含必须字段",
48
+ empty: "#{field} 不是对象"
49
49
  },
50
50
  boolean: {
51
- true: "Expect true but got `#{value}`",
52
- false: "Expect false but got `#{value}`"
51
+ true: "期望是 `true`",
52
+ false: "期望是 `false`"
53
53
  }
54
- }, x = (r, t) => {
54
+ }, V = (r, t) => {
55
55
  const e = { ...r };
56
- return Object.keys(t || {}).forEach((s) => {
57
- const i = e[s], l = t == null ? void 0 : t[s];
58
- e[s] = c(i) ? {
59
- ...i,
60
- ...l
61
- } : l || i;
56
+ return Object.keys(t || {}).forEach((i) => {
57
+ const s = e[i], n = t == null ? void 0 : t[i];
58
+ e[i] = b(s) ? {
59
+ ...s,
60
+ ...n
61
+ } : n || s;
62
62
  }), e;
63
63
  }, k = (r, t) => {
64
64
  const e = t.split(".");
65
- let s = r;
66
- for (let i = 0; i < e.length; i++)
67
- if (s = s && s[e[i]], s === void 0)
68
- return s;
69
- return s;
65
+ let i = r;
66
+ for (let s = 0; s < e.length; s++)
67
+ if (i = i && i[e[s]], i === void 0)
68
+ return i;
69
+ return i;
70
70
  };
71
- var $ = Object.defineProperty, C = (r, t, e) => t in r ? $(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, o = (r, t, e) => C(r, typeof t != "symbol" ? t + "" : t, e);
72
- class p {
71
+ var C = Object.defineProperty, N = (r, t, e) => t in r ? C(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, l = (r, t, e) => N(r, typeof t != "symbol" ? t + "" : t, e);
72
+ class m {
73
73
  constructor(t, e) {
74
- o(this, "obj"), o(this, "message"), o(this, "type"), o(this, "error"), o(this, "_not"), o(this, "validateMessages"), o(this, "field"), o(this, "getValidateMsg", (s, i = {}) => {
75
- const l = {
76
- ...i,
74
+ l(this, "obj"), l(this, "message"), l(this, "type"), l(this, "error"), l(this, "_not"), l(this, "validateMessages"), l(this, "field"), l(this, "getValidateMsg", (i, s = {}) => {
75
+ const n = {
76
+ ...s,
77
77
  value: this.obj,
78
78
  field: this.field,
79
79
  type: this.type
80
- }, a = k(this.validateMessages, s);
81
- return _(a) ? a(l) : y(a) ? a.replace(/\#\{.+?\}/g, (g) => {
82
- const n = g.slice(2, -1);
83
- if (n in l) {
84
- if (c(l[n]) || M(l[n]))
80
+ }, a = k(this.validateMessages, i);
81
+ return z(a) ? a(n) : M(a) ? a.replace(/#\{.+?\}/g, (g) => {
82
+ const d = g.slice(2, -1);
83
+ if (d in n) {
84
+ if (b(n[d]) || p(n[d]))
85
85
  try {
86
- return JSON.stringify(l[n]);
86
+ return JSON.stringify(n[d]);
87
87
  } catch {
88
- return l[n];
88
+ return n[d];
89
89
  }
90
- return String(l[n]);
90
+ return String(n[d]);
91
91
  }
92
92
  return g;
93
93
  }) : a;
94
- }), c(e) && y(t) && e.trim ? this.obj = t.trim() : c(e) && e.ignoreEmptyString && t === "" ? this.obj = void 0 : this.obj = t, this.message = e.message, this.type = e.type, this.error = null, this.field = e.field || e.type, this.validateMessages = x(
95
- z,
94
+ }), b(e) && M(t) && e.trim ? this.obj = t.trim() : b(e) && e.ignoreEmptyString && t === "" ? this.obj = void 0 : this.obj = t, this.message = e.message, this.type = e.type, this.error = null, this.field = e.field || e.type, this.validateMessages = V(
95
+ S,
96
96
  e.validateMessages
97
97
  );
98
98
  }
@@ -100,13 +100,13 @@ class p {
100
100
  return this._not = !this._not, this;
101
101
  }
102
102
  get isRequired() {
103
- if (b(this.obj) || V(this.obj)) {
103
+ if (c(this.obj) || x(this.obj)) {
104
104
  const t = this.getValidateMsg("required");
105
105
  this.error = {
106
106
  value: this.obj,
107
107
  type: this.type,
108
108
  requiredError: !0,
109
- message: this.message || (c(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
109
+ message: this.message || (b(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
110
110
  };
111
111
  }
112
112
  return this;
@@ -118,7 +118,7 @@ class p {
118
118
  !this.error && t && (this.error = {
119
119
  value: this.obj,
120
120
  type: this.type,
121
- message: this.message || (c(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
121
+ message: this.message || (b(t) ? t : `${this._not ? "[NOT MODE]:" : ""}${t}`)
122
122
  });
123
123
  }
124
124
  validate(t, e) {
@@ -128,13 +128,13 @@ class p {
128
128
  t == null || t(this.error);
129
129
  }
130
130
  }
131
- class N extends p {
131
+ class R extends m {
132
132
  constructor(t, e) {
133
133
  super(t, {
134
134
  ...e,
135
135
  type: "array"
136
136
  }), this.validate(
137
- e && e.strict ? M(this.obj) : !0,
137
+ e && e.strict ? p(this.obj) : !0,
138
138
  this.getValidateMsg("type.array", { value: this.obj, type: this.type })
139
139
  );
140
140
  }
@@ -182,18 +182,18 @@ class N extends p {
182
182
  }
183
183
  get empty() {
184
184
  return this.validate(
185
- V(this.obj),
185
+ x(this.obj),
186
186
  this.getValidateMsg("array.empty", { value: this.obj })
187
187
  );
188
188
  }
189
189
  }
190
- class R extends p {
190
+ class K extends m {
191
191
  constructor(t, e) {
192
192
  super(t, {
193
193
  ...e,
194
194
  type: "boolean"
195
195
  }), this.validate(
196
- e && e.strict ? S(this.obj) : !0,
196
+ e != null && e.strict ? O(this.obj) : !0,
197
197
  this.getValidateMsg("type.boolean")
198
198
  );
199
199
  }
@@ -210,78 +210,74 @@ class R extends p {
210
210
  );
211
211
  }
212
212
  }
213
- class A extends p {
213
+ class P extends m {
214
214
  constructor(t, e) {
215
215
  super(t, {
216
216
  ...e,
217
217
  type: "custom"
218
218
  });
219
219
  }
220
- // @ts-ignore
221
- get validate() {
222
- const t = this;
223
- return function(e, s) {
224
- let i;
225
- if (e)
226
- return i = e(t.obj, t.addError.bind(t)), i && i.then ? (s && i.then(
227
- () => {
228
- s == null || s(t.error);
229
- },
230
- (l) => {
231
- console.error(l);
232
- }
233
- ), [i, t]) : (s == null || s(t.error), t.error);
234
- };
220
+ validate_(t, e) {
221
+ let i;
222
+ if (t)
223
+ return i = t(this.obj, this.addError.bind(this)), i && i.then ? (e && i.then(
224
+ () => {
225
+ e == null || e(this.error);
226
+ },
227
+ (s) => {
228
+ console.error(s);
229
+ }
230
+ ), [i, this]) : (e == null || e(this.error), this.error);
235
231
  }
236
232
  }
237
- class K extends p {
233
+ class D extends m {
238
234
  constructor(t, e) {
239
235
  super(t, {
240
236
  ...e,
241
237
  type: "number"
242
238
  }), this.validate(
243
- e && e.strict ? O(this.obj) : !0,
239
+ e && e.strict ? _(this.obj) : !0,
244
240
  this.getValidateMsg("type.number")
245
241
  );
246
242
  }
247
243
  min(t) {
248
- return b(this.obj) ? this : this.validate(
244
+ return c(this.obj) ? this : this.validate(
249
245
  this.obj >= t,
250
246
  this.getValidateMsg("number.min", { min: t })
251
247
  );
252
248
  }
253
249
  max(t) {
254
- return b(this.obj) ? this : this.validate(
250
+ return c(this.obj) ? this : this.validate(
255
251
  this.obj <= t,
256
252
  this.getValidateMsg("number.max", { max: t })
257
253
  );
258
254
  }
259
255
  equal(t) {
260
- return b(this.obj) ? this : this.validate(
256
+ return c(this.obj) ? this : this.validate(
261
257
  this.obj === t,
262
258
  this.getValidateMsg("number.equal", { equal: t })
263
259
  );
264
260
  }
265
261
  range(t, e) {
266
- return b(this.obj) ? this : this.validate(
262
+ return c(this.obj) ? this : this.validate(
267
263
  this.obj >= t && this.obj <= e,
268
264
  this.getValidateMsg("number.range", { min: t, max: e })
269
265
  );
270
266
  }
271
267
  get positive() {
272
- return b(this.obj) ? this : this.validate(this.obj > 0, this.getValidateMsg("number.positive"));
268
+ return c(this.obj) ? this : this.validate(this.obj > 0, this.getValidateMsg("number.positive"));
273
269
  }
274
270
  get negative() {
275
- return b(this.obj) ? this : this.validate(this.obj < 0, this.getValidateMsg("number.negative"));
271
+ return c(this.obj) ? this : this.validate(this.obj < 0, this.getValidateMsg("number.negative"));
276
272
  }
277
273
  }
278
- class D extends p {
274
+ class H extends m {
279
275
  constructor(t, e) {
280
276
  super(t, {
281
277
  ...e,
282
278
  type: "object"
283
279
  }), this.validate(
284
- e && e.strict ? c(this.obj) : !0,
280
+ e && e.strict ? b(this.obj) : !0,
285
281
  this.getValidateMsg("type.object")
286
282
  );
287
283
  }
@@ -304,13 +300,13 @@ class D extends p {
304
300
  );
305
301
  }
306
302
  }
307
- class T extends p {
303
+ class I extends m {
308
304
  constructor(t, e) {
309
305
  super(t, {
310
306
  ...e,
311
307
  type: "string"
312
308
  }), this.validate(
313
- e && e.strict ? y(this.obj) : !0,
309
+ e && e.strict ? M(this.obj) : !0,
314
310
  this.getValidateMsg("type.string")
315
311
  );
316
312
  }
@@ -352,11 +348,11 @@ class T extends p {
352
348
  ) : this;
353
349
  }
354
350
  }
355
- const Z = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, G = new RegExp(
351
+ const T = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, Z = new RegExp(
356
352
  "^(?!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]*)?$",
357
353
  "i"
358
- ), I = /^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/;
359
- class P extends p {
354
+ ), $ = /^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/;
355
+ class A extends m {
360
356
  constructor(t, e) {
361
357
  super(t, {
362
358
  ...e,
@@ -365,104 +361,105 @@ class P extends p {
365
361
  }
366
362
  get email() {
367
363
  return this.type = "email", this.validate(
368
- this.obj === void 0 || Z.test(this.obj),
364
+ this.obj === void 0 || T.test(this.obj),
369
365
  this.getValidateMsg("type.email")
370
366
  );
371
367
  }
372
368
  get url() {
373
369
  return this.type = "url", this.validate(
374
- this.obj === void 0 || G.test(this.obj),
370
+ this.obj === void 0 || Z.test(this.obj),
375
371
  this.getValidateMsg("type.url")
376
372
  );
377
373
  }
378
374
  get ip() {
379
375
  return this.type = "ip", this.validate(
380
- this.obj === void 0 || I.test(this.obj),
376
+ this.obj === void 0 || $.test(this.obj),
381
377
  this.getValidateMsg("type.ip")
382
378
  );
383
379
  }
384
380
  }
385
- const m = (r, t) => new q(r, { field: "value", ...t });
386
- m.globalConfig = {};
387
- m.setGlobalConfig = (r) => {
388
- m.globalConfig = r || {};
381
+ const f = (r, t) => new q(r, { field: "value", ...t });
382
+ f.globalConfig = {};
383
+ f.setGlobalConfig = (r) => {
384
+ f.globalConfig = r || {};
389
385
  };
390
386
  class q {
391
387
  constructor(t, e) {
392
- o(this, "number"), o(this, "string"), o(this, "array"), o(this, "object"), o(this, "boolean"), o(this, "type"), o(this, "custom");
393
- const s = m.globalConfig, i = {
394
- ...s,
388
+ l(this, "number"), l(this, "string"), l(this, "array"), l(this, "object"), l(this, "boolean"), l(this, "type"), l(this, "custom");
389
+ const i = f.globalConfig, s = {
390
+ ...i,
395
391
  ...e,
396
- validateMessages: x(
397
- s.validateMessages,
392
+ validateMessages: V(
393
+ i.validateMessages,
398
394
  e.validateMessages
399
395
  )
400
396
  };
401
- this.string = new T(t, i), this.number = new K(t, i), this.array = new N(t, i), this.object = new D(t, i), this.boolean = new R(t, i), this.type = new P(t, i), this.custom = new A(t, i);
397
+ this.string = new I(t, s), this.number = new D(t, s), this.array = new R(t, s), this.object = new H(t, s), this.boolean = new K(t, s), this.type = new A(t, s), this.custom = new P(t, s);
402
398
  }
403
399
  }
404
400
  class X {
405
401
  constructor(t, e = {}) {
406
- o(this, "schema"), o(this, "options"), this.schema = t, this.options = e;
402
+ l(this, "schema"), l(this, "options"), this.schema = t, this.options = e;
407
403
  }
408
404
  // 更新校验信息
409
405
  messages(t) {
410
406
  this.options = {
411
407
  ...this.options,
412
- validateMessages: x(
408
+ validateMessages: V(
413
409
  this.options.validateMessages,
414
410
  t
415
411
  )
416
412
  };
417
413
  }
418
414
  validate(t, e) {
419
- if (!c(t))
415
+ if (!b(t))
420
416
  return;
421
- const s = [];
422
- let i = null;
423
- function l(a, g) {
424
- i || (i = {}), (!i[a] || g.requiredError) && (i[a] = g);
417
+ const i = [];
418
+ let s = null;
419
+ function n(a, g) {
420
+ s || (s = {}), s && (!s[a] || g.requiredError) && (s[a] = g);
425
421
  }
426
422
  this.schema && Object.keys(this.schema).forEach((a) => {
427
- if (M(this.schema[a]))
428
- for (let g = 0; g < this.schema[a].length; g++) {
429
- const n = this.schema[a][g], f = n.type, L = n.message;
430
- if (!f && !n.validator)
423
+ var g;
424
+ if (p(this.schema[a]))
425
+ for (let d = 0; d < this.schema[a].length; d++) {
426
+ const o = this.schema[a][d], v = o.type, L = o.message;
427
+ if (!v && !o.validator)
431
428
  throw `You must specify a type to field ${a}!`;
432
- const v = {
429
+ const j = {
433
430
  ...this.options,
434
431
  message: L,
435
432
  field: a
436
433
  };
437
- "ignoreEmptyString" in n && (v.ignoreEmptyString = n.ignoreEmptyString), "strict" in n && (v.strict = n.strict);
438
- const j = new q(t[a], v);
439
- let h = j.type[f] || null;
434
+ "ignoreEmptyString" in o && (j.ignoreEmptyString = o.ignoreEmptyString), "strict" in o && (j.strict = o.strict);
435
+ const y = new q(t[a], j);
436
+ let h = y.type[v] || null;
440
437
  if (!h)
441
- if (n.validator) {
442
- h = j.custom.validate(n.validator), Object.prototype.toString.call(h) === "[object Array]" && h[0].then ? s.push({
438
+ if (o.validator) {
439
+ h = y.custom.validate_(o.validator), p(h) && (g = h[0]) != null && g.then ? i.push({
443
440
  function: h[0],
444
441
  _this: h[1],
445
442
  key: a
446
- }) : h && l(a, h);
443
+ }) : h && n(a, h);
447
444
  continue;
448
445
  } else
449
- h = j[f];
450
- if (Object.keys(n).forEach((u) => {
451
- n.required && (h = h.isRequired), u !== "message" && h[u] && n[u] && typeof h[u] == "object" && (h = h[u]), h[u] && n[u] !== void 0 && typeof h[u] == "function" && (h = h[u](n[u]));
446
+ h = y[v];
447
+ if (Object.keys(o).forEach((u) => {
448
+ o.required && (h = h.isRequired), u !== "message" && h != null && h[u] && o[u] && typeof h[u] == "object" && (h = h[u]), h != null && h[u] && o[u] !== void 0 && typeof h[u] == "function" && (h = h[u](o[u]));
452
449
  }), h.collect((u) => {
453
- u && l(a, u);
454
- }), i)
450
+ u && n(a, u);
451
+ }), s)
455
452
  break;
456
453
  }
457
- }), s.length > 0 ? Promise.all(s.map((a) => a.function)).then(() => {
458
- s.forEach((a) => {
459
- a._this.error && l(a.key, a._this.error);
460
- }), e == null || e(i);
461
- }) : e == null || e(i);
454
+ }), i.length > 0 ? Promise.all(i.map((a) => a.function)).then(() => {
455
+ i.forEach((a) => {
456
+ a._this.error && n(a.key, a._this.error);
457
+ }), e == null || e(s);
458
+ }) : e == null || e(s);
462
459
  }
463
460
  }
464
461
  export {
465
- X as Y,
466
- m as p,
467
- z as t
462
+ X as H,
463
+ S as e,
464
+ f as m
468
465
  };
@@ -3,12 +3,12 @@ import U from "@unicom-cloud/icons/IconUiCaretLeft";
3
3
  import L from "@unicom-cloud/icons/IconUiCaretRight";
4
4
  import V from "lodash/isFunction";
5
5
  import M, { useContext as K, useRef as A, createContext as B } from "react";
6
- import { a as T, I as S } from "./CASwN1hB.js";
6
+ import { a as T, I as S } from "./CZWGeRVA.js";
7
7
  import { u as q } from "./BFTV6myl.js";
8
8
  import { u as D } from "./CdaT1b_F.js";
9
9
  import { m } from "./JPPo5nY_.js";
10
10
  import { o as G } from "./BKKEev13.js";
11
- import { u as J } from "./DzVH9IBy.js";
11
+ import { u as J } from "./fFjj2KuF.js";
12
12
  import { u as Q } from "./XTEsYGuF.js";
13
13
  import { off as W, on as X } from "../utils/dom.js";
14
14
  function Y(f, u) {
@@ -4,7 +4,7 @@ import W from "@unicom-cloud/icons/IconUiMinus";
4
4
  import E from "lodash/isFunction";
5
5
  import q from "lodash/isNil";
6
6
  import $, { createContext as B, useState as J, useContext as I, useCallback as F, useRef as K, useEffect as Q } from "react";
7
- import { a as M, I as X } from "./CASwN1hB.js";
7
+ import { a as M, I as X } from "./CZWGeRVA.js";
8
8
  import { u as Y } from "./BFTV6myl.js";
9
9
  import { u as S } from "./CdaT1b_F.js";
10
10
  import { m as U } from "./JPPo5nY_.js";
@@ -15,7 +15,7 @@ import Pt from "@unicom-cloud/icons/IconUiZoomIn";
15
15
  import Lt from "@unicom-cloud/icons/IconUiZoomOut";
16
16
  import zt from "lodash/isUndefined";
17
17
  import { useState as g, forwardRef as Nt, useContext as ke, useRef as x, useMemo as Ce, useImperativeHandle as Mt, useCallback as Tt, useEffect as v } from "react";
18
- import { a as At, b as Ot } from "./CASwN1hB.js";
18
+ import { a as At, b as Ot } from "./CZWGeRVA.js";
19
19
  import "lodash/isEqualWith";
20
20
  import { u as Et } from "./CdaT1b_F.js";
21
21
  import "./D-TPB2Do.js";
@@ -26,12 +26,12 @@ import { isServerRendering as Dt, on as J, off as Q } from "../utils/dom.js";
26
26
  import "./Biupwn8l.js";
27
27
  import { u as Vt } from "./BFTV6myl.js";
28
28
  import { u as Bt } from "./CbLaCJmG.js";
29
- import { f as Ft } from "./C48SmsN-.js";
29
+ import { f as Ft } from "./ClaNycDy.js";
30
30
  import "./Ce1j9KTi.js";
31
31
  import { u as Wt } from "./a3hR6zLw.js";
32
32
  import "lodash/debounce";
33
33
  import Zt from "../portal/index.js";
34
- import { P as Ie } from "./DzVH9IBy.js";
34
+ import { P as Ie } from "./fFjj2KuF.js";
35
35
  import { m as Se } from "./JPPo5nY_.js";
36
36
  import { s as jt } from "./Ey4YJCkX.js";
37
37
  import { r as Ht } from "./CIRG541s.js";