@bwg-ui/core 1.2.35 → 1.3.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.
Files changed (87) hide show
  1. package/dist/chunks/{CMSearchIntfGwP01-Duabg_5A.js → CMSearchIntfGwP01-BWm9OqAH.js} +28 -28
  2. package/dist/chunks/{CMSearchIntfGwP01-CMSQULsU.cjs → CMSearchIntfGwP01-CihGc5Q1.cjs} +1 -1
  3. package/dist/chunks/MenuReport-khjaUz1Q.cjs +1 -0
  4. package/dist/chunks/{MenuReport-B4EU1A6l.js → MenuReport-yYhMOHyq.js} +10 -10
  5. package/dist/chunks/common-components-DletnDTf.cjs +1109 -0
  6. package/dist/chunks/{common-components-DIpOkbb5.js → common-components-coAoWxE9.js} +12963 -12155
  7. package/dist/chunks/{layout-components-D2Fla5uu.js → layout-components-C1DG2B74.js} +982 -705
  8. package/dist/chunks/layout-components-C6KeWPIu.cjs +35 -0
  9. package/dist/chunks/provider-DrboIg2C.cjs +1 -0
  10. package/dist/chunks/provider-VCa8UGvF.js +446 -0
  11. package/dist/components/common/BwgDetail.d.ts.map +1 -1
  12. package/dist/components/common/BwgGrid.d.ts +17 -16
  13. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  14. package/dist/components/common/BwgPagination.d.ts.map +1 -1
  15. package/dist/components/common/BwgView.d.ts +3 -3
  16. package/dist/components/common/BwgView.d.ts.map +1 -1
  17. package/dist/components/common/index.cjs +1 -1
  18. package/dist/components/common/index.d.ts +4 -3
  19. package/dist/components/common/index.d.ts.map +1 -1
  20. package/dist/components/common/index.js +5 -5
  21. package/dist/components/common/type.d.ts +7 -0
  22. package/dist/components/common/type.d.ts.map +1 -1
  23. package/dist/components/core/BwgMaskedDate.d.ts +13 -0
  24. package/dist/components/core/BwgMaskedDate.d.ts.map +1 -0
  25. package/dist/components/core/{BwgMaskedPicker.d.ts → BwgMaskedRange.d.ts} +6 -4
  26. package/dist/components/core/BwgMaskedRange.d.ts.map +1 -0
  27. package/dist/components/core/index.cjs +1 -1
  28. package/dist/components/core/index.d.ts +4 -2
  29. package/dist/components/core/index.d.ts.map +1 -1
  30. package/dist/components/core/index.js +1219 -781
  31. package/dist/components/guide/index.cjs +1 -1
  32. package/dist/components/guide/index.js +2 -2
  33. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  34. package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
  35. package/dist/components/layout/custom/ConfigurableMenuTab.d.ts.map +1 -1
  36. package/dist/components/layout/extension/ContentWrapper.d.ts.map +1 -1
  37. package/dist/components/layout/index.cjs +1 -1
  38. package/dist/components/layout/index.js +1 -1
  39. package/dist/components/pages/syst/CMHldyCfg.d.ts.map +1 -1
  40. package/dist/components/popup/MenuReport.d.ts.map +1 -1
  41. package/dist/components/popup/SearchAddressP01.d.ts +30 -0
  42. package/dist/components/popup/SearchAddressP01.d.ts.map +1 -0
  43. package/dist/components/popup/SearchHolidayP01.d.ts +2 -2
  44. package/dist/components/popup/SearchHolidayP01.d.ts.map +1 -1
  45. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -1
  46. package/dist/components/popup/index.cjs +1 -1
  47. package/dist/components/popup/index.d.ts +2 -0
  48. package/dist/components/popup/index.d.ts.map +1 -1
  49. package/dist/components/popup/index.js +6 -5
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.js +270 -259
  52. package/dist/provider/contexts/BwgViewContext.d.ts +19 -0
  53. package/dist/provider/contexts/BwgViewContext.d.ts.map +1 -0
  54. package/dist/provider/contexts/index.d.ts +1 -0
  55. package/dist/provider/contexts/index.d.ts.map +1 -1
  56. package/dist/provider/hooks/index.d.ts +1 -0
  57. package/dist/provider/hooks/index.d.ts.map +1 -1
  58. package/dist/provider/hooks/useSizeConfig.d.ts +19 -0
  59. package/dist/provider/hooks/useSizeConfig.d.ts.map +1 -0
  60. package/dist/provider/index.cjs +1 -1
  61. package/dist/provider/index.js +22 -381
  62. package/dist/stores/index.cjs +2 -2
  63. package/dist/stores/index.d.ts +6 -0
  64. package/dist/stores/index.d.ts.map +1 -1
  65. package/dist/stores/index.js +279 -192
  66. package/dist/stores/menuViewStore.d.ts +6 -0
  67. package/dist/stores/menuViewStore.d.ts.map +1 -1
  68. package/dist/stores/userStore.d.ts +23 -0
  69. package/dist/stores/userStore.d.ts.map +1 -1
  70. package/dist/styles/assets/images/contents/icon/ico-tab-hashtag-grey.svg +11 -0
  71. package/dist/styles/assets/images/contents/icon/ico-tab-hashtag.svg +11 -0
  72. package/dist/styles/components.css +161 -60
  73. package/dist/styles/layout.css +1289 -1234
  74. package/dist/utils/{FileUtils.d.ts → fileUtils.d.ts} +1 -1
  75. package/dist/utils/fileUtils.d.ts.map +1 -0
  76. package/dist/utils/gridUtils.d.ts +45 -0
  77. package/dist/utils/gridUtils.d.ts.map +1 -0
  78. package/dist/utils/index.cjs +1 -1
  79. package/dist/utils/index.d.ts +12 -2
  80. package/dist/utils/index.d.ts.map +1 -1
  81. package/dist/utils/index.js +736 -664
  82. package/package.json +1 -1
  83. package/dist/chunks/MenuReport-5e2dMr_C.cjs +0 -1
  84. package/dist/chunks/common-components-D3-r7D-8.cjs +0 -1109
  85. package/dist/chunks/layout-components-pfHVy2at.cjs +0 -35
  86. package/dist/components/core/BwgMaskedPicker.d.ts.map +0 -1
  87. package/dist/utils/FileUtils.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
- import { create as b } from "zustand";
2
- import { callService as N, getServiceCode as w, getUserId as v, getUserInfo as ee, getCookie as te, encryptSha256 as oe, setCookie as $ } from "../utils/index.js";
3
- import { message as L } from "antd";
4
- import { l as se } from "../chunks/layout-components-D2Fla5uu.js";
5
- import { useState as X, useCallback as q } from "react";
1
+ import { create as N } from "zustand";
2
+ import { callService as b, getServiceCode as F, getUserId as v, getUserInfo as ee, getCookie as te, encryptSha256 as oe, setCookie as $ } from "../utils/index.js";
3
+ import { message as w } from "antd";
4
+ import { l as se } from "../chunks/layout-components-C1DG2B74.js";
5
+ import { useState as X, useCallback as W } from "react";
6
6
  import { useNavigate as ne } from "react-router-dom";
7
7
  function re(n, r) {
8
8
  let e;
@@ -21,12 +21,12 @@ function re(n, r) {
21
21
  removeItem: (o) => e.removeItem(o)
22
22
  };
23
23
  }
