@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.
Files changed (44) hide show
  1. package/dist/_virtual/index20.js +2 -2
  2. package/dist/_virtual/index21.js +2 -2
  3. package/dist/_virtual/index22.js +2 -2
  4. package/dist/components/OwpPageContent/OwpPageContent.js +1 -1
  5. package/dist/components/OwpPageContent/OwpPageContent.js.map +1 -1
  6. package/dist/components/OwpSection/OwpSection.js +1 -1
  7. package/dist/components/OwpSection/OwpSection.js.map +1 -1
  8. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +813 -241
  9. package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -1
  10. package/dist/components/OwpTreeGrid/OwpTreeGrid.js +266 -252
  11. package/dist/components/OwpTreeGrid/OwpTreeGrid.js.map +1 -1
  12. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js +59 -0
  13. package/dist/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.js.map +1 -0
  14. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js +27 -0
  15. package/dist/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.js.map +1 -0
  16. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js +607 -510
  17. package/dist/components/OwpTreeGrid/internal/treeGridRuntime.js.map +1 -1
  18. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js +61 -0
  19. package/dist/components/OwpTreeGrid/internal/treeGridSelection.js.map +1 -0
  20. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js +157 -154
  21. package/dist/components/OwpTreeGrid/internal/treeGridTheme.js.map +1 -1
  22. package/dist/hooks/useMinimumVisibleState.js.map +1 -0
  23. package/dist/hooks.js +47 -45
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/match/index.js +1 -1
  26. package/dist/node_modules/.pnpm/autosuggest-highlight@3.3.4/node_modules/autosuggest-highlight/parse/index.js +1 -1
  27. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE128/constants.js +1 -1
  28. package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/constants.js +1 -1
  29. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
  30. package/dist/types/components/OwpSelectorBase/types/types.d.ts +2 -0
  31. package/dist/types/components/OwpTreeGrid/OwpTreeGrid.d.ts +5 -1
  32. package/dist/types/components/OwpTreeGrid/internal/OwpTreeGridErrorTooltip.d.ts +12 -0
  33. package/dist/types/components/OwpTreeGrid/internal/hooks/useOwpTreeGridErrorTooltip.d.ts +17 -0
  34. package/dist/types/components/OwpTreeGrid/internal/treeGridRuntime.d.ts +6 -1
  35. package/dist/types/components/OwpTreeGrid/internal/treeGridSelection.d.ts +12 -0
  36. package/dist/types/hooks/index.d.ts +1 -0
  37. package/dist/types/hooks/useMinimumVisibleState.d.ts +6 -0
  38. package/dist/types/utils/treeGridUtil.d.ts +6 -1
  39. package/dist/utils/treeGridUtil.js +299 -251
  40. package/dist/utils/treeGridUtil.js.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/hooks/internal/useMinimumVisibleState.js.map +0 -1
  43. package/dist/types/hooks/internal/useMinimumVisibleState.d.ts +0 -7
  44. /package/dist/hooks/{internal/useMinimumVisibleState.js → useMinimumVisibleState.js} +0 -0
