@bwg-ui/core 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +28 -0
  2. package/dist/chunks/MenuReport-CiL4ggPy.js +1244 -0
  3. package/dist/chunks/MenuReport-DIkKwvta.cjs +1 -0
  4. package/dist/chunks/common-components-B4mah7DM.cjs +183 -0
  5. package/dist/chunks/{common-components-BiUtYMIt.js → common-components-G-FELsbw.js} +6664 -7980
  6. package/dist/chunks/{core-CF_HWm44.cjs → core-CXP75zcn.cjs} +1 -1
  7. package/dist/chunks/{core-Cb5dF0QU.js → core-pjW5SaWA.js} +1 -1
  8. package/dist/chunks/{enc-base64-CAxIzedh.cjs → enc-base64-Bg9x86kU.cjs} +1 -1
  9. package/dist/chunks/{enc-base64-Dy-3zKzn.js → enc-base64-DtP_G7ev.js} +2 -2
  10. package/dist/chunks/layout-components-De-k79AV.cjs +35 -0
  11. package/dist/chunks/layout-components-mRRx1BIz.js +1616 -0
  12. package/dist/chunks/{sha256-DKma8qua.js → sha256-BTxiV_cX.js} +2 -2
  13. package/dist/chunks/{sha256-DbQnwvPn.cjs → sha256-CFa0dyCj.cjs} +1 -1
  14. package/dist/components/common/ButtonAccessController.d.ts +5 -0
  15. package/dist/components/common/ButtonAccessController.d.ts.map +1 -0
  16. package/dist/components/common/BwgEditor.d.ts +3 -3
  17. package/dist/components/common/BwgEditor.d.ts.map +1 -1
  18. package/dist/components/common/BwgPopup.d.ts +15 -0
  19. package/dist/components/common/BwgPopup.d.ts.map +1 -1
  20. package/dist/components/common/BwgView.d.ts +2 -23
  21. package/dist/components/common/BwgView.d.ts.map +1 -1
  22. package/dist/components/common/SearchBox.d.ts +1 -57
  23. package/dist/components/common/SearchBox.d.ts.map +1 -1
  24. package/dist/components/common/index.cjs +1 -1
  25. package/dist/components/common/index.d.ts +5 -3
  26. package/dist/components/common/index.d.ts.map +1 -1
  27. package/dist/components/common/index.js +24 -23
  28. package/dist/components/common/type.d.ts +132 -0
  29. package/dist/components/common/type.d.ts.map +1 -0
  30. package/dist/components/guide/index.cjs +1 -1
  31. package/dist/components/guide/index.js +1 -1
  32. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  33. package/dist/components/layout/default/LocalPopupContainer.d.ts +3 -0
  34. package/dist/components/layout/default/LocalPopupContainer.d.ts.map +1 -0
  35. package/dist/components/layout/default/PopupContainer.d.ts.map +1 -1
  36. package/dist/components/layout/index.cjs +1 -35
  37. package/dist/components/layout/index.js +13 -1558
  38. package/dist/components/popup/MenuReport.d.ts +2 -5
  39. package/dist/components/popup/MenuReport.d.ts.map +1 -1
  40. package/dist/components/popup/SearchDepartmentP01.d.ts +4 -5
  41. package/dist/components/popup/SearchDepartmentP01.d.ts.map +1 -1
  42. package/dist/components/popup/SearchDepartmentP02.d.ts +3 -5
  43. package/dist/components/popup/SearchDepartmentP02.d.ts.map +1 -1
  44. package/dist/components/popup/SearchEmployeeP01.d.ts +3 -1
  45. package/dist/components/popup/SearchEmployeeP01.d.ts.map +1 -1
  46. package/dist/components/popup/SearchEmployeeP02.d.ts +3 -1
  47. package/dist/components/popup/SearchEmployeeP02.d.ts.map +1 -1
  48. package/dist/components/popup/SearchOrganizationP01.d.ts +2 -4
  49. package/dist/components/popup/SearchOrganizationP01.d.ts.map +1 -1
  50. package/dist/components/popup/SearchOrganizationP02.d.ts +3 -4
  51. package/dist/components/popup/SearchOrganizationP02.d.ts.map +1 -1
  52. package/dist/components/popup/config/localPopupRegistry.d.ts +8 -0
  53. package/dist/components/popup/config/localPopupRegistry.d.ts.map +1 -0
  54. package/dist/components/popup/index.cjs +1 -1
  55. package/dist/components/popup/index.d.ts +2 -4
  56. package/dist/components/popup/index.d.ts.map +1 -1
  57. package/dist/components/popup/index.js +1 -1
  58. package/dist/index.cjs +1 -1
  59. package/dist/index.js +135 -132
  60. package/dist/provider/hooks/usePopup.d.ts +1 -0
  61. package/dist/provider/hooks/usePopup.d.ts.map +1 -1
  62. package/dist/provider/index.cjs +1 -1
  63. package/dist/provider/index.js +205 -188
  64. package/dist/stores/index.cjs +2 -2
  65. package/dist/stores/index.js +253 -200
  66. package/dist/stores/popupStore.d.ts +9 -1
  67. package/dist/stores/popupStore.d.ts.map +1 -1
  68. package/dist/utils/gwUtils.d.ts +23 -0
  69. package/dist/utils/gwUtils.d.ts.map +1 -0
  70. package/dist/utils/index.cjs +1 -1
  71. package/dist/utils/index.d.ts +9 -8
  72. package/dist/utils/index.d.ts.map +1 -1
  73. package/dist/utils/index.js +588 -486
  74. package/package.json +4 -4
  75. package/dist/chunks/common-components-DyOLtUJx.cjs +0 -183
@@ -1,6 +1,7 @@
1
- import { create as y } from "zustand";
2
- import { callService as v, getServiceCode as E, getUserId as N, getUserInfo as x } from "../utils/index.js";
3
- import { message as L } from "antd";
1
+ import { create as b } from "zustand";
2
+ import { callService as v, getServiceCode as E, getUserId as N, getUserInfo as K } from "../utils/index.js";
3
+ import { message as O } from "antd";
4
+ import { l as Y } from "../chunks/layout-components-mRRx1BIz.js";
4
5
  function q(r, s) {
5
6
  let e;
6
7
  try {
@@ -39,14 +40,14 @@ const H = (r) => (s) => {
39
40
  }
40
41
  };
41
42
  }
