@unicom-cloud/ui 0.8.81 → 0.8.82
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 +2 -2
- package/BackTop.js +2 -2
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +2 -2
- 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 +2 -2
- package/Comment.js +1 -1
- package/ConfigProvider.js +5 -4
- package/Copy.js +1 -1
- package/DatePicker.js +7 -7
- 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 +2 -2
- package/Mentions.js +2 -2
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +1 -1
- package/Notification.js +5 -5
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.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/Select.js +1 -1
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +1 -1
- package/SpeechSynthesis.js +1 -1
- package/Spin.js +1 -1
- package/Statistic.js +2 -2
- 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 +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/Typography.js +1 -1
- package/affix/index.js +60 -57
- package/alert/index.js +53 -53
- package/anchor/Anchor.js +72 -72
- package/anchor/Link.js +27 -27
- package/anchor/util.js +1 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +31 -31
- package/avatar/Group.js +25 -25
- package/back-top/index.js +30 -30
- package/badge/index.js +37 -37
- package/breadcrumb/index.js +26 -26
- package/button/Group.js +7 -7
- package/button/index.js +29 -29
- package/calendar/index.js +2 -2
- package/card/Grid.js +12 -12
- package/card/Meta.js +17 -17
- package/card/index.js +44 -44
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +25 -25
- package/carousel/index.js +77 -77
- package/cascader/Cascader.js +2 -2
- 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/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{yLRv5RIK.js → CQI1gsQs.js} +181 -181
- package/chunk/CmMehQON.js +1464 -0
- package/chunk/Cplu5dtQ.js +730 -0
- package/chunk/{C5X4hOkx.js → D0338Pbq.js} +80 -80
- package/chunk/{DYspELhF.js → DXDbeIai.js} +223 -223
- package/chunk/{DEiyXzBZ.js → DfrB26fI.js} +63 -63
- package/chunk/{BG7YGUsx.js → dKvAiKxr.js} +119 -119
- package/chunk/{BNevupAU.js → uKZyjtff.js} +5 -4
- package/chunk/{DLBfXSnU.js → w221i0nK.js} +2872 -2871
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +36 -36
- package/color-picker/InputAlpha.js +11 -11
- package/color-picker/InputHex.js +24 -24
- package/color-picker/InputRgb.js +23 -23
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +2 -2
- package/comment/index.js +31 -31
- package/config-provider/ConfigProvider.js +5 -4
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +4 -3
- package/copy/index.js +28 -28
- package/date-picker/Picker.js +276 -276
- package/date-picker/{PickerRange.js → RangePicker.js} +2 -2
- package/date-picker/index.js +26 -27
- package/descriptions/index.js +33 -33
- package/divider/index.js +12 -12
- package/draggable/index.js +23 -23
- package/drawer/Drawer.js +81 -81
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +56 -56
- package/empty/index.js +1 -1
- package/form/Form.js +76 -76
- package/form/FormItem.js +64 -64
- package/grid/Col.js +53 -53
- package/grid/Row.js +34 -34
- package/grid/grid-item.js +29 -29
- package/grid/grid.js +50 -50
- package/icon/index.js +20 -19
- package/icon-hover/index.js +1 -1
- package/image/Image.js +86 -86
- package/image/ImagePreview.js +2 -2
- package/image/ImagePreviewArrow.js +22 -22
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +410 -408
- package/input/Group.js +8 -8
- package/input/Input.js +322 -322
- 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 +40 -40
- package/layout/Content.js +7 -7
- package/layout/Footer.js +9 -9
- package/layout/Header.js +7 -7
- package/layout/Sider.js +55 -55
- package/layout/index.js +32 -32
- package/link/index.js +35 -35
- package/list/Item.js +29 -29
- package/list/Meta.js +12 -12
- package/list/index.js +2 -2
- package/mentions/index.js +2 -2
- 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 +5 -5
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +12 -12
- package/overflow-ellipsis/index.js +24 -24
- package/package.json +1 -1
- package/page-header/index.js +38 -38
- package/pagination/PageItem.js +16 -16
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +2 -2
- package/pagination/Pagination.js +2 -2
- package/pagination/index.js +1 -1
- package/picker/Input.js +69 -69
- package/picker/InputRange.js +111 -111
- package/popconfirm/index.js +61 -61
- package/popover/index.js +35 -35
- package/progress/index.js +22 -22
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +49 -49
- package/resize-box/ResizeTrigger.js +34 -34
- package/resize-box/Split.js +56 -56
- package/resize-box/SplitGroup.js +55 -55
- package/resize-box/index.js +51 -51
- package/result/index.js +41 -41
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select/index.js +2 -2
- package/select/util.js +1 -1
- package/select-view/Core.js +125 -125
- package/skeleton/index.js +20 -20
- package/slider/Button.js +57 -57
- package/slider/index.js +116 -116
- package/space/index.js +46 -44
- package/speech-synthesis/index.js +1 -1
- package/spin/DotLoading.js +10 -10
- package/spin/index.js +44 -44
- package/statistic/Countdown.js +34 -34
- package/statistic/index.js +67 -67
- package/steps/index.js +55 -55
- package/style.css +1 -1
- package/switch/index.js +54 -54
- package/table/Table.js +3 -3
- package/table/index.js +1 -1
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +12 -12
- package/tabs/index.js +2 -2
- package/tag/index.js +45 -45
- package/time-picker/Picker.js +76 -76
- package/time-picker/TimePicker.js +136 -136
- package/time-picker/index.js +8 -8
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +47 -47
- package/timeline/Timeline.js +41 -41
- package/tooltip/index.js +29 -29
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +2 -2
- package/tree/Animation.js +2 -2
- package/tree/Node.js +2 -2
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +2 -2
- package/trigger/index.js +60 -60
- package/types/config-provider/ConfigProvider.d.ts +2 -2
- package/types/config-provider/context.d.ts +1 -1
- package/types/date-picker/index.d.ts +8 -9
- package/types/date-picker/interface.d.ts +9 -9
- package/types/index.d.ts +1 -1
- package/types/picker/Input.d.ts +2 -2
- package/types/space/index.d.ts +2 -1
- package/types/utils/names.d.ts +1 -1
- package/typography/Base.js +53 -53
- package/typography/Ellipsis.js +9 -8
- package/typography/Operations.js +28 -28
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +47 -47
- package/upload/Upload.js +184 -184
- package/utils/contextHolder.js +3 -3
- package/utils/index.js +13 -13
- package/utils/names.js +1 -1
- package/utils/setPrimaryColor.js +18 -13
- package/utils/tween.js +1 -1
- package/verification-code/VerificationCode.js +49 -49
- package/version/index.js +1 -1
- package/watermark/Watermark.js +24 -24
- package/chunk/CQvM33Vg.js +0 -724
- package/chunk/yhU2zeeu.js +0 -1461
- /package/types/date-picker/{PickerRange.d.ts → RangePicker.d.ts} +0 -0
package/dropdown/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, 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/Cplu5dtQ.js";
|
|
5
5
|
import { u as G } from "../chunk/BFTV6myl.js";
|
|
6
6
|
import { u as X } from "../chunk/CXPOj2uy.js";
|
|
7
7
|
import Y, { EventsByTriggerNeed as Z } from "../trigger/index.js";
|
|
@@ -19,66 +19,66 @@ const ro = {
|
|
|
19
19
|
icon: /* @__PURE__ */ i(Q, {}),
|
|
20
20
|
unmountOnExit: !0
|
|
21
21
|
};
|
|
22
|
-
function so(
|
|
23
|
-
const { componentConfig: u } = z(F),
|
|
24
|
-
|
|
22
|
+
function so(B, R) {
|
|
23
|
+
const { componentConfig: u } = z(F), g = G(
|
|
24
|
+
B,
|
|
25
25
|
ro,
|
|
26
26
|
u == null ? void 0 : u["Dropdown.Button"]
|
|
27
27
|
), {
|
|
28
|
-
className:
|
|
29
|
-
style:
|
|
30
|
-
children:
|
|
28
|
+
className: a,
|
|
29
|
+
style: c,
|
|
30
|
+
children: M,
|
|
31
31
|
disabled: t,
|
|
32
|
-
position:
|
|
33
|
-
type:
|
|
32
|
+
position: b = "br",
|
|
33
|
+
type: h = "default",
|
|
34
34
|
size: n,
|
|
35
|
-
icon:
|
|
35
|
+
icon: V = /* @__PURE__ */ i(Q, {}),
|
|
36
36
|
onClick: f,
|
|
37
|
-
buttonProps:
|
|
37
|
+
buttonProps: x,
|
|
38
38
|
rightButtonProps: r,
|
|
39
39
|
// 潘启宝添加
|
|
40
40
|
buttonsRender: C,
|
|
41
41
|
...s
|
|
42
|
-
} =
|
|
42
|
+
} = g;
|
|
43
43
|
let p = /* @__PURE__ */ i(
|
|
44
44
|
k,
|
|
45
45
|
{
|
|
46
46
|
disabled: t,
|
|
47
|
-
type:
|
|
47
|
+
type: h,
|
|
48
48
|
size: n,
|
|
49
49
|
onClick: f,
|
|
50
|
-
...
|
|
51
|
-
children:
|
|
50
|
+
...x,
|
|
51
|
+
children: M
|
|
52
52
|
}
|
|
53
53
|
), e = /* @__PURE__ */ i(
|
|
54
54
|
k,
|
|
55
55
|
{
|
|
56
56
|
disabled: t,
|
|
57
|
-
type:
|
|
57
|
+
type: h,
|
|
58
58
|
size: n,
|
|
59
|
-
icon:
|
|
59
|
+
icon: V,
|
|
60
60
|
...r
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
C && ([p, e] = C([p, e]));
|
|
64
|
-
const
|
|
64
|
+
const y = t || !e || e.props && e.props.loading;
|
|
65
65
|
return /* @__PURE__ */ S(
|
|
66
66
|
k.Group,
|
|
67
67
|
{
|
|
68
|
-
className:
|
|
69
|
-
style:
|
|
68
|
+
className: a,
|
|
69
|
+
style: c,
|
|
70
70
|
ref: R,
|
|
71
|
-
...L(
|
|
71
|
+
...L(g),
|
|
72
72
|
children: [
|
|
73
73
|
p,
|
|
74
74
|
/* @__PURE__ */ i(
|
|
75
75
|
O,
|
|
76
76
|
{
|
|
77
77
|
disabled: t,
|
|
78
|
-
position:
|
|
78
|
+
position: b,
|
|
79
79
|
...s,
|
|
80
80
|
triggerProps: {
|
|
81
|
-
disabled:
|
|
81
|
+
disabled: y,
|
|
82
82
|
...s == null ? void 0 : s.triggerProps
|
|
83
83
|
},
|
|
84
84
|
children: e
|
|
@@ -90,65 +90,65 @@ function so(x, R) {
|
|
|
90
90
|
}
|
|
91
91
|
const q = W(so);
|
|
92
92
|
q.displayName = "DropdownButton";
|
|
93
|
-
function io(
|
|
93
|
+
function io(B, R) {
|
|
94
94
|
const u = {
|
|
95
95
|
position: "bl",
|
|
96
96
|
trigger: "hover",
|
|
97
97
|
unmountOnExit: !0
|
|
98
|
-
},
|
|
98
|
+
}, g = {
|
|
99
99
|
left: 4,
|
|
100
100
|
right: 4,
|
|
101
101
|
top: 4,
|
|
102
102
|
bottom: 4
|
|
103
|
-
}, { getPrefixCls:
|
|
104
|
-
|
|
103
|
+
}, { getPrefixCls: a, componentConfig: c, rtl: M } = z(F), t = G(
|
|
104
|
+
B,
|
|
105
105
|
u,
|
|
106
|
-
|
|
106
|
+
c == null ? void 0 : c.Dropdown
|
|
107
107
|
), {
|
|
108
|
-
trigger:
|
|
109
|
-
droplist:
|
|
108
|
+
trigger: b,
|
|
109
|
+
droplist: h,
|
|
110
110
|
children: n,
|
|
111
|
-
position:
|
|
111
|
+
position: V,
|
|
112
112
|
disabled: f,
|
|
113
|
-
unmountOnExit:
|
|
113
|
+
unmountOnExit: x,
|
|
114
114
|
triggerProps: r,
|
|
115
115
|
getPopupContainer: C,
|
|
116
116
|
onVisibleChange: s,
|
|
117
117
|
...p
|
|
118
|
-
} = t, e =
|
|
118
|
+
} = t, e = a == null ? void 0 : a("dropdown"), y = j(null), [E, H] = X(!1, {
|
|
119
119
|
defaultValue: t.defaultPopupVisible,
|
|
120
120
|
value: t.popupVisible
|
|
121
|
-
}), _ = () => l.Children.only(
|
|
122
|
-
var
|
|
123
|
-
H(o), s == null || s(o), (
|
|
121
|
+
}), _ = () => l.Children.only(h || /* @__PURE__ */ i("span", {})), N = (o) => {
|
|
122
|
+
var m;
|
|
123
|
+
H(o), s == null || s(o), (m = r == null ? void 0 : r.onVisibleChange) == null || m.call(r, o);
|
|
124
124
|
}, J = (o) => {
|
|
125
125
|
o !== E && N(o);
|
|
126
126
|
}, K = () => {
|
|
127
127
|
const o = _();
|
|
128
128
|
if (A(o, "type.__PQB_MENU__") || A(o, "props.isMenu")) {
|
|
129
|
-
let
|
|
130
|
-
for (const
|
|
131
|
-
if (
|
|
132
|
-
|
|
129
|
+
let m = !0;
|
|
130
|
+
for (const D of l.Children.toArray(o.props.children))
|
|
131
|
+
if (D != null) {
|
|
132
|
+
m = !1;
|
|
133
133
|
break;
|
|
134
134
|
}
|
|
135
135
|
return l.cloneElement(o, {
|
|
136
136
|
prefixCls: U(`${e}-menu`, {
|
|
137
|
-
[`${e}-menu-hidden`]:
|
|
137
|
+
[`${e}-menu-hidden`]: m
|
|
138
138
|
}),
|
|
139
139
|
inDropdown: !0,
|
|
140
140
|
selectable: !1,
|
|
141
|
-
onClickMenuItem: (...
|
|
142
|
-
var
|
|
143
|
-
let
|
|
141
|
+
onClickMenuItem: (...D) => {
|
|
142
|
+
var w, T, $;
|
|
143
|
+
let P = null;
|
|
144
144
|
const I = _();
|
|
145
|
-
I.props.onClickMenuItem && (
|
|
146
|
-
...
|
|
145
|
+
I.props.onClickMenuItem && (P = I.props.onClickMenuItem(
|
|
146
|
+
...D
|
|
147
147
|
));
|
|
148
|
-
const
|
|
149
|
-
($ =
|
|
148
|
+
const d = (T = (w = y.current) == null ? void 0 : w.getRootElement) == null ? void 0 : T.call(w);
|
|
149
|
+
($ = d == null ? void 0 : d.focus) == null || $.call(d), P instanceof Promise ? P.finally(
|
|
150
150
|
() => N(!1)
|
|
151
|
-
) :
|
|
151
|
+
) : P !== !1 && N(!1);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -157,20 +157,20 @@ function io(x, R) {
|
|
|
157
157
|
return /* @__PURE__ */ i(
|
|
158
158
|
Y,
|
|
159
159
|
{
|
|
160
|
-
ref:
|
|
160
|
+
ref: y,
|
|
161
161
|
classNames: "slideDynamicOrigin",
|
|
162
162
|
childrenPrefix: e,
|
|
163
|
-
trigger:
|
|
163
|
+
trigger: b,
|
|
164
164
|
popup: K,
|
|
165
165
|
mouseEnterDelay: 400,
|
|
166
166
|
mouseLeaveDelay: 400,
|
|
167
167
|
disabled: f,
|
|
168
|
-
unmountOnExit:
|
|
169
|
-
position:
|
|
168
|
+
unmountOnExit: x,
|
|
169
|
+
position: V,
|
|
170
170
|
popupVisible: E,
|
|
171
|
-
popupAlign:
|
|
171
|
+
popupAlign: g,
|
|
172
172
|
getPopupContainer: C,
|
|
173
|
-
alignPoint:
|
|
173
|
+
alignPoint: b === "contextMenu",
|
|
174
174
|
...to(p, Z),
|
|
175
175
|
...L(p),
|
|
176
176
|
...eo(r, ["onVisibleChange"]),
|
|
@@ -181,7 +181,7 @@ function io(x, R) {
|
|
|
181
181
|
className: U(
|
|
182
182
|
{
|
|
183
183
|
[`${e}-popup-visible`]: E,
|
|
184
|
-
[`${[e]}-rtl`]:
|
|
184
|
+
[`${[e]}-rtl`]: M
|
|
185
185
|
},
|
|
186
186
|
n.props.className
|
|
187
187
|
),
|
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/
|
|
4
|
+
import { E as e } from "../chunk/Cplu5dtQ.js";
|
|
5
5
|
import "../chunk/BFTV6myl.js";
|
|
6
6
|
import "@unicom-cloud/utils/class-name";
|
|
7
7
|
export {
|
package/form/Form.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { p as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
import { a as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import { o as
|
|
11
|
-
import { FormProviderContext as
|
|
12
|
-
import
|
|
13
|
-
import { ID_SUFFIX as
|
|
2
|
+
import { p as O } from "../chunk/Coz3rCng.js";
|
|
3
|
+
import A from "lodash/isPlainObject";
|
|
4
|
+
import _ from "lodash/merge";
|
|
5
|
+
import { forwardRef as H, useContext as V, useRef as U, useEffect as W, useImperativeHandle as X } from "react";
|
|
6
|
+
import { a as B, b as G } from "../chunk/Cplu5dtQ.js";
|
|
7
|
+
import { u as J } from "../chunk/5_U1CBIu.js";
|
|
8
|
+
import { u as K } from "../chunk/BFTV6myl.js";
|
|
9
|
+
import L from "@unicom-cloud/utils/class-name";
|
|
10
|
+
import { o as Q } from "../chunk/BKKEev13.js";
|
|
11
|
+
import { FormProviderContext as Y, FormContext as Z } from "./context.js";
|
|
12
|
+
import ee from "./useForm.js";
|
|
13
|
+
import { ID_SUFFIX as oe } from "./util.js";
|
|
14
14
|
function f(a, u) {
|
|
15
|
-
const
|
|
16
|
-
return a ? `${a}-${
|
|
15
|
+
const n = u.replace(/[[.]/g, "_").replace(/\]/g, "");
|
|
16
|
+
return a ? `${a}-${n}` : `${n}`;
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const re = {
|
|
19
19
|
layout: "horizontal",
|
|
20
20
|
labelCol: { span: 5, offset: 0 },
|
|
21
21
|
labelAlign: "right",
|
|
@@ -23,60 +23,60 @@ const ee = {
|
|
|
23
23
|
requiredSymbol: !0,
|
|
24
24
|
wrapper: "form",
|
|
25
25
|
validateTrigger: "onChange"
|
|
26
|
-
},
|
|
27
|
-
var h, S;
|
|
28
|
-
const
|
|
26
|
+
}, te = (a, u) => {
|
|
27
|
+
var h, S, $, y;
|
|
28
|
+
const n = V(B), t = V(Y), d = U(null), [l] = ee(
|
|
29
29
|
a.form
|
|
30
|
-
), e =
|
|
30
|
+
), e = K(
|
|
31
31
|
a,
|
|
32
|
-
|
|
33
|
-
(h =
|
|
32
|
+
re,
|
|
33
|
+
(h = n.componentConfig) == null ? void 0 : h.Form
|
|
34
34
|
), {
|
|
35
35
|
layout: g,
|
|
36
|
-
labelCol:
|
|
37
|
-
wrapperCol:
|
|
38
|
-
wrapper:
|
|
36
|
+
labelCol: R,
|
|
37
|
+
wrapperCol: w,
|
|
38
|
+
wrapper: I,
|
|
39
39
|
id: F,
|
|
40
|
-
requiredSymbol:
|
|
41
|
-
labelAlign:
|
|
42
|
-
disabled:
|
|
43
|
-
colon:
|
|
44
|
-
className:
|
|
45
|
-
validateTrigger:
|
|
46
|
-
prefixCls:
|
|
47
|
-
validateMessages:
|
|
48
|
-
...
|
|
49
|
-
} = e, m =
|
|
50
|
-
|
|
40
|
+
requiredSymbol: M,
|
|
41
|
+
labelAlign: N,
|
|
42
|
+
disabled: z,
|
|
43
|
+
colon: T,
|
|
44
|
+
className: E,
|
|
45
|
+
validateTrigger: P,
|
|
46
|
+
prefixCls: q,
|
|
47
|
+
validateMessages: D,
|
|
48
|
+
...j
|
|
49
|
+
} = e, m = q || ((S = n.getPrefixCls) == null ? void 0 : S.call(n, "form")), k = n.rtl, b = "size" in e ? e.size : n.size, C = l.getInnerMethods(!0);
|
|
50
|
+
J(() => {
|
|
51
51
|
C.innerSetInitialValues(e.initialValues);
|
|
52
|
-
}),
|
|
52
|
+
}), W(() => {
|
|
53
53
|
let o;
|
|
54
54
|
return t.register && (o = t.register(e.id, l)), o;
|
|
55
|
-
}, [e.id, l]), l.scrollToField = (o,
|
|
56
|
-
const r = d.current,
|
|
55
|
+
}, [e.id, l]), l.scrollToField = (o, s) => {
|
|
56
|
+
const r = d.current, i = e.id;
|
|
57
57
|
if (!r)
|
|
58
58
|
return;
|
|
59
59
|
let c = r.querySelector(
|
|
60
|
-
`#${f(
|
|
60
|
+
`#${f(i, o)}`
|
|
61
61
|
);
|
|
62
62
|
c || (c = r.querySelector(
|
|
63
|
-
`#${f(
|
|
64
|
-
)), c &&
|
|
63
|
+
`#${f(i, o)}${oe}`
|
|
64
|
+
)), c && O(c, {
|
|
65
65
|
behavior: "smooth",
|
|
66
66
|
block: "nearest",
|
|
67
67
|
scrollMode: "if-needed",
|
|
68
|
-
...
|
|
68
|
+
...s
|
|
69
69
|
});
|
|
70
70
|
}, C.innerSetCallbacks({
|
|
71
|
-
onValuesChange: (o,
|
|
72
|
-
var r,
|
|
73
|
-
(r = e.onValuesChange) == null || r.call(e, o,
|
|
71
|
+
onValuesChange: (o, s) => {
|
|
72
|
+
var r, i;
|
|
73
|
+
(r = e.onValuesChange) == null || r.call(e, o, s), (i = t.onFormValuesChange) == null || i.call(t, e.id, o);
|
|
74
74
|
},
|
|
75
75
|
onChange: e.onChange,
|
|
76
76
|
onValidateFail: (o) => {
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
const r =
|
|
77
|
+
const s = e.scrollToFirstError;
|
|
78
|
+
if (s) {
|
|
79
|
+
const r = A(s) ? s : {};
|
|
80
80
|
l.scrollToField(
|
|
81
81
|
Object.keys(o)[0],
|
|
82
82
|
r
|
|
@@ -85,44 +85,44 @@ const ee = {
|
|
|
85
85
|
},
|
|
86
86
|
onSubmitFailed: e.onSubmitFailed,
|
|
87
87
|
onSubmit: (o) => {
|
|
88
|
-
var r,
|
|
89
|
-
const
|
|
90
|
-
return (
|
|
88
|
+
var r, i;
|
|
89
|
+
const s = (r = e.onSubmit) == null ? void 0 : r.call(e, o);
|
|
90
|
+
return (i = t.onFormSubmit) == null || i.call(t, e.id, o), s;
|
|
91
91
|
},
|
|
92
92
|
onReset: (o) => {
|
|
93
|
-
var r,
|
|
94
|
-
const
|
|
95
|
-
return (
|
|
93
|
+
var r, i;
|
|
94
|
+
const s = (r = e.onReset) == null ? void 0 : r.call(e, o);
|
|
95
|
+
return (i = t == null ? void 0 : t.onFormReset) == null || i.call(t, e.id, o), s;
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
|
-
const
|
|
99
|
-
requiredSymbol:
|
|
100
|
-
labelAlign:
|
|
101
|
-
disabled:
|
|
102
|
-
colon:
|
|
103
|
-
labelCol:
|
|
104
|
-
wrapperCol:
|
|
98
|
+
const v = {
|
|
99
|
+
requiredSymbol: M,
|
|
100
|
+
labelAlign: N,
|
|
101
|
+
disabled: z,
|
|
102
|
+
colon: T,
|
|
103
|
+
labelCol: R,
|
|
104
|
+
wrapperCol: w,
|
|
105
105
|
layout: g,
|
|
106
106
|
store: l,
|
|
107
107
|
prefixCls: m,
|
|
108
|
-
validateTrigger:
|
|
109
|
-
validateMessages:
|
|
108
|
+
validateTrigger: P,
|
|
109
|
+
validateMessages: _(
|
|
110
110
|
{},
|
|
111
|
-
(
|
|
112
|
-
|
|
111
|
+
(y = ($ = n.locale) == null ? void 0 : $.Form) == null ? void 0 : y.validateMessages,
|
|
112
|
+
D
|
|
113
113
|
),
|
|
114
114
|
getFormElementId: (o) => f(F, o)
|
|
115
|
-
},
|
|
116
|
-
return
|
|
115
|
+
}, x = Z;
|
|
116
|
+
return X(u, () => ({
|
|
117
117
|
...l,
|
|
118
118
|
getRootDOMNode() {
|
|
119
119
|
return d.current;
|
|
120
120
|
}
|
|
121
|
-
})), /* @__PURE__ */ p(
|
|
122
|
-
|
|
121
|
+
})), /* @__PURE__ */ p(G, { ...n, childrenName: "Form", size: b, children: /* @__PURE__ */ p(x.Provider, { value: v, children: /* @__PURE__ */ p(
|
|
122
|
+
I,
|
|
123
123
|
{
|
|
124
124
|
ref: d,
|
|
125
|
-
...
|
|
125
|
+
...Q(j, [
|
|
126
126
|
"form",
|
|
127
127
|
"size",
|
|
128
128
|
"initialValues",
|
|
@@ -135,12 +135,12 @@ const ee = {
|
|
|
135
135
|
"onReset"
|
|
136
136
|
]),
|
|
137
137
|
...e.wrapperProps,
|
|
138
|
-
className:
|
|
138
|
+
className: L(
|
|
139
139
|
m,
|
|
140
140
|
`${m}-${g}`,
|
|
141
141
|
`${m}-size-${b}`,
|
|
142
|
-
{ [`${m}-rtl`]:
|
|
143
|
-
|
|
142
|
+
{ [`${m}-rtl`]: k },
|
|
143
|
+
E
|
|
144
144
|
),
|
|
145
145
|
style: e.style,
|
|
146
146
|
onSubmit: (o) => {
|
|
@@ -153,8 +153,8 @@ const ee = {
|
|
|
153
153
|
children: e.children
|
|
154
154
|
}
|
|
155
155
|
) }) });
|
|
156
|
-
},
|
|
157
|
-
|
|
156
|
+
}, ne = H(te);
|
|
157
|
+
ne.displayName = "Form";
|
|
158
158
|
export {
|
|
159
|
-
|
|
159
|
+
ne as default
|
|
160
160
|
};
|