@baishuyun/ui-base 6.4.2 → 6.5.0
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/dist/Amap/{Amap-DL5dLiUm.js → Amap-Dnvu_pUP.js} +1 -1
- package/dist/Amap/AmapCircle/index.js +3 -3
- package/dist/Amap/{AmapCircle-mh92P2l6.js → AmapCircle-Wfn43qco.js} +1 -1
- package/dist/Amap/AmapMarker/index.js +4 -4
- package/dist/Amap/{AmapMarker-DYW0-8Hd.js → AmapMarker-CB66dQIG.js} +2 -2
- package/dist/Amap/AmapMarkerCluster/index.js +4 -4
- package/dist/Amap/{AmapMarkerCluster-BRVHHMbi.js → AmapMarkerCluster-DvXchCC0.js} +2 -2
- package/dist/Amap/AmapProvider/index.js +4 -4
- package/dist/Amap/{AmapProvider-CwKdpmCg.js → AmapProvider-XCrqzo9W.js} +2 -2
- package/dist/Amap/hooks/index.js +2 -2
- package/dist/Amap/{hooks-D1m8KgVM.js → hooks-DwRvpafb.js} +1 -1
- package/dist/Amap/index.js +10 -10
- package/dist/Calendar/{AllDaySection-CseF1DuB.js → AllDaySection-M-b9tRHh.js} +4 -4
- package/dist/Calendar/{Calendar-Yu2HfA5D.js → Calendar-C9PhASp0.js} +13 -13
- package/dist/Calendar/{CurrentTimeIndicator-CUeblc9r.js → CurrentTimeIndicator-Dpi36eVJ.js} +1 -1
- package/dist/Calendar/{EventCard-L6jaKgEw.js → EventCard-BIfRqCk5.js} +3 -3
- package/dist/Calendar/{TimeGrid-B8lvUb1W.js → TimeGrid-Dk3soSo4.js} +2 -2
- package/dist/Calendar/context/index.js +1 -1
- package/dist/Calendar/index.js +19 -19
- package/dist/Calendar/subcomponents/AllDaySection/index.js +7 -7
- package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +4 -4
- package/dist/Calendar/subcomponents/EventCard/index.js +5 -5
- package/dist/Calendar/subcomponents/TimeAxis/index.js +3 -3
- package/dist/Calendar/subcomponents/TimeGrid/index.js +3 -3
- package/dist/Calendar/{theme-BzNDRi0U.js → theme-Cgn0zQoC.js} +2 -2
- package/dist/Calendar/utils/index.js +3 -3
- package/dist/Calendar/utils/layout/index.js +2 -2
- package/dist/Calendar/utils/theme/index.js +1 -1
- package/dist/Card/{Card-CRrtIjNT.js → Card-BjWdQRjq.js} +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-DIunYcfS.js → CheckBox-81R8QKHb.js} +1 -1
- package/dist/CheckBox/{CheckBox-CkVe5Boq.js → CheckBox-ejvbDr-a.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/{ColorPicker-By-Y8Tyz.js → ColorPicker-aj57lMA5.js} +5 -5
- package/dist/ColorPicker/index.js +6 -6
- package/dist/ConfigProvider/index.js +2 -2
- package/dist/DatePicker/{DatePicker-PCdNachD.js → DatePicker-EIFyC9zF.js} +6 -6
- package/dist/DatePicker/{DatePickerPanel-HoxXteK0.js → DatePickerPanel-BjnLfncu.js} +5 -5
- package/dist/DatePicker/index.js +7 -7
- package/dist/DatePicker/style/index.js +1 -1
- package/dist/DatePicker/{style-DZaSSoNs.js → style-BxWyBhZ3.js} +1 -1
- package/dist/DropDown/DropDown-B34vfoOs.js +172 -0
- package/dist/DropDown/index.js +8 -7
- package/dist/DropDown/style/index.js +2 -0
- package/dist/DropDown/style-4LK6rNHe.js +9 -0
- package/dist/Editor/{Buttons-DmSUkHWl.js → Buttons-Ds6bLmnl.js} +6 -6
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +15 -14
- package/dist/Editor/index.js +15 -14
- package/dist/Gantt/GanttChart/index.js +15 -14
- package/dist/Gantt/{GanttChart-BgDJOyW1.js → GanttChart-CnIWe_wk.js} +672 -590
- package/dist/Gantt/GanttTable/index.js +9 -9
- package/dist/Gantt/{GanttTable-Di_p-0M1.js → GanttTable-C3PLGmKr.js} +20 -19
- package/dist/Gantt/GanttToolBar/index.js +11 -10
- package/dist/Gantt/GanttToolBar-8jPQ9BAG.js +121 -0
- package/dist/Gantt/{collapseKeys-C8139wvy.js → collapseKeys-1N9ci2oJ.js} +2 -2
- package/dist/Gantt/index.js +195 -162
- package/dist/Gantt/theme-C197Dtjy.js +31 -0
- package/dist/Gantt/{timelineViewConfig-BXl2UkN8.js → timelineViewConfig-Dl3AXO45.js} +1 -1
- package/dist/Gantt/utils/index.js +5 -5
- package/dist/Gantt/utils/theme/index.js +2 -0
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/InputTag-CGQ5dXyf.js +143 -0
- package/dist/InputTag/index.js +3 -2
- package/dist/Loading/index.js +1 -1
- package/dist/Modal/{Modal-D3LFqIV4.js → Modal-GGHNlZv3.js} +1 -1
- package/dist/Modal/index.js +2 -2
- package/dist/NotFoundContent/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/ScrollBar/ScrollBar-CSGBOE3e.js +68 -0
- package/dist/ScrollBar/index.js +2 -0
- package/dist/Segmented/{Segmented-BTW445jc.js → Segmented-CzVKrL6o.js} +1 -1
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-OjCjCogR.js → Select-B0r9VgF6.js} +199 -200
- package/dist/Select/{SelectInputSearch-DXPTGSc2.js → SelectInputSearch-BDwg-Noi.js} +2 -2
- package/dist/Select/index.js +12 -11
- package/dist/Table/Table-BtH9Oa14.js +545 -0
- package/dist/Table/hooks/index.js +1 -1
- package/dist/Table/{hooks-CJ2CnSep.js → hooks-DK8Pf7iH.js} +1 -1
- package/dist/Table/index.js +8 -7
- package/dist/Table/{processRowspan-BCzfI5un.js → processRowspan-D4uv6zLk.js} +1 -1
- package/dist/Table/style/index.js +2 -0
- package/dist/Table/style-BwcnT2ee.js +9 -0
- package/dist/Table/utils/index.js +1 -1
- package/dist/Tabs/{Tabs-DVQcB3YG.js → Tabs-7wEcxUv6.js} +4 -4
- package/dist/Tabs/index.js +4 -4
- package/dist/Tooltip/{Tooltip-DW_XP13m.js → Tooltip-B_SZOy6k.js} +41 -44
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tree/index.js +4 -4
- package/dist/components/DropDown/index.d.ts +1 -0
- package/dist/components/DropDown/interface.d.ts +45 -0
- package/dist/components/DropDown/style/__tests__/resolveDropDownThemeVars.test.d.ts +1 -0
- package/dist/components/DropDown/style/index.d.ts +1 -0
- package/dist/components/DropDown/style/resolveDropDownThemeVars.d.ts +2 -0
- package/dist/components/Gantt/Gantt.d.ts +1 -1
- package/dist/components/Gantt/GanttChart/hooks/useEdgeScroll.d.ts +1 -1
- package/dist/components/Gantt/GanttTable/GanttTable.d.ts +1 -1
- package/dist/components/Gantt/GanttThemeContext.d.ts +3 -0
- package/dist/components/Gantt/index.d.ts +2 -1
- package/dist/components/Gantt/interface.d.ts +39 -0
- package/dist/components/Gantt/internal/GanttLayout.d.ts +1 -1
- package/dist/components/Gantt/types.internal.d.ts +2 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttTheme.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveGanttThemeVars.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/__tests__/resolveTableThemeFromGantt.test.d.ts +1 -0
- package/dist/components/Gantt/utils/theme/index.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttTheme.d.ts +3 -0
- package/dist/components/Gantt/utils/theme/resolveGanttThemeVars.d.ts +5 -0
- package/dist/components/Gantt/utils/theme/resolveTableThemeFromGantt.d.ts +4 -0
- package/dist/components/ScrollBar/ScrollBar.d.ts +3 -0
- package/dist/components/ScrollBar/__tests__/ScrollBar.test.d.ts +1 -0
- package/dist/components/ScrollBar/index.d.ts +3 -0
- package/dist/components/ScrollBar/interface.d.ts +23 -0
- package/dist/components/Table/index.d.ts +2 -1
- package/dist/components/Table/interface.d.ts +17 -0
- package/dist/components/Table/style/__tests__/resolveTableThemeVars.test.d.ts +1 -0
- package/dist/components/Table/style/index.d.ts +1 -0
- package/dist/components/Table/style/resolveTableThemeVars.d.ts +3 -0
- package/dist/components/index.d.ts +5 -2
- package/dist/index.js +50 -47
- package/dist/style.css +1 -1
- package/dist/utils/mergeRefs.d.ts +1 -0
- package/dist/vendors/{ConfigProvider-DwmA94S2.js → ConfigProvider-AQTr7T_c.js} +1 -1
- package/dist/vendors/{Tree-C7BgkjCQ.js → Tree-DqnOGJtB.js} +3 -3
- package/dist/vendors/mergeRefs-TiJ0xjUN.js +9 -0
- package/dist/vendors/{useLocale-BTz4slNW.js → useLocale-DZ8XW2VL.js} +1 -1
- package/package.json +1 -2
- package/dist/DropDown/DropDown-CvQAbsEo.js +0 -168
- package/dist/Gantt/GanttToolBar-D5pQdrzv.js +0 -105
- package/dist/InputTag/InputTag-zP5QdId7.js +0 -139
- package/dist/Table/Table-3-kFIm5v.js +0 -543
- /package/dist/Amap/{AmapContext-JaYk1a3H.js → AmapContext-CFmsMycg.js} +0 -0
- /package/dist/Amap/{useMarkerInfoWindowController-CRgf2I0Q.js → useMarkerInfoWindowController-G-Bg-NDJ.js} +0 -0
- /package/dist/Calendar/{TimeAxis-cK2_3FeM.js → TimeAxis-Chwxo6Yj.js} +0 -0
- /package/dist/Calendar/{colorUtils-DcpqM3KR.js → colorUtils-FNbm3zBQ.js} +0 -0
- /package/dist/Calendar/{context-DNOJ9LW_.js → context-CzS6P3nk.js} +0 -0
- /package/dist/Calendar/{layout-CaPxiRd-.js → layout-Cb39seCc.js} +0 -0
- /package/dist/DatePicker/{ensureDayjsPlugins-C3aqki6i.js → ensureDayjsPlugins-DxqbKqon.js} +0 -0
- /package/dist/DatePicker/{pickerLocale-VqSP_iIm.js → pickerLocale-CtDOOxxD.js} +0 -0
- /package/dist/Gantt/{GanttHighlightContext-AIpN3-af.js → GanttHighlightContext-CtT98ZnK.js} +0 -0
- /package/dist/Gantt/{columnResize-By_1E48E.js → columnResize-DFe7F98O.js} +0 -0
- /package/dist/Gantt/{constants-D4ur8WRs.js → constants-CrBb5i5p.js} +0 -0
- /package/dist/Gantt/{highlightTarget-DmzCIiQb.js → highlightTarget-DtCe7zto.js} +0 -0
- /package/dist/Icon/{Icon-BQ3Whub2.js → Icon-SQ5tu-yG.js} +0 -0
- /package/dist/Loading/{Loading-WjmzBabh.js → Loading-ho-6d72M.js} +0 -0
- /package/dist/NotFoundContent/{NotFoundContent-7xV-zOG2.js → NotFoundContent-CV9fTylQ.js} +0 -0
- /package/dist/Radio/{Radio-DkrZHoG1.js → Radio-C2zJzZc3.js} +0 -0
- /package/dist/Table/{constants-CKqc9Os_.js → constants-CuBlYZLO.js} +0 -0
- /package/dist/vendors/{LocaleContext-BJdHS0sH.js → LocaleContext-CBcJzvUD.js} +0 -0
- /package/dist/vendors/{animations-BeI8JZp1.js → animations-Mlw78WYo.js} +0 -0
- /package/dist/vendors/{color-BeQo449h.js → color-BQYy0Wgy.js} +0 -0
- /package/dist/vendors/{cssVars-C4BlzyxA.js → cssVars-DoQgQ2CM.js} +0 -0
- /package/dist/vendors/{useFloatingOverlay-3KB88hpZ.js → useFloatingOverlay-WbbHmuT-.js} +0 -0
- /package/dist/vendors/{useFloatingPortal-DsEtsAGW.js → useFloatingPortal-B2SDNV5C.js} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { t as e } from "../
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
import { t as i } from "
|
|
5
|
-
import {
|
|
6
|
-
import { t as s } from "../
|
|
7
|
-
import { t as c } from "../
|
|
8
|
-
import { t as l } from "../
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
1
|
+
import { t as e } from "../ScrollBar/ScrollBar-CSGBOE3e.js";
|
|
2
|
+
import { t } from "../Icon/Icon-SQ5tu-yG.js";
|
|
3
|
+
import { t as n } from "../vendors/useLocale-DZ8XW2VL.js";
|
|
4
|
+
import { n as r, t as i } from "../vendors/animations-Mlw78WYo.js";
|
|
5
|
+
import { t as a } from "./SelectInputSearch-BDwg-Noi.js";
|
|
6
|
+
import { n as o, t as s } from "../vendors/Tree-DqnOGJtB.js";
|
|
7
|
+
import { t as c } from "../CheckBox/CheckBox-81R8QKHb.js";
|
|
8
|
+
import { t as l } from "../NotFoundContent/NotFoundContent-CV9fTylQ.js";
|
|
9
|
+
import { t as u } from "../vendors/useFloatingPortal-B2SDNV5C.js";
|
|
10
|
+
import { first as d, isArray as f, isEmpty as p, isNil as m, noop as h } from "lodash-es";
|
|
11
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
|
+
import { Suspense as y, createContext as b, forwardRef as x, memo as S, useCallback as C, useContext as w, useDeferredValue as T, useId as E, useImperativeHandle as ee, useLayoutEffect as te, useMemo as D, useRef as O, useState as k } from "react";
|
|
13
|
+
import { Input as A } from "antd";
|
|
13
14
|
import j from "clsx";
|
|
14
|
-
import { useControllableValue as
|
|
15
|
-
import { AnimatePresence as
|
|
16
|
-
import { FloatingPortal as
|
|
15
|
+
import { useControllableValue as ne, useHover as M, useToggle as re } from "ahooks";
|
|
16
|
+
import { AnimatePresence as ie, motion as N } from "motion/react";
|
|
17
|
+
import { FloatingPortal as ae } from "@floating-ui/react";
|
|
17
18
|
import P from "fuse.js";
|
|
18
|
-
import ae from "simplebar-react";
|
|
19
19
|
//#region src/components/Select/constants.ts
|
|
20
20
|
var F = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.SINGLE = "single", e.MULTIPLE = "multiple", e;
|
|
@@ -32,27 +32,27 @@ var F = /* @__PURE__ */ function(e) {
|
|
|
32
32
|
label: "label",
|
|
33
33
|
value: "value",
|
|
34
34
|
children: "children"
|
|
35
|
-
}, ce =
|
|
35
|
+
}, ce = b({
|
|
36
36
|
value: void 0,
|
|
37
|
-
setValue:
|
|
37
|
+
setValue: h,
|
|
38
38
|
isOpen: !1,
|
|
39
|
-
setIsOpen:
|
|
40
|
-
}), le =
|
|
39
|
+
setIsOpen: h
|
|
40
|
+
}), le = b({
|
|
41
41
|
fieldNames: {
|
|
42
42
|
label: "label",
|
|
43
43
|
value: "value",
|
|
44
44
|
children: "children"
|
|
45
45
|
},
|
|
46
46
|
disabled: !1
|
|
47
|
-
}), ue =
|
|
48
|
-
let e =
|
|
47
|
+
}), ue = b({}), L = () => {
|
|
48
|
+
let e = w(ce);
|
|
49
49
|
if (!e) throw Error("Select.* components must be used within a SelectStateContext provider");
|
|
50
50
|
return e;
|
|
51
51
|
}, R = () => {
|
|
52
|
-
let e =
|
|
52
|
+
let e = w(le);
|
|
53
53
|
if (!e) throw Error("Select.* components must be used within a SelectConfigContext provider");
|
|
54
54
|
return e;
|
|
55
|
-
}, z = () =>
|
|
55
|
+
}, z = () => w(ue);
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/Select/utils/fieldAccessor.ts
|
|
58
58
|
function B(e) {
|
|
@@ -74,12 +74,12 @@ function B(e) {
|
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/components/Select/SelectInput/SelectSingleInput/SelectSingleInput.tsx
|
|
77
|
-
var V =
|
|
78
|
-
let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = R(), { isSelectedOtherOption: a, otherOptionValue: o } = z(), s = B(r), c =
|
|
79
|
-
return l = a && o && i === "inline" ? o : e.labelRender && c ? e.labelRender(c) : c ? s.getLabel(c) : "", /* @__PURE__ */
|
|
77
|
+
var V = S((e) => {
|
|
78
|
+
let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = R(), { isSelectedOtherOption: a, otherOptionValue: o } = z(), s = B(r), c = d(t), l;
|
|
79
|
+
return l = a && o && i === "inline" ? o : e.labelRender && c ? e.labelRender(c) : c ? s.getLabel(c) : "", /* @__PURE__ */ _("div", {
|
|
80
80
|
className: j("bsy-select-input-container__input-value overflow-hidden"),
|
|
81
81
|
style: n,
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ _("div", {
|
|
83
83
|
className: "bsy-select-input-container__input-value-text",
|
|
84
84
|
children: l
|
|
85
85
|
})
|
|
@@ -93,7 +93,7 @@ var H = {
|
|
|
93
93
|
"bsy-input-tag__item": "_bsy-input-tag__item_znvs6_7",
|
|
94
94
|
"bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_znvs6_20",
|
|
95
95
|
"bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_znvs6_24"
|
|
96
|
-
}, U =
|
|
96
|
+
}, U = x(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ _("div", {
|
|
97
97
|
"data-bsy-input-tag": "true",
|
|
98
98
|
className: j({
|
|
99
99
|
[H["bsy-input-tag__item"]]: !0,
|
|
@@ -103,7 +103,7 @@ var H = {
|
|
|
103
103
|
style: t,
|
|
104
104
|
children: e
|
|
105
105
|
}));
|
|
106
|
-
U.Container = (e) => /* @__PURE__ */
|
|
106
|
+
U.Container = (e) => /* @__PURE__ */ _("div", {
|
|
107
107
|
className: j(H["bsy-input-tag__container"]),
|
|
108
108
|
children: e.children
|
|
109
109
|
}), U.displayName = "BsyOptionTag";
|
|
@@ -115,9 +115,9 @@ var W = "_select_multiple_input__container_8pd2n_1", G = "_select_multiple_input
|
|
|
115
115
|
select_multiple_input__close_btn: K,
|
|
116
116
|
"select_multiple_input__close_btn--disabled": "_select_multiple_input__close_btn--disabled_8pd2n_21",
|
|
117
117
|
select_multiple_input__tag_content: q
|
|
118
|
-
}, Y = 4, X =
|
|
119
|
-
let { value: n, labelRender: r, tagStyle: i } =
|
|
120
|
-
|
|
118
|
+
}, Y = 4, X = S((e) => {
|
|
119
|
+
let { value: n, labelRender: r, tagStyle: i } = e, { setValue: a } = L(), { fieldNames: o, disabled: s } = R(), c = B(o), l = n?.length ?? 0, [u, d] = k(0), f = O(null), p = O(null);
|
|
120
|
+
te(() => {
|
|
121
121
|
if (!f.current) return;
|
|
122
122
|
let e = new ResizeObserver((e) => {
|
|
123
123
|
let t = e[0];
|
|
@@ -141,28 +141,28 @@ var W = "_select_multiple_input__container_8pd2n_1", G = "_select_multiple_input
|
|
|
141
141
|
u,
|
|
142
142
|
n.length
|
|
143
143
|
]);
|
|
144
|
-
let m = l - u, h =
|
|
144
|
+
let m = l - u, h = T(m), g = /* @__PURE__ */ _("div", {
|
|
145
145
|
className: `${J.select_multiple_input__measurement_layer} measure-list`,
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
let a = (
|
|
148
|
-
style:
|
|
146
|
+
children: /* @__PURE__ */ v(U.Container, { children: [n?.map((e, n) => {
|
|
147
|
+
let a = (e) => /* @__PURE__ */ _("div", {
|
|
148
|
+
style: e,
|
|
149
149
|
className: j(H["bsy-input-tag__item-icon"], "cursor-pointer"),
|
|
150
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ _(t, {
|
|
151
151
|
name: "close",
|
|
152
152
|
style: { fontSize: 12 },
|
|
153
153
|
className: J.select_multiple_input__close_btn
|
|
154
154
|
})
|
|
155
155
|
});
|
|
156
|
-
return /* @__PURE__ */
|
|
156
|
+
return /* @__PURE__ */ v(U, {
|
|
157
157
|
style: i,
|
|
158
|
-
children: [r && r(
|
|
158
|
+
children: [r && r(e, a), !r && /* @__PURE__ */ v("div", {
|
|
159
159
|
className: J.select_multiple_input__tag_content,
|
|
160
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ _("span", { children: c.getLabel(e) }), /* @__PURE__ */ _(a, {})]
|
|
161
161
|
})]
|
|
162
162
|
}, n);
|
|
163
|
-
}), u < l && h > 0 && /* @__PURE__ */
|
|
163
|
+
}), u < l && h > 0 && /* @__PURE__ */ v(U, {
|
|
164
164
|
ref: p,
|
|
165
|
-
children: [`+ ${m}`, /* @__PURE__ */
|
|
165
|
+
children: [`+ ${m}`, /* @__PURE__ */ _("span", {
|
|
166
166
|
className: "text-[#666]",
|
|
167
167
|
children: "..."
|
|
168
168
|
})]
|
|
@@ -172,41 +172,41 @@ var W = "_select_multiple_input__container_8pd2n_1", G = "_select_multiple_input
|
|
|
172
172
|
let t = n.filter((t) => c.getValue(t) !== c.getValue(e));
|
|
173
173
|
a(t.map((e) => c.getValue(e)), t);
|
|
174
174
|
};
|
|
175
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ v("div", {
|
|
176
176
|
ref: f,
|
|
177
177
|
className: j("bsy-select-input-container__input-value", J.select_multiple_input__container, "multiple"),
|
|
178
|
-
children: [
|
|
179
|
-
let a = (n) => /* @__PURE__ */
|
|
178
|
+
children: [g, /* @__PURE__ */ v(U.Container, { children: [n?.slice(0, u).map((e, n) => {
|
|
179
|
+
let a = (n) => /* @__PURE__ */ _("div", {
|
|
180
180
|
style: n,
|
|
181
181
|
className: j(H["bsy-input-tag__item-icon"], {
|
|
182
182
|
[J.select_multiple_input__close_btn]: !s,
|
|
183
183
|
[J.select_multiple_input__close_btn + "--disabled"]: s
|
|
184
184
|
}),
|
|
185
|
-
onClick: (
|
|
186
|
-
|
|
185
|
+
onClick: (t) => {
|
|
186
|
+
t.stopPropagation(), y(e);
|
|
187
187
|
},
|
|
188
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ _(t, {
|
|
189
189
|
name: "close",
|
|
190
190
|
style: { fontSize: 12 }
|
|
191
191
|
})
|
|
192
192
|
});
|
|
193
|
-
return /* @__PURE__ */
|
|
193
|
+
return /* @__PURE__ */ v(U, {
|
|
194
194
|
style: {
|
|
195
195
|
...i,
|
|
196
196
|
flexShrink: u === 1 ? 1 : 0
|
|
197
197
|
},
|
|
198
198
|
disabled: s,
|
|
199
|
-
children: [r && r(
|
|
199
|
+
children: [r && r(e, a), !r && /* @__PURE__ */ v("div", {
|
|
200
200
|
className: J.select_multiple_input__tag_content,
|
|
201
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ _("span", {
|
|
202
202
|
className: "truncate",
|
|
203
|
-
children: c.getLabel(
|
|
204
|
-
}), /* @__PURE__ */
|
|
203
|
+
children: c.getLabel(e)
|
|
204
|
+
}), /* @__PURE__ */ _(a, {})]
|
|
205
205
|
})]
|
|
206
206
|
}, n);
|
|
207
|
-
}), u < l && h > 0 && /* @__PURE__ */
|
|
207
|
+
}), u < l && h > 0 && /* @__PURE__ */ v(U, {
|
|
208
208
|
ref: p,
|
|
209
|
-
children: [`+ ${m} `, /* @__PURE__ */
|
|
209
|
+
children: [`+ ${m} `, /* @__PURE__ */ _("span", {
|
|
210
210
|
className: "text-[#666]",
|
|
211
211
|
children: "..."
|
|
212
212
|
})]
|
|
@@ -224,10 +224,10 @@ var de = (e, t) => {
|
|
|
224
224
|
});
|
|
225
225
|
};
|
|
226
226
|
return r(e), n;
|
|
227
|
-
}, fe = ({ placeholder:
|
|
228
|
-
let b =
|
|
229
|
-
if (
|
|
230
|
-
let e =
|
|
227
|
+
}, fe = ({ placeholder: e, mode: n, clearable: r, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: d, ghost: p, inputValueStyle: h, tagStyle: y }) => {
|
|
228
|
+
let b = O(null), x = M(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = L(), { fieldNames: T } = R(), E = D(() => {
|
|
229
|
+
if (m(C)) return [];
|
|
230
|
+
let e = f(C) ? C : [C];
|
|
231
231
|
if (l === I.TREE) {
|
|
232
232
|
let t = B(T), n = de(c, T);
|
|
233
233
|
return e.map((e) => n.find((n) => t.getValue(n) === e) || w?.(e)).filter((e) => !!e);
|
|
@@ -240,40 +240,40 @@ var de = (e, t) => {
|
|
|
240
240
|
T,
|
|
241
241
|
w
|
|
242
242
|
]);
|
|
243
|
-
return /* @__PURE__ */
|
|
243
|
+
return /* @__PURE__ */ _("div", {
|
|
244
244
|
className: j("bsy-select-input-container", {
|
|
245
245
|
disabled: o,
|
|
246
246
|
multiple: n === F.MULTIPLE,
|
|
247
247
|
active: S,
|
|
248
|
-
"ghost-style":
|
|
248
|
+
"ghost-style": p
|
|
249
249
|
}),
|
|
250
250
|
ref: b,
|
|
251
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: /* @__PURE__ */ v("div", {
|
|
252
252
|
className: j("bsy-select-input-container-input"),
|
|
253
253
|
children: [
|
|
254
|
-
u && /* @__PURE__ */
|
|
254
|
+
u && /* @__PURE__ */ _("div", {
|
|
255
255
|
className: "bsy-select-input-container-input-prefix",
|
|
256
256
|
children: u
|
|
257
257
|
}),
|
|
258
|
-
E?.length ? /* @__PURE__ */
|
|
258
|
+
E?.length ? /* @__PURE__ */ v(g, { children: [n === F.SINGLE && /* @__PURE__ */ _(V, {
|
|
259
259
|
value: E,
|
|
260
260
|
labelRender: s,
|
|
261
|
-
inputValueStyle:
|
|
262
|
-
}), n === F.MULTIPLE && /* @__PURE__ */
|
|
261
|
+
inputValueStyle: h
|
|
262
|
+
}), n === F.MULTIPLE && /* @__PURE__ */ _(X, {
|
|
263
263
|
value: E,
|
|
264
264
|
labelRender: s,
|
|
265
265
|
tagStyle: y
|
|
266
|
-
})] }) : /* @__PURE__ */
|
|
266
|
+
})] }) : /* @__PURE__ */ _("div", {
|
|
267
267
|
className: "bsy-select-input-container__input-value-placeholder truncate",
|
|
268
|
-
children:
|
|
268
|
+
children: e
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _("div", {
|
|
271
271
|
className: j("bsy-select-input-container__icon"),
|
|
272
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: /* @__PURE__ */ _(ie, {
|
|
273
273
|
mode: "wait",
|
|
274
|
-
children: E?.length &&
|
|
275
|
-
...
|
|
276
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: E?.length && r && x ? /* @__PURE__ */ _(N.div, {
|
|
275
|
+
...i,
|
|
276
|
+
children: /* @__PURE__ */ _(t, {
|
|
277
277
|
name: "cancel",
|
|
278
278
|
className: "icon hover:text-[#0265ff] text-[#666]",
|
|
279
279
|
role: "button",
|
|
@@ -282,9 +282,9 @@ var de = (e, t) => {
|
|
|
282
282
|
e.stopPropagation(), a?.();
|
|
283
283
|
}
|
|
284
284
|
})
|
|
285
|
-
}, "cancel") : /* @__PURE__ */
|
|
286
|
-
...
|
|
287
|
-
children:
|
|
285
|
+
}, "cancel") : /* @__PURE__ */ _(N.div, {
|
|
286
|
+
...i,
|
|
287
|
+
children: d ? d(S, o) : /* @__PURE__ */ _(t, {
|
|
288
288
|
name: "arrow-down",
|
|
289
289
|
className: j("icon", {
|
|
290
290
|
active: S,
|
|
@@ -302,13 +302,13 @@ var de = (e, t) => {
|
|
|
302
302
|
fe.displayName = "BsySelectInput";
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region src/components/Select/OptionList/SingleOptionList/SingleOptionList.tsx
|
|
305
|
-
var Z =
|
|
306
|
-
let { options: t, value: n, onSelect: r, searchValue: i = "", fieldNames:
|
|
307
|
-
return /* @__PURE__ */
|
|
305
|
+
var Z = S((e) => {
|
|
306
|
+
let { options: t, value: n, onSelect: r, searchValue: i = "", fieldNames: a, optionRender: s, optionStyle: c } = e, { otherInputPosition: l } = R(), { otherOptionValue: u, setOtherOptionValue: d, onOtherInputChange: f, isSelectedOtherOption: p = !1 } = z(), m = O(null), h = B(a);
|
|
307
|
+
return /* @__PURE__ */ _("ul", {
|
|
308
308
|
role: "listbox",
|
|
309
309
|
children: t.map((e, t) => {
|
|
310
|
-
let
|
|
311
|
-
return /* @__PURE__ */
|
|
310
|
+
let a = h.getValue(e), g = h.getLabel(e), y = e.systemField || !1, b = e.isOther === !0, x = b && l === "inline" && g.length > 6 ? g.slice(0, 6) + "..." : g, S = b ? p : a === n;
|
|
311
|
+
return /* @__PURE__ */ v("li", {
|
|
312
312
|
role: "option",
|
|
313
313
|
"aria-selected": S,
|
|
314
314
|
className: j("cursor-pointer rounded-[4px] py-[7px] px-[10px] min-h-[34px]", {
|
|
@@ -319,19 +319,19 @@ var Z = x((e) => {
|
|
|
319
319
|
}),
|
|
320
320
|
style: c,
|
|
321
321
|
onClick: () => {
|
|
322
|
-
r(
|
|
322
|
+
r(a, e);
|
|
323
323
|
},
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
-
title:
|
|
326
|
-
children: s ? s(e, { index: t }, S) : /* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ _("div", {
|
|
325
|
+
title: g,
|
|
326
|
+
children: s ? s(e, { index: t }, S) : /* @__PURE__ */ _(o, {
|
|
327
327
|
text: x,
|
|
328
328
|
highlight: i
|
|
329
329
|
})
|
|
330
|
-
}), b && l === "inline" && /* @__PURE__ */
|
|
330
|
+
}), b && l === "inline" && /* @__PURE__ */ _("div", {
|
|
331
331
|
className: "ml-2 flex-1",
|
|
332
332
|
onClick: (e) => e.stopPropagation(),
|
|
333
333
|
style: { minWidth: "146px" },
|
|
334
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ _(A, {
|
|
335
335
|
ref: m,
|
|
336
336
|
value: u,
|
|
337
337
|
onChange: (e) => {
|
|
@@ -339,15 +339,15 @@ var Z = x((e) => {
|
|
|
339
339
|
d?.(t), f?.(t);
|
|
340
340
|
},
|
|
341
341
|
onPressEnter: () => {
|
|
342
|
-
u && r(
|
|
342
|
+
u && r(a, e);
|
|
343
343
|
},
|
|
344
344
|
onBlur: () => {
|
|
345
|
-
u && r(
|
|
345
|
+
u && r(a, e);
|
|
346
346
|
},
|
|
347
347
|
placeholder: "请输入内容"
|
|
348
348
|
})
|
|
349
349
|
})]
|
|
350
|
-
}, `${
|
|
350
|
+
}, `${a}-${t}`);
|
|
351
351
|
})
|
|
352
352
|
});
|
|
353
353
|
});
|
|
@@ -355,41 +355,41 @@ Z.displayName = "BsySingleSelect";
|
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/components/Select/OptionList/MultOptionList/MultOptionList.tsx
|
|
357
357
|
var Q = (e) => {
|
|
358
|
-
let { t
|
|
359
|
-
return /* @__PURE__ */
|
|
358
|
+
let { t } = n(), { options: r, searchValue: i = "", value: a, onSelect: s, fieldNames: l, optionRender: u } = e, d = B(l), f = a || [], p = r.filter((e) => !e.isOther), m = p.length > 0 && p.every((e) => f.includes(d.getValue(e)));
|
|
359
|
+
return /* @__PURE__ */ _("div", {
|
|
360
360
|
className: "bsy-multiple-select",
|
|
361
|
-
children: /* @__PURE__ */
|
|
361
|
+
children: /* @__PURE__ */ v("ul", {
|
|
362
362
|
className: "bsy-multiple-select-list",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ _("li", {
|
|
364
364
|
className: j("flex items-center gap-[8px]", "cursor-pointer hover:bg-[#eff0f6] rounded-[4px] min-h-[34px]", "bsy-multiple-select-item"),
|
|
365
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ _(c, {
|
|
366
366
|
checked: m,
|
|
367
367
|
onChange: () => {
|
|
368
|
-
|
|
368
|
+
s(m ? [] : p.map((e) => d.getValue(e)), m ? [] : p.filter((e) => f.includes(d.getValue(e))));
|
|
369
369
|
},
|
|
370
370
|
indeterminate: f.length > 0 && f.length < p.length,
|
|
371
371
|
style: { padding: "7px 10px" },
|
|
372
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ _("span", {
|
|
373
373
|
className: "font-bold text-[#0265ff]",
|
|
374
|
-
children:
|
|
374
|
+
children: t(i ? "allSelectedBySearch" : "allSelect")
|
|
375
375
|
})
|
|
376
376
|
})
|
|
377
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ _(c.Group, {
|
|
378
378
|
value: f,
|
|
379
379
|
onChange: (e) => {
|
|
380
|
-
|
|
380
|
+
s(e, p.filter((t) => e.includes(d.getValue(t))));
|
|
381
381
|
},
|
|
382
382
|
children: p.map((e, t) => {
|
|
383
|
-
let n = d.getValue(e), r = d.getLabel(e),
|
|
384
|
-
return /* @__PURE__ */
|
|
383
|
+
let n = d.getValue(e), r = d.getLabel(e), a = f.includes(n), s = e.systemField || !1;
|
|
384
|
+
return /* @__PURE__ */ _("li", {
|
|
385
385
|
className: j("flex items-center gap-[8px] min-h-[34px]", "cursor-pointer rounded-[4px]", "bsy-multiple-select-item", {
|
|
386
386
|
"hover:bg-[#eff0f6]": !0,
|
|
387
|
-
"text-[#4d609f]":
|
|
387
|
+
"text-[#4d609f]": s && !a
|
|
388
388
|
}),
|
|
389
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ _(c, {
|
|
390
390
|
value: n,
|
|
391
391
|
style: { padding: "7px 10px" },
|
|
392
|
-
children: u ? u(e, { index: t },
|
|
392
|
+
children: u ? u(e, { index: t }, a) : /* @__PURE__ */ _(o, {
|
|
393
393
|
text: r,
|
|
394
394
|
highlight: i
|
|
395
395
|
})
|
|
@@ -405,11 +405,11 @@ Q.displayName = "BsyMultipleSelect";
|
|
|
405
405
|
//#region src/components/Select/OptionList/TreeOptionList/TreeOptionList.tsx
|
|
406
406
|
var pe = (e) => {
|
|
407
407
|
let { options: t, searchValue: n, value: r, onSelect: i, fieldNames: a } = e;
|
|
408
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ _("div", {
|
|
409
409
|
className: "bsy-tree-select",
|
|
410
|
-
children: /* @__PURE__ */
|
|
410
|
+
children: /* @__PURE__ */ _("div", {
|
|
411
411
|
className: "bsy-tree-select-nodes",
|
|
412
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ _(s, {
|
|
413
413
|
data: t,
|
|
414
414
|
searchValue: n,
|
|
415
415
|
fieldNames: a ? {
|
|
@@ -438,48 +438,48 @@ var pe = (e) => {
|
|
|
438
438
|
}
|
|
439
439
|
return e;
|
|
440
440
|
}, []), he = (e) => {
|
|
441
|
-
let { options:
|
|
442
|
-
|
|
441
|
+
let { options: t = [], searchValue: r = "", type: i, filterOption: a, optionRender: o, optionStyle: s } = e, { t: c } = n(), { value: u, setIsOpen: d, setValue: f } = L(), { fieldNames: m } = R(), h = D(() => i === I.TREE ? me(t, m) : t, [
|
|
442
|
+
t,
|
|
443
443
|
m,
|
|
444
444
|
i
|
|
445
|
-
]), v =
|
|
445
|
+
]), v = D(() => new P(h, {
|
|
446
446
|
keys: [m.label],
|
|
447
447
|
ignoreLocation: !0,
|
|
448
448
|
threshold: .3
|
|
449
|
-
}), [
|
|
450
|
-
d?.(!1),
|
|
451
|
-
}, [d,
|
|
452
|
-
|
|
453
|
-
}, [
|
|
454
|
-
d?.(!1),
|
|
455
|
-
}, [d,
|
|
456
|
-
if (!a ||
|
|
457
|
-
let e = v.search(r),
|
|
458
|
-
return i === I.TREE ? $(
|
|
449
|
+
}), [h, m]), y = C((e, t) => {
|
|
450
|
+
d?.(!1), f(e, t);
|
|
451
|
+
}, [d, f]), b = C((e, t) => {
|
|
452
|
+
f(e, t);
|
|
453
|
+
}, [f]), x = C((e, t) => {
|
|
454
|
+
d?.(!1), f(e, t);
|
|
455
|
+
}, [d, f]), S = () => {
|
|
456
|
+
if (!a || p(r)) return t;
|
|
457
|
+
let e = v.search(r), n = new Set(e.map((e) => e.item[m.value]));
|
|
458
|
+
return i === I.TREE ? $(t, n, m) : t.filter((e) => n.has(e[m.value]));
|
|
459
459
|
};
|
|
460
|
-
return /* @__PURE__ */ g
|
|
460
|
+
return /* @__PURE__ */ _(g, { children: (() => {
|
|
461
461
|
let e = {
|
|
462
|
-
options:
|
|
462
|
+
options: S(),
|
|
463
463
|
searchValue: r,
|
|
464
464
|
optionStyle: s
|
|
465
465
|
};
|
|
466
|
-
if (!
|
|
466
|
+
if (!p(r) && e.options.length === 0) return /* @__PURE__ */ _(l, { text: c("noDataFound") });
|
|
467
467
|
switch (i) {
|
|
468
|
-
case I.SINGLE: return /* @__PURE__ */
|
|
468
|
+
case I.SINGLE: return /* @__PURE__ */ _(Z, {
|
|
469
469
|
...e,
|
|
470
470
|
value: u,
|
|
471
471
|
fieldNames: m,
|
|
472
472
|
onSelect: y,
|
|
473
473
|
optionRender: o
|
|
474
474
|
});
|
|
475
|
-
case I.MULTIPLE: return /* @__PURE__ */
|
|
475
|
+
case I.MULTIPLE: return /* @__PURE__ */ _(Q, {
|
|
476
476
|
...e,
|
|
477
477
|
value: u,
|
|
478
478
|
fieldNames: m,
|
|
479
479
|
onSelect: b,
|
|
480
480
|
optionRender: o
|
|
481
481
|
});
|
|
482
|
-
case I.TREE: return /* @__PURE__ */
|
|
482
|
+
case I.TREE: return /* @__PURE__ */ _(pe, {
|
|
483
483
|
...e,
|
|
484
484
|
value: u,
|
|
485
485
|
fieldNames: m,
|
|
@@ -488,34 +488,33 @@ var pe = (e) => {
|
|
|
488
488
|
default: return null;
|
|
489
489
|
}
|
|
490
490
|
})() });
|
|
491
|
-
}, ge = (
|
|
492
|
-
let { options:
|
|
493
|
-
|
|
494
|
-
},
|
|
495
|
-
searchValue:
|
|
496
|
-
options:
|
|
497
|
-
type:
|
|
498
|
-
filterOption:
|
|
499
|
-
optionRender:
|
|
500
|
-
optionStyle:
|
|
501
|
-
}),
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
children: /* @__PURE__ */ g("div", {
|
|
491
|
+
}, ge = (t) => {
|
|
492
|
+
let { options: i = [], type: o = I.SINGLE, filterOption: s = !0, onSearch: c, showSearch: u, searchPlaceholder: d, onPopupScroll: f } = t, { t: p } = n(), { searchValue: m = "", setSearchValue: h } = L(), g = T(m), b = (e) => {
|
|
493
|
+
h?.(e), c?.(e);
|
|
494
|
+
}, x = () => t.fetching ? /* @__PURE__ */ _(l, { text: p("dataSearching") }) : i.length === 0 && !m ? /* @__PURE__ */ _(l, { text: p("noData") }) : /* @__PURE__ */ _(he, {
|
|
495
|
+
searchValue: g,
|
|
496
|
+
options: i,
|
|
497
|
+
type: o,
|
|
498
|
+
filterOption: s,
|
|
499
|
+
optionRender: t.optionRender,
|
|
500
|
+
optionStyle: t.optionStyle
|
|
501
|
+
}), S = C((e) => {
|
|
502
|
+
f?.(e);
|
|
503
|
+
}, [f]);
|
|
504
|
+
return /* @__PURE__ */ _(N.div, {
|
|
505
|
+
...r,
|
|
506
|
+
children: /* @__PURE__ */ _("div", {
|
|
508
507
|
className: "bsy-select-panel",
|
|
509
|
-
children: /* @__PURE__ */
|
|
510
|
-
value:
|
|
511
|
-
onChange:
|
|
512
|
-
searchPlaceholder:
|
|
513
|
-
}), /* @__PURE__ */
|
|
514
|
-
className: j({ "pt-[4px]":
|
|
515
|
-
children: /* @__PURE__ */
|
|
508
|
+
children: /* @__PURE__ */ v(y, { children: [u && /* @__PURE__ */ _(a, {
|
|
509
|
+
value: m,
|
|
510
|
+
onChange: b,
|
|
511
|
+
searchPlaceholder: d
|
|
512
|
+
}), /* @__PURE__ */ _("div", {
|
|
513
|
+
className: j({ "pt-[4px]": u }),
|
|
514
|
+
children: /* @__PURE__ */ _(e, {
|
|
516
515
|
style: { maxHeight: 300 },
|
|
517
|
-
onScroll:
|
|
518
|
-
children:
|
|
516
|
+
onScroll: S,
|
|
517
|
+
children: x()
|
|
519
518
|
})
|
|
520
519
|
})] })
|
|
521
520
|
})
|
|
@@ -524,18 +523,18 @@ var pe = (e) => {
|
|
|
524
523
|
ge.displayName = "BsySelectPanel";
|
|
525
524
|
//#endregion
|
|
526
525
|
//#region src/components/Select/Select.tsx
|
|
527
|
-
var _e =
|
|
528
|
-
let { options: r = [], type: i = I.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender:
|
|
529
|
-
defaultValue:
|
|
526
|
+
var _e = x((e, t) => {
|
|
527
|
+
let { options: r = [], type: i = I.SINGLE, fieldNames: a, clearable: o = !0, disabled: s = !1, placeholder: c, labelRender: l, onOtherInputChange: d, onOpenChange: f, onPopupScroll: p, prefix: m, suffixIcon: h, ghost: y, inputValueStyle: b, tagStyle: x, zIndex: S = 1101, zIndexMask: w = 1100, otherInputPosition: T = "bottom", popupMinWidth: te, getPopupContainer: A } = e, M = oe[i], { t: N } = n(), P = E(), { onChange: L } = e, R = a || se, [z, B] = ne(e, {
|
|
528
|
+
defaultValue: M === F.SINGLE ? void 0 : [],
|
|
530
529
|
defaultValuePropName: "defaultValue",
|
|
531
530
|
valuePropName: "value",
|
|
532
531
|
trigger: "__NO_CUSTOM_CHANGE__"
|
|
533
|
-
}), [V, H] =
|
|
534
|
-
if (
|
|
532
|
+
}), [V, H] = k(""), U = O(/* @__PURE__ */ new Map()), [W, G] = k(() => {
|
|
533
|
+
if (M === F.SINGLE) {
|
|
535
534
|
let e = r.every((e) => e[R.value] !== z), t = r.find((e) => e.isOther === !0);
|
|
536
535
|
return e && t ? z : void 0;
|
|
537
536
|
}
|
|
538
|
-
}), K =
|
|
537
|
+
}), K = C((e, t) => {
|
|
539
538
|
if (B(e), t) {
|
|
540
539
|
let n = /* @__PURE__ */ new Map();
|
|
541
540
|
if (Array.isArray(e)) {
|
|
@@ -552,14 +551,14 @@ var _e = b((e, n) => {
|
|
|
552
551
|
L,
|
|
553
552
|
B,
|
|
554
553
|
R
|
|
555
|
-
]), [q, { set: J }] =
|
|
554
|
+
]), [q, { set: J }] = re(!1), Y = C((e) => {
|
|
556
555
|
e !== q && (J(e), f?.(e));
|
|
557
556
|
}, [
|
|
558
557
|
J,
|
|
559
558
|
f,
|
|
560
559
|
q
|
|
561
|
-
]), { isSelectedOtherOption: X, shouldShowOtherInput: de } =
|
|
562
|
-
if (
|
|
560
|
+
]), { isSelectedOtherOption: X, shouldShowOtherInput: de } = D(() => {
|
|
561
|
+
if (M === F.MULTIPLE) return {
|
|
563
562
|
isSelectedOtherOption: !1,
|
|
564
563
|
shouldShowOtherInput: !1
|
|
565
564
|
};
|
|
@@ -578,10 +577,10 @@ var _e = b((e, n) => {
|
|
|
578
577
|
z,
|
|
579
578
|
r,
|
|
580
579
|
R,
|
|
581
|
-
|
|
582
|
-
]), Z =
|
|
580
|
+
M
|
|
581
|
+
]), Z = C(() => {
|
|
583
582
|
if (z) {
|
|
584
|
-
if (
|
|
583
|
+
if (M === F.SINGLE) {
|
|
585
584
|
let e = r.every((e) => e[R.value] !== z), t = r.find((e) => e.isOther === !0);
|
|
586
585
|
if (e && t) return t[R.value];
|
|
587
586
|
}
|
|
@@ -591,8 +590,8 @@ var _e = b((e, n) => {
|
|
|
591
590
|
z,
|
|
592
591
|
r,
|
|
593
592
|
R,
|
|
594
|
-
|
|
595
|
-
]), Q =
|
|
593
|
+
M
|
|
594
|
+
]), Q = D(() => ({
|
|
596
595
|
value: Z(),
|
|
597
596
|
setValue: K,
|
|
598
597
|
isOpen: q,
|
|
@@ -606,15 +605,15 @@ var _e = b((e, n) => {
|
|
|
606
605
|
q,
|
|
607
606
|
Y,
|
|
608
607
|
V
|
|
609
|
-
]), pe =
|
|
608
|
+
]), pe = D(() => ({
|
|
610
609
|
fieldNames: a || se,
|
|
611
610
|
disabled: s,
|
|
612
|
-
otherInputPosition:
|
|
611
|
+
otherInputPosition: T
|
|
613
612
|
}), [
|
|
614
613
|
a,
|
|
615
614
|
s,
|
|
616
|
-
|
|
617
|
-
]), me =
|
|
615
|
+
T
|
|
616
|
+
]), me = D(() => ({
|
|
618
617
|
isSelectedOtherOption: X,
|
|
619
618
|
otherOptionValue: W,
|
|
620
619
|
setOtherOptionValue: G,
|
|
@@ -624,47 +623,47 @@ var _e = b((e, n) => {
|
|
|
624
623
|
W,
|
|
625
624
|
G,
|
|
626
625
|
d
|
|
627
|
-
]), { refs: $, floatingStyles: he, getReferenceProps: _e, getFloatingProps: ve, referenceStyle: ye } =
|
|
626
|
+
]), { refs: $, floatingStyles: he, getReferenceProps: _e, getFloatingProps: ve, referenceStyle: ye } = u({
|
|
628
627
|
isOpen: q,
|
|
629
628
|
close: () => {
|
|
630
629
|
Y(!1);
|
|
631
630
|
},
|
|
632
631
|
showMask: e.showMask,
|
|
633
|
-
zIndex:
|
|
632
|
+
zIndex: S,
|
|
634
633
|
zIndexMask: w,
|
|
635
|
-
popupMinWidth:
|
|
634
|
+
popupMinWidth: te,
|
|
636
635
|
offset: {
|
|
637
636
|
x: 0,
|
|
638
637
|
y: 4
|
|
639
638
|
}
|
|
640
|
-
}), be =
|
|
641
|
-
let e = q ?
|
|
639
|
+
}), be = D(() => {
|
|
640
|
+
let e = q ? A?.() : void 0;
|
|
642
641
|
return e?.nodeType === 1 ? e : void 0;
|
|
643
|
-
}, [q,
|
|
644
|
-
X && (G(""), d?.("")), Y(!1), U.current.clear(), K(
|
|
642
|
+
}, [q, A]), xe = be ? "custom-popup-container" : "default-popup-container", Se = C(() => {
|
|
643
|
+
X && (G(""), d?.("")), Y(!1), U.current.clear(), K(M === F.SINGLE ? void 0 : []);
|
|
645
644
|
}, [
|
|
646
645
|
X,
|
|
647
646
|
d,
|
|
648
647
|
K,
|
|
649
|
-
|
|
648
|
+
M,
|
|
650
649
|
Y
|
|
651
650
|
]);
|
|
652
|
-
return
|
|
651
|
+
return ee(t, () => ({
|
|
653
652
|
getOtherOptionValue: () => W,
|
|
654
653
|
setOtherOptionValue: (e) => {
|
|
655
654
|
G(e), d?.(e);
|
|
656
655
|
}
|
|
657
|
-
}), [W, d]), /* @__PURE__ */
|
|
656
|
+
}), [W, d]), /* @__PURE__ */ _(ce.Provider, {
|
|
658
657
|
value: Q,
|
|
659
|
-
children: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ _(le.Provider, {
|
|
660
659
|
value: pe,
|
|
661
|
-
children: /* @__PURE__ */
|
|
660
|
+
children: /* @__PURE__ */ _(ue.Provider, {
|
|
662
661
|
value: me,
|
|
663
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ v("div", {
|
|
664
663
|
className: j("bsy-select-container text-sm", e.className),
|
|
665
664
|
style: e.style,
|
|
666
665
|
children: [
|
|
667
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ _("div", {
|
|
668
667
|
ref: $.setReference,
|
|
669
668
|
className: j("bsy-select-input-event", e.inputClassName),
|
|
670
669
|
..._e(),
|
|
@@ -675,50 +674,50 @@ var _e = b((e, n) => {
|
|
|
675
674
|
role: "combobox",
|
|
676
675
|
"aria-expanded": q,
|
|
677
676
|
"aria-haspopup": "listbox",
|
|
678
|
-
"aria-controls":
|
|
677
|
+
"aria-controls": P,
|
|
679
678
|
"aria-disabled": s,
|
|
680
|
-
children: /* @__PURE__ */
|
|
681
|
-
mode:
|
|
679
|
+
children: /* @__PURE__ */ _(fe, {
|
|
680
|
+
mode: M,
|
|
682
681
|
clearable: o,
|
|
683
682
|
disabled: s,
|
|
684
|
-
placeholder: c ||
|
|
685
|
-
labelRender:
|
|
683
|
+
placeholder: c || N("select"),
|
|
684
|
+
labelRender: l,
|
|
686
685
|
options: r,
|
|
687
686
|
type: i,
|
|
688
687
|
prefix: m,
|
|
689
|
-
suffixIcon:
|
|
688
|
+
suffixIcon: h,
|
|
690
689
|
ghost: y,
|
|
691
690
|
inputValueStyle: b,
|
|
692
691
|
tagStyle: x,
|
|
693
692
|
onClear: Se
|
|
694
693
|
})
|
|
695
694
|
}),
|
|
696
|
-
/* @__PURE__ */
|
|
695
|
+
/* @__PURE__ */ _(ae, {
|
|
697
696
|
root: be,
|
|
698
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ _(ie, { children: q && /* @__PURE__ */ v(g, { children: [e.showMask && /* @__PURE__ */ _("div", {
|
|
699
698
|
className: "bsy-select-mask",
|
|
700
699
|
style: { zIndex: w }
|
|
701
|
-
}), /* @__PURE__ */
|
|
700
|
+
}), /* @__PURE__ */ _("div", {
|
|
702
701
|
ref: $.setFloating,
|
|
703
702
|
style: he,
|
|
704
703
|
...ve(),
|
|
705
|
-
id:
|
|
706
|
-
children: /* @__PURE__ */
|
|
704
|
+
id: P,
|
|
705
|
+
children: /* @__PURE__ */ _(ge, {
|
|
707
706
|
...e,
|
|
708
707
|
options: r,
|
|
709
708
|
onPopupScroll: p
|
|
710
709
|
})
|
|
711
710
|
})] }) })
|
|
712
711
|
}, xe),
|
|
713
|
-
de &&
|
|
712
|
+
de && T === "bottom" ? e.otherOptionRender ? e.otherOptionRender(W, r) : /* @__PURE__ */ _("div", {
|
|
714
713
|
className: j("mt-[6px] w-full px-[10px] py-[7px] bg-white rounded-[4px]", "border border-[#e0e0e0]"),
|
|
715
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ _("input", {
|
|
716
715
|
value: W || "",
|
|
717
716
|
onChange: (e) => {
|
|
718
717
|
G(e.target.value), d?.(e.target.value);
|
|
719
718
|
},
|
|
720
719
|
className: "w-full outline-none border-none placeholder:text-[#999]",
|
|
721
|
-
placeholder:
|
|
720
|
+
placeholder: N("context"),
|
|
722
721
|
"aria-label": "其他选项输入框",
|
|
723
722
|
role: "textbox"
|
|
724
723
|
})
|