@unicom-cloud/ui 0.8.68 → 0.8.70

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 (256) hide show
  1. package/Affix.js +1 -1
  2. package/Alert.js +1 -1
  3. package/AutoComplete.js +1 -1
  4. package/BackTop.js +1 -1
  5. package/Badge.js +1 -1
  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 +1 -1
  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 +1 -1
  34. package/Modal.js +1 -1
  35. package/Notice.js +1 -1
  36. package/Notification.js +1 -1
  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 +2 -2
  48. package/Space.js +1 -1
  49. package/Spin.js +1 -1
  50. package/Statistic.js +1 -1
  51. package/Steps.js +1 -1
  52. package/Switch.js +1 -1
  53. package/Table.js +1 -1
  54. package/Tabs.js +1 -1
  55. package/Tag.js +1 -1
  56. package/Tooltip.js +1 -1
  57. package/Transfer.js +1 -1
  58. package/Tree.js +1 -1
  59. package/Trigger.js +1 -1
  60. package/affix/index.js +1 -1
  61. package/alert/index.js +1 -1
  62. package/anchor/Anchor.js +1 -1
  63. package/anchor/Link.js +1 -1
  64. package/auto-complete/index.js +1 -1
  65. package/avatar/Avatar.js +1 -1
  66. package/avatar/Group.js +1 -1
  67. package/back-top/index.js +1 -1
  68. package/badge/index.js +1 -1
  69. package/breadcrumb/index.js +2 -2
  70. package/button/Group.js +1 -1
  71. package/button/index.js +1 -1
  72. package/calendar/index.js +2 -2
  73. package/card/Grid.js +1 -1
  74. package/card/Meta.js +1 -1
  75. package/card/index.js +1 -1
  76. package/carousel/Arrow.js +1 -1
  77. package/carousel/Indicator.js +1 -1
  78. package/carousel/index.js +1 -1
  79. package/cascader/Cascader.js +3 -3
  80. package/cascader/index.js +1 -1
  81. package/cascader/util.js +1 -1
  82. package/checkbox/Checkbox.js +2 -2
  83. package/checkbox/Group.js +2 -2
  84. package/checkbox/index.js +1 -1
  85. package/chunk/{CpGBWmuz.js → -C2QiGwq.js} +2 -2
  86. package/chunk/B80D01PB.js +257 -0
  87. package/chunk/BL9DMeor.js +9 -0
  88. package/chunk/{Clo26EcR.js → BPD5iNdA.js} +16 -21
  89. package/chunk/{SSK90wgo.js → Bh8AO6R8.js} +1 -1
  90. package/chunk/CASwN1hB.js +710 -0
  91. package/chunk/{BDB0LByj.js → CSk3yQDO.js} +1 -1
  92. package/chunk/{CKyu68pu.js → Cm9BS47C.js} +2 -2
  93. package/chunk/{CzQObzKd.js → DC-pxreh.js} +4 -4
  94. package/chunk/{C98ks5S8.js → DFf75sXd.js} +1 -1
  95. package/chunk/{CD3AUpzo.js → DcYqcuGl.js} +1 -1
  96. package/chunk/{BjpUSKM3.js → YUHbzjGj.js} +1 -1
  97. package/chunk/a3hR6zLw.js +12 -0
  98. package/chunk/{vmgkWLYf.js → bgmEVbGy.js} +2 -2
  99. package/chunk/{Bi4UkwOR.js → iOWILwNv.js} +3 -3
  100. package/chunk/{CgurXnoy.js → tIRvN_q7.js} +2 -2
  101. package/collapse/Collapse.js +2 -2
  102. package/collapse/Item.js +2 -2
  103. package/collapse/index.js +1 -1
  104. package/color-picker/ControlBar.js +1 -1
  105. package/color-picker/InputAlpha.js +1 -1
  106. package/color-picker/InputHex.js +1 -1
  107. package/color-picker/InputRgb.js +1 -1
  108. package/color-picker/Palette.js +1 -1
  109. package/color-picker/Panel.js +2 -2
  110. package/color-picker/index.js +1 -1
  111. package/comment/index.js +1 -1
  112. package/config-provider/ConfigProvider.js +1 -1
  113. package/config-provider/context.js +1 -1
  114. package/config-provider/index.js +2 -2
  115. package/copy/index.js +1 -1
  116. package/date-picker/Picker.js +2 -2
  117. package/date-picker/PickerRange.js +3 -3
  118. package/date-picker/index.js +1 -1
  119. package/descriptions/index.js +80 -75
  120. package/divider/index.js +1 -1
  121. package/draggable/index.js +1 -1
  122. package/drawer/Drawer.js +1 -1
  123. package/dropdown/Button.js +1 -1
  124. package/dropdown/index.js +1 -1
  125. package/empty/index.js +1 -1
  126. package/form/Control.js +84 -81
  127. package/form/Form.js +1 -1
  128. package/form/FormItem.js +1 -1
  129. package/grid/Col.js +1 -1
  130. package/grid/Row.js +1 -1
  131. package/grid/grid-item.js +1 -1
  132. package/grid/grid.js +1 -1
  133. package/hooks/index.js +36 -34
  134. package/hooks/useListenResize.js +4 -0
  135. package/hooks/useUpdateEffect.js +1 -1
  136. package/hooks/useWindowSize.js +1 -1
  137. package/icon/index.js +1 -1
  138. package/icon-hover/index.js +1 -1
  139. package/image/Image.js +2 -2
  140. package/image/ImagePreview.js +3 -3
  141. package/image/ImagePreviewArrow.js +1 -1
  142. package/image/ImagePreviewGroup.js +1 -1
  143. package/image/index.js +1 -1
  144. package/index.js +567 -565
  145. package/input/Group.js +1 -1
  146. package/input/Input.js +1 -1
  147. package/input/InputElement.js +1 -1
  148. package/input/Password.js +1 -1
  149. package/input/Search.js +1 -1
  150. package/input/Textarea.js +1 -1
  151. package/input-number/index.js +1 -1
  152. package/input-tag/InputTag.js +1 -1
  153. package/layout/Content.js +1 -1
  154. package/layout/Footer.js +1 -1
  155. package/layout/Header.js +1 -1
  156. package/layout/Sider.js +1 -1
  157. package/layout/index.js +1 -1
  158. package/link/index.js +1 -1
  159. package/list/Item.js +1 -1
  160. package/list/Meta.js +1 -1
  161. package/list/index.js +1 -1
  162. package/mentions/index.js +1 -1
  163. package/menu/Menu.js +2 -2
  164. package/menu/OverflowWrap.js +1 -1
  165. package/menu/index.js +2 -2
  166. package/message/index.js +1 -1
  167. package/message/useMessage.js +1 -1
  168. package/modal/Confirm.js +2 -2
  169. package/modal/Modal.js +2 -2
  170. package/modal/index.js +1 -1
  171. package/notice/index.js +1 -1
  172. package/notification/index.js +1 -1
  173. package/notification/useNotification.js +1 -1
  174. package/notification/withNotification.js +43 -35
  175. package/overflow-ellipsis/OverflowItem.js +1 -1
  176. package/overflow-ellipsis/index.js +1 -1
  177. package/package.json +1 -1
  178. package/page-header/index.js +1 -1
  179. package/pagination/PageItem.js +1 -1
  180. package/pagination/PageJumper.js +1 -1
  181. package/pagination/PageOption.js +1 -1
  182. package/pagination/Pagination.js +1 -1
  183. package/picker/Input.js +1 -1
  184. package/picker/InputRange.js +1 -1
  185. package/popconfirm/index.js +1 -1
  186. package/popover/index.js +1 -1
  187. package/progress/index.js +1 -1
  188. package/radio/Group.js +2 -2
  189. package/radio/Radio.js +2 -2
  190. package/radio/index.js +2 -2
  191. package/rate/index.js +1 -1
  192. package/resize-box/ResizeTrigger.js +1 -1
  193. package/resize-box/Split.js +1 -1
  194. package/resize-box/SplitGroup.js +1 -1
  195. package/resize-box/index.js +1 -1
  196. package/result/index.js +1 -1
  197. package/select/Option.js +1 -1
  198. package/select/Select.js +2 -2
  199. package/select-view/Core.js +1 -1
  200. package/skeleton/index.js +1 -1
  201. package/slider/Button.js +1 -1
  202. package/slider/index.js +2 -2
  203. package/space/index.js +20 -20
  204. package/spin/DotLoading.js +1 -1
  205. package/spin/index.js +1 -1
  206. package/statistic/Countdown.js +1 -1
  207. package/statistic/index.js +1 -1
  208. package/steps/index.js +1 -1
  209. package/switch/index.js +1 -1
  210. package/table/Table.js +3 -3
  211. package/table/index.js +89 -81
  212. package/tabs/Tab.js +2 -2
  213. package/tabs/TabContent.js +2 -2
  214. package/tabs/TabPane.js +1 -1
  215. package/tabs/index.js +2 -2
  216. package/tag/index.js +1 -1
  217. package/time-picker/Picker.js +2 -2
  218. package/time-picker/TimePicker.js +1 -1
  219. package/timeline/Item.js +1 -1
  220. package/timeline/Timeline.js +1 -1
  221. package/tooltip/index.js +1 -1
  222. package/transfer/Item.js +2 -2
  223. package/transfer/List.js +2 -2
  224. package/transfer/index.js +1 -1
  225. package/tree/Animation.js +2 -2
  226. package/tree/Node.js +3 -3
  227. package/tree/NodeList.js +1 -1
  228. package/tree/Tree.js +2 -2
  229. package/tree/index.js +1 -1
  230. package/tree-select/Select.js +2 -2
  231. package/trigger/index.js +1 -1
  232. package/types/hooks/index.d.ts +1 -0
  233. package/types/hooks/useListenResize.d.ts +1 -0
  234. package/types/index.d.ts +1 -1
  235. package/types/message/interface.d.ts +0 -1
  236. package/types/notification/interface.d.ts +0 -1
  237. package/types/space/index.d.ts +3 -4
  238. package/types/table/hook/useThResizable.d.ts +1 -1
  239. package/types/version/index.d.ts +4 -4
  240. package/typography/Base.js +2 -2
  241. package/typography/Ellipsis.js +8 -8
  242. package/typography/Paragraph.js +1 -1
  243. package/typography/Typography.js +1 -1
  244. package/typography/index.js +8 -8
  245. package/typography/useEllipsis.js +1 -1
  246. package/upload/TriggerNode.js +1 -1
  247. package/upload/Upload.js +1 -1
  248. package/upload/Uploader.js +1 -1
  249. package/utils/contextHolder.js +1 -1
  250. package/utils/index.js +2 -2
  251. package/verification-code/VerificationCode.js +1 -1
  252. package/version/index.js +5 -5
  253. package/watermark/Watermark.js +1 -1
  254. package/chunk/BSCrLtfQ.js +0 -10
  255. package/chunk/BSaQv6mx.js +0 -251
  256. package/chunk/ll867Bf3.js +0 -730
