@owp/core 2.2.3 → 2.2.5
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/index11.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index14.js +2 -2
- package/dist/_virtual/index15.js +2 -5
- package/dist/_virtual/index15.js.map +1 -1
- package/dist/_virtual/index16.js +2 -2
- package/dist/_virtual/index17.js +2 -2
- package/dist/_virtual/index5.js +5 -2
- package/dist/_virtual/index5.js.map +1 -1
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js +68 -149
- package/dist/components/OwpCommonCode/OwpCommonCodeSelector.js.map +1 -1
- package/dist/components/OwpMrtTable/OwpMrtTable.js +186 -162
- package/dist/components/OwpMrtTable/OwpMrtTable.js.map +1 -1
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js +52 -38
- package/dist/components/OwpOptionSelector/OwpOptionSelector.js.map +1 -1
- package/dist/components/OwpPageTitle/OwpPageTitle.js +74 -18
- package/dist/components/OwpPageTitle/OwpPageTitle.js.map +1 -1
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js +232 -0
- package/dist/components/OwpQuerySelector/OwpQuerySelector.js.map +1 -0
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js +44 -29
- package/dist/components/OwpSearchFilter/OwpSearchFilter.js.map +1 -1
- package/dist/components/OwpSection/OwpSection.js +102 -41
- package/dist/components/OwpSection/OwpSection.js.map +1 -1
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js +381 -0
- package/dist/components/OwpSelectorBase/OwpSelectorAutocomplete.js.map +1 -0
- package/dist/components/OwpSelectorBase/OwpSelectorBase.js +14 -0
- package/dist/components/OwpSelectorBase/OwpSelectorBase.js.map +1 -0
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js +152 -0
- package/dist/components/OwpSelectorBase/OwpSelectorSelect.js.map +1 -0
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js +120 -0
- package/dist/components/OwpSelectorBase/hooks/useOwpSelectorBase.js.map +1 -0
- package/dist/components/OwpSelectorBase/utils/querySelectorUtils.js +24 -0
- package/dist/components/OwpSelectorBase/utils/querySelectorUtils.js.map +1 -0
- package/dist/hooks/useHeaderWrapState.js +48 -0
- package/dist/hooks/useHeaderWrapState.js.map +1 -0
- package/dist/hooks.js +40 -38
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +39 -37
- package/dist/index.js.map +1 -1
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js +63 -27
- package/dist/layout/components/navigation/vertical/NavVerticalLayout.js.map +1 -1
- package/dist/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 +9 -0
- package/dist/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.map +1 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isFunction.js +10 -0
- package/dist/node_modules/.pnpm/es-toolkit@1.39.10/node_modules/es-toolkit/dist/compat/predicate/isFunction.js.map +1 -0
- 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/CODE128/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE39/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/CODE93/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/constants.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/EAN_UPC/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/GenericBarcode/index.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/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/ITF/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/MSI/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/codabar/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/barcodes/pharmacode/index.js +1 -1
- package/dist/node_modules/.pnpm/jsbarcode@3.12.1/node_modules/jsbarcode/bin/renderers/index.js +1 -1
- package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/node_modules/.pnpm/react-imask@7.6.1_react@19.2.4/node_modules/react-imask/esm/mixin.js +1 -1
- package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/.pnpm/react-overlays@5.2.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/react-overlays/esm/Portal.js +1 -1
- package/dist/owp-app.css +1 -1
- package/dist/types/components/OwpCommonCode/OwpCommonCodeSelector.d.ts +16 -6
- package/dist/types/components/OwpOptionSelector/OwpOptionSelector.d.ts +9 -8
- package/dist/types/components/OwpQuerySelector/OwpQuerySelector.d.ts +6 -0
- package/dist/types/components/OwpQuerySelector/index.d.ts +2 -0
- package/dist/types/components/OwpQuerySelector/types/index.d.ts +1 -0
- package/dist/types/components/OwpQuerySelector/types/types.d.ts +42 -0
- package/dist/types/components/OwpSection/OwpSection.d.ts +3 -1
- package/dist/types/components/OwpSelectorBase/OwpSelectorAutocomplete.d.ts +11 -0
- package/dist/types/components/OwpSelectorBase/OwpSelectorBase.d.ts +6 -0
- package/dist/types/components/OwpSelectorBase/OwpSelectorSelect.d.ts +11 -0
- package/dist/types/components/OwpSelectorBase/hooks/useOwpSelectorBase.d.ts +6 -0
- package/dist/types/components/OwpSelectorBase/types/index.d.ts +1 -0
- package/dist/types/components/OwpSelectorBase/types/types.d.ts +59 -0
- package/dist/types/components/OwpSelectorBase/utils/index.d.ts +1 -0
- package/dist/types/components/OwpSelectorBase/utils/querySelectorUtils.d.ts +31 -0
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useHeaderWrapState.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var ge = Object.defineProperty;
|
|
2
|
+
var n = (a, s) => ge(a, "name", { value: s, configurable: !0 });
|
|
3
|
+
import { jsxs as C, jsx as r, Fragment as M } 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 xe } from "@emotion/react";
|
|
5
|
+
import { useOwpTranslation as be } from "../../hooks/useOwpTranslation.js";
|
|
6
|
+
import Y 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 F 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 ve, Chip as E, Checkbox as Ae, TextField as ee, CircularProgress as te, Autocomplete as oe, ClickAwayListener as ye, Paper as Se, Popper as Me } from "@mui/material";
|
|
9
|
+
import { alpha as g } from "@mui/material/styles";
|
|
10
|
+
import { clsx as ne } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
11
|
+
import { useMemo as le, useState as Ee, useRef as re, useEffect as ie } from "react";
|
|
12
|
+
import { isSelectorAllOption as h } from "./utils/querySelectorUtils.js";
|
|
13
|
+
const ae = 2, we = 152, se = 72, ue = 18.57, pe = /* @__PURE__ */ n((a, s) => {
|
|
14
|
+
const u = a.target;
|
|
15
|
+
return u instanceof HTMLInputElement ? u.value : s ?? "";
|
|
16
|
+
}, "getCurrentAutocompleteInputValue"), ce = /* @__PURE__ */ n((a) => typeof a == "string" || typeof a == "number" ? `${a}` : "", "getAutocompleteOptionLabel"), Be = /* @__PURE__ */ n(({ hookResult: a, props: s }) => {
|
|
17
|
+
const { t: u } = be(), {
|
|
18
|
+
autocompleteInputValue: d,
|
|
19
|
+
className: w,
|
|
20
|
+
disableAllValueItem: f,
|
|
21
|
+
disableClientFilter: k,
|
|
22
|
+
disabled: I,
|
|
23
|
+
error: L,
|
|
24
|
+
fullWidth: O,
|
|
25
|
+
helperText: D,
|
|
26
|
+
label: V,
|
|
27
|
+
loading: T,
|
|
28
|
+
loadingText: N,
|
|
29
|
+
multiple: z,
|
|
30
|
+
noOptionsText: me,
|
|
31
|
+
onAutocompleteInputChange: c,
|
|
32
|
+
placeholder: R,
|
|
33
|
+
required: P,
|
|
34
|
+
textFieldProps: o
|
|
35
|
+
} = s, {
|
|
36
|
+
allOption: x,
|
|
37
|
+
clearSelection: _,
|
|
38
|
+
isAllSelected: m,
|
|
39
|
+
resolvedOptions: H,
|
|
40
|
+
restoreAllSelection: W,
|
|
41
|
+
selectAll: B,
|
|
42
|
+
selectedOption: de,
|
|
43
|
+
selectedOptions: b,
|
|
44
|
+
selectMultipleValues: U,
|
|
45
|
+
selectSingleValue: $
|
|
46
|
+
} = a, q = f ? H : [x, ...H], v = le(
|
|
47
|
+
() => b.filter((e) => !h(e)),
|
|
48
|
+
[b]
|
|
49
|
+
), K = le(
|
|
50
|
+
() => m ? [] : v.slice(ae),
|
|
51
|
+
[v, m]
|
|
52
|
+
), p = K.length, [j, A] = Ee(null), Z = re(null), G = me ?? u("Message.검색 결과 없음"), J = re(
|
|
53
|
+
z && !f && ((s.value ?? s.defaultValue) == null || (s.value ?? s.defaultValue) === "")
|
|
54
|
+
), Q = {
|
|
55
|
+
clearIndicator: {
|
|
56
|
+
className: "m-0 p-0",
|
|
57
|
+
size: "small"
|
|
58
|
+
},
|
|
59
|
+
paper: {
|
|
60
|
+
sx: {
|
|
61
|
+
"& .MuiAutocomplete-noOptions": {
|
|
62
|
+
fontSize: 14,
|
|
63
|
+
px: 1,
|
|
64
|
+
py: 1.5,
|
|
65
|
+
whiteSpace: "nowrap"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
popupIndicator: {
|
|
70
|
+
className: "m-0 p-0",
|
|
71
|
+
size: "small"
|
|
72
|
+
}
|
|
73
|
+
}, X = {
|
|
74
|
+
minWidth: we,
|
|
75
|
+
"& .MuiAutocomplete-endAdornment": {
|
|
76
|
+
"& .MuiAutocomplete-clearIndicator + .MuiAutocomplete-popupIndicator": {
|
|
77
|
+
ml: 0
|
|
78
|
+
},
|
|
79
|
+
"& .MuiIconButton-root": {
|
|
80
|
+
m: 0,
|
|
81
|
+
p: 0
|
|
82
|
+
},
|
|
83
|
+
"& > :not(style) + :not(style)": {
|
|
84
|
+
ml: 0
|
|
85
|
+
},
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
gap: 0,
|
|
88
|
+
right: 0
|
|
89
|
+
}
|
|
90
|
+
}, fe = {
|
|
91
|
+
...X,
|
|
92
|
+
"& .MuiAutocomplete-inputRoot .MuiAutocomplete-input": {
|
|
93
|
+
flexBasis: se,
|
|
94
|
+
minWidth: se
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
ie(() => {
|
|
98
|
+
p || A(null);
|
|
99
|
+
}, [p]), ie(() => {
|
|
100
|
+
var l;
|
|
101
|
+
if (!J.current)
|
|
102
|
+
return;
|
|
103
|
+
const e = (l = Z.current) == null ? void 0 : l.closest("form");
|
|
104
|
+
if (!e)
|
|
105
|
+
return;
|
|
106
|
+
const t = /* @__PURE__ */ n(() => {
|
|
107
|
+
window.setTimeout(() => {
|
|
108
|
+
W();
|
|
109
|
+
}, 0);
|
|
110
|
+
}, "handleFormReset");
|
|
111
|
+
return e.addEventListener("reset", t), () => {
|
|
112
|
+
e.removeEventListener("reset", t);
|
|
113
|
+
};
|
|
114
|
+
}, [W]);
|
|
115
|
+
const he = /* @__PURE__ */ n(() => {
|
|
116
|
+
A(null);
|
|
117
|
+
}, "handleHiddenChipPopperClose"), Ie = /* @__PURE__ */ n((e) => {
|
|
118
|
+
e.preventDefault();
|
|
119
|
+
}, "handleHiddenChipSummaryMouseDown"), Oe = /* @__PURE__ */ n((e) => {
|
|
120
|
+
e.preventDefault(), e.stopPropagation(), A(
|
|
121
|
+
(t) => t === e.currentTarget ? null : e.currentTarget
|
|
122
|
+
);
|
|
123
|
+
}, "handleHiddenChipSummaryClick"), Te = /* @__PURE__ */ n((e) => {
|
|
124
|
+
U(
|
|
125
|
+
v.filter((t) => t.value !== e).map((t) => t.value)
|
|
126
|
+
);
|
|
127
|
+
}, "handleHiddenChipDelete"), Ce = /* @__PURE__ */ n((e) => {
|
|
128
|
+
var l;
|
|
129
|
+
const t = pe(e, d);
|
|
130
|
+
(m || p > 0) && t === "" && (e.key === "Backspace" || e.key === "Delete") && (e.defaultMuiPrevented = !0, e.preventDefault(), e.stopPropagation()), (l = o == null ? void 0 : o.onKeyDown) == null || l.call(o, e);
|
|
131
|
+
}, "handleMultipleRootKeyDown");
|
|
132
|
+
return z ? /* @__PURE__ */ C(M, { children: [
|
|
133
|
+
/* @__PURE__ */ r(
|
|
134
|
+
oe,
|
|
135
|
+
{
|
|
136
|
+
ref: Z,
|
|
137
|
+
className: ne("min-w-128", w),
|
|
138
|
+
disableCloseOnSelect: !0,
|
|
139
|
+
disabled: I,
|
|
140
|
+
filterOptions: k ? (e) => e : void 0,
|
|
141
|
+
fullWidth: O,
|
|
142
|
+
inputValue: d,
|
|
143
|
+
loading: T,
|
|
144
|
+
multiple: !0,
|
|
145
|
+
options: q,
|
|
146
|
+
clearText: "",
|
|
147
|
+
closeText: "",
|
|
148
|
+
clearIcon: /* @__PURE__ */ r(F, { sx: { fontSize: ue } }),
|
|
149
|
+
openText: "",
|
|
150
|
+
popupIcon: /* @__PURE__ */ r(Y, {}),
|
|
151
|
+
sx: fe,
|
|
152
|
+
value: b,
|
|
153
|
+
getOptionLabel: /* @__PURE__ */ n((e) => ce(e.label), "getOptionLabel"),
|
|
154
|
+
isOptionEqualToValue: /* @__PURE__ */ n((e, t) => e.value === t.value, "isOptionEqualToValue"),
|
|
155
|
+
loadingText: N ?? u("Common.로딩 중..."),
|
|
156
|
+
noOptionsText: G,
|
|
157
|
+
onChange: /* @__PURE__ */ n((e, t, l, i) => {
|
|
158
|
+
const y = e.type === "keydown" ? pe(
|
|
159
|
+
e,
|
|
160
|
+
d
|
|
161
|
+
) : d ?? "";
|
|
162
|
+
if (l === "removeOption" && e.type === "keydown" && y === "" && (m || p > 0)) {
|
|
163
|
+
e.preventDefault(), e.stopPropagation();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (l === "clear") {
|
|
167
|
+
if (J.current) {
|
|
168
|
+
B();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
_();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (!f && (i != null && i.option) && h(i.option)) {
|
|
175
|
+
if (m) {
|
|
176
|
+
_();
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
B();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
U(
|
|
183
|
+
t.filter((S) => !h(S)).map((S) => S.value)
|
|
184
|
+
);
|
|
185
|
+
}, "onChange"),
|
|
186
|
+
onInputChange: /* @__PURE__ */ n((e, t, l) => {
|
|
187
|
+
c == null || c(t, l);
|
|
188
|
+
}, "onInputChange"),
|
|
189
|
+
onKeyDown: Ce,
|
|
190
|
+
slotProps: Q,
|
|
191
|
+
renderInput: /* @__PURE__ */ n((e) => {
|
|
192
|
+
var t;
|
|
193
|
+
return /* @__PURE__ */ r(
|
|
194
|
+
ee,
|
|
195
|
+
{
|
|
196
|
+
...e,
|
|
197
|
+
...o,
|
|
198
|
+
disabled: I,
|
|
199
|
+
error: L,
|
|
200
|
+
fullWidth: O,
|
|
201
|
+
helperText: D,
|
|
202
|
+
label: V,
|
|
203
|
+
placeholder: R ?? u("Common.검색"),
|
|
204
|
+
required: P,
|
|
205
|
+
slotProps: {
|
|
206
|
+
...o == null ? void 0 : o.slotProps,
|
|
207
|
+
input: {
|
|
208
|
+
...e.InputProps,
|
|
209
|
+
...(t = o == null ? void 0 : o.slotProps) == null ? void 0 : t.input,
|
|
210
|
+
endAdornment: /* @__PURE__ */ C(M, { children: [
|
|
211
|
+
T ? /* @__PURE__ */ r(te, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
|
|
212
|
+
e.InputProps.endAdornment
|
|
213
|
+
] })
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
variant: (o == null ? void 0 : o.variant) ?? "standard"
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
}, "renderInput"),
|
|
220
|
+
renderOption: /* @__PURE__ */ n((e, t, l) => /* @__PURE__ */ C("li", { ...e, children: [
|
|
221
|
+
/* @__PURE__ */ r(Ae, { checked: l.selected, className: "!mr-8 !p-0", size: "small" }),
|
|
222
|
+
t.label
|
|
223
|
+
] }), "renderOption"),
|
|
224
|
+
renderValue: /* @__PURE__ */ n((e, t) => !f && m ? [
|
|
225
|
+
/* @__PURE__ */ r(
|
|
226
|
+
ve,
|
|
227
|
+
{
|
|
228
|
+
component: "span",
|
|
229
|
+
sx: { color: "text.primary", fontWeight: 500, mr: 0.5 },
|
|
230
|
+
children: x.label
|
|
231
|
+
},
|
|
232
|
+
x.value
|
|
233
|
+
)
|
|
234
|
+
] : [
|
|
235
|
+
...e.filter((i) => !h(i)).slice(0, ae).map((i, y) => /* @__PURE__ */ xe(
|
|
236
|
+
E,
|
|
237
|
+
{
|
|
238
|
+
...t({ index: y }),
|
|
239
|
+
key: i.value,
|
|
240
|
+
label: i.label,
|
|
241
|
+
size: "small",
|
|
242
|
+
sx: { borderRadius: 1, mr: 0.5 }
|
|
243
|
+
}
|
|
244
|
+
)),
|
|
245
|
+
...p > 0 ? [
|
|
246
|
+
/* @__PURE__ */ r(
|
|
247
|
+
E,
|
|
248
|
+
{
|
|
249
|
+
clickable: !0,
|
|
250
|
+
label: `+${p}`,
|
|
251
|
+
onClick: Oe,
|
|
252
|
+
onMouseDown: Ie,
|
|
253
|
+
size: "small",
|
|
254
|
+
sx: /* @__PURE__ */ n((i) => ({
|
|
255
|
+
backgroundColor: g(i.palette.primary.main, 0.14),
|
|
256
|
+
border: `1px solid ${g(i.palette.primary.main, 0.22)}`,
|
|
257
|
+
borderRadius: 1,
|
|
258
|
+
color: i.palette.primary.dark,
|
|
259
|
+
fontWeight: 600,
|
|
260
|
+
mr: 0.5,
|
|
261
|
+
"&:hover": {
|
|
262
|
+
backgroundColor: g(i.palette.primary.main, 0.2)
|
|
263
|
+
}
|
|
264
|
+
}), "sx")
|
|
265
|
+
},
|
|
266
|
+
"owp-selector-hidden-chip-summary"
|
|
267
|
+
)
|
|
268
|
+
] : []
|
|
269
|
+
], "renderValue")
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ r(
|
|
273
|
+
Me,
|
|
274
|
+
{
|
|
275
|
+
anchorEl: j,
|
|
276
|
+
open: !!j && p > 0,
|
|
277
|
+
placement: "bottom-start",
|
|
278
|
+
sx: { zIndex: /* @__PURE__ */ n((e) => e.zIndex.modal, "zIndex") },
|
|
279
|
+
children: /* @__PURE__ */ r(ye, { onClickAway: he, children: /* @__PURE__ */ r(
|
|
280
|
+
Se,
|
|
281
|
+
{
|
|
282
|
+
className: "mt-4",
|
|
283
|
+
sx: {
|
|
284
|
+
border: /* @__PURE__ */ n((e) => `1px solid ${g(e.palette.common.black, 0.12)}`, "border"),
|
|
285
|
+
display: "flex",
|
|
286
|
+
flexWrap: "wrap",
|
|
287
|
+
gap: 0.75,
|
|
288
|
+
maxWidth: 280,
|
|
289
|
+
p: 1
|
|
290
|
+
},
|
|
291
|
+
children: K.map((e) => /* @__PURE__ */ r(
|
|
292
|
+
E,
|
|
293
|
+
{
|
|
294
|
+
label: e.label,
|
|
295
|
+
onDelete: /* @__PURE__ */ n(() => Te(e.value), "onDelete"),
|
|
296
|
+
size: "small",
|
|
297
|
+
sx: { borderRadius: 1 }
|
|
298
|
+
},
|
|
299
|
+
e.value
|
|
300
|
+
))
|
|
301
|
+
}
|
|
302
|
+
) })
|
|
303
|
+
}
|
|
304
|
+
)
|
|
305
|
+
] }) : /* @__PURE__ */ r(
|
|
306
|
+
oe,
|
|
307
|
+
{
|
|
308
|
+
className: ne("min-w-128", w),
|
|
309
|
+
disabled: I,
|
|
310
|
+
filterOptions: k ? (e) => e : void 0,
|
|
311
|
+
fullWidth: O,
|
|
312
|
+
inputValue: d,
|
|
313
|
+
loading: T,
|
|
314
|
+
options: q,
|
|
315
|
+
clearText: "",
|
|
316
|
+
closeText: "",
|
|
317
|
+
clearIcon: /* @__PURE__ */ r(F, { sx: { fontSize: ue } }),
|
|
318
|
+
openText: "",
|
|
319
|
+
popupIcon: /* @__PURE__ */ r(Y, {}),
|
|
320
|
+
sx: X,
|
|
321
|
+
value: de,
|
|
322
|
+
getOptionLabel: /* @__PURE__ */ n((e) => ce(e.label), "getOptionLabel"),
|
|
323
|
+
isOptionEqualToValue: /* @__PURE__ */ n((e, t) => e.value === t.value, "isOptionEqualToValue"),
|
|
324
|
+
loadingText: N ?? u("Common.로딩 중..."),
|
|
325
|
+
noOptionsText: G,
|
|
326
|
+
onChange: /* @__PURE__ */ n((e, t) => {
|
|
327
|
+
if (!t || !f && h(t)) {
|
|
328
|
+
$("");
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
$(t.value);
|
|
332
|
+
}, "onChange"),
|
|
333
|
+
onInputChange: /* @__PURE__ */ n((e, t, l) => {
|
|
334
|
+
c == null || c(t, l);
|
|
335
|
+
}, "onInputChange"),
|
|
336
|
+
slotProps: Q,
|
|
337
|
+
renderInput: /* @__PURE__ */ n((e) => {
|
|
338
|
+
var t, l, i;
|
|
339
|
+
return /* @__PURE__ */ r(
|
|
340
|
+
ee,
|
|
341
|
+
{
|
|
342
|
+
...e,
|
|
343
|
+
...o,
|
|
344
|
+
disabled: I,
|
|
345
|
+
error: L,
|
|
346
|
+
fullWidth: O,
|
|
347
|
+
helperText: D,
|
|
348
|
+
label: V,
|
|
349
|
+
placeholder: R,
|
|
350
|
+
required: P,
|
|
351
|
+
slotProps: {
|
|
352
|
+
...o == null ? void 0 : o.slotProps,
|
|
353
|
+
input: {
|
|
354
|
+
...e.InputProps,
|
|
355
|
+
...(t = o == null ? void 0 : o.slotProps) == null ? void 0 : t.input,
|
|
356
|
+
sx: {
|
|
357
|
+
"& .MuiAutocomplete-input, & .MuiInputBase-input": {
|
|
358
|
+
paddingLeft: "11px !important"
|
|
359
|
+
},
|
|
360
|
+
...e.InputProps.sx ?? {},
|
|
361
|
+
...((i = (l = o == null ? void 0 : o.slotProps) == null ? void 0 : l.input) == null ? void 0 : i.sx) ?? {}
|
|
362
|
+
},
|
|
363
|
+
endAdornment: /* @__PURE__ */ C(M, { children: [
|
|
364
|
+
T ? /* @__PURE__ */ r(te, { color: "inherit", size: 16, sx: { mr: 0.5 } }) : null,
|
|
365
|
+
e.InputProps.endAdornment
|
|
366
|
+
] })
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
variant: (o == null ? void 0 : o.variant) ?? "standard"
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
}, "renderInput"),
|
|
373
|
+
selectOnFocus: !0,
|
|
374
|
+
renderOption: /* @__PURE__ */ n((e, t) => /* @__PURE__ */ r("li", { ...e, children: t.label }), "renderOption")
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
}, "OwpSelectorAutocomplete");
|
|
378
|
+
export {
|
|
379
|
+
Be as OwpSelectorAutocomplete
|
|
380
|
+
};
|
|
381
|
+
//# sourceMappingURL=OwpSelectorAutocomplete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwpSelectorAutocomplete.js","sources":["../../../src/components/OwpSelectorBase/OwpSelectorAutocomplete.tsx"],"sourcesContent":["import { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';\nimport ClearIcon from '@mui/icons-material/Clear';\nimport {\n Autocomplete,\n Box,\n Checkbox,\n Chip,\n CircularProgress,\n ClickAwayListener,\n Paper,\n Popper,\n TextField,\n} from '@mui/material';\nimport { alpha } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport {\n type KeyboardEvent as ReactKeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type MutableRefObject,\n type SyntheticEvent,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { OwpSelectorBaseHookResult, OwpSelectorBaseOption, OwpSelectorBaseProps } from './types';\nimport { isSelectorAllOption } from './utils';\n\ninterface OwpSelectorAutocompleteProps {\n hookResult: OwpSelectorBaseHookResult;\n props: OwpSelectorBaseProps;\n}\n\nconst MULTIPLE_VISIBLE_CHIP_COUNT = 2;\nconst AUTOCOMPLETE_MIN_WIDTH = 152;\nconst MULTIPLE_AUTOCOMPLETE_INPUT_MIN_WIDTH = 72;\nconst SELECTOR_CLEAR_ICON_FONT_SIZE = 18.57;\n\ntype SelectorAutocompleteKeyDownEvent = ReactKeyboardEvent<HTMLDivElement> & {\n defaultMuiPrevented?: boolean;\n};\n\n/**\n * 현재 키 이벤트 기준 입력값 반환\n * @param event 키보드 이벤트\n * @param fallbackValue 제어 입력 fallback 값\n */\nconst getCurrentAutocompleteInputValue = (\n event: SelectorAutocompleteKeyDownEvent,\n fallbackValue?: string,\n) => {\n const eventTarget = event.target;\n\n if (eventTarget instanceof HTMLInputElement) {\n return eventTarget.value;\n }\n\n return fallbackValue ?? '';\n};\n\n/**\n * Autocomplete 옵션 라벨 문자열 변환\n * @param label 옵션 라벨\n */\nconst getAutocompleteOptionLabel = (label: OwpSelectorBaseOption['label']) => {\n return typeof label === 'string' || typeof label === 'number' ? `${label}` : '';\n};\n\n/**\n * Autocomplete 기반 공통 선택기\n * @param props Autocomplete 렌더링 props\n */\nexport const OwpSelectorAutocomplete = ({ hookResult, props }: OwpSelectorAutocompleteProps) => {\n const { t } = useOwpTranslation();\n const {\n autocompleteInputValue,\n className,\n disableAllValueItem,\n disableClientFilter,\n disabled,\n error,\n fullWidth,\n helperText,\n label,\n loading,\n loadingText,\n multiple,\n noOptionsText,\n onAutocompleteInputChange,\n placeholder,\n required,\n textFieldProps,\n } = props;\n const {\n allOption,\n clearSelection,\n isAllSelected,\n resolvedOptions,\n restoreAllSelection,\n selectAll,\n selectedOption,\n selectedOptions,\n selectMultipleValues,\n selectSingleValue,\n } = hookResult;\n const options = disableAllValueItem ? resolvedOptions : [allOption, ...resolvedOptions];\n const filteredSelectedOptions = useMemo(\n () => selectedOptions.filter((option) => !isSelectorAllOption(option)),\n [selectedOptions],\n );\n const hiddenSelectedOptions = useMemo(\n () =>\n isAllSelected\n ? []\n : filteredSelectedOptions.slice(MULTIPLE_VISIBLE_CHIP_COUNT),\n [filteredSelectedOptions, isAllSelected],\n );\n const hiddenSelectedOptionCount = hiddenSelectedOptions.length;\n const [hiddenChipAnchorEl, setHiddenChipAnchorEl] = useState<HTMLElement | null>(null);\n const autocompleteRootRef = useRef<HTMLDivElement | null>(null);\n const resolvedNoOptionsText = noOptionsText ?? t('Message.검색 결과 없음');\n const shouldRestoreAllOnClearRef = useRef(\n multiple &&\n !disableAllValueItem &&\n ((props.value ?? props.defaultValue) == null || (props.value ?? props.defaultValue) === ''),\n );\n const autocompleteSlotProps = {\n clearIndicator: {\n className: 'm-0 p-0',\n size: 'small',\n },\n paper: {\n sx: {\n '& .MuiAutocomplete-noOptions': {\n fontSize: 14,\n px: 1,\n py: 1.5,\n whiteSpace: 'nowrap',\n },\n },\n },\n popupIndicator: {\n className: 'm-0 p-0',\n size: 'small',\n },\n } as const;\n const autocompleteSx = {\n minWidth: AUTOCOMPLETE_MIN_WIDTH,\n '& .MuiAutocomplete-endAdornment': {\n '& .MuiAutocomplete-clearIndicator + .MuiAutocomplete-popupIndicator': {\n ml: 0,\n },\n '& .MuiIconButton-root': {\n m: 0,\n p: 0,\n },\n '& > :not(style) + :not(style)': {\n ml: 0,\n },\n alignItems: 'center',\n gap: 0,\n right: 0,\n },\n } as const;\n const multipleAutocompleteSx = {\n ...autocompleteSx,\n '& .MuiAutocomplete-inputRoot .MuiAutocomplete-input': {\n flexBasis: MULTIPLE_AUTOCOMPLETE_INPUT_MIN_WIDTH,\n minWidth: MULTIPLE_AUTOCOMPLETE_INPUT_MIN_WIDTH,\n },\n } as const;\n\n useEffect(() => {\n if (!hiddenSelectedOptionCount) {\n setHiddenChipAnchorEl(null);\n }\n }, [hiddenSelectedOptionCount]);\n\n useEffect(() => {\n if (!shouldRestoreAllOnClearRef.current) {\n return;\n }\n\n const formElement = autocompleteRootRef.current?.closest('form');\n\n if (!formElement) {\n return;\n }\n\n const handleFormReset = () => {\n window.setTimeout(() => {\n restoreAllSelection();\n }, 0);\n };\n\n formElement.addEventListener('reset', handleFormReset);\n\n return () => {\n formElement.removeEventListener('reset', handleFormReset);\n };\n }, [restoreAllSelection]);\n\n const handleHiddenChipPopperClose = () => {\n setHiddenChipAnchorEl(null);\n };\n\n const handleHiddenChipSummaryMouseDown = (event: ReactMouseEvent<HTMLElement>) => {\n event.preventDefault();\n };\n\n const handleHiddenChipSummaryClick = (event: ReactMouseEvent<HTMLElement>) => {\n event.preventDefault();\n event.stopPropagation();\n\n setHiddenChipAnchorEl((previousAnchorElement) =>\n previousAnchorElement === event.currentTarget ? null : event.currentTarget,\n );\n };\n\n const handleHiddenChipDelete = (optionValue: string) => {\n selectMultipleValues(\n filteredSelectedOptions\n .filter((option) => option.value !== optionValue)\n .map((option) => option.value),\n );\n };\n\n const handleMultipleRootKeyDown = (event: SelectorAutocompleteKeyDownEvent) => {\n const currentInputValue = getCurrentAutocompleteInputValue(event, autocompleteInputValue);\n\n if (\n (isAllSelected || hiddenSelectedOptionCount > 0) &&\n currentInputValue === '' &&\n (event.key === 'Backspace' || event.key === 'Delete')\n ) {\n event.defaultMuiPrevented = true;\n event.preventDefault();\n event.stopPropagation();\n }\n\n textFieldProps?.onKeyDown?.(event as Parameters<NonNullable<typeof textFieldProps.onKeyDown>>[0]);\n };\n\n if (multiple) {\n return (\n <>\n <Autocomplete\n ref={autocompleteRootRef as MutableRefObject<HTMLDivElement | null>}\n className={clsx('min-w-128', className)}\n disableCloseOnSelect\n disabled={disabled}\n filterOptions={disableClientFilter ? (nextOptions) => nextOptions : undefined}\n fullWidth={fullWidth}\n inputValue={autocompleteInputValue}\n loading={loading}\n multiple\n options={options}\n clearText=\"\"\n closeText=\"\"\n clearIcon={<ClearIcon sx={{ fontSize: SELECTOR_CLEAR_ICON_FONT_SIZE }} />}\n openText=\"\"\n popupIcon={<ArrowDropDownIcon />}\n sx={multipleAutocompleteSx}\n value={selectedOptions}\n getOptionLabel={(option) => getAutocompleteOptionLabel(option.label)}\n isOptionEqualToValue={(option, selected) => option.value === selected.value}\n loadingText={loadingText ?? t('Common.로딩 중...')}\n noOptionsText={resolvedNoOptionsText}\n onChange={(\n _event: SyntheticEvent,\n nextOptions: OwpSelectorBaseOption[],\n reason: string,\n details,\n ) => {\n const currentInputValue =\n _event.type === 'keydown'\n ? getCurrentAutocompleteInputValue(\n _event as SelectorAutocompleteKeyDownEvent,\n autocompleteInputValue,\n )\n : autocompleteInputValue ?? '';\n\n if (\n reason === 'removeOption' &&\n _event.type === 'keydown' &&\n currentInputValue === '' &&\n (isAllSelected || hiddenSelectedOptionCount > 0)\n ) {\n _event.preventDefault();\n _event.stopPropagation();\n return;\n }\n\n if (reason === 'clear') {\n if (shouldRestoreAllOnClearRef.current) {\n selectAll();\n return;\n }\n\n clearSelection();\n return;\n }\n\n if (!disableAllValueItem && details?.option && isSelectorAllOption(details.option)) {\n if (isAllSelected) {\n clearSelection();\n return;\n }\n\n selectAll();\n return;\n }\n\n selectMultipleValues(\n nextOptions.filter((option) => !isSelectorAllOption(option)).map((option) => option.value),\n );\n }}\n onInputChange={(_event, nextInputValue, reason) => {\n onAutocompleteInputChange?.(nextInputValue, reason);\n }}\n onKeyDown={handleMultipleRootKeyDown}\n slotProps={autocompleteSlotProps}\n renderInput={(params) => (\n <TextField\n {...params}\n {...textFieldProps}\n disabled={disabled}\n error={error}\n fullWidth={fullWidth}\n helperText={helperText}\n label={label}\n placeholder={placeholder ?? t('Common.검색')}\n required={required}\n slotProps={{\n ...textFieldProps?.slotProps,\n input: {\n ...params.InputProps,\n ...textFieldProps?.slotProps?.input,\n endAdornment: (\n <>\n {loading ? <CircularProgress color=\"inherit\" size={16} sx={{ mr: 0.5 }} /> : null}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n }}\n variant={textFieldProps?.variant ?? 'standard'}\n />\n )}\n renderOption={(optionProps, option, state) => (\n <li {...optionProps}>\n <Checkbox checked={state.selected} className=\"!mr-8 !p-0\" size=\"small\" />\n {option.label}\n </li>\n )}\n renderValue={(nextSelectedOptions, getItemProps) => {\n if (!disableAllValueItem && isAllSelected) {\n return [\n <Box\n component=\"span\"\n key={allOption.value}\n sx={{ color: 'text.primary', fontWeight: 500, mr: 0.5 }}\n >\n {allOption.label}\n </Box>,\n ];\n }\n\n const visibleSelectedOptions = nextSelectedOptions\n .filter((option) => !isSelectorAllOption(option))\n .slice(0, MULTIPLE_VISIBLE_CHIP_COUNT);\n\n return [\n ...visibleSelectedOptions.map((option, index) => (\n <Chip\n {...getItemProps({ index })}\n key={option.value}\n label={option.label}\n size=\"small\"\n sx={{ borderRadius: 1, mr: 0.5 }}\n />\n )),\n ...(hiddenSelectedOptionCount > 0\n ? [\n <Chip\n key=\"owp-selector-hidden-chip-summary\"\n clickable\n label={`+${hiddenSelectedOptionCount}`}\n onClick={handleHiddenChipSummaryClick}\n onMouseDown={handleHiddenChipSummaryMouseDown}\n size=\"small\"\n sx={(theme) => ({\n backgroundColor: alpha(theme.palette.primary.main, 0.14),\n border: `1px solid ${alpha(theme.palette.primary.main, 0.22)}`,\n borderRadius: 1,\n color: theme.palette.primary.dark,\n fontWeight: 600,\n mr: 0.5,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, 0.2),\n },\n })}\n />,\n ]\n : []),\n ];\n }}\n />\n <Popper\n anchorEl={hiddenChipAnchorEl}\n open={Boolean(hiddenChipAnchorEl) && hiddenSelectedOptionCount > 0}\n placement=\"bottom-start\"\n sx={{ zIndex: (theme) => theme.zIndex.modal }}\n >\n <ClickAwayListener onClickAway={handleHiddenChipPopperClose}>\n <Paper\n className=\"mt-4\"\n sx={{\n border: (theme) => `1px solid ${alpha(theme.palette.common.black, 0.12)}`,\n display: 'flex',\n flexWrap: 'wrap',\n gap: 0.75,\n maxWidth: 280,\n p: 1,\n }}\n >\n {hiddenSelectedOptions.map((option) => (\n <Chip\n key={option.value}\n label={option.label}\n onDelete={() => handleHiddenChipDelete(option.value)}\n size=\"small\"\n sx={{ borderRadius: 1 }}\n />\n ))}\n </Paper>\n </ClickAwayListener>\n </Popper>\n </>\n );\n }\n\n return (\n <Autocomplete\n className={clsx('min-w-128', className)}\n disabled={disabled}\n filterOptions={disableClientFilter ? (nextOptions) => nextOptions : undefined}\n fullWidth={fullWidth}\n inputValue={autocompleteInputValue}\n loading={loading}\n options={options}\n clearText=\"\"\n closeText=\"\"\n clearIcon={<ClearIcon sx={{ fontSize: SELECTOR_CLEAR_ICON_FONT_SIZE }} />}\n openText=\"\"\n popupIcon={<ArrowDropDownIcon />}\n sx={autocompleteSx}\n value={selectedOption}\n getOptionLabel={(option) => getAutocompleteOptionLabel(option.label)}\n isOptionEqualToValue={(option, selected) => option.value === selected.value}\n loadingText={loadingText ?? t('Common.로딩 중...')}\n noOptionsText={resolvedNoOptionsText}\n onChange={(_event: SyntheticEvent, nextOption) => {\n if (!nextOption || (!disableAllValueItem && isSelectorAllOption(nextOption))) {\n selectSingleValue('');\n return;\n }\n\n selectSingleValue(nextOption.value);\n }}\n onInputChange={(_event, nextInputValue, reason) => {\n onAutocompleteInputChange?.(nextInputValue, reason);\n }}\n slotProps={autocompleteSlotProps}\n renderInput={(params) => (\n <TextField\n {...params}\n {...textFieldProps}\n disabled={disabled}\n error={error}\n fullWidth={fullWidth}\n helperText={helperText}\n label={label}\n placeholder={placeholder}\n required={required}\n slotProps={{\n ...textFieldProps?.slotProps,\n input: {\n ...params.InputProps,\n ...textFieldProps?.slotProps?.input,\n sx: {\n '& .MuiAutocomplete-input, & .MuiInputBase-input': {\n paddingLeft: '11px !important',\n },\n ...((params.InputProps as { sx?: object }).sx ?? {}),\n ...((textFieldProps?.slotProps?.input as { sx?: object } | undefined)?.sx ?? {}),\n },\n endAdornment: (\n <>\n {loading ? <CircularProgress color=\"inherit\" size={16} sx={{ mr: 0.5 }} /> : null}\n {params.InputProps.endAdornment}\n </>\n ),\n },\n }}\n variant={textFieldProps?.variant ?? 'standard'}\n />\n )}\n selectOnFocus\n renderOption={(optionProps, option) => <li {...optionProps}>{option.label}</li>}\n />\n );\n};\n"],"names":["MULTIPLE_VISIBLE_CHIP_COUNT","AUTOCOMPLETE_MIN_WIDTH","MULTIPLE_AUTOCOMPLETE_INPUT_MIN_WIDTH","SELECTOR_CLEAR_ICON_FONT_SIZE","getCurrentAutocompleteInputValue","__name","event","fallbackValue","eventTarget","getAutocompleteOptionLabel","label","OwpSelectorAutocomplete","hookResult","props","t","useOwpTranslation","autocompleteInputValue","className","disableAllValueItem","disableClientFilter","disabled","error","fullWidth","helperText","loading","loadingText","multiple","noOptionsText","onAutocompleteInputChange","placeholder","required","textFieldProps","allOption","clearSelection","isAllSelected","resolvedOptions","restoreAllSelection","selectAll","selectedOption","selectedOptions","selectMultipleValues","selectSingleValue","options","filteredSelectedOptions","useMemo","option","isSelectorAllOption","hiddenSelectedOptions","hiddenSelectedOptionCount","hiddenChipAnchorEl","setHiddenChipAnchorEl","useState","autocompleteRootRef","useRef","resolvedNoOptionsText","shouldRestoreAllOnClearRef","autocompleteSlotProps","autocompleteSx","multipleAutocompleteSx","useEffect","formElement","_a","handleFormReset","handleHiddenChipPopperClose","handleHiddenChipSummaryMouseDown","handleHiddenChipSummaryClick","previousAnchorElement","handleHiddenChipDelete","optionValue","handleMultipleRootKeyDown","currentInputValue","jsxs","Fragment","jsx","Autocomplete","clsx","nextOptions","ClearIcon","ArrowDropDownIcon","selected","_event","reason","details","nextInputValue","params","TextField","CircularProgress","optionProps","state","Checkbox","nextSelectedOptions","getItemProps","Box","index","createElement","Chip","theme","alpha","Popper","ClickAwayListener","Paper","nextOption","_c","_b"],"mappings":";;;;;;;;;;;;AAkCA,MAAMA,KAA8B,GAC9BC,KAAyB,KACzBC,KAAwC,IACxCC,KAAgC,OAWhCC,KAAmC,gBAAAC,EAAA,CACvCC,GACAC,MACG;AACH,QAAMC,IAAcF,EAAM;AAE1B,SAAIE,aAAuB,mBAClBA,EAAY,QAGdD,KAAiB;AAC1B,GAXyC,qCAiBnCE,KAA6B,gBAAAJ,EAAA,CAACK,MAC3B,OAAOA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B,EAA2B;AAAA,gBAC9B,IAAI;AAAA,kBACF,mDAAmD;AAAA,oBACjD,aAAa;AAAA,kBAAA;AAAA,kBAEf,GAAKuB,EAAO,WAA+B,MAAM,CAAA;AAAA,kBACjD,KAAKkB,KAAAC,IAAAxE,KAAA,gBAAAA,EAAgB,cAAhB,gBAAAwE,EAA2B,UAA3B,gBAAAD,EAAkE,OAAM,CAAA;AAAA,gBAAC;AAAA,gBAEhF,cACE,gBAAA/B,EAAAC,GAAA,EACG,UAAA;AAAA,kBAAAhD,IAAU,gBAAAiD,EAACa,IAAA,EAAiB,OAAM,WAAU,MAAM,IAAI,IAAI,EAAE,IAAI,IAAA,EAAI,CAAG,IAAK;AAAA,kBAC5EF,EAAO,WAAW;AAAA,gBAAA,EAAA,CACrB;AAAA,cAAA;AAAA,YAEJ;AAAA,YAEF,UAASrD,KAAA,gBAAAA,EAAgB,YAAW;AAAA,UAAA;AAAA,QAAA;AAAA,SA/B3B;AAAA,MAkCb,eAAa;AAAA,MACb,cAAc,gBAAA1B,EAAA,CAACkF,GAAa1C,wBAAY,MAAA,EAAI,GAAG0C,GAAc,UAAA1C,EAAO,MAAA,CAAM,GAA5D;AAAA,IAA4D;AAAA,EAAA;AAGhF,GAxbuC;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var o = (e, t) => c(e, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { jsx as r } 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 { OwpSelectorAutocomplete as m } from "./OwpSelectorAutocomplete.js";
|
|
5
|
+
import { OwpSelectorSelect as l } from "./OwpSelectorSelect.js";
|
|
6
|
+
import { useOwpSelectorBase as p } from "./hooks/useOwpSelectorBase.js";
|
|
7
|
+
const n = /* @__PURE__ */ o((e) => {
|
|
8
|
+
const t = p(e);
|
|
9
|
+
return e.selectorType === "autocomplete" ? /* @__PURE__ */ r(m, { hookResult: t, props: e }) : /* @__PURE__ */ r(l, { hookResult: t, props: e });
|
|
10
|
+
}, "OwpSelectorBase");
|
|
11
|
+
export {
|
|
12
|
+
n as OwpSelectorBase
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=OwpSelectorBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwpSelectorBase.js","sources":["../../../src/components/OwpSelectorBase/OwpSelectorBase.tsx"],"sourcesContent":["import { OwpSelectorAutocomplete } from './OwpSelectorAutocomplete';\nimport { OwpSelectorSelect } from './OwpSelectorSelect';\nimport { useOwpSelectorBase } from './hooks/useOwpSelectorBase';\nimport type { OwpSelectorBaseProps } from './types';\n\n/**\n * 공통 선택기 베이스\n * @param props 공통 선택기 props\n */\nexport const OwpSelectorBase = (props: OwpSelectorBaseProps) => {\n const hookResult = useOwpSelectorBase(props);\n\n if (props.selectorType === 'autocomplete') {\n return <OwpSelectorAutocomplete hookResult={hookResult} props={props} />;\n }\n\n return <OwpSelectorSelect hookResult={hookResult} props={props} />;\n};\n"],"names":["OwpSelectorBase","__name","props","hookResult","useOwpSelectorBase","jsx","OwpSelectorAutocomplete","OwpSelectorSelect"],"mappings":";;;;;;AASO,MAAMA,IAAkB,gBAAAC,EAAA,CAACC,MAAgC;AAC9D,QAAMC,IAAaC,EAAmBF,CAAK;AAE3C,SAAIA,EAAM,iBAAiB,iBAClB,gBAAAG,EAACC,GAAA,EAAwB,YAAAH,GAAwB,OAAAD,EAAA,CAAc,IAGjE,gBAAAG,EAACE,GAAA,EAAkB,YAAAJ,GAAwB,OAAAD,EAAA,CAAc;AAClE,GAR+B;"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
var Q = Object.defineProperty;
|
|
2
|
+
var n = (a, x) => Q(a, "name", { value: x, configurable: !0 });
|
|
3
|
+
import { jsxs as s, jsx as l } 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 { useOwpTranslation as U } from "../../hooks/useOwpTranslation.js";
|
|
5
|
+
import { InputLabel as V, Select as $, MenuItem as f, FormHelperText as j, FormControl as B, Checkbox as M, ListItemText as O, Box as y, Tooltip as X } from "@mui/material";
|
|
6
|
+
import { alpha as W } from "@mui/material/styles";
|
|
7
|
+
import { clsx as z } from "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
8
|
+
import { useId as Y, useMemo as H } from "react";
|
|
9
|
+
import { getSelectorAllToken as N } from "./utils/querySelectorUtils.js";
|
|
10
|
+
const E = /* @__PURE__ */ n((a) => typeof a == "string" || typeof a == "number" ? `${a}` : "", "getSelectorLabelText"), ne = /* @__PURE__ */ n(({ hookResult: a, props: x }) => {
|
|
11
|
+
const { t: g } = U(), {
|
|
12
|
+
className: L,
|
|
13
|
+
disableAllValueItem: p,
|
|
14
|
+
disabled: S,
|
|
15
|
+
error: T,
|
|
16
|
+
fullWidth: w,
|
|
17
|
+
helperText: h,
|
|
18
|
+
label: o,
|
|
19
|
+
loading: F,
|
|
20
|
+
multiple: q,
|
|
21
|
+
required: C,
|
|
22
|
+
selectProps: r
|
|
23
|
+
} = x, {
|
|
24
|
+
clearSelection: R,
|
|
25
|
+
isAllSelected: b,
|
|
26
|
+
resolvedOptions: m,
|
|
27
|
+
selectAll: D,
|
|
28
|
+
selectedValueList: d,
|
|
29
|
+
selectMultipleValues: G,
|
|
30
|
+
selectSingleValue: I
|
|
31
|
+
} = a, v = `owp-selector-base-label-${Y()}`, k = H(
|
|
32
|
+
() => m.filter((e) => d.includes(e.value)).map((e) => e.label),
|
|
33
|
+
[m, d]
|
|
34
|
+
), A = H(
|
|
35
|
+
() => k.map((e) => E(e)).filter(Boolean),
|
|
36
|
+
[k]
|
|
37
|
+
).join(", ");
|
|
38
|
+
if (!q)
|
|
39
|
+
return /* @__PURE__ */ s(
|
|
40
|
+
B,
|
|
41
|
+
{
|
|
42
|
+
className: z("min-w-128", L),
|
|
43
|
+
disabled: S,
|
|
44
|
+
error: T,
|
|
45
|
+
fullWidth: w,
|
|
46
|
+
required: C,
|
|
47
|
+
variant: (r == null ? void 0 : r.variant) ?? "standard",
|
|
48
|
+
children: [
|
|
49
|
+
o ? /* @__PURE__ */ l(V, { shrink: !0, id: v, children: o }) : null,
|
|
50
|
+
/* @__PURE__ */ s(
|
|
51
|
+
$,
|
|
52
|
+
{
|
|
53
|
+
displayEmpty: !0,
|
|
54
|
+
...r,
|
|
55
|
+
labelId: o ? v : void 0,
|
|
56
|
+
value: d[0] ?? "",
|
|
57
|
+
onChange: /* @__PURE__ */ n((e) => {
|
|
58
|
+
const u = String(e.target.value ?? "");
|
|
59
|
+
if (!p && u === "") {
|
|
60
|
+
I("");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
I(u);
|
|
64
|
+
}, "onChange"),
|
|
65
|
+
children: [
|
|
66
|
+
p ? null : /* @__PURE__ */ l(f, { value: "", children: g("Common.전체") }),
|
|
67
|
+
m.map((e) => /* @__PURE__ */ l(f, { disabled: e.disabled, value: e.value, children: e.label }, `owp-selector-base-item-${e.value}`))
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
h ? /* @__PURE__ */ l(j, { children: h }) : null
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
const J = /* @__PURE__ */ n((e) => {
|
|
76
|
+
const u = Array.isArray(e) ? e.map((t) => String(t)) : [], c = m.filter((t) => u.includes(t.value)).map((t) => E(t.label)).filter(Boolean), i = b ? 0 : Math.max(c.length - 2, 0), K = b ? g("Common.전체") : i > 0 ? `${c.slice(0, 2).join(", ")}...` : c.join(", ");
|
|
77
|
+
return /* @__PURE__ */ l(X, { title: A, placement: "top", disableHoverListener: !A, children: /* @__PURE__ */ s(y, { component: "span", sx: { alignItems: "center", display: "inline-flex", maxWidth: "100%" }, children: [
|
|
78
|
+
/* @__PURE__ */ l(y, { component: "span", sx: { minWidth: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: K }),
|
|
79
|
+
i > 0 ? /* @__PURE__ */ l(
|
|
80
|
+
y,
|
|
81
|
+
{
|
|
82
|
+
component: "span",
|
|
83
|
+
sx: /* @__PURE__ */ n((t) => ({
|
|
84
|
+
backgroundColor: W(t.palette.primary.main, 0.14),
|
|
85
|
+
border: `1px solid ${W(t.palette.primary.main, 0.22)}`,
|
|
86
|
+
borderRadius: 1,
|
|
87
|
+
color: t.palette.primary.dark,
|
|
88
|
+
fontSize: 12,
|
|
89
|
+
fontWeight: 600,
|
|
90
|
+
lineHeight: 1.4,
|
|
91
|
+
ml: 0.5,
|
|
92
|
+
px: 0.75,
|
|
93
|
+
py: 0.125
|
|
94
|
+
}), "sx"),
|
|
95
|
+
children: `+${i}`
|
|
96
|
+
}
|
|
97
|
+
) : null
|
|
98
|
+
] }) });
|
|
99
|
+
}, "renderValue");
|
|
100
|
+
return /* @__PURE__ */ s(
|
|
101
|
+
B,
|
|
102
|
+
{
|
|
103
|
+
className: z("w-128", L),
|
|
104
|
+
disabled: S,
|
|
105
|
+
error: T,
|
|
106
|
+
fullWidth: w,
|
|
107
|
+
required: C,
|
|
108
|
+
variant: (r == null ? void 0 : r.variant) ?? "standard",
|
|
109
|
+
children: [
|
|
110
|
+
o ? /* @__PURE__ */ l(V, { shrink: !0, id: v, children: o }) : null,
|
|
111
|
+
/* @__PURE__ */ s(
|
|
112
|
+
$,
|
|
113
|
+
{
|
|
114
|
+
displayEmpty: !0,
|
|
115
|
+
...r,
|
|
116
|
+
labelId: o ? v : void 0,
|
|
117
|
+
multiple: !0,
|
|
118
|
+
renderValue: J,
|
|
119
|
+
value: d,
|
|
120
|
+
onChange: /* @__PURE__ */ n((e, u) => {
|
|
121
|
+
const c = Array.isArray(e.target.value) ? e.target.value.map((i) => String(i)) : String(e.target.value ?? "").split(",").map((i) => i.trim()).filter(Boolean);
|
|
122
|
+
if (c.includes(N())) {
|
|
123
|
+
if (b) {
|
|
124
|
+
R();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
D();
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
G(c);
|
|
131
|
+
}, "onChange"),
|
|
132
|
+
children: [
|
|
133
|
+
p ? null : /* @__PURE__ */ s(f, { value: N(), children: [
|
|
134
|
+
/* @__PURE__ */ l(M, { checked: b, size: "small" }),
|
|
135
|
+
/* @__PURE__ */ l(O, { primary: g("Common.전체") })
|
|
136
|
+
] }),
|
|
137
|
+
m.map((e) => /* @__PURE__ */ s(f, { disabled: e.disabled || F, value: e.value, children: [
|
|
138
|
+
/* @__PURE__ */ l(M, { checked: d.includes(e.value), size: "small" }),
|
|
139
|
+
/* @__PURE__ */ l(O, { primary: e.label })
|
|
140
|
+
] }, `owp-selector-base-item-${e.value}`))
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
h ? /* @__PURE__ */ l(j, { children: h }) : null
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}, "OwpSelectorSelect");
|
|
149
|
+
export {
|
|
150
|
+
ne as OwpSelectorSelect
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=OwpSelectorSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OwpSelectorSelect.js","sources":["../../../src/components/OwpSelectorBase/OwpSelectorSelect.tsx"],"sourcesContent":["import { useOwpTranslation } from '@/hooks/useOwpTranslation';\nimport {\n Box,\n Checkbox,\n FormControl,\n FormHelperText,\n InputLabel,\n ListItemText,\n MenuItem,\n Select,\n Tooltip,\n type SelectChangeEvent,\n type SelectProps,\n} from '@mui/material';\nimport { alpha } from '@mui/material/styles';\nimport clsx from 'clsx';\nimport { type ReactNode, useId, useMemo } from 'react';\nimport type { OwpSelectorBaseHookResult, OwpSelectorBaseProps } from './types';\nimport { getSelectorAllToken } from './utils';\n\ninterface OwpSelectorSelectProps {\n hookResult: OwpSelectorBaseHookResult;\n props: OwpSelectorBaseProps;\n}\n\n/**\n * 선택 라벨 문자열 변환\n * @param label 선택 라벨\n */\nconst getSelectorLabelText = (label: ReactNode) => {\n return typeof label === 'string' || typeof label === 'number' ? `${label}` : '';\n};\n\n/**\n * Select 기반 공통 선택기\n * @param props Select 렌더링 props\n */\nexport const OwpSelectorSelect = ({ hookResult, props }: OwpSelectorSelectProps) => {\n const { t } = useOwpTranslation();\n const {\n className,\n disableAllValueItem,\n disabled,\n error,\n fullWidth,\n helperText,\n label,\n loading,\n multiple,\n required,\n selectProps,\n } = props;\n const {\n clearSelection,\n isAllSelected,\n resolvedOptions,\n selectAll,\n selectedValueList,\n selectMultipleValues,\n selectSingleValue,\n } = hookResult;\n const labelId = `owp-selector-base-label-${useId()}`;\n const selectedLabelList = useMemo(\n () => resolvedOptions.filter((option) => selectedValueList.includes(option.value)).map((option) => option.label),\n [resolvedOptions, selectedValueList],\n );\n const selectedLabelTextList = useMemo(\n () => selectedLabelList.map((label) => getSelectorLabelText(label)).filter(Boolean),\n [selectedLabelList],\n );\n const selectedTitle = selectedLabelTextList.join(', ');\n\n if (!multiple) {\n return (\n <FormControl\n className={clsx('min-w-128', className)}\n disabled={disabled}\n error={error}\n fullWidth={fullWidth}\n required={required}\n variant={selectProps?.variant ?? 'standard'}\n >\n {label ? (\n <InputLabel shrink id={labelId}>\n {label}\n </InputLabel>\n ) : null}\n <Select\n displayEmpty\n {...(selectProps as SelectProps<unknown>)}\n labelId={label ? labelId : undefined}\n value={(disableAllValueItem ? selectedValueList[0] ?? '' : selectedValueList[0] ?? '') as SelectProps<unknown>['value']}\n onChange={(event) => {\n const nextValue = String(event.target.value ?? '');\n\n if (!disableAllValueItem && nextValue === '') {\n selectSingleValue('');\n return;\n }\n\n selectSingleValue(nextValue);\n }}\n >\n {!disableAllValueItem ? <MenuItem value=\"\">{t('Common.전체')}</MenuItem> : null}\n {resolvedOptions.map((option) => (\n <MenuItem key={`owp-selector-base-item-${option.value}`} disabled={option.disabled} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n {helperText ? <FormHelperText>{helperText}</FormHelperText> : null}\n </FormControl>\n );\n }\n\n const renderValue = (selected: unknown) => {\n const selectedValues = Array.isArray(selected) ? selected.map((item) => String(item)) : [];\n const visibleLabelTextList = resolvedOptions\n .filter((option) => selectedValues.includes(option.value))\n .map((option) => getSelectorLabelText(option.label))\n .filter(Boolean);\n const hiddenLabelCount = isAllSelected ? 0 : Math.max(visibleLabelTextList.length - 2, 0);\n const displayText = isAllSelected\n ? t('Common.전체')\n : hiddenLabelCount > 0\n ? `${visibleLabelTextList.slice(0, 2).join(', ')}...`\n : visibleLabelTextList.join(', ');\n\n return (\n <Tooltip title={selectedTitle} placement=\"top\" disableHoverListener={!selectedTitle}>\n <Box component=\"span\" sx={{ alignItems: 'center', display: 'inline-flex', maxWidth: '100%' }}>\n <Box component=\"span\" sx={{ minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>\n {displayText}\n </Box>\n {hiddenLabelCount > 0 ? (\n <Box\n component=\"span\"\n sx={(theme) => ({\n backgroundColor: alpha(theme.palette.primary.main, 0.14),\n border: `1px solid ${alpha(theme.palette.primary.main, 0.22)}`,\n borderRadius: 1,\n color: theme.palette.primary.dark,\n fontSize: 12,\n fontWeight: 600,\n lineHeight: 1.4,\n ml: 0.5,\n px: 0.75,\n py: 0.125,\n })}\n >\n {`+${hiddenLabelCount}`}\n </Box>\n ) : null}\n </Box>\n </Tooltip>\n );\n };\n\n return (\n <FormControl\n className={clsx('w-128', className)}\n disabled={disabled}\n error={error}\n fullWidth={fullWidth}\n required={required}\n variant={selectProps?.variant ?? 'standard'}\n >\n {label ? (\n <InputLabel shrink id={labelId}>\n {label}\n </InputLabel>\n ) : null}\n <Select\n displayEmpty\n {...(selectProps as SelectProps<unknown>)}\n labelId={label ? labelId : undefined}\n multiple\n renderValue={renderValue}\n value={selectedValueList as SelectProps<unknown>['value']}\n onChange={(event: SelectChangeEvent<unknown>, child: ReactNode) => {\n const selectedValues = Array.isArray(event.target.value)\n ? event.target.value.map((item) => String(item))\n : String(event.target.value ?? '')\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean);\n\n if (selectedValues.includes(getSelectorAllToken())) {\n if (isAllSelected) {\n clearSelection();\n return;\n }\n\n selectAll();\n return;\n }\n\n selectMultipleValues(selectedValues);\n void child;\n }}\n >\n {!disableAllValueItem ? (\n <MenuItem value={getSelectorAllToken()}>\n <Checkbox checked={isAllSelected} size=\"small\" />\n <ListItemText primary={t('Common.전체')} />\n </MenuItem>\n ) : null}\n {resolvedOptions.map((option) => (\n <MenuItem key={`owp-selector-base-item-${option.value}`} disabled={option.disabled || loading} value={option.value}>\n <Checkbox checked={selectedValueList.includes(option.value)} size=\"small\" />\n <ListItemText primary={option.label} />\n </MenuItem>\n ))}\n </Select>\n {helperText ? <FormHelperText>{helperText}</FormHelperText> : null}\n </FormControl>\n );\n};\n"],"names":["getSelectorLabelText","__name","label","OwpSelectorSelect","hookResult","props","t","useOwpTranslation","className","disableAllValueItem","disabled","error","fullWidth","helperText","loading","multiple","required","selectProps","clearSelection","isAllSelected","resolvedOptions","selectAll","selectedValueList","selectMultipleValues","selectSingleValue","labelId","useId","selectedLabelList","useMemo","option","selectedTitle","jsxs","FormControl","clsx","InputLabel","Select","event","nextValue","MenuItem","jsx","FormHelperText","renderValue","selected","selectedValues","item","visibleLabelTextList","hiddenLabelCount","displayText","Tooltip","Box","theme","alpha","child","getSelectorAllToken","Checkbox","ListItemText"],"mappings":";;;;;;;;;AA6BA,MAAMA,IAAuB,gBAAAC,EAAA,CAACC,MACrB,OAAOA,KAAU,YAAY,OAAOA,KAAU,WAAW,GAAGA,CAAK,KAAK,IADlD,yBAQhBC,KAAoB,gBAAAF,EAAA,CAAC,EAAE,YAAAG,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