@bwg-ui/core 1.2.6 → 1.2.8
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/README.md +28 -0
- package/dist/chunks/MenuReport-CiL4ggPy.js +1244 -0
- package/dist/chunks/MenuReport-DIkKwvta.cjs +1 -0
- package/dist/chunks/common-components-B4mah7DM.cjs +183 -0
- package/dist/chunks/{common-components-CnAjT_Gi.js → common-components-G-FELsbw.js} +7510 -7094
- package/dist/chunks/{core-MOICJvq5.cjs → core-CXP75zcn.cjs} +1 -1
- package/dist/chunks/{core-C5T-8H8j.js → core-pjW5SaWA.js} +13 -13
- package/dist/chunks/{enc-base64-8MLFBYmR.cjs → enc-base64-Bg9x86kU.cjs} +1 -1
- package/dist/chunks/{enc-base64-Ciw6cw8D.js → enc-base64-DtP_G7ev.js} +2 -2
- package/dist/chunks/layout-components-De-k79AV.cjs +35 -0
- package/dist/chunks/layout-components-mRRx1BIz.js +1616 -0
- package/dist/chunks/{sha256-CsieizMm.js → sha256-BTxiV_cX.js} +2 -2
- package/dist/chunks/{sha256-CpH38gS4.cjs → sha256-CFa0dyCj.cjs} +1 -1
- package/dist/components/common/ButtonAccessController.d.ts +5 -0
- package/dist/components/common/ButtonAccessController.d.ts.map +1 -0
- package/dist/components/common/BwgEditor.d.ts +3 -3
- package/dist/components/common/BwgEditor.d.ts.map +1 -1
- package/dist/components/common/BwgPopup.d.ts +15 -0
- package/dist/components/common/BwgPopup.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts +2 -23
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/SearchBox.d.ts +1 -57
- package/dist/components/common/SearchBox.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.d.ts +5 -3
- package/dist/components/common/index.d.ts.map +1 -1
- package/dist/components/common/index.js +24 -23
- package/dist/components/common/type.d.ts +132 -0
- package/dist/components/common/type.d.ts.map +1 -0
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
- package/dist/components/layout/default/LocalPopupContainer.d.ts +3 -0
- package/dist/components/layout/default/LocalPopupContainer.d.ts.map +1 -0
- package/dist/components/layout/default/PopupContainer.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -35
- package/dist/components/layout/index.js +13 -1558
- package/dist/components/popup/MenuReport.d.ts +2 -5
- package/dist/components/popup/MenuReport.d.ts.map +1 -1
- package/dist/components/popup/SearchDepartmentP01.d.ts +4 -5
- package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
- package/dist/components/popup/SearchDepartmentP02.d.ts +3 -5
- package/dist/components/popup/SearchDepartmentP02.d.ts.map +1 -1
- package/dist/components/popup/SearchEmployeeP01.d.ts +3 -1
- package/dist/components/popup/SearchEmployeeP01.d.ts.map +1 -1
- package/dist/components/popup/SearchEmployeeP02.d.ts +3 -1
- package/dist/components/popup/SearchEmployeeP02.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP01.d.ts +2 -4
- package/dist/components/popup/SearchOrganizationP01.d.ts.map +1 -1
- package/dist/components/popup/SearchOrganizationP02.d.ts +3 -4
- package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
- package/dist/components/popup/config/localPopupRegistry.d.ts +8 -0
- package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -0
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.d.ts +2 -4
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +5 -1739
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +154 -147
- package/dist/provider/hooks/usePopup.d.ts +1 -0
- package/dist/provider/hooks/usePopup.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +205 -188
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.js +253 -200
- package/dist/stores/popupStore.d.ts +9 -1
- package/dist/stores/popupStore.d.ts.map +1 -1
- package/dist/utils/gwUtils.d.ts +23 -0
- package/dist/utils/gwUtils.d.ts.map +1 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +9 -8
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +588 -486
- package/package.json +4 -4
- package/dist/chunks/common-components-Bhr_MU0K.cjs +0 -183
package/dist/provider/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useEffect as b, createContext as
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as d, jsxs as
|
|
1
|
+
import { useEffect as b, createContext as P, useContext as y, useRef as A, useCallback as N, useState as w, useMemo as T } from "react";
|
|
2
|
+
import { usePopupStore as H, useCodeStore as W } from "../stores/index.js";
|
|
3
|
+
import { jsx as d, jsxs as D } from "react/jsx-runtime";
|
|
4
4
|
import { Input as z } from "antd";
|
|
5
5
|
import { setServiceCodeOverrides as J } from "../utils/index.js";
|
|
6
6
|
const I = {
|
|
@@ -17,247 +17,283 @@ const I = {
|
|
|
17
17
|
// 즐겨찾기 관련
|
|
18
18
|
AUTH_BMRK: "SCMBMRK00101"
|
|
19
19
|
// 즐겨찾기 관리
|
|
20
|
-
},
|
|
20
|
+
}, M = P(null), ee = ({
|
|
21
21
|
children: e,
|
|
22
|
-
serviceCodes:
|
|
22
|
+
serviceCodes: o = {}
|
|
23
23
|
}) => {
|
|
24
24
|
b(() => {
|
|
25
|
-
J(
|
|
26
|
-
}, [
|
|
27
|
-
const
|
|
28
|
-
serviceCodes:
|
|
25
|
+
J(o);
|
|
26
|
+
}, [o]);
|
|
27
|
+
const c = {
|
|
28
|
+
serviceCodes: o,
|
|
29
29
|
getServiceCode: (r) => {
|
|
30
|
-
if (
|
|
31
|
-
return console.log(`🔧 Provider 설정 사용: ${r} = ${
|
|
32
|
-
const
|
|
33
|
-
return console.log(`🔧 기본값 사용: ${r} = ${
|
|
30
|
+
if (o[r] && o[r].trim() !== "")
|
|
31
|
+
return console.log(`🔧 Provider 설정 사용: ${r} = ${o[r]}`), o[r];
|
|
32
|
+
const i = I[r];
|
|
33
|
+
return console.log(`🔧 기본값 사용: ${r} = ${i}`), i;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
return /* @__PURE__ */ d(
|
|
36
|
+
return /* @__PURE__ */ d(M.Provider, { value: c, children: e });
|
|
37
37
|
}, O = () => {
|
|
38
|
-
const e =
|
|
38
|
+
const e = y(M);
|
|
39
39
|
if (!e)
|
|
40
40
|
throw new Error("useServiceCode must be used within a ServiceCodeProvider");
|
|
41
41
|
return e;
|
|
42
|
-
},
|
|
43
|
-
const { getServiceCode:
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
const { getServiceCode: e } = O(),
|
|
47
|
-
for (const
|
|
48
|
-
t
|
|
49
|
-
return
|
|
42
|
+
}, oe = (e) => {
|
|
43
|
+
const { getServiceCode: o } = O();
|
|
44
|
+
return o(e);
|
|
45
|
+
}, te = () => {
|
|
46
|
+
const { getServiceCode: e } = O(), o = {};
|
|
47
|
+
for (const t of Object.keys(I))
|
|
48
|
+
o[t] = e(t);
|
|
49
|
+
return o;
|
|
50
50
|
}, re = () => {
|
|
51
51
|
const { getServiceCode: e } = O();
|
|
52
52
|
console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
|
|
53
|
-
for (const
|
|
54
|
-
const
|
|
55
|
-
console.log(` ${
|
|
53
|
+
for (const o of Object.keys(I)) {
|
|
54
|
+
const t = e(o);
|
|
55
|
+
console.log(` ${o}: ${t}`);
|
|
56
56
|
}
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
searchBoxRef:
|
|
60
|
-
getFormData: () =>
|
|
61
|
-
setFormData: (
|
|
62
|
-
|
|
57
|
+
}, R = P(null), ne = ({ children: e }) => {
|
|
58
|
+
const o = A(null), l = {
|
|
59
|
+
searchBoxRef: o,
|
|
60
|
+
getFormData: () => o.current?.getFormData() || {},
|
|
61
|
+
setFormData: (u) => {
|
|
62
|
+
o.current?.setFormData(u);
|
|
63
63
|
},
|
|
64
64
|
resetForm: () => {
|
|
65
|
-
|
|
65
|
+
o.current?.resetForm();
|
|
66
66
|
},
|
|
67
|
-
validateForm: async () => await
|
|
67
|
+
validateForm: async () => await o.current?.validateForm() || {
|
|
68
68
|
success: !1,
|
|
69
69
|
error: null
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
return /* @__PURE__ */ d(
|
|
72
|
+
return /* @__PURE__ */ d(R.Provider, { value: l, children: e });
|
|
73
73
|
}, se = () => {
|
|
74
|
-
const e =
|
|
74
|
+
const e = y(R);
|
|
75
75
|
if (!e)
|
|
76
76
|
throw new Error("useSearchBox must be used within a SearchBoxProvider");
|
|
77
77
|
return e;
|
|
78
|
-
},
|
|
79
|
-
const
|
|
78
|
+
}, ce = () => {
|
|
79
|
+
const {
|
|
80
|
+
popups: e,
|
|
81
|
+
activePopupId: o,
|
|
82
|
+
setActivePopup: t,
|
|
83
|
+
closePopup: c,
|
|
84
|
+
openPopup: r,
|
|
85
|
+
openCorePopup: i
|
|
86
|
+
} = H(), l = N(
|
|
87
|
+
async (m, h, s) => {
|
|
88
|
+
try {
|
|
89
|
+
await r(m, h, s);
|
|
90
|
+
} catch (n) {
|
|
91
|
+
throw console.error("팝업 열기 실패:", n), n;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
[r]
|
|
95
|
+
), u = N(
|
|
96
|
+
(m, h, s) => {
|
|
97
|
+
try {
|
|
98
|
+
i(m, h, s);
|
|
99
|
+
} catch (n) {
|
|
100
|
+
throw console.error("로컬 팝업 열기 실패:", n), n;
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[i]
|
|
104
|
+
);
|
|
105
|
+
return {
|
|
106
|
+
popups: e,
|
|
107
|
+
activePopupId: o,
|
|
108
|
+
setActivePopup: t,
|
|
109
|
+
closePopup: c,
|
|
110
|
+
showPopup: l,
|
|
111
|
+
openCorePopup: u,
|
|
112
|
+
isPopup: e.length > 0
|
|
113
|
+
};
|
|
114
|
+
}, U = P(null), ie = () => {
|
|
115
|
+
const e = y(U);
|
|
80
116
|
if (!e) throw new Error("useAuth must be used within AuthProvider");
|
|
81
117
|
return e;
|
|
82
|
-
},
|
|
83
|
-
const [
|
|
84
|
-
const
|
|
118
|
+
}, ue = ({ children: e }) => {
|
|
119
|
+
const [o, t] = w(!1), [c, r] = w(!1), i = async (s) => {
|
|
120
|
+
const n = (await s.text()).trim().toLowerCase();
|
|
85
121
|
try {
|
|
86
|
-
const
|
|
87
|
-
if (typeof
|
|
122
|
+
const a = JSON.parse(n);
|
|
123
|
+
if (typeof a == "object" && a && (a.ok === !0 || a.success === !0))
|
|
88
124
|
return !0;
|
|
89
125
|
} catch {
|
|
90
126
|
}
|
|
91
|
-
return !!["true", "ok", "1", "y"].includes(
|
|
92
|
-
}, l = async (
|
|
127
|
+
return !!["true", "ok", "1", "y"].includes(n);
|
|
128
|
+
}, l = async (s) => {
|
|
93
129
|
r(!0);
|
|
94
130
|
try {
|
|
95
|
-
const
|
|
131
|
+
const n = await fetch("/serviceEndpoint/sso_check.jsp", {
|
|
96
132
|
method: "POST",
|
|
97
133
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
98
|
-
body: "token=" + encodeURIComponent(
|
|
99
|
-
}),
|
|
100
|
-
return
|
|
134
|
+
body: "token=" + encodeURIComponent(s)
|
|
135
|
+
}), a = n.ok && await i(n);
|
|
136
|
+
return t(a), a;
|
|
101
137
|
} catch {
|
|
102
138
|
return !1;
|
|
103
139
|
} finally {
|
|
104
140
|
r(!1);
|
|
105
141
|
}
|
|
106
|
-
},
|
|
142
|
+
}, u = async (s) => {
|
|
107
143
|
r(!0);
|
|
108
144
|
try {
|
|
109
|
-
const
|
|
145
|
+
const n = await fetch("/serviceEndpoint/sso_reauth.jsp", {
|
|
110
146
|
method: "POST",
|
|
111
147
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
112
|
-
body: "pin=" + encodeURIComponent(
|
|
148
|
+
body: "pin=" + encodeURIComponent(s)
|
|
113
149
|
});
|
|
114
|
-
return
|
|
150
|
+
return n.ok && await i(n) ? (t(!0), !0) : !1;
|
|
115
151
|
} catch {
|
|
116
152
|
return !1;
|
|
117
153
|
} finally {
|
|
118
154
|
r(!1);
|
|
119
155
|
}
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
() => ({ authed:
|
|
124
|
-
[
|
|
156
|
+
}, m = () => {
|
|
157
|
+
t(!1);
|
|
158
|
+
}, h = T(
|
|
159
|
+
() => ({ authed: o, busy: c, verifyWithToken: l, reauthWithPin: u, logout: m }),
|
|
160
|
+
[o, c]
|
|
125
161
|
);
|
|
126
|
-
return /* @__PURE__ */ d(
|
|
127
|
-
},
|
|
162
|
+
return /* @__PURE__ */ d(U.Provider, { value: h, children: e });
|
|
163
|
+
}, j = P(
|
|
128
164
|
void 0
|
|
129
165
|
), ae = ({
|
|
130
166
|
children: e
|
|
131
167
|
}) => {
|
|
132
168
|
const {
|
|
133
|
-
codeData:
|
|
134
|
-
isLoading:
|
|
135
|
-
error:
|
|
169
|
+
codeData: o,
|
|
170
|
+
isLoading: t,
|
|
171
|
+
error: c,
|
|
136
172
|
lastUpdated: r,
|
|
137
|
-
getCodeList:
|
|
173
|
+
getCodeList: i,
|
|
138
174
|
getCodeListByOption: l,
|
|
139
|
-
getCodeName:
|
|
140
|
-
getCodeColor:
|
|
141
|
-
getCodeByOption:
|
|
142
|
-
getAvailableGroupCodes:
|
|
143
|
-
getGridLookup:
|
|
144
|
-
fetchCommonCodes:
|
|
145
|
-
} =
|
|
146
|
-
codeData:
|
|
147
|
-
isLoading:
|
|
148
|
-
error:
|
|
175
|
+
getCodeName: u,
|
|
176
|
+
getCodeColor: m,
|
|
177
|
+
getCodeByOption: h,
|
|
178
|
+
getAvailableGroupCodes: s,
|
|
179
|
+
getGridLookup: n,
|
|
180
|
+
fetchCommonCodes: a
|
|
181
|
+
} = W(), L = {
|
|
182
|
+
codeData: o,
|
|
183
|
+
isLoading: t,
|
|
184
|
+
error: c,
|
|
149
185
|
lastUpdated: r,
|
|
150
|
-
getCodeList:
|
|
186
|
+
getCodeList: i,
|
|
151
187
|
getCodeListByOption: l,
|
|
152
|
-
getCodeName:
|
|
153
|
-
getCodeColor:
|
|
154
|
-
getCodeByOption:
|
|
155
|
-
getAvailableGroupCodes:
|
|
156
|
-
getGridLookup:
|
|
157
|
-
refreshCodes:
|
|
188
|
+
getCodeName: u,
|
|
189
|
+
getCodeColor: m,
|
|
190
|
+
getCodeByOption: h,
|
|
191
|
+
getAvailableGroupCodes: s,
|
|
192
|
+
getGridLookup: n,
|
|
193
|
+
refreshCodes: a
|
|
158
194
|
};
|
|
159
|
-
return /* @__PURE__ */ d(
|
|
160
|
-
},
|
|
161
|
-
const e =
|
|
195
|
+
return /* @__PURE__ */ d(j.Provider, { value: L, children: e });
|
|
196
|
+
}, k = () => {
|
|
197
|
+
const e = y(j);
|
|
162
198
|
if (e === void 0)
|
|
163
199
|
throw new Error("useCommonCode must be used within a CommonCodeProvider");
|
|
164
200
|
return e;
|
|
165
|
-
},
|
|
166
|
-
const { getCodeList: e, isLoading:
|
|
201
|
+
}, de = () => {
|
|
202
|
+
const { getCodeList: e, isLoading: o, error: t } = k();
|
|
167
203
|
return {
|
|
168
204
|
getCodeList: e,
|
|
169
|
-
isLoading:
|
|
170
|
-
error:
|
|
205
|
+
isLoading: o,
|
|
206
|
+
error: t
|
|
171
207
|
};
|
|
172
|
-
},
|
|
173
|
-
const { getCodeName: e, isLoading:
|
|
208
|
+
}, le = () => {
|
|
209
|
+
const { getCodeName: e, isLoading: o, error: t } = k();
|
|
174
210
|
return {
|
|
175
211
|
getCodeName: e,
|
|
176
|
-
isLoading:
|
|
177
|
-
error:
|
|
212
|
+
isLoading: o,
|
|
213
|
+
error: t
|
|
178
214
|
};
|
|
179
|
-
},
|
|
180
|
-
const { getCodeColor: e, isLoading:
|
|
215
|
+
}, pe = () => {
|
|
216
|
+
const { getCodeColor: e, isLoading: o, error: t } = k();
|
|
181
217
|
return {
|
|
182
218
|
getCodeColor: e,
|
|
183
|
-
isLoading:
|
|
184
|
-
error:
|
|
219
|
+
isLoading: o,
|
|
220
|
+
error: t
|
|
185
221
|
};
|
|
186
222
|
}, me = () => {
|
|
187
|
-
const { getCodeListByOption: e, isLoading:
|
|
223
|
+
const { getCodeListByOption: e, isLoading: o, error: t } = k();
|
|
188
224
|
return {
|
|
189
225
|
getCodeListByOption: e,
|
|
190
|
-
isLoading:
|
|
191
|
-
error:
|
|
226
|
+
isLoading: o,
|
|
227
|
+
error: t
|
|
192
228
|
};
|
|
193
|
-
},
|
|
194
|
-
const { getGridLookup: e, isLoading:
|
|
229
|
+
}, he = () => {
|
|
230
|
+
const { getGridLookup: e, isLoading: o, error: t } = k();
|
|
195
231
|
return {
|
|
196
232
|
getGridLookup: e,
|
|
197
|
-
isLoading:
|
|
198
|
-
error:
|
|
233
|
+
isLoading: o,
|
|
234
|
+
error: t
|
|
199
235
|
};
|
|
200
|
-
},
|
|
201
|
-
const e =
|
|
236
|
+
}, _ = P(null), fe = () => {
|
|
237
|
+
const e = y(_);
|
|
202
238
|
if (!e)
|
|
203
239
|
throw new Error("useLock must be used within ScreenProtectProvider");
|
|
204
240
|
return e;
|
|
205
|
-
},
|
|
241
|
+
}, we = ({
|
|
206
242
|
children: e,
|
|
207
|
-
idleMs:
|
|
208
|
-
onUnlock:
|
|
209
|
-
persistLocked:
|
|
243
|
+
idleMs: o = 1e4,
|
|
244
|
+
onUnlock: t,
|
|
245
|
+
persistLocked: c = !0,
|
|
210
246
|
storageKey: r = "inactivityLocked",
|
|
211
|
-
eventTarget:
|
|
247
|
+
eventTarget: i,
|
|
212
248
|
overlayScope: l = "global",
|
|
213
|
-
overlayId:
|
|
214
|
-
overlayPosition:
|
|
249
|
+
overlayId: u = "lock-overlay-root",
|
|
250
|
+
overlayPosition: m = "fixed"
|
|
215
251
|
}) => {
|
|
216
|
-
const
|
|
252
|
+
const h = c && typeof window < "u" && window.localStorage.getItem(r) === "1", [s, n] = w(h), [a, L] = w(o), x = Number.isFinite(a) && a > 0, C = A(null), G = () => {
|
|
217
253
|
try {
|
|
218
|
-
|
|
254
|
+
c && window.localStorage.setItem(r, "1");
|
|
219
255
|
} catch {
|
|
220
256
|
}
|
|
221
|
-
|
|
222
|
-
}, F = async (
|
|
223
|
-
if (!(
|
|
257
|
+
n(!0);
|
|
258
|
+
}, F = async (f) => {
|
|
259
|
+
if (!(t && !await t(f))) {
|
|
224
260
|
try {
|
|
225
|
-
|
|
261
|
+
c && window.localStorage.removeItem(r);
|
|
226
262
|
} catch {
|
|
227
263
|
}
|
|
228
|
-
|
|
264
|
+
n(!1), x && E();
|
|
229
265
|
}
|
|
230
|
-
},
|
|
266
|
+
}, V = () => {
|
|
231
267
|
try {
|
|
232
|
-
|
|
268
|
+
c && window.localStorage.setItem(r, "1");
|
|
233
269
|
} catch {
|
|
234
270
|
}
|
|
235
|
-
|
|
271
|
+
n(!0);
|
|
236
272
|
}, E = () => {
|
|
237
|
-
x && (
|
|
238
|
-
|
|
239
|
-
},
|
|
273
|
+
x && (C.current && window.clearTimeout(C.current), C.current = window.setTimeout(() => {
|
|
274
|
+
V();
|
|
275
|
+
}, a));
|
|
240
276
|
};
|
|
241
277
|
b(() => {
|
|
242
278
|
if (!x) return;
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
},
|
|
279
|
+
const f = () => {
|
|
280
|
+
s || E();
|
|
281
|
+
}, v = { passive: !0 }, g = [
|
|
246
282
|
"pointermove",
|
|
247
283
|
"pointerdown",
|
|
248
284
|
"keydown",
|
|
249
285
|
"wheel",
|
|
250
286
|
"touchstart"
|
|
251
|
-
], S =
|
|
252
|
-
return g.forEach((
|
|
253
|
-
|
|
287
|
+
], S = i ?? window;
|
|
288
|
+
return g.forEach((p) => S.addEventListener(p, f, v)), E(), () => {
|
|
289
|
+
C.current && window.clearTimeout(C.current), g.forEach((p) => S.removeEventListener(p, f));
|
|
254
290
|
};
|
|
255
|
-
}, [
|
|
256
|
-
if (!
|
|
257
|
-
const
|
|
258
|
-
const B = document.getElementById(
|
|
259
|
-
B && B.contains(
|
|
260
|
-
},
|
|
291
|
+
}, [a, s, i, x]), b(() => {
|
|
292
|
+
if (!s) return;
|
|
293
|
+
const f = (p) => {
|
|
294
|
+
const B = document.getElementById(u);
|
|
295
|
+
B && B.contains(p.target) || (p.stopPropagation(), p.preventDefault());
|
|
296
|
+
}, v = { capture: !0 }, g = [
|
|
261
297
|
"pointerdown",
|
|
262
298
|
"pointerup",
|
|
263
299
|
"pointermove",
|
|
@@ -267,47 +303,47 @@ const I = {
|
|
|
267
303
|
"keyup",
|
|
268
304
|
"touchstart",
|
|
269
305
|
"touchmove"
|
|
270
|
-
], S = l === "scoped" ?
|
|
271
|
-
return g.forEach((
|
|
272
|
-
}, [
|
|
273
|
-
const
|
|
274
|
-
() => ({ locked:
|
|
275
|
-
[
|
|
306
|
+
], S = l === "scoped" ? i ?? window : window;
|
|
307
|
+
return g.forEach((p) => S.addEventListener(p, f, v)), () => g.forEach((p) => S.removeEventListener(p, f, v));
|
|
308
|
+
}, [s, l, u, i]);
|
|
309
|
+
const $ = T(
|
|
310
|
+
() => ({ locked: s, lock: G, unlock: F, setIdleMs: L }),
|
|
311
|
+
[s]
|
|
276
312
|
);
|
|
277
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ D(_.Provider, { value: $, children: [
|
|
278
314
|
/* @__PURE__ */ d(
|
|
279
315
|
"div",
|
|
280
316
|
{
|
|
281
317
|
style: { width: "100%", height: "100%" },
|
|
282
|
-
...
|
|
283
|
-
...
|
|
318
|
+
...s ? { inert: "" } : {},
|
|
319
|
+
...s ? { "aria-hidden": !0 } : {},
|
|
284
320
|
children: e
|
|
285
321
|
}
|
|
286
322
|
),
|
|
287
|
-
|
|
323
|
+
s && /* @__PURE__ */ d(
|
|
288
324
|
q,
|
|
289
325
|
{
|
|
290
326
|
onUnlock: F,
|
|
291
|
-
overlayId:
|
|
292
|
-
overlayPosition:
|
|
327
|
+
overlayId: u,
|
|
328
|
+
overlayPosition: m
|
|
293
329
|
}
|
|
294
330
|
)
|
|
295
331
|
] });
|
|
296
332
|
}, q = ({
|
|
297
333
|
onUnlock: e,
|
|
298
|
-
overlayId:
|
|
299
|
-
overlayPosition:
|
|
334
|
+
overlayId: o = "lock-overlay-root",
|
|
335
|
+
overlayPosition: t = "fixed"
|
|
300
336
|
}) => {
|
|
301
|
-
const [
|
|
337
|
+
const [c] = w(4), [r, i] = w("");
|
|
302
338
|
return /* @__PURE__ */ d(
|
|
303
339
|
"div",
|
|
304
340
|
{
|
|
305
|
-
id:
|
|
341
|
+
id: o,
|
|
306
342
|
"aria-modal": "true",
|
|
307
343
|
role: "dialog",
|
|
308
344
|
"aria-label": "Locked screen",
|
|
309
345
|
style: {
|
|
310
|
-
position:
|
|
346
|
+
position: t,
|
|
311
347
|
inset: 0,
|
|
312
348
|
background: "rgba(12, 14, 18, 0.85)",
|
|
313
349
|
backdropFilter: "blur(4px)",
|
|
@@ -315,7 +351,7 @@ const I = {
|
|
|
315
351
|
placeItems: "center",
|
|
316
352
|
zIndex: 9999
|
|
317
353
|
},
|
|
318
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ D("div", { className: "lockscreen-form", style: { width: 420, maxWidth: "92vw" }, children: [
|
|
319
355
|
/* @__PURE__ */ d("div", { className: "lock-icon-wrap", children: /* @__PURE__ */ d("span", { className: "lock-icon-box" }) }),
|
|
320
356
|
/* @__PURE__ */ d("h2", { children: "잠금됨" }),
|
|
321
357
|
/* @__PURE__ */ d("p", { children: "PIN 번호를 입력하세요" }),
|
|
@@ -329,11 +365,11 @@ const I = {
|
|
|
329
365
|
{
|
|
330
366
|
mask: "*",
|
|
331
367
|
autoFocus: !0,
|
|
332
|
-
length:
|
|
368
|
+
length: c,
|
|
333
369
|
value: r,
|
|
334
370
|
onChange: (l) => {
|
|
335
|
-
const
|
|
336
|
-
|
|
371
|
+
const u = (l ?? "").replace(/\D/g, "").slice(0, c);
|
|
372
|
+
i(u), u.length === c && e(u);
|
|
337
373
|
}
|
|
338
374
|
}
|
|
339
375
|
)
|
|
@@ -342,44 +378,25 @@ const I = {
|
|
|
342
378
|
] })
|
|
343
379
|
}
|
|
344
380
|
);
|
|
345
|
-
}, we = () => {
|
|
346
|
-
const { popups: e, activePopupId: t, setActivePopup: o, closePopup: n, openPopup: r } = W(), s = $(
|
|
347
|
-
async (l, a, f) => {
|
|
348
|
-
try {
|
|
349
|
-
await r(l, a, f);
|
|
350
|
-
} catch (p) {
|
|
351
|
-
throw console.error("팝업 열기 실패:", p), p;
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
[r]
|
|
355
|
-
);
|
|
356
|
-
return {
|
|
357
|
-
popups: e,
|
|
358
|
-
activePopupId: t,
|
|
359
|
-
setActivePopup: o,
|
|
360
|
-
closePopup: n,
|
|
361
|
-
showPopup: s,
|
|
362
|
-
isPopup: e.length > 0
|
|
363
|
-
};
|
|
364
381
|
};
|
|
365
382
|
export {
|
|
366
|
-
|
|
383
|
+
ue as AuthProvider,
|
|
367
384
|
ae as CommonCodeProvider,
|
|
368
|
-
|
|
385
|
+
we as ScreenProtectProvider,
|
|
369
386
|
ne as SearchBoxProvider,
|
|
370
387
|
ee as ServiceCodeProvider,
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
388
|
+
te as useAllServiceCodes,
|
|
389
|
+
ie as useAuth,
|
|
390
|
+
pe as useCodeColor,
|
|
391
|
+
de as useCodeList,
|
|
375
392
|
me as useCodeListByOption,
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
393
|
+
le as useCodeName,
|
|
394
|
+
k as useCommonCode,
|
|
395
|
+
he as useGridLookup,
|
|
379
396
|
fe as useLock,
|
|
380
397
|
re as useLogServiceCodeConfig,
|
|
381
|
-
|
|
398
|
+
ce as usePopup,
|
|
382
399
|
se as useSearchBox,
|
|
383
400
|
O as useServiceCode,
|
|
384
|
-
|
|
401
|
+
oe as useServiceCodeValue
|
|
385
402
|
};
|