@@ -3,7 +3,7 @@ import "@unicom-cloud/icons/IconUiMore";
3
3
  import "react";
4
4
  import { DropdownButton as f } from "./index.js";
5
5
  import "../button/index.js";
6
- import "../chunk/ll867Bf3.js";
6
+ import "../chunk/CASwN1hB.js";
7
7
  import "../chunk/BFTV6myl.js";
8
8
  import "../chunk/ClqoGc3r.js";
9
9
  export {
package/dropdown/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as s, jsxs as S } from "react/jsx-runtime";
2
2
  import A from "lodash/get";
3
3
  import l, { forwardRef as W, useContext as z, useRef as j } from "react";
4
- import { a as F } from "../chunk/ll867Bf3.js";
4
+ import { a as F } from "../chunk/CASwN1hB.js";
5
5
  import { u as G } from "../chunk/BFTV6myl.js";
6
6
  import { u as X } from "../chunk/CdaT1b_F.js";
7
7
  import Y, { EventsByTriggerNeed as Z } from "../trigger/index.js";
package/empty/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@unicom-cloud/icons/IconUiEmpty";
3
3
  import "react";
4
- import { E as e } from "../chunk/ll867Bf3.js";
4
+ import { E as e } from "../chunk/CASwN1hB.js";
5
5
  import "../chunk/BFTV6myl.js";