42
- }, z = (r, s) => (e, n, o) => {
43
+ }, J = (r, s) => (e, n, o) => {
43
44
  let t = {
44
45
  storage: q(() => localStorage),
45
- partialize: (m) => m,
46
+ partialize: (h) => h,
46
47
  version: 0,
47
- merge: (m, b) => ({
48
- ...b,
49
- ...m
48
+ merge: (h, y) => ({
49
+ ...y,
50
+ ...h
50
51
  }),
51
52
  ...s
52
53
  }, a = !1;
@@ -54,37 +55,37 @@ const H = (r) => (s) => {
54
55
  let u = t.storage;
55
56
  if (!u)
56
57
  return r(
57
- (...m) => {
58
+ (...h) => {
58
59
  console.warn(
59
60
  `[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`
60
- ), e(...m);
61
+ ), e(...h);
61
62
  },
62
63
  n,
63
64
  o
64
65
  );
65
66
  const i = () => {
66
- const m = t.partialize({ ...n() });
67
+ const h = t.partialize({ ...n() });
67
68
  return u.setItem(t.name, {
68
- state: m,
69
+ state: h,
69
70
  version: t.version
70
71
  });
71
- }, g = o.setState;
72
- o.setState = (m, b) => (g(m, b), i());
73
- const p = r(
74
- (...m) => (e(...m), i()),
72
+ }, f = o.setState;
73
+ o.setState = (h, y) => (f(h, y), i());
74
+ const m = r(
75
+ (...h) => (e(...h), i()),
75
76
  n,
76
77
  o
77
78
  );
78
- o.getInitialState = () => p;
79
- let h;
80
- const I = () => {
81
- var m, b;
79
+ o.getInitialState = () => m;
80
+ let p;
81
+ const g = () => {
82
+ var h, y;
82
83
  if (!u) return;
83
84
  a = !1, c.forEach((C) => {
84
85
  var k;
85
- return C((k = n()) != null ? k : p);
86
+ return C((k = n()) != null ? k : m);
86
87
  });
87
- const M = ((b = t.onRehydrateStorage) == null ? void 0 : b.call(t, (m = n()) != null ? m : p)) || void 0;
88
+ const M = ((y = t.onRehydrateStorage) == null ? void 0 : y.call(t, (h = n()) != null ? h : m)) || void 0;
88
89
  return H(u.getItem.bind(u))(t.name).then((C) => {
89
90
  if (C)
90
91
  if (typeof C.version == "number" && C.version !== t.version) {
@@ -93,7 +94,7 @@ const H = (r) => (s) => {
93
94
  C.state,
94
95
  C.version
95
96
  );
96
- return k instanceof Promise ? k.then((O) => [!0, O]) : [!0, k];
97
+ return k instanceof Promise ? k.then((L) => [!0, L]) : [!0, k];
97
98
  }
98
99
  console.error(
99
100
  "State loaded from storage couldn't be migrated since no migrate function was provided"
@@ -103,39 +104,39 @@ const H = (r) => (s) => {
103
104
  return [!1, void 0];
104
105
  }).then((C) => {
105
106
  var k;
106
- const [O, Y] = C;
107
- if (h = t.merge(
108
- Y,
109
- (k = n()) != null ? k : p
110
- ), e(h, !0), O)
107
+ const [L, R] = C;
108
+ if (p = t.merge(
109
+ R,
110
+ (k = n()) != null ? k : m
111
+ ), e(p, !0), L)
111
112
  return i();
112
113
  }).then(() => {
113
- M?.(h, void 0), h = n(), a = !0, d.forEach((C) => C(h));
114
+ M?.(p, void 0), p = n(), a = !0, d.forEach((C) => C(p));
114
115
  }).catch((C) => {
115
116
  M?.(void 0, C);
116
117
  });
117
118
  };
118
119
  return o.persist = {
119
- setOptions: (m) => {
120
+ setOptions: (h) => {
120
121
  t = {
121
122
  ...t,
122
- ...m
123
- }, m.storage && (u = m.storage);
123
+ ...h
124
+ }, h.storage && (u = h.storage);
124
125
  },
125
126
  clearStorage: () => {
126
127
  u?.removeItem(t.name);
127
128
  },
128
129
  getOptions: () => t,
129
- rehydrate: () => I(),
130
+ rehydrate: () => g(),
130
131
  hasHydrated: () => a,
131
- onHydrate: (m) => (c.add(m), () => {
132
- c.delete(m);
132
+ onHydrate: (h) => (c.add(h), () => {
133
+ c.delete(h);
133
134
  }),
134
- onFinishHydration: (m) => (d.add(m), () => {
135
- d.delete(m);
135
+ onFinishHydration: (h) => (d.add(h), () => {
136
+ d.delete(h);
136
137
  })
137
- }, t.skipHydration || I(), h || p;
138
- }, S = z, J = y()(
138
+ }, t.skipHydration || g(), p || m;
139
+ }, S = J, Z = b()(
139
140
  S(
140
141
  (r, s) => ({
141
142
  user: null,
@@ -216,7 +217,7 @@ const H = (r) => (s) => {
216
217
  });
217
218
  }
218
219
  return console.log("대규모 데이터 변환 완료:", s), s;
219
- }, f = y()(
220
+ }, I = b()(
220
221
  S(
221
222
  (r, s) => ({
222
223
  codeData: null,
@@ -288,25 +289,25 @@ const H = (r) => (s) => {
288
289
  })
289
290
  }
290
291
  )
291
- ), Z = y()(
292
+ ), W = b()(
292
293
  S(
293
294
  (r, s) => ({
294
295
  // 공통 데이터 스토어에서 상태 가져오기
295
296
  get codeData() {
296
- return f.getState().codeData;
297
+ return I.getState().codeData;
297
298
  },
298
299
  get isLoading() {
299
- return f.getState().isLoading;
300
+ return I.getState().isLoading;
300
301
  },
301
302
  get error() {
302
- return f.getState().error;
303
+ return I.getState().error;
303
304
  },
304
305
  get lastUpdated() {
305
- return f.getState().lastUpdated;
306
+ return I.getState().lastUpdated;
306
307
  },
307
308
  // 공통코드 가져오기 (중앙 스토어 사용)
308
309
  fetchCommonCodes: async () => {
309
- await f.getState().fetchData();
310
+ await I.getState().fetchData();
310
311
  },
311
312
  // 1. 통합된 코드 목록 조회 (그룹코드 필수, 옵션으로 필터링)
312
313
  getCodeList: (e, n) => {
@@ -317,36 +318,36 @@ const H = (r) => (s) => {
317
318
  excludeParentCode: c = !1
318
319
  } = n || {}, d = `simpleCodeList_${e}_${o}_${t}_${a}_${c}`;
319
320
  if (l.optionCache.has(d)) {
320
- const I = l.cacheHits.get(d) || 0;
321
- return l.cacheHits.set(d, I + 1), l.optionCache.get(d);
321
+ const g = l.cacheHits.get(d) || 0;
322
+ return l.cacheHits.set(d, g + 1), l.optionCache.get(d);
322
323
  }
323
- const u = f.getState().codeData;
324
+ const u = I.getState().codeData;
324
325
  if (!u) return [];
325
326
  if (!l.isGroupLoaded(e) && !u[e])
326
327
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
327
- const i = [], g = u[e];
328
- g && Object.values(g).forEach((I) => {
329
- if (!(o && !I.enabled) && !(t && I.systemCodeYn !== "Y"))
328
+ const i = [], f = u[e];
329
+ f && Object.values(f).forEach((g) => {
330
+ if (!(o && !g.enabled) && !(t && g.systemCodeYn !== "Y"))
330
331
  if (c) {
331
- const m = e.length, b = I.codeValue.substring(m);
332
- b.length > 0 && i.push({
333
- ...I,
334
- codeValue: b
332
+ const h = e.length, y = g.codeValue.substring(h);
333
+ y.length > 0 && i.push({
334
+ ...g,
335
+ codeValue: y
335
336
  // 자식코드만 사용
336
337
  });
337
338
  } else
338
- i.push(I);
339
+ i.push(g);
339
340
  });
340
- let p;
341
- a ? p = i.sort((I, m) => I.sortOrder !== m.sortOrder ? I.sortOrder - m.sortOrder : I.codeValue.localeCompare(m.codeValue)) : p = i.sort(
342
- (I, m) => I.codeValue.localeCompare(m.codeValue)
341
+ let m;
342
+ a ? m = i.sort((g, h) => g.sortOrder !== h.sortOrder ? g.sortOrder - h.sortOrder : g.codeValue.localeCompare(h.codeValue)) : m = i.sort(
343
+ (g, h) => g.codeValue.localeCompare(h.codeValue)
343
344
  );
344
- const h = p.map((I) => ({
345
- label: I.codeNm,
346
- value: I.codeValue,
347
- tagColor: I.labelColor
345
+ const p = m.map((g) => ({
346
+ label: g.codeNm,
347
+ value: g.codeValue,
348
+ tagColor: g.labelColor
348
349
  }));
349
- return l.optionCache.size >= F.CACHE_SIZE_LIMIT && l.cleanupCache(), l.optionCache.set(d, h), l.cacheHits.set(d, 1), h;
350
+ return l.optionCache.size >= F.CACHE_SIZE_LIMIT && l.cleanupCache(), l.optionCache.set(d, p), l.cacheHits.set(d, 1), p;
350
351
  },
351
352
  // 2. 코드를 던졌을 때 코드명을 리턴 (대규모 최적화)
352
353
  getCodeName: (e) => {
@@ -354,7 +355,7 @@ const H = (r) => (s) => {
354
355
  const o = l.cacheHits.get(`name_${e}`) || 0;
355
356
  return l.cacheHits.set(`name_${e}`, o + 1), l.nameCache.get(e);
356
357
  }
357
- const n = f.getState().codeData;
358
+ const n = I.getState().codeData;
358
359
  if (!n) return null;
359
360
  for (const o of Object.values(n))
360
361
  for (const t of Object.values(o))
@@ -368,7 +369,7 @@ const H = (r) => (s) => {
368
369
  const o = l.cacheHits.get(`color_${e}`) || 0;
369
370
  return l.cacheHits.set(`color_${e}`, o + 1), l.colorCache.get(e);
370
371
  }
371
- const n = f.getState().codeData;
372
+ const n = I.getState().codeData;
372
373
  if (!n) return null;
373
374
  for (const o of Object.values(n))
374
375
  for (const t of Object.values(o))
@@ -386,7 +387,7 @@ const H = (r) => (s) => {
386
387
  const u = l.cacheHits.get(n) || 0;
387
388
  return l.cacheHits.set(n, u + 1), l.optionCache.get(n);
388
389
  }
389
- const o = f.getState().codeData;
390
+ const o = I.getState().codeData;
390
391
  if (!o) return { labels: [], values: [], lookupDisplay: !0 };
391
392
  const t = o[e];
392
393
  if (!t) return { labels: [], values: [], lookupDisplay: !0 };
@@ -404,7 +405,7 @@ const H = (r) => (s) => {
404
405
  const i = l.cacheHits.get(t) || 0;
405
406
  return l.cacheHits.set(t, i + 1), l.codeCache.get(t);
406
407
  }
407
- const a = f.getState().codeData;
408
+ const a = I.getState().codeData;
408
409
  if (!a) return [];
409
410
  const c = [], d = a[e];
410
411
  d && Object.values(d).forEach((i) => {
@@ -415,7 +416,7 @@ const H = (r) => (s) => {
415
416
  });
416
417
  });
417
418
  const u = c.sort(
418
- (i, g) => i.codeValue.localeCompare(g.codeValue)
419
+ (i, f) => i.codeValue.localeCompare(f.codeValue)
419
420
  );
420
421
  return l.codeCache.size >= F.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(t, u), l.cacheHits.set(t, 1), u;
421
422
  },
@@ -427,30 +428,30 @@ const H = (r) => (s) => {
427
428
  sortByOrder: c = !1
428
429
  } = o || {}, d = `codeListByOption_${e}_${n}_${t}_${a}_${c}`;
429
430
  if (l.codeCache.has(d)) {
430
- const h = l.cacheHits.get(d) || 0;
431
- return l.cacheHits.set(d, h + 1), l.codeCache.get(
431
+ const p = l.cacheHits.get(d) || 0;
432
+ return l.cacheHits.set(d, p + 1), l.codeCache.get(
432
433
  d
433
434
  );
434
435
  }
435
- const u = f.getState().codeData;
436
+ const u = I.getState().codeData;
436
437
  if (!u) return [];
437
438
  if (!l.isGroupLoaded(e) && !u[e])
438
439
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
439
- const i = [], g = u[e];
440
- g && Object.values(g).forEach((h) => {
441
- t && !h.enabled || a && h.systemCodeYn !== "Y" || h.options && h.options[n] && i.push({
442
- label: h.options[n],
440
+ const i = [], f = u[e];
441
+ f && Object.values(f).forEach((p) => {
442
+ t && !p.enabled || a && p.systemCodeYn !== "Y" || p.options && p.options[n] && i.push({
443
+ label: p.options[n],
443
444
  // optnNm 값
444
- value: h.commonCode,
445
+ value: p.commonCode,
445
446
  // 공통코드값
446
- tagColor: h.labelColor
447
+ tagColor: p.labelColor
447
448
  // 라벨 컬러
448
449
  });
449
450
  });
450
- let p;
451
- return c ? p = i.sort((h, I) => h.value.localeCompare(I.value)) : p = i.sort(
452
- (h, I) => h.value.localeCompare(I.value)
453
- ), l.codeCache.size >= F.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(d, p), l.cacheHits.set(d, 1), p;
451
+ let m;
452
+ return c ? m = i.sort((p, g) => p.value.localeCompare(g.value)) : m = i.sort(
453
+ (p, g) => p.value.localeCompare(g.value)
454
+ ), l.codeCache.size >= F.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(d, m), l.cacheHits.set(d, 1), m;
454
455
  },
455
456
  // 7. 그룹코드 목록 조회
456
457
  getAvailableGroupCodes: () => {
@@ -459,7 +460,7 @@ const H = (r) => (s) => {
459
460
  const t = l.cacheHits.get(e) || 0;
460
461
  return l.cacheHits.set(e, t + 1), JSON.parse(l.nameCache.get(e));
461
462
  }
462
- const n = f.getState().codeData;
463
+ const n = I.getState().codeData;
463
464
  if (!n) return [];
464
465
  const o = Object.keys(n).sort();
465
466
  return l.nameCache.set(
@@ -469,7 +470,7 @@ const H = (r) => (s) => {
469
470
  },
470
471
  // 공통코드 초기화
471
472
  clearCodes: () => {
472
- f.getState().clearData();
473
+ I.getState().clearData();
473
474
  }
474
475
  }),
475
476
  {
@@ -479,25 +480,25 @@ const H = (r) => (s) => {
479
480
  })
480
481
  }
481
482
  )
482
- ), he = y()(
483
+ ), fe = b()(
483
484
  S(
484
485
  (r, s) => ({
485
486
  // 공통 데이터 스토어에서 상태 가져오기
486
487
  get codeData() {
487
- return f.getState().codeData;
488
+ return I.getState().codeData;
488
489
  },
489
490
  get isLoading() {
490
- return f.getState().isLoading;
491
+ return I.getState().isLoading;
491
492
  },
492
493
  get error() {
493
- return f.getState().error;
494
+ return I.getState().error;
494
495
  },
495
496
  get lastUpdated() {
496
- return f.getState().lastUpdated;
497
+ return I.getState().lastUpdated;
497
498
  },
498
499
  // 공통코드 가져오기 (중앙 스토어 사용)
499
500
  fetchCommonCodes: async () => {
500
- await f.getState().fetchData();
501
+ await I.getState().fetchData();
501
502
  },
502
503
  // 그룹코드와 옵션코드를 던졌을 때 상세코드의 옵션값을 리턴 (대규모 최적화)
503
504
  getOptionValue: (e, n) => {
@@ -506,7 +507,7 @@ const H = (r) => (s) => {
506
507
  const c = l.cacheHits.get(o) || 0;
507
508
  return l.cacheHits.set(o, c + 1), l.optionCache.get(o);
508
509
  }
509
- const t = f.getState().codeData;
510
+ const t = I.getState().codeData;
510
511
  if (!t) return null;
511
512
  const a = t[e];
512
513
  if (a && a[n]) {
@@ -527,7 +528,7 @@ const H = (r) => (s) => {
527
528
  },
528
529
  // 공통코드 초기화
529
530
  clearCodes: () => {
530
- f.getState().clearData();
531
+ I.getState().clearData();
531
532
  }
532
533
  }),
533
534
  {
@@ -537,25 +538,25 @@ const H = (r) => (s) => {
537
538
  })
538
539
  }
539
540
  )
540
- ), me = y()(
541
+ ), ge = b()(
541
542
  S(
542
543
  (r, s) => ({
543
544
  // 공통 데이터 스토어에서 상태 가져오기
544
545
  get codeData() {
545
- return f.getState().codeData;
546
+ return I.getState().codeData;
546
547
  },
547
548
  get isLoading() {
548
- return f.getState().isLoading;
549
+ return I.getState().isLoading;
549
550
  },
550
551
  get error() {
551
- return f.getState().error;
552
+ return I.getState().error;
552
553
  },
553
554
  get lastUpdated() {
554
- return f.getState().lastUpdated;
555
+ return I.getState().lastUpdated;
555
556
  },
556
557
  // 공통코드 가져오기 (중앙 스토어 사용)
557
558
  fetchCommonCodes: async () => {
558
- await f.getState().fetchData();
559
+ await I.getState().fetchData();
559
560
  },
560
561
  // 코드를 던졌을 때 컬러코드를 리턴 (대규모 최적화)
561
562
  getColorCode: (e) => {
@@ -563,7 +564,7 @@ const H = (r) => (s) => {
563
564
  const o = l.cacheHits.get(`color_${e}`) || 0;
564
565
  return l.cacheHits.set(`color_${e}`, o + 1), l.colorCache.get(e);
565
566
  }
566
- const n = f.getState().codeData;
567
+ const n = I.getState().codeData;
567
568
  if (!n) return null;
568
569
  for (const o of Object.values(n))
569
570
  for (const t of Object.values(o))
@@ -581,7 +582,7 @@ const H = (r) => (s) => {
581
582
  const t = l.cacheHits.get(e) || 0;
582
583
  return l.cacheHits.set(e, t + 1), l.optionCache.get(e);
583
584
  }
584
- const n = f.getState().codeData;
585
+ const n = I.getState().codeData;
585
586
  if (!n) return [];
586
587
  const o = [];
587
588
  return Object.values(n).forEach((t) => {
@@ -595,7 +596,7 @@ const H = (r) => (s) => {
595
596
  },
596
597
  // 공통코드 초기화
597
598
  clearCodes: () => {
598
- f.getState().clearData();
599
+ I.getState().clearData();
599
600
  }
600
601
  }),
601
602
  {
@@ -605,7 +606,7 @@ const H = (r) => (s) => {
605
606
  })
606
607
  }
607
608
  )
608
- ), W = (r, s) => ({
609
+ ), Q = (r, s) => ({
609
610
  nodes: {},
610
611
  rootIds: [],
611
612
  loadedFor: void 0,
@@ -617,11 +618,11 @@ const H = (r) => (s) => {
617
618
  (n) => n.type === "M" && n.menuId === e
618
619
  ),
619
620
  getPrntBkmkIdByMenuId: (e) => {
620
- const n = w(s().nodes, e);
621
+ const n = _(s().nodes, e);
621
622
  return n ? s().nodes[n]?.prntBkmkId ?? "-" : "-";
622
623
  },
623
624
  getNodeByMenuId: (e) => {
624
- const n = w(s().nodes, e);
625
+ const n = _(s().nodes, e);
625
626
  if (!n) return null;
626
627
  const o = s().nodes[n];
627
628
  return o?.type === "M" ? o : null;
@@ -630,7 +631,7 @@ const H = (r) => (s) => {
630
631
  const { nodes: n, rootIds: o } = s(), t = (c) => e ? c.toLowerCase().includes(e.toLowerCase()) : !0, a = (c) => {
631
632
  const d = n[c];
632
633
  if (!d || d.type !== "F") return null;
633
- const u = d, i = (u.children || []).map((p) => n[p]).filter((p) => !!p && p.type === "F").map((p) => a(p.bkmkId)).filter(Boolean);
634
+ const u = d, i = (u.children || []).map((m) => n[m]).filter((m) => !!m && m.type === "F").map((m) => a(m.bkmkId)).filter(Boolean);
634
635
  return t(u.bkmkNm) || i.length > 0 ? {
635
636
  key: u.bkmkId,
636
637
  title: `📁 ${u.bkmkNm}`,
@@ -646,7 +647,7 @@ const H = (r) => (s) => {
646
647
  if (!(!n && o.loadedFor === e && Object.keys(o.nodes).length)) {
647
648
  r({ loading: !0, error: void 0 });
648
649
  try {
649
- const t = await v("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], c = V(a), d = _(
650
+ const t = await v("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], c = ee(a), d = w(
650
651
  c.nodes,
651
652
  c.rootIds
652
653
  );
@@ -667,9 +668,9 @@ const H = (r) => (s) => {
667
668
  },
668
669
  // ====== 공통: 생성 ======
669
670
  addNode: async (e) => {
670
- const n = D(s()), o = ee();
671
+ const n = D(s()), o = te();
671
672
  r((t) => {
672
- const a = e.sortOrdr ?? A(t, e.prntBkmkId), c = {
673
+ const a = e.sortOrdr ?? $(t, e.prntBkmkId), c = {
673
674
  ...t,
674
675
  nodes: {
675
676
  ...t.nodes,
@@ -696,11 +697,11 @@ const H = (r) => (s) => {
696
697
  rootIds: t.rootIds.slice(),
697
698
  treeNodes: t.treeNodes
698
699
  };
699
- return te(c, o, e.prntBkmkId), c.treeNodes = _(c.nodes, c.rootIds), c;
700
+ return oe(c, o, e.prntBkmkId), c.treeNodes = w(c.nodes, c.rootIds), c;
700
701
  });
701
702
  try {
702
703
  let t = o;
703
- const a = A(s(), e.prntBkmkId), c = await v("SCMBKMK00102", {
704
+ const a = $(s(), e.prntBkmkId), c = await v("SCMBKMK00102", {
704
705
  iudFlag: "I",
705
706
  type: e.type,
706
707
  sysCd: e.sysCd,
@@ -714,10 +715,10 @@ const H = (r) => (s) => {
714
715
  chngId: N()
715
716
  });
716
717
  return t = String(c?.bkmkId ?? c?.itemId ?? o), r((d) => {
717
- const u = ne(d, o, t);
718
+ const u = re(d, o, t);
718
719
  return {
719
720
  ...u,
720
- treeNodes: _(u.nodes, u.rootIds)
721
+ treeNodes: w(u.nodes, u.rootIds)
721
722
  };
722
723
  }), t;
723
724
  } catch (t) {
@@ -729,18 +730,18 @@ const H = (r) => (s) => {
729
730
  const a = s(), c = structuredClone(a.nodes), d = [...a.rootIds], u = c[e];
730
731
  if (!u) return;
731
732
  if (n !== "-") {
732
- const h = c[n];
733
- if (!h || h.type !== "F")
733
+ const p = c[n];
734
+ if (!p || p.type !== "F")
734
735
  throw new Error("부모는 폴더만 가능합니다.");
735
736
  }
736
- const i = u.prntBkmkId ?? "-", g = i === "-" ? d : c[i].children ||= [];
737
+ const i = u.prntBkmkId ?? "-", f = i === "-" ? d : c[i].children ||= [];
737
738
  {
738
- const h = g.indexOf(e);
739
- h >= 0 && g.splice(h, 1);
739
+ const p = f.indexOf(e);
740
+ p >= 0 && f.splice(p, 1);
740
741
  }
741
- const p = n === "-" ? d : c[n].children ||= [];
742
- p.splice(
743
- Math.max(0, Math.min(o, p.length)),
742
+ const m = n === "-" ? d : c[n].children ||= [];
743
+ m.splice(
744
+ Math.max(0, Math.min(o, m.length)),
744
745
  0,
745
746
  e
746
747
  ), u.prntBkmkId = n, r({ nodes: c, rootIds: d }), U(c, d, n), U(c, d, i);
@@ -752,8 +753,8 @@ const H = (r) => (s) => {
752
753
  sortOrdr: o,
753
754
  chngId: t
754
755
  });
755
- } catch (h) {
756
- throw r(a), h;
756
+ } catch (p) {
757
+ throw r(a), p;
757
758
  }
758
759
  },
759
760
  // ====== 공통: 삭제 ======
@@ -767,7 +768,7 @@ const H = (r) => (s) => {
767
768
  rootIds: o.rootIds.slice(),
768
769
  treeNodes: o.treeNodes
769
770
  };
770
- return K(t, e), t.treeNodes = _(t.nodes, t.rootIds), t;
771
+ return j(t, e), t.treeNodes = w(t.nodes, t.rootIds), t;
771
772
  });
772
773
  try {
773
774
  await v("SCMBKMK00103", { bkmkId: e });
@@ -807,7 +808,7 @@ const H = (r) => (s) => {
807
808
  sysCd: o,
808
809
  userId: t
809
810
  }),
810
- addMenuToFolder: async (e, n) => w(s().nodes, n.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await s().addNode({
811
+ addMenuToFolder: async (e, n) => _(s().nodes, n.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await s().addNode({
811
812
  type: "M",
812
813
  prntBkmkId: e,
813
814
  sysCd: "KH",
@@ -823,8 +824,8 @@ const H = (r) => (s) => {
823
824
  await s().removeNode(t.bkmkId);
824
825
  return;
825
826
  }
826
- let a = $(o);
827
- a || (await s().loadFavorites(e, !0), a = $(s())), a && await s().addNode({
827
+ let a = A(o);
828
+ a || (await s().loadFavorites(e, !0), a = A(s())), a && await s().addNode({
828
829
  type: "M",
829
830
  prntBkmkId: a,
830
831
  sysCd: "KH",
@@ -834,7 +835,7 @@ const H = (r) => (s) => {
834
835
  });
835
836
  },
836
837
  removeMenuByMenuId: async (e) => {
837
- const n = s(), o = w(n.nodes, e);
838
+ const n = s(), o = _(n.nodes, e);
838
839
  o && await s().removeNode(o);
839
840
  },
840
841
  removeMenu: async (e) => {
@@ -858,8 +859,8 @@ const H = (r) => (s) => {
858
859
  const u = e[d];
859
860
  if (!u || t && u.type !== "F") return null;
860
861
  if (u.type === "F") {
861
- const i = u, g = (i.children || []).map((h) => c(h)).filter(Boolean);
862
- return a(i.bkmkNm) || g.length > 0 ? {
862
+ const i = u, f = (i.children || []).map((p) => c(p)).filter(Boolean);
863
+ return a(i.bkmkNm) || f.length > 0 ? {
863
864
  key: i.bkmkId,
864
865
  type: "F",
865
866
  title: `📁 ${i.bkmkNm}`,
@@ -867,14 +868,14 @@ const H = (r) => (s) => {
867
868
  prntBkmkId: i.prntBkmkId,
868
869
  sortOrdr: i.sortOrdr,
869
870
  fullPath: i.fullPath,
870
- children: g.length ? g : void 0
871
+ children: f.length ? f : void 0
871
872
  } : null;
872
873
  } else {
873
- const i = u, g = i.menuNm ? `${i.menuNm} (${i.menuId})` : i.menuId;
874
- return a(g) ? {
874
+ const i = u, f = i.menuNm ? `${i.menuNm} (${i.menuId})` : i.menuId;
875
+ return a(f) ? {
875
876
  key: i.bkmkId,
876
877
  type: "M",
877
- title: `📄 ${g}`,
878
+ title: `📄 ${f}`,
878
879
  prntBkmkId: i.prntBkmkId,
879
880
  sortOrdr: i.sortOrdr,
880
881
  fullPath: i.fullPath,
@@ -884,8 +885,8 @@ const H = (r) => (s) => {
884
885
  };
885
886
  return n.map(c).filter(Boolean);
886
887
  }
887
- }), Q = y(W);
888
- function V(r) {
888
+ }), V = b(Q);
889
+ function ee(r) {
889
890
  const s = {}, e = [], n = (o) => {
890
891
  o.forEach((t) => {
891
892
  const a = {
@@ -931,15 +932,15 @@ function D(r) {
931
932
  rootIds: r.rootIds.slice()
932
933
  };
933
934
  }
934
- function ee() {
935
+ function te() {
935
936
  return `tmp_${Math.random().toString(36).slice(2, 10)}`;
936
937
  }
937
- function A(r, s) {
938
+ function $(r, s) {
938
939
  if (!s || s === "-") return r.rootIds.length;
939
940
  const e = r.nodes[s];
940
941
  return e ? e.children.length : 0;
941
942
  }
942
- function te(r, s, e) {
943
+ function oe(r, s, e) {
943
944
  const n = r.nodes[s];
944
945
  if (n)
945
946
  if (e && e !== "-") {
@@ -949,7 +950,7 @@ function te(r, s, e) {
949
950
  } else
950
951
  n.prntBkmkId = "-", r.rootIds = [...r.rootIds, s];
951
952
  }
952
- function oe(r, s) {
953
+ function ne(r, s) {
953
954
  const e = r.nodes[s];
954
955
  if (!e) return;
955
956
  const n = e.prntBkmkId;
@@ -959,14 +960,14 @@ function oe(r, s) {
959
960
  } else
960
961
  r.rootIds = r.rootIds.filter((o) => o !== s);
961
962
  }
962
- function K(r, s) {
963
+ function j(r, s) {
963
964
  const e = r.nodes[s];
964
965
  if (!e) return;
965
- e.type === "F" && e.children.slice().forEach((a) => K(r, a)), oe(r, s);
966
+ e.type === "F" && e.children.slice().forEach((a) => j(r, a)), ne(r, s);
966
967
  const { [s]: n, ...o } = r.nodes;
967
968
  r.nodes = o;
968
969
  }
969
- function ne(r, s, e) {
970
+ function re(r, s, e) {
970
971
  if (s === e) return r;
971
972
  const n = r.nodes[s];
972
973
  if (!n) return r;
@@ -985,10 +986,10 @@ function ne(r, s, e) {
985
986
  a = r.rootIds.map((c) => c === s ? e : c);
986
987
  return { ...r, nodes: t, rootIds: a };
987
988
  }
988
- function $(r) {
989
+ function A(r) {
989
990
  return r.rootIds.find((s) => r.nodes[s]?.type === "F") ?? null;
990
991
  }
991
- function _(r, s) {
992
+ function w(r, s) {
992
993
  const e = {};
993
994
  Object.values(r).forEach((d) => {
994
995
  const u = d.bkmkId, i = d.prntBkmkId;
@@ -1001,13 +1002,13 @@ function _(r, s) {
1001
1002
  n.add(d);
1002
1003
  try {
1003
1004
  if (u.type === "F") {
1004
- const g = u, p = e[d] ?? [];
1005
+ const f = u, m = e[d] ?? [];
1005
1006
  return {
1006
1007
  type: "F",
1007
1008
  bkmkId: d,
1008
- bkmkNm: g.bkmkNm,
1009
- prntBkmkId: g.prntBkmkId,
1010
- children: p.map(o).filter(Boolean)
1009
+ bkmkNm: f.bkmkNm,
1010
+ prntBkmkId: f.prntBkmkId,
1011
+ children: m.map(o).filter(Boolean)
1011
1012
  };
1012
1013
  }
1013
1014
  const i = u;
@@ -1027,7 +1028,7 @@ function _(r, s) {
1027
1028
  /* @__PURE__ */ new Set([...s, ...t, ...a])
1028
1029
  ).map(o).filter(Boolean);
1029
1030
  }
1030
- function w(r, s) {
1031
+ function _(r, s) {
1031
1032
  for (const e of Object.values(r))
1032
1033
  if (e.type === "M" && e.menuId === s) return e.bkmkId;
1033
1034
  return null;
@@ -1040,20 +1041,20 @@ function U(r, s, e) {
1040
1041
  }
1041
1042
  const T = {
1042
1043
  DEFAULT_PRNT_GBCD: 1
1043
- }, re = (r) => r && typeof r == "object" && typeof r.menuId == "string" && typeof r.menuNm == "string", G = (r) => Array.isArray(r) && r.every(re);
1044
- let B = [], j = [];
1045
- const se = (r) => {
1044
+ }, se = (r) => r && typeof r == "object" && typeof r.menuId == "string" && typeof r.menuNm == "string", G = (r) => Array.isArray(r) && r.every(se);
1045
+ let P = [], x = [];
1046
+ const ae = (r) => {
1046
1047
  if (r && typeof r == "object") {
1047
1048
  const s = r;
1048
1049
  if (s.menus && G(s.menus)) return s.menus;
1049
1050
  if (G(r)) return r;
1050
1051
  }
1051
1052
  return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
1052
- }, ae = (r, s) => !!s && r.crprCd === s.crprCd && r.userId === s.userId && (r.prntGbcd ?? T.DEFAULT_PRNT_GBCD) === (s.prntGbcd ?? T.DEFAULT_PRNT_GBCD), ce = (r) => {
1053
- if (B.length === r.length && B.every(
1053
+ }, ce = (r, s) => !!s && r.crprCd === s.crprCd && r.userId === s.userId && (r.prntGbcd ?? T.DEFAULT_PRNT_GBCD) === (s.prntGbcd ?? T.DEFAULT_PRNT_GBCD), de = (r) => {
1054
+ if (P.length === r.length && P.every(
1054
1055
  (t, a) => t.menuId === r[a]?.menuId && t.menuPrntId === r[a]?.menuPrntId
1055
1056
  ))
1056
- return j;
1057
+ return x;
1057
1058
  if (!r.length) return [];
1058
1059
  const s = /* @__PURE__ */ new Map(), e = [];
1059
1060
  r.forEach((t) => t?.menuId && s.set(t.menuId, { ...t, children: [] })), r.forEach((t) => {
@@ -1064,8 +1065,8 @@ const se = (r) => {
1064
1065
  ...a,
1065
1066
  children: a.children && a.children.length ? n(a.children) : void 0
1066
1067
  })), o = n(e);
1067
- return B = [...r], j = o, o;
1068
- }, R = y((r, s) => ({
1068
+ return P = [...r], x = o, o;
1069
+ }, z = b((r, s) => ({
1069
1070
  // 📊 초기 상태값
1070
1071
  menuList: [],
1071
1072
  flatMenuList: [],
@@ -1080,13 +1081,13 @@ const se = (r) => {
1080
1081
  userId: n,
1081
1082
  prntGbcd: o ?? T.DEFAULT_PRNT_GBCD
1082
1083
  };
1083
- if (ae(t, s()._lastFetchParams)) {
1084
+ if (ce(t, s()._lastFetchParams)) {
1084
1085
  console.log("✅ 중복 fetch 차단", t);
1085
1086
  return;
1086
1087
  }
1087
1088
  r({ isLoading: !0, error: null, _lastFetchParams: t });
1088
1089
  try {
1089
- const a = await v(E("AUTH_MENU"), t), c = se(a), d = ce(c);
1090
+ const a = await v(E("AUTH_MENU"), t), c = ae(a), d = de(c);
1090
1091
  r({
1091
1092
  flatMenuList: c,
1092
1093
  // 평면 리스트 저장
@@ -1115,16 +1116,16 @@ const se = (r) => {
1115
1116
  const { flatMenuList: n } = s();
1116
1117
  return n.find((o) => o.menuId === e) ?? null;
1117
1118
  }
1118
- })), P = {
1119
+ })), B = {
1119
1120
  MAX_TABS: 15
1120
- }, de = y((r, s) => ({
1121
+ }, le = b((r, s) => ({
1121
1122
  // 📊 초기 상태값
1122
1123
  activeMenuId: null,
1123
1124
  activeMenuItem: null,
1124
1125
  activeDetailItem: null,
1125
1126
  tabs: [],
1126
1127
  sidebarCollapsed: !1,
1127
- maxTabs: P.MAX_TABS,
1128
+ maxTabs: B.MAX_TABS,
1128
1129
  tabProtectFlag: {},
1129
1130
  tabParams: {},
1130
1131
  componentLabelMap: {},
@@ -1133,11 +1134,11 @@ const se = (r) => {
1133
1134
  openTabFromMenu: (e, n) => {
1134
1135
  const { tabs: o } = s(), t = o.find((c) => c.key === e.menuId), a = o.find((c) => c.key === e.menuId);
1135
1136
  if (t)
1136
- a != null ? (r({ activeMenuId: e.menuId, activeMenuItem: e }), s().setTabParams(e.menuId, n || {}), e?.prsnInfoYn === "Y" && s().setProtectFlagForKey(e.menuId)) : L.warning("유효하지 않은 메뉴정보입니다.");
1137
+ a != null ? (r({ activeMenuId: e.menuId, activeMenuItem: e }), s().setTabParams(e.menuId, n || {}), e?.prsnInfoYn === "Y" && s().setProtectFlagForKey(e.menuId)) : O.warning("유효하지 않은 메뉴정보입니다.");
1137
1138
  else {
1138
- if (o.length > P.MAX_TABS) {
1139
- console.warn("❌ 최대 탭 개수를 초과했습니다."), L.warning(
1140
- `최대 ${P.MAX_TABS}개의 탭만 열 수 있습니다.
1139
+ if (o.length > B.MAX_TABS) {
1140
+ console.warn("❌ 최대 탭 개수를 초과했습니다."), O.warning(
1141
+ `최대 ${B.MAX_TABS}개의 탭만 열 수 있습니다.
1141
1142
  기존 탭을 닫고 다시 시도해주세요.`
1142
1143
  );
1143
1144
  return;
@@ -1162,8 +1163,8 @@ const se = (r) => {
1162
1163
  // 🔧 탭 추가 (메뉴 ID로)
1163
1164
  // URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
1164
1165
  openTabByMenuId: (e, n) => {
1165
- const o = R.getState().findMenuById(e);
1166
- o ? s().openTabFromMenu(o, n) : L.warning("메뉴 ID를 찾을 수 없습니다.");
1166
+ const o = z.getState().findMenuById(e);
1167
+ o ? s().openTabFromMenu(o, n) : O.warning("메뉴 ID를 찾을 수 없습니다.");
1167
1168
  },
1168
1169
  openDetailView: (e, n, o) => {
1169
1170
  const { tabs: t } = s();
@@ -1268,18 +1269,19 @@ const se = (r) => {
1268
1269
  }),
1269
1270
  // 컴포넌트 라벨 맵 설정
1270
1271
  setComponentLabelMap: (e, n) => r({ componentLabelMap: e })
1271
- })), le = y((r, s) => ({
1272
+ })), ie = b((r, s) => ({
1272
1273
  popups: [],
1273
1274
  activePopupId: null,
1274
1275
  isLoading: !1,
1275
1276
  error: null,
1277
+ zIndexSeed: 1e3,
1276
1278
  // 팝업 열기
1277
1279
  openPopup: async (e, n, o) => {
1278
1280
  r({ isLoading: !0, error: null });
1279
1281
  try {
1280
1282
  let t = null;
1281
1283
  const a = await v(E("SRCH_POPU"), {
1282
- crprCd: x()?.crprCd,
1284
+ crprCd: K()?.crprCd,
1283
1285
  popuCd: e
1284
1286
  });
1285
1287
  t = a?.mstr;
@@ -1288,7 +1290,7 @@ const se = (r) => {
1288
1290
  const p = `팝업 정보를 찾을 수 없습니다: ${e}`;
1289
1291
  throw console.error(p), new Error(p);
1290
1292
  }
1291
- const u = ((p) => `/src/pages/views/popup/${p}`)(t.popuUrl), i = {
1293
+ const u = ((p) => `/src/pages/views/popup/${p}`)(t.popuUrl), i = s().zIndexSeed + 1, f = {
1292
1294
  popupId: `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
1293
1295
  popupCode: e,
1294
1296
  //config.title을 통해 팝업 제목 변경 가능
@@ -1301,22 +1303,24 @@ const se = (r) => {
1301
1303
  draggable: !0,
1302
1304
  buttonList: c,
1303
1305
  // 버튼 목록 추가
1304
- config: o
1305
- }, g = s().popups.find((p) => p.popupCode === e);
1306
- if (g) {
1306
+ config: o,
1307
+ zIndex: i
1308
+ }, m = s().popups.find((p) => p.popupCode === e);
1309
+ if (m) {
1307
1310
  r({
1308
- activePopupId: g.popupId,
1311
+ activePopupId: m.popupId,
1309
1312
  popups: s().popups.map(
1310
- (p) => p.popupId === g.popupId ? { ...p, config: o } : p
1313
+ (p) => p.popupId === m.popupId ? { ...p, config: o } : p
1311
1314
  ),
1312
1315
  isLoading: !1
1313
1316
  });
1314
1317
  return;
1315
1318
  }
1316
1319
  r((p) => ({
1317
- popups: [...p.popups, i],
1318
- activePopupId: i.popupId,
1319
- isLoading: !1
1320
+ popups: [...p.popups, f],
1321
+ activePopupId: f.popupId,
1322
+ isLoading: !1,
1323
+ zIndexSeed: i
1320
1324
  }));
1321
1325
  } catch (t) {
1322
1326
  r({
@@ -1325,6 +1329,48 @@ const se = (r) => {
1325
1329
  });
1326
1330
  }
1327
1331
  },
1332
+ // 로컬 팝업 열기 (DB 조회 없이 레지스트리 매핑으로 렌더)
1333
+ openCorePopup: (e, n, o) => {
1334
+ const t = `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, a = s().zIndexSeed + 1, d = Y[e]?.defaultConfig || {}, u = {
1335
+ ...d,
1336
+ ...o,
1337
+ // buttons와 callback은 완전히 덮어쓰기 (병합하지 않음)
1338
+ buttons: o?.buttons !== void 0 ? o.buttons : d.buttons,
1339
+ callback: o?.callback !== void 0 ? o.callback : d.callback
1340
+ }, i = s().popups.find(
1341
+ (m) => m.popupCode === e && m.isLocal
1342
+ );
1343
+ if (i) {
1344
+ const m = s().zIndexSeed + 1;
1345
+ r({ activePopupId: i.popupId, zIndexSeed: m }), r((p) => ({
1346
+ popups: p.popups.map(
1347
+ (g) => g.popupId === i.popupId ? { ...g, config: u, zIndex: m } : g
1348
+ )
1349
+ }));
1350
+ return;
1351
+ }
1352
+ const f = {
1353
+ popupId: t,
1354
+ popupCode: e,
1355
+ popupTitle: u.title || e,
1356
+ popupUrl: "",
1357
+ // 로컬 팝업은 URL 사용 안 함
1358
+ popupParams: n,
1359
+ width: u.width || 1e3,
1360
+ height: u.height || 700,
1361
+ resizable: u.resizable !== void 0 ? u.resizable : !0,
1362
+ draggable: u.draggable !== void 0 ? u.draggable : !0,
1363
+ buttonList: [],
1364
+ config: u,
1365
+ isLocal: !0,
1366
+ zIndex: a
1367
+ };
1368
+ r((m) => ({
1369
+ popups: [...m.popups, f],
1370
+ activePopupId: t,
1371
+ zIndexSeed: a
1372
+ }));
1373
+ },
1328
1374
  // 팝업 닫기
1329
1375
  closePopup: (e) => {
1330
1376
  const { popups: n, activePopupId: o } = s(), t = n.filter((c) => c.popupId !== e);
@@ -1343,7 +1389,14 @@ const se = (r) => {
1343
1389
  },
1344
1390
  // 활성 팝업 설정
1345
1391
  setActivePopup: (e) => {
1346
- r({ activePopupId: e });
1392
+ const n = s().zIndexSeed + 1;
1393
+ r((o) => ({
1394
+ activePopupId: e,
1395
+ zIndexSeed: n,
1396
+ popups: o.popups.map(
1397
+ (t) => t.popupId === e ? { ...t, zIndex: n } : t
1398
+ )
1399
+ }));
1347
1400
  },
1348
1401
  // 팝업 설정 업데이트
1349
1402
  updatePopupConfig: (e, n) => {
@@ -1353,7 +1406,7 @@ const se = (r) => {
1353
1406
  )
1354
1407
  }));
1355
1408
  }
1356
- })), fe = y((r) => ({
1409
+ })), Ie = b((r) => ({
1357
1410
  requestCount: 0,
1358
1411
  loading: !1,
1359
1412
  showLoading: () => r((s) => {
@@ -1364,7 +1417,7 @@ const se = (r) => {
1364
1417
  const e = Math.max(0, s.requestCount - 1);
1365
1418
  return { requestCount: e, loading: e > 0 };
1366
1419
  })
1367
- })), ge = y((r) => ({
1420
+ })), Ce = b((r) => ({
1368
1421
  requestCount: 0,
1369
1422
  loading: !1,
1370
1423
  showLoading: () => r((s) => {
@@ -1375,22 +1428,22 @@ const se = (r) => {
1375
1428
  const e = Math.max(0, s.requestCount - 1);
1376
1429
  return { requestCount: e, loading: e > 0 };
1377
1430
  })
1378
- })), Ie = () => Z.getState(), Ce = () => le.getState(), ye = () => J.getState(), be = () => Q.getState(), ke = () => R.getState(), ve = () => de.getState();
1431
+ })), be = () => W.getState(), ye = () => ie.getState(), ke = () => Z.getState(), ve = () => V.getState(), Se = () => z.getState(), Me = () => le.getState();
1379
1432
  export {
1380
- Ie as useCode,
1381
- Z as useCodeStore,
1382
- me as useColorStore,
1383
- be as useFavorite,
1384
- Q as useFavoriteStore,
1385
- fe as useLoadingStore,
1386
- ke as useMenuModel,
1387
- R as useMenuModelStore,
1388
- ve as useMenuView,
1389
- de as useMenuViewStore,
1390
- he as useOptionStore,
1391
- ge as usePopupLoadingStore,
1392
- Ce as usePopupState,
1393
- le as usePopupStore,
1394
- ye as useUser,
1395
- J as useUserStore
1433
+ be as useCode,
1434
+ W as useCodeStore,
1435
+ ge as useColorStore,
1436
+ ve as useFavorite,
1437
+ V as useFavoriteStore,
1438
+ Ie as useLoadingStore,
1439
+ Se as useMenuModel,
1440
+ z as useMenuModelStore,
1441
+ Me as useMenuView,
1442
+ le as useMenuViewStore,
1443
+ fe as useOptionStore,
1444
+ Ce as usePopupLoadingStore,
1445
+ ye as usePopupState,
1446
+ ie as usePopupStore,
1447
+ ke as useUser,
1448
+ Z as useUserStore
1396
1449
  };