@@ -1,66 +1,542 @@
1
- var Se = Object.defineProperty;
2
- var o = (s, a) => Se(s, "name", { value: a, configurable: !0 });
3
- import { jsxs as x, jsx as i, Fragment as D } 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 be } from "@emotion/react";
5
- import { useOwpTranslation as ye } from "../../hooks/useOwpTranslation.js";
6
- import te 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 oe 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 Oe, Chip as P, Checkbox as Me, TextField as ne, CircularProgress as le, Autocomplete as re, ClickAwayListener as De, Paper as Pe, Popper as Ne } from "@mui/material";
9
- import { alpha as g } from "@mui/material/styles";
10
- import { clsx as ie } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
11
- import { useMemo as se, useState as we, useRef as ae, useEffect as pe } from "react";
12
- import { SELECTOR_ALL_VALUE_LABEL_SX as ke, SELECTOR_ALL_OPTION_LABEL_SX as Re } from "./selectorBaseStyles.js";
13
- import { isSelectorAllOption as d } from "./utils/querySelectorUtils.js";
14
- const ue = 2, Ve = 152, ce = 72, me = 18.57, Ue = "11px !important", ze = "2px !important", He = "5px !important", de = /* @__PURE__ */ o((s, a) => {
15
- const p = s.target;
16
- return p instanceof HTMLInputElement ? p.value : a ?? "";
17
- }, "getCurrentAutocompleteInputValue"), fe = /* @__PURE__ */ o((s) => typeof s == "string" || typeof s == "number" ? `${s}` : "", "getAutocompleteOptionLabel"), Te = /* @__PURE__ */ o((s) => /* @__PURE__ */ i(
18
- Oe,
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: d(s) ? Re : void 0,
22
- children: s.label
182
+ sx: q(i) ? ft : void 0,
183
+ children: i.label
23
184
  }
24
- ), "renderAutocompleteOptionLabel"), Fe = /* @__PURE__ */ o(({ hookResult: s, props: a }) => {
25
- const { t: p } = ye(), {
26
- autocompleteInputValue: f,
27
- className: N,
28
- disableClientFilter: C,
29
- disabled: h,
30
- error: w,
31
- fullWidth: A,
32
- helperText: k,
33
- label: R,
34
- loading: E,
35
- loadingText: V,
36
- multiple: U,
37
- noOptionsText: Ie,
38
- onAutocompleteInputChange: c,
39
- placeholder: z,
40
- required: H,
41
- showAllOption: T = !0,
42
- textFieldProps: n,
43
- valueTextAlign: v
44
- } = a, {
45
- allOption: _,
46
- clearSelection: B,
47
- isAllSelected: m,
48
- resolvedOptions: W,
49
- restoreAllSelection: K,
50
- selectAll: $,
51
- selectedOption: he,
52
- selectedOptions: S,
53
- selectMultipleValues: q,
54
- selectSingleValue: G
55
- } = s, j = T ? [_, ...W] : W, b = se(
56
- () => S.filter((e) => !d(e)),
57
- [S]
58
- ), X = se(
59
- () => m ? [] : b.slice(ue),
60
- [b, m]
61
- ), u = X.length, [Z, y] = we(null), J = ae(null), Q = Ie ?? p(C ? "Message.검색 결과 없음" : "Message.조회된 결과가 없습니다."), Y = ae(
62
- U && T && ((a.value ?? a.defaultValue) == null || (a.value ?? a.defaultValue) === "")
63
- ), F = {
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
- }, L = (n == null ? void 0 : n.variant) ?? "standard", M = L === "standard" ? Ue : L === "outlined" ? (n == null ? void 0 : n.size) === "small" ? He : ze : void 0, Ae = M || v ? {
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
- ...M ? { paddingLeft: M } : {},
87
- ...v ? { textAlign: v } : {}
562
+ ...w ? { paddingLeft: w } : {},
563
+ ...s ? { textAlign: s } : {}
88
564
  }
89
- } : void 0, ee = {
90
- minWidth: Ve,
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
- }, Ee = {
107
- ...ee,
582
+ }, oe = {
583
+ ...he,
108
584
  "& .MuiAutocomplete-inputRoot .MuiAutocomplete-input": {
109
- flexBasis: ce,
110
- minWidth: ce
585
+ flexBasis: Fe,
586
+ minWidth: Fe
111
587
  }
112
- };
113
- pe(() => {
114
- u || y(null);
115
- }, [u]), pe(() => {
116
- var l;
117
- if (!Y.current)
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 = (l = J.current) == null ? void 0 : l.closest("form");
619
+ const e = (c = Ce.current) == null ? void 0 : c.closest("form");
120
620
  if (!e)
121
621
  return;
122
- const t = /* @__PURE__ */ o(() => {
622
+ const n = /* @__PURE__ */ t(() => {
123
623
  window.setTimeout(() => {
124
- K();
624
+ pe();
125
625
  }, 0);
126
626
  }, "handleFormReset");
127
- return e.addEventListener("reset", t), () => {
128
- e.removeEventListener("reset", t);
627
+ return e.addEventListener("reset", n), () => {
628
+ e.removeEventListener("reset", n);
129
629
  };
130
- }, [K]);
131
- const Le = /* @__PURE__ */ o(() => {
132
- y(null);
133
- }, "handleHiddenChipPopperClose"), xe = /* @__PURE__ */ o((e) => {
630
+ }, [pe]);
631
+ const _e = /* @__PURE__ */ t(() => {
632
+ Ie(null);
633
+ }, "handleHiddenChipPopperClose"), ve = /* @__PURE__ */ t((e) => {
134
634
  e.preventDefault();
135
- }, "handleHiddenChipSummaryMouseDown"), ge = /* @__PURE__ */ o((e) => {
136
- e.preventDefault(), e.stopPropagation(), y(
137
- (t) => t === e.currentTarget ? null : e.currentTarget
635
+ }, "handleHiddenChipSummaryMouseDown"), Ne = /* @__PURE__ */ t((e) => {
636
+ e.preventDefault(), e.stopPropagation(), Ie(
637
+ (n) => n === e.currentTarget ? null : e.currentTarget
138
638
  );
139
- }, "handleHiddenChipSummaryClick"), Ce = /* @__PURE__ */ o((e) => {
140
- q(
141
- b.filter((t) => t.value !== e).map((t) => t.value)
639
+ }, "handleHiddenChipSummaryClick"), xe = /* @__PURE__ */ t((e) => {
640
+ J(
641
+ fe.filter((n) => n.value !== e).map((n) => n.value)
142
642
  );
143
- }, "handleHiddenChipDelete"), ve = /* @__PURE__ */ o((e) => {
144
- var l;
145
- const t = de(e, f);
146
- (m || u > 0) && t === "" && (e.key === "Backspace" || e.key === "Delete") && (e.defaultMuiPrevented = !0, e.preventDefault(), e.stopPropagation()), (l = n == null ? void 0 : n.onKeyDown) == null || l.call(
147
- n,
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
- return U ? /* @__PURE__ */ x(D, { children: [
152
- /* @__PURE__ */ i(
153
- re,
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: J,
156
- className: ie("min-w-128", N),
709
+ ref: Ce,
710
+ className: K("min-w-128", M),
157
711
  disableCloseOnSelect: !0,
158
- disabled: h,
159
- filterOptions: C ? (e) => e : void 0,
160
- fullWidth: A,
161
- inputValue: f,
162
- loading: E,
712
+ disabled: L,
713
+ filterOptions: f ? (e) => e : void 0,
714
+ fullWidth: _,
715
+ inputValue: h,
716
+ loading: d,
163
717
  multiple: !0,
164
- options: j,
718
+ options: F,
165
719
  clearText: "",
166
720
  closeText: "",
167
- clearIcon: /* @__PURE__ */ i(oe, { sx: { fontSize: me } }),
721
+ clearIcon: /* @__PURE__ */ a(Ze, { sx: { fontSize: Xe } }),
168
722
  openText: "",
169
- popupIcon: /* @__PURE__ */ i(te, {}),
170
- sx: Ee,
171
- value: S,
172
- getOptionLabel: /* @__PURE__ */ o((e) => fe(e.label), "getOptionLabel"),
173
- getOptionKey: /* @__PURE__ */ o((e) => e.value, "getOptionKey"),
174
- isOptionEqualToValue: /* @__PURE__ */ o((e, t) => e.value === t.value, "isOptionEqualToValue"),
175
- loadingText: V ?? p("Common.로딩 중..."),
176
- noOptionsText: Q,
177
- onChange: /* @__PURE__ */ o((e, t, l, r) => {
178
- const O = e.type === "keydown" ? de(
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
- f
181
- ) : f ?? "";
182
- if (l === "removeOption" && e.type === "keydown" && O === "" && (m || u > 0)) {
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 (l === "clear") {
187
- if (Y.current) {
188
- $();
740
+ if (c === "clear") {
741
+ if (ee.current) {
742
+ me();
189
743
  return;
190
744
  }
191
- B();
745
+ D();
192
746
  return;
193
747
  }
194
- if (T && (r != null && r.option) && d(r.option)) {
195
- if (m) {
196
- B();
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
- q(
203
- t.filter((I) => !d(I)).map((I) => I.value)
756
+ J(
757
+ n.filter((Me) => !q(Me)).map((Me) => Me.value)
204
758
  );
205
759
  }, "onChange"),
206
- onInputChange: /* @__PURE__ */ o((e, t, l) => {
207
- c == null || c(t, l);
760
+ onInputChange: /* @__PURE__ */ t((e, n, c) => {
761
+ I == null || I(n, c);
208
762
  }, "onInputChange"),
209
- onKeyDown: ve,
210
- slotProps: F,
211
- renderInput: /* @__PURE__ */ o((e) => {
212
- var t;
213
- return /* @__PURE__ */ i(
214
- ne,
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
- ...n,
218
- disabled: h,
219
- error: w,
220
- fullWidth: A,
221
- helperText: k,
222
- label: R,
223
- placeholder: z ?? p("Common.검색"),
224
- required: H,
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
- ...n == null ? void 0 : n.slotProps,
780
+ ...l == null ? void 0 : l.slotProps,
227
781
  input: {
228
782
  ...e.InputProps,
229
- ...(t = n == null ? void 0 : n.slotProps) == null ? void 0 : t.input,
230
- endAdornment: /* @__PURE__ */ x(D, { children: [
231
- E ? /* @__PURE__ */ i(le, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
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: L
790
+ variant: G
237
791
  }
238
792
  );
239
793
  }, "renderInput"),
240
- renderOption: /* @__PURE__ */ o((e, t, l) => {
241
- const { key: r, ...O } = e;
242
- return /* @__PURE__ */ x("li", { ...O, children: [
243
- /* @__PURE__ */ i(Me, { checked: l.selected, className: "!mr-8 !p-0", size: "small" }),
244
- Te(t)
245
- ] }, r);
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__ */ o((e, t) => T && m ? [
248
- /* @__PURE__ */ i(
249
- Oe,
801
+ renderValue: /* @__PURE__ */ t((e, n) => p && S ? [
802
+ /* @__PURE__ */ a(
803
+ W,
250
804
  {
251
805
  component: "span",
252
- sx: ke,
253
- children: _.label
806
+ sx: dt,
807
+ children: C.label
254
808
  },
255
- _.value
809
+ C.value
256
810
  )
257
811
  ] : [
258
- ...e.filter((r) => !d(r)).slice(0, ue).map((r, O) => {
259
- const { key: I, ..._e } = t({ index: O });
260
- return /* @__PURE__ */ be(
261
- P,
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
- ..._e,
264
- key: I,
265
- label: r.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
- ...u > 0 ? [
272
- /* @__PURE__ */ i(
273
- P,
825
+ ...V > 0 ? [
826
+ /* @__PURE__ */ a(
827
+ Ke,
274
828
  {
275
829
  clickable: !0,
276
- label: `+${u}`,
277
- onClick: ge,
278
- onMouseDown: xe,
830
+ label: `+${V}`,
831
+ onClick: Ne,
832
+ onMouseDown: ve,
279
833
  size: "small",
280
- sx: /* @__PURE__ */ o((r) => ({
281
- backgroundColor: g(r.palette.primary.main, 0.14),
282
- border: `1px solid ${g(r.palette.primary.main, 0.22)}`,
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: r.palette.primary.dark,
838
+ color: m.palette.primary.dark,
285
839
  fontWeight: 600,
286
840
  mr: 0.5,
287
841
  "&:hover": {
288
- backgroundColor: g(r.palette.primary.main, 0.2)
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__ */ i(
299
- Ne,
852
+ /* @__PURE__ */ a(
853
+ rt,
300
854
  {
301
- anchorEl: Z,
302
- open: !!Z && u > 0,
855
+ anchorEl: Le,
856
+ open: !!Le && V > 0,
303
857
  placement: "bottom-start",
304
- sx: { zIndex: /* @__PURE__ */ o((e) => e.zIndex.modal, "zIndex") },
305
- children: /* @__PURE__ */ i(De, { onClickAway: Le, children: /* @__PURE__ */ i(
306
- Pe,
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__ */ o((e) => `1px solid ${g(e.palette.common.black, 0.12)}`, "border"),
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: X.map((e) => /* @__PURE__ */ i(
318
- P,
871
+ children: ye.map((e) => /* @__PURE__ */ a(
872
+ Ke,
319
873
  {
320
874
  label: e.label,
321
- onDelete: /* @__PURE__ */ o(() => Ce(e.value), "onDelete"),
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__ */ i(
332
- re,
885
+ ] }) : /* @__PURE__ */ a(
886
+ Ye,
333
887
  {
334
- className: ie("min-w-128", N),
335
- disabled: h,
336
- filterOptions: C ? (e) => e : void 0,
337
- fullWidth: A,
338
- inputValue: f,
339
- loading: E,
340
- options: j,
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__ */ i(oe, { sx: { fontSize: me } }),
897
+ clearIcon: /* @__PURE__ */ a(Ze, { sx: { fontSize: Xe } }),
344
898
  openText: "",
345
- popupIcon: /* @__PURE__ */ i(te, {}),
346
- sx: ee,
347
- value: he,
348
- getOptionLabel: /* @__PURE__ */ o((e) => fe(e.label), "getOptionLabel"),
349
- getOptionKey: /* @__PURE__ */ o((e) => e.value, "getOptionKey"),
350
- isOptionEqualToValue: /* @__PURE__ */ o((e, t) => e.value === t.value, "isOptionEqualToValue"),
351
- loadingText: V ?? p("Common.로딩 중..."),
352
- noOptionsText: Q,
353
- onChange: /* @__PURE__ */ o((e, t) => {
354
- if (!t || T && d(t)) {
355
- G("");
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
- G(t.value);
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__ */ o((e, t, l) => {
361
- c == null || c(t, l);
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: F,
364
- renderInput: /* @__PURE__ */ o((e) => {
365
- var t, l, r;
366
- return /* @__PURE__ */ i(
367
- ne,
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
- ...n,
371
- disabled: h,
372
- error: w,
373
- fullWidth: A,
374
- helperText: k,
375
- label: R,
376
- placeholder: z,
377
- required: H,
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
- ...n == null ? void 0 : n.slotProps,
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
- ...(t = n == null ? void 0 : n.slotProps) == null ? void 0 : t.input,
954
+ ...(n = l == null ? void 0 : l.slotProps) == null ? void 0 : n.input,
383
955
  sx: {
384
- ...Ae ?? {},
956
+ ...De ?? {},
385
957
  ...e.InputProps.sx ?? {},
386
- ...((r = (l = n == null ? void 0 : n.slotProps) == null ? void 0 : l.input) == null ? void 0 : r.sx) ?? {}
958
+ ...((m = (c = l == null ? void 0 : l.slotProps) == null ? void 0 : c.input) == null ? void 0 : m.sx) ?? {}
387
959
  },
388
- endAdornment: /* @__PURE__ */ x(D, { children: [
389
- E ? /* @__PURE__ */ i(le, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
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: L
966
+ variant: G
395
967
  }
396
968
  );
397
969
  }, "renderInput"),
398
970
  selectOnFocus: !0,
399
- renderOption: /* @__PURE__ */ o((e, t) => {
400
- const { key: l, ...r } = e;
401
- return /* @__PURE__ */ i("li", { ...r, children: Te(t) }, l);
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
- Fe as OwpSelectorAutocomplete
979
+ Bt as OwpSelectorAutocomplete
408
980
  };
409
981
  //# sourceMappingURL=OwpSelectorAutocomplete.js.map