@unicom-cloud/ui 0.8.88 → 0.8.90
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/Anchor.js +4 -2
- package/AutoComplete.js +4 -2
- package/Avatar.js +4 -3
- package/Badge.js +6 -5
- package/Breadcrumb.js +4 -3
- package/Calendar.js +7 -5
- package/Card.js +6 -4
- package/Cascader.js +1 -1
- package/Checkbox.js +4 -4
- package/Collapse.js +3 -2
- package/ColorPicker.js +13 -2
- package/DatePicker.js +8 -8
- package/Form.js +3 -3
- package/Grid.js +10 -8
- package/List.js +1 -1
- package/Mentions.js +1 -1
- package/Pagination.js +1 -1
- package/Radio.js +5 -5
- package/Select.js +1 -1
- package/Table.js +3 -3
- package/TimePicker.js +2 -2
- package/Transfer.js +2 -2
- package/Tree.js +1 -1
- package/TreeSelect.js +3 -3
- package/Typography.js +1 -1
- package/anchor/Anchor.js +30 -29
- package/anchor/index.js +2 -0
- package/auto-complete/index.js +4 -2
- package/avatar/index.js +4 -3
- package/badge/index.js +39 -43
- package/breadcrumb/index.js +18 -17
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +2 -2
- package/calendar/index.js +7 -5
- package/card/index.js +31 -29
- package/cascader/Cascader.js +1 -1
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +6 -6
- package/checkbox/Group.js +1 -1
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +4 -4
- package/chunk/B3LeSidy.js +192 -0
- package/chunk/{CgyNQvYg.js → BbQEqpOn.js} +388 -381
- package/chunk/{BP4igg_F.js → BcCuJQY8.js} +41 -40
- package/chunk/{Doi4-DdV.js → C8Kcc_9d.js} +99 -92
- package/chunk/D-Hw4x_H.js +88 -0
- package/chunk/{BC2OXILt.js → Dc-uXGtN.js} +1 -1
- package/collapse/Collapse.js +255 -13
- package/collapse/Item.js +2 -2
- package/collapse/index.js +4 -2
- package/color-picker/Panel.js +1 -1
- package/color-picker/index.js +13 -2
- package/date-picker/Picker.js +142 -138
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +22 -22
- package/date-picker/util.js +1 -1
- package/form/Form.js +1 -1
- package/form/index.js +32 -32
- package/grid/index.js +13 -12
- package/image/Image.js +26 -25
- package/index.js +600 -571
- package/list/index.js +1 -1
- package/mentions/index.js +1 -1
- package/package.json +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/pagination/index.js +1 -1
- package/radio/Group.js +1 -1
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +4 -4
- package/radio/index.js +4 -4
- package/select/Option.js +1 -1
- package/select/Select.js +1 -1
- package/select/index.js +2 -2
- package/select/util.js +2 -2
- package/space/index.js +58 -56
- package/statistic/Countdown.js +1 -1
- package/steps/index.js +50 -49
- package/style.css +1 -1
- package/table/Table.js +2 -2
- package/table/index.js +3 -3
- package/time-picker/Picker.js +17 -17
- package/time-picker/RangePicker.js +7 -7
- package/time-picker/TimePicker.js +2 -2
- package/time-picker/index.js +2 -2
- package/time-picker/util.js +1 -1
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -1
- package/transfer/index.js +2 -2
- package/tree/Animation.js +1 -1
- package/tree/Node.js +1 -1
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +3 -3
- package/tree/index.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/Select.js +1 -1
- package/tree-select/index.js +2 -2
- package/types/common/space/interface.d.ts +4 -0
- package/types/common/utils/dayjs.d.ts +2 -2
- package/types/pc/anchor/Anchor.d.ts +1 -0
- package/types/pc/anchor/index.d.ts +2 -1
- package/types/pc/auto-complete/index.d.ts +6 -0
- package/types/pc/avatar/index.d.ts +1 -0
- package/types/pc/badge/index.d.ts +5 -3
- package/types/pc/breadcrumb/index.d.ts +1 -0
- package/types/pc/calendar/index.d.ts +3 -0
- package/types/pc/card/index.d.ts +1 -0
- package/types/pc/cascader/Cascader.d.ts +1 -1
- package/types/pc/collapse/Collapse.d.ts +1 -0
- package/types/pc/collapse/index.d.ts +2 -1
- package/types/pc/color-picker/index.d.ts +7 -0
- package/types/pc/date-picker/index.d.ts +1 -1
- package/types/pc/date-picker/interface.d.ts +2 -2
- package/types/pc/date-picker/panel/Body.d.ts +1 -1
- package/types/pc/form/hook/useForm.d.ts +1 -1
- package/types/pc/form/index.d.ts +1 -1
- package/types/pc/grid/index.d.ts +3 -4
- package/types/pc/index.d.ts +15 -14
- package/types/pc/menu/Indent.d.ts +1 -1
- package/types/pc/space/index.d.ts +2 -2
- package/types/pc/steps/index.d.ts +1 -0
- package/types/pc/time-picker/index.d.ts +1 -1
- package/types/pc/utils/constant.d.ts +2 -2
- package/types/pc/utils/index.d.ts +1 -0
- package/types/pc/utils/names.d.ts +396 -85
- package/typography/Ellipsis.js +5 -4
- package/typography/index.js +1 -1
- package/utils/constant.js +6 -6
- package/utils/dayjs.js +1 -1
- package/utils/index.js +202 -200
- package/utils/names.js +294 -86
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +117 -116
- package/chunk/C7bohPVD.js +0 -185
- package/chunk/DYmI9fFY.js +0 -257
- /package/grid/{grid.js → Grid.js} +0 -0
- /package/grid/{grid-item.js → GridItem.js} +0 -0
- /package/types/pc/grid/{grid.d.ts → Grid.d.ts} +0 -0
- /package/types/pc/grid/{grid-item.d.ts → GridItem.d.ts} +0 -0
package/form/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { F as M, g as y, u as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { F as M, g as y, u as h } from "../chunk/BcCuJQY8.js";
|
|
2
|
+
import E from "./Control.js";
|
|
3
|
+
import J from "./FormItem.js";
|
|
4
|
+
import L from "./FormList.js";
|
|
5
|
+
import N from "./FormProvider.js";
|
|
6
6
|
import { useContext as g, useRef as S, useCallback as R, useEffect as C, useState as w } from "react";
|
|
7
7
|
import { FormContext as b } from "./context.js";
|
|
8
|
-
import { u as
|
|
8
|
+
import { u as O } from "../chunk/CQ_WOOmf.js";
|
|
9
9
|
import V from "../utils/warning.js";
|
|
10
|
-
import { SubmitStatus as
|
|
11
|
-
import
|
|
10
|
+
import { SubmitStatus as P } from "./interface.js";
|
|
11
|
+
import U from "lodash/isEqualWith";
|
|
12
12
|
import v from "lodash/get";
|
|
13
13
|
import k from "lodash/isArray";
|
|
14
14
|
import q from "lodash/isString";
|
|
15
15
|
const A = () => {
|
|
16
|
-
const s = g(b), o = s.store,
|
|
16
|
+
const s = g(b), o = s.store, c = S(!1), t = O(), f = R(() => {
|
|
17
17
|
var u, e, r;
|
|
18
|
-
const { submitStatus: i } = ((r = (e = (u = o == null ? void 0 : o.getInnerMethods) == null ? void 0 : u.call(o, !0)) == null ? void 0 : e.innerGetStoreStatus) == null ? void 0 : r.call(e)) ?? {}, n = i ===
|
|
19
|
-
n !==
|
|
18
|
+
const { submitStatus: i } = ((r = (e = (u = o == null ? void 0 : o.getInnerMethods) == null ? void 0 : u.call(o, !0)) == null ? void 0 : e.innerGetStoreStatus) == null ? void 0 : r.call(e)) ?? {}, n = i === P.submitting;
|
|
19
|
+
n !== c.current && (c.current = n, t());
|
|
20
20
|
}, []);
|
|
21
21
|
return C(() => {
|
|
22
22
|
var e;
|
|
@@ -33,10 +33,10 @@ const A = () => {
|
|
|
33
33
|
}, []), {
|
|
34
34
|
form: o,
|
|
35
35
|
disabled: s.disabled,
|
|
36
|
-
isSubmitting:
|
|
36
|
+
isSubmitting: c.current
|
|
37
37
|
};
|
|
38
38
|
}, G = (s, o) => {
|
|
39
|
-
const
|
|
39
|
+
const c = g(b), t = o || c.store, f = S(s);
|
|
40
40
|
f.current = s;
|
|
41
41
|
const i = R(() => {
|
|
42
42
|
const r = f.current, m = t.getFieldsState([r]);
|
|
@@ -50,7 +50,7 @@ const A = () => {
|
|
|
50
50
|
}
|
|
51
51
|
const { registerStateWatcher: r } = ((p = t == null ? void 0 : t.getInnerMethods) == null ? void 0 : p.call(t, !0)) ?? {}, m = () => {
|
|
52
52
|
const F = i();
|
|
53
|
-
|
|
53
|
+
U(e.current, F) || (u(F), e.current = F);
|
|
54
54
|
};
|
|
55
55
|
m();
|
|
56
56
|
const l = r == null ? void 0 : r(m);
|
|
@@ -59,7 +59,7 @@ const A = () => {
|
|
|
59
59
|
};
|
|
60
60
|
}, []), n;
|
|
61
61
|
}, j = (s, o) => {
|
|
62
|
-
const
|
|
62
|
+
const c = g(b), t = o || c.store, [f, i] = w(() => {
|
|
63
63
|
const e = t == null ? void 0 : t.getFieldsValue([].concat(s));
|
|
64
64
|
return q(s) ? v(e, s) : e;
|
|
65
65
|
}), n = S(s);
|
|
@@ -84,25 +84,25 @@ const A = () => {
|
|
|
84
84
|
m == null || m();
|
|
85
85
|
};
|
|
86
86
|
}, []), f;
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
}, a = M;
|
|
88
|
+
a.Provider = N;
|
|
89
|
+
a.Item = J;
|
|
90
|
+
a.List = L;
|
|
91
|
+
a.Control = E;
|
|
92
|
+
a.getFormInstance = y;
|
|
93
|
+
a.useForm = h;
|
|
94
|
+
a.useFormContext = A;
|
|
95
|
+
a.useWatch = j;
|
|
96
|
+
a.useFormState = G;
|
|
97
97
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
E as FormControl,
|
|
99
|
+
J as FormItem,
|
|
100
|
+
L as FormList,
|
|
101
|
+
N as FormProvider,
|
|
102
|
+
a as default,
|
|
103
103
|
y as getFormInstance,
|
|
104
|
-
|
|
104
|
+
h as useForm,
|
|
105
105
|
A as useFormContext,
|
|
106
106
|
G as useFormState,
|
|
107
|
-
j as
|
|
107
|
+
j as useFormWatch
|
|
108
108
|
};
|
package/grid/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import r from "./
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
const o =
|
|
6
|
-
o.Col =
|
|
7
|
-
o.Row =
|
|
8
|
-
o.Item =
|
|
9
|
-
o.GridItem = m;
|
|
1
|
+
import m from "./Col.js";
|
|
2
|
+
import r from "./Grid.js";
|
|
3
|
+
import t from "./GridItem.js";
|
|
4
|
+
import i from "./Row.js";
|
|
5
|
+
const o = r;
|
|
6
|
+
o.Col = m;
|
|
7
|
+
o.Row = i;
|
|
8
|
+
o.Item = t;
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
m as
|
|
13
|
-
|
|
10
|
+
m as Col,
|
|
11
|
+
m as GridCol,
|
|
12
|
+
t as GridItem,
|
|
13
|
+
i as GridRow,
|
|
14
|
+
i as Row,
|
|
14
15
|
o as default
|
|
15
16
|
};
|
package/image/Image.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import Ce from "@unicom-cloud/icons/IconUiImageClose";
|
|
3
3
|
import $e from "@unicom-cloud/icons/IconUiLoading";
|
|
4
4
|
import G from "lodash/isNumber";
|
|
5
5
|
import H from "lodash/isPlainObject";
|
|
6
6
|
import Ne from "lodash/isUndefined";
|
|
7
|
-
import Ve, { useContext as J, useMemo as
|
|
7
|
+
import Ve, { useContext as J, useMemo as g, useRef as Q, useEffect as d } from "react";
|
|
8
8
|
import { a as xe } from "../chunk/B44Hj5ad.js";
|
|
9
9
|
import { u as Le } from "../chunk/CCKr5jj1.js";
|
|
10
10
|
import { u as ye } from "../chunk/BYdIoY50.js";
|
|
@@ -52,15 +52,15 @@ function ze(Y, Z) {
|
|
|
52
52
|
lazyload: l,
|
|
53
53
|
...ae
|
|
54
54
|
} = re, le = ye(), {
|
|
55
|
-
previewGroup:
|
|
55
|
+
previewGroup: u,
|
|
56
56
|
handleVisibleChange: ce,
|
|
57
|
-
registerPreviewUrl:
|
|
58
|
-
registerPreviewProps:
|
|
57
|
+
registerPreviewUrl: ue,
|
|
58
|
+
registerPreviewProps: me,
|
|
59
59
|
setCurrentIndex: de
|
|
60
|
-
} = J(Me), o =
|
|
60
|
+
} = J(Me), o = g(() => H(I) ? I : {}, [I]), fe = g(() => H(l) ? l : {}, [l]), s = g(() => G($) || G(K) ? (R = G($) ? $ : K, R) : R++, []), x = o.src || i, [L] = je({ title: h, description: F, actions: M }), { isLoading: _, isError: y, isLoaded: c, isBeforeLoad: pe, setStatus: m } = Ue("beforeLoad"), f = Q(!1), [k, ge] = Ge(!1, {
|
|
61
61
|
defaultValue: o.defaultVisible,
|
|
62
62
|
value: o.visible
|
|
63
|
-
}), E =
|
|
63
|
+
}), E = g(() => Re(o, [
|
|
64
64
|
"visible",
|
|
65
65
|
"defaultVisible",
|
|
66
66
|
"src",
|
|
@@ -80,13 +80,13 @@ function ze(Y, Z) {
|
|
|
80
80
|
ie
|
|
81
81
|
), n = Q();
|
|
82
82
|
function he(r) {
|
|
83
|
-
|
|
83
|
+
f.current = !0, m("loaded"), V == null || V(r);
|
|
84
84
|
}
|
|
85
85
|
function be(r) {
|
|
86
|
-
|
|
86
|
+
f.current = !0, m("error"), N == null || N(r);
|
|
87
87
|
}
|
|
88
88
|
function B(r) {
|
|
89
|
-
a &&
|
|
89
|
+
a && u ? (de(s), ce(!0)) : a && T(!0), C == null || C(r);
|
|
90
90
|
}
|
|
91
91
|
function T(r) {
|
|
92
92
|
var D;
|
|
@@ -97,25 +97,26 @@ function ze(Y, Z) {
|
|
|
97
97
|
defaultInView: !l,
|
|
98
98
|
...fe
|
|
99
99
|
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}, [i]),
|
|
103
|
-
n.current && (q ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !
|
|
104
|
-
}, [i, q]),
|
|
105
|
-
if (!
|
|
100
|
+
d(() => {
|
|
101
|
+
f.current = !1, i || m("error");
|
|
102
|
+
}, [i]), d(() => {
|
|
103
|
+
n.current && (q ? ((n.current.src || i) && n.current.src !== i && (n.current.src = i), !f.current && !n.current.complete && m("loading")) : m("lazyload"));
|
|
104
|
+
}, [i, q]), d(() => {
|
|
105
|
+
if (!u)
|
|
106
106
|
return;
|
|
107
|
-
const r =
|
|
107
|
+
const r = me(s, E);
|
|
108
108
|
return () => r(s);
|
|
109
|
-
}, [s,
|
|
110
|
-
if (!
|
|
109
|
+
}, [s, u, E]), d(() => {
|
|
110
|
+
if (!u)
|
|
111
111
|
return;
|
|
112
|
-
const r =
|
|
112
|
+
const r = ue(s, x, a);
|
|
113
113
|
return () => r(s);
|
|
114
|
-
}, [s,
|
|
115
|
-
|
|
114
|
+
}, [s, u, x, a]), d(() => () => {
|
|
115
|
+
}, [i]);
|
|
116
|
+
const Ie = /* @__PURE__ */ p("div", { className: `${e}-error`, children: [
|
|
116
117
|
/* @__PURE__ */ t("div", { className: `${e}-error-icon`, children: /* @__PURE__ */ t(Ce, {}) }),
|
|
117
118
|
P && /* @__PURE__ */ t("div", { className: `${e}-error-alt`, children: P })
|
|
118
|
-
] }), A = /* @__PURE__ */ t("div", { className: W(`${e}-loader`, te), children: /* @__PURE__ */
|
|
119
|
+
] }), A = /* @__PURE__ */ t("div", { className: W(`${e}-loader`, te), children: /* @__PURE__ */ p("div", { className: `${e}-loader-spin`, children: [
|
|
119
120
|
/* @__PURE__ */ t($e, {}),
|
|
120
121
|
/* @__PURE__ */ t("div", { className: `${e}-loader-spin-text`, children: se ?? "Loading" })
|
|
121
122
|
] }) }), Pe = () => {
|
|
@@ -124,7 +125,7 @@ function ze(Y, Z) {
|
|
|
124
125
|
const r = b || A;
|
|
125
126
|
return l || b ? r : null;
|
|
126
127
|
};
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ p(
|
|
128
129
|
"div",
|
|
129
130
|
{
|
|
130
131
|
className: we,
|
|
@@ -151,7 +152,7 @@ function ze(Y, Z) {
|
|
|
151
152
|
alt: P
|
|
152
153
|
}
|
|
153
154
|
),
|
|
154
|
-
!c && /* @__PURE__ */
|
|
155
|
+
!c && /* @__PURE__ */ p("div", { className: `${e}-overlay`, children: [
|
|
155
156
|
y && (ne || Ie),
|
|
156
157
|
_ && Pe()
|
|
157
158
|
] }),
|