@owp/core 2.5.30 → 2.5.32
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/_virtual/index20.js +2 -2
- package/dist/_virtual/index21.js +2 -2
- package/dist/_virtual/index22.js +2 -2
- package/dist/components/OwpPageContent/OwpPageContent.js +1 -1
- package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +1 -1
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +813 -241
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js +266 -252
- package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js +59 -0
- package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js +27 -0
- package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +607 -510
- package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
- package/dist/components/OwpTreeGrid/internal/treeGridSelection.js +61 -0
- package/dist/components/OwpTreeGrid/internal/treeGridSelection.js.map +1 -0
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +157 -154
- package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
- package/dist/hooks/useMinimumVisibleState.js.map +1 -0
- package/dist/hooks.js +47 -45
- package/dist/hooks.js.map +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
- package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +2 -0
- package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -1
- package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.d.ts +12 -0
- package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.d.ts +17 -0
- package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
- package/dist/types/components/OwpTreeGrid/internal/treeGridSelection.d.ts +12 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useMinimumVisibleState.d.ts +6 -0
- package/dist/types/utils/treeGridUtil.d.ts +6 -1
- package/dist/utils/treeGridUtil.js +299 -251
- package/dist/utils/treeGridUtil.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks/internal/useMinimumVisibleState.js.map +0 -1
- package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +0 -7
- /package/dist/hooks/{internal/useMinimumVisibleState.js → useMinimumVisibleState.js} +0 -0
|
@@ -1,66 +1,542 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import {
|
|
4
|
-
import { createElement as
|
|
5
|
-
import { useOwpTranslation as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Box as
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var t = (i, r) => it(i, "name", { value: r, configurable: !0 });
|
|
3
|
+
import { jsx as a, jsxs as X, Fragment as We } from "../../node_modules/.pnpm/@emotion_react@11.14.0_@types_react@19.2.14_react@19.2.4/node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js";
|
|
4
|
+
import { createElement as st } from "@emotion/react";
|
|
5
|
+
import { useOwpTranslation as ct } from "../../hooks/useOwpTranslation.js";
|
|
6
|
+
import Ge from "../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/ArrowDropDown.js";
|
|
7
|
+
import Ze from "../../node_modules/.pnpm/@mui_icons-material@7.3.9_@mui_material@7.3.9_@emotion_react@11.14.0_@types_react@19.2._dc2be6bc014bebdac88a574e3e02c144/node_modules/@mui/icons-material/esm/Clear.js";
|
|
8
|
+
import { Box as W, Chip as Ke, Checkbox as ut, TextField as $e, CircularProgress as qe, Autocomplete as Ye, ClickAwayListener as pt, Paper as lt, Popper as rt, IconButton as Je } from "@mui/material";
|
|
9
|
+
import mt from "@mui/material/useAutocomplete";
|
|
10
|
+
import { alpha as j } from "@mui/material/styles";
|
|
11
|
+
import { clsx as K } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
12
|
+
import { useMemo as se, useState as Pe, useRef as Y, useCallback as R, useEffect as Se } from "react";
|
|
13
|
+
import { SELECTOR_ALL_VALUE_LABEL_SX as dt, SELECTOR_ALL_OPTION_LABEL_SX as ft } from "./selectorBaseStyles.js";
|
|
14
|
+
import { isSelectorAllOption as q } from "./utils/querySelectorUtils.js";
|
|
15
|
+
const Qe = 2, It = 152, Fe = 72, Xe = 18.57, Tt = "11px !important", ht = "2px !important", At = "5px !important", gt = 100, ie = 36, ke = 8, et = 8, tt = 8, Ot = 30, bt = 26, Et = /[\u0300-\u036f]/g, Mt = /* @__PURE__ */ t((i, r) => {
|
|
16
|
+
if (typeof i == "function") {
|
|
17
|
+
i(r);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
i && (i.current = r);
|
|
21
|
+
}, "assignAutocompleteListboxRef"), St = /* @__PURE__ */ t((i, r, g, h) => {
|
|
22
|
+
const E = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ t((f) => {
|
|
23
|
+
f >= 0 && f < i && E.add(f);
|
|
24
|
+
}, "addIndex");
|
|
25
|
+
M(0), M(i - 1), M(h);
|
|
26
|
+
for (let f = r; f < g; f += 1)
|
|
27
|
+
M(f);
|
|
28
|
+
return Array.from(E).sort((f, L) => f - L);
|
|
29
|
+
}, "getVirtualizedOptionIndexes"), yt = /* @__PURE__ */ t((i) => [
|
|
30
|
+
{
|
|
31
|
+
listStyle: "none",
|
|
32
|
+
margin: 0,
|
|
33
|
+
maxHeight: "40vh",
|
|
34
|
+
overflow: "auto",
|
|
35
|
+
padding: 0,
|
|
36
|
+
position: "relative",
|
|
37
|
+
...i ? { height: i } : {},
|
|
38
|
+
"& .MuiAutocomplete-option": {
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
boxSizing: "border-box",
|
|
41
|
+
cursor: "pointer",
|
|
42
|
+
display: "flex",
|
|
43
|
+
justifyContent: "flex-start",
|
|
44
|
+
minHeight: 48,
|
|
45
|
+
outline: 0,
|
|
46
|
+
overflow: "hidden",
|
|
47
|
+
paddingBottom: 0.75,
|
|
48
|
+
paddingLeft: 2,
|
|
49
|
+
paddingRight: 2,
|
|
50
|
+
paddingTop: 0.75,
|
|
51
|
+
WebkitTapHighlightColor: "transparent",
|
|
52
|
+
"@media (min-width:600px)": {
|
|
53
|
+
minHeight: "auto"
|
|
54
|
+
},
|
|
55
|
+
"&.Mui-focused": {
|
|
56
|
+
backgroundColor: /* @__PURE__ */ t((r) => r.palette.action.hover, "backgroundColor"),
|
|
57
|
+
"@media (hover: none)": {
|
|
58
|
+
backgroundColor: "transparent"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"&.Mui-focusVisible": {
|
|
62
|
+
backgroundColor: /* @__PURE__ */ t((r) => r.palette.action.focus, "backgroundColor")
|
|
63
|
+
},
|
|
64
|
+
'&[aria-disabled="true"]': {
|
|
65
|
+
opacity: /* @__PURE__ */ t((r) => r.palette.action.disabledOpacity, "opacity"),
|
|
66
|
+
pointerEvents: "none"
|
|
67
|
+
},
|
|
68
|
+
'&[aria-selected="true"]': {
|
|
69
|
+
backgroundColor: /* @__PURE__ */ t((r) => j(r.palette.primary.main, r.palette.action.selectedOpacity), "backgroundColor"),
|
|
70
|
+
"&.Mui-focused": {
|
|
71
|
+
backgroundColor: /* @__PURE__ */ t((r) => j(
|
|
72
|
+
r.palette.primary.main,
|
|
73
|
+
r.palette.action.selectedOpacity + r.palette.action.hoverOpacity
|
|
74
|
+
), "backgroundColor"),
|
|
75
|
+
"@media (hover: none)": {
|
|
76
|
+
backgroundColor: /* @__PURE__ */ t((r) => r.palette.action.selected, "backgroundColor")
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"&.Mui-focusVisible": {
|
|
80
|
+
backgroundColor: /* @__PURE__ */ t((r) => j(
|
|
81
|
+
r.palette.primary.main,
|
|
82
|
+
r.palette.action.selectedOpacity + r.palette.action.focusOpacity
|
|
83
|
+
), "backgroundColor")
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
], "getVirtualizedAutocompleteListboxSx"), Lt = /* @__PURE__ */ t(({
|
|
89
|
+
getListboxProps: i,
|
|
90
|
+
getOptionProps: r,
|
|
91
|
+
options: g,
|
|
92
|
+
selectedOption: h
|
|
93
|
+
}) => {
|
|
94
|
+
const E = i(), { ref: M, style: f, ...L } = E, x = Y(null), [_, U] = Pe(0), O = g.length, d = Math.max(0, Math.min(_, Math.max(O - 1, 0))), z = Math.min(
|
|
95
|
+
O,
|
|
96
|
+
d + et + tt * 2
|
|
97
|
+
), N = se(() => {
|
|
98
|
+
if (!h)
|
|
99
|
+
return -1;
|
|
100
|
+
for (let p = 0; p < O; p += 1)
|
|
101
|
+
if (g[p].value === h.value)
|
|
102
|
+
return p;
|
|
103
|
+
return -1;
|
|
104
|
+
}, [O, g, h]), ce = se(
|
|
105
|
+
() => St(
|
|
106
|
+
O,
|
|
107
|
+
d,
|
|
108
|
+
z,
|
|
109
|
+
N
|
|
110
|
+
),
|
|
111
|
+
[O, N, z, d]
|
|
112
|
+
), I = Math.min(O, et) * ie + ke * 2, H = R(
|
|
113
|
+
(p) => {
|
|
114
|
+
x.current = p, Mt(M, p);
|
|
115
|
+
},
|
|
116
|
+
[M]
|
|
117
|
+
), T = /* @__PURE__ */ t((p) => {
|
|
118
|
+
const l = Math.max(
|
|
119
|
+
0,
|
|
120
|
+
Math.floor(
|
|
121
|
+
(p.currentTarget.scrollTop - ke) / ie
|
|
122
|
+
) - tt
|
|
123
|
+
);
|
|
124
|
+
U(
|
|
125
|
+
(s) => s === l ? s : l
|
|
126
|
+
);
|
|
127
|
+
}, "handleScroll");
|
|
128
|
+
return Se(() => {
|
|
129
|
+
U(0), x.current && (x.current.scrollTop = 0);
|
|
130
|
+
}, [O]), /* @__PURE__ */ a(
|
|
131
|
+
W,
|
|
132
|
+
{
|
|
133
|
+
component: "div",
|
|
134
|
+
...L,
|
|
135
|
+
ref: H,
|
|
136
|
+
onScroll: T,
|
|
137
|
+
style: f,
|
|
138
|
+
sx: yt(I),
|
|
139
|
+
children: /* @__PURE__ */ a(
|
|
140
|
+
W,
|
|
141
|
+
{
|
|
142
|
+
component: "ul",
|
|
143
|
+
sx: {
|
|
144
|
+
height: O * ie + ke * 2,
|
|
145
|
+
listStyle: "none",
|
|
146
|
+
margin: 0,
|
|
147
|
+
padding: 0,
|
|
148
|
+
position: "relative"
|
|
149
|
+
},
|
|
150
|
+
children: ce.map((p) => {
|
|
151
|
+
const l = g[p], s = r({ option: l, index: p }), { key: C, ...D } = s, S = ke + p * ie;
|
|
152
|
+
return /* @__PURE__ */ a(
|
|
153
|
+
"li",
|
|
154
|
+
{
|
|
155
|
+
...D,
|
|
156
|
+
className: K("MuiAutocomplete-option", D.className),
|
|
157
|
+
style: {
|
|
158
|
+
...D.style,
|
|
159
|
+
height: ie,
|
|
160
|
+
left: 0,
|
|
161
|
+
minHeight: ie,
|
|
162
|
+
position: "absolute",
|
|
163
|
+
right: 0,
|
|
164
|
+
top: S
|
|
165
|
+
},
|
|
166
|
+
children: je(l)
|
|
167
|
+
},
|
|
168
|
+
C
|
|
169
|
+
);
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}, "OwpVirtualizedAutocompleteOptionList"), ot = /* @__PURE__ */ t((i, r) => {
|
|
176
|
+
const g = i.target;
|
|
177
|
+
return g instanceof HTMLInputElement ? g.value : r ?? "";
|
|
178
|
+
}, "getCurrentAutocompleteInputValue"), A = /* @__PURE__ */ t((i) => typeof i == "string" || typeof i == "number" ? `${i}` : "", "getAutocompleteOptionLabel"), nt = /* @__PURE__ */ t((i) => i.normalize("NFD").replace(Et, "").toLowerCase(), "normalizeAutocompleteSearchText"), je = /* @__PURE__ */ t((i) => /* @__PURE__ */ a(
|
|
179
|
+
W,
|
|
19
180
|
{
|
|
20
181
|
component: "span",
|
|
21
|
-
sx:
|
|
22
|
-
children:
|
|
182
|
+
sx: q(i) ? ft : void 0,
|
|
183
|
+
children: i.label
|
|
23
184
|
}
|
|
24
|
-
), "renderAutocompleteOptionLabel"),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
185
|
+
), "renderAutocompleteOptionLabel"), Ct = /* @__PURE__ */ t(({
|
|
186
|
+
autocompleteInputValue: i,
|
|
187
|
+
autocompleteSx: r,
|
|
188
|
+
className: g,
|
|
189
|
+
disableClientFilter: h,
|
|
190
|
+
disabled: E,
|
|
191
|
+
error: M,
|
|
192
|
+
fullWidth: f,
|
|
193
|
+
helperText: L,
|
|
194
|
+
label: x,
|
|
195
|
+
loading: _,
|
|
196
|
+
loadingText: U,
|
|
197
|
+
noOptionsText: O,
|
|
198
|
+
onAutocompleteInputChange: d,
|
|
199
|
+
options: z,
|
|
200
|
+
placeholder: N,
|
|
201
|
+
required: ce,
|
|
202
|
+
resolvedTextFieldVariant: I,
|
|
203
|
+
selectSingleValue: H,
|
|
204
|
+
selectedOption: T,
|
|
205
|
+
showAllOption: p,
|
|
206
|
+
singleAutocompleteInputSx: l,
|
|
207
|
+
textFieldProps: s
|
|
208
|
+
}) => {
|
|
209
|
+
var re, be, _e, ve, Ne, xe, Ve;
|
|
210
|
+
const C = i !== void 0, D = Y(!1), S = Y(!1), [ue, pe] = Pe(
|
|
211
|
+
() => T ? A(T.label) : ""
|
|
212
|
+
), me = C ? i : ue, b = se(
|
|
213
|
+
() => new Map(
|
|
214
|
+
z.map((o) => [
|
|
215
|
+
o.value,
|
|
216
|
+
nt(A(o.label))
|
|
217
|
+
])
|
|
218
|
+
),
|
|
219
|
+
[z]
|
|
220
|
+
), v = R(
|
|
221
|
+
(o) => {
|
|
222
|
+
C || pe(o);
|
|
223
|
+
},
|
|
224
|
+
[C]
|
|
225
|
+
), J = R((o) => {
|
|
226
|
+
D.current = !0, v(""), d == null || d("", o);
|
|
227
|
+
}, [d, v]), Q = R(() => {
|
|
228
|
+
const o = T ? A(T.label) : "";
|
|
229
|
+
D.current = !1, v(o), d == null || d(o, "reset");
|
|
230
|
+
}, [d, T, v]), F = R(
|
|
231
|
+
(o, u) => {
|
|
232
|
+
var we;
|
|
233
|
+
if (h)
|
|
234
|
+
return o;
|
|
235
|
+
const y = nt(u.inputValue);
|
|
236
|
+
if (!y)
|
|
237
|
+
return o;
|
|
238
|
+
const ae = [];
|
|
239
|
+
for (const Ee of o)
|
|
240
|
+
(we = b.get(Ee.value)) != null && we.includes(y) && ae.push(Ee);
|
|
241
|
+
return ae;
|
|
242
|
+
},
|
|
243
|
+
[h, b]
|
|
244
|
+
), {
|
|
245
|
+
anchorEl: de,
|
|
246
|
+
dirty: Re,
|
|
247
|
+
getClearProps: fe,
|
|
248
|
+
getInputLabelProps: ye,
|
|
249
|
+
getInputProps: V,
|
|
250
|
+
getListboxProps: Le,
|
|
251
|
+
getOptionProps: Ie,
|
|
252
|
+
getPopupIndicatorProps: Ce,
|
|
253
|
+
getRootProps: Te,
|
|
254
|
+
groupedOptions: B,
|
|
255
|
+
popupOpen: ee,
|
|
256
|
+
setAnchorEl: te
|
|
257
|
+
} = mt({
|
|
258
|
+
componentName: "OwpSelectorAutocomplete",
|
|
259
|
+
disabled: E,
|
|
260
|
+
filterOptions: F,
|
|
261
|
+
getOptionKey: /* @__PURE__ */ t((o) => o.value, "getOptionKey"),
|
|
262
|
+
getOptionLabel: /* @__PURE__ */ t((o) => A(o.label), "getOptionLabel"),
|
|
263
|
+
inputValue: me,
|
|
264
|
+
isOptionEqualToValue: /* @__PURE__ */ t((o, u) => o.value === u.value, "isOptionEqualToValue"),
|
|
265
|
+
onChange: /* @__PURE__ */ t((o, u, y) => {
|
|
266
|
+
if (y === "clear" || y === "removeOption") {
|
|
267
|
+
J(y);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
if (D.current = !1, !u || p && q(u)) {
|
|
271
|
+
v(
|
|
272
|
+
u ? A(u.label) : ""
|
|
273
|
+
), H("");
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
v(A(u.label)), H(u.value);
|
|
277
|
+
}, "onChange"),
|
|
278
|
+
onInputChange: /* @__PURE__ */ t((o, u, y) => {
|
|
279
|
+
y === "input" && (D.current = !0), v(u), d == null || d(u, y);
|
|
280
|
+
}, "onInputChange"),
|
|
281
|
+
options: z,
|
|
282
|
+
selectOnFocus: !0,
|
|
283
|
+
value: T
|
|
284
|
+
}), G = Te(), w = V(), De = ye(), he = fe(), oe = Ce(), k = Re && !E && me !== "", Z = (re = s == null ? void 0 : s.slotProps) == null ? void 0 : re.htmlInput, {
|
|
285
|
+
className: ne,
|
|
286
|
+
onBlur: Ae,
|
|
287
|
+
onKeyDown: le,
|
|
288
|
+
...Ue
|
|
289
|
+
} = Z ?? {}, ze = (_e = (be = s == null ? void 0 : s.slotProps) == null ? void 0 : be.input) == null ? void 0 : _e.className, He = R(
|
|
290
|
+
(o) => {
|
|
291
|
+
te(o);
|
|
292
|
+
},
|
|
293
|
+
[te]
|
|
294
|
+
), ge = /* @__PURE__ */ t((o) => {
|
|
295
|
+
o.preventDefault(), o.stopPropagation(), S.current = !1, J("clear");
|
|
296
|
+
}, "handleClearClick"), Oe = /* @__PURE__ */ t((o) => {
|
|
297
|
+
o.preventDefault(), o.stopPropagation(), S.current = !0;
|
|
298
|
+
}, "handleClearMouseDown"), Be = /* @__PURE__ */ t((o) => {
|
|
299
|
+
if (le == null || le(o), o.defaultPrevented || E)
|
|
300
|
+
return;
|
|
301
|
+
if (o.key === "Escape" || o.key === "Tab") {
|
|
302
|
+
Q();
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (o.key !== "Backspace" && o.key !== "Delete" || !T)
|
|
306
|
+
return;
|
|
307
|
+
const u = o.currentTarget.value, y = A(T.label), ae = o.currentTarget.selectionStart !== o.currentTarget.selectionEnd;
|
|
308
|
+
(u === "" || u === y || ae) && (o.preventDefault(), o.defaultMuiPrevented = !0, J("input"));
|
|
309
|
+
}, "handleInputKeyDown"), P = /* @__PURE__ */ t((o) => {
|
|
310
|
+
var u;
|
|
311
|
+
if ((u = w.onBlur) == null || u.call(w, o), Ae == null || Ae(o), S.current) {
|
|
312
|
+
S.current = !1;
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
Q();
|
|
316
|
+
}, "handleInputBlur");
|
|
317
|
+
return Se(() => {
|
|
318
|
+
C || D.current || pe(
|
|
319
|
+
T ? A(T.label) : ""
|
|
320
|
+
);
|
|
321
|
+
}, [C, T]), /* @__PURE__ */ X(
|
|
322
|
+
W,
|
|
323
|
+
{
|
|
324
|
+
...G,
|
|
325
|
+
className: K(
|
|
326
|
+
"MuiAutocomplete-root min-w-128",
|
|
327
|
+
f && "MuiAutocomplete-fullWidth",
|
|
328
|
+
ee && "Mui-expanded",
|
|
329
|
+
k && "MuiAutocomplete-hasClearIcon",
|
|
330
|
+
"MuiAutocomplete-hasPopupIcon",
|
|
331
|
+
g
|
|
332
|
+
),
|
|
333
|
+
sx: [
|
|
334
|
+
r,
|
|
335
|
+
f ? { width: "100%" } : void 0,
|
|
336
|
+
{
|
|
337
|
+
"& .MuiAutocomplete-inputRoot": {
|
|
338
|
+
paddingRight: `${Ot + (k ? bt : 0)}px !important`,
|
|
339
|
+
position: "relative"
|
|
340
|
+
},
|
|
341
|
+
"& .MuiAutocomplete-inputRoot .MuiAutocomplete-input": {
|
|
342
|
+
minWidth: 30,
|
|
343
|
+
width: 0
|
|
344
|
+
},
|
|
345
|
+
"& .MuiAutocomplete-input": {
|
|
346
|
+
flexGrow: 1,
|
|
347
|
+
textOverflow: "ellipsis"
|
|
348
|
+
},
|
|
349
|
+
"& .MuiAutocomplete-endAdornment": {
|
|
350
|
+
alignItems: "center",
|
|
351
|
+
display: "flex",
|
|
352
|
+
position: "absolute",
|
|
353
|
+
right: I === "standard" ? 0 : 9,
|
|
354
|
+
top: "50%",
|
|
355
|
+
transform: "translate(0, -50%)"
|
|
356
|
+
},
|
|
357
|
+
"& .MuiAutocomplete-clearIndicator": {
|
|
358
|
+
marginRight: -0.25,
|
|
359
|
+
padding: 0.5,
|
|
360
|
+
visibility: "visible"
|
|
361
|
+
},
|
|
362
|
+
"& .MuiAutocomplete-popupIndicator": {
|
|
363
|
+
marginRight: -0.25,
|
|
364
|
+
padding: 0.25
|
|
365
|
+
},
|
|
366
|
+
"& .MuiAutocomplete-popupIndicatorOpen": {
|
|
367
|
+
transform: "rotate(180deg)"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ a(
|
|
373
|
+
$e,
|
|
374
|
+
{
|
|
375
|
+
...s,
|
|
376
|
+
disabled: E,
|
|
377
|
+
error: M,
|
|
378
|
+
fullWidth: f,
|
|
379
|
+
helperText: L,
|
|
380
|
+
label: x,
|
|
381
|
+
placeholder: N,
|
|
382
|
+
required: ce,
|
|
383
|
+
slotProps: {
|
|
384
|
+
...s == null ? void 0 : s.slotProps,
|
|
385
|
+
htmlInput: {
|
|
386
|
+
...w,
|
|
387
|
+
...Ue,
|
|
388
|
+
className: K(
|
|
389
|
+
"MuiAutocomplete-input",
|
|
390
|
+
w.className,
|
|
391
|
+
ne
|
|
392
|
+
),
|
|
393
|
+
onBlur: P,
|
|
394
|
+
onKeyDown: Be
|
|
395
|
+
},
|
|
396
|
+
input: {
|
|
397
|
+
...(ve = s == null ? void 0 : s.slotProps) == null ? void 0 : ve.input,
|
|
398
|
+
ref: He,
|
|
399
|
+
className: K("MuiAutocomplete-inputRoot", ze),
|
|
400
|
+
sx: {
|
|
401
|
+
...l ?? {},
|
|
402
|
+
...((xe = (Ne = s == null ? void 0 : s.slotProps) == null ? void 0 : Ne.input) == null ? void 0 : xe.sx) ?? {}
|
|
403
|
+
},
|
|
404
|
+
endAdornment: /* @__PURE__ */ X(W, { className: "MuiAutocomplete-endAdornment", children: [
|
|
405
|
+
_ ? /* @__PURE__ */ a(qe, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
|
|
406
|
+
k ? /* @__PURE__ */ a(
|
|
407
|
+
Je,
|
|
408
|
+
{
|
|
409
|
+
className: "MuiAutocomplete-clearIndicator m-0",
|
|
410
|
+
onClick: ge,
|
|
411
|
+
onMouseDown: Oe,
|
|
412
|
+
size: "small",
|
|
413
|
+
tabIndex: he.tabIndex,
|
|
414
|
+
type: "button",
|
|
415
|
+
children: /* @__PURE__ */ a(Ze, { sx: { fontSize: Xe } })
|
|
416
|
+
}
|
|
417
|
+
) : null,
|
|
418
|
+
/* @__PURE__ */ a(
|
|
419
|
+
Je,
|
|
420
|
+
{
|
|
421
|
+
className: K(
|
|
422
|
+
"MuiAutocomplete-popupIndicator m-0",
|
|
423
|
+
ee && "MuiAutocomplete-popupIndicatorOpen"
|
|
424
|
+
),
|
|
425
|
+
onClick: /* @__PURE__ */ t((o) => {
|
|
426
|
+
var u;
|
|
427
|
+
return (u = oe.onClick) == null ? void 0 : u.call(oe, o);
|
|
428
|
+
}, "onClick"),
|
|
429
|
+
size: "small",
|
|
430
|
+
disabled: E,
|
|
431
|
+
tabIndex: oe.tabIndex,
|
|
432
|
+
type: "button",
|
|
433
|
+
children: /* @__PURE__ */ a(Ge, {})
|
|
434
|
+
}
|
|
435
|
+
)
|
|
436
|
+
] })
|
|
437
|
+
},
|
|
438
|
+
inputLabel: {
|
|
439
|
+
...De,
|
|
440
|
+
...(Ve = s == null ? void 0 : s.slotProps) == null ? void 0 : Ve.inputLabel
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
variant: I
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
de ? /* @__PURE__ */ a(
|
|
447
|
+
rt,
|
|
448
|
+
{
|
|
449
|
+
anchorEl: de,
|
|
450
|
+
open: ee,
|
|
451
|
+
placement: "bottom-start",
|
|
452
|
+
style: { width: de.clientWidth },
|
|
453
|
+
sx: { zIndex: 99999 },
|
|
454
|
+
children: /* @__PURE__ */ X(
|
|
455
|
+
lt,
|
|
456
|
+
{
|
|
457
|
+
sx: {
|
|
458
|
+
"& .MuiAutocomplete-noOptions": {
|
|
459
|
+
fontSize: 14,
|
|
460
|
+
px: 1,
|
|
461
|
+
py: 1.5,
|
|
462
|
+
whiteSpace: "nowrap"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
children: [
|
|
466
|
+
_ && B.length === 0 ? /* @__PURE__ */ a(W, { sx: { fontSize: 14, px: 1, py: 1.5, whiteSpace: "nowrap" }, children: U }) : null,
|
|
467
|
+
!_ && B.length === 0 ? /* @__PURE__ */ a(
|
|
468
|
+
W,
|
|
469
|
+
{
|
|
470
|
+
className: "MuiAutocomplete-noOptions",
|
|
471
|
+
onMouseDown: /* @__PURE__ */ t((o) => {
|
|
472
|
+
o.preventDefault();
|
|
473
|
+
}, "onMouseDown"),
|
|
474
|
+
role: "presentation",
|
|
475
|
+
children: O
|
|
476
|
+
}
|
|
477
|
+
) : null,
|
|
478
|
+
B.length > 0 ? /* @__PURE__ */ a(
|
|
479
|
+
Lt,
|
|
480
|
+
{
|
|
481
|
+
getListboxProps: Le,
|
|
482
|
+
getOptionProps: Ie,
|
|
483
|
+
options: B,
|
|
484
|
+
selectedOption: T
|
|
485
|
+
}
|
|
486
|
+
) : null
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
) : null
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}, "OwpVirtualizedSingleSelectorAutocomplete"), Bt = /* @__PURE__ */ t(({ hookResult: i, props: r }) => {
|
|
496
|
+
var Ee;
|
|
497
|
+
const { t: g } = ct(), {
|
|
498
|
+
autocompleteInputValue: h,
|
|
499
|
+
autocompleteVirtualizationThreshold: E,
|
|
500
|
+
className: M,
|
|
501
|
+
disableClientFilter: f,
|
|
502
|
+
disabled: L,
|
|
503
|
+
error: x,
|
|
504
|
+
fullWidth: _,
|
|
505
|
+
helperText: U,
|
|
506
|
+
label: O,
|
|
507
|
+
loading: d,
|
|
508
|
+
loadingText: z,
|
|
509
|
+
multiple: N,
|
|
510
|
+
noOptionsText: ce,
|
|
511
|
+
onAutocompleteInputChange: I,
|
|
512
|
+
placeholder: H,
|
|
513
|
+
required: T,
|
|
514
|
+
showAllOption: p = !0,
|
|
515
|
+
textFieldProps: l,
|
|
516
|
+
valueTextAlign: s
|
|
517
|
+
} = r, {
|
|
518
|
+
allOption: C,
|
|
519
|
+
clearSelection: D,
|
|
520
|
+
isAllSelected: S,
|
|
521
|
+
resolvedOptions: ue,
|
|
522
|
+
restoreAllSelection: pe,
|
|
523
|
+
selectAll: me,
|
|
524
|
+
selectedOption: b,
|
|
525
|
+
selectedOptions: v,
|
|
526
|
+
selectMultipleValues: J,
|
|
527
|
+
selectSingleValue: Q
|
|
528
|
+
} = i, F = se(
|
|
529
|
+
() => p ? [C, ...ue] : ue,
|
|
530
|
+
[C, ue, p]
|
|
531
|
+
), de = E === !1 ? Number.POSITIVE_INFINITY : Math.max(1, E ?? gt), Re = F.length >= de, fe = se(
|
|
532
|
+
() => v.filter((e) => !q(e)),
|
|
533
|
+
[v]
|
|
534
|
+
), ye = se(
|
|
535
|
+
() => S ? [] : fe.slice(Qe),
|
|
536
|
+
[fe, S]
|
|
537
|
+
), V = ye.length, [Le, Ie] = Pe(null), Ce = Y(null), Te = ce ?? g(f ? "Message.검색 결과 없음" : "Message.조회된 결과가 없습니다."), B = z ?? g("Common.로딩 중..."), ee = Y(
|
|
538
|
+
N && p && ((r.value ?? r.defaultValue) == null || (r.value ?? r.defaultValue) === "")
|
|
539
|
+
), te = {
|
|
64
540
|
clearIndicator: {
|
|
65
541
|
className: "m-0 p-0",
|
|
66
542
|
size: "small",
|
|
@@ -81,13 +557,13 @@ const ue = 2, Ve = 152, ce = 72, me = 18.57, Ue = "11px !important", ze = "2px !
|
|
|
81
557
|
size: "small",
|
|
82
558
|
tabIndex: -1
|
|
83
559
|
}
|
|
84
|
-
},
|
|
560
|
+
}, G = (l == null ? void 0 : l.variant) ?? "standard", w = G === "standard" ? Tt : G === "outlined" ? (l == null ? void 0 : l.size) === "small" ? At : ht : void 0, De = w || s ? {
|
|
85
561
|
"& .MuiAutocomplete-input": {
|
|
86
|
-
...
|
|
87
|
-
...
|
|
562
|
+
...w ? { paddingLeft: w } : {},
|
|
563
|
+
...s ? { textAlign: s } : {}
|
|
88
564
|
}
|
|
89
|
-
} : void 0,
|
|
90
|
-
minWidth:
|
|
565
|
+
} : void 0, he = {
|
|
566
|
+
minWidth: It,
|
|
91
567
|
"& .MuiAutocomplete-endAdornment": {
|
|
92
568
|
"& .MuiAutocomplete-clearIndicator + .MuiAutocomplete-popupIndicator": {
|
|
93
569
|
ml: 0
|
|
@@ -103,189 +579,267 @@ const ue = 2, Ve = 152, ce = 72, me = 18.57, Ue = "11px !important", ze = "2px !
|
|
|
103
579
|
gap: 0,
|
|
104
580
|
right: 0
|
|
105
581
|
}
|
|
106
|
-
},
|
|
107
|
-
...
|
|
582
|
+
}, oe = {
|
|
583
|
+
...he,
|
|
108
584
|
"& .MuiAutocomplete-inputRoot .MuiAutocomplete-input": {
|
|
109
|
-
flexBasis:
|
|
110
|
-
minWidth:
|
|
585
|
+
flexBasis: Fe,
|
|
586
|
+
minWidth: Fe
|
|
111
587
|
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
588
|
+
}, k = h !== void 0, Z = Y(!1), ne = Y(!1), [Ae, le] = Pe(
|
|
589
|
+
() => b ? A(b.label) : ""
|
|
590
|
+
), Ue = k ? h : Ae, ze = (Ee = l == null ? void 0 : l.slotProps) == null ? void 0 : Ee.htmlInput, {
|
|
591
|
+
className: He,
|
|
592
|
+
onBlur: ge,
|
|
593
|
+
onKeyDown: Oe,
|
|
594
|
+
...Be
|
|
595
|
+
} = ze ?? {}, P = R(
|
|
596
|
+
(e) => {
|
|
597
|
+
k || le(e);
|
|
598
|
+
},
|
|
599
|
+
[k]
|
|
600
|
+
), re = R(
|
|
601
|
+
(e, n = !0) => {
|
|
602
|
+
Z.current = !0, P(""), n && (I == null || I("", e));
|
|
603
|
+
},
|
|
604
|
+
[I, P]
|
|
605
|
+
), be = R(() => {
|
|
606
|
+
const e = b ? A(b.label) : "";
|
|
607
|
+
Z.current = !1, P(e), I == null || I(e, "reset");
|
|
608
|
+
}, [I, b, P]);
|
|
609
|
+
Se(() => {
|
|
610
|
+
V || Ie(null);
|
|
611
|
+
}, [V]), Se(() => {
|
|
612
|
+
N || k || Z.current || le(
|
|
613
|
+
b ? A(b.label) : ""
|
|
614
|
+
);
|
|
615
|
+
}, [k, N, b]), Se(() => {
|
|
616
|
+
var c;
|
|
617
|
+
if (!ee.current)
|
|
118
618
|
return;
|
|
119
|
-
const e = (
|
|
619
|
+
const e = (c = Ce.current) == null ? void 0 : c.closest("form");
|
|
120
620
|
if (!e)
|
|
121
621
|
return;
|
|
122
|
-
const
|
|
622
|
+
const n = /* @__PURE__ */ t(() => {
|
|
123
623
|
window.setTimeout(() => {
|
|
124
|
-
|
|
624
|
+
pe();
|
|
125
625
|
}, 0);
|
|
126
626
|
}, "handleFormReset");
|
|
127
|
-
return e.addEventListener("reset",
|
|
128
|
-
e.removeEventListener("reset",
|
|
627
|
+
return e.addEventListener("reset", n), () => {
|
|
628
|
+
e.removeEventListener("reset", n);
|
|
129
629
|
};
|
|
130
|
-
}, [
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
}, "handleHiddenChipPopperClose"),
|
|
630
|
+
}, [pe]);
|
|
631
|
+
const _e = /* @__PURE__ */ t(() => {
|
|
632
|
+
Ie(null);
|
|
633
|
+
}, "handleHiddenChipPopperClose"), ve = /* @__PURE__ */ t((e) => {
|
|
134
634
|
e.preventDefault();
|
|
135
|
-
}, "handleHiddenChipSummaryMouseDown"),
|
|
136
|
-
e.preventDefault(), e.stopPropagation(),
|
|
137
|
-
(
|
|
635
|
+
}, "handleHiddenChipSummaryMouseDown"), Ne = /* @__PURE__ */ t((e) => {
|
|
636
|
+
e.preventDefault(), e.stopPropagation(), Ie(
|
|
637
|
+
(n) => n === e.currentTarget ? null : e.currentTarget
|
|
138
638
|
);
|
|
139
|
-
}, "handleHiddenChipSummaryClick"),
|
|
140
|
-
|
|
141
|
-
|
|
639
|
+
}, "handleHiddenChipSummaryClick"), xe = /* @__PURE__ */ t((e) => {
|
|
640
|
+
J(
|
|
641
|
+
fe.filter((n) => n.value !== e).map((n) => n.value)
|
|
142
642
|
);
|
|
143
|
-
}, "handleHiddenChipDelete"),
|
|
144
|
-
var
|
|
145
|
-
const
|
|
146
|
-
(
|
|
147
|
-
|
|
643
|
+
}, "handleHiddenChipDelete"), Ve = /* @__PURE__ */ t((e) => {
|
|
644
|
+
var c;
|
|
645
|
+
const n = ot(e, h);
|
|
646
|
+
(S || V > 0) && n === "" && (e.key === "Backspace" || e.key === "Delete") && (e.defaultMuiPrevented = !0, e.preventDefault(), e.stopPropagation()), (c = l == null ? void 0 : l.onKeyDown) == null || c.call(
|
|
647
|
+
l,
|
|
148
648
|
e
|
|
149
649
|
);
|
|
150
|
-
}, "handleMultipleRootKeyDown")
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
650
|
+
}, "handleMultipleRootKeyDown"), o = /* @__PURE__ */ t((e) => {
|
|
651
|
+
e.preventDefault(), e.stopPropagation(), ne.current = !0;
|
|
652
|
+
}, "handleSingleAutocompleteClearMouseDown"), u = /* @__PURE__ */ t((e) => {
|
|
653
|
+
e.preventDefault(), e.stopPropagation(), ne.current = !1, re("clear");
|
|
654
|
+
}, "handleSingleAutocompleteClearClick"), y = /* @__PURE__ */ t((e) => {
|
|
655
|
+
if (Oe == null || Oe(e), e.defaultPrevented || L)
|
|
656
|
+
return;
|
|
657
|
+
if (e.key === "Escape" || e.key === "Tab") {
|
|
658
|
+
be();
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
if (e.key !== "Backspace" && e.key !== "Delete" || !b)
|
|
662
|
+
return;
|
|
663
|
+
const n = e.currentTarget.value, c = A(b.label), m = e.currentTarget.selectionStart !== e.currentTarget.selectionEnd;
|
|
664
|
+
(n === "" || n === c || m) && (e.preventDefault(), e.defaultMuiPrevented = !0, re("input"));
|
|
665
|
+
}, "handleSingleAutocompleteInputKeyDown"), ae = /* @__PURE__ */ t((e, n) => {
|
|
666
|
+
if (ne.current) {
|
|
667
|
+
ne.current = !1;
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
n == null || n(e), ge == null || ge(e), be();
|
|
671
|
+
}, "handleSingleAutocompleteInputBlur"), we = {
|
|
672
|
+
...te,
|
|
673
|
+
clearIndicator: {
|
|
674
|
+
...te.clearIndicator,
|
|
675
|
+
onClick: u,
|
|
676
|
+
onMouseDown: o
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
return !N && Re ? /* @__PURE__ */ a(
|
|
680
|
+
Ct,
|
|
681
|
+
{
|
|
682
|
+
autocompleteInputValue: h,
|
|
683
|
+
autocompleteSx: he,
|
|
684
|
+
className: M,
|
|
685
|
+
disableClientFilter: f,
|
|
686
|
+
disabled: L,
|
|
687
|
+
error: x,
|
|
688
|
+
fullWidth: _,
|
|
689
|
+
helperText: U,
|
|
690
|
+
label: O,
|
|
691
|
+
loading: d,
|
|
692
|
+
loadingText: B,
|
|
693
|
+
noOptionsText: Te,
|
|
694
|
+
onAutocompleteInputChange: I,
|
|
695
|
+
options: F,
|
|
696
|
+
placeholder: H,
|
|
697
|
+
required: T,
|
|
698
|
+
resolvedTextFieldVariant: G,
|
|
699
|
+
selectSingleValue: Q,
|
|
700
|
+
selectedOption: b,
|
|
701
|
+
showAllOption: p,
|
|
702
|
+
singleAutocompleteInputSx: De,
|
|
703
|
+
textFieldProps: l
|
|
704
|
+
}
|
|
705
|
+
) : N ? /* @__PURE__ */ X(We, { children: [
|
|
706
|
+
/* @__PURE__ */ a(
|
|
707
|
+
Ye,
|
|
154
708
|
{
|
|
155
|
-
ref:
|
|
156
|
-
className:
|
|
709
|
+
ref: Ce,
|
|
710
|
+
className: K("min-w-128", M),
|
|
157
711
|
disableCloseOnSelect: !0,
|
|
158
|
-
disabled:
|
|
159
|
-
filterOptions:
|
|
160
|
-
fullWidth:
|
|
161
|
-
inputValue:
|
|
162
|
-
loading:
|
|
712
|
+
disabled: L,
|
|
713
|
+
filterOptions: f ? (e) => e : void 0,
|
|
714
|
+
fullWidth: _,
|
|
715
|
+
inputValue: h,
|
|
716
|
+
loading: d,
|
|
163
717
|
multiple: !0,
|
|
164
|
-
options:
|
|
718
|
+
options: F,
|
|
165
719
|
clearText: "",
|
|
166
720
|
closeText: "",
|
|
167
|
-
clearIcon: /* @__PURE__ */
|
|
721
|
+
clearIcon: /* @__PURE__ */ a(Ze, { sx: { fontSize: Xe } }),
|
|
168
722
|
openText: "",
|
|
169
|
-
popupIcon: /* @__PURE__ */
|
|
170
|
-
sx:
|
|
171
|
-
value:
|
|
172
|
-
getOptionLabel: /* @__PURE__ */
|
|
173
|
-
getOptionKey: /* @__PURE__ */
|
|
174
|
-
isOptionEqualToValue: /* @__PURE__ */
|
|
175
|
-
loadingText:
|
|
176
|
-
noOptionsText:
|
|
177
|
-
onChange: /* @__PURE__ */
|
|
178
|
-
const
|
|
723
|
+
popupIcon: /* @__PURE__ */ a(Ge, {}),
|
|
724
|
+
sx: oe,
|
|
725
|
+
value: v,
|
|
726
|
+
getOptionLabel: /* @__PURE__ */ t((e) => A(e.label), "getOptionLabel"),
|
|
727
|
+
getOptionKey: /* @__PURE__ */ t((e) => e.value, "getOptionKey"),
|
|
728
|
+
isOptionEqualToValue: /* @__PURE__ */ t((e, n) => e.value === n.value, "isOptionEqualToValue"),
|
|
729
|
+
loadingText: B,
|
|
730
|
+
noOptionsText: Te,
|
|
731
|
+
onChange: /* @__PURE__ */ t((e, n, c, m) => {
|
|
732
|
+
const $ = e.type === "keydown" ? ot(
|
|
179
733
|
e,
|
|
180
|
-
|
|
181
|
-
) :
|
|
182
|
-
if (
|
|
734
|
+
h
|
|
735
|
+
) : h ?? "";
|
|
736
|
+
if (c === "removeOption" && e.type === "keydown" && $ === "" && (S || V > 0)) {
|
|
183
737
|
e.preventDefault(), e.stopPropagation();
|
|
184
738
|
return;
|
|
185
739
|
}
|
|
186
|
-
if (
|
|
187
|
-
if (
|
|
188
|
-
|
|
740
|
+
if (c === "clear") {
|
|
741
|
+
if (ee.current) {
|
|
742
|
+
me();
|
|
189
743
|
return;
|
|
190
744
|
}
|
|
191
|
-
|
|
745
|
+
D();
|
|
192
746
|
return;
|
|
193
747
|
}
|
|
194
|
-
if (
|
|
195
|
-
if (
|
|
196
|
-
|
|
748
|
+
if (p && (m != null && m.option) && q(m.option)) {
|
|
749
|
+
if (S) {
|
|
750
|
+
D();
|
|
197
751
|
return;
|
|
198
752
|
}
|
|
199
|
-
|
|
753
|
+
me();
|
|
200
754
|
return;
|
|
201
755
|
}
|
|
202
|
-
|
|
203
|
-
|
|
756
|
+
J(
|
|
757
|
+
n.filter((Me) => !q(Me)).map((Me) => Me.value)
|
|
204
758
|
);
|
|
205
759
|
}, "onChange"),
|
|
206
|
-
onInputChange: /* @__PURE__ */
|
|
207
|
-
|
|
760
|
+
onInputChange: /* @__PURE__ */ t((e, n, c) => {
|
|
761
|
+
I == null || I(n, c);
|
|
208
762
|
}, "onInputChange"),
|
|
209
|
-
onKeyDown:
|
|
210
|
-
slotProps:
|
|
211
|
-
renderInput: /* @__PURE__ */
|
|
212
|
-
var
|
|
213
|
-
return /* @__PURE__ */
|
|
214
|
-
|
|
763
|
+
onKeyDown: Ve,
|
|
764
|
+
slotProps: te,
|
|
765
|
+
renderInput: /* @__PURE__ */ t((e) => {
|
|
766
|
+
var n;
|
|
767
|
+
return /* @__PURE__ */ a(
|
|
768
|
+
$e,
|
|
215
769
|
{
|
|
216
770
|
...e,
|
|
217
|
-
...
|
|
218
|
-
disabled:
|
|
219
|
-
error:
|
|
220
|
-
fullWidth:
|
|
221
|
-
helperText:
|
|
222
|
-
label:
|
|
223
|
-
placeholder:
|
|
224
|
-
required:
|
|
771
|
+
...l,
|
|
772
|
+
disabled: L,
|
|
773
|
+
error: x,
|
|
774
|
+
fullWidth: _,
|
|
775
|
+
helperText: U,
|
|
776
|
+
label: O,
|
|
777
|
+
placeholder: H ?? g("Common.검색"),
|
|
778
|
+
required: T,
|
|
225
779
|
slotProps: {
|
|
226
|
-
...
|
|
780
|
+
...l == null ? void 0 : l.slotProps,
|
|
227
781
|
input: {
|
|
228
782
|
...e.InputProps,
|
|
229
|
-
...(
|
|
230
|
-
endAdornment: /* @__PURE__ */
|
|
231
|
-
|
|
783
|
+
...(n = l == null ? void 0 : l.slotProps) == null ? void 0 : n.input,
|
|
784
|
+
endAdornment: /* @__PURE__ */ X(We, { children: [
|
|
785
|
+
d ? /* @__PURE__ */ a(qe, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
|
|
232
786
|
e.InputProps.endAdornment
|
|
233
787
|
] })
|
|
234
788
|
}
|
|
235
789
|
},
|
|
236
|
-
variant:
|
|
790
|
+
variant: G
|
|
237
791
|
}
|
|
238
792
|
);
|
|
239
793
|
}, "renderInput"),
|
|
240
|
-
renderOption: /* @__PURE__ */
|
|
241
|
-
const { key:
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
|
|
245
|
-
] },
|
|
794
|
+
renderOption: /* @__PURE__ */ t((e, n, c) => {
|
|
795
|
+
const { key: m, ...$ } = e;
|
|
796
|
+
return /* @__PURE__ */ X("li", { ...$, children: [
|
|
797
|
+
/* @__PURE__ */ a(ut, { checked: c.selected, className: "!mr-8 !p-0", size: "small" }),
|
|
798
|
+
je(n)
|
|
799
|
+
] }, m);
|
|
246
800
|
}, "renderOption"),
|
|
247
|
-
renderValue: /* @__PURE__ */
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
|
|
801
|
+
renderValue: /* @__PURE__ */ t((e, n) => p && S ? [
|
|
802
|
+
/* @__PURE__ */ a(
|
|
803
|
+
W,
|
|
250
804
|
{
|
|
251
805
|
component: "span",
|
|
252
|
-
sx:
|
|
253
|
-
children:
|
|
806
|
+
sx: dt,
|
|
807
|
+
children: C.label
|
|
254
808
|
},
|
|
255
|
-
|
|
809
|
+
C.value
|
|
256
810
|
)
|
|
257
811
|
] : [
|
|
258
|
-
...e.filter((
|
|
259
|
-
const { key:
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
|
|
812
|
+
...e.filter((m) => !q(m)).slice(0, Qe).map((m, $) => {
|
|
813
|
+
const { key: Me, ...at } = n({ index: $ });
|
|
814
|
+
return /* @__PURE__ */ st(
|
|
815
|
+
Ke,
|
|
262
816
|
{
|
|
263
|
-
...
|
|
264
|
-
key:
|
|
265
|
-
label:
|
|
817
|
+
...at,
|
|
818
|
+
key: Me,
|
|
819
|
+
label: m.label,
|
|
266
820
|
size: "small",
|
|
267
821
|
sx: { borderRadius: 1, mr: 0.5 }
|
|
268
822
|
}
|
|
269
823
|
);
|
|
270
824
|
}),
|
|
271
|
-
...
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
-
|
|
825
|
+
...V > 0 ? [
|
|
826
|
+
/* @__PURE__ */ a(
|
|
827
|
+
Ke,
|
|
274
828
|
{
|
|
275
829
|
clickable: !0,
|
|
276
|
-
label: `+${
|
|
277
|
-
onClick:
|
|
278
|
-
onMouseDown:
|
|
830
|
+
label: `+${V}`,
|
|
831
|
+
onClick: Ne,
|
|
832
|
+
onMouseDown: ve,
|
|
279
833
|
size: "small",
|
|
280
|
-
sx: /* @__PURE__ */
|
|
281
|
-
backgroundColor:
|
|
282
|
-
border: `1px solid ${
|
|
834
|
+
sx: /* @__PURE__ */ t((m) => ({
|
|
835
|
+
backgroundColor: j(m.palette.primary.main, 0.14),
|
|
836
|
+
border: `1px solid ${j(m.palette.primary.main, 0.22)}`,
|
|
283
837
|
borderRadius: 1,
|
|
284
|
-
color:
|
|
838
|
+
color: m.palette.primary.dark,
|
|
285
839
|
fontWeight: 600,
|
|
286
840
|
mr: 0.5,
|
|
287
841
|
"&:hover": {
|
|
288
|
-
backgroundColor:
|
|
842
|
+
backgroundColor: j(m.palette.primary.main, 0.2)
|
|
289
843
|
}
|
|
290
844
|
}), "sx")
|
|
291
845
|
},
|
|
@@ -295,30 +849,30 @@ const ue = 2, Ve = 152, ce = 72, me = 18.57, Ue = "11px !important", ze = "2px !
|
|
|
295
849
|
], "renderValue")
|
|
296
850
|
}
|
|
297
851
|
),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
852
|
+
/* @__PURE__ */ a(
|
|
853
|
+
rt,
|
|
300
854
|
{
|
|
301
|
-
anchorEl:
|
|
302
|
-
open: !!
|
|
855
|
+
anchorEl: Le,
|
|
856
|
+
open: !!Le && V > 0,
|
|
303
857
|
placement: "bottom-start",
|
|
304
|
-
sx: { zIndex: /* @__PURE__ */
|
|
305
|
-
children: /* @__PURE__ */
|
|
306
|
-
|
|
858
|
+
sx: { zIndex: /* @__PURE__ */ t((e) => e.zIndex.modal, "zIndex") },
|
|
859
|
+
children: /* @__PURE__ */ a(pt, { onClickAway: _e, children: /* @__PURE__ */ a(
|
|
860
|
+
lt,
|
|
307
861
|
{
|
|
308
862
|
className: "mt-4",
|
|
309
863
|
sx: {
|
|
310
|
-
border: /* @__PURE__ */
|
|
864
|
+
border: /* @__PURE__ */ t((e) => `1px solid ${j(e.palette.common.black, 0.12)}`, "border"),
|
|
311
865
|
display: "flex",
|
|
312
866
|
flexWrap: "wrap",
|
|
313
867
|
gap: 0.75,
|
|
314
868
|
maxWidth: 280,
|
|
315
869
|
p: 1
|
|
316
870
|
},
|
|
317
|
-
children:
|
|
318
|
-
|
|
871
|
+
children: ye.map((e) => /* @__PURE__ */ a(
|
|
872
|
+
Ke,
|
|
319
873
|
{
|
|
320
874
|
label: e.label,
|
|
321
|
-
onDelete: /* @__PURE__ */
|
|
875
|
+
onDelete: /* @__PURE__ */ t(() => xe(e.value), "onDelete"),
|
|
322
876
|
size: "small",
|
|
323
877
|
sx: { borderRadius: 1 }
|
|
324
878
|
},
|
|
@@ -328,82 +882,100 @@ const ue = 2, Ve = 152, ce = 72, me = 18.57, Ue = "11px !important", ze = "2px !
|
|
|
328
882
|
) })
|
|
329
883
|
}
|
|
330
884
|
)
|
|
331
|
-
] }) : /* @__PURE__ */
|
|
332
|
-
|
|
885
|
+
] }) : /* @__PURE__ */ a(
|
|
886
|
+
Ye,
|
|
333
887
|
{
|
|
334
|
-
className:
|
|
335
|
-
disabled:
|
|
336
|
-
filterOptions:
|
|
337
|
-
fullWidth:
|
|
338
|
-
inputValue:
|
|
339
|
-
loading:
|
|
340
|
-
options:
|
|
888
|
+
className: K("min-w-128", M),
|
|
889
|
+
disabled: L,
|
|
890
|
+
filterOptions: f ? (e) => e : void 0,
|
|
891
|
+
fullWidth: _,
|
|
892
|
+
inputValue: Ue,
|
|
893
|
+
loading: d,
|
|
894
|
+
options: F,
|
|
341
895
|
clearText: "",
|
|
342
896
|
closeText: "",
|
|
343
|
-
clearIcon: /* @__PURE__ */
|
|
897
|
+
clearIcon: /* @__PURE__ */ a(Ze, { sx: { fontSize: Xe } }),
|
|
344
898
|
openText: "",
|
|
345
|
-
popupIcon: /* @__PURE__ */
|
|
346
|
-
sx:
|
|
347
|
-
value:
|
|
348
|
-
getOptionLabel: /* @__PURE__ */
|
|
349
|
-
getOptionKey: /* @__PURE__ */
|
|
350
|
-
isOptionEqualToValue: /* @__PURE__ */
|
|
351
|
-
loadingText:
|
|
352
|
-
noOptionsText:
|
|
353
|
-
onChange: /* @__PURE__ */
|
|
354
|
-
if (
|
|
355
|
-
|
|
899
|
+
popupIcon: /* @__PURE__ */ a(Ge, {}),
|
|
900
|
+
sx: he,
|
|
901
|
+
value: b,
|
|
902
|
+
getOptionLabel: /* @__PURE__ */ t((e) => A(e.label), "getOptionLabel"),
|
|
903
|
+
getOptionKey: /* @__PURE__ */ t((e) => e.value, "getOptionKey"),
|
|
904
|
+
isOptionEqualToValue: /* @__PURE__ */ t((e, n) => e.value === n.value, "isOptionEqualToValue"),
|
|
905
|
+
loadingText: B,
|
|
906
|
+
noOptionsText: Te,
|
|
907
|
+
onChange: /* @__PURE__ */ t((e, n, c) => {
|
|
908
|
+
if (c === "clear" || c === "removeOption") {
|
|
909
|
+
re(c, !1);
|
|
356
910
|
return;
|
|
357
911
|
}
|
|
358
|
-
|
|
912
|
+
if (Z.current = !1, !n || p && q(n)) {
|
|
913
|
+
P(
|
|
914
|
+
n ? A(n.label) : ""
|
|
915
|
+
), Q("");
|
|
916
|
+
return;
|
|
917
|
+
}
|
|
918
|
+
P(A(n.label)), Q(n.value);
|
|
359
919
|
}, "onChange"),
|
|
360
|
-
onInputChange: /* @__PURE__ */
|
|
361
|
-
c == null ||
|
|
920
|
+
onInputChange: /* @__PURE__ */ t((e, n, c) => {
|
|
921
|
+
(c === "input" || c === "clear") && (Z.current = !0), P(n), I == null || I(n, c);
|
|
362
922
|
}, "onInputChange"),
|
|
363
|
-
slotProps:
|
|
364
|
-
renderInput: /* @__PURE__ */
|
|
365
|
-
var
|
|
366
|
-
return /* @__PURE__ */
|
|
367
|
-
|
|
923
|
+
slotProps: we,
|
|
924
|
+
renderInput: /* @__PURE__ */ t((e) => {
|
|
925
|
+
var n, c, m;
|
|
926
|
+
return /* @__PURE__ */ a(
|
|
927
|
+
$e,
|
|
368
928
|
{
|
|
369
929
|
...e,
|
|
370
|
-
...
|
|
371
|
-
disabled:
|
|
372
|
-
error:
|
|
373
|
-
fullWidth:
|
|
374
|
-
helperText:
|
|
375
|
-
label:
|
|
376
|
-
placeholder:
|
|
377
|
-
required:
|
|
930
|
+
...l,
|
|
931
|
+
disabled: L,
|
|
932
|
+
error: x,
|
|
933
|
+
fullWidth: _,
|
|
934
|
+
helperText: U,
|
|
935
|
+
label: O,
|
|
936
|
+
placeholder: H,
|
|
937
|
+
required: T,
|
|
378
938
|
slotProps: {
|
|
379
|
-
...
|
|
939
|
+
...l == null ? void 0 : l.slotProps,
|
|
940
|
+
htmlInput: {
|
|
941
|
+
...e.inputProps,
|
|
942
|
+
...Be,
|
|
943
|
+
className: K(
|
|
944
|
+
e.inputProps.className,
|
|
945
|
+
He
|
|
946
|
+
),
|
|
947
|
+
onBlur: /* @__PURE__ */ t(($) => {
|
|
948
|
+
ae($, e.inputProps.onBlur);
|
|
949
|
+
}, "onBlur"),
|
|
950
|
+
onKeyDown: y
|
|
951
|
+
},
|
|
380
952
|
input: {
|
|
381
953
|
...e.InputProps,
|
|
382
|
-
...(
|
|
954
|
+
...(n = l == null ? void 0 : l.slotProps) == null ? void 0 : n.input,
|
|
383
955
|
sx: {
|
|
384
|
-
...
|
|
956
|
+
...De ?? {},
|
|
385
957
|
...e.InputProps.sx ?? {},
|
|
386
|
-
...((
|
|
958
|
+
...((m = (c = l == null ? void 0 : l.slotProps) == null ? void 0 : c.input) == null ? void 0 : m.sx) ?? {}
|
|
387
959
|
},
|
|
388
|
-
endAdornment: /* @__PURE__ */
|
|
389
|
-
|
|
960
|
+
endAdornment: /* @__PURE__ */ X(We, { children: [
|
|
961
|
+
d ? /* @__PURE__ */ a(qe, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
|
|
390
962
|
e.InputProps.endAdornment
|
|
391
963
|
] })
|
|
392
964
|
}
|
|
393
965
|
},
|
|
394
|
-
variant:
|
|
966
|
+
variant: G
|
|
395
967
|
}
|
|
396
968
|
);
|
|
397
969
|
}, "renderInput"),
|
|
398
970
|
selectOnFocus: !0,
|
|
399
|
-
renderOption: /* @__PURE__ */
|
|
400
|
-
const { key:
|
|
401
|
-
return /* @__PURE__ */
|
|
971
|
+
renderOption: /* @__PURE__ */ t((e, n) => {
|
|
972
|
+
const { key: c, ...m } = e;
|
|
973
|
+
return /* @__PURE__ */ a("li", { ...m, children: je(n) }, c);
|
|
402
974
|
}, "renderOption")
|
|
403
975
|
}
|
|
404
976
|
);
|
|
405
977
|
}, "OwpSelectorAutocomplete");
|
|
406
978
|
export {
|
|
407
|
-
|
|
979
|
+
Bt as OwpSelectorAutocomplete
|
|
408
980
|
};
|
|
409
981
|
//# sourceMappingURL=OwpSelectorAutocomplete.js.map
|