@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,6 +1,113 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
import { V as
|
|
3
|
-
|
|
1
|
+
import { create as f } from "zustand";
|
|
2
|
+
import { V as l, am as d } from "./serviceConfig-4iBLfLzF.js";
|
|
3
|
+
import { i as P } from "./envUtils-C9Gf5aek.js";
|
|
4
|
+
const C = f((t, i) => ({
|
|
5
|
+
favorites: [],
|
|
6
|
+
isLoading: !1,
|
|
7
|
+
error: null,
|
|
8
|
+
// 즐겨찾기 메뉴 가져오기
|
|
9
|
+
fetchFavorites: async ({ crprCd: e, userId: a }) => {
|
|
10
|
+
console.log("즐겨찾기 메뉴 요청:", { crprCd: e, userId: a }), t({ isLoading: !0, error: null });
|
|
11
|
+
try {
|
|
12
|
+
const n = await l(d("AUTH_BMRK"), {
|
|
13
|
+
crprCd: e,
|
|
14
|
+
userId: a
|
|
15
|
+
});
|
|
16
|
+
let r = [];
|
|
17
|
+
if (n?.favorites && Array.isArray(n.favorites) ? r = n.favorites : Array.isArray(n) ? r = n : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r), P && r.length === 0) {
|
|
18
|
+
const o = [
|
|
19
|
+
{
|
|
20
|
+
crprCd: "100",
|
|
21
|
+
menuGbCd: "CMPRGRP",
|
|
22
|
+
menuPrntId: "FAV001",
|
|
23
|
+
menuId: "FAV_TEST001",
|
|
24
|
+
menuNm: "API 테스트",
|
|
25
|
+
scrnId: "TEST001",
|
|
26
|
+
menuNo: 1,
|
|
27
|
+
scrnPath: "/dev/ApiTest",
|
|
28
|
+
menuLvl: 3,
|
|
29
|
+
rootMenu: "FAV001",
|
|
30
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
31
|
+
userId: a
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
crprCd: "100",
|
|
35
|
+
menuGbCd: "CMPRGRP",
|
|
36
|
+
menuPrntId: "FAV001",
|
|
37
|
+
menuId: "FAV_TEST002",
|
|
38
|
+
menuNm: "프로젝트 개요",
|
|
39
|
+
scrnId: "DOCS001",
|
|
40
|
+
menuNo: 2,
|
|
41
|
+
scrnPath: "/docs/ProjectOverview",
|
|
42
|
+
menuLvl: 3,
|
|
43
|
+
rootMenu: "FAV001",
|
|
44
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
45
|
+
userId: a
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
t({ favorites: o, isLoading: !1, error: null }), console.log("개발 모드: 테스트용 즐겨찾기 데이터 추가");
|
|
49
|
+
} else
|
|
50
|
+
t({ favorites: r, isLoading: !1, error: null });
|
|
51
|
+
} catch (n) {
|
|
52
|
+
console.error("즐겨찾기 메뉴 로드 실패:", n), t({
|
|
53
|
+
error: n instanceof Error ? n.message : "즐겨찾기 로드 실패",
|
|
54
|
+
isLoading: !1
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// 즐겨찾기 추가
|
|
59
|
+
addFavorite: async (e, a) => {
|
|
60
|
+
const { favorites: n } = i();
|
|
61
|
+
if (n.some((r) => r.menuId === e.menuId)) {
|
|
62
|
+
console.log("이미 즐겨찾기에 추가된 메뉴입니다:", e.menuNm);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await l(d("AUTH_BMRK"), {
|
|
67
|
+
action: "add",
|
|
68
|
+
crprCd: e.crprCd,
|
|
69
|
+
userId: a,
|
|
70
|
+
menuId: e.menuId,
|
|
71
|
+
menuNm: e.menuNm,
|
|
72
|
+
scrnPath: e.scrnPath
|
|
73
|
+
});
|
|
74
|
+
const r = {
|
|
75
|
+
...e,
|
|
76
|
+
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
77
|
+
userId: a
|
|
78
|
+
};
|
|
79
|
+
t({ favorites: [...n, r] }), console.log("즐겨찾기 추가 완료:", e.menuNm);
|
|
80
|
+
} catch (r) {
|
|
81
|
+
throw console.error("즐겨찾기 추가 실패:", r), r;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// 즐겨찾기 제거
|
|
85
|
+
removeFavorite: async (e, a) => {
|
|
86
|
+
const { favorites: n } = i();
|
|
87
|
+
try {
|
|
88
|
+
await l(d("AUTH_BMRK"), {
|
|
89
|
+
action: "remove",
|
|
90
|
+
crprCd: "100",
|
|
91
|
+
// 기본값
|
|
92
|
+
userId: a,
|
|
93
|
+
menuId: e
|
|
94
|
+
});
|
|
95
|
+
const r = n.filter((o) => o.menuId !== e);
|
|
96
|
+
t({ favorites: r }), console.log("즐겨찾기 제거 완료:", e);
|
|
97
|
+
} catch (r) {
|
|
98
|
+
throw console.error("즐겨찾기 제거 실패:", r), r;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
// 즐겨찾기 여부 확인
|
|
102
|
+
isFavorite: (e) => {
|
|
103
|
+
const { favorites: a } = i();
|
|
104
|
+
return a.some((n) => n.menuId === e);
|
|
105
|
+
},
|
|
106
|
+
// 즐겨찾기 초기화
|
|
107
|
+
clearFavorites: () => {
|
|
108
|
+
t({ favorites: [], isLoading: !1, error: null });
|
|
109
|
+
}
|
|
110
|
+
})), v = () => typeof process < "u" && process.env.NODE_ENV === "development" || typeof window < "u" && window.location.hostname === "localhost" ? [
|
|
4
111
|
// 1뎁스: 개발자 도구
|
|
5
112
|
{
|
|
6
113
|
crprCd: "100",
|
|
@@ -36,7 +143,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
36
143
|
menuNm: "기본 컴포넌트",
|
|
37
144
|
scrnId: "BwgComponentGuideM01",
|
|
38
145
|
menuNo: 9991,
|
|
39
|
-
scrnPath: "/guide/BwgComponentGuideM01",
|
|
146
|
+
scrnPath: "/cm/guide/BwgComponentGuideM01",
|
|
40
147
|
menuLvl: 3,
|
|
41
148
|
rootMenu: "DEV00101"
|
|
42
149
|
},
|
|
@@ -48,7 +155,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
48
155
|
menuNm: "응용 컴포넌트",
|
|
49
156
|
scrnId: "BwgComponentGuideM02",
|
|
50
157
|
menuNo: 9992,
|
|
51
|
-
scrnPath: "/guide/BwgComponentGuideM02",
|
|
158
|
+
scrnPath: "/cm/guide/BwgComponentGuideM02",
|
|
52
159
|
menuLvl: 3,
|
|
53
160
|
rootMenu: "DEV00101"
|
|
54
161
|
},
|
|
@@ -74,7 +181,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
74
181
|
menuNm: "개발자 가이드",
|
|
75
182
|
scrnId: "BwgDeveloperGuideM01",
|
|
76
183
|
menuNo: 9993,
|
|
77
|
-
scrnPath: "/guide/BwgDeveloperGuideM01",
|
|
184
|
+
scrnPath: "/cm/guide/BwgDeveloperGuideM01",
|
|
78
185
|
menuLvl: 3,
|
|
79
186
|
rootMenu: "DEV00102"
|
|
80
187
|
},
|
|
@@ -83,14 +190,26 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
83
190
|
menuGbCd: "CMPRGRP",
|
|
84
191
|
menuPrntId: "DEV00102",
|
|
85
192
|
menuId: "DEV0010202",
|
|
193
|
+
menuNm: "React 가이드",
|
|
194
|
+
scrnId: "BwgReactGuideM01",
|
|
195
|
+
menuNo: 9994,
|
|
196
|
+
scrnPath: "/cm/guide/BwgReactGuideM01",
|
|
197
|
+
menuLvl: 3,
|
|
198
|
+
rootMenu: "DEV00102"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
crprCd: "100",
|
|
202
|
+
menuGbCd: "CMPRGRP",
|
|
203
|
+
menuPrntId: "DEV00102",
|
|
204
|
+
menuId: "DEV0010203",
|
|
86
205
|
menuNm: "연습공간",
|
|
87
206
|
scrnId: "BwgPracticeM01",
|
|
88
|
-
menuNo:
|
|
89
|
-
scrnPath: "/guide/BwgPracticeM01",
|
|
207
|
+
menuNo: 9995,
|
|
208
|
+
scrnPath: "/cm/guide/BwgPracticeM01",
|
|
90
209
|
menuLvl: 3,
|
|
91
210
|
rootMenu: "DEV00102"
|
|
92
211
|
}
|
|
93
|
-
] : [],
|
|
212
|
+
] : [], g = (t) => {
|
|
94
213
|
if (!t || !Array.isArray(t) || t.length === 0)
|
|
95
214
|
return [];
|
|
96
215
|
const i = /* @__PURE__ */ new Map(), e = [];
|
|
@@ -111,7 +230,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
111
230
|
children: s.children && s.children.length > 0 ? a(s.children) : void 0
|
|
112
231
|
})), n = a(e), r = n.filter((o) => o.menuId.startsWith("DEV"));
|
|
113
232
|
return r.length > 0 && console.log("DEV 최종 결과:", r), n;
|
|
114
|
-
},
|
|
233
|
+
}, b = f((t, i) => ({
|
|
115
234
|
menuList: [],
|
|
116
235
|
isLoading: !1,
|
|
117
236
|
error: null,
|
|
@@ -134,7 +253,7 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
134
253
|
}
|
|
135
254
|
console.log("메뉴 데이터 요청 시작:", r), t({ isLoading: !0, error: null, _lastFetchParams: r });
|
|
136
255
|
try {
|
|
137
|
-
const s = await
|
|
256
|
+
const s = await l(
|
|
138
257
|
d("AUTH_MENU"),
|
|
139
258
|
r
|
|
140
259
|
);
|
|
@@ -142,9 +261,9 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
142
261
|
s?.menus && Array.isArray(s.menus) ? c = s.menus : Array.isArray(s) ? c = s : (console.warn(
|
|
143
262
|
"서버 응답이 비어있거나 예상과 다른 구조입니다. 개발자 메뉴만 표시합니다."
|
|
144
263
|
), c = []);
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
const m =
|
|
264
|
+
const u = v();
|
|
265
|
+
u.length > 0 && (c = [...u, ...c]);
|
|
266
|
+
const m = g(c);
|
|
148
267
|
console.log("메뉴 데이터 로드 완료 (계층 구조):", m), t({
|
|
149
268
|
menuList: m,
|
|
150
269
|
isLoading: !1,
|
|
@@ -155,9 +274,9 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
155
274
|
const c = v();
|
|
156
275
|
if (c.length > 0) {
|
|
157
276
|
console.log("서버 오류로 인해 개발자 메뉴만 표시합니다.");
|
|
158
|
-
const
|
|
277
|
+
const u = g(c);
|
|
159
278
|
t({
|
|
160
|
-
menuList:
|
|
279
|
+
menuList: u,
|
|
161
280
|
isLoading: !1,
|
|
162
281
|
error: null
|
|
163
282
|
});
|
|
@@ -254,114 +373,8 @@ const v = () => typeof process < "u" && process.env.NODE_ENV === "development" |
|
|
|
254
373
|
}
|
|
255
374
|
})), console.log(`뷰 상태 업데이트: ${e}.${a}`, n);
|
|
256
375
|
}
|
|
257
|
-
})), C = g((t, i) => ({
|
|
258
|
-
favorites: [],
|
|
259
|
-
isLoading: !1,
|
|
260
|
-
error: null,
|
|
261
|
-
// 즐겨찾기 메뉴 가져오기
|
|
262
|
-
fetchFavorites: async ({ crprCd: e, userId: a }) => {
|
|
263
|
-
console.log("즐겨찾기 메뉴 요청:", { crprCd: e, userId: a }), t({ isLoading: !0, error: null });
|
|
264
|
-
try {
|
|
265
|
-
const n = await u(d("AUTH_BMRK"), {
|
|
266
|
-
crprCd: e,
|
|
267
|
-
userId: a
|
|
268
|
-
});
|
|
269
|
-
let r = [];
|
|
270
|
-
if (n?.favorites && Array.isArray(n.favorites) ? r = n.favorites : Array.isArray(n) ? r = n : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r), P && r.length === 0) {
|
|
271
|
-
const o = [
|
|
272
|
-
{
|
|
273
|
-
crprCd: "100",
|
|
274
|
-
menuGbCd: "CMPRGRP",
|
|
275
|
-
menuPrntId: "FAV001",
|
|
276
|
-
menuId: "FAV_TEST001",
|
|
277
|
-
menuNm: "API 테스트",
|
|
278
|
-
scrnId: "TEST001",
|
|
279
|
-
menuNo: 1,
|
|
280
|
-
scrnPath: "/dev/ApiTest",
|
|
281
|
-
menuLvl: 3,
|
|
282
|
-
rootMenu: "FAV001",
|
|
283
|
-
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
284
|
-
userId: a
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
crprCd: "100",
|
|
288
|
-
menuGbCd: "CMPRGRP",
|
|
289
|
-
menuPrntId: "FAV001",
|
|
290
|
-
menuId: "FAV_TEST002",
|
|
291
|
-
menuNm: "프로젝트 개요",
|
|
292
|
-
scrnId: "DOCS001",
|
|
293
|
-
menuNo: 2,
|
|
294
|
-
scrnPath: "/docs/ProjectOverview",
|
|
295
|
-
menuLvl: 3,
|
|
296
|
-
rootMenu: "FAV001",
|
|
297
|
-
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
298
|
-
userId: a
|
|
299
|
-
}
|
|
300
|
-
];
|
|
301
|
-
t({ favorites: o, isLoading: !1, error: null }), console.log("개발 모드: 테스트용 즐겨찾기 데이터 추가");
|
|
302
|
-
} else
|
|
303
|
-
t({ favorites: r, isLoading: !1, error: null });
|
|
304
|
-
} catch (n) {
|
|
305
|
-
console.error("즐겨찾기 메뉴 로드 실패:", n), t({
|
|
306
|
-
error: n instanceof Error ? n.message : "즐겨찾기 로드 실패",
|
|
307
|
-
isLoading: !1
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
// 즐겨찾기 추가
|
|
312
|
-
addFavorite: async (e, a) => {
|
|
313
|
-
const { favorites: n } = i();
|
|
314
|
-
if (n.some((r) => r.menuId === e.menuId)) {
|
|
315
|
-
console.log("이미 즐겨찾기에 추가된 메뉴입니다:", e.menuNm);
|
|
316
|
-
return;
|
|
317
|
-
}
|
|
318
|
-
try {
|
|
319
|
-
await u(d("AUTH_BMRK"), {
|
|
320
|
-
action: "add",
|
|
321
|
-
crprCd: e.crprCd,
|
|
322
|
-
userId: a,
|
|
323
|
-
menuId: e.menuId,
|
|
324
|
-
menuNm: e.menuNm,
|
|
325
|
-
scrnPath: e.scrnPath
|
|
326
|
-
});
|
|
327
|
-
const r = {
|
|
328
|
-
...e,
|
|
329
|
-
addedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
330
|
-
userId: a
|
|
331
|
-
};
|
|
332
|
-
t({ favorites: [...n, r] }), console.log("즐겨찾기 추가 완료:", e.menuNm);
|
|
333
|
-
} catch (r) {
|
|
334
|
-
throw console.error("즐겨찾기 추가 실패:", r), r;
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
// 즐겨찾기 제거
|
|
338
|
-
removeFavorite: async (e, a) => {
|
|
339
|
-
const { favorites: n } = i();
|
|
340
|
-
try {
|
|
341
|
-
await u(d("AUTH_BMRK"), {
|
|
342
|
-
action: "remove",
|
|
343
|
-
crprCd: "100",
|
|
344
|
-
// 기본값
|
|
345
|
-
userId: a,
|
|
346
|
-
menuId: e
|
|
347
|
-
});
|
|
348
|
-
const r = n.filter((o) => o.menuId !== e);
|
|
349
|
-
t({ favorites: r }), console.log("즐겨찾기 제거 완료:", e);
|
|
350
|
-
} catch (r) {
|
|
351
|
-
throw console.error("즐겨찾기 제거 실패:", r), r;
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
// 즐겨찾기 여부 확인
|
|
355
|
-
isFavorite: (e) => {
|
|
356
|
-
const { favorites: a } = i();
|
|
357
|
-
return a.some((n) => n.menuId === e);
|
|
358
|
-
},
|
|
359
|
-
// 즐겨찾기 초기화
|
|
360
|
-
clearFavorites: () => {
|
|
361
|
-
t({ favorites: [], isLoading: !1, error: null });
|
|
362
|
-
}
|
|
363
376
|
}));
|
|
364
377
|
export {
|
|
365
378
|
C as a,
|
|
366
|
-
|
|
379
|
+
b as u
|
|
367
380
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("zustand"),a=require("./serviceConfig-
|
|
1
|
+
"use strict";const g=require("zustand"),a=require("./serviceConfig-B5UJqk4b.cjs"),P=g.create((r,i)=>({popups:[],activePopupId:null,isLoading:!1,error:null,openPopup:async(p,s,u)=>{console.log("팝업 열기 요청:",{popupCode:p,data:s,config:u}),r({isLoading:!0,error:null});try{console.log("팝업 열기 시작:",p);let o=null;const n=await a.callService(a.getServiceCode("SRCH_POPU"),{crprCd:a.getUserInfo().crprCd,popuCd:p});console.log("팝업 정보 조회 결과:",n),o=n?.mstr;const t=n?.dtls||[];if(console.info("popupInfo:",o),!o||!o.popuUrl){const e=`팝업 정보를 찾을 수 없습니다: ${p}`;throw console.error(e),new Error(e)}console.log("파싱된 팝업 정보:",o),console.log("버튼 목록:",t);const d=(e=>`/src/pages/views/popup/${e}`)(o.popuUrl);console.log("변환된 팝업 URL:",d);const l={popupId:`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,popupCode:p,popupTitle:o.popuNm||"팝업",popupUrl:d,popupParams:s,width:o.popuWdth||800,height:o.popuHght||600,resizable:!0,draggable:!0,buttonList:t,config:u};console.log("생성된 팝업 아이템:",l);const c=i().popups.find(e=>e.popupCode===p);if(c){console.log("기존 팝업 업데이트:",c.popupId),r({activePopupId:c.popupId,popups:i().popups.map(e=>e.popupId===c.popupId?{...e,config:u}:e),isLoading:!1});return}console.log("새 팝업 추가:",l.popupId),r(e=>({popups:[...e.popups,l],activePopupId:l.popupId,isLoading:!1})),console.log("팝업 열기 완료:",l)}catch(o){console.error("팝업 열기 실패:",o),r({error:o instanceof Error?o.message:"팝업 열기 실패",isLoading:!1})}},closePopup:p=>{const{popups:s,activePopupId:u}=i(),o=s.filter(t=>t.popupId!==p);let n=u;u===p&&(n=o.length>0?o[o.length-1].popupId:null),r({popups:o,activePopupId:n})},closeAllPopups:()=>{r({popups:[],activePopupId:null})},setActivePopup:p=>{r({activePopupId:p})},updatePopupConfig:(p,s)=>{r(u=>({popups:u.popups.map(o=>o.popupId===p?{...o,config:{...o.config,...s}}:o)}))}}));exports.usePopupStore=P;
|