24
- const E = (n) => (r) => {
24
+ const K = (n) => (r) => {
25
25
  try {
26
26
  const e = n(r);
27
27
  return e instanceof Promise ? e : {
28
28
  then(s) {
29
- return E(s)(e);
29
+ return K(s)(e);
30
30
  },
31
31
  catch(s) {
32
32
  return this;
@@ -38,7 +38,7 @@ const E = (n) => (r) => {
38
38
  return this;
39
39
  },
40
40
  catch(s) {
41
- return E(s)(e);
41
+ return K(s)(e);
42
42
  }
43
43
  };
44
44
  }
@@ -71,8 +71,8 @@ const E = (n) => (r) => {
71
71
  state: C,
72
72
  version: t.version
73
73
  });
74
- }, f = o.setState;
75
- o.setState = (C, g) => (f(C, g), l());
74
+ }, h = o.setState;
75
+ o.setState = (C, g) => (h(C, g), l());
76
76
  const m = n(
77
77
  (...C) => (e(...C), l()),
78
78
  s,
@@ -80,21 +80,21 @@ const E = (n) => (r) => {
80
80
  );
81
81
  o.getInitialState = () => m;
82
82
  let u;
83
- const h = () => {
83
+ const f = () => {
84
84
  var C, g;
85
85
  if (!i) return;
86
- a = !1, d.forEach((y) => {
86
+ a = !1, d.forEach((I) => {
87
87
  var S;
88
- return y((S = s()) != null ? S : m);
88
+ return I((S = s()) != null ? S : m);
89
89
  });
90
90
  const k = ((g = t.onRehydrateStorage) == null ? void 0 : g.call(t, (C = s()) != null ? C : m)) || void 0;
91
- return E(i.getItem.bind(i))(t.name).then((y) => {
92
- if (y)
93
- if (typeof y.version == "number" && y.version !== t.version) {
91
+ return K(i.getItem.bind(i))(t.name).then((I) => {
92
+ if (I)
93
+ if (typeof I.version == "number" && I.version !== t.version) {
94
94
  if (t.migrate) {
95
95
  const S = t.migrate(
96
- y.state,
97
- y.version
96
+ I.state,
97
+ I.version
98
98
  );
99
99
  return S instanceof Promise ? S.then((_) => [!0, _]) : [!0, S];
100
100
  }
@@ -102,20 +102,20 @@ const E = (n) => (r) => {
102
102
  "State loaded from storage couldn't be migrated since no migrate function was provided"
103
103
  );
104
104
  } else
105
- return [!1, y.state];
105
+ return [!1, I.state];
106
106
  return [!1, void 0];
107
- }).then((y) => {
107
+ }).then((I) => {
108
108
  var S;
109
- const [_, Q] = y;
109
+ const [_, Q] = I;
110
110
  if (u = t.merge(
111
111
  Q,
112
112
  (S = s()) != null ? S : m
113
113
  ), e(u, !0), _)
114
114
  return l();
115
115
  }).then(() => {
116
- k?.(u, void 0), u = s(), a = !0, c.forEach((y) => y(u));
117
- }).catch((y) => {
118
- k?.(void 0, y);
116
+ k?.(u, void 0), u = s(), a = !0, c.forEach((I) => I(u));
117
+ }).catch((I) => {
118
+ k?.(void 0, I);
119
119
  });
120
120
  };
121
121
  return o.persist = {
@@ -129,7 +129,7 @@ const E = (n) => (r) => {
129
129
  i?.removeItem(t.name);
130
130
  },
131
131
  getOptions: () => t,
132
- rehydrate: () => h(),
132
+ rehydrate: () => f(),
133
133
  hasHydrated: () => a,
134
134
  onHydrate: (C) => (d.add(C), () => {
135
135
  d.delete(C);
@@ -137,8 +137,8 @@ const E = (n) => (r) => {
137
137
  onFinishHydration: (C) => (c.add(C), () => {
138
138
  c.delete(C);
139
139
  })
140
- }, t.skipHydration || h(), u || m;
141
- }, M = ae, H = b()(
140
+ }, t.skipHydration || f(), u || m;
141
+ }, M = ae, H = N()(
142
142
  M(
143
143
  (n, r) => ({
144
144
  user: null,
@@ -150,6 +150,12 @@ const E = (n) => (r) => {
150
150
  // 기본값: 크게
151
151
  spacingSize: 2,
152
152
  // 기본값: 크게
153
+ enableProtectWrapper: !0,
154
+ // 기본값: 활성화
155
+ gridLayouts: {},
156
+ // 그리드 레이아웃 정보 (sysCd별로 관리)
157
+ theme: "modern",
158
+ // 기본값: modern
153
159
  isLoggedIn: () => !!r().user,
154
160
  // 로그인
155
161
  setLoginUser: (e, s) => {
@@ -180,6 +186,14 @@ const E = (n) => (r) => {
180
186
  setSpacingSize: (e) => {
181
187
  n({ spacingSize: e }), console.log("여백 사이즈 변경:", e);
182
188
  },
189
+ // 화면보호 레이어 활성화 설정
190
+ setEnableProtectWrapper: (e) => {
191
+ n({ enableProtectWrapper: e });
192
+ },
193
+ // 테마 설정
194
+ setTheme: (e) => {
195
+ n({ theme: e }), console.log("테마 변경:", e);
196
+ },
183
197
  // 권한 확인 결과 가져오기
184
198
  getButtonAuth: (e, s) => {
185
199
  const o = `${e}_${s}`;
@@ -198,6 +212,40 @@ const E = (n) => (r) => {
198
212
  // 권한 확인 결과 초기화
199
213
  clearButtonAuths: () => {
200
214
  n({ buttonAuths: {} });
215
+ },
216
+ // 그리드 레이아웃 관련 메서드
217
+ getGridLayouts: (e) => r().gridLayouts[e] || [],
218
+ getGridLayout: (e, s, o) => r().getGridLayouts(e).find(
219
+ (d) => d.menuId === s && d.gridId === o
220
+ ) || null,
221
+ saveGridLayout: (e, s, o, t) => {
222
+ const a = { ...r().gridLayouts };
223
+ a[e] || (a[e] = []);
224
+ const d = a[e].findIndex(
225
+ (i) => i.menuId === s && i.gridId === o
226
+ ), c = {
227
+ menuId: s,
228
+ gridId: o,
229
+ layout: t
230
+ };
231
+ d >= 0 ? a[e][d] = c : a[e].push(c), n({ gridLayouts: a }), console.log(
232
+ `[UserStore] 그리드 레이아웃 저장 완료: ${e}/${s}/${o}`
233
+ );
234
+ },
235
+ removeGridLayout: (e, s, o) => {
236
+ const t = { ...r().gridLayouts };
237
+ t[e] && (t[e] = t[e].filter(
238
+ (a) => !(a.menuId === s && a.gridId === o)
239
+ ), n({ gridLayouts: t }), console.log(
240
+ `[UserStore] 그리드 레이아웃 삭제 완료: ${e}/${s}/${o}`
241
+ ));
242
+ },
243
+ clearGridLayouts: (e) => {
244
+ const s = { ...r().gridLayouts };
245
+ delete s[e], n({ gridLayouts: s }), console.log(`[UserStore] ${e}의 모든 그리드 레이아웃 삭제 완료`);
246
+ },
247
+ clearAllGridLayouts: () => {
248
+ n({ gridLayouts: {} }), console.log("[UserStore] 전체 그리드 레이아웃 삭제 완료");
201
249
  }
202
250
  }),
203
251
  {
@@ -209,13 +257,18 @@ const E = (n) => (r) => {
209
257
  componentSize: n.componentSize,
210
258
  gridSize: n.gridSize,
211
259
  spacingSize: n.spacingSize,
260
+ enableProtectWrapper: n.enableProtectWrapper,
261
+ gridLayouts: n.gridLayouts,
262
+ // 그리드 레이아웃 정보 저장
263
+ theme: n.theme,
264
+ // 테마 정보 저장
212
265
  isLoggedIn: n.isLoggedIn
213
266
  // buttonAuthCache는 세션 동안만 유지 (localStorage에 저장 안 함)
214
267
  })
215
268
  // 저장할 상태만 선택
216
269
  }
217
270
  )
218
- ), A = {
271
+ ), T = {
219
272
  CACHE_SIZE_LIMIT: 1e3
220
273
  }, p = {
221
274
  codeCache: /* @__PURE__ */ new Map(),
@@ -239,7 +292,7 @@ const E = (n) => (r) => {
239
292
  markGroupLoaded(n) {
240
293
  this.loadedGroups.add(n);
241
294
  }
242
- }, P = (n) => {
295
+ }, L = (n) => {
243
296
  console.log("대규모 데이터 변환 시작:", n);
244
297
  const r = {};
245
298
  if (n && n.code && Array.isArray(n.code)) {
@@ -267,7 +320,7 @@ const E = (n) => (r) => {
267
320
  });
268
321
  }
269
322
  return console.log("대규모 데이터 변환 완료:", r), r;
270
- }, I = b()(
323
+ }, y = N()(
271
324
  M(
272
325
  (n, r) => ({
273
326
  codeData: null,
@@ -280,11 +333,11 @@ const E = (n) => (r) => {
280
333
  n({ isLoading: !0, error: null });
281
334
  try {
282
335
  console.log("시스템 공통코드 데이터 가져오기 시작: SCMSIGN00301");
283
- const e = await N(w("SRCH_CODE"), {
336
+ const e = await b(F("SRCH_CODE"), {
284
337
  crprCd: "100"
285
338
  });
286
339
  console.log("시스템 공통코드 응답:", e), console.log("시스템 공통코드목록:", e.code), console.log("시스템 공통코드옵션목록:", e.opt);
287
- const s = P(e), t = {
340
+ const s = L(e), t = {
288
341
  ...r().codeData || {},
289
342
  ...s
290
343
  // 시스템 공통코드가 우선 (같은 그룹코드가 있으면 덮어씀)
@@ -312,11 +365,11 @@ const E = (n) => (r) => {
312
365
  n({ isLoading: !0, error: null });
313
366
  try {
314
367
  console.log("업무 공통코드 데이터 가져오기 시작: SCMSIGN00302");
315
- const e = await N("SCMSIGN00302", {
368
+ const e = await b("SCMSIGN00302", {
316
369
  sysCd: __SYS_CD__
317
370
  });
318
371
  console.log("업무 공통코드 응답:", e), console.log("업무 공통코드목록:", e.code), console.log("업무 공통코드옵션목록:", e.opt);
319
- const s = P(e), t = {
372
+ const s = L(e), t = {
320
373
  ...r().codeData || {},
321
374
  ...s
322
375
  // 업무 공통코드 추가 (같은 그룹코드가 있으면 덮어씀)
@@ -345,15 +398,15 @@ const E = (n) => (r) => {
345
398
  try {
346
399
  console.log("전체 공통코드 데이터 가져오기 시작 (시스템 + 업무)");
347
400
  const [e, s] = await Promise.all([
348
- N(w("SRCH_CODE"), {
401
+ b(F("SRCH_CODE"), {
349
402
  crprCd: "100"
350
403
  }),
351
- N("SCMSIGN00302", {
404
+ b("SCMSIGN00302", {
352
405
  sysCd: __SYS_CD__
353
406
  })
354
407
  ]);
355
408
  console.log("시스템 공통코드 응답:", e), console.log("업무 공통코드 응답:", s);
356
- const o = P(e), t = P(s), a = {
409
+ const o = L(e), t = L(s), a = {
357
410
  ...o,
358
411
  ...t
359
412
  // 업무 공통코드가 같은 그룹코드를 덮어쓸 수 있음
@@ -413,25 +466,25 @@ const E = (n) => (r) => {
413
466
  })
414
467
  }
415
468
  )
416
- ), G = b()(
469
+ ), G = N()(
417
470
  M(
418
471
  (n, r) => ({
419
472
  // 공통 데이터 스토어에서 상태 가져오기
420
473
  get codeData() {
421
- return I.getState().codeData;
474
+ return y.getState().codeData;
422
475
  },
423
476
  get isLoading() {
424
- return I.getState().isLoading;
477
+ return y.getState().isLoading;
425
478
  },
426
479
  get error() {
427
- return I.getState().error;
480
+ return y.getState().error;
428
481
  },
429
482
  get lastUpdated() {
430
- return I.getState().lastUpdated;
483
+ return y.getState().lastUpdated;
431
484
  },
432
485
  // 공통코드 가져오기 (중앙 스토어 사용)
433
486
  fetchCommonCodes: async () => {
434
- await I.getState().fetchData();
487
+ await y.getState().fetchData();
435
488
  },
436
489
  // 1. 통합된 코드 목록 조회 (그룹코드 필수, 옵션으로 필터링)
437
490
  getCodeList: (e, s) => {
@@ -442,36 +495,36 @@ const E = (n) => (r) => {
442
495
  excludeParentCode: d = !1
443
496
  } = s || {}, c = `simpleCodeList_${e}_${o}_${t}_${a}_${d}`;
444
497
  if (p.optionCache.has(c)) {
445
- const h = p.cacheHits.get(c) || 0;
446
- return p.cacheHits.set(c, h + 1), p.optionCache.get(c);
498
+ const f = p.cacheHits.get(c) || 0;
499
+ return p.cacheHits.set(c, f + 1), p.optionCache.get(c);
447
500
  }
448
- const i = I.getState().codeData;
501
+ const i = y.getState().codeData;
449
502
  if (!i) return [];
450
503
  if (!p.isGroupLoaded(e) && !i[e])
451
504
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
452
- const l = [], f = i[e];
453
- f && Object.values(f).forEach((h) => {
454
- if (!(o && !h.enabled) && !(t && h.systemCodeYn !== "Y"))
505
+ const l = [], h = i[e];
506
+ h && Object.values(h).forEach((f) => {
507
+ if (!(o && !f.enabled) && !(t && f.systemCodeYn !== "Y"))
455
508
  if (d) {
456
- const C = e.length, g = h.codeValue.substring(C);
509
+ const C = e.length, g = f.codeValue.substring(C);
457
510
  g.length > 0 && l.push({
458
- ...h,
511
+ ...f,
459
512
  codeValue: g
460
513
  // 자식코드만 사용
461
514
  });
462
515
  } else
463
- l.push(h);
516
+ l.push(f);
464
517
  });
465
518
  let m;
466
- a ? m = l.sort((h, C) => h.sortOrder !== C.sortOrder ? h.sortOrder - C.sortOrder : h.codeValue.localeCompare(C.codeValue)) : m = l.sort(
467
- (h, C) => h.codeValue.localeCompare(C.codeValue)
519
+ a ? m = l.sort((f, C) => f.sortOrder !== C.sortOrder ? f.sortOrder - C.sortOrder : f.codeValue.localeCompare(C.codeValue)) : m = l.sort(
520
+ (f, C) => f.codeValue.localeCompare(C.codeValue)
468
521
  );
469
- const u = m.map((h) => ({
470
- label: h.codeNm,
471
- value: h.codeValue,
472
- tagColor: h.labelColor
522
+ const u = m.map((f) => ({
523
+ label: f.codeNm,
524
+ value: f.codeValue,
525
+ tagColor: f.labelColor
473
526
  }));
474
- return p.optionCache.size >= A.CACHE_SIZE_LIMIT && p.cleanupCache(), p.optionCache.set(c, u), p.cacheHits.set(c, 1), u;
527
+ return p.optionCache.size >= T.CACHE_SIZE_LIMIT && p.cleanupCache(), p.optionCache.set(c, u), p.cacheHits.set(c, 1), u;
475
528
  },
476
529
  // 2. 코드를 던졌을 때 코드명을 리턴 (대규모 최적화)
477
530
  getCodeName: (e) => {
@@ -479,7 +532,7 @@ const E = (n) => (r) => {
479
532
  const o = p.cacheHits.get(`name_${e}`) || 0;
480
533
  return p.cacheHits.set(`name_${e}`, o + 1), p.nameCache.get(e);
481
534
  }
482
- const s = I.getState().codeData;
535
+ const s = y.getState().codeData;
483
536
  if (!s) return null;
484
537
  for (const o of Object.values(s))
485
538
  for (const t of Object.values(o))
@@ -493,7 +546,7 @@ const E = (n) => (r) => {
493
546
  const o = p.cacheHits.get(`color_${e}`) || 0;
494
547
  return p.cacheHits.set(`color_${e}`, o + 1), p.colorCache.get(e);
495
548
  }
496
- const s = I.getState().codeData;
549
+ const s = y.getState().codeData;
497
550
  if (!s) return null;
498
551
  for (const o of Object.values(s))
499
552
  for (const t of Object.values(o))
@@ -511,7 +564,7 @@ const E = (n) => (r) => {
511
564
  const i = p.cacheHits.get(s) || 0;
512
565
  return p.cacheHits.set(s, i + 1), p.optionCache.get(s);
513
566
  }
514
- const o = I.getState().codeData;
567
+ const o = y.getState().codeData;
515
568
  if (!o) return { labels: [], values: [], lookupDisplay: !0 };
516
569
  const t = o[e];
517
570
  if (!t) return { labels: [], values: [], lookupDisplay: !0 };
@@ -529,7 +582,7 @@ const E = (n) => (r) => {
529
582
  const l = p.cacheHits.get(t) || 0;
530
583
  return p.cacheHits.set(t, l + 1), p.codeCache.get(t);
531
584
  }
532
- const a = I.getState().codeData;
585
+ const a = y.getState().codeData;
533
586
  if (!a) return [];
534
587
  const d = [], c = a[e];
535
588
  c && Object.values(c).forEach((l) => {
@@ -540,9 +593,9 @@ const E = (n) => (r) => {
540
593
  });
541
594
  });
542
595
  const i = d.sort(
543
- (l, f) => l.codeValue.localeCompare(f.codeValue)
596
+ (l, h) => l.codeValue.localeCompare(h.codeValue)
544
597
  );
545
- return p.codeCache.size >= A.CACHE_SIZE_LIMIT && p.cleanupCache(), p.codeCache.set(t, i), p.cacheHits.set(t, 1), i;
598
+ return p.codeCache.size >= T.CACHE_SIZE_LIMIT && p.cleanupCache(), p.codeCache.set(t, i), p.cacheHits.set(t, 1), i;
546
599
  },
547
600
  // 6. 옵션코드별로 코드 목록 조회 (SimpleCodeItem 형태로 반환)
548
601
  getCodeListByOption: (e, s, o) => {
@@ -557,12 +610,12 @@ const E = (n) => (r) => {
557
610
  c
558
611
  );
559
612
  }
560
- const i = I.getState().codeData;
613
+ const i = y.getState().codeData;
561
614
  if (!i) return [];
562
615
  if (!p.isGroupLoaded(e) && !i[e])
563
616
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
564
- const l = [], f = i[e];
565
- f && Object.values(f).forEach((u) => {
617
+ const l = [], h = i[e];
618
+ h && Object.values(h).forEach((u) => {
566
619
  t && !u.enabled || a && u.systemCodeYn !== "Y" || u.options && u.options[s] && l.push({
567
620
  label: u.options[s],
568
621
  // optnNm 값
@@ -573,9 +626,9 @@ const E = (n) => (r) => {
573
626
  });
574
627
  });
575
628
  let m;
576
- return d ? m = l.sort((u, h) => u.value.localeCompare(h.value)) : m = l.sort(
577
- (u, h) => u.value.localeCompare(h.value)
578
- ), p.codeCache.size >= A.CACHE_SIZE_LIMIT && p.cleanupCache(), p.codeCache.set(c, m), p.cacheHits.set(c, 1), m;
629
+ return d ? m = l.sort((u, f) => u.value.localeCompare(f.value)) : m = l.sort(
630
+ (u, f) => u.value.localeCompare(f.value)
631
+ ), p.codeCache.size >= T.CACHE_SIZE_LIMIT && p.cleanupCache(), p.codeCache.set(c, m), p.cacheHits.set(c, 1), m;
579
632
  },
580
633
  // 7. 그룹코드 목록 조회
581
634
  getAvailableGroupCodes: () => {
@@ -584,7 +637,7 @@ const E = (n) => (r) => {
584
637
  const t = p.cacheHits.get(e) || 0;
585
638
  return p.cacheHits.set(e, t + 1), JSON.parse(p.nameCache.get(e));
586
639
  }
587
- const s = I.getState().codeData;
640
+ const s = y.getState().codeData;
588
641
  if (!s) return [];
589
642
  const o = Object.keys(s).sort();
590
643
  return p.nameCache.set(
@@ -594,7 +647,7 @@ const E = (n) => (r) => {
594
647
  },
595
648
  // 공통코드 초기화
596
649
  clearCodes: () => {
597
- I.getState().clearData();
650
+ y.getState().clearData();
598
651
  }
599
652
  }),
600
653
  {
@@ -604,25 +657,25 @@ const E = (n) => (r) => {
604
657
  })
605
658
  }
606
659
  )
607
- ), ve = b()(
660
+ ), ve = N()(
608
661
  M(
609
662
  (n, r) => ({
610
663
  // 공통 데이터 스토어에서 상태 가져오기
611
664
  get codeData() {
612
- return I.getState().codeData;
665
+ return y.getState().codeData;
613
666
  },
614
667
  get isLoading() {
615
- return I.getState().isLoading;
668
+ return y.getState().isLoading;
616
669
  },
617
670
  get error() {
618
- return I.getState().error;
671
+ return y.getState().error;
619
672
  },
620
673
  get lastUpdated() {
621
- return I.getState().lastUpdated;
674
+ return y.getState().lastUpdated;
622
675
  },
623
676
  // 공통코드 가져오기 (중앙 스토어 사용)
624
677
  fetchCommonCodes: async () => {
625
- await I.getState().fetchData();
678
+ await y.getState().fetchData();
626
679
  },
627
680
  // 그룹코드와 옵션코드를 던졌을 때 상세코드의 옵션값을 리턴 (대규모 최적화)
628
681
  getOptionValue: (e, s) => {
@@ -631,7 +684,7 @@ const E = (n) => (r) => {
631
684
  const d = p.cacheHits.get(o) || 0;
632
685
  return p.cacheHits.set(o, d + 1), p.optionCache.get(o);
633
686
  }
634
- const t = I.getState().codeData;
687
+ const t = y.getState().codeData;
635
688
  if (!t) return null;
636
689
  const a = t[e];
637
690
  if (a && a[s]) {
@@ -652,7 +705,7 @@ const E = (n) => (r) => {
652
705
  },
653
706
  // 공통코드 초기화
654
707
  clearCodes: () => {
655
- I.getState().clearData();
708
+ y.getState().clearData();
656
709
  }
657
710
  }),
658
711
  {
@@ -662,25 +715,25 @@ const E = (n) => (r) => {
662
715
  })
663
716
  }
664
717
  )
665
- ), Pe = b()(
718
+ ), Le = N()(
666
719
  M(
667
720
  (n, r) => ({
668
721
  // 공통 데이터 스토어에서 상태 가져오기
669
722
  get codeData() {
670
- return I.getState().codeData;
723
+ return y.getState().codeData;
671
724
  },
672
725
  get isLoading() {
673
- return I.getState().isLoading;
726
+ return y.getState().isLoading;
674
727
  },
675
728
  get error() {
676
- return I.getState().error;
729
+ return y.getState().error;
677
730
  },
678
731
  get lastUpdated() {
679
- return I.getState().lastUpdated;
732
+ return y.getState().lastUpdated;
680
733
  },
681
734
  // 공통코드 가져오기 (중앙 스토어 사용)
682
735
  fetchCommonCodes: async () => {
683
- await I.getState().fetchData();
736
+ await y.getState().fetchData();
684
737
  },
685
738
  // 코드를 던졌을 때 컬러코드를 리턴 (대규모 최적화)
686
739
  getColorCode: (e) => {
@@ -688,7 +741,7 @@ const E = (n) => (r) => {
688
741
  const o = p.cacheHits.get(`color_${e}`) || 0;
689
742
  return p.cacheHits.set(`color_${e}`, o + 1), p.colorCache.get(e);
690
743
  }
691
- const s = I.getState().codeData;
744
+ const s = y.getState().codeData;
692
745
  if (!s) return null;
693
746
  for (const o of Object.values(s))
694
747
  for (const t of Object.values(o))
@@ -706,7 +759,7 @@ const E = (n) => (r) => {
706
759
  const t = p.cacheHits.get(e) || 0;
707
760
  return p.cacheHits.set(e, t + 1), p.optionCache.get(e);
708
761
  }
709
- const s = I.getState().codeData;
762
+ const s = y.getState().codeData;
710
763
  if (!s) return [];
711
764
  const o = [];
712
765
  return Object.values(s).forEach((t) => {
@@ -720,7 +773,7 @@ const E = (n) => (r) => {
720
773
  },
721
774
  // 공통코드 초기화
722
775
  clearCodes: () => {
723
- I.getState().clearData();
776
+ y.getState().clearData();
724
777
  }
725
778
  }),
726
779
  {
@@ -742,11 +795,11 @@ const E = (n) => (r) => {
742
795
  (s) => s.type === "M" && s.menuId === e
743
796
  ),
744
797
  getPrntBkmkIdByMenuId: (e) => {
745
- const s = O(r().nodes, e);
798
+ const s = D(r().nodes, e);
746
799
  return s ? r().nodes[s]?.prntBkmkId ?? "-" : "-";
747
800
  },
748
801
  getNodeByMenuId: (e) => {
749
- const s = O(r().nodes, e);
802
+ const s = D(r().nodes, e);
750
803
  if (!s) return null;
751
804
  const o = r().nodes[s];
752
805
  return o?.type === "M" ? o : null;
@@ -771,7 +824,7 @@ const E = (n) => (r) => {
771
824
  if (!(!s && o.loadedFor === e && Object.keys(o.nodes).length)) {
772
825
  n({ loading: !0, error: void 0 });
773
826
  try {
774
- const t = await N("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], d = ce(a), c = D(
827
+ const t = await b("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], d = ce(a), c = P(
775
828
  d.nodes,
776
829
  d.rootIds
777
830
  );
@@ -802,7 +855,7 @@ const E = (n) => (r) => {
802
855
  },
803
856
  // ====== 공통: 생성 ======
804
857
  addNode: async (e) => {
805
- const s = K(r()), o = pe();
858
+ const s = A(r()), o = pe();
806
859
  n((t) => {
807
860
  const a = e.sortOrdr ?? U(t, e.prntBkmkId), d = {
808
861
  ...t,
@@ -831,11 +884,11 @@ const E = (n) => (r) => {
831
884
  rootIds: t.rootIds.slice(),
832
885
  treeNodes: t.treeNodes
833
886
  };
834
- return le(d, o, e.prntBkmkId), d.treeNodes = D(d.nodes, d.rootIds), d;
887
+ return le(d, o, e.prntBkmkId), d.treeNodes = P(d.nodes, d.rootIds), d;
835
888
  });
836
889
  try {
837
890
  let t = o;
838
- const a = U(r(), e.prntBkmkId), d = await N("SCMBKMK00102", {
891
+ const a = U(r(), e.prntBkmkId), d = await b("SCMBKMK00102", {
839
892
  iudFlag: "I",
840
893
  type: e.type,
841
894
  sysCd: e.sysCd,
@@ -852,7 +905,7 @@ const E = (n) => (r) => {
852
905
  const i = ue(c, o, t);
853
906
  return {
854
907
  ...i,
855
- treeNodes: D(i.nodes, i.rootIds)
908
+ treeNodes: P(i.nodes, i.rootIds)
856
909
  };
857
910
  }), t;
858
911
  } catch (t) {
@@ -868,10 +921,10 @@ const E = (n) => (r) => {
868
921
  if (!u || u.type !== "F")
869
922
  throw new Error("부모는 폴더만 가능합니다.");
870
923
  }
871
- const l = i.prntBkmkId ?? "-", f = l === "-" ? c : d[l].children ||= [];
924
+ const l = i.prntBkmkId ?? "-", h = l === "-" ? c : d[l].children ||= [];
872
925
  {
873
- const u = f.indexOf(e);
874
- u >= 0 && f.splice(u, 1);
926
+ const u = h.indexOf(e);
927
+ u >= 0 && h.splice(u, 1);
875
928
  }
876
929
  const m = s === "-" ? c : d[s].children ||= [];
877
930
  m.splice(
@@ -880,7 +933,7 @@ const E = (n) => (r) => {
880
933
  e
881
934
  ), i.prntBkmkId = s, n({ nodes: d, rootIds: c }), z(d, c, s), z(d, c, l);
882
935
  try {
883
- await N("SCMBKMK00104", {
936
+ await b("SCMBKMK00104", {
884
937
  // 백엔드 명칭 호환
885
938
  bkmkId: e,
886
939
  prntBkmkId: s,
@@ -893,7 +946,7 @@ const E = (n) => (r) => {
893
946
  },
894
947
  // ====== 공통: 삭제 ======
895
948
  removeNode: async (e) => {
896
- const s = K(r());
949
+ const s = A(r());
897
950
  n((o) => {
898
951
  if (!o.nodes[e]) return o;
899
952
  const t = {
@@ -902,17 +955,17 @@ const E = (n) => (r) => {
902
955
  rootIds: o.rootIds.slice(),
903
956
  treeNodes: o.treeNodes
904
957
  };
905
- return W(t, e), t.treeNodes = D(t.nodes, t.rootIds), t;
958
+ return J(t, e), t.treeNodes = P(t.nodes, t.rootIds), t;
906
959
  });
907
960
  try {
908
- await N("SCMBKMK00103", { bkmkId: e });
961
+ await b("SCMBKMK00103", { bkmkId: e });
909
962
  } catch (o) {
910
963
  throw n(s), o;
911
964
  }
912
965
  },
913
966
  // ====== 공통: 수정 ======
914
967
  editNode: async ({ bkmkId: e, userId: s, bkmkNm: o, prntBkmkId: t, sortOrdr: a }) => {
915
- const d = K(r());
968
+ const d = A(r());
916
969
  n((c) => {
917
970
  const i = { ...c, nodes: { ...c.nodes } }, l = i.nodes[e];
918
971
  return l?.type === "F" && typeof o == "string" && (i.nodes[e] = {
@@ -921,7 +974,7 @@ const E = (n) => (r) => {
921
974
  }), i;
922
975
  });
923
976
  try {
924
- await N("SCMBKMK00102", {
977
+ await b("SCMBKMK00102", {
925
978
  iudFlag: "U",
926
979
  userId: s,
927
980
  bkmkId: e,
@@ -942,7 +995,7 @@ const E = (n) => (r) => {
942
995
  sysCd: o,
943
996
  userId: t
944
997
  }),
945
- addMenuToFolder: async (e, s) => O(r().nodes, s.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await r().addNode({
998
+ addMenuToFolder: async (e, s) => D(r().nodes, s.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await r().addNode({
946
999
  type: "M",
947
1000
  prntBkmkId: e,
948
1001
  sysCd: "KH",
@@ -970,7 +1023,7 @@ const E = (n) => (r) => {
970
1023
  });
971
1024
  },
972
1025
  removeMenuByMenuId: async (e) => {
973
- const s = r(), o = O(s.nodes, e);
1026
+ const s = r(), o = D(s.nodes, e);
974
1027
  o && await r().removeNode(o);
975
1028
  },
976
1029
  removeMenu: async (e) => {
@@ -994,8 +1047,8 @@ const E = (n) => (r) => {
994
1047
  const i = e[c];
995
1048
  if (!i || t && i.type !== "F") return null;
996
1049
  if (i.type === "F") {
997
- const l = i, f = (l.children || []).map((u) => d(u)).filter(Boolean);
998
- return a(l.bkmkNm) || f.length > 0 ? {
1050
+ const l = i, h = (l.children || []).map((u) => d(u)).filter(Boolean);
1051
+ return a(l.bkmkNm) || h.length > 0 ? {
999
1052
  key: l.bkmkId,
1000
1053
  type: "F",
1001
1054
  title: `📁 ${l.bkmkNm}`,
@@ -1003,14 +1056,14 @@ const E = (n) => (r) => {
1003
1056
  prntBkmkId: l.prntBkmkId,
1004
1057
  sortOrdr: l.sortOrdr,
1005
1058
  fullPath: l.fullPath,
1006
- children: f.length ? f : void 0
1059
+ children: h.length ? h : void 0
1007
1060
  } : null;
1008
1061
  } else {
1009
- const l = i, f = l.menuNm ? `${l.menuNm} (${l.menuId})` : l.menuId;
1010
- return a(f) ? {
1062
+ const l = i, h = l.menuNm ? `${l.menuNm} (${l.menuId})` : l.menuId;
1063
+ return a(h) ? {
1011
1064
  key: l.bkmkId,
1012
1065
  type: "M",
1013
- title: `📄 ${f}`,
1066
+ title: `📄 ${h}`,
1014
1067
  prntBkmkId: l.prntBkmkId,
1015
1068
  sortOrdr: l.sortOrdr,
1016
1069
  fullPath: l.fullPath,
@@ -1020,7 +1073,7 @@ const E = (n) => (r) => {
1020
1073
  };
1021
1074
  return s.map(d).filter(Boolean);
1022
1075
  }
1023
- }), J = b(de);
1076
+ }), q = N(de);
1024
1077
  function ce(n) {
1025
1078
  const r = {}, e = [], s = (o) => {
1026
1079
  o.forEach((t) => {
@@ -1060,7 +1113,7 @@ function ce(n) {
1060
1113
  );
1061
1114
  }), { nodes: r, rootIds: e };
1062
1115
  }
1063
- function K(n) {
1116
+ function A(n) {
1064
1117
  return {
1065
1118
  ...n,
1066
1119
  nodes: JSON.parse(JSON.stringify(n.nodes)),
@@ -1095,10 +1148,10 @@ function ie(n, r) {
1095
1148
  } else
1096
1149
  n.rootIds = n.rootIds.filter((o) => o !== r);
1097
1150
  }
1098
- function W(n, r) {
1151
+ function J(n, r) {
1099
1152
  const e = n.nodes[r];
1100
1153
  if (!e) return;
1101
- e.type === "F" && e.children.slice().forEach((a) => W(n, a)), ie(n, r);
1154
+ e.type === "F" && e.children.slice().forEach((a) => J(n, a)), ie(n, r);
1102
1155
  const { [r]: s, ...o } = n.nodes;
1103
1156
  n.nodes = o;
1104
1157
  }
@@ -1124,7 +1177,7 @@ function ue(n, r, e) {
1124
1177
  function x(n) {
1125
1178
  return n.rootIds.find((r) => n.nodes[r]?.type === "F") ?? null;
1126
1179
  }
1127
- function D(n, r) {
1180
+ function P(n, r) {
1128
1181
  const e = {};
1129
1182
  Object.values(n).forEach((c) => {
1130
1183
  const i = c.bkmkId, l = c.prntBkmkId;
@@ -1137,12 +1190,12 @@ function D(n, r) {
1137
1190
  s.add(c);
1138
1191
  try {
1139
1192
  if (i.type === "F") {
1140
- const f = i, m = e[c] ?? [];
1193
+ const h = i, m = e[c] ?? [];
1141
1194
  return {
1142
1195
  type: "F",
1143
1196
  bkmkId: c,
1144
- bkmkNm: f.bkmkNm,
1145
- prntBkmkId: f.prntBkmkId,
1197
+ bkmkNm: h.bkmkNm,
1198
+ prntBkmkId: h.prntBkmkId,
1146
1199
  children: m.map(o).filter(Boolean)
1147
1200
  };
1148
1201
  }
@@ -1163,7 +1216,7 @@ function D(n, r) {
1163
1216
  /* @__PURE__ */ new Set([...r, ...t, ...a])
1164
1217
  ).map(o).filter(Boolean);
1165
1218
  }
1166
- function O(n, r) {
1219
+ function D(n, r) {
1167
1220
  for (const e of Object.values(n))
1168
1221
  if (e.type === "M" && e.menuId === r) return e.bkmkId;
1169
1222
  return null;
@@ -1174,7 +1227,7 @@ function z(n, r, e) {
1174
1227
  a && (a.sortOrdr = t);
1175
1228
  });
1176
1229
  }
1177
- const T = {
1230
+ const E = {
1178
1231
  DEFAULT_PRNT_GBCD: 1
1179
1232
  }, me = (n) => n && typeof n == "object" && typeof n.menuId == "string" && typeof n.menuNm == "string", j = (n) => Array.isArray(n) && n.every(me);
1180
1233
  let B = [], Y = [];
@@ -1185,7 +1238,7 @@ const Ce = (n) => {
1185
1238
  if (j(n)) return n;
1186
1239
  }
1187
1240
  return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
1188
- }, he = (n, r) => !!r && n.crprCd === r.crprCd && n.userId === r.userId && (n.prntGbcd ?? T.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? T.DEFAULT_PRNT_GBCD), fe = (n) => {
1241
+ }, fe = (n, r) => !!r && n.crprCd === r.crprCd && n.userId === r.userId && (n.prntGbcd ?? E.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? E.DEFAULT_PRNT_GBCD), he = (n) => {
1189
1242
  if (B.length === n.length && B.every(
1190
1243
  (t, a) => t.menuId === n[a]?.menuId && t.menuPrntId === n[a]?.menuPrntId
1191
1244
  ))
@@ -1201,7 +1254,7 @@ const Ce = (n) => {
1201
1254
  children: a.children && a.children.length ? s(a.children) : void 0
1202
1255
  })), o = s(e);
1203
1256
  return B = [...n], Y = o, o;
1204
- }, R = b((n, r) => ({
1257
+ }, R = N((n, r) => ({
1205
1258
  // 📊 초기 상태값
1206
1259
  menuList: [],
1207
1260
  flatMenuList: [],
@@ -1214,15 +1267,15 @@ const Ce = (n) => {
1214
1267
  const t = {
1215
1268
  crprCd: e,
1216
1269
  userId: s,
1217
- prntGbcd: o ?? T.DEFAULT_PRNT_GBCD
1270
+ prntGbcd: o ?? E.DEFAULT_PRNT_GBCD
1218
1271
  };
1219
- if (he(t, r()._lastFetchParams)) {
1272
+ if (fe(t, r()._lastFetchParams)) {
1220
1273
  console.log("✅ 중복 fetch 차단", t);
1221
1274
  return;
1222
1275
  }
1223
1276
  n({ isLoading: !0, error: null, _lastFetchParams: t });
1224
1277
  try {
1225
- const a = await N(w("AUTH_MENU"), t), d = Ce(a), c = fe(d);
1278
+ const a = await b(F("AUTH_MENU"), t), d = Ce(a), c = he(d);
1226
1279
  n({
1227
1280
  flatMenuList: d,
1228
1281
  // 평면 리스트 저장
@@ -1251,19 +1304,21 @@ const Ce = (n) => {
1251
1304
  const { flatMenuList: s } = r();
1252
1305
  return s.find((o) => o.menuId === e) ?? null;
1253
1306
  }
1254
- })), F = {
1307
+ })), O = {
1255
1308
  MAX_TABS: 15
1256
- }, Z = b((n, r) => ({
1309
+ }, Z = N((n, r) => ({
1257
1310
  // 📊 초기 상태값
1258
1311
  activeMenuId: null,
1259
1312
  activeMenuItem: null,
1260
1313
  activeDetailItem: null,
1261
1314
  tabs: [],
1262
1315
  sidebarCollapsed: !1,
1263
- maxTabs: F.MAX_TABS,
1316
+ maxTabs: O.MAX_TABS,
1264
1317
  tabProtectFlag: {},
1265
1318
  tabParams: {},
1266
1319
  componentLabelMap: {},
1320
+ pinnedTabs: /* @__PURE__ */ new Set(),
1321
+ refreshTabKey: {},
1267
1322
  clearMenuViewStore: () => {
1268
1323
  n({
1269
1324
  activeMenuId: null,
@@ -1271,10 +1326,12 @@ const Ce = (n) => {
1271
1326
  activeDetailItem: null,
1272
1327
  tabs: [],
1273
1328
  sidebarCollapsed: !1,
1274
- maxTabs: F.MAX_TABS,
1329
+ maxTabs: O.MAX_TABS,
1275
1330
  tabProtectFlag: {},
1276
1331
  tabParams: {},
1277
- componentLabelMap: {}
1332
+ componentLabelMap: {},
1333
+ pinnedTabs: /* @__PURE__ */ new Set(),
1334
+ refreshTabKey: {}
1278
1335
  });
1279
1336
  },
1280
1337
  // 🔧 탭 추가 (메뉴 아이템 객체로)
@@ -1282,11 +1339,11 @@ const Ce = (n) => {
1282
1339
  openTabFromMenu: (e, s) => {
1283
1340
  const { tabs: o } = r(), t = o.find((d) => d.key === e.menuId), a = o.find((d) => d.key === e.menuId);
1284
1341
  if (t)
1285
- a != null ? (n({ activeMenuId: e.menuId, activeMenuItem: e }), r().setTabParams(e.menuId, s || {}), e?.prsnInfoYn === "Y" && r().setProtectFlagForKey(e.menuId)) : L.warning("유효하지 않은 메뉴정보입니다.");
1342
+ a != null ? (n({ activeMenuId: e.menuId, activeMenuItem: e }), r().setTabParams(e.menuId, s || {}), e?.prsnInfoYn === "Y" && r().setProtectFlagForKey(e.menuId)) : w.warning("유효하지 않은 메뉴정보입니다.");
1286
1343
  else {
1287
- if (o.length > F.MAX_TABS) {
1288
- console.warn("❌ 최대 탭 개수를 초과했습니다."), L.warning(
1289
- `최대 ${F.MAX_TABS}개의 탭만 열 수 있습니다.
1344
+ if (o.length > O.MAX_TABS) {
1345
+ console.warn("❌ 최대 탭 개수를 초과했습니다."), w.warning(
1346
+ `최대 ${O.MAX_TABS}개의 탭만 열 수 있습니다.
1290
1347
  기존 탭을 닫고 다시 시도해주세요.`
1291
1348
  );
1292
1349
  return;
@@ -1312,7 +1369,7 @@ const Ce = (n) => {
1312
1369
  // URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
1313
1370
  openTabByMenuId: (e, s) => {
1314
1371
  const o = R.getState().findMenuById(e);
1315
- o ? r().openTabFromMenu(o, s) : L.warning("메뉴 ID를 찾을 수 없습니다.");
1372
+ o ? r().openTabFromMenu(o, s) : w.warning("메뉴 ID를 찾을 수 없습니다.");
1316
1373
  },
1317
1374
  openDetailView: (e, s, o) => {
1318
1375
  const { tabs: t } = r();
@@ -1342,17 +1399,19 @@ const Ce = (n) => {
1342
1399
  // 🔧 탭 제거
1343
1400
  // X 버튼 클릭 시 탭을 닫고 관련 상태도 정리
1344
1401
  closeTab: (e) => {
1345
- const { tabs: s, activeMenuId: o } = r();
1346
- s.find((d) => d.key === e);
1347
- const t = s.filter((d) => d.key !== e);
1348
- let a = o;
1402
+ const { tabs: s, activeMenuId: o, pinnedTabs: t } = r();
1403
+ if (t.has(e))
1404
+ return;
1405
+ s.find((c) => c.key === e);
1406
+ const a = s.filter((c) => c.key !== e);
1407
+ let d = o;
1349
1408
  if (o === e) {
1350
- const d = s.findIndex((c) => c.key === e);
1351
- a = t.length ? t[Math.min(d, t.length - 1)]?.key ?? null : null;
1409
+ const c = s.findIndex((i) => i.key === e);
1410
+ d = a.length ? a[Math.min(c, a.length - 1)]?.key ?? null : null;
1352
1411
  }
1353
1412
  n({
1354
- tabs: t
1355
- }), a && r().focusTab(a);
1413
+ tabs: a
1414
+ }), d && r().focusTab(d);
1356
1415
  },
1357
1416
  // 🔧 활성 탭 변경
1358
1417
  // 탭 헤더 클릭 시 해당 탭으로 전환
@@ -1416,8 +1475,36 @@ const Ce = (n) => {
1416
1475
  };
1417
1476
  }),
1418
1477
  // 컴포넌트 라벨 맵 설정
1419
- setComponentLabelMap: (e, s) => n({ componentLabelMap: e })
1420
- })), Ie = b((n, r) => ({
1478
+ setComponentLabelMap: (e, s) => n({ componentLabelMap: e }),
1479
+ // 고정 토글
1480
+ togglePinTab: (e) => n((s) => {
1481
+ const o = new Set(s.pinnedTabs);
1482
+ return o.has(e) ? o.delete(e) : o.add(e), { pinnedTabs: o };
1483
+ }),
1484
+ // 탭 새로고침 (ContentContainer 재적재를 위한 키 변경)
1485
+ refreshTab: (e) => n((s) => ({
1486
+ refreshTabKey: {
1487
+ ...s.refreshTabKey,
1488
+ [e]: Date.now()
1489
+ }
1490
+ })),
1491
+ // 다른 탭 닫기
1492
+ closeOtherTabs: (e) => {
1493
+ const { tabs: s, activeMenuId: o } = r();
1494
+ if (!s.find((c) => c.key === e)) return;
1495
+ const a = r().pinnedTabs;
1496
+ s.filter(
1497
+ (c) => c.key !== e && !a.has(c.key)
1498
+ ).forEach((c) => r().closeTab(c.key)), o !== e && r().focusTab(e);
1499
+ },
1500
+ // 우측 탭 닫기
1501
+ closeRightTabs: (e) => {
1502
+ const { tabs: s } = r(), o = s.findIndex((d) => d.key === e);
1503
+ if (o < 0) return;
1504
+ const t = r().pinnedTabs;
1505
+ s.slice(o + 1).filter((d) => !t.has(d.key)).forEach((d) => r().closeTab(d.key));
1506
+ }
1507
+ })), ye = N((n, r) => ({
1421
1508
  popups: [],
1422
1509
  activePopupId: null,
1423
1510
  isLoading: !1,
@@ -1428,7 +1515,7 @@ const Ce = (n) => {
1428
1515
  n({ isLoading: !0, error: null });
1429
1516
  try {
1430
1517
  let t = null;
1431
- const a = await N(w("SRCH_POPU"), {
1518
+ const a = await b(F("SRCH_POPU"), {
1432
1519
  crprCd: ee()?.crprCd,
1433
1520
  popuCd: e
1434
1521
  });
@@ -1438,7 +1525,7 @@ const Ce = (n) => {
1438
1525
  const u = `팝업 정보를 찾을 수 없습니다: ${e}`;
1439
1526
  throw console.error(u), new Error(u);
1440
1527
  }
1441
- const i = ((u) => `/src/pages/views/popup/${u}`)(t.popuUrl), l = r().zIndexSeed + 1, f = {
1528
+ const i = ((u) => `/src/pages/views/popup/${u}`)(t.popuUrl), l = r().zIndexSeed + 1, h = {
1442
1529
  popupId: `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
1443
1530
  popupCode: e,
1444
1531
  //config.title을 통해 팝업 제목 변경 가능
@@ -1465,8 +1552,8 @@ const Ce = (n) => {
1465
1552
  return;
1466
1553
  }
1467
1554
  n((u) => ({
1468
- popups: [...u.popups, f],
1469
- activePopupId: f.popupId,
1555
+ popups: [...u.popups, h],
1556
+ activePopupId: h.popupId,
1470
1557
  isLoading: !1,
1471
1558
  zIndexSeed: l
1472
1559
  }));
@@ -1492,19 +1579,19 @@ const Ce = (n) => {
1492
1579
  const m = r().zIndexSeed + 1;
1493
1580
  n({ activePopupId: l.popupId, zIndexSeed: m }), n((u) => ({
1494
1581
  popups: u.popups.map(
1495
- (h) => h.popupId === l.popupId ? {
1496
- ...h,
1582
+ (f) => f.popupId === l.popupId ? {
1583
+ ...f,
1497
1584
  config: c,
1498
1585
  zIndex: m,
1499
1586
  close: () => {
1500
1587
  r().closePopup(l.popupId);
1501
1588
  }
1502
- } : h
1589
+ } : f
1503
1590
  )
1504
1591
  }));
1505
1592
  return;
1506
1593
  }
1507
- const f = {
1594
+ const h = {
1508
1595
  popupId: o,
1509
1596
  popupCode: e,
1510
1597
  popupTitle: c.title || e,
@@ -1524,7 +1611,7 @@ const Ce = (n) => {
1524
1611
  }
1525
1612
  };
1526
1613
  n((m) => ({
1527
- popups: [...m.popups, f],
1614
+ popups: [...m.popups, h],
1528
1615
  activePopupId: o,
1529
1616
  zIndexSeed: t
1530
1617
  }));
@@ -1564,7 +1651,7 @@ const Ce = (n) => {
1564
1651
  )
1565
1652
  }));
1566
1653
  }
1567
- })), V = b()(
1654
+ })), V = N()(
1568
1655
  M(
1569
1656
  (n, r) => ({
1570
1657
  systemMap: [],
@@ -1973,7 +2060,7 @@ const Ce = (n) => {
1973
2060
  // localStorage key
1974
2061
  }
1975
2062
  )
1976
- ), De = b((n) => ({
2063
+ ), Pe = N((n) => ({
1977
2064
  requestCount: 0,
1978
2065
  loading: !1,
1979
2066
  showLoading: () => n((r) => {
@@ -1984,7 +2071,7 @@ const Ce = (n) => {
1984
2071
  const e = Math.max(0, r.requestCount - 1);
1985
2072
  return { requestCount: e, loading: e > 0 };
1986
2073
  })
1987
- })), Oe = b((n) => ({
2074
+ })), De = N((n) => ({
1988
2075
  requestCount: 0,
1989
2076
  loading: !1,
1990
2077
  showLoading: () => n((r) => {
@@ -1996,40 +2083,40 @@ const Ce = (n) => {
1996
2083
  return { requestCount: e, loading: e > 0 };
1997
2084
  })
1998
2085
  }));
1999
- function ye() {
2000
- const [n, r] = X(!1), e = q((s) => {
2086
+ function Ie() {
2087
+ const [n, r] = X(!1), e = W((s) => {
2001
2088
  const o = s?.getModifierState?.("CapsLock");
2002
2089
  typeof o == "boolean" && r(o);
2003
2090
  }, []);
2004
2091
  return { capsOn: n, onKeyDown: e };
2005
2092
  }
2006
- function Fe(n) {
2093
+ function Oe(n) {
2007
2094
  const {
2008
2095
  loginApi: r,
2009
2096
  fetchCommonCodes: e,
2010
2097
  onAfterLogin: s,
2011
2098
  onError: o,
2012
2099
  rememberCookie: t = { enabled: !0, days: 30 }
2013
- } = n, [a, d] = X(!1), { capsOn: c, onKeyDown: i } = ye(), l = "SCMSIGN00101", f = `${__SYS_CD__}_login_id`, m = {
2014
- id: t?.enabled ? te(f) : void 0,
2100
+ } = n, [a, d] = X(!1), { capsOn: c, onKeyDown: i } = Ie(), l = "SCMSIGN00101", h = `${__SYS_CD__}_login_id`, m = {
2101
+ id: t?.enabled ? te(h) : void 0,
2015
2102
  pswr: void 0
2016
- }, u = q(
2017
- async (h, C) => {
2103
+ }, u = W(
2104
+ async (f, C) => {
2018
2105
  d(!0);
2019
2106
  try {
2020
2107
  const g = {
2021
2108
  crprCd: "100",
2022
- id: h.id,
2023
- pswr: await oe(h.pswr)
2024
- }, y = await (r ?? ((S) => N(l, S)))(g);
2025
- if (y?.userInfo?.userId) {
2026
- if (H.getState().setLoginUser(y.userInfo, y?.hrInfo), t?.enabled) {
2109
+ id: f.id,
2110
+ pswr: await oe(f.pswr)
2111
+ }, I = await (r ?? ((S) => b(l, S)))(g);
2112
+ if (I?.userInfo?.userId) {
2113
+ if (H.getState().setLoginUser(I.userInfo, I?.hrInfo), t?.enabled) {
2027
2114
  const S = t.days ?? 30;
2028
- h.remember ? $(f, h.id ?? "", S) : $(f, "", 0);
2115
+ f.remember ? $(h, f.id ?? "", S) : $(h, "", 0);
2029
2116
  }
2030
- return e ? await e() : await G.getState().fetchCommonCodes(), s ? s(y, C) : (L.success(`${y.userInfo.userNm}님 환영합니다.`), C("/main")), { user: y.userInfo, response: y };
2117
+ return e ? await e() : await G.getState().fetchCommonCodes(), s ? s(I, C) : (w.success(`${I.userInfo.userNm}님 환영합니다.`), C("/main")), { user: I.userInfo, response: I };
2031
2118
  } else
2032
- throw o?.({ user: y.userInfo, response: y, navigate: C }), new Error("사용자 정보가 유효하지 않습니다.");
2119
+ throw o?.({ user: I.userInfo, response: I, navigate: C }), new Error("사용자 정보가 유효하지 않습니다.");
2033
2120
  } catch (g) {
2034
2121
  throw o?.(g), g;
2035
2122
  } finally {
@@ -2054,33 +2141,33 @@ function Fe(n) {
2054
2141
  doLogin: u
2055
2142
  };
2056
2143
  }
2057
- function Le() {
2144
+ function we() {
2058
2145
  const n = ne();
2059
2146
  return () => {
2060
- H.getState().clearLoginUser(), V.getState().clearSystemMap(), G.getState().clearCodes(), R.getState().clearMenu(), Z.getState().clearMenuViewStore(), J.getState().clearFavorites(), n("/login");
2147
+ H.getState().clearLoginUser(), V.getState().clearSystemMap(), G.getState().clearCodes(), R.getState().clearMenu(), Z.getState().clearMenuViewStore(), q.getState().clearFavorites(), n("/login");
2061
2148
  };
2062
2149
  }
2063
- const we = () => G.getState(), _e = () => Ie.getState(), Ae = () => H.getState(), Ke = () => J.getState(), Be = () => R.getState(), Ee = () => Z.getState(), Te = () => V.getState();
2150
+ const Fe = () => G.getState(), _e = () => ye.getState(), Te = () => H.getState(), Ae = () => q.getState(), Be = () => R.getState(), Ke = () => Z.getState(), Ee = () => V.getState();
2064
2151
  export {
2065
- ye as useCapsLock,
2066
- we as useCode,
2152
+ Ie as useCapsLock,
2153
+ Fe as useCode,
2067
2154
  G as useCodeStore,
2068
- Pe as useColorStore,
2069
- Ke as useFavorite,
2070
- J as useFavoriteStore,
2071
- De as useLoadingStore,
2072
- Fe as useLogin,
2073
- Le as useLogout,
2155
+ Le as useColorStore,
2156
+ Ae as useFavorite,
2157
+ q as useFavoriteStore,
2158
+ Pe as useLoadingStore,
2159
+ Oe as useLogin,
2160
+ we as useLogout,
2074
2161
  Be as useMenuModel,
2075
2162
  R as useMenuModelStore,
2076
- Ee as useMenuView,
2163
+ Ke as useMenuView,
2077
2164
  Z as useMenuViewStore,
2078
2165
  ve as useOptionStore,
2079
- Oe as usePopupLoadingStore,
2166
+ De as usePopupLoadingStore,
2080
2167
  _e as usePopupState,
2081
- Ie as usePopupStore,
2082
- Te as useSystemCode,
2168
+ ye as usePopupStore,
2169
+ Ee as useSystemCode,
2083
2170
  V as useSystemStore,
2084
- Ae as useUser,
2171
+ Te as useUser,
2085
2172
  H as useUserStore
2086
2173
  };