@owp/core 2.5.31 → 2.5.33

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