@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.
- package/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +1 -1
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/Trigger.js +1 -1
- package/affix/index.js +1 -1
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +1 -1
- package/anchor/Link.js +1 -1
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/index.js +1 -1
- package/chunk/{CpGBWmuz.js → -C2QiGwq.js} +2 -2
- package/chunk/B80D01PB.js +257 -0
- package/chunk/BL9DMeor.js +9 -0
- package/chunk/{Clo26EcR.js → BPD5iNdA.js} +16 -21
- package/chunk/{SSK90wgo.js → Bh8AO6R8.js} +1 -1
- package/chunk/CASwN1hB.js +710 -0
- package/chunk/{BDB0LByj.js → CSk3yQDO.js} +1 -1
- package/chunk/{CKyu68pu.js → Cm9BS47C.js} +2 -2
- package/chunk/{CzQObzKd.js → DC-pxreh.js} +4 -4
- package/chunk/{C98ks5S8.js → DFf75sXd.js} +1 -1
- package/chunk/{CD3AUpzo.js → DcYqcuGl.js} +1 -1
- package/chunk/{BjpUSKM3.js → YUHbzjGj.js} +1 -1
- package/chunk/a3hR6zLw.js +12 -0
- package/chunk/{vmgkWLYf.js → bgmEVbGy.js} +2 -2
- package/chunk/{Bi4UkwOR.js → iOWILwNv.js} +3 -3
- package/chunk/{CgurXnoy.js → tIRvN_q7.js} +2 -2
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +1 -1
- package/date-picker/Picker.js +2 -2
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +80 -75
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/form/Control.js +84 -81
- package/form/Form.js +1 -1
- package/form/FormItem.js +1 -1
- package/grid/Col.js +1 -1
- package/grid/Row.js +1 -1
- package/grid/grid-item.js +1 -1
- package/grid/grid.js +1 -1
- package/hooks/index.js +36 -34
- package/hooks/useListenResize.js +4 -0
- package/hooks/useUpdateEffect.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +3 -3
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +567 -565
- package/input/Group.js +1 -1
- package/input/Input.js +1 -1
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/mentions/index.js +1 -1
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +1 -1
- package/notice/index.js +1 -1
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/notification/withNotification.js +43 -35
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/index.js +1 -1
- package/radio/Group.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +1 -1
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +2 -2
- package/space/index.js +20 -20
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/statistic/Countdown.js +1 -1
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +3 -3
- package/table/index.js +89 -81
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +2 -2
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +2 -2
- package/trigger/index.js +1 -1
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/useListenResize.d.ts +1 -0
- package/types/index.d.ts +1 -1
- package/types/message/interface.d.ts +0 -1
- package/types/notification/interface.d.ts +0 -1
- package/types/space/index.d.ts +3 -4
- package/types/table/hook/useThResizable.d.ts +1 -1
- package/types/version/index.d.ts +4 -4
- package/typography/Base.js +2 -2
- package/typography/Ellipsis.js +8 -8
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/typography/index.js +8 -8
- package/typography/useEllipsis.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/upload/Uploader.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/index.js +2 -2
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +5 -5
- package/watermark/Watermark.js +1 -1
- package/chunk/BSCrLtfQ.js +0 -10
- package/chunk/BSaQv6mx.js +0 -251
- package/chunk/ll867Bf3.js +0 -730
package/dropdown/Button.js
CHANGED
|
@@ -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/
|
|
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/
|
|
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
package/form/Control.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var P = (p, g, e) => g in p ?
|
|
3
|
-
var
|
|
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
|
|
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,
|
|
23
|
+
var i, l, o;
|
|
24
24
|
super(e);
|
|
25
|
-
|
|
25
|
+
s(this, "context");
|
|
26
26
|
// 校验信息
|
|
27
|
-
|
|
27
|
+
s(this, "errors", null);
|
|
28
28
|
// 校验 warning 信息
|
|
29
|
-
|
|
29
|
+
s(this, "warnings", null);
|
|
30
30
|
// undefined => validating => success / error => (validating or undefined)
|
|
31
|
-
|
|
31
|
+
s(this, "validateStatus");
|
|
32
32
|
// 是否被用户操作过
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
s(this, "touched");
|
|
34
|
+
s(this, "isDestroyed", !1);
|
|
35
35
|
// 保存 props.children 或函数类型 props.children() 的返回值
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
s(this, "childrenElement", null);
|
|
37
|
+
s(this, "removeRegisterField");
|
|
38
38
|
// 触发 store 进行状态收集
|
|
39
39
|
// TODO: error, validateStatus ,touched 状态和 UI 组件解耦,统一维护在 store 内部
|
|
40
|
-
|
|
40
|
+
s(this, "triggerStateCollect", () => {
|
|
41
41
|
const { innerCollectFormState: e } = this.context.store.getInnerMethods(!0);
|
|
42
42
|
e();
|
|
43
43
|
});
|
|
44
44
|
// 切换校验状态
|
|
45
|
-
|
|
45
|
+
s(this, "toggleValidateStatus", (e) => {
|
|
46
46
|
this.validateStatus = e, this.triggerStateCollect();
|
|
47
47
|
});
|
|
48
48
|
// 切换 touch 状态
|
|
49
|
-
|
|
49
|
+
s(this, "toggleTouched", (e) => {
|
|
50
50
|
this.touched = R(e) ? e : !this.touched, this.triggerStateCollect();
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
s(this, "setWarnings", (e) => {
|
|
53
53
|
this.warnings = e, this.triggerStateCollect();
|
|
54
54
|
});
|
|
55
|
-
|
|
55
|
+
s(this, "setErrors", (e) => {
|
|
56
56
|
this.errors = e, this.triggerStateCollect();
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
const i = b(t.field) ? t.field : [t.field], { field:
|
|
82
|
-
if (
|
|
83
|
-
b(
|
|
84
|
-
else if (
|
|
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(
|
|
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),
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
118
|
-
var
|
|
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
|
|
123
|
-
j(
|
|
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
|
-
|
|
129
|
-
const { validateMessages: e } = this.context, { field: t, rules: i } = this.props,
|
|
130
|
-
return k(t,
|
|
131
|
-
({ error:
|
|
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
|
-
|
|
140
|
-
const { validateTrigger: t, validateMessages: i } = this.context, { field:
|
|
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 ? (
|
|
145
|
-
h.validateTrigger ||
|
|
146
|
-
).indexOf(e) > -1) :
|
|
147
|
-
return n && n.length &&
|
|
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[
|
|
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:
|
|
152
|
+
), this.updateFormItem(), Promise.resolve({ error: h, value: a, field: l });
|
|
153
153
|
}
|
|
154
|
-
)) : Promise.resolve({ error: null, value: a, field:
|
|
154
|
+
)) : Promise.resolve({ error: null, value: a, field: l });
|
|
155
155
|
});
|
|
156
156
|
// 每次 render 都会作为 onChange 传递给 children,需要保证引用地址不变
|
|
157
157
|
// 所以 handleTrigger 需要声明在类上,并且直接作为 children.props.onChange
|
|
158
|
-
|
|
159
|
-
const i = this.childrenElement || this.props.children, { store:
|
|
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,
|
|
169
|
-
...
|
|
170
|
-
})), this.toggleTouched(!0), this.innerSetFieldValue(
|
|
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
|
-
|
|
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()
|
|
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((
|
|
211
|
-
i = i.concat(
|
|
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:
|
|
219
|
-
triggerPropName:
|
|
220
|
-
validateStatus:
|
|
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((
|
|
227
|
-
u[
|
|
229
|
+
this.getValidateTrigger().forEach((S) => {
|
|
230
|
+
u[S] = (D) => {
|
|
228
231
|
var f, w;
|
|
229
|
-
this.validateField(
|
|
232
|
+
this.validateField(S), (w = (f = c.props) == null ? void 0 : f[S]) == null || w.call(f, D);
|
|
230
233
|
};
|
|
231
|
-
}), u[
|
|
232
|
-
let v =
|
|
233
|
-
return F(a) && (v = a(v)), 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:
|
|
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: `${
|
|
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
|
-
|
|
244
|
+
o && l && /* @__PURE__ */ E(
|
|
242
245
|
"div",
|
|
243
246
|
{
|
|
244
|
-
className: `${
|
|
247
|
+
className: `${r}-item-feedback ${r}-item-feedback-${o}`,
|
|
245
248
|
children: [
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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
|
-
|
|
259
|
+
s(x, "defaultProps", {
|
|
257
260
|
trigger: "onChange",
|
|
258
261
|
triggerPropName: "value"
|
|
259
|
-
}),
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
13
|
-
import { u as W } from "../chunk/
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as F } from "../chunk/
|
|
18
|
-
import { u as
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as j } from "../chunk/
|
|
21
|
-
import { u as A } from "../chunk/
|
|
22
|
-
import { u as G } from "../chunk/
|
|
23
|
-
import { u as N } from "../chunk/
|
|
24
|
-
import { u as T } from "../chunk/
|
|
25
|
-
import { u as Y } from "../chunk/
|
|
26
|
-
import { u as _ } from "../chunk/
|
|
27
|
-
import { u as ee } from "../chunk/
|
|
28
|
-
import { u as oe } from "../chunk/
|
|
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
|
-
|
|
40
|
-
W as
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
F as
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
j as
|
|
48
|
-
A as
|
|
49
|
-
G as
|
|
50
|
-
N as
|
|
51
|
-
T as
|
|
52
|
-
Y as
|
|
53
|
-
_ as
|
|
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
|
-
|
|
57
|
+
oe as useWatch,
|
|
56
58
|
u as useWatermark,
|
|
57
|
-
|
|
59
|
+
ue as useWindowSize
|
|
58
60
|
};
|
package/hooks/useUpdateEffect.js
CHANGED
package/hooks/useWindowSize.js
CHANGED
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/
|
|
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 = [];
|
package/icon-hover/index.js
CHANGED
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/
|
|
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/
|
|
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;
|
package/image/ImagePreview.js
CHANGED
|
@@ -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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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