@bwg-ui/core 1.2.21 → 1.2.22
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/{MenuReport-D-gxEaXb.js → MenuReport-Bsz0OEet.js} +26 -26
- package/dist/chunks/MenuReport-PYufvmGR.cjs +1 -0
- package/dist/chunks/common-components-CdNJR00U.cjs +1109 -0
- package/dist/chunks/common-components-aD7WLZ5f.js +50899 -0
- package/dist/chunks/layout-components-CIO09Lhe.cjs +35 -0
- package/dist/chunks/{layout-components-IvmBzdev.js → layout-components-OnRWLesF.js} +269 -234
- package/dist/components/common/ButtonAccessController.d.ts.map +1 -1
- package/dist/components/common/BwgTitleBox.d.ts.map +1 -1
- package/dist/components/common/BwgView.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
- package/dist/components/layout/default/LocalPopupContainer.d.ts.map +1 -1
- package/dist/components/layout/default/PopupContainer.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/pages/board/CMAdminBoardM01.d.ts +6 -0
- package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +1 -0
- package/dist/components/pages/board/CMBoardS01.d.ts +8 -0
- package/dist/components/pages/board/CMBoardS01.d.ts.map +1 -0
- package/dist/components/pages/board/CMMyBoardM01.d.ts +6 -0
- package/dist/components/pages/board/CMMyBoardM01.d.ts.map +1 -0
- package/dist/components/pages/index.d.ts +6 -1
- package/dist/components/pages/index.d.ts.map +1 -1
- package/dist/components/pages/syst/SystemCodeManage.d.ts +7 -0
- package/dist/components/pages/syst/SystemCodeManage.d.ts.map +1 -0
- package/dist/components/popup/CMPrgrMstrP02.d.ts +3 -0
- package/dist/components/popup/CMPrgrMstrP02.d.ts.map +1 -0
- package/dist/components/popup/MenuReport.d.ts +1 -1
- package/dist/components/popup/MenuReport.d.ts.map +1 -1
- package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.d.ts +1 -0
- package/dist/components/popup/index.d.ts.map +1 -1
- package/dist/components/popup/index.js +7 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +220 -214
- package/dist/provider/contexts/ServiceCodeContext.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +115 -134
- package/dist/stores/codeStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +2 -2
- package/dist/stores/index.js +342 -247
- package/dist/stores/userStore.d.ts +4 -0
- package/dist/stores/userStore.d.ts.map +1 -1
- package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
- package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
- package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
- package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
- package/dist/utils/apiUtils.d.ts.map +1 -1
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +38 -36
- package/dist/utils/serviceConfig.d.ts +1 -1
- package/dist/utils/serviceConfig.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/chunks/MenuReport-DbGZz84g.cjs +0 -1
- package/dist/chunks/common-components-BLgaNCNY.js +0 -30500
- package/dist/chunks/common-components-CeY5flj3.cjs +0 -1028
- package/dist/chunks/layout-components-C_HvgcCg.cjs +0 -35
package/dist/utils/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import It from "axios";
|
|
2
|
-
import { g as ke, c as Tt, a as j } from "../chunks/common-components-
|
|
2
|
+
import { g as ke, c as Tt, a as j } from "../chunks/common-components-aD7WLZ5f.js";
|
|
3
3
|
import D from "dayjs";
|
|
4
4
|
import { notification as L, message as V } from "antd";
|
|
5
5
|
import { useUserStore as O } from "../stores/index.js";
|
|
6
|
-
import { unescape as
|
|
7
|
-
const
|
|
6
|
+
import { unescape as qt } from "lodash";
|
|
7
|
+
const Ot = {
|
|
8
8
|
// 권한 관련
|
|
9
9
|
AUTH_BTNS: "SCMSIGN00202",
|
|
10
10
|
// 버튼 권한 조회
|
|
@@ -18,6 +18,7 @@ const qt = {
|
|
|
18
18
|
// 즐겨찾기 관련
|
|
19
19
|
AUTH_BMRK: "SCMBMRK00101",
|
|
20
20
|
// 즐겨찾기 관리
|
|
21
|
+
// 시스템 코드 관련
|
|
21
22
|
SYST_CODE: "SCMSYST00101"
|
|
22
23
|
// 시스템 코드 조회
|
|
23
24
|
};
|
|
@@ -26,11 +27,11 @@ function Te(t) {
|
|
|
26
27
|
J = t, console.log("🔧 Provider 서비스코드 오버라이드 설정:", t);
|
|
27
28
|
}
|
|
28
29
|
function jt(t) {
|
|
29
|
-
return J[t] && J[t].trim() !== "" ? J[t] :
|
|
30
|
+
return J[t] && J[t].trim() !== "" ? J[t] : Ot[t];
|
|
30
31
|
}
|
|
31
32
|
function Vt() {
|
|
32
33
|
const t = {};
|
|
33
|
-
for (const e of Object.keys(
|
|
34
|
+
for (const e of Object.keys(Ot))
|
|
34
35
|
t[e] = jt(e);
|
|
35
36
|
return t;
|
|
36
37
|
}
|
|
@@ -44,6 +45,7 @@ function De() {
|
|
|
44
45
|
}
|
|
45
46
|
const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
46
47
|
__proto__: null,
|
|
48
|
+
DEFAULT_SERVICE_CODES: Ot,
|
|
47
49
|
getAllServiceCodes: Vt,
|
|
48
50
|
getServiceCode: jt,
|
|
49
51
|
logServiceCodeConfig: De,
|
|
@@ -58,9 +60,9 @@ const Oe = {}, Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
58
60
|
__proto__: null,
|
|
59
61
|
default: Oe
|
|
60
62
|
}, Symbol.toStringTag, { value: "Module" })), Ye = /* @__PURE__ */ ke(Ne);
|
|
61
|
-
var Ue = ct.exports,
|
|
63
|
+
var Ue = ct.exports, At;
|
|
62
64
|
function Kt() {
|
|
63
|
-
return
|
|
65
|
+
return At || (At = 1, (function(t, e) {
|
|
64
66
|
(function(r, n) {
|
|
65
67
|
t.exports = n();
|
|
66
68
|
})(Ue, function() {
|
|
@@ -559,9 +561,9 @@ function Kt() {
|
|
|
559
561
|
});
|
|
560
562
|
})(ct)), ct.exports;
|
|
561
563
|
}
|
|
562
|
-
var Ee = it.exports,
|
|
564
|
+
var Ee = it.exports, Bt;
|
|
563
565
|
function Ae() {
|
|
564
|
-
return
|
|
566
|
+
return Bt || (Bt = 1, (function(t, e) {
|
|
565
567
|
(function(r, n) {
|
|
566
568
|
t.exports = n(/* @__PURE__ */ Kt());
|
|
567
569
|
})(Ee, function(r) {
|
|
@@ -613,9 +615,9 @@ function Ae() {
|
|
|
613
615
|
}
|
|
614
616
|
var Be = /* @__PURE__ */ Ae();
|
|
615
617
|
const Pe = /* @__PURE__ */ j(Be);
|
|
616
|
-
var ut = { exports: {} }, Re = ut.exports,
|
|
618
|
+
var ut = { exports: {} }, Re = ut.exports, Pt;
|
|
617
619
|
function Fe() {
|
|
618
|
-
return
|
|
620
|
+
return Pt || (Pt = 1, (function(t, e) {
|
|
619
621
|
(function(r, n) {
|
|
620
622
|
t.exports = n(/* @__PURE__ */ Kt());
|
|
621
623
|
})(Re, function(r) {
|
|
@@ -690,9 +692,9 @@ function Fe() {
|
|
|
690
692
|
}
|
|
691
693
|
var Le = /* @__PURE__ */ Fe();
|
|
692
694
|
const He = /* @__PURE__ */ j(Le);
|
|
693
|
-
var lt = { exports: {} }, ze = lt.exports,
|
|
695
|
+
var lt = { exports: {} }, ze = lt.exports, Rt;
|
|
694
696
|
function qe() {
|
|
695
|
-
return
|
|
697
|
+
return Rt || (Rt = 1, (function(t, e) {
|
|
696
698
|
(function(r, n) {
|
|
697
699
|
t.exports = n();
|
|
698
700
|
})(ze, (function() {
|
|
@@ -736,9 +738,9 @@ function qe() {
|
|
|
736
738
|
}
|
|
737
739
|
var je = /* @__PURE__ */ qe();
|
|
738
740
|
const Ve = /* @__PURE__ */ j(je);
|
|
739
|
-
var dt = { exports: {} }, We = dt.exports,
|
|
741
|
+
var dt = { exports: {} }, We = dt.exports, Ft;
|
|
740
742
|
function Ke() {
|
|
741
|
-
return
|
|
743
|
+
return Ft || (Ft = 1, (function(t, e) {
|
|
742
744
|
(function(r, n) {
|
|
743
745
|
t.exports = n();
|
|
744
746
|
})(We, (function() {
|
|
@@ -801,9 +803,9 @@ function Ke() {
|
|
|
801
803
|
}
|
|
802
804
|
var Ge = /* @__PURE__ */ Ke();
|
|
803
805
|
const Ze = /* @__PURE__ */ j(Ge);
|
|
804
|
-
var ft = { exports: {} }, Je = ft.exports,
|
|
806
|
+
var ft = { exports: {} }, Je = ft.exports, Lt;
|
|
805
807
|
function Xe() {
|
|
806
|
-
return
|
|
808
|
+
return Lt || (Lt = 1, (function(t, e) {
|
|
807
809
|
(function(r, n) {
|
|
808
810
|
t.exports = n();
|
|
809
811
|
})(Je, (function() {
|
|
@@ -878,9 +880,9 @@ function Xe() {
|
|
|
878
880
|
}
|
|
879
881
|
var Qe = /* @__PURE__ */ Xe();
|
|
880
882
|
const tr = /* @__PURE__ */ j(Qe);
|
|
881
|
-
var ht = { exports: {} }, er = ht.exports,
|
|
883
|
+
var ht = { exports: {} }, er = ht.exports, Ht;
|
|
882
884
|
function rr() {
|
|
883
|
-
return
|
|
885
|
+
return Ht || (Ht = 1, (function(t, e) {
|
|
884
886
|
(function(r, n) {
|
|
885
887
|
t.exports = n();
|
|
886
888
|
})(er, (function() {
|
|
@@ -978,10 +980,10 @@ function rr() {
|
|
|
978
980
|
k && (I = b[2]), c = this.$locale(), !_ && I && (c = o.Ls[I]), this.$d = (function(R, B, F, nt) {
|
|
979
981
|
try {
|
|
980
982
|
if (["x", "X"].indexOf(B) > -1) return new Date((B === "X" ? 1e3 : 1) * R);
|
|
981
|
-
var N = i(B)(R), xt = N.year, ot = N.month, Ce = N.day, $e = N.hours, be = N.minutes, Me = N.seconds, _e = N.milliseconds,
|
|
983
|
+
var N = i(B)(R), xt = N.year, ot = N.month, Ce = N.day, $e = N.hours, be = N.minutes, Me = N.seconds, _e = N.milliseconds, Ut = N.zone, Et = N.week, St = /* @__PURE__ */ new Date(), Ct = Ce || (xt || ot ? 1 : St.getDate()), $t = xt || St.getFullYear(), st = 0;
|
|
982
984
|
xt && !ot || (st = ot > 0 ? ot - 1 : St.getMonth());
|
|
983
985
|
var at, bt = $e || 0, Mt = be || 0, _t = Me || 0, kt = _e || 0;
|
|
984
|
-
return
|
|
986
|
+
return Ut ? new Date(Date.UTC($t, st, Ct, bt, Mt, _t, kt + 60 * Ut.offset * 1e3)) : F ? new Date(Date.UTC($t, st, Ct, bt, Mt, _t, kt)) : (at = new Date($t, st, Ct, bt, Mt, _t, kt), Et && (at = nt(at).week(Et).toDate()), at);
|
|
985
987
|
} catch {
|
|
986
988
|
return /* @__PURE__ */ new Date("");
|
|
987
989
|
}
|
|
@@ -1003,9 +1005,9 @@ function rr() {
|
|
|
1003
1005
|
}
|
|
1004
1006
|
var nr = /* @__PURE__ */ rr();
|
|
1005
1007
|
const or = /* @__PURE__ */ j(nr);
|
|
1006
|
-
var mt = { exports: {} }, sr = mt.exports,
|
|
1008
|
+
var mt = { exports: {} }, sr = mt.exports, zt;
|
|
1007
1009
|
function ar() {
|
|
1008
|
-
return
|
|
1010
|
+
return zt || (zt = 1, (function(t, e) {
|
|
1009
1011
|
(function(r, n) {
|
|
1010
1012
|
t.exports = n();
|
|
1011
1013
|
})(sr, (function() {
|
|
@@ -1119,7 +1121,7 @@ const cr = /* @__PURE__ */ j(ir), ur = "ui_theme", lr = (t) => typeof t == "stri
|
|
|
1119
1121
|
}, Zr = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
|
|
1120
1122
|
const e = Math.random() * 16 | 0;
|
|
1121
1123
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
1122
|
-
}),
|
|
1124
|
+
}), Nt = (t = 32) => {
|
|
1123
1125
|
const r = Zr().replace(/-/g, "");
|
|
1124
1126
|
return t >= 32 ? r + Zt(t - 32, "0123456789abcdef") : r.substring(0, t);
|
|
1125
1127
|
};
|
|
@@ -1160,7 +1162,7 @@ const sn = (t) => {
|
|
|
1160
1162
|
format: Qt,
|
|
1161
1163
|
generateRandomColor: Mr,
|
|
1162
1164
|
generateRandomString: Zt,
|
|
1163
|
-
generateUID:
|
|
1165
|
+
generateUID: Nt,
|
|
1164
1166
|
getApiDeps: G,
|
|
1165
1167
|
getCookie: Hr,
|
|
1166
1168
|
getDeviceType: gt,
|
|
@@ -1199,7 +1201,7 @@ const sn = (t) => {
|
|
|
1199
1201
|
startOf: en,
|
|
1200
1202
|
throttle: wr,
|
|
1201
1203
|
toCamelCase: jr
|
|
1202
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1204
|
+
}, Symbol.toStringTag, { value: "Module" })), Yt = (() => {
|
|
1203
1205
|
try {
|
|
1204
1206
|
if (import.meta.env.DEV)
|
|
1205
1207
|
return !0;
|
|
@@ -1223,14 +1225,14 @@ const se = (() => {
|
|
|
1223
1225
|
return !!(t && ne.includes(t));
|
|
1224
1226
|
})();
|
|
1225
1227
|
function cn() {
|
|
1226
|
-
return
|
|
1228
|
+
return Yt ? "X" : se ? "D" : ae ? "P" : "X";
|
|
1227
1229
|
}
|
|
1228
1230
|
const ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1229
1231
|
__proto__: null,
|
|
1230
1232
|
configureEnvUtils: an,
|
|
1231
1233
|
getEnvCode: cn,
|
|
1232
1234
|
isDev: se,
|
|
1233
|
-
isLocal:
|
|
1235
|
+
isLocal: Yt,
|
|
1234
1236
|
isProd: ae
|
|
1235
1237
|
}, Symbol.toStringTag, { value: "Module" })), E = {
|
|
1236
1238
|
duration: 4.5,
|
|
@@ -1415,7 +1417,7 @@ const Dt = {
|
|
|
1415
1417
|
headers: {
|
|
1416
1418
|
"Content-Type": "application/json; charset=utf-8",
|
|
1417
1419
|
Accept: "application/json; charset=utf-8",
|
|
1418
|
-
"Apm-Guid":
|
|
1420
|
+
"Apm-Guid": Nt()
|
|
1419
1421
|
}
|
|
1420
1422
|
});
|
|
1421
1423
|
pt.interceptors.request.use(
|
|
@@ -1455,7 +1457,7 @@ pt.interceptors.response.use(
|
|
|
1455
1457
|
},
|
|
1456
1458
|
async (t) => {
|
|
1457
1459
|
const e = G();
|
|
1458
|
-
if (t.config && t.config.showLoading && !t.config.isPopup && e.hideLoading?.(), t.config && t.config.isPopup && e.hidePopupLoading?.(), console.error("❌ API 응답 에러:", t),
|
|
1460
|
+
if (t.config && t.config.showLoading && !t.config.isPopup && e.hideLoading?.(), t.config && t.config.isPopup && e.hidePopupLoading?.(), console.error("❌ API 응답 에러:", t), Yt && console.error("🚨 Error Details:", {
|
|
1459
1461
|
message: t.message,
|
|
1460
1462
|
status: t.response?.status,
|
|
1461
1463
|
statusText: t.response?.statusText,
|
|
@@ -1564,7 +1566,6 @@ const kn = async () => {
|
|
|
1564
1566
|
duration: 5
|
|
1565
1567
|
}) : d === "I" ? ue(n, f, 5) : le(n, f, 5);
|
|
1566
1568
|
}, pe = async (t, e, r, n, u) => {
|
|
1567
|
-
console.log("## callService 호출"), console.log(`## 전역 :: ${__SYS_CD__} | ${__APP_CD__} | ${u} | ${e}`);
|
|
1568
1569
|
const d = G().findSystemByAppCd?.(u ?? __APP_CD__);
|
|
1569
1570
|
(!d || !d.sysCd) && console.error("해당 앱코드는 존재하지 않습니다.", u), await kn();
|
|
1570
1571
|
const S = {
|
|
@@ -2076,7 +2077,7 @@ const we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2076
2077
|
draftUrlBase: f = "https://kgwd.krx.co.kr/ezConn/ezApprGate.do",
|
|
2077
2078
|
windowFeatures: d = "width=1000,height=600",
|
|
2078
2079
|
fetchFilesTrxCd: S = "SCMFILE00101"
|
|
2079
|
-
} = r || {}, c = t ?? {}, p = c.aprvKey ||
|
|
2080
|
+
} = r || {}, c = t ?? {}, p = c.aprvKey || Nt(), h = c.docTitle || "제목없음", w = await z("SCMINTF00101", {
|
|
2080
2081
|
crprCd: X(),
|
|
2081
2082
|
sysCd: __SYS_CD__,
|
|
2082
2083
|
aprvKey: p
|
|
@@ -2145,7 +2146,7 @@ const we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2145
2146
|
}, x = await z(n, y);
|
|
2146
2147
|
if (u && y?.aprvKey) {
|
|
2147
2148
|
const i = "2023000022", a = c.dprtNo || tt(), m = c.emplNo || Q(), o = c.aprvKey, s = `${i}:${a}:${m}:${o}:ITSM`, l = `${f}?connkey=${btoa(
|
|
2148
|
-
|
|
2149
|
+
qt(encodeURIComponent(s))
|
|
2149
2150
|
)}`;
|
|
2150
2151
|
window.open(l, "_blank", d);
|
|
2151
2152
|
}
|
|
@@ -2168,7 +2169,7 @@ const we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2168
2169
|
if (f && !p)
|
|
2169
2170
|
return console.warn("openGwDraftByAprvKey: 기안 조회 결과 없음"), alert("기안 대상이 존재하지 않습니다."), { opened: !1, hasExisting: p };
|
|
2170
2171
|
const h = d ?? c.sub[0]?.dprtNo, w = S ?? c.sub[0]?.emplNo, v = `${u}:${h}:${w}:${t}:ITSM`, y = `${r}?connkey=${btoa(
|
|
2171
|
-
|
|
2172
|
+
qt(encodeURIComponent(v))
|
|
2172
2173
|
)}`;
|
|
2173
2174
|
return window.open(y, "_blank", n), { opened: !0, hasExisting: p, url: y };
|
|
2174
2175
|
}, uo = ve, lo = ee, fo = ie, ho = we, mo = Se, po = de, go = Wt, yo = me, vo = {
|
|
@@ -2185,6 +2186,7 @@ const we = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2185
2186
|
export {
|
|
2186
2187
|
q as ApiError,
|
|
2187
2188
|
W as DEFAULT_FMT,
|
|
2189
|
+
Ot as DEFAULT_SERVICE_CODES,
|
|
2188
2190
|
ur as THEME_COOKIE_NAME,
|
|
2189
2191
|
nn as add,
|
|
2190
2192
|
Bn as apiGet,
|
|
@@ -2222,7 +2224,7 @@ export {
|
|
|
2222
2224
|
Qt as format,
|
|
2223
2225
|
Mr as generateRandomColor,
|
|
2224
2226
|
Zt as generateRandomString,
|
|
2225
|
-
|
|
2227
|
+
Nt as generateUID,
|
|
2226
2228
|
Vt as getAllServiceCodes,
|
|
2227
2229
|
G as getApiDeps,
|
|
2228
2230
|
ye as getClientIp,
|
|
@@ -2262,7 +2264,7 @@ export {
|
|
|
2262
2264
|
Gt as isEmpty,
|
|
2263
2265
|
yt as isEmptyArray,
|
|
2264
2266
|
hr as isFunction,
|
|
2265
|
-
|
|
2267
|
+
Yt as isLocal,
|
|
2266
2268
|
vn as isLoggedIn,
|
|
2267
2269
|
Cr as isMobile,
|
|
2268
2270
|
gr as isNull,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* 서비스코드 관리 유틸리티
|
|
3
3
|
* Provider 패턴을 우선적으로 사용하고, 기본값을 fallback으로 사용
|
|
4
4
|
*/
|
|
5
|
-
declare const DEFAULT_SERVICE_CODES: {
|
|
5
|
+
export declare const DEFAULT_SERVICE_CODES: {
|
|
6
6
|
readonly AUTH_BTNS: "SCMSIGN00202";
|
|
7
7
|
readonly AUTH_MENU: "SCMSIGN00201";
|
|
8
8
|
readonly SRCH_CODE: "SCMSIGN00301";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serviceConfig.d.ts","sourceRoot":"","sources":["../../src/utils/serviceConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,
|
|
1
|
+
{"version":3,"file":"serviceConfig.d.ts","sourceRoot":"","sources":["../../src/utils/serviceConfig.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,qBAAqB;;;;;;;CAcxB,CAAC;AAEX,KAAK,cAAc,GAAG,MAAM,OAAO,qBAAqB,CAAC;AAKzD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,GACjD,IAAI,CAGN;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAcrE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAQnE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAW3C;AAGD,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bwg-ui/core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22",
|
|
4
4
|
"description": "bankwareglobal UI 라이브러리입니다.",
|
|
5
5
|
"author": "kyeongdon.park",
|
|
6
6
|
"license": "ISC",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"react-router-dom": "^7.6.3",
|
|
131
131
|
"realgrid": "^2.9.2",
|
|
132
132
|
"realgrid-react": "^0.9.6",
|
|
133
|
+
"recharts": "^3.2.0",
|
|
133
134
|
"zustand": "^5.0.6"
|
|
134
135
|
},
|
|
135
136
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("@ant-design/icons"),t=require("antd"),pe=require("dayjs"),n=require("react"),G=require("../stores/index.cjs"),h=require("./common-components-CeY5flj3.cjs"),l=require("../components/core/index.cjs"),f=require("../utils/index.cjs"),he=require("../provider/index.cjs"),{TextArea:ge}=t.Input,R=[{label:"요청",value:"RQST"},{label:"문의",value:"INQR"}],fe={INQR:"blue",RQST:"green",RPRT:"red",SGSN:"purple"},Q=[{label:"대기",value:"READY"},{label:"담당자 지정",value:"ASSIGNED"},{label:"처리중",value:"PROCESSING"},{label:"처리완료",value:"COMPLETED"},{label:"반려",value:"REJECTED"}],je={READY:"gray",ASSIGNED:"blue",PROCESSING:"yellow",COMPLETED:"green",REJECTED:"red"},W={READY:0,ASSIGNED:25,PROCESSING:50,COMPLETED:100,REJECTED:100},ye=({popup:y,onClose:O})=>{const{searchBoxRef:I}=he.useSearchBox(),b=n.useRef(null),E=n.useRef(null),{user:w}=G.useUserStore(),{activeMenuItem:c}=G.useMenuViewStore(),[i]=t.Form.useForm(),[z,L]=n.useState(!1),[V,A]=n.useState(!1),[M,H]=n.useState(!1),[g,J]=n.useState(!1),[a,S]=n.useState(!1),[d,j]=n.useState("list");n.useState(null);const D=n.useRef(null),[F,U]=n.useState([]),[B,Y]=n.useState(""),[P]=n.useState(!1),[$,N]=n.useState(15),T=n.useRef(null),K=n.useMemo(()=>h.createBwgGridRenderer((s,r,o,m,x)=>{const p=s.getValue(r.index?.itemIndex,"type");x.render(e.jsx(t.Tag,{color:fe[p],children:R.find(v=>v.value===p)?.label}))}),[]),X=n.useMemo(()=>h.createBwgGridRenderer((s,r,o,m,x)=>{const p=s.getValue(r.index?.itemIndex,"status");x.render(e.jsx(t.Tag,{color:je[p],children:Q.find(v=>v.value===p)?.label}))}),[]),Z=n.useMemo(()=>h.createBwgGridRenderer((s,r,o,m,x)=>{s.getValue(r.index?.itemIndex,"urgentYn")==="Y"?x.render(e.jsx(C.AlertTwoTone,{twoToneColor:"red"})):x.render(e.jsx(e.Fragment,{}))}),[]),_=[{fieldName:"boardMstrId",header:{text:"글 번호"},width:80},{name:"type",fieldName:"type",header:{text:"등록구분"},width:80,renderer:"tagType"},{fieldName:"title",header:{text:"제목"},width:200},{fieldName:"content",header:{text:"내용"},width:200,visible:!1},{name:"status",fieldName:"status",header:{text:"상태"},width:80,renderer:"statusTag"},{fieldName:"rgstUserId",visible:!1},{fieldName:"rgstUserNm",header:{text:"등록자"},width:100},{fieldName:"rgstDt",header:{text:"등록일자"},width:120,renderer:f.realFormat.maskYmd},{fieldName:"dueDt",header:{text:"마감요청일자"},width:120,renderer:f.realFormat.maskYmd},{fieldName:"urgentYn",header:{text:"긴급여부"},width:80,renderer:"alert"},{fieldName:"prcsUserId",visible:!1},{fieldName:"prcsUserNm",header:{text:"처리담당자"},width:100},{fieldName:"prcsDt",header:{text:"처리일자"},width:120,renderer:f.realFormat.maskYmd},{fieldName:"scrnId",header:{text:"화면ID"},width:100,visible:!1},{fieldName:"menuId",header:{text:"메뉴ID"},width:100,visible:!1}],ee={onCellDblClicked:(s,r)=>{const o=r.itemIndex??-1;if(o<0)return;const m=s.getValues(o);console.log("🔍 그리드 셀 더블클릭 이벤트:",m);const x={...m,menuId:c?.menuId,menuNm:c?.menuNm,scrnId:c?.scrnId};i.setFieldsValue(x),H(x.rgstUserId===w?.userId),J(x.status==="COMPLETED"||x.status==="REJECTED"),j("detail")}},k=()=>{i.resetFields(),j("list"),u.SCMBoardMstr0001(1,20)},q=async s=>{L(!0);try{i.validateFields().then(r=>{console.log("문의/신고 제출:",r),d==="new"?u.SCMBoardMstr0003(r):d==="detail"&&u.SCMBoardMstr0004(r)})}catch(r){console.error("문의/신고 제출 실패:",r)}finally{L(!1)}},te=()=>{u.SCMBoardMstr0005()},se=()=>{I?.current?.resetForm(),i.resetFields(),d==="new"?j("list"):(j("list"),y?.close?.()||O?.())},re=()=>{I?.current?.resetForm(),i.resetFields(),j("list"),y?.close?.()||O?.()},ne=()=>{(d==="detail"||d==="new")&&j("list")},le=()=>{i.resetFields(),j("new")},ie=()=>{console.log("댓글 수동 새로고침"),N(15)},oe=()=>{if(!B.trim()){t.message.warning("댓글 상세내용 작성");return}u.SCMBoardDtls0002(i.getFieldValue("boardMstrId"),B.trim()),Y(""),setTimeout(()=>{D.current&&(D.current.scrollTop=D.current.scrollHeight)},100)},ae=s=>{const r=F.find(o=>o.id===s);if(r&&r.regUserId!==w?.userId){t.message.error("본인이 작성한 댓글만 삭제할 수 있습니다.");return}u.SCMBoardDtls0003(i.getFieldValue("boardMstrId"),s)};n.useEffect(()=>{y&&setTimeout(()=>{u.SCMBoardMstr0001(1,20)},100)},[y]);const de=()=>e.jsxs(h.ContentBox,{border:!1,children:[e.jsx(h.SearchBox,{border:!0,ref:I,reqRows:e.jsxs(e.Fragment,{children:[e.jsx(t.Row,{gutter:[16,8],style:{marginBottom:"8px"},children:e.jsx(t.Col,{span:24,children:e.jsx(l.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{disabled:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{disabled:!0})})]})})})}),e.jsxs(t.Row,{gutter:[16,8],style:{marginBottom:"8px"},children:[e.jsx(t.Col,{span:6,children:e.jsx(l.BwgSelect,{itemProps:{label:"등록구분",name:"type"},selectProps:{options:R}})}),e.jsx(t.Col,{span:12,children:e.jsx(l.BwgRangePicker,{itemProps:{label:"등록일자",name:"rgstDt"},inputProps:{allowEmpty:!0}})}),e.jsx(t.Col,{span:6,children:e.jsx(l.BwgSwitch,{itemProps:{name:"myArticle",label:"내 글만"},inputProps:{format:"YN",onChange:()=>console.log("hello!!")}})})]}),e.jsx(t.Row,{children:e.jsx(t.Col,{span:24,children:e.jsx(l.BwgInput,{itemProps:{label:"제목 및 내용",name:"keyword"}})})})]})}),e.jsx(h.BwgGrid,{ref:T,gridColumns:_,gridEvents:ee,gridOptions:{},renderers:[{name:"tagType",renderer:K},{name:"statusTag",renderer:X},{name:"alert",renderer:Z}]}),e.jsx(h.BwgPagination,{ref:b,mode:"server",onServerPageChange:(s,r)=>{console.log("🔄 서버 모드 페이징 변경:",{page:s,size:r}),u.SCMBoardMstr0001(s,r)},pageSizeOptions:[10,20,50,100]})]}),ce=()=>e.jsxs(t.Splitter,{children:[e.jsx(t.Splitter.Panel,{defaultSize:"70%",min:"60%",max:"80%",style:{paddingRight:"15px",overflowX:"hidden",overflowY:"hidden"},children:e.jsx(h.ContentBox,{children:e.jsxs(t.Form,{form:i,onFinish:q,labelCol:{flex:"100px"},disabled:!M||g,children:[e.jsxs(t.Row,{gutter:[16,8],children:[e.jsxs(t.Col,{span:8,children:[e.jsx(t.Form.Item,{name:"boardMstrId",hidden:!0,children:e.jsx(t.Input,{})}),e.jsx(l.BwgSelect,{itemProps:{name:"type",label:"구분"},selectProps:{options:R}})]}),e.jsxs(t.Col,{span:16,children:[e.jsx(l.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})}),e.jsx(t.Form.Item,{name:"scrnId",style:{width:"100%"},hidden:!0,children:e.jsx(t.Input,{readOnly:!0})})]})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(l.BwgFormItem,{label:"작성자",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"rgstUserId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"rgstUserNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:8,children:e.jsx(l.BwgDatePicker,{itemProps:{label:"작성일자",name:"rgstDt"},inputProps:{disabled:!0}})}),e.jsx(t.Col,{span:8,children:e.jsx(l.BwgSelect,{itemProps:{name:"status",label:"상태"},selectProps:{options:Q,disabled:!0}})})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(l.BwgDatePicker,{itemProps:{label:"마감요청일",name:"dueDate"}})}),e.jsx(t.Col,{span:8,children:e.jsxs(t.Flex,{vertical:!0,gap:2,children:[e.jsx("span",{style:{fontSize:"12px",color:"#000000E0"},children:"진척률"}),e.jsx(t.Progress,{percent:W[i.getFieldValue("status")],status:W[i.getFieldValue("status")]>0?"active":"normal",size:"small",format:s=>`${s}%`})]})}),e.jsx(t.Col,{span:8,children:e.jsx(l.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"}})})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(l.BwgFormItem,{label:"처리담당자",name:void 0,help:"",children:e.jsxs(t.Space.Compact,{children:[e.jsx(t.Form.Item,{name:"processor",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"processorNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:8,children:e.jsx(l.BwgDatePicker,{itemProps:{label:"처리일자",name:"processDt"}})})]}),e.jsx(t.Row,{gutter:[16,8],children:e.jsx(t.Col,{span:24,children:e.jsx(l.BwgFormItem,{label:"제목",name:"title",style:{width:"100%"},children:e.jsx(t.Input,{})})})}),e.jsx(h.BwgEditor,{border:!1,itemProps:{name:"content",label:"내용",rules:[{required:!0,message:"내용을 입력하세요."}]},editorProps:{isEditing:M&&!g,title:{title:"에디터"}}})]})})}),e.jsx(t.Splitter.Panel,{collapsible:!0,style:{paddingLeft:"15px"},children:e.jsxs(h.ContentBox,{style:{flex:"0 0 400px",display:"flex",flexDirection:"column"},children:[e.jsxs("div",{style:{borderBottom:"1px solid #e8e8e8",paddingBottom:"12px",marginBottom:"16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx("span",{style:{fontSize:"14px",fontWeight:"600",color:"#262626"},children:"댓글"}),e.jsxs("div",{style:{position:"relative",display:"inline-block"},children:[e.jsx(t.Button,{type:"text",icon:e.jsx(C.ReloadOutlined,{spin:P||a}),onClick:ie,disabled:P||a,size:"small",style:{fontSize:"12px",color:g?"#d9d9d9":a?"#8c8c8c":"#595959",height:"24px",padding:"0 8px"}}),!g&&e.jsx("span",{style:{position:"absolute",top:"-4px",right:"-4px",fontSize:"10px",fontWeight:"700",color:P?"#8c8c8c":"#1890ff",minWidth:"14px",height:"14px",lineHeight:"14px",textAlign:"center",borderRadius:"50%",pointerEvents:"none"},children:$})]})]}),e.jsx("div",{ref:D,style:{flex:1,overflowY:"auto",marginBottom:"16px",minHeight:0,position:"relative"},children:a?e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:[e.jsx("div",{style:{marginBottom:"12px"},children:e.jsx(C.ReloadOutlined,{spin:!0,style:{fontSize:"24px"}})}),e.jsx("div",{style:{fontSize:"13px"},children:"댓글을 불러오는 중..."})]}):F.length===0?e.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"200px",color:"#8c8c8c"},children:e.jsx("div",{style:{fontSize:"13px"},children:"등록된 댓글이 없습니다."})}):e.jsx(t.List,{dataSource:F,renderItem:s=>e.jsxs(t.List.Item,{style:{position:"relative",paddingRight:"20px",padding:"12px 20px 12px 12px",borderBottom:"1px solid #f0f0f0"},children:[e.jsx(t.List.Item.Meta,{avatar:e.jsx(t.Avatar,{size:32,style:{backgroundColor:"#1890ff",fontSize:"13px"},children:s.author[0]}),title:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"4px"},children:[e.jsx("span",{style:{fontWeight:"500",fontSize:"13px",color:"#262626"},children:s.author}),e.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:s.regDt})]}),description:e.jsx("span",{style:{fontSize:"13px",color:"#595959",lineHeight:"1.5"},children:s.content})}),s.regUserId===w?.userId&&e.jsx(t.Button,{type:"text",danger:!0,icon:e.jsx(C.DeleteOutlined,{style:{fontSize:"12px"}}),size:"small",onClick:()=>ae(s.id),disabled:a,style:{position:"absolute",right:"8px",top:"62%",transform:"translateY(-50%)",opacity:a?.3:.5,height:"24px",width:"24px",padding:0},onMouseEnter:r=>{a||(r.currentTarget.style.opacity="1")},onMouseLeave:r=>{r.currentTarget.style.opacity=a?"0.3":"0.5"}})]},s.id)})}),e.jsx("div",{style:{padding:"12px",borderTop:"1px solid #e8e8e8",backgroundColor:g?"#f5f5f5":"#fafafa",flexShrink:0,marginTop:"auto"},children:g?e.jsxs("div",{style:{textAlign:"center",padding:"20px",color:"#8c8c8c",fontSize:"13px",backgroundColor:"#ffffff",borderRadius:"6px",border:"1px solid #e8e8e8"},children:[e.jsx("div",{style:{marginBottom:"8px"},children:e.jsx(C.AlertTwoTone,{twoToneColor:"#faad14"})}),e.jsx("div",{children:"이미 완료처리된 게시글입니다."}),e.jsx("div",{style:{fontSize:"11px",marginTop:"4px"},children:"댓글을 작성할 수 없습니다."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{marginBottom:"8px"},children:e.jsx(ge,{rows:2,placeholder:a?"댓글 처리 중...":"댓글을 입력하세요...",value:B,onChange:s=>Y(s.target.value),maxLength:300,disabled:a,style:{borderRadius:"6px",border:"1px solid #d9d9d9",resize:"none",fontSize:"13px",backgroundColor:a?"#f5f5f5":"#ffffff",color:a?"#8c8c8c":"#000000"},onFocus:s=>{a||(s.target.style.borderColor="#1890ff",s.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.05)")},onBlur:s=>{s.target.style.borderColor="#d9d9d9",s.target.style.boxShadow="none"}})}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("span",{style:{fontSize:"11px",color:"#8c8c8c"},children:a?"처리 중...":`${B.length} / 300자`}),e.jsx(t.Button,{type:"primary",onClick:oe,size:"small",loading:a,style:{borderRadius:"4px",fontSize:"12px",height:"28px",padding:"0 16px",fontWeight:"500"},disabled:!B.trim()||a,children:a?"등록 중...":"등록"})]})]})})]})})]}),ue=()=>e.jsx(h.ContentBox,{children:e.jsxs(l.BwgForm,{form:i,onFinish:q,initialValues:{type:"INQR"},labelCol:{flex:"100px"},style:{height:"100%",display:"flex",flexDirection:"column"},children:[e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(l.BwgSelect,{itemProps:{name:"type",label:"구분",rules:[{required:!0,message:"구분을 선택해주세요."}]},selectProps:{options:R}})}),e.jsxs(t.Col,{span:16,children:[e.jsx(l.BwgFormItem,{label:"화면 정보",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"menuId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"menuNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})}),e.jsx(t.Form.Item,{name:"scrnId",style:{width:"100%"},hidden:!0,children:e.jsx(t.Input,{readOnly:!0})})]})]}),e.jsxs(t.Row,{gutter:[16,8],children:[e.jsx(t.Col,{span:8,children:e.jsx(l.BwgFormItem,{label:"작성자",name:void 0,children:e.jsxs(t.Space.Compact,{style:{width:"100%"},children:[e.jsx(t.Form.Item,{name:"rgstUserId",style:{width:"40%",marginBottom:0,marginInlineEnd:0},validateStatus:"",help:"",children:e.jsx(t.Input,{readOnly:!0})}),e.jsx(t.Form.Item,{name:"rgstUserNm",style:{width:"60%",marginBottom:0},children:e.jsx(t.Input,{readOnly:!0})})]})})}),e.jsx(t.Col,{span:6,children:e.jsx(l.BwgFormItem,{label:"작성일자",name:"rgstDt",style:{width:"100%"},children:e.jsx(t.DatePicker,{disabled:!0})})}),e.jsx(t.Col,{span:6,children:e.jsx(l.BwgFormItem,{label:"마감요청일",name:"dueDate",style:{width:"100%"},children:e.jsx(t.DatePicker,{})})}),e.jsx(t.Col,{span:4,children:e.jsx(l.BwgCheck,{itemProps:{name:"urgentYn",label:"긴급여부"}})})]}),e.jsx(t.Row,{gutter:[16,8],children:e.jsx(t.Col,{span:24,children:e.jsx(l.BwgFormItem,{label:"제목",name:"title",style:{width:"100%"},rules:[{required:!0,message:"제목을 입력해주세요."}],children:e.jsx(t.Input,{})})})}),e.jsx(h.BwgEditor,{border:!1,itemProps:{name:"content"},editorProps:{isEditing:V,title:{title:e.jsxs(e.Fragment,{children:[e.jsx(C.EditOutlined,{style:{marginRight:"5px"}})," 상세내용 작성"]}),children:e.jsx(t.Button,{icon:e.jsx(C.EyeFilled,{}),onClick:()=>A(!V),children:"미리보기"})}}})]})});n.useEffect(()=>{d==="new"&&(A(!0),i.setFieldsValue({type:"INQR",menuId:c?.menuId,menuNm:c?.menuNm,scrnId:c?.scrnId,rgstUserId:w?.userId,rgstUserNm:w?.userNm,rgstDt:pe(),content:""}))},[d,i,c,w]),n.useEffect(()=>{if(d==="detail"&&!g){const s=setInterval(()=>{N(r=>r<=1?(console.log("🔄 댓글 자동 갱신 실행 (카운트다운 완료)"),u.SCMBoardDtls0001(i.getFieldValue("boardMstrId")),15):r-1)},1e3);return u.SCMBoardDtls0001(i.getFieldValue("boardMstrId")),()=>{console.log("🧹 댓글 인터벌 정리"),clearInterval(s)}}else d==="detail"&&g&&(console.log("📋 완료된 게시글 - 댓글 조회만"),u.SCMBoardDtls0001(i.getFieldValue("boardMstrId")))},[d,g,i]),n.useEffect(()=>()=>{console.log("🧹 컴포넌트 언마운트 - 모든 인터벌 정리"),E.current&&(clearInterval(E.current),E.current=null)},[]),n.useEffect(()=>{d==="list"&&c&&(I?.current?.setFormData({menuId:c?.menuId,menuNm:c?.menuNm}),u.SCMBoardMstr0001(1,20))},[d,c]),n.useEffect(()=>{y&&c&&I?.current?.setFormData({menuId:c?.menuId,menuNm:c?.menuNm})},[y,c]);const u={SCMBoardMstr0001:async(s,r)=>{const o=s||b.current?.currentPage||1,m=r||b.current?.pageSize||20,x={...I?.current?.getFormData(),pageNum:o,pageCount:m};console.log("🔍 서버 모드 페이징 요청:",x);try{const p=await f.callService("SCMBoardMstr0001",x,{isPopup:!0});if(p&&p.pageList){const v=p.pageCnt||0;b.current?.setTotalData(v),T.current?.addAllData(p.pageList)}else b.current?.setTotalData(0),T.current?.addAllData([]),console.log("📭 서버 모드 페이징 데이터 없음")}catch(p){console.error("❌ SCMBoardMstr0001 호출 실패:",p),t.message.error("데이터 조회 중 오류가 발생했습니다.")}},SCMBoardMstr0003:s=>{f.callService("SCMBoardMstr0003",{...s,status:"READY"},{isPopup:!0}).then(r=>{console.log("문의/신고 제출 응답:",r),t.message.success("정상 접수되었습니다."),k()}).catch(r=>{console.error("문의/신고 제출 실패:",r),t.message.error("접수 중 오류가 발생했습니다.")})},SCMBoardMstr0004:s=>{f.callService("SCMBoardMstr0004",{boardMstrId:i.getFieldValue("boardMstrId"),...s},{isPopup:!0}).then(r=>{console.log("문의/신고 제출 응답:",r),t.message.success("수정이 완료되었습니다."),k()}).catch(r=>{console.error("문의/신고 변경 실패:",r)})},SCMBoardMstr0005:()=>{f.callService("SCMBoardMstr0005",{boardMstrId:i.getFieldValue("boardMstrId")},{isPopup:!0}).then(s=>{console.log("문의/신고 삭제 응답:",s),t.message.success("삭제가 완료되었습니다."),k()})},SCMBoardDtls0001:s=>{S(!0),f.callService("SCMBoardDtls0001",{boardMstrId:s},{isPopup:!0,showLoading:!1}).then(r=>{if(r&&r.subList){const o=r.subList.map(m=>({id:m.seq,author:m.userNm||m.regUserId,regUserId:m.regUserId,content:m.content,regDt:m.regDt}));U(o)}else U([])}).catch(r=>{console.error("게시글 댓글 목록 조회 실패:",r),t.message.error("댓글 목록 조회 중 오류가 발생했습니다.")}).finally(()=>{S(!1),N(15)})},SCMBoardDtls0002:(s,r)=>{S(!0),f.callService("SCMBoardDtls0002",{boardMstrId:s,content:r},{isPopup:!0,showLoading:!1}).then(o=>{o&&o.result===1?(t.message.success("댓글이 등록되었습니다."),u.SCMBoardDtls0001(s)):t.message.error("댓글 등록에 실패했습니다.")}).catch(o=>{t.message.error("댓글 등록 중 오류가 발생했습니다.")}).finally(()=>{S(!1)})},SCMBoardDtls0003:(s,r)=>{S(!0),f.callService("SCMBoardDtls0003",{boardMstrId:s,seq:r},{isPopup:!0,showLoading:!1}).then(o=>{o&&o.result===1?(t.message.success("댓글이 삭제되었습니다."),u.SCMBoardDtls0001(s)):t.message.error("댓글 삭제에 실패했습니다.")}).catch(o=>{t.message.error("댓글 삭제 중 오류가 발생했습니다.")}).finally(()=>{S(!1)})}},me=()=>{switch(d){case"list":return[{id:"REFRESH",label:"조회",type:"default",onClick:()=>u.SCMBoardMstr0001(),disabled:z},{id:"NEW",label:"신규 등록",type:"primary",onClick:le}];case"detail":return[{id:"BACK",label:"뒤로",type:"default",onClick:ne},{id:"EDIT",label:"수정",type:"primary",disabled:!M||g,onClick:()=>i.submit()},{id:"DELETE",label:"삭제",type:"default",disabled:!M||g,onClick:te}];case"new":return[{id:"SUBMIT",label:"제출",type:"primary",onClick:()=>i.submit(),disabled:z},{id:"CANCEL",label:"취소",type:"default",onClick:se}];default:return[]}},xe={};return e.jsxs(h.BwgPopup,{popup:y,buttons:me(),popupEvent:xe,onClose:re,children:[d==="list"&&de(),d==="detail"&&ce(),d==="new"&&ue()]})};exports.default=ye;
|