@unicom-cloud/ui 0.8.77 → 0.8.79
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 +3 -3
- package/Alert.js +3 -3
- package/AutoComplete.js +5 -5
- package/BackTop.js +5 -5
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +4 -4
- package/Card.js +2 -2
- package/Carousel.js +2 -2
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/Collapse.js +1 -1
- package/ColorPicker.js +3 -3
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +4 -4
- package/DatePicker.js +1 -1
- package/Descriptions.js +2 -2
- package/Divider.js +2 -2
- package/Draggable.js +2 -2
- package/Dropdown.js +5 -5
- package/Empty.js +2 -2
- package/Icon.js +9 -5
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +3 -3
- package/Layout.js +2 -2
- package/Link.js +3 -3
- package/List.js +4 -4
- package/Mentions.js +5 -5
- package/Menu.js +1 -1
- package/Message.js +3 -3
- package/Modal.js +1 -1
- package/Notice.js +9 -8
- package/Notification.js +3 -3
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +3 -3
- package/Pagination.js +1 -1
- package/Popconfirm.js +3 -3
- package/Popover.js +3 -3
- package/Progress.js +2 -2
- package/Radio.js +1 -1
- package/Rate.js +3 -3
- package/ResizeBox.js +3 -3
- package/Result.js +2 -2
- package/Select.js +1 -1
- package/SelectView.js +5 -6
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +18 -20
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +7 -8
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +3 -3
- package/Tooltip.js +3 -3
- package/Transfer.js +4 -4
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +9 -10
- package/Typography.js +1 -1
- package/affix/index.js +17 -17
- package/alert/index.js +13 -13
- package/anchor/Anchor.js +40 -40
- package/anchor/Link.js +14 -14
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +5 -5
- package/avatar/Avatar.js +17 -17
- package/avatar/Group.js +13 -13
- package/back-top/index.js +13 -13
- package/badge/Count.js +13 -13
- package/badge/index.js +21 -21
- package/breadcrumb/Item.js +25 -25
- package/breadcrumb/index.js +12 -12
- package/button/Group.js +6 -6
- package/button/index.js +30 -30
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +13 -13
- package/card/Meta.js +13 -13
- package/card/index.js +29 -29
- package/carousel/Arrow.js +6 -6
- package/carousel/Indicator.js +27 -27
- package/carousel/index.js +24 -24
- package/cascader/Cascader.js +8 -8
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +4 -4
- package/checkbox/Group.js +4 -4
- package/checkbox/GroupBlock.js +3 -3
- package/checkbox/index.js +2 -2
- package/chunk/{ZrBrCzQX.js → B4WG1mhs.js} +6 -7
- package/chunk/{Cwm8LL5p.js → B4mZh-RK.js} +7245 -7249
- package/chunk/{CjqvxJml.js → BG7YGUsx.js} +32 -32
- package/chunk/{BhBEMwvI.js → BNevupAU.js} +18 -20
- package/chunk/BYdIoY50.js +17 -0
- package/chunk/{Cc_-i0o_.js → BZ3igxQN.js} +6 -7
- package/chunk/{uEGHykhe.js → BZ9g7J4R.js} +1 -1
- package/chunk/BsUZRQDT.js +23 -0
- package/chunk/{CBgu99gQ.js → C5X4hOkx.js} +130 -130
- package/chunk/{B0n0iRhF.js → CCKr5jj1.js} +1 -1
- package/chunk/{CNcLypMY.js → CQvM33Vg.js} +190 -189
- package/chunk/CXPOj2uy.js +19 -0
- package/chunk/{DAAff-FT.js → ClM74To2.js} +9 -10
- package/chunk/{RS6OAxzv.js → D-ap9qEk.js} +2 -2
- package/chunk/{tpmioyz1.js → DEiyXzBZ.js} +28 -28
- package/chunk/{CplLA01W.js → DEuVgCzp.js} +45 -52
- package/chunk/{BPQXH_5i.js → DYspELhF.js} +43 -43
- package/chunk/DxYoPlum.js +50 -0
- package/chunk/{BpYX5PN4.js → NPajzdOv.js} +2 -2
- package/chunk/{BBkdXHrJ.js → rT6qmv-Y.js} +1 -1
- package/chunk/{BC5fEyWK.js → yLRv5RIK.js} +61 -61
- package/chunk/{C_4I3haT.js → yhU2zeeu.js} +96 -96
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +22 -22
- 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 +4 -4
- package/color-picker/index.js +3 -3
- package/comment/index.js +18 -18
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +2 -2
- package/config-provider/index.js +2 -2
- package/copy/index.js +23 -23
- package/date-picker/Picker.js +41 -41
- package/date-picker/PickerRange.js +3 -3
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +28 -28
- package/divider/index.js +15 -15
- package/draggable/Item.js +11 -11
- package/draggable/index.js +15 -15
- package/drawer/Drawer.js +31 -31
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +22 -22
- package/empty/index.js +2 -2
- package/form/Control.js +46 -46
- package/form/Form.js +12 -12
- package/form/FormItem.js +12 -12
- package/form/FormLabel.js +11 -11
- package/form/context.js +7 -6
- package/form/promisify.js +9 -10
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +38 -38
- package/grid/Row.js +15 -15
- package/grid/grid-item.js +17 -17
- package/grid/grid.js +28 -28
- package/hooks/index.js +6 -6
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useKeyboardEvent.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/usePrefersColorSchemeDark.js +1 -1
- package/hooks/useVerificationCode.js +30 -30
- package/icon/index.js +20 -16
- package/icon-hover/index.js +2 -2
- package/image/Image.js +22 -22
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +11 -11
- package/image/ImagePreviewArrow.js +16 -16
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +7 -7
- package/image/TriggerForToolbar.js +7 -7
- package/image/index.js +1 -1
- package/index.js +547 -580
- package/input/Group.js +10 -10
- package/input/Input.js +213 -214
- package/input/InputElement.js +10 -11
- package/input/Password.js +4 -4
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -8
- package/input/useComposition.js +6 -6
- package/input-number/index.js +3 -3
- package/input-tag/InputTag.js +110 -111
- package/layout/Content.js +4 -4
- package/layout/Footer.js +6 -6
- package/layout/Header.js +8 -8
- package/layout/Sider.js +29 -29
- package/layout/index.js +16 -16
- package/link/index.js +27 -27
- package/list/Item.js +5 -5
- package/list/Meta.js +11 -11
- package/list/index.js +4 -4
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +5 -5
- package/menu/Item.js +11 -11
- package/menu/ItemGroup.js +8 -8
- package/menu/Menu.js +5 -5
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +3 -3
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +7 -7
- package/modal/index.js +1 -1
- package/notice/index.js +9 -8
- package/notification/index.js +3 -3
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +27 -27
- package/package.json +1 -1
- package/page-header/index.js +3 -3
- package/pagination/PageItem.js +7 -7
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +3 -3
- package/pagination/Pagination.js +4 -4
- package/pagination/index.js +1 -1
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +77 -77
- package/popconfirm/index.js +11 -11
- package/popover/index.js +21 -21
- package/progress/CircleProgress.js +14 -14
- package/progress/LineProgess.js +14 -14
- package/progress/StepProgress.js +9 -9
- package/progress/index.js +26 -26
- package/radio/Group.js +4 -4
- package/radio/GroupBlock.js +3 -3
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +16 -16
- package/resize-box/ResizeTrigger.js +27 -28
- package/resize-box/Split.js +21 -21
- package/resize-box/SplitGroup.js +40 -40
- package/resize-box/index.js +23 -23
- package/result/index.js +29 -29
- package/select/Option.js +2 -2
- package/select/Select.js +11 -12
- package/select/index.js +2 -2
- package/select/util.js +5 -5
- package/select-view/Core.js +104 -106
- package/select-view/index.js +22 -23
- package/skeleton/Image.js +14 -14
- package/skeleton/Text.js +16 -16
- package/skeleton/index.js +11 -11
- package/slider/Button.js +4 -4
- package/slider/Dot.js +9 -9
- package/slider/Input.js +20 -20
- package/slider/Tick.js +14 -14
- package/slider/index.js +103 -103
- package/slider/util.js +3 -3
- package/space/index.js +14 -14
- package/speech-synthesis/index.js +26 -28
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +16 -16
- package/statistic/Countdown.js +17 -17
- package/statistic/index.js +32 -32
- package/steps/Step.js +8 -8
- package/steps/index.js +17 -17
- package/style.css +1 -1
- package/switch/index.js +32 -33
- package/table/Table.js +5 -5
- package/table/index.js +1 -1
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +11 -11
- package/tabs/index.js +2 -2
- package/tabs/util.js +1 -1
- package/tag/index.js +16 -16
- package/time-picker/Picker.js +50 -50
- package/time-picker/TimeColumn.js +8 -8
- package/time-picker/TimePicker.js +32 -32
- package/time-picker/util.js +1 -1
- package/timeline/Item.js +15 -15
- package/timeline/Timeline.js +24 -24
- package/tooltip/index.js +23 -23
- package/transfer/Item.js +4 -4
- package/transfer/List.js +4 -4
- package/transfer/index.js +4 -4
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/List.js +2 -2
- package/tree-select/Select.js +8 -9
- package/tree-select/index.js +2 -2
- package/trigger/getPopupStyle.js +18 -19
- package/trigger/index.js +32 -33
- package/types/button/index.d.ts +2 -2
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/icon/index.d.ts +3 -1
- package/types/index.d.ts +1 -1
- package/types/menu/context.d.ts +1 -1
- package/typography/Base.js +33 -35
- package/typography/EditContent.js +16 -16
- package/typography/Ellipsis.js +24 -26
- package/typography/Operations.js +1 -1
- package/typography/Paragraph.js +8 -8
- package/typography/Typography.js +7 -7
- package/typography/index.js +1 -1
- package/upload/TriggerNode.js +8 -8
- package/upload/Upload.js +64 -65
- package/upload/Uploader.js +12 -12
- package/upload/request.js +13 -12
- package/upload/request_.js +5 -6
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/caseName.js +4 -3
- package/utils/className.js +4 -3
- package/utils/constant.js +3 -3
- package/utils/contextHolder.js +1 -1
- package/utils/copy.js +5 -4
- package/utils/fileToURL.js +4 -3
- package/utils/index.js +261 -298
- package/utils/is.js +78 -115
- package/utils/keyboardCode.js +4 -26
- package/utils/math.js +10 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/saveAs.js +4 -3
- package/utils/screenfull.js +4 -3
- package/utils/scrollIntoView.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/tree.js +7 -83
- package/utils/tween.js +1 -1
- package/utils/validate.js +1 -1
- package/verification-code/VerificationCode.js +25 -25
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +8 -8
- package/chunk/ATwvJ8j2.js +0 -6
- package/chunk/BFmckYou.js +0 -25
- package/chunk/Bl7BnD1R.js +0 -119
- package/chunk/Bmvhjhzq.js +0 -24
- package/chunk/BrOW642m.js +0 -130
- package/chunk/C0pRaDCf.js +0 -96
- package/chunk/CBzE-PUr.js +0 -23
- package/chunk/CUFsOxJ2.js +0 -10
- package/chunk/Ce1j9KTi.js +0 -6
- package/chunk/D0Dlbc2g.js +0 -41
- package/chunk/DRTWRsgI.js +0 -34
- package/chunk/DeV0v__J.js +0 -20
- package/chunk/DohlrJ4S.js +0 -50
- package/chunk/XTEsYGuF.js +0 -17
- package/chunk/yl4BU7Sd.js +0 -1068
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useRef as i, useState as l, useEffect as c } from "react";
|
|
2
|
+
import "./ClM74To2.js";
|
|
3
|
+
import { u as m } from "./VSe_Wq1g.js";
|
|
4
|
+
import { isUndefined as t } from "@unicom-cloud/utils/is";
|
|
5
|
+
function R(a, f) {
|
|
6
|
+
const { defaultValue: r, value: e } = f || {}, u = i(!0), n = m(e), [s, o] = l(
|
|
7
|
+
t(e) ? t(r) ? a : r : e
|
|
8
|
+
);
|
|
9
|
+
return c(() => {
|
|
10
|
+
if (u.current) {
|
|
11
|
+
u.current = !1;
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
e === void 0 && n !== e && o(e);
|
|
15
|
+
}, [e]), [t(e) ? s : e, o, s];
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
R as u
|
|
19
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { isDayjs as
|
|
1
|
+
import { isPlainObject as $ } from "@unicom-cloud/utils/is";
|
|
2
|
+
import { isDayjs as E } from "dayjs";
|
|
3
3
|
import { isValidElement as a } from "react";
|
|
4
4
|
import u from "react-dom";
|
|
5
|
-
import { isForwardRef as p, ForwardRef as i, Memo as
|
|
6
|
-
import l from "lodash/isPlainObject.js";
|
|
5
|
+
import { isForwardRef as p, ForwardRef as i, Memo as l } from "react-is";
|
|
7
6
|
function A(r) {
|
|
8
7
|
return r == null;
|
|
9
8
|
}
|
|
@@ -17,14 +16,14 @@ function S(r) {
|
|
|
17
16
|
return r === window;
|
|
18
17
|
}
|
|
19
18
|
function g(r) {
|
|
20
|
-
return r &&
|
|
19
|
+
return r && E(r) && typeof r.isValid == "function" && r.isValid() && $(r) && "$y" in r && "$M" in r && "$D" in r && "$d" in r && "$H" in r && "$m" in r && "$s" in r;
|
|
21
20
|
}
|
|
22
21
|
const e = (r) => r && a(r) && typeof r.type == "function", R = (r) => {
|
|
23
22
|
var s;
|
|
24
23
|
return e(r) && !!((s = r.type.prototype) != null && s.isReactComponent);
|
|
25
24
|
}, d = (r) => a(r) && typeof r.type == "string";
|
|
26
25
|
var n;
|
|
27
|
-
const
|
|
26
|
+
const m = Number((n = u.version) == null ? void 0 : n.split(".")[0]) > 17;
|
|
28
27
|
var f;
|
|
29
28
|
const T = Number((f = u.version) == null ? void 0 : f.split(".")[0]) > 18, _ = (r) => {
|
|
30
29
|
if (!T)
|
|
@@ -40,8 +39,8 @@ const T = Number((f = u.version) == null ? void 0 : f.split(".")[0]) > 18, _ = (
|
|
|
40
39
|
return !1;
|
|
41
40
|
}, w = (r) => {
|
|
42
41
|
var s;
|
|
43
|
-
return r ? d(r) || _(r) || p(r) || r.$$typeof === i ? !0 : r.$$typeof ===
|
|
44
|
-
},
|
|
42
|
+
return r ? d(r) || _(r) || p(r) || r.$$typeof === i ? !0 : r.$$typeof === l ? ((s = r.type) == null ? void 0 : s.$$typeof) === i : e(r) ? R(r) : !1 : !1;
|
|
43
|
+
}, V = w;
|
|
45
44
|
export {
|
|
46
45
|
g as a,
|
|
47
46
|
d as b,
|
|
@@ -49,11 +48,11 @@ export {
|
|
|
49
48
|
P as d,
|
|
50
49
|
_ as e,
|
|
51
50
|
A as f,
|
|
52
|
-
|
|
51
|
+
m as g,
|
|
53
52
|
T as h,
|
|
54
53
|
R as i,
|
|
55
54
|
e as j,
|
|
56
|
-
|
|
55
|
+
V as k,
|
|
57
56
|
S as l,
|
|
58
57
|
w as s
|
|
59
58
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import f, { useCallback as s, isValidElement as u, cloneElement as c } from "react";
|
|
2
|
-
import { s as l } from "./
|
|
3
|
-
import { c as a } from "./
|
|
2
|
+
import { s as l } from "./ClM74To2.js";
|
|
3
|
+
import { c as a } from "./BZ3igxQN.js";
|
|
4
4
|
function R() {
|
|
5
5
|
const r = f.useRef(null);
|
|
6
6
|
return [s((e) => u(e) && l(e) ? c(e, {
|
|
@@ -3,30 +3,30 @@ import U from "@unicom-cloud/icons/IconUiCaretLeft";
|
|
|
3
3
|
import L from "@unicom-cloud/icons/IconUiCaretRight";
|
|
4
4
|
import V from "lodash/isFunction";
|
|
5
5
|
import M, { useContext as K, useRef as A, createContext as B } from "react";
|
|
6
|
-
import { a as T, I as S } from "./
|
|
6
|
+
import { a as T, I as S } from "./CQvM33Vg.js";
|
|
7
7
|
import { u as q } from "./BFTV6myl.js";
|
|
8
|
-
import { u as D } from "./
|
|
9
|
-
import
|
|
8
|
+
import { u as D } from "./CXPOj2uy.js";
|
|
9
|
+
import m from "@unicom-cloud/utils/class-name";
|
|
10
10
|
import { o as G } from "./BKKEev13.js";
|
|
11
11
|
import { u as J } from "./BJ9_azwQ.js";
|
|
12
|
-
import { u as Q } from "./
|
|
12
|
+
import { u as Q } from "./BYdIoY50.js";
|
|
13
13
|
import { off as W, on as X } from "../utils/dom.js";
|
|
14
|
-
function Y(d,
|
|
14
|
+
function Y(d, p) {
|
|
15
15
|
var C;
|
|
16
16
|
const { getPrefixCls: g } = K(T), n = K(j), I = Q(), {
|
|
17
17
|
children: s,
|
|
18
18
|
name: a,
|
|
19
19
|
header: $,
|
|
20
20
|
className: H,
|
|
21
|
-
style:
|
|
22
|
-
contentStyle:
|
|
21
|
+
style: N,
|
|
22
|
+
contentStyle: E,
|
|
23
23
|
extra: x,
|
|
24
24
|
disabled: c,
|
|
25
25
|
destroyOnHide: y,
|
|
26
26
|
expandIcon: v,
|
|
27
|
-
showExpandIcon:
|
|
27
|
+
showExpandIcon: b = !0,
|
|
28
28
|
...P
|
|
29
|
-
} = d, i = A(), h = A(), t = g("collapse-item"), l = ((C = n.activeKeys) == null ? void 0 : C.indexOf(a)) > -1, u =
|
|
29
|
+
} = d, i = A(), h = A(), t = g("collapse-item"), l = ((C = n.activeKeys) == null ? void 0 : C.indexOf(a)) > -1, u = b ? "expandIcon" in d ? v : n.expandIcon : null, f = (e, o) => {
|
|
30
30
|
var O;
|
|
31
31
|
if (c)
|
|
32
32
|
return;
|
|
@@ -37,9 +37,9 @@ function Y(d, m) {
|
|
|
37
37
|
return /* @__PURE__ */ w(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
ref:
|
|
40
|
+
ref: p,
|
|
41
41
|
...P,
|
|
42
|
-
className:
|
|
42
|
+
className: m(
|
|
43
43
|
t,
|
|
44
44
|
{
|
|
45
45
|
[`${t}-active`]: l,
|
|
@@ -48,7 +48,7 @@ function Y(d, m) {
|
|
|
48
48
|
},
|
|
49
49
|
H
|
|
50
50
|
),
|
|
51
|
-
style:
|
|
51
|
+
style: N,
|
|
52
52
|
children: [
|
|
53
53
|
/* @__PURE__ */ w(
|
|
54
54
|
"div",
|
|
@@ -58,7 +58,7 @@ function Y(d, m) {
|
|
|
58
58
|
"aria-expanded": l,
|
|
59
59
|
"data-active-region": n.triggerRegion,
|
|
60
60
|
tabIndex: c ? -1 : 0,
|
|
61
|
-
className:
|
|
61
|
+
className: m(
|
|
62
62
|
`${t}-header`,
|
|
63
63
|
`${t}-header-${n.expandIconPosition}`,
|
|
64
64
|
{
|
|
@@ -77,7 +77,7 @@ function Y(d, m) {
|
|
|
77
77
|
{
|
|
78
78
|
prefix: t,
|
|
79
79
|
disabled: c,
|
|
80
|
-
className:
|
|
80
|
+
className: m({
|
|
81
81
|
[`${t}-icon-hover-right`]: n.expandIconPosition === "right",
|
|
82
82
|
[`${t}-header-icon-right`]: n.expandIconPosition === "right"
|
|
83
83
|
}),
|
|
@@ -85,7 +85,7 @@ function Y(d, m) {
|
|
|
85
85
|
children: /* @__PURE__ */ r(
|
|
86
86
|
"span",
|
|
87
87
|
{
|
|
88
|
-
className:
|
|
88
|
+
className: m(`${t}-header-icon`, {
|
|
89
89
|
[`${t}-header-icon-down`]: l
|
|
90
90
|
}),
|
|
91
91
|
children: u
|
|
@@ -153,14 +153,14 @@ function Y(d, m) {
|
|
|
153
153
|
{
|
|
154
154
|
ref: i,
|
|
155
155
|
role: "region",
|
|
156
|
-
className:
|
|
156
|
+
className: m(`${t}-content`, {
|
|
157
157
|
[`${t}-content-expanded`]: l
|
|
158
158
|
}),
|
|
159
159
|
children: /* @__PURE__ */ r(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
ref: h,
|
|
163
|
-
style:
|
|
163
|
+
style: E,
|
|
164
164
|
className: `${t}-content-box`,
|
|
165
165
|
children: s
|
|
166
166
|
}
|
|
@@ -177,9 +177,9 @@ const z = M.forwardRef(
|
|
|
177
177
|
Y
|
|
178
178
|
);
|
|
179
179
|
z.displayName = "CollapseItem";
|
|
180
|
-
const k = (d,
|
|
180
|
+
const k = (d, p) => {
|
|
181
181
|
const g = [].concat(d);
|
|
182
|
-
return
|
|
182
|
+
return p ? g.slice(0, 1) : g;
|
|
183
183
|
}, Z = {
|
|
184
184
|
bordered: !0,
|
|
185
185
|
lazyload: !0,
|
|
@@ -191,7 +191,7 @@ const k = (d, m) => {
|
|
|
191
191
|
onToggle: () => {
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
function _(d,
|
|
194
|
+
function _(d, p) {
|
|
195
195
|
const { getPrefixCls: g, componentConfig: n, rtl: I } = K(T), s = q(
|
|
196
196
|
d,
|
|
197
197
|
Z,
|
|
@@ -201,13 +201,13 @@ function _(d, m) {
|
|
|
201
201
|
value: "activeKey" in s ? k(s.activeKey, s.accordion) : void 0
|
|
202
202
|
}), {
|
|
203
203
|
children: H,
|
|
204
|
-
className:
|
|
205
|
-
style:
|
|
204
|
+
className: N,
|
|
205
|
+
style: E,
|
|
206
206
|
bordered: x,
|
|
207
207
|
lazyload: c,
|
|
208
208
|
expandIcon: y,
|
|
209
209
|
expandIconPosition: v,
|
|
210
|
-
destroyOnHide:
|
|
210
|
+
destroyOnHide: b,
|
|
211
211
|
accordion: P,
|
|
212
212
|
triggerRegion: i,
|
|
213
213
|
onChange: h,
|
|
@@ -224,7 +224,7 @@ function _(d, m) {
|
|
|
224
224
|
activeKeys: a,
|
|
225
225
|
triggerRegion: i,
|
|
226
226
|
lazyload: c,
|
|
227
|
-
destroyOnHide:
|
|
227
|
+
destroyOnHide: b,
|
|
228
228
|
expandIconPosition: v,
|
|
229
229
|
onToggle: u,
|
|
230
230
|
expandIcon: "expandIcon" in s ? y : v === "right" ? /* @__PURE__ */ r(U, {}) : /* @__PURE__ */ r(L, {})
|
|
@@ -232,15 +232,15 @@ function _(d, m) {
|
|
|
232
232
|
children: /* @__PURE__ */ r(
|
|
233
233
|
"div",
|
|
234
234
|
{
|
|
235
|
-
ref:
|
|
235
|
+
ref: p,
|
|
236
236
|
...G(t, ["activeKey", "defaultActiveKey"]),
|
|
237
|
-
className:
|
|
237
|
+
className: m(
|
|
238
238
|
l,
|
|
239
239
|
`${l}-${x ? "border" : "borderless"}`,
|
|
240
240
|
{ [`${l}-rtl`]: I },
|
|
241
|
-
|
|
241
|
+
N
|
|
242
242
|
),
|
|
243
|
-
style:
|
|
243
|
+
style: E,
|
|
244
244
|
children: H
|
|
245
245
|
}
|
|
246
246
|
)
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import b from "lodash/isObject.js";
|
|
3
|
-
import p from "lodash/isArray.js";
|
|
4
|
-
import M from "lodash/isString.js";
|
|
5
|
-
import _ from "lodash/isNumber.js";
|
|
6
|
-
import E from "lodash/isEqual.js";
|
|
7
|
-
import O from "lodash/isBoolean.js";
|
|
8
|
-
import S from "lodash/isFunction.js";
|
|
1
|
+
import { isObject as b, isArray as m, isString as M, isNumber as w, isEmptyValue as c, isEqual as E, isEmptyArray as x, isEmptyObject as O, isBoolean as _, isFunction as S } from "@unicom-cloud/utils/is";
|
|
9
2
|
const k = {
|
|
10
3
|
required: "#{field} 是必填项",
|
|
11
4
|
type: {
|
|
@@ -69,7 +62,7 @@ const k = {
|
|
|
69
62
|
return i;
|
|
70
63
|
};
|
|
71
64
|
var C = Object.defineProperty, N = (r, t, e) => t in r ? C(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, l = (r, t, e) => N(r, typeof t != "symbol" ? t + "" : t, e);
|
|
72
|
-
class
|
|
65
|
+
class p {
|
|
73
66
|
constructor(t, e) {
|
|
74
67
|
l(this, "obj"), l(this, "message"), l(this, "type"), l(this, "error"), l(this, "_not"), l(this, "validateMessages"), l(this, "field"), l(this, "getValidateMsg", (i, s = {}) => {
|
|
75
68
|
const n = {
|
|
@@ -78,18 +71,18 @@ class m {
|
|
|
78
71
|
field: this.field,
|
|
79
72
|
type: this.type
|
|
80
73
|
}, a = z(this.validateMessages, i);
|
|
81
|
-
return S(a) ? a(n) : M(a) ? a.replace(/#\{.+?\}/g, (
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
84
|
-
if (b(n[
|
|
74
|
+
return S(a) ? a(n) : M(a) ? a.replace(/#\{.+?\}/g, (d) => {
|
|
75
|
+
const g = d.slice(2, -1);
|
|
76
|
+
if (g in n) {
|
|
77
|
+
if (b(n[g]) || m(n[g]))
|
|
85
78
|
try {
|
|
86
|
-
return JSON.stringify(n[
|
|
79
|
+
return JSON.stringify(n[g]);
|
|
87
80
|
} catch {
|
|
88
|
-
return n[
|
|
81
|
+
return n[g];
|
|
89
82
|
}
|
|
90
|
-
return String(n[
|
|
83
|
+
return String(n[g]);
|
|
91
84
|
}
|
|
92
|
-
return
|
|
85
|
+
return d;
|
|
93
86
|
}) : a;
|
|
94
87
|
}), b(e) && M(t) && e.trim ? this.obj = t.trim() : b(e) && e.ignoreEmptyString && t === "" ? this.obj = void 0 : this.obj = t, this.message = e.message, this.type = e.type, this.error = null, this.field = e.field || e.type, this.validateMessages = V(
|
|
95
88
|
k,
|
|
@@ -128,13 +121,13 @@ class m {
|
|
|
128
121
|
t == null || t(this.error);
|
|
129
122
|
}
|
|
130
123
|
}
|
|
131
|
-
class R extends
|
|
124
|
+
class R extends p {
|
|
132
125
|
constructor(t, e) {
|
|
133
126
|
super(t, {
|
|
134
127
|
...e,
|
|
135
128
|
type: "array"
|
|
136
129
|
}), this.validate(
|
|
137
|
-
e && e.strict ?
|
|
130
|
+
e && e.strict ? m(this.obj) : !0,
|
|
138
131
|
this.getValidateMsg("type.array", { value: this.obj, type: this.type })
|
|
139
132
|
);
|
|
140
133
|
}
|
|
@@ -187,13 +180,13 @@ class R extends m {
|
|
|
187
180
|
);
|
|
188
181
|
}
|
|
189
182
|
}
|
|
190
|
-
class
|
|
183
|
+
class A extends p {
|
|
191
184
|
constructor(t, e) {
|
|
192
185
|
super(t, {
|
|
193
186
|
...e,
|
|
194
187
|
type: "boolean"
|
|
195
188
|
}), this.validate(
|
|
196
|
-
e != null && e.strict ?
|
|
189
|
+
e != null && e.strict ? _(this.obj) : !0,
|
|
197
190
|
this.getValidateMsg("type.boolean")
|
|
198
191
|
);
|
|
199
192
|
}
|
|
@@ -210,7 +203,7 @@ class K extends m {
|
|
|
210
203
|
);
|
|
211
204
|
}
|
|
212
205
|
}
|
|
213
|
-
class
|
|
206
|
+
class K extends p {
|
|
214
207
|
constructor(t, e) {
|
|
215
208
|
super(t, {
|
|
216
209
|
...e,
|
|
@@ -230,13 +223,13 @@ class P extends m {
|
|
|
230
223
|
), [i, this]) : (e == null || e(this.error), this.error);
|
|
231
224
|
}
|
|
232
225
|
}
|
|
233
|
-
class
|
|
226
|
+
class P extends p {
|
|
234
227
|
constructor(t, e) {
|
|
235
228
|
super(t, {
|
|
236
229
|
...e,
|
|
237
230
|
type: "number"
|
|
238
231
|
}), this.validate(
|
|
239
|
-
e && e.strict ?
|
|
232
|
+
e && e.strict ? w(this.obj) : !0,
|
|
240
233
|
this.getValidateMsg("type.number")
|
|
241
234
|
);
|
|
242
235
|
}
|
|
@@ -271,7 +264,7 @@ class D extends m {
|
|
|
271
264
|
return c(this.obj) ? this : this.validate(this.obj < 0, this.getValidateMsg("number.negative"));
|
|
272
265
|
}
|
|
273
266
|
}
|
|
274
|
-
class
|
|
267
|
+
class D extends p {
|
|
275
268
|
constructor(t, e) {
|
|
276
269
|
super(t, {
|
|
277
270
|
...e,
|
|
@@ -295,12 +288,12 @@ class I extends m {
|
|
|
295
288
|
}
|
|
296
289
|
get empty() {
|
|
297
290
|
return this.validate(
|
|
298
|
-
|
|
291
|
+
O(this.obj),
|
|
299
292
|
this.getValidateMsg("object.empty")
|
|
300
293
|
);
|
|
301
294
|
}
|
|
302
295
|
}
|
|
303
|
-
class
|
|
296
|
+
class I extends p {
|
|
304
297
|
constructor(t, e) {
|
|
305
298
|
super(t, {
|
|
306
299
|
...e,
|
|
@@ -348,11 +341,11 @@ class T extends m {
|
|
|
348
341
|
) : this;
|
|
349
342
|
}
|
|
350
343
|
}
|
|
351
|
-
const
|
|
344
|
+
const T = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, Z = new RegExp(
|
|
352
345
|
"^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
|
|
353
346
|
"i"
|
|
354
|
-
),
|
|
355
|
-
class
|
|
347
|
+
), B = /^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/;
|
|
348
|
+
class U extends p {
|
|
356
349
|
constructor(t, e) {
|
|
357
350
|
super(t, {
|
|
358
351
|
...e,
|
|
@@ -361,32 +354,32 @@ class $ extends m {
|
|
|
361
354
|
}
|
|
362
355
|
get email() {
|
|
363
356
|
return this.type = "email", this.validate(
|
|
364
|
-
this.obj === void 0 ||
|
|
357
|
+
this.obj === void 0 || T.test(this.obj),
|
|
365
358
|
this.getValidateMsg("type.email")
|
|
366
359
|
);
|
|
367
360
|
}
|
|
368
361
|
get url() {
|
|
369
362
|
return this.type = "url", this.validate(
|
|
370
|
-
this.obj === void 0 ||
|
|
363
|
+
this.obj === void 0 || Z.test(this.obj),
|
|
371
364
|
this.getValidateMsg("type.url")
|
|
372
365
|
);
|
|
373
366
|
}
|
|
374
367
|
get ip() {
|
|
375
368
|
return this.type = "ip", this.validate(
|
|
376
|
-
this.obj === void 0 ||
|
|
369
|
+
this.obj === void 0 || B.test(this.obj),
|
|
377
370
|
this.getValidateMsg("type.ip")
|
|
378
371
|
);
|
|
379
372
|
}
|
|
380
373
|
}
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
374
|
+
const j = (r, t) => new q(r, { field: "value", ...t });
|
|
375
|
+
j.globalConfig = {};
|
|
376
|
+
j.setGlobalConfig = (r) => {
|
|
377
|
+
j.globalConfig = r || {};
|
|
385
378
|
};
|
|
386
379
|
class q {
|
|
387
380
|
constructor(t, e) {
|
|
388
381
|
l(this, "number"), l(this, "string"), l(this, "array"), l(this, "object"), l(this, "boolean"), l(this, "type"), l(this, "custom");
|
|
389
|
-
const i =
|
|
382
|
+
const i = j.globalConfig, s = {
|
|
390
383
|
...i,
|
|
391
384
|
...e,
|
|
392
385
|
validateMessages: V(
|
|
@@ -394,10 +387,10 @@ class q {
|
|
|
394
387
|
e.validateMessages
|
|
395
388
|
)
|
|
396
389
|
};
|
|
397
|
-
this.string = new
|
|
390
|
+
this.string = new I(t, s), this.number = new P(t, s), this.array = new R(t, s), this.object = new D(t, s), this.boolean = new A(t, s), this.type = new U(t, s), this.custom = new K(t, s);
|
|
398
391
|
}
|
|
399
392
|
}
|
|
400
|
-
class
|
|
393
|
+
class G {
|
|
401
394
|
constructor(t, e = {}) {
|
|
402
395
|
l(this, "schema"), l(this, "options"), this.schema = t, this.options = e;
|
|
403
396
|
}
|
|
@@ -416,27 +409,27 @@ class X {
|
|
|
416
409
|
return;
|
|
417
410
|
const i = [];
|
|
418
411
|
let s = null;
|
|
419
|
-
function n(a,
|
|
420
|
-
s || (s = {}), s && (!s[a] ||
|
|
412
|
+
function n(a, d) {
|
|
413
|
+
s || (s = {}), s && (!s[a] || d.requiredError) && (s[a] = d);
|
|
421
414
|
}
|
|
422
415
|
this.schema && Object.keys(this.schema).forEach((a) => {
|
|
423
|
-
var
|
|
424
|
-
if (
|
|
425
|
-
for (let
|
|
426
|
-
const o = this.schema[a][
|
|
416
|
+
var d;
|
|
417
|
+
if (m(this.schema[a]))
|
|
418
|
+
for (let g = 0; g < this.schema[a].length; g++) {
|
|
419
|
+
const o = this.schema[a][g], v = o.type, L = o.message;
|
|
427
420
|
if (!v && !o.validator)
|
|
428
421
|
throw `You must specify a type to field ${a}!`;
|
|
429
|
-
const
|
|
422
|
+
const f = {
|
|
430
423
|
...this.options,
|
|
431
424
|
message: L,
|
|
432
425
|
field: a
|
|
433
426
|
};
|
|
434
|
-
"ignoreEmptyString" in o && (
|
|
435
|
-
const y = new q(t[a],
|
|
427
|
+
"ignoreEmptyString" in o && (f.ignoreEmptyString = o.ignoreEmptyString), "strict" in o && (f.strict = o.strict);
|
|
428
|
+
const y = new q(t[a], f);
|
|
436
429
|
let h = y.type[v] || null;
|
|
437
430
|
if (!h)
|
|
438
431
|
if (o.validator) {
|
|
439
|
-
h = y.custom.validate_(o.validator),
|
|
432
|
+
h = y.custom.validate_(o.validator), m(h) && (d = h[0]) != null && d.then ? i.push({
|
|
440
433
|
function: h[0],
|
|
441
434
|
_this: h[1],
|
|
442
435
|
key: a
|
|
@@ -459,7 +452,7 @@ class X {
|
|
|
459
452
|
}
|
|
460
453
|
}
|
|
461
454
|
export {
|
|
462
|
-
|
|
455
|
+
G as H,
|
|
463
456
|
k as e,
|
|
464
|
-
|
|
457
|
+
j as m
|
|
465
458
|
};
|