@unicom-cloud/ui 0.8.96 → 0.8.98
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/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/select/Select.js
CHANGED
|
@@ -1,551 +1,535 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { jsx as I, jsxs as ct } from "react/jsx-runtime";
|
|
2
|
+
import T from "lodash/isArray";
|
|
3
|
+
import ft from "lodash/isFunction";
|
|
4
|
+
import dt, { useContext as mt, useState as j, useMemo as Ae, useRef as v, useCallback as ne, useEffect as b, useImperativeHandle as gt } from "react";
|
|
5
|
+
import ht from "../checkbox/Checkbox.js";
|
|
6
6
|
import "../checkbox/Group.js";
|
|
7
7
|
import "../config-provider/ConfigProvider.js";
|
|
8
8
|
import Ct from "../components/common/hooks/useId.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { getHotkeyHandler as
|
|
9
|
+
import Ot from "../components/common/hooks/useMergeProps.js";
|
|
10
|
+
import Pe from "../components/common/hooks/useMergeValue.js";
|
|
11
|
+
import vt from "../select-view/index.js";
|
|
12
|
+
import bt from "../trigger/index.js";
|
|
13
|
+
import re from "@unicom-cloud/utils/class-name";
|
|
14
|
+
import { getHotkeyHandler as yt } from "../components/common/utils/getHotkeyHandler.js";
|
|
15
15
|
import "../components/common/utils/is.js";
|
|
16
|
-
import { Esc as
|
|
17
|
-
import { omit as
|
|
18
|
-
import {
|
|
19
|
-
import { warning as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { getValidValue as
|
|
24
|
-
import
|
|
25
|
-
import { isPlainObject as
|
|
26
|
-
const
|
|
16
|
+
import { Esc as Vt, Enter as Ie, Tab as _e, ArrowUp as wt, ArrowDown as kt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
17
|
+
import { omit as xt } from "../components/common/utils/omit.js";
|
|
18
|
+
import { resizeObserver as St } from "../components/common/utils/resizeObserver.js";
|
|
19
|
+
import { warning as At } from "../components/common/utils/warning.js";
|
|
20
|
+
import Pt from "../virtual-list/VirtualList.js";
|
|
21
|
+
import It from "./OptGroup.js";
|
|
22
|
+
import _t from "./Option.js";
|
|
23
|
+
import { getValidValue as Ee, flatChildren as Et, isEmpty as oe, preventDefaultEvent as Mt, isSelectOptGroup as Ft, isSelectOption as Lt } from "./util.js";
|
|
24
|
+
import Nt from "../config-provider/context.js";
|
|
25
|
+
import { isPlainObject as C } from "@unicom-cloud/utils/is";
|
|
26
|
+
const Me = "userCreatingOption", Tt = {
|
|
27
27
|
trigger: "click",
|
|
28
28
|
bordered: !0,
|
|
29
29
|
filterOption: !0,
|
|
30
30
|
unmountOnExit: !0,
|
|
31
31
|
defaultActiveFirstOption: !0,
|
|
32
32
|
allowCheckAll: !0
|
|
33
|
-
},
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
J == null ? void 0 : J.Select
|
|
33
|
+
}, Ut = { bottom: 4 };
|
|
34
|
+
function Dt(Fe, Le) {
|
|
35
|
+
const { getPrefixCls: Ne, renderEmpty: Te, componentConfig: Ue, rtl: le } = mt(Nt), a = Ot(
|
|
36
|
+
Fe,
|
|
37
|
+
Tt,
|
|
38
|
+
Ue?.Select
|
|
40
39
|
), {
|
|
41
|
-
children:
|
|
42
|
-
renderFormat:
|
|
43
|
-
defaultActiveFirstOption:
|
|
44
|
-
disabled:
|
|
45
|
-
unmountOnExit:
|
|
46
|
-
notFoundContent:
|
|
47
|
-
showSearch:
|
|
48
|
-
tokenSeparators:
|
|
49
|
-
options:
|
|
50
|
-
filterOption:
|
|
51
|
-
labelInValue:
|
|
52
|
-
getPopupContainer:
|
|
53
|
-
trigger:
|
|
54
|
-
triggerElement:
|
|
55
|
-
triggerProps:
|
|
56
|
-
dropdownRender:
|
|
57
|
-
dropdownMenuStyle:
|
|
58
|
-
dropdownMenuClassName:
|
|
59
|
-
virtualListProps:
|
|
40
|
+
children: se,
|
|
41
|
+
renderFormat: ae,
|
|
42
|
+
defaultActiveFirstOption: ue,
|
|
43
|
+
disabled: De,
|
|
44
|
+
unmountOnExit: Re,
|
|
45
|
+
notFoundContent: He,
|
|
46
|
+
showSearch: pe,
|
|
47
|
+
tokenSeparators: W,
|
|
48
|
+
options: ce,
|
|
49
|
+
filterOption: fe,
|
|
50
|
+
labelInValue: U,
|
|
51
|
+
getPopupContainer: $e,
|
|
52
|
+
trigger: Ge,
|
|
53
|
+
triggerElement: B,
|
|
54
|
+
triggerProps: y,
|
|
55
|
+
dropdownRender: de,
|
|
56
|
+
dropdownMenuStyle: me,
|
|
57
|
+
dropdownMenuClassName: ge,
|
|
58
|
+
virtualListProps: he,
|
|
60
59
|
// events
|
|
61
|
-
onChange:
|
|
62
|
-
onSelect:
|
|
63
|
-
onDeselect:
|
|
64
|
-
onClear:
|
|
65
|
-
onSearch:
|
|
66
|
-
onFocus:
|
|
67
|
-
onBlur:
|
|
68
|
-
onPopupScroll:
|
|
69
|
-
onVisibleChange:
|
|
70
|
-
onInputValueChange:
|
|
71
|
-
onPaste:
|
|
72
|
-
onKeyDown:
|
|
73
|
-
} =
|
|
74
|
-
let { mode:
|
|
75
|
-
|
|
60
|
+
onChange: Ce,
|
|
61
|
+
onSelect: Ke,
|
|
62
|
+
onDeselect: je,
|
|
63
|
+
onClear: We,
|
|
64
|
+
onSearch: Be,
|
|
65
|
+
onFocus: qe,
|
|
66
|
+
onBlur: ze,
|
|
67
|
+
onPopupScroll: Je,
|
|
68
|
+
onVisibleChange: Qe,
|
|
69
|
+
onInputValueChange: Xe,
|
|
70
|
+
onPaste: Ye,
|
|
71
|
+
onKeyDown: Ze
|
|
72
|
+
} = a;
|
|
73
|
+
let { mode: q, allowCheckAll: Oe, allowCreate: c } = a;
|
|
74
|
+
q === "tags" && (q = "multiple", c = !0, At(
|
|
76
75
|
!0,
|
|
77
76
|
`[Pqb Select] The 'tags' mode will be removed in the next major version, please use {mode: "multiple", allowCreate: true} instead.`
|
|
78
77
|
));
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const [
|
|
82
|
-
|
|
83
|
-
),
|
|
84
|
-
value: "inputValue" in
|
|
85
|
-
}), [
|
|
86
|
-
defaultValue:
|
|
87
|
-
value: "popupVisible" in
|
|
88
|
-
}), [M,
|
|
89
|
-
|
|
78
|
+
const f = Ne?.("select"), u = q === "multiple";
|
|
79
|
+
u || (Oe = !1);
|
|
80
|
+
const [et, z] = j(
|
|
81
|
+
Ee(a.defaultValue, u, U)
|
|
82
|
+
), n = "value" in a ? Ee(a.value, u, U) : et, [d, tt, nt] = Pe("", {
|
|
83
|
+
value: "inputValue" in a ? a.inputValue || "" : void 0
|
|
84
|
+
}), [m, rt] = Pe(!1, {
|
|
85
|
+
defaultValue: a.defaultPopupVisible,
|
|
86
|
+
value: "popupVisible" in a ? a.popupVisible : y && "popupVisible" in y ? y.popupVisible : void 0
|
|
87
|
+
}), [M, ot] = j(null), [F, it] = j([]), [g, _] = j(
|
|
88
|
+
T(n) ? n[0] : n
|
|
90
89
|
), {
|
|
91
|
-
childrenList:
|
|
92
|
-
optionInfoMap:
|
|
93
|
-
optionValueList:
|
|
90
|
+
childrenList: J,
|
|
91
|
+
optionInfoMap: p,
|
|
92
|
+
optionValueList: V,
|
|
94
93
|
optionIndexListForArrowKey: x,
|
|
95
|
-
hasOptGroup:
|
|
96
|
-
hasComplexLabelInOptions:
|
|
97
|
-
} =
|
|
98
|
-
{ children:
|
|
94
|
+
hasOptGroup: lt,
|
|
95
|
+
hasComplexLabelInOptions: st
|
|
96
|
+
} = Ae(() => Et(
|
|
97
|
+
{ children: se, options: ce, filterOption: fe },
|
|
99
98
|
{
|
|
100
|
-
prefixCls:
|
|
101
|
-
inputValue:
|
|
102
|
-
userCreatedOptions:
|
|
99
|
+
prefixCls: f,
|
|
100
|
+
inputValue: d,
|
|
101
|
+
userCreatedOptions: F,
|
|
103
102
|
userCreatingOption: M
|
|
104
103
|
}
|
|
105
104
|
), [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
105
|
+
se,
|
|
106
|
+
ce,
|
|
107
|
+
fe,
|
|
108
|
+
d,
|
|
110
109
|
M,
|
|
111
|
-
|
|
112
|
-
]),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return r && !l ? n : k[x[0]];
|
|
110
|
+
F
|
|
111
|
+
]), Q = v(null), ve = v(null), O = v(null), S = v([]), w = v(null), be = v(d), X = v(null), D = v(0), Y = v(!1), ye = Ct(`${f}-popup-`), R = oe(n, u), Ve = Ae(() => {
|
|
112
|
+
if (ue) {
|
|
113
|
+
const e = T(n) ? n[0] : n, t = !R && p.get(e)?._valid, o = p?.get(V[0])?._origin === Me;
|
|
114
|
+
return t && !o ? e : V[x[0]];
|
|
117
115
|
}
|
|
118
116
|
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
n,
|
|
118
|
+
p,
|
|
119
|
+
V,
|
|
122
120
|
x,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
]),
|
|
121
|
+
ue,
|
|
122
|
+
R
|
|
123
|
+
]), H = ne(
|
|
126
124
|
(e, t) => {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
key: n.child.props._key,
|
|
125
|
+
const o = p.get(e);
|
|
126
|
+
Q.current && o?.child?.props && Q.current.scrollTo({
|
|
127
|
+
key: o.child.props._key,
|
|
131
128
|
options: t
|
|
132
129
|
});
|
|
133
130
|
},
|
|
134
|
-
[
|
|
135
|
-
),
|
|
136
|
-
(e, t = !1) =>
|
|
137
|
-
[
|
|
138
|
-
),
|
|
139
|
-
(e !==
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
O !== e && (it(e), ne == null || ne(e), (t = c == null ? void 0 : c.onVisibleChange) == null || t.call(c, e));
|
|
131
|
+
[p]
|
|
132
|
+
), $ = ne(
|
|
133
|
+
(e, t = !1) => C(c) && typeof c?.formatter == "function" ? c.formatter(e, t) : e,
|
|
134
|
+
[c]
|
|
135
|
+
), A = (e, t) => {
|
|
136
|
+
(e !== be.current || t !== X.current) && (tt(e), be.current = e, X.current = t, Xe?.(e, t));
|
|
137
|
+
}, E = (e) => {
|
|
138
|
+
m !== e && (rt(e), Qe?.(e), y?.onVisibleChange?.(e));
|
|
143
139
|
};
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}, [
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
const e =
|
|
150
|
-
|
|
140
|
+
b(() => {
|
|
141
|
+
u ? Array.isArray(n) || z(n === void 0 ? [] : [n]) : Array.isArray(n) && z(n.length === 0 ? void 0 : n[0]);
|
|
142
|
+
}, [u, n]), b(() => {
|
|
143
|
+
if (m) {
|
|
144
|
+
_(Ve);
|
|
145
|
+
const e = T(n) ? n[0] : n;
|
|
146
|
+
!R && p.has(e) && setTimeout(() => H(e));
|
|
151
147
|
}
|
|
152
|
-
}, [
|
|
153
|
-
(w.current === "up" || w.current === "down") && (
|
|
154
|
-
}, [
|
|
155
|
-
|
|
156
|
-
}, [JSON.stringify(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
A.current = A.current.filter((e) => p ? D(o) && o.indexOf(e.value) > -1 : e.value === o);
|
|
161
|
-
}, [o, p]), V(() => {
|
|
162
|
-
if (d) {
|
|
148
|
+
}, [m]), b(() => {
|
|
149
|
+
(w.current === "up" || w.current === "down") && (H(g), w.current = "none");
|
|
150
|
+
}, [g]), b(() => {
|
|
151
|
+
_(Ve);
|
|
152
|
+
}, [JSON.stringify(J.map((e) => e?.props?.value))]), b(() => {
|
|
153
|
+
S.current = S.current.filter((e) => u ? T(n) && n.indexOf(e.value) > -1 : e.value === n);
|
|
154
|
+
}, [n, u]), b(() => {
|
|
155
|
+
if (c) {
|
|
163
156
|
let e;
|
|
164
|
-
if (
|
|
157
|
+
if (oe(n, u))
|
|
165
158
|
e = [];
|
|
166
159
|
else {
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return n.indexOf(f) !== -1;
|
|
160
|
+
const o = Array.isArray(n) ? n : [n], r = o.filter((i, l, h) => {
|
|
161
|
+
const k = p.get(i) || S.current.find((te) => te.value === i)?.option;
|
|
162
|
+
return !k || k._origin === Me;
|
|
163
|
+
}).map((i) => $(i));
|
|
164
|
+
e = F.filter((i) => {
|
|
165
|
+
const l = C(i) ? i.value : i;
|
|
166
|
+
return o.indexOf(l) !== -1;
|
|
175
167
|
}).concat(
|
|
176
168
|
r
|
|
177
169
|
);
|
|
178
170
|
}
|
|
179
|
-
const t = (
|
|
180
|
-
t(e) !== t(
|
|
171
|
+
const t = (o) => o.map((r) => C(r) ? r.value : r).toString();
|
|
172
|
+
t(e) !== t(F) && it(e);
|
|
181
173
|
}
|
|
182
|
-
}, [
|
|
183
|
-
|
|
184
|
-
|
|
174
|
+
}, [n, c, u, $]), b(() => {
|
|
175
|
+
c && ot(
|
|
176
|
+
d && !p.has(d) ? $(d, !0) : null
|
|
185
177
|
);
|
|
186
|
-
}, [
|
|
187
|
-
const { current: e } =
|
|
188
|
-
|
|
189
|
-
}, [
|
|
190
|
-
const
|
|
178
|
+
}, [d, $]), b(() => {
|
|
179
|
+
const { current: e } = X;
|
|
180
|
+
nt === d && (e === "manual" || e === "optionListHide") && Be?.(d, e);
|
|
181
|
+
}, [d]);
|
|
182
|
+
const L = ne(
|
|
191
183
|
(e) => {
|
|
192
|
-
const t =
|
|
184
|
+
const t = p.get(e);
|
|
193
185
|
if (t) {
|
|
194
|
-
const r =
|
|
195
|
-
(
|
|
186
|
+
const r = S.current.findIndex(
|
|
187
|
+
(s) => s.value === e
|
|
196
188
|
);
|
|
197
|
-
return r > -1 ?
|
|
189
|
+
return r > -1 ? S.current.splice(r, 1, { value: e, option: t }) : S.current.push({ value: e, option: t }), t;
|
|
198
190
|
}
|
|
199
|
-
const
|
|
200
|
-
return
|
|
191
|
+
const o = S.current.find((r) => r.value === e);
|
|
192
|
+
return o && o.option;
|
|
201
193
|
},
|
|
202
|
-
[
|
|
203
|
-
),
|
|
194
|
+
[p]
|
|
195
|
+
), we = (e) => {
|
|
204
196
|
if (!x.length)
|
|
205
197
|
return;
|
|
206
|
-
if (
|
|
207
|
-
return
|
|
208
|
-
const
|
|
209
|
-
return
|
|
210
|
-
},
|
|
211
|
-
let
|
|
212
|
-
const r = e === void 0 ? void 0 : Array.isArray(e) ? e.map(
|
|
213
|
-
if (
|
|
214
|
-
const
|
|
215
|
-
if (
|
|
216
|
-
return
|
|
217
|
-
const
|
|
218
|
-
if (Array.isArray(
|
|
219
|
-
for (const
|
|
220
|
-
if (
|
|
221
|
-
return
|
|
222
|
-
} else if (
|
|
223
|
-
return
|
|
198
|
+
if (g === void 0 || !p.has(g))
|
|
199
|
+
return V[x[0]];
|
|
200
|
+
const o = p.get(g)._index, r = x.indexOf(o), s = x.length;
|
|
201
|
+
return V[x[((e === "up" ? r - 1 : r + 1) + s) % s]];
|
|
202
|
+
}, G = (e, t = oe(e, u)) => {
|
|
203
|
+
let o = e;
|
|
204
|
+
const r = e === void 0 ? void 0 : Array.isArray(e) ? e.map(L) : L(e);
|
|
205
|
+
if (U && !t) {
|
|
206
|
+
const s = (i, l) => {
|
|
207
|
+
if (l)
|
|
208
|
+
return l.children;
|
|
209
|
+
const h = "value" in a ? a.value : "defaultValue" in a ? a.defaultValue : null;
|
|
210
|
+
if (Array.isArray(h)) {
|
|
211
|
+
for (const k of h)
|
|
212
|
+
if (C(k) && k.value === i)
|
|
213
|
+
return k.label;
|
|
214
|
+
} else if (C(h) && h.value === i)
|
|
215
|
+
return h.label;
|
|
224
216
|
};
|
|
225
|
-
Array.isArray(e) ?
|
|
217
|
+
Array.isArray(e) ? o = e.map((i, l) => ({
|
|
226
218
|
value: i,
|
|
227
|
-
label:
|
|
228
|
-
})) :
|
|
219
|
+
label: s(i, r[l])
|
|
220
|
+
})) : o = {
|
|
229
221
|
value: e,
|
|
230
|
-
label:
|
|
222
|
+
label: s(e, r)
|
|
231
223
|
};
|
|
232
224
|
}
|
|
233
|
-
return { option: r, value:
|
|
234
|
-
},
|
|
235
|
-
if (
|
|
236
|
-
const t =
|
|
237
|
-
|
|
225
|
+
return { option: r, value: o };
|
|
226
|
+
}, P = (e) => {
|
|
227
|
+
if (z(e), Ce) {
|
|
228
|
+
const t = G(e);
|
|
229
|
+
Ce(t.value, t.option);
|
|
238
230
|
}
|
|
239
|
-
},
|
|
240
|
-
if (t === "remove" || t === "add" &&
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
243
|
-
const
|
|
231
|
+
}, ke = (e, t) => {
|
|
232
|
+
if (t === "remove" || t === "add" && p.get(e)) {
|
|
233
|
+
const o = t === "add" ? n.concat(e) : n.filter((s, i, l) => s !== e), r = t === "add" ? Ke : je;
|
|
234
|
+
if (P(o), typeof r == "function") {
|
|
235
|
+
const s = G(
|
|
244
236
|
e,
|
|
245
237
|
!1
|
|
246
238
|
);
|
|
247
239
|
r(
|
|
248
|
-
|
|
249
|
-
|
|
240
|
+
s.value,
|
|
241
|
+
s.option
|
|
250
242
|
);
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
|
-
},
|
|
254
|
-
t || (
|
|
245
|
+
}, xe = (e, t) => {
|
|
246
|
+
t || (u ? (ke(
|
|
255
247
|
e,
|
|
256
|
-
|
|
257
|
-
), (!
|
|
258
|
-
|
|
248
|
+
n.indexOf(e) === -1 ? "add" : "remove"
|
|
249
|
+
), (!C(pe) || !pe.retainInputValueWhileSelect) && A("", "optionChecked")) : (e !== n && P(e), setTimeout(() => {
|
|
250
|
+
E(!1);
|
|
259
251
|
})));
|
|
260
|
-
},
|
|
252
|
+
}, K = yt(
|
|
261
253
|
/* @__PURE__ */ new Map([
|
|
262
|
-
[
|
|
254
|
+
[Vt.key, () => E(!1)],
|
|
263
255
|
[
|
|
264
|
-
|
|
256
|
+
Ie.key,
|
|
265
257
|
() => {
|
|
266
|
-
if (
|
|
267
|
-
const e =
|
|
268
|
-
e &&
|
|
258
|
+
if (m) {
|
|
259
|
+
const e = p.get(g);
|
|
260
|
+
e && xe(g, e.disabled);
|
|
269
261
|
} else
|
|
270
|
-
|
|
262
|
+
E(!0);
|
|
271
263
|
}
|
|
272
264
|
],
|
|
273
265
|
[
|
|
274
|
-
|
|
266
|
+
_e.key,
|
|
275
267
|
// 按tab键切换,关闭开启的弹出框
|
|
276
|
-
() =>
|
|
268
|
+
() => E(!1)
|
|
277
269
|
],
|
|
278
270
|
[
|
|
279
|
-
|
|
271
|
+
wt.key,
|
|
280
272
|
() => {
|
|
281
|
-
if (
|
|
282
|
-
return w.current = "up",
|
|
273
|
+
if (m)
|
|
274
|
+
return w.current = "up", _(we("up")), !1;
|
|
283
275
|
}
|
|
284
276
|
],
|
|
285
277
|
[
|
|
286
|
-
|
|
278
|
+
kt.key,
|
|
287
279
|
() => {
|
|
288
|
-
if (
|
|
289
|
-
return w.current = "down",
|
|
280
|
+
if (m)
|
|
281
|
+
return w.current = "down", _(we("down")), !1;
|
|
290
282
|
}
|
|
291
283
|
]
|
|
292
284
|
])
|
|
293
|
-
),
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
Mt,
|
|
285
|
+
), at = () => {
|
|
286
|
+
const e = y?.autoAlignPopupWidth === !1 && (!y?.style?.width || y?.style?.width === "auto"), t = e && st, o = "notFoundContent" in a ? He : Te("Select"), r = J.length ? /* @__PURE__ */ I(
|
|
287
|
+
Pt,
|
|
297
288
|
{
|
|
298
|
-
id:
|
|
289
|
+
id: ye,
|
|
299
290
|
role: "listbox",
|
|
300
|
-
style:
|
|
301
|
-
className:
|
|
302
|
-
ref:
|
|
303
|
-
data:
|
|
291
|
+
style: me,
|
|
292
|
+
className: re(`${f}-popup-inner`, ge),
|
|
293
|
+
ref: Q,
|
|
294
|
+
data: J,
|
|
304
295
|
height: null,
|
|
305
|
-
isStaticItemHeight: !
|
|
296
|
+
isStaticItemHeight: !lt,
|
|
306
297
|
measureLongestItem: e,
|
|
307
|
-
itemKey: (
|
|
308
|
-
onMouseDown:
|
|
298
|
+
itemKey: (l) => l.props._key,
|
|
299
|
+
onMouseDown: Mt,
|
|
309
300
|
onMouseMove: () => {
|
|
310
301
|
w.current = null;
|
|
311
302
|
},
|
|
312
|
-
onScroll: (
|
|
313
|
-
...
|
|
314
|
-
threshold: t ? null :
|
|
315
|
-
children: (
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
w.current === null && E(U);
|
|
303
|
+
onScroll: (l) => Je?.(l.target),
|
|
304
|
+
...he,
|
|
305
|
+
threshold: t ? null : he?.threshold,
|
|
306
|
+
children: (l) => {
|
|
307
|
+
if (Ft(l))
|
|
308
|
+
return /* @__PURE__ */ I(l.type, { ...l.props, prefixCls: f });
|
|
309
|
+
if (Lt(l)) {
|
|
310
|
+
const h = l.props?.value, k = C(M) ? M.value : M, te = F.map(
|
|
311
|
+
(N) => C(N) ? N.value : N
|
|
312
|
+
), pt = {
|
|
313
|
+
prefixCls: f,
|
|
314
|
+
rtl: le,
|
|
315
|
+
_valueActive: g,
|
|
316
|
+
_valueSelect: n,
|
|
317
|
+
_isMultipleMode: u,
|
|
318
|
+
_isUserCreatingOption: c && k === h,
|
|
319
|
+
_isUserCreatedOption: c && te.indexOf(h) > -1,
|
|
320
|
+
_onClick: xe,
|
|
321
|
+
_onMouseEnter: (N) => {
|
|
322
|
+
w.current === null && _(N);
|
|
333
323
|
},
|
|
334
324
|
_onMouseLeave: () => {
|
|
335
|
-
w.current === null &&
|
|
325
|
+
w.current === null && _(void 0);
|
|
336
326
|
}
|
|
337
327
|
};
|
|
338
|
-
return
|
|
328
|
+
return l && /* @__PURE__ */ I(l.type, { ...l.props, ...pt });
|
|
339
329
|
}
|
|
340
|
-
return
|
|
330
|
+
return l;
|
|
341
331
|
}
|
|
342
332
|
}
|
|
343
|
-
) : null, i =
|
|
333
|
+
) : null, i = o && !(c && d) ? /* @__PURE__ */ I(
|
|
344
334
|
"div",
|
|
345
335
|
{
|
|
346
|
-
style:
|
|
347
|
-
className:
|
|
348
|
-
children:
|
|
336
|
+
style: me,
|
|
337
|
+
className: re(`${f}-popup-inner`, ge),
|
|
338
|
+
children: o
|
|
349
339
|
}
|
|
350
340
|
) : null;
|
|
351
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ ct(
|
|
352
342
|
"div",
|
|
353
343
|
{
|
|
354
|
-
className:
|
|
355
|
-
[`${
|
|
356
|
-
[`${
|
|
344
|
+
className: re(`${f}-popup`, {
|
|
345
|
+
[`${f}-popup-hidden`]: r === null && i === null,
|
|
346
|
+
[`${f}-popup-multiple`]: u
|
|
357
347
|
}),
|
|
358
348
|
tabIndex: -1,
|
|
359
|
-
onKeyDown: (
|
|
349
|
+
onKeyDown: (l) => K(l),
|
|
360
350
|
children: [
|
|
361
|
-
!!
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
|
|
351
|
+
!!u && !!r && !!Oe && // 潘启宝添加
|
|
352
|
+
/* @__PURE__ */ I(
|
|
353
|
+
ht,
|
|
364
354
|
{
|
|
365
355
|
"aria-hidden": "true",
|
|
366
|
-
className: `${
|
|
367
|
-
checked:
|
|
368
|
-
indeterminate:
|
|
369
|
-
onChange: (
|
|
370
|
-
|
|
356
|
+
className: `${f}-checkbox ${f}-checkbox-all`,
|
|
357
|
+
checked: V.length === n.length,
|
|
358
|
+
indeterminate: V.length !== n.length && n.length !== 0,
|
|
359
|
+
onChange: (l) => {
|
|
360
|
+
P(l ? [...V] : []);
|
|
371
361
|
},
|
|
372
362
|
children: "全选"
|
|
373
363
|
}
|
|
374
364
|
),
|
|
375
|
-
typeof
|
|
365
|
+
typeof de == "function" ? de(r || i) : r || i
|
|
376
366
|
]
|
|
377
367
|
}
|
|
378
368
|
);
|
|
379
|
-
},
|
|
380
|
-
if (
|
|
381
|
-
const t = e.split(new RegExp(`[${
|
|
369
|
+
}, Z = (e) => {
|
|
370
|
+
if (D.current = null, u && T(W) && W.length) {
|
|
371
|
+
const t = e.split(new RegExp(`[${W.join("")}]`));
|
|
382
372
|
if (t.length > 1) {
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
(i,
|
|
386
|
-
), r =
|
|
387
|
-
let
|
|
388
|
-
|
|
389
|
-
r.indexOf(i) === -1 && (
|
|
390
|
-
}),
|
|
373
|
+
D.current = Date.now();
|
|
374
|
+
const o = t.filter(
|
|
375
|
+
(i, l) => i && t.indexOf(i) === l
|
|
376
|
+
), r = n.slice(0);
|
|
377
|
+
let s = !1;
|
|
378
|
+
o.forEach((i, l, h) => {
|
|
379
|
+
r.indexOf(i) === -1 && (c || p.get(i)) && (r.push(i), s = !0);
|
|
380
|
+
}), s && P(r);
|
|
391
381
|
}
|
|
392
382
|
}
|
|
393
|
-
return !!
|
|
394
|
-
},
|
|
395
|
-
onFocus:
|
|
383
|
+
return !!D.current;
|
|
384
|
+
}, ut = {
|
|
385
|
+
onFocus: qe,
|
|
396
386
|
onBlur: (e) => {
|
|
397
|
-
|
|
387
|
+
ze?.(e), !m && !Y.current && A("", "optionListHide");
|
|
398
388
|
},
|
|
399
389
|
onKeyDown: (e) => {
|
|
400
390
|
if (e.target.tagName === "INPUT" && e.target.value) {
|
|
401
|
-
const t = e.key ===
|
|
402
|
-
if (
|
|
403
|
-
const r =
|
|
391
|
+
const t = e.key === _e.key, o = e.key === Ie.key;
|
|
392
|
+
if (o || t) {
|
|
393
|
+
const r = o ? `
|
|
404
394
|
` : t ? " " : "";
|
|
405
|
-
|
|
395
|
+
Z(e.target.value + r) && A("", "tokenSeparator");
|
|
406
396
|
}
|
|
407
397
|
}
|
|
408
|
-
|
|
398
|
+
K(e), Ze?.(e);
|
|
409
399
|
},
|
|
410
400
|
onChangeInputValue: (e, { nativeEvent: { inputType: t } }) => {
|
|
411
|
-
t !== "insertFromPaste" &&
|
|
401
|
+
t !== "insertFromPaste" && Z(e), D.current ? A("", "tokenSeparator") : A(e, "manual"), !m && e && E(!0);
|
|
412
402
|
},
|
|
413
403
|
onPaste: (e) => {
|
|
414
|
-
|
|
404
|
+
Z(e.clipboardData.getData("text")), Ye?.(e);
|
|
415
405
|
},
|
|
416
406
|
// Option Items
|
|
417
|
-
onRemoveCheckedItem: (e, t,
|
|
418
|
-
|
|
407
|
+
onRemoveCheckedItem: (e, t, o) => {
|
|
408
|
+
o.stopPropagation(), ke(n[t], "remove");
|
|
419
409
|
},
|
|
420
410
|
onClear: (e) => {
|
|
421
|
-
if (e.stopPropagation(),
|
|
422
|
-
const t =
|
|
423
|
-
const i =
|
|
411
|
+
if (e.stopPropagation(), u) {
|
|
412
|
+
const t = n.filter((o, r, s) => {
|
|
413
|
+
const i = p.get(o);
|
|
424
414
|
return i && i.disabled;
|
|
425
415
|
});
|
|
426
|
-
|
|
416
|
+
P(t);
|
|
427
417
|
} else
|
|
428
|
-
|
|
429
|
-
|
|
418
|
+
P(void 0);
|
|
419
|
+
A("", "manual"), We?.(m);
|
|
430
420
|
}
|
|
431
421
|
};
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
() => {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
return (n = (t = y.current) == null ? void 0 : t.getRootDOMNode) == null ? void 0 : n.call(t);
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
},
|
|
422
|
+
gt(
|
|
423
|
+
Le,
|
|
424
|
+
() => ({
|
|
425
|
+
dom: O.current?.dom,
|
|
426
|
+
focus() {
|
|
427
|
+
O.current && O.current.focus();
|
|
428
|
+
},
|
|
429
|
+
blur() {
|
|
430
|
+
O.current && O.current.blur();
|
|
431
|
+
},
|
|
432
|
+
hotkeyHandler: K,
|
|
433
|
+
activeOptionValue: g,
|
|
434
|
+
getOptionInfoByValue: L,
|
|
435
|
+
getOptionInfoList: () => [...p.values()].filter((e) => e._valid),
|
|
436
|
+
scrollIntoView: H,
|
|
437
|
+
getRootDOMNode() {
|
|
438
|
+
return O.current?.getRootDOMNode?.();
|
|
439
|
+
}
|
|
440
|
+
}),
|
|
455
441
|
[
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
442
|
+
K,
|
|
443
|
+
p,
|
|
444
|
+
g,
|
|
445
|
+
L,
|
|
446
|
+
H
|
|
461
447
|
]
|
|
462
448
|
);
|
|
463
|
-
const
|
|
464
|
-
|
|
449
|
+
const Se = (e) => /* @__PURE__ */ I(
|
|
450
|
+
bt,
|
|
465
451
|
{
|
|
466
|
-
ref:
|
|
467
|
-
popup:
|
|
468
|
-
trigger:
|
|
469
|
-
disabled:
|
|
470
|
-
getPopupContainer:
|
|
452
|
+
ref: ve,
|
|
453
|
+
popup: at,
|
|
454
|
+
trigger: Ge,
|
|
455
|
+
disabled: De,
|
|
456
|
+
getPopupContainer: $e,
|
|
471
457
|
classNames: "slideDynamicOrigin",
|
|
472
458
|
autoAlignPopupWidth: !0,
|
|
473
|
-
popupAlign:
|
|
474
|
-
popupVisible:
|
|
475
|
-
unmountOnExit:
|
|
476
|
-
onVisibleChange:
|
|
459
|
+
popupAlign: Ut,
|
|
460
|
+
popupVisible: m,
|
|
461
|
+
unmountOnExit: Re,
|
|
462
|
+
onVisibleChange: E,
|
|
477
463
|
__onExit: () => {
|
|
478
|
-
|
|
464
|
+
Y.current = !0;
|
|
479
465
|
},
|
|
480
466
|
__onExited: () => {
|
|
481
|
-
|
|
467
|
+
Y.current = !1, A("", "optionListHide");
|
|
482
468
|
},
|
|
483
|
-
...
|
|
469
|
+
...xt(y, ["popupVisible", "onVisibleChange"]),
|
|
484
470
|
children: e
|
|
485
471
|
}
|
|
486
|
-
),
|
|
487
|
-
return
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
var n, r;
|
|
491
|
-
(r = (n = Ee.current) == null ? void 0 : n.updatePopupPosition) == null || r.call(n);
|
|
472
|
+
), ee = typeof B == "function" ? B(G(n)) : B;
|
|
473
|
+
return b(() => {
|
|
474
|
+
const e = St([O.current?.dom], () => {
|
|
475
|
+
ve.current?.updatePopupPosition?.();
|
|
492
476
|
});
|
|
493
477
|
return () => {
|
|
494
478
|
e();
|
|
495
479
|
};
|
|
496
|
-
}, [
|
|
497
|
-
|
|
480
|
+
}, [O.current?.dom]), ee != null ? Se(ee) : /* @__PURE__ */ I(
|
|
481
|
+
vt,
|
|
498
482
|
{
|
|
499
|
-
...
|
|
500
|
-
...
|
|
501
|
-
ref:
|
|
502
|
-
value:
|
|
503
|
-
inputValue:
|
|
504
|
-
popupVisible:
|
|
505
|
-
rtl:
|
|
506
|
-
prefixCls:
|
|
507
|
-
allowCreate: !!
|
|
508
|
-
ariaControls:
|
|
509
|
-
isEmptyValue:
|
|
510
|
-
isMultiple:
|
|
511
|
-
onSort:
|
|
483
|
+
...a,
|
|
484
|
+
...ut,
|
|
485
|
+
ref: O,
|
|
486
|
+
value: n,
|
|
487
|
+
inputValue: d,
|
|
488
|
+
popupVisible: m,
|
|
489
|
+
rtl: le,
|
|
490
|
+
prefixCls: f,
|
|
491
|
+
allowCreate: !!c,
|
|
492
|
+
ariaControls: ye,
|
|
493
|
+
isEmptyValue: R,
|
|
494
|
+
isMultiple: u,
|
|
495
|
+
onSort: P,
|
|
512
496
|
renderText: (e) => {
|
|
513
|
-
const t =
|
|
514
|
-
let
|
|
515
|
-
if (
|
|
516
|
-
const r =
|
|
517
|
-
|
|
497
|
+
const t = L(e);
|
|
498
|
+
let o = e;
|
|
499
|
+
if (ft(ae)) {
|
|
500
|
+
const r = G(e, !1);
|
|
501
|
+
o = ae(
|
|
518
502
|
r.option || null,
|
|
519
503
|
r.value
|
|
520
504
|
);
|
|
521
505
|
} else {
|
|
522
506
|
let r = !1;
|
|
523
|
-
if (
|
|
524
|
-
const
|
|
525
|
-
if (Array.isArray(
|
|
526
|
-
const i =
|
|
527
|
-
(
|
|
507
|
+
if (U) {
|
|
508
|
+
const s = a.value || a.defaultValue;
|
|
509
|
+
if (Array.isArray(s)) {
|
|
510
|
+
const i = s.find(
|
|
511
|
+
(l) => C(l) && l.value === e
|
|
528
512
|
);
|
|
529
|
-
i && (
|
|
530
|
-
} else
|
|
513
|
+
i && (o = i.label, r = !0);
|
|
514
|
+
} else C(s) && (o = s.label, r = !0);
|
|
531
515
|
}
|
|
532
|
-
!r && t && "children" in t && (
|
|
516
|
+
!r && t && "children" in t && (o = t.children);
|
|
533
517
|
}
|
|
534
518
|
return {
|
|
535
|
-
text:
|
|
519
|
+
text: o,
|
|
536
520
|
disabled: t && t.disabled
|
|
537
521
|
};
|
|
538
522
|
},
|
|
539
|
-
renderView:
|
|
523
|
+
renderView: Se
|
|
540
524
|
}
|
|
541
525
|
);
|
|
542
526
|
}
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
527
|
+
const Rt = dt.forwardRef(Dt), ie = Rt;
|
|
528
|
+
ie.displayName = "Select";
|
|
529
|
+
ie.Option = _t;
|
|
530
|
+
ie.OptGroup = It;
|
|
547
531
|
export {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
532
|
+
_t as SelectOption,
|
|
533
|
+
It as SelectOptionGroup,
|
|
534
|
+
ie as default
|
|
551
535
|
};
|