6
6
  import "../chunk/JPPo5nY_.js";
7
7
  export {
package/form/Control.js CHANGED
@@ -1,12 +1,12 @@
1
- var D = Object.defineProperty;
2
- var P = (p, g, e) => g in p ? D(p, g, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[g] = e;
3
- var r = (p, g, e) => P(p, typeof g != "symbol" ? g + "" : g, e);
1
+ var M = Object.defineProperty;
2
+ var P = (p, g, e) => g in p ? M(p, g, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[g] = e;
3
+ var s = (p, g, e) => P(p, typeof g != "symbol" ? g + "" : g, e);
4
4
  import { jsx as m, jsxs as E } from "react/jsx-runtime";
5
5
  import W from "@unicom-cloud/icons/IconUiCheckCircleFill";
6
6
  import $ from "@unicom-cloud/icons/IconUiCloseCircleFill";
7
7
  import N from "@unicom-cloud/icons/IconUiExclamationCircleFill";
8
8
  import L from "@unicom-cloud/icons/IconUiLoading";
9
- import S from "lodash/get";
9
+ import V from "lodash/get";
10
10
  import b from "lodash/isArray";
11
11
  import R from "lodash/isBoolean";
12
12
  import y from "lodash/isEqualWith";
@@ -20,51 +20,51 @@ import { FormItemContext as O } from "./context.js";
20
20
  import { isFieldMatch as C, schemaValidate as k, isSyntheticEvent as q, ID_SUFFIX as B } from "./util.js";
21
21
  class x extends z {
22
22
  constructor(e, t) {
23
- var i, s;
23
+ var i, l, o;
24
24
  super(e);
25
- r(this, "context");
25
+ s(this, "context");
26
26
  // 校验信息
27
- r(this, "errors", null);
27
+ s(this, "errors", null);
28
28
  // 校验 warning 信息
29
- r(this, "warnings", null);
29
+ s(this, "warnings", null);
30
30
  // undefined => validating => success / error => (validating or undefined)
31
- r(this, "validateStatus");
31
+ s(this, "validateStatus");
32
32
  // 是否被用户操作过
33
- r(this, "touched");
34
- r(this, "isDestroyed", !1);
33
+ s(this, "touched");
34
+ s(this, "isDestroyed", !1);
35
35
  // 保存 props.children 或函数类型 props.children() 的返回值
36
- r(this, "childrenElement", null);
37
- r(this, "removeRegisterField");
36
+ s(this, "childrenElement", null);
37
+ s(this, "removeRegisterField");
38
38
  // 触发 store 进行状态收集
39
39
  // TODO: error, validateStatus ,touched 状态和 UI 组件解耦,统一维护在 store 内部
40
- r(this, "triggerStateCollect", () => {
40
+ s(this, "triggerStateCollect", () => {
41
41
  const { innerCollectFormState: e } = this.context.store.getInnerMethods(!0);
42
42
  e();
43
43
  });
44
44
  // 切换校验状态
45
- r(this, "toggleValidateStatus", (e) => {
45
+ s(this, "toggleValidateStatus", (e) => {
46
46
  this.validateStatus = e, this.triggerStateCollect();
47
47
  });
48
48
  // 切换 touch 状态
49
- r(this, "toggleTouched", (e) => {
49
+ s(this, "toggleTouched", (e) => {
50
50
  this.touched = R(e) ? e : !this.touched, this.triggerStateCollect();
51
51
  });
52
- r(this, "setWarnings", (e) => {
52
+ s(this, "setWarnings", (e) => {
53
53
  this.warnings = e, this.triggerStateCollect();
54
54
  });
55
- r(this, "setErrors", (e) => {
55
+ s(this, "setErrors", (e) => {
56
56
  this.errors = e, this.triggerStateCollect();
57
57
  });
58
- r(this, "getErrors", () => this.errors);
59
- r(this, "getWarnings", () => this.warnings || []);
60
- r(this, "isTouched", () => this.touched);
61
- r(this, "getValidateStatus", () => this.props.validateStatus ? this.props.validateStatus : this.validateStatus);
62
- r(this, "hasFieldProps", () => !!this.props.field);
63
- r(this, "clearFormItemError", (e = this.props.field) => {
58
+ s(this, "getErrors", () => this.errors);
59
+ s(this, "getWarnings", () => this.warnings || []);
60
+ s(this, "isTouched", () => this.touched);
61
+ s(this, "getValidateStatus", () => this.props.validateStatus ? this.props.validateStatus : this.validateStatus);
62
+ s(this, "hasFieldProps", () => !!this.props.field);
63
+ s(this, "clearFormItemError", (e = this.props.field) => {
64
64
  const { updateFormItem: t } = this.context;
65
65
  t == null || t(e, { errors: null, warnings: null });
66
66
  });
67
- r(this, "updateFormItem", () => {
67
+ s(this, "updateFormItem", () => {
68
68
  if (this.isDestroyed) return;
69
69
  this.forceUpdate();
70
70
  const { updateFormItem: e } = this.context;
@@ -73,17 +73,17 @@ class x extends z {
73
73
  warnings: this.warnings
74
74
  });
75
75
  });
76
- r(this, "getFieldValue", () => {
76
+ s(this, "getFieldValue", () => {
77
77
  const e = this.props.field, t = this.context.store;
78
78
  return e ? t.getInnerMethods(!0).innerGetFieldValue(e) : void 0;
79
79
  });
80
- r(this, "onStoreChange", (e, t) => {
81
- const i = b(t.field) ? t.field : [t.field], { field: s, shouldUpdate: l, dependencies: o } = this.props, a = (d) => {
82
- if (o && l && U(!0, "`shouldUpdate` of the `Form.Item` will be ignored."), o)
83
- b(o) && o.some((n) => C(n, i)) && this.isTouched() && this.validateField();
84
- else if (l) {
80
+ s(this, "onStoreChange", (e, t) => {
81
+ const i = b(t.field) ? t.field : [t.field], { field: l, shouldUpdate: o, dependencies: r } = this.props, a = (d) => {
82
+ if (r && o && U(!0, "`shouldUpdate` of the `Form.Item` will be ignored."), r)
83
+ b(r) && r.some((n) => C(n, i)) && this.isTouched() && this.validateField();
84
+ else if (o) {
85
85
  let n = !1;
86
- F(l) ? n = l(t.prev, t.current, {
86
+ F(o) ? n = o(t.prev, t.current, {
87
87
  field: t.field,
88
88
  ...d
89
89
  }) : n = !y(t.prev, t.current), n && this.updateFormItem();
@@ -91,10 +91,10 @@ class x extends z {
91
91
  };
92
92
  switch (e) {
93
93
  case "reset":
94
- this.toggleTouched(!1), this.toggleValidateStatus(void 0), this.setErrors(null), this.setWarnings(null), o || l ? a() : this.updateFormItem();
94
+ this.toggleTouched(!1), this.toggleValidateStatus(void 0), this.setErrors(null), this.setWarnings(null), r || o ? a() : this.updateFormItem();
95
95
  break;
96
96
  case "innerSetValue":
97
- if (C(s, i)) {
97
+ if (C(l, i)) {
98
98
  this.toggleTouched(!0), this.updateFormItem();
99
99
  return;
100
100
  }
@@ -104,31 +104,31 @@ class x extends z {
104
104
  });
105
105
  break;
106
106
  case "setFieldValue":
107
- if (C(s, i)) {
107
+ if (C(l, i)) {
108
108
  this.toggleTouched(!0), t.data && "touched" in t.data && this.toggleTouched(t.data.touched), t.data && "warnings" in t.data && this.setWarnings(
109
109
  _(t.data.warnings) ? [] : [].concat(t.data.warnings)
110
- ), t.data && "errors" in t.data ? this.setErrors(t.data.errors) : y(S(t.prev, s), S(t.current, s)) || this.setErrors(null), this.updateFormItem();
110
+ ), t.data && "errors" in t.data ? this.setErrors(t.data.errors) : y(V(t.prev, l), V(t.current, l)) || this.setErrors(null), this.updateFormItem();
111
111
  return;
112
112
  }
113
113
  a();
114
114
  break;
115
115
  }
116
116
  });
117
- r(this, "innerSetFieldValue", (e, t) => {
118
- var o, a;
117
+ s(this, "innerSetFieldValue", (e, t) => {
118
+ var r, a;
119
119
  if (!e) return;
120
120
  const { store: i } = this.context;
121
121
  i.getInnerMethods(!0).innerSetFieldValue(e, t);
122
- const l = {};
123
- j(l, e, t), (a = (o = this.props) == null ? void 0 : o.onValuesChange) == null || a.call(o, l, {
122
+ const o = {};
123
+ j(o, e, t), (a = (r = this.props) == null ? void 0 : r.onValuesChange) == null || a.call(r, o, {
124
124
  ...i.getFieldsValue()
125
125
  });
126
126
  });
127
127
  // 仅仅校验下值,不做任何状态变更
128
- r(this, "validateFieldOnly", () => {
129
- const { validateMessages: e } = this.context, { field: t, rules: i } = this.props, s = this.getFieldValue();
130
- return k(t, s, i, e).then(
131
- ({ error: l, warning: o }) => Promise.resolve({ error: l, value: s, warning: o, field: t })
128
+ s(this, "validateFieldOnly", () => {
129
+ const { validateMessages: e } = this.context, { field: t, rules: i } = this.props, l = this.getFieldValue();
130
+ return k(t, l, i, e).then(
131
+ ({ error: o, warning: r }) => Promise.resolve({ error: o, value: l, warning: r, field: t })
132
132
  );
133
133
  });
134
134
  /**
@@ -136,27 +136,27 @@ class x extends z {
136
136
  * @param triggerType the value of validateTrigger.
137
137
  * @returns
138
138
  */
139
- r(this, "validateField", (e) => {
140
- const { validateTrigger: t, validateMessages: i } = this.context, { field: s, rules: l, validateTrigger: o } = this.props, a = this.getFieldValue(), d = () => {
139
+ s(this, "validateField", (e) => {
140
+ const { validateTrigger: t, validateMessages: i } = this.context, { field: l, rules: o, validateTrigger: r } = this.props, a = this.getFieldValue(), d = () => {
141
141
  var c;
142
142
  const h = this.errors || ((c = this.warnings) == null ? void 0 : c.length);
143
143
  this.toggleValidateStatus("validating"), this.setErrors(null), this.setWarnings(null), h && this.updateFormItem();
144
- }, n = e ? (l || []).filter((h) => [].concat(
145
- h.validateTrigger || o || t
146
- ).indexOf(e) > -1) : l;
147
- return n && n.length && s ? (d(), k(s, a, n, i).then(
144
+ }, n = e ? (o || []).filter((h) => [].concat(
145
+ h.validateTrigger || r || t
146
+ ).indexOf(e) > -1) : o;
147
+ return n && n.length && l ? (d(), k(l, a, n, i).then(
148
148
  ({ error: h, warning: c }) => {
149
149
  var u;
150
- return this.setErrors(h ? h[s] : null), this.setWarnings(c || null), this.toggleValidateStatus(
150
+ return this.setErrors(h ? h[l] : null), this.setWarnings(c || null), this.toggleValidateStatus(
151
151
  this.errors ? "error" : (u = this.warnings) != null && u.length ? "warning" : "success"
152
- ), this.updateFormItem(), Promise.resolve({ error: h, value: a, field: s });
152
+ ), this.updateFormItem(), Promise.resolve({ error: h, value: a, field: l });
153
153
  }
154
- )) : Promise.resolve({ error: null, value: a, field: s });
154
+ )) : Promise.resolve({ error: null, value: a, field: l });
155
155
  });
156
156
  // 每次 render 都会作为 onChange 传递给 children,需要保证引用地址不变
157
157
  // 所以 handleTrigger 需要声明在类上,并且直接作为 children.props.onChange
158
- r(this, "handleTrigger", (e, ...t) => {
159
- const i = this.childrenElement || this.props.children, { store: s } = this.context, { field: l, trigger: o, normalize: a, getValueFromEvent: d } = this.props, n = F(d) ? d(e, ...t) : e;
158
+ s(this, "handleTrigger", (e, ...t) => {
159
+ const i = this.childrenElement || this.props.children, { store: l } = this.context, { field: o, trigger: r, normalize: a, getValueFromEvent: d } = this.props, n = F(d) ? d(e, ...t) : e;
160
160
  let h = n;
161
161
  if (q(n)) {
162
162
  U(
@@ -165,11 +165,11 @@ class x extends z {
165
165
  ), n.stopPropagation();
166
166
  return;
167
167
  }
168
- typeof a == "function" && (h = a(n, s.getFieldValue(l), {
169
- ...s.getFieldsValue()
170
- })), this.toggleTouched(!0), this.innerSetFieldValue(l, h), this.validateField(o), A(i) && i.props && i.props[o] && (this.props.isFormList || i.props[o](h, ...t));
168
+ typeof a == "function" && (h = a(n, l.getFieldValue(o), {
169
+ ...l.getFieldsValue()
170
+ })), this.toggleTouched(!0), this.innerSetFieldValue(o, h), this.validateField(r), A(i) && i.props && i.props[r] && (this.props.isFormList || i.props[r](h, ...t));
171
171
  });
172
- r(this, "getChild", () => {
172
+ s(this, "getChild", () => {
173
173
  const { children: e } = this.props, { store: t } = this.context;
174
174
  let i = e;
175
175
  return F(e) && (i = e(
@@ -183,7 +183,10 @@ class x extends z {
183
183
  }
184
184
  )), this.childrenElement = i, i;
185
185
  });
186
- "initialValue" in e && this.hasFieldProps() && ((s = (i = t == null ? void 0 : t.store) == null ? void 0 : i.setInitialValue) == null || s.call(i, e.field, e.initialValue));
186
+ if ("initialValue" in e && this.hasFieldProps()) {
187
+ const r = (l = (i = t == null ? void 0 : t.store) == null ? void 0 : i.getInnerMethods) == null ? void 0 : l.call(i, !0);
188
+ (o = r == null ? void 0 : r.innerSetInitialValue) == null || o.call(r, e.field, e.initialValue);
189
+ }
187
190
  }
188
191
  componentDidMount() {
189
192
  const { store: e } = this.context ?? {};
@@ -207,56 +210,56 @@ class x extends z {
207
210
  getValidateTrigger() {
208
211
  const e = this.props.validateTrigger || this.context.validateTrigger || "onChange", t = this.props.rules || [];
209
212
  let i = [];
210
- return t.map((s) => {
211
- i = i.concat(s.validateTrigger || e);
213
+ return t.map((l) => {
214
+ i = i.concat(l.validateTrigger || e);
212
215
  }), Array.from(new Set(i));
213
216
  }
214
217
  renderControl(e, t) {
215
218
  var T;
216
219
  const {
217
220
  field: i,
218
- trigger: s = "onChange",
219
- triggerPropName: l = "value",
220
- validateStatus: o,
221
+ trigger: l = "onChange",
222
+ triggerPropName: o = "value",
223
+ validateStatus: r,
221
224
  formatter: a
222
225
  } = this.props, { store: d, disabled: n } = this.context, h = "disabled" in this.props ? this.props.disabled : n, c = I.Children.only(e), u = {
223
226
  // used by label
224
227
  id: G(((T = c.props) == null ? void 0 : T.id) || { [`${t}${B}`]: t })
225
228
  };
226
- this.getValidateTrigger().forEach((V) => {
227
- u[V] = (M) => {
229
+ this.getValidateTrigger().forEach((S) => {
230
+ u[S] = (D) => {
228
231
  var f, w;
229
- this.validateField(V), (w = (f = c.props) == null ? void 0 : f[V]) == null || w.call(f, M);
232
+ this.validateField(S), (w = (f = c.props) == null ? void 0 : f[S]) == null || w.call(f, D);
230
233
  };
231
- }), u[s] = this.handleTrigger, h !== void 0 && !("disabled" in c.props) && (u.disabled = h);
232
- let v = S(d.getInnerMethods(!0).innerGetStore(), i);
233
- return F(a) && (v = a(v)), u[l] = v, !o && this.errors && (u.error = !0), I.cloneElement(c, u);
234
+ }), u[l] = this.handleTrigger, h !== void 0 && !("disabled" in c.props) && (u.disabled = h);
235
+ let v = V(d.getInnerMethods(!0).innerGetStore(), i);
236
+ return F(a) && (v = a(v)), u[o] = v, !r && this.errors && (u.error = !0), I.cloneElement(c, u);
234
237
  }
235
238
  render() {
236
- const { noStyle: e, field: t, isFormList: i, hasFeedback: s } = this.props, l = this.getValidateStatus(), { prefixCls: o, getFormElementId: a } = this.context;
239
+ const { noStyle: e, field: t, isFormList: i, hasFeedback: l } = this.props, o = this.getValidateStatus(), { prefixCls: r, getFormElementId: a } = this.context;
237
240
  let d = this.getChild();
238
241
  const n = this.hasFieldProps() ? a == null ? void 0 : a(t) : void 0;
239
- return this.hasFieldProps() && !i && I.Children.count(d) === 1 && (d = this.renderControl(d, n)), e ? d : /* @__PURE__ */ m("div", { className: `${o}-item-control-wrapper`, children: /* @__PURE__ */ m("div", { className: `${o}-item-control`, id: n, children: /* @__PURE__ */ E("div", { className: `${o}-item-control-children`, children: [
242
+ return this.hasFieldProps() && !i && I.Children.count(d) === 1 && (d = this.renderControl(d, n)), e ? d : /* @__PURE__ */ m("div", { className: `${r}-item-control-wrapper`, children: /* @__PURE__ */ m("div", { className: `${r}-item-control`, id: n, children: /* @__PURE__ */ E("div", { className: `${r}-item-control-children`, children: [
240
243
  d,
241
- l && s && /* @__PURE__ */ E(
244
+ o && l && /* @__PURE__ */ E(
242
245
  "div",
243
246
  {
244
- className: `${o}-item-feedback ${o}-item-feedback-${l}`,
247
+ className: `${r}-item-feedback ${r}-item-feedback-${o}`,
245
248
  children: [
246
- l === "warning" && /* @__PURE__ */ m(N, {}),
247
- l === "success" && /* @__PURE__ */ m(W, {}),
248
- l === "error" && /* @__PURE__ */ m($, {}),
249
- l === "validating" && /* @__PURE__ */ m(L, {})
249
+ o === "warning" && /* @__PURE__ */ m(N, {}),
250
+ o === "success" && /* @__PURE__ */ m(W, {}),
251
+ o === "error" && /* @__PURE__ */ m($, {}),
252
+ o === "validating" && /* @__PURE__ */ m(L, {})
250
253
  ]
251
254
  }
252
255
  )
253
256
  ] }) }) });
254
257
  }
255
258
  }
256
- r(x, "defaultProps", {
259
+ s(x, "defaultProps", {
257
260
  trigger: "onChange",
258
261
  triggerPropName: "value"
259
- }), r(x, "isFormControl", !0), r(x, "contextType", O);
262
+ }), s(x, "isFormControl", !0), s(x, "contextType", O);
260
263
  export {
261
264
  x as default
262
265
  };
package/form/Form.js CHANGED
@@ -3,7 +3,7 @@ import { p as k } from "../chunk/CVYWxu00.js";
3
3
  import v from "lodash/isPlainObject";
4
4
  import O from "lodash/merge";
5
5
  import { forwardRef as A, useContext as $, useRef as _, useEffect as H, useImperativeHandle as U } from "react";
6
- import { a as W, b as X } from "../chunk/ll867Bf3.js";
6
+ import { a as W, b as X } from "../chunk/CASwN1hB.js";
7
7
  import { u as B } from "../chunk/5_U1CBIu.js";
8
8
  import { u as G } from "../chunk/BFTV6myl.js";
9
9
  import { m as J } from "../chunk/JPPo5nY_.js";
package/form/FormItem.js CHANGED
@@ -4,7 +4,7 @@ import ge from "lodash/isArray";
4
4
  import he from "lodash/isFunction";
5
5
  import y from "lodash/isPlainObject";
6
6
  import w from "lodash/isUndefined";
7
- import { a as Ce } from "../chunk/ll867Bf3.js";
7
+ import { a as Ce } from "../chunk/CASwN1hB.js";
8
8
  import Y from "../grid/index.js";
9
9
  import { u as ye } from "../chunk/BFTV6myl.js";
10
10
  import { P as ve } from "../chunk/DzVH9IBy.js";
package/grid/Col.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as H } from "react/jsx-runtime";
2
2
  import T from "lodash/isNumber";
3
3
  import q from "lodash/isPlainObject";
4
4
  import { forwardRef as C, useContext as S, useMemo as D } from "react";
5
- import { a as I } from "../chunk/ll867Bf3.js";
5
+ import { a as I } from "../chunk/CASwN1hB.js";
6
6
  import { u as J } from "../chunk/BFTV6myl.js";
7
7
  import { m as K } from "../chunk/JPPo5nY_.js";
8
8
  import { RowContext as N } from "./context.js";
package/grid/Row.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { forwardRef as S, useContext as z, useState as G, useRef as H, useEffect as V } from "react";
3
- import { a as B } from "../chunk/ll867Bf3.js";
3
+ import { a as B } from "../chunk/CASwN1hB.js";
4
4
  import { u as E } from "../chunk/BFTV6myl.js";
5
5
  import { m as L } from "../chunk/JPPo5nY_.js";
6
6
  import { o as M } from "../chunk/BKKEev13.js";
package/grid/grid-item.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as Q } from "react/jsx-runtime";
2
2
  import T from "lodash/isFunction";
3
3
  import V from "lodash/isString";
4
4
  import c, { forwardRef as k, useContext as l, useMemo as u, useEffect as q } from "react";
5
- import { a as z } from "../chunk/ll867Bf3.js";
5
+ import { a as z } from "../chunk/CASwN1hB.js";
6
6
  import { u as A } from "../chunk/BFTV6myl.js";
7
7
  import { m as H } from "../chunk/JPPo5nY_.js";
8
8
  import { GridContext as J, GridDataCollectorContext as K } from "./context.js";
package/grid/grid.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import $ from "lodash/get";
3
3
  import f, { forwardRef as h, useState as S, useContext as E } from "react";
4
- import { a as T } from "../chunk/ll867Bf3.js";
4
+ import { a as T } from "../chunk/CASwN1hB.js";
5
5
  import { u as b } from "../chunk/BFTV6myl.js";
6
6
  import { m as j } from "../chunk/JPPo5nY_.js";
7
7
  import { GridDataCollectorContext as B, GridContext as Q } from "./context.js";
package/hooks/index.js CHANGED
@@ -9,23 +9,24 @@ import { u as v } from "../chunk/C4OrxKE6.js";
9
9
  import { u as I } from "../chunk/b1e8awfs.js";
10
10
  import { u as b } from "../chunk/oopARUrq.js";
11
11
  import { u as P } from "../chunk/B2yFlXke.js";
12
- import { u as k } from "../chunk/XTEsYGuF.js";
13
- import { u as W } from "../chunk/BXAeh0_V.js";
14
- import { u as E } from "../chunk/BFTV6myl.js";
15
- import { u as V } from "../chunk/CdaT1b_F.js";
16
- import { u as y } from "../chunk/zmmqLCF4.js";
17
- import { u as F } from "../chunk/CbLaCJmG.js";
18
- import { u as D } from "../chunk/DonYzv30.js";
19
- import { u as K } from "../chunk/BsY85n3_.js";
20
- import { u as j } from "../chunk/BBkdXHrJ.js";
21
- import { u as A } from "../chunk/VSe_Wq1g.js";
22
- import { u as G } from "../chunk/Bg3uJGPu.js";
23
- import { u as N } from "../chunk/CmZzBtA4.js";
24
- import { u as T } from "../chunk/hEWZQ8Zi.js";
25
- import { u as Y } from "../chunk/Duezix3m.js";
26
- import { u as _ } from "../chunk/BSCrLtfQ.js";
27
- import { u as ee } from "../chunk/BKT9BFf4.js";
28
- import { u as oe } from "../chunk/Clo26EcR.js";
12
+ import { u as h } from "../chunk/XTEsYGuF.js";
13
+ import { u as W } from "../chunk/BL9DMeor.js";
14
+ import { u as z } from "../chunk/BXAeh0_V.js";
15
+ import { u as M } from "../chunk/BFTV6myl.js";
16
+ import { u as g } from "../chunk/CdaT1b_F.js";
17
+ import { u as F } from "../chunk/zmmqLCF4.js";
18
+ import { u as U } from "../chunk/CbLaCJmG.js";
19
+ import { u as H } from "../chunk/DonYzv30.js";
20
+ import { u as j } from "../chunk/BsY85n3_.js";
21
+ import { u as A } from "../chunk/BBkdXHrJ.js";
22
+ import { u as G } from "../chunk/VSe_Wq1g.js";
23
+ import { u as N } from "../chunk/Bg3uJGPu.js";
24
+ import { u as T } from "../chunk/CmZzBtA4.js";
25
+ import { u as Y } from "../chunk/hEWZQ8Zi.js";
26
+ import { u as _ } from "../chunk/Duezix3m.js";
27
+ import { u as ee } from "../chunk/a3hR6zLw.js";
28
+ import { u as oe } from "../chunk/BKT9BFf4.js";
29
+ import { u as ue } from "../chunk/BPD5iNdA.js";
29
30
  export {
30
31
  a as useComputedState,
31
32
  m as useCreate,
@@ -36,23 +37,24 @@ export {
36
37
  v as useInterval,
37
38
  b as useIsFirstRender,
38
39
  P as useIsomorphicLayoutEffect,
39
- k as useKeyboardEvent,
40
- W as useMedia,
41
- E as useMergeProps,
42
- V as useMergeValue,
43
- y as useOnlineStatus,
44
- F as useOverflowHidden,
45
- D as useOverrideRef,
46
- K as usePersistCallback,
47
- j as usePrefersColorSchemeDark,
48
- A as usePrevious,
49
- G as useRefs,
50
- N as useResizeObserver,
51
- T as useStateCallback,
52
- Y as useStateWithPromise,
53
- _ as useUpdateEffect,
40
+ h as useKeyboardEvent,
41
+ W as useListenResize,
42
+ z as useMedia,
43
+ M as useMergeProps,
44
+ g as useMergeValue,
45
+ F as useOnlineStatus,
46
+ U as useOverflowHidden,
47
+ H as useOverrideRef,
48
+ j as usePersistCallback,
49
+ A as usePrefersColorSchemeDark,
50
+ G as usePrevious,
51
+ N as useRefs,
52
+ T as useResizeObserver,
53
+ Y as useStateCallback,
54
+ _ as useStateWithPromise,
55
+ ee as useUpdateEffect,
54
56
  o as useVerificationCode,
55
- ee as useWatch,
57
+ oe as useWatch,
56
58
  u as useWatermark,
57
- oe as useWindowSize
59
+ ue as useWindowSize
58
60
  };
@@ -0,0 +1,4 @@
1
+ import { u as f } from "../chunk/BL9DMeor.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/BSCrLtfQ.js";
1
+ import { u as f } from "../chunk/a3hR6zLw.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { u as f } from "../chunk/Clo26EcR.js";
1
+ import { u as f } from "../chunk/BPD5iNdA.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/icon/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import i from "react";
3
- import { C as g } from "../chunk/ll867Bf3.js";
3
+ import { C as g } from "../chunk/CASwN1hB.js";
4
4
  import { m as x } from "../chunk/JPPo5nY_.js";
5
5
  import { isServerRendering as y } from "../utils/dom.js";
6
6
  const C = [];
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { I as i } from "../chunk/ll867Bf3.js";
3
+ import { I as i } from "../chunk/CASwN1hB.js";
4
4
  import "../chunk/JPPo5nY_.js";
5
5
  export {
6
6
  i as default
package/image/Image.js CHANGED
@@ -5,7 +5,7 @@ import E from "lodash/isNumber";
5
5
  import D from "lodash/isPlainObject";
6
6
  import Ne from "lodash/isUndefined";
7
7
  import Ve, { useContext as H, useMemo as p, useRef as J, useEffect as g } from "react";
8
- import { a as xe } from "../chunk/ll867Bf3.js";
8
+ import { a as xe } from "../chunk/CASwN1hB.js";
9
9
  import { u as Le } from "../chunk/b1e8awfs.js";
10
10
  import { u as ye } from "../chunk/XTEsYGuF.js";
11
11
  import { u as Ee } from "../chunk/BFTV6myl.js";
@@ -13,7 +13,7 @@ import { u as Ge } from "../chunk/CdaT1b_F.js";
13
13
  import { m as Q } from "../chunk/JPPo5nY_.js";
14
14
  import { o as Re } from "../chunk/BKKEev13.js";
15
15
  import { u as je, I as Se } from "../chunk/DpoumMDw.js";
16
- import { P as W, u as Ue } from "../chunk/CgurXnoy.js";
16
+ import { P as W, u as Ue } from "../chunk/tIRvN_q7.js";
17
17
  import Fe from "./ImagePreviewGroup.js";
18
18
  import { PreviewGroupContext as Me } from "./previewGroupContext.js";
19
19
  let G = 0;
@@ -12,7 +12,7 @@ import "@unicom-cloud/icons/IconUiZoomIn";
12
12
  import "@unicom-cloud/icons/IconUiZoomOut";
13
13
  import "lodash/isUndefined";
14
14
  import "react";
15
- import "../chunk/ll867Bf3.js";
15
+ import "../chunk/CASwN1hB.js";
16
16
  import "lodash/isEqualWith";
17
17
  import "../chunk/CdaT1b_F.js";
18
18
  import "../chunk/D-TPB2Do.js";
@@ -25,7 +25,7 @@ import "../chunk/BFTV6myl.js";
25
25
  import "../chunk/CbLaCJmG.js";
26
26
  import "../chunk/C48SmsN-.js";
27
27
  import "../chunk/Ce1j9KTi.js";
28
- import "../chunk/BSCrLtfQ.js";
28
+ import "../chunk/a3hR6zLw.js";
29
29
  import "lodash/debounce";
30
30
  import "../portal/index.js";
31
31
  import "../chunk/DzVH9IBy.js";
@@ -35,7 +35,7 @@ import "../chunk/CIRG541s.js";
35
35
  import "./ImagePreviewArrow.js";
36
36
  import "./ImagePreviewToolbar.js";
37
37
  import "./previewGroupContext.js";
38
- import { P as M } from "../chunk/CgurXnoy.js";
38
+ import { P as M } from "../chunk/tIRvN_q7.js";
39
39
  export {
40
40
  M as default
41
41
  };
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import d from "@unicom-cloud/icons/IconUiLeft";
3
3
  import p from "@unicom-cloud/icons/IconUiRight";
4
4
  import { useContext as w } from "react";
5
- import { a as u } from "../chunk/ll867Bf3.js";
5
+ import { a as u } from "../chunk/CASwN1hB.js";
6
6
  import { m as a } from "../chunk/JPPo5nY_.js";
7
7
  function j(l) {
8
8
  const {
@@ -5,7 +5,7 @@ import Q from "lodash/isUndefined";
5
5
  import a, { forwardRef as T, useMemo as W, useState as X, useRef as g, useEffect as Y, useImperativeHandle as Z } from "react";
6
6
  import { u as $ } from "../chunk/oopARUrq.js";
7
7
  import { u as x } from "../chunk/CdaT1b_F.js";
8
- import { P as ee } from "../chunk/CgurXnoy.js";
8
+ import { P as ee } from "../chunk/tIRvN_q7.js";
9
9
  import { PreviewGroupContext as re } from "./previewGroupContext.js";
10
10
  function te(I, C) {
11
11
  const {
package/image/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import o from "./Image.js";
2
- import { P as m } from "../chunk/CgurXnoy.js";
2
+ import { P as m } from "../chunk/tIRvN_q7.js";
3
3
  import { default as p } from "./ImagePreviewGroup.js";
4
4
  export {
5
5
  m as ImagePreview,