@unicom-cloud/ui 0.8.72 → 0.8.74
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 +3 -3
- package/BackTop.js +4 -4
- package/Badge.js +3 -3
- package/Breadcrumb.js +4 -4
- package/Button.js +2 -2
- package/Calendar.js +3 -3
- 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 +2 -2
- package/Comment.js +2 -2
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -3
- 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 +2 -2
- package/IconHover.js +2 -2
- package/Image.js +1 -1
- package/InputNumber.js +2 -2
- package/Layout.js +2 -2
- package/Link.js +2 -2
- package/List.js +3 -3
- package/Mentions.js +3 -3
- package/Menu.js +1 -1
- package/Message.js +7 -6
- package/Modal.js +1 -1
- package/Notice.js +5 -5
- package/Notification.js +8 -7
- package/OverflowEllipsis.js +2 -2
- package/PageHeader.js +2 -2
- 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/SelectView.js +5 -4
- package/Skeleton.js +2 -2
- package/Slider.js +4 -4
- package/Space.js +2 -2
- package/SpeechSynthesis.js +21 -21
- package/Spin.js +3 -3
- package/Statistic.js +3 -3
- package/Steps.js +2 -2
- package/Switch.js +8 -6
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +2 -2
- package/Tooltip.js +4 -4
- package/Transfer.js +3 -3
- package/Tree.js +1 -1
- package/Trigger.js +9 -8
- package/affix/index.js +3 -3
- package/alert/index.js +9 -9
- package/anchor/Anchor.js +62 -59
- package/anchor/Link.js +2 -2
- package/anchor/util.js +2 -2
- package/auto-complete/index.js +3 -3
- package/avatar/Avatar.js +2 -2
- package/avatar/Group.js +2 -2
- package/back-top/index.js +11 -11
- package/badge/Count.js +7 -7
- package/badge/index.js +52 -50
- package/breadcrumb/Item.js +6 -6
- package/breadcrumb/index.js +4 -4
- package/button/Group.js +2 -2
- package/button/index.js +2 -2
- package/calendar/Month.js +2 -2
- package/calendar/Year.js +1 -1
- package/calendar/index.js +4 -4
- package/card/Grid.js +5 -5
- package/card/Meta.js +4 -4
- package/card/index.js +2 -2
- package/carousel/Arrow.js +2 -2
- package/carousel/Indicator.js +6 -6
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +5 -5
- 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/index.js +1 -1
- package/chunk/{6nKl68Er.js → 9we0Q8Kh.js} +4 -4
- package/chunk/{b1e8awfs.js → B0n0iRhF.js} +1 -1
- package/chunk/{Cf4qn5jY.js → BDZpJpz-.js} +3 -3
- package/chunk/BFmckYou.js +25 -0
- package/chunk/{fFjj2KuF.js → BJ9_azwQ.js} +493 -515
- package/chunk/{BnWo0OJ0.js → Bd9zhOZS.js} +9 -9
- package/chunk/{uKZyjtff.js → BhBEMwvI.js} +21 -20
- package/chunk/{Bfq4YEcr.js → Bmvhjhzq.js} +9 -8
- package/chunk/{CdAuhef7.js → BoUHPeG7.js} +2 -2
- package/chunk/BpYX5PN4.js +27 -0
- package/chunk/{CP7Ac47f.js → Bu8A2l60.js} +4 -4
- package/chunk/{URXCKjXr.js → C0pRaDCf.js} +23 -23
- package/chunk/CUFsOxJ2.js +10 -0
- package/chunk/CWjvjpyc.js +873 -0
- package/chunk/{ClaNycDy.js → Cc_-i0o_.js} +2 -2
- package/chunk/Coz3rCng.js +33 -0
- package/chunk/{BHL-PzAD.js → CplLA01W.js} +17 -17
- package/chunk/{Cgbja_v_.js → Crs3isAx.js} +14 -13
- package/chunk/{Ey4YJCkX.js → D0Dlbc2g.js} +2 -1
- package/chunk/{y9unmTx_.js → D5UfU6-H.js} +127 -127
- package/chunk/DAAff-FT.js +59 -0
- package/chunk/{rp1MtSd0.js → DJ8rDYjb.js} +4 -4
- package/chunk/{AwZqeapI.js → DRTWRsgI.js} +1 -1
- package/chunk/DU1RCDfh.js +29 -0
- package/chunk/{CAVVFFyZ.js → DdT3C0ih.js} +6 -8
- package/chunk/{CdaT1b_F.js → DeV0v__J.js} +2 -2
- package/chunk/{IUjEMHU1.js → Dn7KbmZ7.js} +194 -191
- package/chunk/{DpoumMDw.js → DohlrJ4S.js} +1 -1
- package/chunk/{BDHuWwhT.js → NmSLBKjp.js} +3 -3
- package/chunk/{DV7ywe_q.js → RS6OAxzv.js} +2 -2
- package/chunk/{Biupwn8l.js → ZrBrCzQX.js} +6 -5
- package/chunk/_L2dKF58.js +647 -0
- package/chunk/{BJ1soa2K.js → uEGHykhe.js} +18 -18
- package/chunk/{D090jlwP.js → xAb6ZgqS.js} +1 -1
- package/collapse/Collapse.js +4 -4
- package/collapse/Item.js +4 -4
- package/collapse/index.js +1 -1
- package/color-picker/ControlBar.js +2 -2
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +8 -8
- package/color-picker/InputRgb.js +6 -6
- package/color-picker/Palette.js +2 -2
- package/color-picker/Panel.js +17 -17
- package/color-picker/colors.js +20 -9
- package/color-picker/index.js +21 -21
- package/color-picker/utils.js +1 -1
- package/comment/index.js +6 -6
- package/config-provider/ConfigProvider.js +2 -2
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +16 -16
- 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 +3 -3
- package/divider/index.js +5 -5
- package/draggable/Item.js +1 -1
- package/draggable/index.js +9 -9
- package/drawer/Drawer.js +122 -112
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +5 -5
- package/empty/index.js +2 -2
- package/form/Control.js +1 -1
- package/form/Form.js +3 -3
- package/form/FormItem.js +3 -3
- package/form/FormLabel.js +9 -9
- package/form/promisify.js +9 -8
- package/form/store.js +1 -1
- package/form/util.js +1 -1
- package/grid/Col.js +2 -2
- package/grid/Row.js +3 -3
- package/grid/grid-item.js +3 -3
- package/grid/grid.js +9 -9
- package/hooks/index.js +5 -5
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useMergeValue.js +1 -1
- package/hooks/useOverflowHidden.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useVerificationCode.js +2 -2
- package/icon/index.js +11 -11
- package/icon-hover/index.js +2 -2
- package/image/Image.js +6 -6
- package/image/ImageFooter.js +2 -2
- package/image/ImagePreview.js +10 -10
- package/image/ImagePreviewArrow.js +4 -4
- package/image/ImagePreviewGroup.js +2 -2
- package/image/ImagePreviewToolbar.js +1 -1
- package/image/TriggerForToolbar.js +4 -4
- package/image/index.js +1 -1
- package/index.js +585 -575
- package/input/Group.js +4 -4
- package/input/Input.js +5 -4
- package/input/InputElement.js +4 -4
- package/input/Password.js +3 -3
- package/input/Search.js +3 -3
- package/input/Textarea.js +7 -6
- package/input-number/index.js +2 -2
- package/input-tag/InputTag.js +53 -51
- package/layout/Content.js +2 -2
- package/layout/Footer.js +5 -5
- package/layout/Header.js +4 -4
- package/layout/Sider.js +4 -4
- package/layout/index.js +2 -2
- package/link/index.js +5 -5
- package/list/Item.js +2 -2
- package/list/Meta.js +4 -4
- package/list/index.js +3 -3
- package/locale/en-US.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/mentions/index.js +3 -3
- package/menu/Item.js +6 -6
- package/menu/ItemGroup.js +1 -1
- package/menu/Menu.js +4 -4
- package/menu/OverflowWrap.js +2 -2
- package/menu/index.js +2 -2
- package/message/index.js +7 -6
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +9 -8
- package/modal/index.js +1 -1
- package/notice/index.js +5 -5
- package/notification/index.js +8 -7
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +6 -6
- package/overflow-ellipsis/index.js +8 -8
- package/package.json +1 -1
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +2 -2
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +24 -24
- package/picker/Input.js +7 -7
- package/picker/InputRange.js +9 -9
- package/popconfirm/index.js +3 -3
- package/popover/index.js +3 -3
- package/progress/CircleProgress.js +7 -7
- package/progress/LineProgess.js +1 -1
- package/progress/StepProgress.js +7 -7
- package/progress/index.js +8 -8
- package/radio/Group.js +4 -4
- package/radio/Radio.js +4 -4
- package/radio/index.js +2 -2
- package/rate/index.js +27 -27
- package/resize-box/ResizeTrigger.js +26 -25
- package/resize-box/Split.js +12 -12
- package/resize-box/SplitGroup.js +2 -2
- package/resize-box/index.js +3 -3
- package/result/index.js +9 -9
- package/select/Option.js +2 -2
- package/select/Select.js +6 -5
- package/select/util.js +12 -12
- package/select-view/Core.js +29 -29
- package/select-view/index.js +3 -2
- package/skeleton/Image.js +4 -4
- package/skeleton/Text.js +7 -7
- package/skeleton/index.js +2 -2
- package/slider/Button.js +3 -3
- package/slider/Dot.js +5 -5
- package/slider/Input.js +12 -12
- package/slider/Tick.js +7 -7
- package/slider/index.js +20 -20
- package/slider/util.js +8 -8
- package/space/index.js +12 -12
- package/speech-synthesis/index.js +21 -21
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +3 -3
- package/statistic/Countdown.js +7 -7
- package/statistic/index.js +20 -20
- package/steps/Step.js +1 -1
- package/steps/index.js +2 -2
- package/style/variables.less +1 -1
- package/style.css +1 -1
- package/switch/index.js +17 -15
- package/table/Table.js +4 -4
- package/table/index.js +4 -4
- package/tabs/Tab.js +4 -4
- package/tabs/TabContent.js +3 -3
- package/tabs/TabPane.js +2 -2
- package/tabs/index.js +2 -2
- package/tag/index.js +6 -6
- package/time-picker/Picker.js +2 -2
- package/time-picker/TimeColumn.js +7 -7
- package/time-picker/TimePicker.js +23 -23
- package/time-picker/util.js +5 -5
- package/timeline/Item.js +2 -2
- package/timeline/Timeline.js +2 -2
- package/tooltip/index.js +4 -4
- package/transfer/Item.js +3 -3
- package/transfer/List.js +3 -3
- package/transfer/index.js +3 -3
- package/tree/Animation.js +3 -3
- package/tree/Node.js +4 -4
- package/tree/NodeList.js +2 -2
- package/tree/Tree.js +4 -4
- package/tree/index.js +1 -1
- package/tree-select/Select.js +25 -25
- package/trigger/getPopupStyle.js +2 -2
- package/trigger/index.js +8 -7
- package/types/badge/interface.d.ts +1 -0
- package/types/color-picker/colors.d.ts +1 -1
- package/types/date-picker/util.d.ts +1 -1
- package/types/drawer/interface.d.ts +10 -0
- package/types/index.d.ts +0 -7
- package/types/modal/Confirm.d.ts +1 -0
- package/types/utils/PqbCSSTransition.d.ts +3 -0
- package/types/utils/caseName.d.ts +1 -0
- package/types/utils/className.d.ts +1 -0
- package/types/utils/color.d.ts +1 -0
- package/types/utils/computeScrollIntoView.d.ts +1 -0
- package/types/utils/contextHolder.d.ts +1 -0
- package/types/utils/copy.d.ts +1 -0
- package/types/utils/fileToURL.d.ts +1 -0
- package/types/utils/fillNBSP.d.ts +1 -0
- package/types/utils/getHighlightText.d.ts +1 -0
- package/types/utils/getHotkeyHandler.d.ts +1 -0
- package/types/utils/getStringLength.d.ts +1 -0
- package/types/utils/include.d.ts +1 -0
- package/types/utils/index.d.ts +29 -25
- package/types/utils/is.d.ts +1 -1
- package/types/utils/keyboardCode.d.ts +1 -0
- package/types/utils/math.d.ts +1 -0
- package/types/utils/mergeProps.d.ts +1 -0
- package/types/utils/mergedToString.d.ts +1 -0
- package/types/utils/names.d.ts +497 -81
- package/types/utils/omit.d.ts +1 -0
- package/types/utils/pick.d.ts +1 -1
- package/types/utils/reactTransitionGroup.d.ts +1 -0
- package/types/utils/responsiveObserve.d.ts +1 -0
- package/types/utils/saveAs.d.ts +1 -0
- package/types/utils/screenfull.d.ts +1 -0
- package/types/utils/scrollIntoView.d.ts +1 -0
- package/types/utils/tinycolor.d.ts +1 -0
- package/types/utils/tree.d.ts +1 -0
- package/types/utils/tween.d.ts +1 -0
- package/types/utils/uuid.d.ts +1 -0
- package/types/utils/validate.d.ts +1 -0
- package/types/version/index.d.ts +1 -1
- package/typography/Base.js +7 -6
- package/typography/EditContent.js +1 -1
- package/typography/Ellipsis.js +28 -28
- package/typography/Paragraph.js +6 -6
- package/typography/Typography.js +5 -5
- package/typography/index.js +28 -28
- package/upload/TriggerNode.js +2 -2
- package/upload/Upload.js +62 -60
- package/upload/Uploader.js +21 -21
- package/upload/request_.js +4 -3
- package/utils/PqbCSSTransition.js +5 -0
- package/utils/caseName.js +3 -2
- package/utils/className.js +3 -2
- package/utils/color.js +4 -0
- package/utils/computeScrollIntoView.js +128 -0
- package/utils/contextHolder.js +3 -2
- package/utils/copy.js +4 -2
- package/utils/fileToURL.js +3 -2
- package/utils/fillNBSP.js +2 -1
- package/utils/getHighlightText.js +2 -1
- package/utils/getHotkeyHandler.js +2 -1
- package/utils/getStringLength.js +2 -1
- package/utils/include.js +2 -1
- package/utils/index.js +299 -256
- package/utils/is.js +104 -101
- package/utils/keyboardCode.js +2 -1
- package/utils/math.js +35 -0
- package/utils/mergeProps.js +2 -1
- package/utils/mergedToString.js +2 -1
- package/utils/names.js +332 -81
- package/utils/omit.js +2 -1
- package/utils/pick.js +1 -0
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/reactTransitionGroup.js +10 -0
- package/utils/responsiveObserve.js +2 -1
- package/utils/saveAs.js +3 -2
- package/utils/screenfull.js +2 -1
- package/utils/scrollIntoView.js +4 -2
- package/utils/tinycolor.js +30 -0
- package/utils/tree.js +87 -0
- package/utils/tween.js +6 -0
- package/utils/uuid.js +5 -0
- package/utils/validate.js +7 -0
- package/verification-code/VerificationCode.js +7 -7
- package/version/index.js +3 -3
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +6 -6
- package/chunk/B4JiMp8I.js +0 -764
- package/chunk/B6X4lnd0.js +0 -116
- package/chunk/BibHFOCF.js +0 -34
- package/chunk/CTxjmYmx.js +0 -19
- package/chunk/CVYWxu00.js +0 -155
- package/chunk/CbLaCJmG.js +0 -26
- package/chunk/D-TPB2Do.js +0 -56
- package/chunk/DVfOiRp-.js +0 -629
- package/chunk/DxxOUMSa.js +0 -98
- package/chunk/JPPo5nY_.js +0 -9
- package/types/utils/CSSTransition.d.ts +0 -2
- package/utils/CSSTransition.js +0 -4
package/chunk/DVfOiRp-.js
DELETED
|
@@ -1,629 +0,0 @@
|
|
|
1
|
-
import { jsx as l, jsxs as O, Fragment as _e } from "react/jsx-runtime";
|
|
2
|
-
import en from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
-
import Ee from "lodash/isFunction";
|
|
4
|
-
import nn, { forwardRef as Pe, useState as P, useImperativeHandle as tn, useRef as b, useContext as on, useCallback as S, useEffect as te } from "react";
|
|
5
|
-
import Me from "../button/index.js";
|
|
6
|
-
import { b as Ie, d as rn, a as ln, I as sn } from "./Cgbja_v_.js";
|
|
7
|
-
import { u as an } from "./BFTV6myl.js";
|
|
8
|
-
import { u as cn } from "./CdaT1b_F.js";
|
|
9
|
-
import { u as un } from "./CbLaCJmG.js";
|
|
10
|
-
import dn from "../portal/index.js";
|
|
11
|
-
import { P as Te } from "./fFjj2KuF.js";
|
|
12
|
-
import { m as ye } from "./JPPo5nY_.js";
|
|
13
|
-
import { contains as mn, isServerRendering as fn } from "../utils/dom.js";
|
|
14
|
-
import { o as pn } from "./BrOW642m.js";
|
|
15
|
-
import { o as Cn } from "./BKKEev13.js";
|
|
16
|
-
import { f as hn } from "./ClaNycDy.js";
|
|
17
|
-
import bn from "@unicom-cloud/icons/IconUiCheckCircleFill";
|
|
18
|
-
import gn from "@unicom-cloud/icons/IconUiCloseCircleFill";
|
|
19
|
-
import Ne from "@unicom-cloud/icons/IconUiExclamationCircleFill";
|
|
20
|
-
import xn from "@unicom-cloud/icons/IconUiInfoCircleFill";
|
|
21
|
-
import { createRoot as vn } from "react-dom/client";
|
|
22
|
-
import { destroyList as T, getConfigProviderProps as kn, getModalConfig as wn, setModalConfig as En } from "../modal/config.js";
|
|
23
|
-
function Mn(n) {
|
|
24
|
-
const { prefixCls: i, simple: u } = wn();
|
|
25
|
-
return /* @__PURE__ */ l(w, { prefixCls: i, simple: u, ...n, children: n.content });
|
|
26
|
-
}
|
|
27
|
-
const U = (n) => {
|
|
28
|
-
let i = n.icon;
|
|
29
|
-
if (!i && i !== null && (i = /* @__PURE__ */ l(Ne, {}), n.isNotice))
|
|
30
|
-
switch (n.noticeType) {
|
|
31
|
-
case "info":
|
|
32
|
-
i = /* @__PURE__ */ l(xn, {});
|
|
33
|
-
break;
|
|
34
|
-
case "success":
|
|
35
|
-
i = /* @__PURE__ */ l(bn, {});
|
|
36
|
-
break;
|
|
37
|
-
case "warning":
|
|
38
|
-
i = /* @__PURE__ */ l(Ne, {});
|
|
39
|
-
break;
|
|
40
|
-
case "error":
|
|
41
|
-
i = /* @__PURE__ */ l(gn, {});
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
return n.noticeType === "show" && (i = n.icon), n.isNotice && (n.hideCancel = !0), n.title = i === null && n.title === null ? null : /* @__PURE__ */ O("span", { children: [
|
|
45
|
-
i,
|
|
46
|
-
n.title
|
|
47
|
-
] }), n;
|
|
48
|
-
};
|
|
49
|
-
function re(n, i) {
|
|
50
|
-
let u;
|
|
51
|
-
const s = document.createElement("div");
|
|
52
|
-
document.body.appendChild(s);
|
|
53
|
-
const m = kn();
|
|
54
|
-
function g(a) {
|
|
55
|
-
const h = /* @__PURE__ */ l(Ie, { ...m, children: /* @__PURE__ */ l(
|
|
56
|
-
Mn,
|
|
57
|
-
{
|
|
58
|
-
...a,
|
|
59
|
-
onCancel: C
|
|
60
|
-
}
|
|
61
|
-
) });
|
|
62
|
-
u || (u = vn(s)), u.render(h);
|
|
63
|
-
}
|
|
64
|
-
const r = i || g;
|
|
65
|
-
let o = {
|
|
66
|
-
...n,
|
|
67
|
-
visible: !1
|
|
68
|
-
};
|
|
69
|
-
const c = () => {
|
|
70
|
-
let a;
|
|
71
|
-
const h = n.onOk;
|
|
72
|
-
h && (a = h(C)), a && a.then && (o.confirmLoading = !0, r(o), a.then(
|
|
73
|
-
() => {
|
|
74
|
-
C(!0);
|
|
75
|
-
},
|
|
76
|
-
(f) => {
|
|
77
|
-
console.error(f), o.confirmLoading = !1, r(o);
|
|
78
|
-
}
|
|
79
|
-
)), a || C(!0);
|
|
80
|
-
};
|
|
81
|
-
o.onOk = c, o = U(o), o.visible = !0, r(o);
|
|
82
|
-
function x() {
|
|
83
|
-
s.remove();
|
|
84
|
-
for (let a = 0; a < T.length; a++)
|
|
85
|
-
if (T[a] === v) {
|
|
86
|
-
T.splice(a, 1);
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
u && setTimeout(() => {
|
|
90
|
-
u.unmount(), u = null;
|
|
91
|
-
}, 7);
|
|
92
|
-
}
|
|
93
|
-
function C(a) {
|
|
94
|
-
var h;
|
|
95
|
-
!a && ((h = n.onCancel) == null || h.call(n)), v();
|
|
96
|
-
}
|
|
97
|
-
function M(a) {
|
|
98
|
-
o = {
|
|
99
|
-
...o,
|
|
100
|
-
title: n.title,
|
|
101
|
-
// 避免 newConfig 未传递 title 时,icon 出现多个的问题
|
|
102
|
-
...a
|
|
103
|
-
}, o = U(o), r(o);
|
|
104
|
-
}
|
|
105
|
-
function v() {
|
|
106
|
-
o.visible = !1, o.afterClose = () => {
|
|
107
|
-
var a;
|
|
108
|
-
(a = n.afterClose) == null || a.call(n), x();
|
|
109
|
-
}, r(o);
|
|
110
|
-
}
|
|
111
|
-
return T.push(v), {
|
|
112
|
-
close: v,
|
|
113
|
-
update: M
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function Tn(n, i) {
|
|
117
|
-
const [u, s] = P(!0), [m, g] = P(n);
|
|
118
|
-
tn(i, () => ({
|
|
119
|
-
update: (c) => {
|
|
120
|
-
g(c);
|
|
121
|
-
},
|
|
122
|
-
close: () => {
|
|
123
|
-
s(!1);
|
|
124
|
-
}
|
|
125
|
-
}));
|
|
126
|
-
function r() {
|
|
127
|
-
var x;
|
|
128
|
-
const c = (x = m.onOk) == null ? void 0 : x.call(m);
|
|
129
|
-
c && c.then && (g((C) => ({
|
|
130
|
-
...C,
|
|
131
|
-
confirmLoading: !0
|
|
132
|
-
})), c.then(
|
|
133
|
-
() => {
|
|
134
|
-
s(!1);
|
|
135
|
-
},
|
|
136
|
-
(C) => {
|
|
137
|
-
console.error(C), g((M) => ({
|
|
138
|
-
...M,
|
|
139
|
-
confirmLoading: !1
|
|
140
|
-
}));
|
|
141
|
-
}
|
|
142
|
-
)), c || s(!1);
|
|
143
|
-
}
|
|
144
|
-
function o() {
|
|
145
|
-
var c;
|
|
146
|
-
(c = m.onCancel) == null || c.call(m), s(!1);
|
|
147
|
-
}
|
|
148
|
-
return /* @__PURE__ */ l(
|
|
149
|
-
w,
|
|
150
|
-
{
|
|
151
|
-
unmountOnExit: !0,
|
|
152
|
-
simple: !0,
|
|
153
|
-
...m,
|
|
154
|
-
visible: u,
|
|
155
|
-
onOk: r,
|
|
156
|
-
onCancel: o,
|
|
157
|
-
children: m.content
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
const yn = Pe(Tn);
|
|
162
|
-
function Nn() {
|
|
163
|
-
const n = b(), i = /* @__PURE__ */ l(rn, { ref: n });
|
|
164
|
-
let u = 0;
|
|
165
|
-
function s(r) {
|
|
166
|
-
var h;
|
|
167
|
-
u += 1;
|
|
168
|
-
let o, c = { ...r };
|
|
169
|
-
function x() {
|
|
170
|
-
var f;
|
|
171
|
-
(f = r.afterClose) == null || f.call(r), M();
|
|
172
|
-
}
|
|
173
|
-
const C = /* @__PURE__ */ l(
|
|
174
|
-
yn,
|
|
175
|
-
{
|
|
176
|
-
ref: (f) => {
|
|
177
|
-
o = f;
|
|
178
|
-
},
|
|
179
|
-
...U({ ...r }),
|
|
180
|
-
afterClose: x
|
|
181
|
-
},
|
|
182
|
-
u
|
|
183
|
-
);
|
|
184
|
-
(h = n.current) == null || h.addInstance(C);
|
|
185
|
-
function M() {
|
|
186
|
-
var f;
|
|
187
|
-
(f = n.current) == null || f.removeInstance(C);
|
|
188
|
-
}
|
|
189
|
-
function v() {
|
|
190
|
-
o == null || o.close();
|
|
191
|
-
}
|
|
192
|
-
function a(f) {
|
|
193
|
-
c = {
|
|
194
|
-
...c,
|
|
195
|
-
...f
|
|
196
|
-
}, o == null || o.update(U({ ...c }));
|
|
197
|
-
}
|
|
198
|
-
return T.push(v), {
|
|
199
|
-
close: v,
|
|
200
|
-
update: a
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
function m(r) {
|
|
204
|
-
return s({
|
|
205
|
-
...r
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
const g = {
|
|
209
|
-
confirm: m,
|
|
210
|
-
show: m
|
|
211
|
-
// 潘启宝添加于 2023年10月18日 星期三 10时31分58秒 CST
|
|
212
|
-
};
|
|
213
|
-
return ["info", "success", "warning", "error"].forEach((r) => {
|
|
214
|
-
g[r] = (o) => s({
|
|
215
|
-
...o,
|
|
216
|
-
isNotice: !0,
|
|
217
|
-
noticeType: r
|
|
218
|
-
});
|
|
219
|
-
}), [g, i];
|
|
220
|
-
}
|
|
221
|
-
let oe = null, Pn = 0;
|
|
222
|
-
fn || document.documentElement.addEventListener(
|
|
223
|
-
"click",
|
|
224
|
-
(n) => {
|
|
225
|
-
oe = {
|
|
226
|
-
left: n.clientX,
|
|
227
|
-
top: n.clientY
|
|
228
|
-
}, setTimeout(() => {
|
|
229
|
-
oe = null;
|
|
230
|
-
}, 100);
|
|
231
|
-
},
|
|
232
|
-
!0
|
|
233
|
-
);
|
|
234
|
-
const In = {
|
|
235
|
-
mask: !0,
|
|
236
|
-
maskClosable: !0,
|
|
237
|
-
mountOnEnter: !0,
|
|
238
|
-
escToExit: !0,
|
|
239
|
-
getPopupContainer: () => document.body,
|
|
240
|
-
alignCenter: !0
|
|
241
|
-
};
|
|
242
|
-
function Dn(n, i) {
|
|
243
|
-
var we;
|
|
244
|
-
i || (i = b());
|
|
245
|
-
const u = on(ln), s = an(
|
|
246
|
-
n,
|
|
247
|
-
In,
|
|
248
|
-
(we = u.componentConfig) == null ? void 0 : we.Modal
|
|
249
|
-
), {
|
|
250
|
-
className: m,
|
|
251
|
-
style: g,
|
|
252
|
-
visible: r,
|
|
253
|
-
simple: o,
|
|
254
|
-
title: c,
|
|
255
|
-
subtitle: x,
|
|
256
|
-
children: C,
|
|
257
|
-
cancelText: M,
|
|
258
|
-
okText: v,
|
|
259
|
-
okButtonProps: a,
|
|
260
|
-
cancelButtonProps: h,
|
|
261
|
-
getPopupContainer: f = () => document.body,
|
|
262
|
-
footer: L,
|
|
263
|
-
afterClose: V,
|
|
264
|
-
confirmLoading: De,
|
|
265
|
-
mountOnEnter: z,
|
|
266
|
-
unmountOnExit: q,
|
|
267
|
-
afterOpen: W,
|
|
268
|
-
hideCancel: $e,
|
|
269
|
-
maskClosable: Re,
|
|
270
|
-
mask: X,
|
|
271
|
-
alignCenter: Oe,
|
|
272
|
-
getChildrenPopupContainer: le,
|
|
273
|
-
wrapClassName: Le,
|
|
274
|
-
escToExit: Z,
|
|
275
|
-
modalRender: se,
|
|
276
|
-
maskStyle: Xe,
|
|
277
|
-
wrapStyle: Ye,
|
|
278
|
-
closeIcon: ie,
|
|
279
|
-
fullscreenable: $n,
|
|
280
|
-
...ae
|
|
281
|
-
} = s, I = b(null), ce = b(null), k = b(null), [ue, de] = P(), [me, Be] = P(), Y = b(null), D = b(!1), [He, fe] = P(""), [pe, Ce] = P(""), j = b(!0);
|
|
282
|
-
r && j.current && (j.current = !1);
|
|
283
|
-
const B = b();
|
|
284
|
-
B.current || (B.current = Pn++);
|
|
285
|
-
const [Fe, A] = cn(!1, {
|
|
286
|
-
defaultValue: !1,
|
|
287
|
-
value: De
|
|
288
|
-
}), d = u.getPrefixCls("modal", s.prefixCls), { locale: K, rtl: he } = u, Se = !o || ae.noticeType === "show", Ue = "closable" in s ? s.closable : Se, Ve = S(() => hn(f()), [f]);
|
|
289
|
-
un(Ve, { hidden: r && X });
|
|
290
|
-
function G(e) {
|
|
291
|
-
e.stopPropagation(), J();
|
|
292
|
-
}
|
|
293
|
-
function J() {
|
|
294
|
-
var e;
|
|
295
|
-
(e = s.onCancel) == null || e.call(s);
|
|
296
|
-
}
|
|
297
|
-
const ze = (e) => {
|
|
298
|
-
Z && r && e.key === pn.key && (e.stopPropagation(), J());
|
|
299
|
-
}, Q = b(!1), qe = (e) => {
|
|
300
|
-
D.current && (D.current = !1, !Q.current && Re && X && e.target === e.currentTarget && setTimeout(() => {
|
|
301
|
-
J();
|
|
302
|
-
}, 100));
|
|
303
|
-
}, We = (e) => {
|
|
304
|
-
var p;
|
|
305
|
-
const t = (p = s.onOk ?? s.onConfirm) == null ? void 0 : p(e);
|
|
306
|
-
t != null && t.then && (A(!0), t.then(
|
|
307
|
-
() => {
|
|
308
|
-
A(!1);
|
|
309
|
-
},
|
|
310
|
-
(E) => {
|
|
311
|
-
A(!1), console.error(E);
|
|
312
|
-
}
|
|
313
|
-
));
|
|
314
|
-
};
|
|
315
|
-
te(() => {
|
|
316
|
-
let e = null;
|
|
317
|
-
return Z && (e = setTimeout(() => {
|
|
318
|
-
var t;
|
|
319
|
-
mn(document.body, I.current) && ((t = I.current) == null || t.focus());
|
|
320
|
-
})), () => {
|
|
321
|
-
e && clearTimeout(e);
|
|
322
|
-
};
|
|
323
|
-
}, [r, Z]);
|
|
324
|
-
const Ze = () => {
|
|
325
|
-
var e;
|
|
326
|
-
if (r && me === void 0 && I.current) {
|
|
327
|
-
const t = +((e = window.getComputedStyle(I.current, null)) == null ? void 0 : e.zIndex);
|
|
328
|
-
isNaN(t) || Be(t + 1);
|
|
329
|
-
}
|
|
330
|
-
}, je = () => {
|
|
331
|
-
if (L === null)
|
|
332
|
-
return;
|
|
333
|
-
const e = /* @__PURE__ */ l(Me, { onClick: G, ...h, children: M || K.Modal.cancelText }), t = /* @__PURE__ */ l(
|
|
334
|
-
Me,
|
|
335
|
-
{
|
|
336
|
-
loading: Fe,
|
|
337
|
-
onClick: We,
|
|
338
|
-
type: "primary",
|
|
339
|
-
...a,
|
|
340
|
-
children: v || K.Modal.okText
|
|
341
|
-
}
|
|
342
|
-
), p = Ee(L) ? L(e, t) : L || /* @__PURE__ */ O(_e, { children: [
|
|
343
|
-
!$e && e,
|
|
344
|
-
t
|
|
345
|
-
] });
|
|
346
|
-
return /* @__PURE__ */ l("div", { className: `${d}-footer`, children: p });
|
|
347
|
-
}, _ = b(
|
|
348
|
-
xe()
|
|
349
|
-
), Ae = S((e) => {
|
|
350
|
-
var p, E, y, N, F;
|
|
351
|
-
if (!k.current)
|
|
352
|
-
return;
|
|
353
|
-
e.preventDefault();
|
|
354
|
-
const t = _.current;
|
|
355
|
-
t.screenX = e.screenX, t.screenY = e.screenY, t.prewTranslateX = t.translateX, t.prewTranslateY = t.translateY, t.boundingClientRect = ((E = (p = k.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : E.call(p)) ?? {}, t.offsetParentBoundingClientRect = ((F = (N = (y = k.current) == null ? void 0 : y.offsetParent) == null ? void 0 : N.getBoundingClientRect) == null ? void 0 : F.call(N)) ?? {}, H(), Ke();
|
|
356
|
-
}, []), be = S((e) => {
|
|
357
|
-
e.preventDefault();
|
|
358
|
-
const t = _.current, { left: p, right: E, top: y, bottom: N } = t.boundingClientRect ?? {}, { width: F, height: Qe } = t.offsetParentBoundingClientRect ?? {};
|
|
359
|
-
let $ = Math.max(e.screenX - t.screenX, -p);
|
|
360
|
-
$ = Math.min($, F - E);
|
|
361
|
-
let R = Math.max(e.screenY - t.screenY, -y);
|
|
362
|
-
R = Math.min(R, Qe - N), $ += t.prewTranslateX, R += t.prewTranslateY, t.translateX = $, t.translateY = R, fe(`translate(${$}px, ${R}px)`);
|
|
363
|
-
}, []), ge = S((e) => {
|
|
364
|
-
e.preventDefault(), H();
|
|
365
|
-
}, []);
|
|
366
|
-
function Ke() {
|
|
367
|
-
document.documentElement.addEventListener(
|
|
368
|
-
"mousemove",
|
|
369
|
-
be
|
|
370
|
-
), document.documentElement.addEventListener(
|
|
371
|
-
"mouseup",
|
|
372
|
-
ge
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
function H() {
|
|
376
|
-
document.documentElement.removeEventListener(
|
|
377
|
-
"mousemove",
|
|
378
|
-
be
|
|
379
|
-
), document.documentElement.removeEventListener(
|
|
380
|
-
"mouseup",
|
|
381
|
-
ge
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
function xe() {
|
|
385
|
-
return {
|
|
386
|
-
screenX: 0,
|
|
387
|
-
screenY: 0,
|
|
388
|
-
prewTranslateX: 0,
|
|
389
|
-
prewTranslateY: 0,
|
|
390
|
-
translateX: 0,
|
|
391
|
-
translateY: 0,
|
|
392
|
-
boundingClientRect: null,
|
|
393
|
-
offsetParentBoundingClientRect: null
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
function ee() {
|
|
397
|
-
_.current = xe(), fe(""), Ce("");
|
|
398
|
-
}
|
|
399
|
-
te(() => () => {
|
|
400
|
-
ee(), H();
|
|
401
|
-
}, []), te(() => (k.current || (ee(), H()), () => {
|
|
402
|
-
}), [k.current]);
|
|
403
|
-
const Ge = /* @__PURE__ */ O(
|
|
404
|
-
Ie,
|
|
405
|
-
{
|
|
406
|
-
...u,
|
|
407
|
-
prefixCls: s.prefixCls || u.prefixCls,
|
|
408
|
-
locale: K,
|
|
409
|
-
zIndex: me || 1050,
|
|
410
|
-
getPopupContainer: (e) => typeof le == "function" ? le(e) : ce.current,
|
|
411
|
-
children: [
|
|
412
|
-
(!!c || !!x) && /* @__PURE__ */ O("div", { className: `${d}-header`, children: [
|
|
413
|
-
!!c && /* @__PURE__ */ l(
|
|
414
|
-
"div",
|
|
415
|
-
{
|
|
416
|
-
className: `${d}-title`,
|
|
417
|
-
id: `pqb-dialog-${B.current}`,
|
|
418
|
-
children: c
|
|
419
|
-
}
|
|
420
|
-
),
|
|
421
|
-
!!x && /* @__PURE__ */ l("div", { className: `${d}-subtitle`, children: x })
|
|
422
|
-
] }),
|
|
423
|
-
/* @__PURE__ */ l("div", { ref: ce, className: `${d}-content`, children: C }),
|
|
424
|
-
je(),
|
|
425
|
-
!s.fullscreenable && s.draggable !== !1 && /* @__PURE__ */ l(
|
|
426
|
-
"div",
|
|
427
|
-
{
|
|
428
|
-
className: `${d}-drag-icon`,
|
|
429
|
-
onMouseDown: Ae,
|
|
430
|
-
onDoubleClick: ee
|
|
431
|
-
}
|
|
432
|
-
),
|
|
433
|
-
(Ue || !!s.fullscreenable) && (ie !== void 0 ? /* @__PURE__ */ l(
|
|
434
|
-
"span",
|
|
435
|
-
{
|
|
436
|
-
className: `${d}-close-icon`,
|
|
437
|
-
onClick: G,
|
|
438
|
-
children: ie
|
|
439
|
-
}
|
|
440
|
-
) : /* @__PURE__ */ l(
|
|
441
|
-
sn,
|
|
442
|
-
{
|
|
443
|
-
tabIndex: -1,
|
|
444
|
-
className: `${d}-close-icon`,
|
|
445
|
-
onClick: G,
|
|
446
|
-
role: "button",
|
|
447
|
-
"aria-label": "Close",
|
|
448
|
-
children: /* @__PURE__ */ l(en, {})
|
|
449
|
-
}
|
|
450
|
-
))
|
|
451
|
-
]
|
|
452
|
-
}
|
|
453
|
-
), Je = c ? { "aria-labelledby": `pqb-dialog-${B.current}` } : {}, ve = /* @__PURE__ */ l(
|
|
454
|
-
"div",
|
|
455
|
-
{
|
|
456
|
-
role: "dialog",
|
|
457
|
-
"aria-modal": "true",
|
|
458
|
-
...Je,
|
|
459
|
-
className: ye(
|
|
460
|
-
d,
|
|
461
|
-
{
|
|
462
|
-
[`${d}-simple`]: o,
|
|
463
|
-
[`${d}-rtl`]: he,
|
|
464
|
-
[`${d}-fullscreenable`]: s.fullscreenable
|
|
465
|
-
},
|
|
466
|
-
m
|
|
467
|
-
),
|
|
468
|
-
style: {
|
|
469
|
-
...g,
|
|
470
|
-
transform: He,
|
|
471
|
-
transformOrigin: pe
|
|
472
|
-
},
|
|
473
|
-
ref: k,
|
|
474
|
-
children: Ge
|
|
475
|
-
}
|
|
476
|
-
), ne = (e) => {
|
|
477
|
-
if (pe)
|
|
478
|
-
return;
|
|
479
|
-
let t = "";
|
|
480
|
-
if (Y.current) {
|
|
481
|
-
const p = e.getBoundingClientRect(), { left: E, top: y } = Y.current;
|
|
482
|
-
t = `${E - p.left}px ${y - p.top}px`;
|
|
483
|
-
}
|
|
484
|
-
Ce(t);
|
|
485
|
-
}, ke = j.current ? !z : !!k.current;
|
|
486
|
-
return r || ke ? /* @__PURE__ */ l(
|
|
487
|
-
dn,
|
|
488
|
-
{
|
|
489
|
-
visible: r,
|
|
490
|
-
forceRender: ke,
|
|
491
|
-
getContainer: f,
|
|
492
|
-
children: /* @__PURE__ */ O(
|
|
493
|
-
"div",
|
|
494
|
-
{
|
|
495
|
-
ref: i,
|
|
496
|
-
className: `${d}-container`,
|
|
497
|
-
children: [
|
|
498
|
-
X ? /* @__PURE__ */ l(
|
|
499
|
-
Te,
|
|
500
|
-
{
|
|
501
|
-
in: r,
|
|
502
|
-
timeout: 400,
|
|
503
|
-
appear: !0,
|
|
504
|
-
mountOnEnter: z,
|
|
505
|
-
classNames: "fadeModal",
|
|
506
|
-
unmountOnExit: q,
|
|
507
|
-
onEnter: (e) => {
|
|
508
|
-
e && (e.style.display = "block");
|
|
509
|
-
},
|
|
510
|
-
onExited: (e) => {
|
|
511
|
-
e && (e.style.display = "none");
|
|
512
|
-
},
|
|
513
|
-
children: /* @__PURE__ */ l(
|
|
514
|
-
"div",
|
|
515
|
-
{
|
|
516
|
-
"aria-hidden": !0,
|
|
517
|
-
className: `${d}-mask`,
|
|
518
|
-
style: Xe
|
|
519
|
-
}
|
|
520
|
-
)
|
|
521
|
-
}
|
|
522
|
-
) : null,
|
|
523
|
-
/* @__PURE__ */ l(
|
|
524
|
-
"div",
|
|
525
|
-
{
|
|
526
|
-
...Cn(ae, [
|
|
527
|
-
"content",
|
|
528
|
-
"icon",
|
|
529
|
-
"showIcon",
|
|
530
|
-
"isNotice",
|
|
531
|
-
"noticeType",
|
|
532
|
-
"onCancel",
|
|
533
|
-
"onOk",
|
|
534
|
-
"onConfirm",
|
|
535
|
-
"closable",
|
|
536
|
-
"prefixCls"
|
|
537
|
-
]),
|
|
538
|
-
tabIndex: -1,
|
|
539
|
-
ref: (e) => {
|
|
540
|
-
I.current = e, Ze();
|
|
541
|
-
},
|
|
542
|
-
className: ye(
|
|
543
|
-
`${d}-wrapper`,
|
|
544
|
-
{
|
|
545
|
-
[`${d}-wrapper-no-mask`]: !X,
|
|
546
|
-
[`${d}-wrapper-align-center`]: Oe,
|
|
547
|
-
[`${d}-wrapper-rtl`]: he
|
|
548
|
-
},
|
|
549
|
-
Le
|
|
550
|
-
),
|
|
551
|
-
style: {
|
|
552
|
-
...Ye || {},
|
|
553
|
-
// 必须 visible=false,立即设置display:none,否则modal加载react-monaco-editor的时候,编辑器显示异常
|
|
554
|
-
display: r || ue ? "block" : "none",
|
|
555
|
-
overflow: !r && ue ? "hidden" : ""
|
|
556
|
-
},
|
|
557
|
-
onKeyDown: ze,
|
|
558
|
-
onMouseDown: (e) => {
|
|
559
|
-
D.current = e.target === e.currentTarget;
|
|
560
|
-
},
|
|
561
|
-
onClick: qe,
|
|
562
|
-
children: /* @__PURE__ */ l(
|
|
563
|
-
Te,
|
|
564
|
-
{
|
|
565
|
-
in: r,
|
|
566
|
-
timeout: 400,
|
|
567
|
-
appear: !0,
|
|
568
|
-
classNames: "zoomModal",
|
|
569
|
-
unmountOnExit: q,
|
|
570
|
-
mountOnEnter: z,
|
|
571
|
-
onEnter: (e) => {
|
|
572
|
-
e && (de(!0), Y.current = oe, ne(e), k.current = e);
|
|
573
|
-
},
|
|
574
|
-
onEntered: (e) => {
|
|
575
|
-
e && (ne(e), Y.current = null, W == null || W());
|
|
576
|
-
},
|
|
577
|
-
onExit: () => {
|
|
578
|
-
Q.current = !0;
|
|
579
|
-
},
|
|
580
|
-
onExited: (e) => {
|
|
581
|
-
e && (de(!1), ne(e), V == null || V(), Q.current = !1, q && (k.current = null));
|
|
582
|
-
},
|
|
583
|
-
children: nn.cloneElement(
|
|
584
|
-
Ee(se) ? se(ve) : ve,
|
|
585
|
-
{
|
|
586
|
-
onMouseDown: () => {
|
|
587
|
-
D.current = !1;
|
|
588
|
-
},
|
|
589
|
-
onMouseUp: () => {
|
|
590
|
-
D.current = !1;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
)
|
|
594
|
-
}
|
|
595
|
-
)
|
|
596
|
-
}
|
|
597
|
-
)
|
|
598
|
-
]
|
|
599
|
-
}
|
|
600
|
-
)
|
|
601
|
-
}
|
|
602
|
-
) : null;
|
|
603
|
-
}
|
|
604
|
-
const w = Pe(
|
|
605
|
-
Dn
|
|
606
|
-
);
|
|
607
|
-
w.displayName = "Modal";
|
|
608
|
-
w.config = En;
|
|
609
|
-
w.show = (n) => re({ ...n, noticeType: "show" });
|
|
610
|
-
w.confirm = (n) => re(n);
|
|
611
|
-
w.useModal = Nn;
|
|
612
|
-
["info", "success", "warning", "error"].forEach((n) => {
|
|
613
|
-
w[n] = (i) => re({
|
|
614
|
-
...i,
|
|
615
|
-
isNotice: !0,
|
|
616
|
-
noticeType: n
|
|
617
|
-
});
|
|
618
|
-
});
|
|
619
|
-
w.destroyAll = () => {
|
|
620
|
-
for (; T.length; ) {
|
|
621
|
-
const n = T.pop();
|
|
622
|
-
n && n();
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
export {
|
|
626
|
-
w as E,
|
|
627
|
-
re as c,
|
|
628
|
-
U as n
|
|
629
|
-
};
|