@bwg-ui/core 1.0.0 → 1.1.1
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/chunks/AuthContext-CXng9fj0.cjs +1 -0
- package/dist/chunks/AuthContext-Ei2P-z4d.js +52 -0
- package/dist/chunks/BwgLargeUploader-BOf905_l.cjs +2 -0
- package/dist/chunks/BwgLargeUploader-BeI8oV8y.js +3315 -0
- package/dist/chunks/FileUtils-BcnoJ2zn.js +140 -0
- package/dist/chunks/FileUtils-CCBueCSG.cjs +1 -0
- package/dist/chunks/PublicLayout-BiTPwkVq.cjs +35 -0
- package/dist/chunks/PublicLayout-g9WMtoZ0.js +138 -0
- package/dist/chunks/{QuickServiceToggle-y7esp1kp.js → SSOHandler-DVa4JKKb.js} +14831 -14630
- package/dist/chunks/SSOHandler-DiwKoTdN.cjs +183 -0
- package/dist/chunks/ScreenProtectContext-ofv2QgMp.cjs +1 -0
- package/dist/chunks/ScreenProtectContext-zByHldrr.js +114 -0
- package/dist/chunks/SearchBoxContext-B1nxG-Wd.cjs +1 -0
- package/dist/chunks/{ServiceCodeContext-CDZMr3Mm.js → SearchBoxContext-DhKP2pQj.js} +39 -39
- package/dist/chunks/{UtilsContext-B16Gh9LL.cjs → UtilsContext-CLJwXO1Q.cjs} +1 -1
- package/dist/chunks/{UtilsContext-BbfZYiMR.js → UtilsContext-CwVwmfrg.js} +9 -9
- package/dist/chunks/{codeStore-bxk_q1sl.js → codeStore-9alVvK1W.js} +1 -1
- package/dist/chunks/{codeStore-Dt6j826J.cjs → codeStore-B_4WPxpS.cjs} +1 -1
- package/dist/chunks/envUtils-C9Gf5aek.js +29 -0
- package/dist/chunks/envUtils-CduTHoHu.cjs +1 -0
- package/dist/chunks/menuStore-BwLORbDu.cjs +1 -0
- package/dist/chunks/{favoriteStore-CguRSEcH.js → menuStore-DXn19Xnr.js} +136 -123
- package/dist/chunks/{popupStore-CVD8SPTa.cjs → popupStore-D_-Wpcao.cjs} +1 -1
- package/dist/chunks/{popupStore-Dp_fqtim.js → popupStore-JBIRLYTL.js} +1 -1
- package/dist/chunks/{serviceConfig-BJBsdee_.js → serviceConfig-4iBLfLzF.js} +176 -205
- package/dist/chunks/serviceConfig-B5UJqk4b.cjs +2 -0
- package/dist/components/common/BwgCmptArea.d.ts +84 -6
- package/dist/components/common/BwgCol.d.ts +19 -0
- package/dist/components/common/BwgConfigProvider.d.ts +2 -1
- package/dist/components/common/BwgGrid.d.ts +9 -4
- package/dist/components/common/BwgInfoArea.d.ts +2 -1
- package/dist/components/common/BwgRow.d.ts +19 -0
- package/dist/components/common/BwgTitleBox.d.ts +5 -1
- package/dist/components/common/BwgView.d.ts +2 -13
- package/dist/components/common/SSOHandler.d.ts +2 -0
- package/dist/components/common/SearchBox.d.ts +59 -7
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.d.ts +19 -16
- package/dist/components/common/index.js +20 -17
- package/dist/components/core/BwgLargeUploader.d.ts +4 -1
- package/dist/components/core/BwgSearch.d.ts +4 -0
- package/dist/components/core/BwgUploader.d.ts +30 -7
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/components/layout/ProgressOverlay.d.ts +10 -0
- package/dist/components/layout/ProtectLayout.d.ts +6 -0
- package/dist/components/layout/PublicLayout.d.ts +6 -0
- package/dist/components/layout/index.cjs +1 -0
- package/dist/components/layout/index.d.ts +3 -0
- package/dist/components/layout/index.js +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +304 -289
- package/dist/provider/contexts/AuthContext.d.ts +12 -0
- package/dist/provider/contexts/ScreenProtectContext.d.ts +21 -0
- package/dist/provider/contexts/index.d.ts +2 -0
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +25 -19
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +5 -5
- package/dist/styles/assets/images/backgrounds/krx_login_bg.png +0 -0
- package/dist/styles/assets/images/contents/icon/ico-lockscreen.svg +44 -0
- package/dist/styles/assets/images/logos/krx-logo-full.svg +35 -0
- package/dist/styles/components.css +130 -17
- package/dist/styles/global.css +19 -0
- package/dist/styles/layout.css +108 -35
- package/dist/styles/login.css +39 -33
- package/dist/styles/variables.css +221 -5
- package/dist/types/global.d.ts +2 -0
- package/dist/utils/FileUtils.d.ts +7 -0
- package/dist/utils/envUtils.d.ts +8 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +105 -103
- package/package.json +32 -5
- package/dist/chunks/BwgLargeUploader-ByN1XWV4.js +0 -809
- package/dist/chunks/BwgLargeUploader-CU0-MVk4.cjs +0 -1
- package/dist/chunks/QuickServiceToggle-CiCuWfCF.cjs +0 -183
- package/dist/chunks/ServiceCodeContext--ZnMtjzD.cjs +0 -1
- package/dist/chunks/favoriteStore-TgeeY32l.cjs +0 -1
- package/dist/chunks/messageUtils-9DXOwada.js +0 -117
- package/dist/chunks/messageUtils-RjJD_ArW.cjs +0 -1
- package/dist/chunks/serviceConfig-Cr2P4yr4.cjs +0 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import H from "axios";
|
|
2
2
|
import c from "crypto-js";
|
|
3
3
|
import { notification as C } from "antd";
|
|
4
|
-
import { create as
|
|
5
|
-
|
|
4
|
+
import { create as J } from "zustand";
|
|
5
|
+
import { i as P, g as Z } from "./envUtils-C9Gf5aek.js";
|
|
6
|
+
const D = (e) => typeof e != "string" ? !e : e.trim().length === 0, V = (e, t) => D(e) ? t : e || "", X = (e) => !D(e), Y = (e, t, r = "...") => e.length <= t ? e : e.substring(0, t) + r, M = (e) => D(e) ? e : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase(), Q = (e) => D(e) ? e : e.split(" ").map((t) => M(t)).join(" "), ee = (e) => e.replace(/-([a-z])/g, (t) => t[1].toUpperCase()), te = (e) => e.replace(/[A-Z]/g, (t) => `_${t.toLowerCase()}`), re = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), ne = (e) => {
|
|
6
7
|
const r = e.replace(/\D/g, "").match(/^(\d{3})(\d{4})(\d{4})$/);
|
|
7
8
|
return r ? `${r[1]}-${r[2]}-${r[3]}` : e;
|
|
8
9
|
}, se = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e), ae = (e) => {
|
|
@@ -15,7 +16,7 @@ const _ = (e) => typeof e != "string" ? !e : e.trim().length === 0, Z = (e, t) =
|
|
|
15
16
|
`), de = (e, t) => {
|
|
16
17
|
const r = e.match(t);
|
|
17
18
|
return r || [];
|
|
18
|
-
}, ge = (e, t) => e.repeat(t), me = (e, t, r = " ") => e.padStart(t, r),
|
|
19
|
+
}, ge = (e, t) => e.repeat(t), me = (e, t, r = " ") => e.padStart(t, r), he = (e, t, r = " ") => e.padEnd(t, r), fe = (e, t, r = " ") => {
|
|
19
20
|
const n = t - e.length;
|
|
20
21
|
if (n <= 0) return e;
|
|
21
22
|
const a = Math.floor(n / 2), s = n - a;
|
|
@@ -25,25 +26,25 @@ const _ = (e) => typeof e != "string" ? !e : e.trim().length === 0, Z = (e, t) =
|
|
|
25
26
|
for (let n = 0; n < e; n++)
|
|
26
27
|
r += t.charAt(Math.floor(Math.random() * t.length));
|
|
27
28
|
return r;
|
|
28
|
-
},
|
|
29
|
+
}, pe = (e) => e.split("").reverse().join(""), Se = (e, t) => (e.match(new RegExp(t, "g")) || []).length, ye = (e) => e.trim().split(/\s+/).length, B = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
29
30
|
const t = Math.random() * 16 | 0;
|
|
30
31
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
31
32
|
}), R = (e = 32) => {
|
|
32
33
|
const r = B().replace(/-/g, "");
|
|
33
34
|
return e >= 32 ? r + b(e - 32, "0123456789abcdef") : r.substring(0, e);
|
|
34
|
-
}, Ce = () => R(16), Ie = () => R(64),
|
|
35
|
+
}, Ce = () => R(16), Ie = () => R(64), Ue = (e = 16) => b(e, "0123456789"), Ne = (e = 16) => b(e, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"), G = () => B(), j = () => G().replace(/-/g, ""), we = () => {
|
|
35
36
|
const e = Date.now().toString(36), t = b(8, "0123456789abcdef");
|
|
36
37
|
return e + t;
|
|
37
38
|
}, ve = (e, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") => e.replace(
|
|
38
39
|
/[X-Z]/g,
|
|
39
40
|
() => t.charAt(Math.floor(Math.random() * t.length))
|
|
40
|
-
),
|
|
41
|
+
), xe = (e) => {
|
|
41
42
|
const t = c.SHA256(e);
|
|
42
43
|
return c.enc.Base64.stringify(t);
|
|
43
|
-
},
|
|
44
|
+
}, L = () => "abcdefghij1234567890!@#$%^&*();;", K = () => "123456098765!@#$", Ee = (e) => {
|
|
44
45
|
if (!e) return "";
|
|
45
46
|
try {
|
|
46
|
-
const t = c.enc.Utf8.parse(
|
|
47
|
+
const t = c.enc.Utf8.parse(L()), r = c.enc.Utf8.parse(K());
|
|
47
48
|
return c.AES.encrypt(e, t, {
|
|
48
49
|
iv: r,
|
|
49
50
|
padding: c.pad.Pkcs7,
|
|
@@ -52,10 +53,10 @@ const _ = (e) => typeof e != "string" ? !e : e.trim().length === 0, Z = (e, t) =
|
|
|
52
53
|
} catch (t) {
|
|
53
54
|
return console.error("암호화 오류:", t), "";
|
|
54
55
|
}
|
|
55
|
-
},
|
|
56
|
+
}, De = (e) => {
|
|
56
57
|
if (!e) return "";
|
|
57
58
|
try {
|
|
58
|
-
const t = c.enc.Utf8.parse(
|
|
59
|
+
const t = c.enc.Utf8.parse(L()), r = c.enc.Utf8.parse(K());
|
|
59
60
|
return c.AES.decrypt(e, t, {
|
|
60
61
|
iv: r,
|
|
61
62
|
padding: c.pad.Pkcs7,
|
|
@@ -64,71 +65,71 @@ const _ = (e) => typeof e != "string" ? !e : e.trim().length === 0, Z = (e, t) =
|
|
|
64
65
|
} catch (t) {
|
|
65
66
|
return console.error("복호화 오류:", t), "";
|
|
66
67
|
}
|
|
67
|
-
},
|
|
68
|
+
}, be = (e, t) => {
|
|
68
69
|
if (!e) return "";
|
|
69
70
|
try {
|
|
70
|
-
const r = t ||
|
|
71
|
+
const r = t || L();
|
|
71
72
|
return c.AES.encrypt(e, r).toString();
|
|
72
73
|
} catch (r) {
|
|
73
74
|
return console.error("간단한 암호화 오류:", r), "";
|
|
74
75
|
}
|
|
75
|
-
},
|
|
76
|
+
}, Te = (e, t) => {
|
|
76
77
|
if (!e) return "";
|
|
77
78
|
try {
|
|
78
|
-
const r = t ||
|
|
79
|
+
const r = t || L();
|
|
79
80
|
return c.AES.decrypt(e, r).toString(c.enc.Utf8);
|
|
80
81
|
} catch (r) {
|
|
81
82
|
return console.error("간단한 복호화 오류:", r), "";
|
|
82
83
|
}
|
|
83
|
-
},
|
|
84
|
+
}, Ae = (e) => e ? c.MD5(e).toString() : "", Pe = (e) => e ? c.SHA256(e).toString() : "", Le = (e) => e ? c.enc.Base64.stringify(c.enc.Utf8.parse(e)) : "", Oe = (e) => {
|
|
84
85
|
if (!e) return "";
|
|
85
86
|
try {
|
|
86
87
|
return c.enc.Base64.parse(e).toString(c.enc.Utf8);
|
|
87
88
|
} catch (t) {
|
|
88
89
|
return console.error("Base64 디코딩 오류:", t), "";
|
|
89
90
|
}
|
|
90
|
-
},
|
|
91
|
+
}, Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
91
92
|
__proto__: null,
|
|
92
|
-
base64Decode:
|
|
93
|
-
base64Encode:
|
|
93
|
+
base64Decode: Oe,
|
|
94
|
+
base64Encode: Le,
|
|
94
95
|
br2nl: le,
|
|
95
|
-
bxmDecrypt:
|
|
96
|
-
bxmEncrypt:
|
|
96
|
+
bxmDecrypt: De,
|
|
97
|
+
bxmEncrypt: Ee,
|
|
97
98
|
capitalize: M,
|
|
98
99
|
capitalizeWords: Q,
|
|
99
|
-
center:
|
|
100
|
-
countChar:
|
|
101
|
-
countWords:
|
|
102
|
-
encryptSha256:
|
|
100
|
+
center: fe,
|
|
101
|
+
countChar: Se,
|
|
102
|
+
countWords: ye,
|
|
103
|
+
encryptSha256: xe,
|
|
103
104
|
extractNumbers: oe,
|
|
104
105
|
findPattern: de,
|
|
105
106
|
formatPhoneNumber: ne,
|
|
106
|
-
generateAlphanumericUID:
|
|
107
|
+
generateAlphanumericUID: Ne,
|
|
107
108
|
generateCustomUID: ve,
|
|
108
109
|
generateGUID: G,
|
|
109
110
|
generateGUIDWithoutHyphens: j,
|
|
110
111
|
generateLongUID: Ie,
|
|
111
|
-
generateNumericUID:
|
|
112
|
+
generateNumericUID: Ue,
|
|
112
113
|
generateRandomString: b,
|
|
113
114
|
generateShortUID: Ce,
|
|
114
115
|
generateTimestampUID: we,
|
|
115
116
|
generateUID: R,
|
|
116
|
-
isEmpty:
|
|
117
|
+
isEmpty: D,
|
|
117
118
|
isNotEmpty: X,
|
|
118
|
-
isSafeEmpty:
|
|
119
|
+
isSafeEmpty: V,
|
|
119
120
|
isValidEmail: se,
|
|
120
121
|
isValidUrl: ae,
|
|
121
|
-
md5Hash:
|
|
122
|
+
md5Hash: Ae,
|
|
122
123
|
nl2br: ue,
|
|
123
124
|
padLeft: me,
|
|
124
|
-
padRight:
|
|
125
|
+
padRight: he,
|
|
125
126
|
removeHtmlTags: ie,
|
|
126
127
|
removeSpecialChars: ce,
|
|
127
128
|
repeat: ge,
|
|
128
|
-
reverse:
|
|
129
|
-
sha256Hash:
|
|
130
|
-
simpleDecrypt:
|
|
131
|
-
simpleEncrypt:
|
|
129
|
+
reverse: pe,
|
|
130
|
+
sha256Hash: Pe,
|
|
131
|
+
simpleDecrypt: Te,
|
|
132
|
+
simpleEncrypt: be,
|
|
132
133
|
toCamelCase: ee,
|
|
133
134
|
toKebabCase: re,
|
|
134
135
|
toSnakeCase: te,
|
|
@@ -219,21 +220,22 @@ class w {
|
|
|
219
220
|
C.destroy();
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
|
-
const I = w.getInstance(),
|
|
223
|
+
const I = w.getInstance(), _e = (e) => {
|
|
223
224
|
I.showBwgError(e);
|
|
224
|
-
},
|
|
225
|
+
}, Ye = (e, t, r) => {
|
|
225
226
|
I.showSuccess(e, t, r);
|
|
226
|
-
},
|
|
227
|
+
}, Qe = (e, t, r) => {
|
|
227
228
|
I.showInfo(e, t, r);
|
|
228
|
-
},
|
|
229
|
+
}, et = (e, t, r) => {
|
|
229
230
|
I.showWarning(e, t, r);
|
|
230
|
-
},
|
|
231
|
+
}, tt = (e, t, r) => {
|
|
231
232
|
I.showError(e, t, r);
|
|
232
|
-
},
|
|
233
|
+
}, rt = () => {
|
|
233
234
|
I.destroy();
|
|
234
|
-
},
|
|
235
|
+
}, nt = (e) => {
|
|
235
236
|
I.close(e);
|
|
236
237
|
};
|
|
238
|
+
import.meta.env.DEV;
|
|
237
239
|
function ke(e, t) {
|
|
238
240
|
let r;
|
|
239
241
|
try {
|
|
@@ -244,19 +246,19 @@ function ke(e, t) {
|
|
|
244
246
|
return {
|
|
245
247
|
getItem: (a) => {
|
|
246
248
|
var s;
|
|
247
|
-
const
|
|
248
|
-
return m instanceof Promise ? m.then(
|
|
249
|
+
const f = (l) => l === null ? null : JSON.parse(l, void 0), m = (s = r.getItem(a)) != null ? s : null;
|
|
250
|
+
return m instanceof Promise ? m.then(f) : f(m);
|
|
249
251
|
},
|
|
250
252
|
setItem: (a, s) => r.setItem(a, JSON.stringify(s, void 0)),
|
|
251
253
|
removeItem: (a) => r.removeItem(a)
|
|
252
254
|
};
|
|
253
255
|
}
|
|
254
|
-
const
|
|
256
|
+
const _ = (e) => (t) => {
|
|
255
257
|
try {
|
|
256
258
|
const r = e(t);
|
|
257
259
|
return r instanceof Promise ? r : {
|
|
258
260
|
then(n) {
|
|
259
|
-
return
|
|
261
|
+
return _(n)(r);
|
|
260
262
|
},
|
|
261
263
|
catch(n) {
|
|
262
264
|
return this;
|
|
@@ -268,7 +270,7 @@ const P = (e) => (t) => {
|
|
|
268
270
|
return this;
|
|
269
271
|
},
|
|
270
272
|
catch(n) {
|
|
271
|
-
return
|
|
273
|
+
return _(n)(r);
|
|
272
274
|
}
|
|
273
275
|
};
|
|
274
276
|
}
|
|
@@ -277,12 +279,12 @@ const P = (e) => (t) => {
|
|
|
277
279
|
storage: ke(() => localStorage),
|
|
278
280
|
partialize: (o) => o,
|
|
279
281
|
version: 0,
|
|
280
|
-
merge: (o,
|
|
281
|
-
...
|
|
282
|
+
merge: (o, N) => ({
|
|
283
|
+
...N,
|
|
282
284
|
...o
|
|
283
285
|
}),
|
|
284
286
|
...t
|
|
285
|
-
},
|
|
287
|
+
}, f = !1;
|
|
286
288
|
const m = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
287
289
|
let u = s.storage;
|
|
288
290
|
if (!u)
|
|
@@ -295,38 +297,38 @@ const P = (e) => (t) => {
|
|
|
295
297
|
n,
|
|
296
298
|
a
|
|
297
299
|
);
|
|
298
|
-
const
|
|
300
|
+
const y = () => {
|
|
299
301
|
const o = s.partialize({ ...n() });
|
|
300
302
|
return u.setItem(s.name, {
|
|
301
303
|
state: o,
|
|
302
304
|
version: s.version
|
|
303
305
|
});
|
|
304
|
-
},
|
|
305
|
-
a.setState = (o,
|
|
306
|
-
const
|
|
307
|
-
(...o) => (r(...o),
|
|
306
|
+
}, p = a.setState;
|
|
307
|
+
a.setState = (o, N) => (p(o, N), y());
|
|
308
|
+
const S = e(
|
|
309
|
+
(...o) => (r(...o), y()),
|
|
308
310
|
n,
|
|
309
311
|
a
|
|
310
312
|
);
|
|
311
|
-
a.getInitialState = () =>
|
|
312
|
-
let
|
|
313
|
-
const
|
|
314
|
-
var o,
|
|
313
|
+
a.getInitialState = () => S;
|
|
314
|
+
let U;
|
|
315
|
+
const W = () => {
|
|
316
|
+
var o, N;
|
|
315
317
|
if (!u) return;
|
|
316
|
-
|
|
317
|
-
var
|
|
318
|
-
return i((
|
|
318
|
+
f = !1, m.forEach((i) => {
|
|
319
|
+
var h;
|
|
320
|
+
return i((h = n()) != null ? h : S);
|
|
319
321
|
});
|
|
320
|
-
const
|
|
321
|
-
return
|
|
322
|
+
const A = ((N = s.onRehydrateStorage) == null ? void 0 : N.call(s, (o = n()) != null ? o : S)) || void 0;
|
|
323
|
+
return _(u.getItem.bind(u))(s.name).then((i) => {
|
|
322
324
|
if (i)
|
|
323
325
|
if (typeof i.version == "number" && i.version !== s.version) {
|
|
324
326
|
if (s.migrate) {
|
|
325
|
-
const
|
|
327
|
+
const h = s.migrate(
|
|
326
328
|
i.state,
|
|
327
329
|
i.version
|
|
328
330
|
);
|
|
329
|
-
return
|
|
331
|
+
return h instanceof Promise ? h.then((O) => [!0, O]) : [!0, h];
|
|
330
332
|
}
|
|
331
333
|
console.error(
|
|
332
334
|
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
@@ -335,17 +337,17 @@ const P = (e) => (t) => {
|
|
|
335
337
|
return [!1, i.state];
|
|
336
338
|
return [!1, void 0];
|
|
337
339
|
}).then((i) => {
|
|
338
|
-
var
|
|
339
|
-
const [
|
|
340
|
-
if (
|
|
341
|
-
|
|
342
|
-
(
|
|
343
|
-
), r(
|
|
344
|
-
return
|
|
340
|
+
var h;
|
|
341
|
+
const [O, z] = i;
|
|
342
|
+
if (U = s.merge(
|
|
343
|
+
z,
|
|
344
|
+
(h = n()) != null ? h : S
|
|
345
|
+
), r(U, !0), O)
|
|
346
|
+
return y();
|
|
345
347
|
}).then(() => {
|
|
346
|
-
|
|
348
|
+
A?.(U, void 0), U = n(), f = !0, l.forEach((i) => i(U));
|
|
347
349
|
}).catch((i) => {
|
|
348
|
-
|
|
350
|
+
A?.(void 0, i);
|
|
349
351
|
});
|
|
350
352
|
};
|
|
351
353
|
return a.persist = {
|
|
@@ -359,17 +361,17 @@ const P = (e) => (t) => {
|
|
|
359
361
|
u?.removeItem(s.name);
|
|
360
362
|
},
|
|
361
363
|
getOptions: () => s,
|
|
362
|
-
rehydrate: () =>
|
|
363
|
-
hasHydrated: () =>
|
|
364
|
+
rehydrate: () => W(),
|
|
365
|
+
hasHydrated: () => f,
|
|
364
366
|
onHydrate: (o) => (m.add(o), () => {
|
|
365
367
|
m.delete(o);
|
|
366
368
|
}),
|
|
367
369
|
onFinishHydration: (o) => (l.add(o), () => {
|
|
368
370
|
l.delete(o);
|
|
369
371
|
})
|
|
370
|
-
}, s.skipHydration ||
|
|
371
|
-
},
|
|
372
|
-
|
|
372
|
+
}, s.skipHydration || W(), U || S;
|
|
373
|
+
}, $e = Re, g = J()(
|
|
374
|
+
$e(
|
|
373
375
|
(e, t) => ({
|
|
374
376
|
user: null,
|
|
375
377
|
isLoggedIn: !1,
|
|
@@ -397,53 +399,26 @@ const P = (e) => (t) => {
|
|
|
397
399
|
// 저장할 상태만 선택
|
|
398
400
|
}
|
|
399
401
|
)
|
|
400
|
-
),
|
|
401
|
-
const t =
|
|
402
|
+
), st = () => g.getState().user?.crprCd || null, We = () => g.getState().user?.userId || null, He = () => g.getState().user?.userNm || null, at = () => g.getState().user?.userDvsn || null, ot = () => g.getState().user?.emplNo || null, Me = () => g.getState().user?.dprtCd || null, Be = () => g.getState().user?.dprtNm || null, $ = () => g.getState().user?.roleList || null, ct = (e) => {
|
|
403
|
+
const t = $();
|
|
402
404
|
return t ? t.includes(e) : !1;
|
|
403
|
-
},
|
|
404
|
-
const t =
|
|
405
|
+
}, it = (e) => {
|
|
406
|
+
const t = $();
|
|
405
407
|
return t ? e.some((r) => t.includes(r)) : !1;
|
|
406
|
-
},
|
|
407
|
-
const t =
|
|
408
|
+
}, ut = (e) => {
|
|
409
|
+
const t = $();
|
|
408
410
|
return t ? e.every((r) => t.includes(r)) : !1;
|
|
409
|
-
},
|
|
410
|
-
const e = He(), t =
|
|
411
|
+
}, lt = () => g.getState().isLoggedIn, F = () => g.getState().user, dt = () => F() !== null, gt = () => {
|
|
412
|
+
const e = He(), t = We();
|
|
411
413
|
return e || t || null;
|
|
412
|
-
},
|
|
414
|
+
}, mt = () => {
|
|
413
415
|
const e = Be(), t = Me();
|
|
414
416
|
return e || (t ? String(t) : null);
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
try {
|
|
421
|
-
const t = import.meta?.env;
|
|
422
|
-
if (typeof t?.DEV == "boolean") return t.DEV;
|
|
423
|
-
if (typeof t?.MODE == "string") return t.MODE === "development";
|
|
424
|
-
} catch {
|
|
425
|
-
}
|
|
426
|
-
return typeof process < "u" && process?.env?.NODE_ENV ? process.env.NODE_ENV !== "production" : !1;
|
|
427
|
-
})();
|
|
428
|
-
let Ge = [], je = [];
|
|
429
|
-
function q() {
|
|
430
|
-
if (typeof window < "u" && window.location)
|
|
431
|
-
return window.location.hostname;
|
|
432
|
-
}
|
|
433
|
-
const Ke = (() => {
|
|
434
|
-
const e = q();
|
|
435
|
-
return !!(e && Ge.includes(e));
|
|
436
|
-
})(), Fe = (() => {
|
|
437
|
-
const e = q();
|
|
438
|
-
return !!(e && je.includes(e));
|
|
439
|
-
})();
|
|
440
|
-
function qe() {
|
|
441
|
-
return D ? "X" : Ke ? "D" : Fe ? "P" : "X";
|
|
442
|
-
}
|
|
443
|
-
let x = null;
|
|
444
|
-
const St = (e) => {
|
|
445
|
-
x === null && (x = e);
|
|
446
|
-
}, Ct = () => x, It = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), x || "unknown"), k = {
|
|
417
|
+
};
|
|
418
|
+
let E = null;
|
|
419
|
+
const ht = (e) => {
|
|
420
|
+
E === null && (E = e);
|
|
421
|
+
}, ft = () => E, pt = async () => (console.log("IP 검증 비활성화됨 (성능 최적화)"), E || "unknown"), k = {
|
|
447
422
|
method: "POST",
|
|
448
423
|
timeout: 3e4,
|
|
449
424
|
// 30초
|
|
@@ -461,7 +436,7 @@ const St = (e) => {
|
|
|
461
436
|
Accept: "application/json; charset=utf-8"
|
|
462
437
|
}
|
|
463
438
|
});
|
|
464
|
-
|
|
439
|
+
P && (console.log("🔧 API Client Configuration:"), console.log(" - Timeout:", v.defaults.timeout), console.log(" - With Credentials:", v.defaults.withCredentials), console.log(" - Environment:", Z()));
|
|
465
440
|
v.interceptors.request.use(
|
|
466
441
|
(e) => {
|
|
467
442
|
let t = "UNKNOWN", r = "UNKNOWN";
|
|
@@ -492,7 +467,7 @@ v.interceptors.response.use(
|
|
|
492
467
|
), e;
|
|
493
468
|
},
|
|
494
469
|
async (e) => {
|
|
495
|
-
if (console.error("❌ API 응답 에러:", e),
|
|
470
|
+
if (console.error("❌ API 응답 에러:", e), P && console.error("🚨 Error Details:", {
|
|
496
471
|
message: e.message,
|
|
497
472
|
status: e.response?.status,
|
|
498
473
|
statusText: e.response?.statusText,
|
|
@@ -525,7 +500,7 @@ v.interceptors.response.use(
|
|
|
525
500
|
return Promise.reject(e);
|
|
526
501
|
}
|
|
527
502
|
);
|
|
528
|
-
const
|
|
503
|
+
const Ge = () => j(), T = async (e, t, r) => {
|
|
529
504
|
try {
|
|
530
505
|
const n = {
|
|
531
506
|
...k,
|
|
@@ -537,40 +512,40 @@ const ze = () => j(), O = async (e, t, r) => {
|
|
|
537
512
|
withCredentials: n.withCredentials
|
|
538
513
|
};
|
|
539
514
|
n.headers && (a.headers = n.headers);
|
|
540
|
-
const s =
|
|
515
|
+
const s = E || "unknown", f = __APP_CD__, m = __SYS_CD__;
|
|
541
516
|
console.log("@@ request param :: ", t);
|
|
542
517
|
const l = {
|
|
543
518
|
header: {
|
|
544
519
|
trxCd: e,
|
|
545
|
-
guid:
|
|
520
|
+
guid: Ge(),
|
|
546
521
|
userInfo: F(),
|
|
547
522
|
clientIp: s,
|
|
548
523
|
// 클라이언트 IP 추가 (서버에서 재확인 권장)
|
|
549
524
|
domainId: "DEFAULT",
|
|
550
|
-
appCd:
|
|
525
|
+
appCd: f,
|
|
551
526
|
sysCd: m
|
|
552
527
|
},
|
|
553
528
|
// data: bxmEncrypt(JSON.stringify(data)),
|
|
554
529
|
data: t
|
|
555
530
|
};
|
|
556
|
-
|
|
531
|
+
P && (console.log("__BWG_LOCAL__ 테스트 입니다. ", P), console.log("📤 Request Data:", l)), n.method === "GET" ? a.params = l || n.params : (a.data = l || n.data, n.params && (a.params = n.params));
|
|
557
532
|
let u;
|
|
558
|
-
for (let
|
|
533
|
+
for (let y = 0; y <= (n.retryCount || 0); y++)
|
|
559
534
|
try {
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
for (const
|
|
563
|
-
if (
|
|
564
|
-
return
|
|
535
|
+
const p = await v(a);
|
|
536
|
+
if (p.data.header?.resCd == 0) {
|
|
537
|
+
for (const S in p.data)
|
|
538
|
+
if (S !== "header")
|
|
539
|
+
return p.data[S];
|
|
565
540
|
} else
|
|
566
|
-
return
|
|
541
|
+
return _e({
|
|
567
542
|
message: "서비스 호출 실패",
|
|
568
|
-
description:
|
|
543
|
+
description: p.data.header?.resMsg || "요청 처리 중 오류가 발생했습니다.",
|
|
569
544
|
duration: 5
|
|
570
545
|
}), null;
|
|
571
|
-
} catch (
|
|
572
|
-
if (u =
|
|
573
|
-
await
|
|
546
|
+
} catch (p) {
|
|
547
|
+
if (u = p, je(u) && y < (n.retryCount || 0)) {
|
|
548
|
+
await Ke(n.retryDelay || 1e3);
|
|
574
549
|
continue;
|
|
575
550
|
}
|
|
576
551
|
break;
|
|
@@ -579,7 +554,7 @@ const ze = () => j(), O = async (e, t, r) => {
|
|
|
579
554
|
} catch (n) {
|
|
580
555
|
throw console.error("callService 에러:", n), n;
|
|
581
556
|
}
|
|
582
|
-
},
|
|
557
|
+
}, je = (e) => !e.response || e.response.status >= 500 && e.response.status < 600, Ke = (e) => new Promise((t) => setTimeout(t, e)), St = (e, t, r) => T(e, t, { ...r, method: "GET" }), yt = (e, t, r) => T(e, t, { ...r, method: "POST" }), Ct = (e, t, r) => T(e, t, { ...r, method: "PUT" }), It = (e, t, r) => T(e, t, { ...r, method: "DELETE" }), Ut = (e, t, r) => T(e, t, { ...r, method: "PATCH" }), q = {
|
|
583
558
|
// 권한 관련
|
|
584
559
|
AUTH_BTNS: "SCMSIGN00202",
|
|
585
560
|
// 버튼 권한 조회
|
|
@@ -594,106 +569,102 @@ const ze = () => j(), O = async (e, t, r) => {
|
|
|
594
569
|
AUTH_BMRK: "SCMBMRK00101"
|
|
595
570
|
// 즐겨찾기 관리
|
|
596
571
|
};
|
|
597
|
-
let
|
|
598
|
-
function
|
|
599
|
-
|
|
572
|
+
let x = {};
|
|
573
|
+
function Nt(e) {
|
|
574
|
+
x = e, console.log("🔧 Provider 서비스코드 오버라이드 설정:", e);
|
|
600
575
|
}
|
|
601
|
-
function
|
|
602
|
-
if (
|
|
603
|
-
return console.log(`🔧 Provider 설정 사용: ${e} = ${
|
|
604
|
-
const t =
|
|
576
|
+
function Fe(e) {
|
|
577
|
+
if (x[e] && x[e].trim() !== "")
|
|
578
|
+
return console.log(`🔧 Provider 설정 사용: ${e} = ${x[e]}`), x[e];
|
|
579
|
+
const t = q[e];
|
|
605
580
|
return console.log(`🔧 기본값 사용: ${e} = ${t}`), t;
|
|
606
581
|
}
|
|
607
|
-
function
|
|
582
|
+
function wt() {
|
|
608
583
|
const e = {};
|
|
609
|
-
for (const t of Object.keys(
|
|
610
|
-
e[t] =
|
|
584
|
+
for (const t of Object.keys(q))
|
|
585
|
+
e[t] = Fe(t);
|
|
611
586
|
return e;
|
|
612
587
|
}
|
|
613
588
|
export {
|
|
614
|
-
|
|
589
|
+
mt as $,
|
|
615
590
|
se as A,
|
|
616
591
|
ae as B,
|
|
617
|
-
|
|
592
|
+
Ae as C,
|
|
618
593
|
ue as D,
|
|
619
594
|
me as E,
|
|
620
|
-
|
|
595
|
+
he as F,
|
|
621
596
|
ie as G,
|
|
622
597
|
ce as H,
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
598
|
+
pe as I,
|
|
599
|
+
Pe as J,
|
|
600
|
+
Te as K,
|
|
601
|
+
be as L,
|
|
627
602
|
ee as M,
|
|
628
603
|
re as N,
|
|
629
604
|
te as O,
|
|
630
605
|
Y as P,
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
606
|
+
It as Q,
|
|
607
|
+
St as R,
|
|
608
|
+
Ut as S,
|
|
609
|
+
yt as T,
|
|
610
|
+
Ct as U,
|
|
611
|
+
T as V,
|
|
612
|
+
ft as W,
|
|
613
|
+
Ge as X,
|
|
614
|
+
ht as Y,
|
|
615
|
+
pt as Z,
|
|
616
|
+
st as _,
|
|
617
|
+
Le as a,
|
|
618
|
+
gt as a0,
|
|
644
619
|
Me as a1,
|
|
645
620
|
Be as a2,
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
621
|
+
ot as a3,
|
|
622
|
+
$ as a4,
|
|
623
|
+
at as a5,
|
|
624
|
+
We as a6,
|
|
650
625
|
F as a7,
|
|
651
626
|
He as a8,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
627
|
+
ut as a9,
|
|
628
|
+
it as aa,
|
|
629
|
+
ct as ab,
|
|
630
|
+
dt as ac,
|
|
631
|
+
lt as ad,
|
|
632
|
+
nt as ae,
|
|
633
|
+
rt as af,
|
|
659
634
|
I as ag,
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
g as as,
|
|
672
|
-
We as at,
|
|
673
|
-
tt as au,
|
|
674
|
-
Le as b,
|
|
635
|
+
tt as ah,
|
|
636
|
+
Qe as ai,
|
|
637
|
+
Ye as aj,
|
|
638
|
+
et as ak,
|
|
639
|
+
wt as al,
|
|
640
|
+
Fe as am,
|
|
641
|
+
Nt as an,
|
|
642
|
+
g as ao,
|
|
643
|
+
$e as ap,
|
|
644
|
+
Xe as aq,
|
|
645
|
+
Oe as b,
|
|
675
646
|
le as c,
|
|
676
|
-
|
|
677
|
-
|
|
647
|
+
De as d,
|
|
648
|
+
Ee as e,
|
|
678
649
|
M as f,
|
|
679
650
|
Q as g,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
651
|
+
fe as h,
|
|
652
|
+
Se as i,
|
|
653
|
+
ye as j,
|
|
654
|
+
xe as k,
|
|
684
655
|
oe as l,
|
|
685
656
|
de as m,
|
|
686
657
|
ne as n,
|
|
687
|
-
|
|
658
|
+
Ne as o,
|
|
688
659
|
ve as p,
|
|
689
660
|
G as q,
|
|
690
661
|
j as r,
|
|
691
662
|
Ie as s,
|
|
692
|
-
|
|
663
|
+
Ue as t,
|
|
693
664
|
b as u,
|
|
694
665
|
Ce as v,
|
|
695
666
|
we as w,
|
|
696
667
|
R as x,
|
|
697
|
-
|
|
698
|
-
|
|
668
|
+
D as y,
|
|
669
|
+
V as z
|
|
699
670
|
};
|