@bwg-ui/core 1.3.3 → 1.3.5

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 (72) hide show
  1. package/dist/chunks/CMSearchIntfGwP01-CuGDAfFM.cjs +1 -0
  2. package/dist/chunks/{CMSearchIntfGwP01-Co6lrDf9.js → CMSearchIntfGwP01-DBpDpgQr.js} +21 -21
  3. package/dist/chunks/{MenuReport-BTtoDFz-.js → MenuReport-CCbCy7yt.js} +250 -228
  4. package/dist/chunks/MenuReport-yw8tZDUk.cjs +1 -0
  5. package/dist/chunks/common-components-CbkWoYfX.cjs +1111 -0
  6. package/dist/chunks/{common-components-0IMhPxxg.js → common-components-DtzVj5lz.js} +10904 -10757
  7. package/dist/chunks/layout-components-BzLAGXiu.cjs +38 -0
  8. package/dist/chunks/{layout-components-DphZY34c.js → layout-components-ljht1sHh.js} +954 -856
  9. package/dist/chunks/{provider-VCa8UGvF.js → provider-Kxea5IoZ.js} +57 -54
  10. package/dist/chunks/provider-r4mkv5Zs.cjs +1 -0
  11. package/dist/components/common/BwgGrid.d.ts.map +1 -1
  12. package/dist/components/common/BwgView.d.ts.map +1 -1
  13. package/dist/components/common/SearchBox.d.ts +2 -0
  14. package/dist/components/common/SearchBox.d.ts.map +1 -1
  15. package/dist/components/common/index.cjs +1 -1
  16. package/dist/components/common/index.js +1 -1
  17. package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
  18. package/dist/components/core/BwgEmpSearch.d.ts +1 -1
  19. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -1
  20. package/dist/components/core/BwgMaskedDate.d.ts.map +1 -1
  21. package/dist/components/core/BwgMaskedRange.d.ts.map +1 -1
  22. package/dist/components/core/index.cjs +1 -1
  23. package/dist/components/core/index.d.ts +2 -0
  24. package/dist/components/core/index.d.ts.map +1 -1
  25. package/dist/components/core/index.js +1973 -22
  26. package/dist/components/guide/index.cjs +1 -1
  27. package/dist/components/guide/index.js +14 -14
  28. package/dist/components/layout/BwgPortal01.d.ts.map +1 -1
  29. package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
  30. package/dist/components/layout/custom/ConfigurableMenuTab.d.ts.map +1 -1
  31. package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
  32. package/dist/components/layout/index.cjs +1 -1
  33. package/dist/components/layout/index.js +1 -1
  34. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +1 -1
  35. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +1 -1
  36. package/dist/components/pages/rsrc/CMPopuMstrM01.d.ts.map +1 -1
  37. package/dist/components/pages/syst/SystemCodeManage.d.ts.map +1 -1
  38. package/dist/components/popup/MenuReport.d.ts.map +1 -1
  39. package/dist/components/popup/index.cjs +1 -1
  40. package/dist/components/popup/index.d.ts.map +1 -1
  41. package/dist/components/popup/index.js +1 -1
  42. package/dist/index.cjs +1 -1
  43. package/dist/index.js +242 -240
  44. package/dist/provider/contexts/SearchBoxContext.d.ts +20 -0
  45. package/dist/provider/contexts/SearchBoxContext.d.ts.map +1 -1
  46. package/dist/provider/index.cjs +1 -1
  47. package/dist/provider/index.js +5 -5
  48. package/dist/stores/favoriteStore.d.ts.map +1 -1
  49. package/dist/stores/index.cjs +2 -2
  50. package/dist/stores/index.js +208 -207
  51. package/dist/stores/loginStore.d.ts +4 -8
  52. package/dist/stores/loginStore.d.ts.map +1 -1
  53. package/dist/stores/popupStore.d.ts.map +1 -1
  54. package/dist/styles/components.css +107 -37
  55. package/dist/styles/layout.css +59 -5
  56. package/dist/styles/variables.css +6 -0
  57. package/dist/utils/commonUtils.d.ts +5 -1
  58. package/dist/utils/commonUtils.d.ts.map +1 -1
  59. package/dist/utils/index.cjs +1 -1
  60. package/dist/utils/index.d.ts +1 -0
  61. package/dist/utils/index.d.ts.map +1 -1
  62. package/dist/utils/index.js +986 -954
  63. package/package.json +1 -1
  64. package/dist/chunks/CMSearchIntfGwP01-Do_ZDjmX.cjs +0 -1
  65. package/dist/chunks/MenuReport-Bn5NyNel.cjs +0 -1
  66. package/dist/chunks/common-components-Csd3OioX.cjs +0 -1109
  67. package/dist/chunks/core-components-CX6NGtTh.cjs +0 -1
  68. package/dist/chunks/core-components-Ckwf4Rd7.js +0 -1969
  69. package/dist/chunks/layout-components-BMLp8YAy.cjs +0 -38
  70. package/dist/chunks/provider-DrboIg2C.cjs +0 -1
  71. package/dist/components/popup/SearchAddress.d.ts +0 -3
  72. package/dist/components/popup/SearchAddress.d.ts.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { create as b } from "zustand";
2
- import { callService as S, getServiceCode as _, getUserId as v, getUserInfo as te, getCookie as oe, encryptSha256 as X, setCookie as x } from "../utils/index.js";
3
- import { message as B, Modal as se } from "antd";
4
- import { l as ne } from "../chunks/layout-components-DphZY34c.js";
5
- import { useState as H, useCallback as U } from "react";
6
- import re from "axios";
7
- function ae(n, r) {
2
+ import { callService as S, getServiceCode as w, getUserId as v, generateUID as G, getUserInfo as oe, getCookie as se, encryptSha256 as J, setCookie as z, getClientIp as ne } from "../utils/index.js";
3
+ import { message as F, Modal as re } from "antd";
4
+ import { l as ae } from "../chunks/layout-components-ljht1sHh.js";
5
+ import { useState as U, useCallback as $ } from "react";
6
+ import de from "axios";
7
+ function ce(n, r) {
8
8
  let e;
9
9
  try {
10
10
  e = n();
@@ -21,12 +21,12 @@ function ae(n, r) {
21
21
  removeItem: (o) => e.removeItem(o)
22
22
  };
23
23
  }
24
- const G = (n) => (r) => {
24
+ const H = (n) => (r) => {
25
25
  try {
26
26
  const e = n(r);
27
27
  return e instanceof Promise ? e : {
28
28
  then(s) {
29
- return G(s)(e);
29
+ return H(s)(e);
30
30
  },
31
31
  catch(s) {
32
32
  return this;
@@ -38,18 +38,18 @@ const G = (n) => (r) => {
38
38
  return this;
39
39
  },
40
40
  catch(s) {
41
- return G(s)(e);
41
+ return H(s)(e);
42
42
  }
43
43
  };
44
44
  }
45
- }, de = (n, r) => (e, s, o) => {
45
+ }, pe = (n, r) => (e, s, o) => {
46
46
  let t = {
47
- storage: ae(() => localStorage),
48
- partialize: (h) => h,
47
+ storage: ce(() => localStorage),
48
+ partialize: (C) => C,
49
49
  version: 0,
50
- merge: (h, N) => ({
50
+ merge: (C, N) => ({
51
51
  ...N,
52
- ...h
52
+ ...C
53
53
  }),
54
54
  ...r
55
55
  }, a = !1;
@@ -57,38 +57,38 @@ const G = (n) => (r) => {
57
57
  let i = t.storage;
58
58
  if (!i)
59
59
  return n(
60
- (...h) => {
60
+ (...C) => {
61
61
  console.warn(
62
62
  `[zustand persist middleware] Unable to update item '${t.name}', the given storage is currently unavailable.`
63
- ), e(...h);
63
+ ), e(...C);
64
64
  },
65
65
  s,
66
66
  o
67
67
  );
68
68
  const p = () => {
69
- const h = t.partialize({ ...s() });
69
+ const C = t.partialize({ ...s() });
70
70
  return i.setItem(t.name, {
71
- state: h,
71
+ state: C,
72
72
  version: t.version
73
73
  });
74
- }, f = o.setState;
75
- o.setState = (h, N) => (f(h, N), p());
74
+ }, h = o.setState;
75
+ o.setState = (C, N) => (h(C, N), p());
76
76
  const m = n(
77
- (...h) => (e(...h), p()),
77
+ (...C) => (e(...C), p()),
78
78
  s,
79
79
  o
80
80
  );
81
81
  o.getInitialState = () => m;
82
82
  let u;
83
- const C = () => {
84
- var h, N;
83
+ const f = () => {
84
+ var C, N;
85
85
  if (!i) return;
86
86
  a = !1, d.forEach((y) => {
87
87
  var M;
88
88
  return y((M = s()) != null ? M : m);
89
89
  });
90
- const g = ((N = t.onRehydrateStorage) == null ? void 0 : N.call(t, (h = s()) != null ? h : m)) || void 0;
91
- return G(i.getItem.bind(i))(t.name).then((y) => {
90
+ const g = ((N = t.onRehydrateStorage) == null ? void 0 : N.call(t, (C = s()) != null ? C : m)) || void 0;
91
+ return H(i.getItem.bind(i))(t.name).then((y) => {
92
92
  if (y)
93
93
  if (typeof y.version == "number" && y.version !== t.version) {
94
94
  if (t.migrate) {
@@ -96,7 +96,7 @@ const G = (n) => (r) => {
96
96
  y.state,
97
97
  y.version
98
98
  );
99
- return M instanceof Promise ? M.then((T) => [!0, T]) : [!0, M];
99
+ return M instanceof Promise ? M.then((A) => [!0, A]) : [!0, M];
100
100
  }
101
101
  console.error(
102
102
  "State loaded from storage couldn't be migrated since no migrate function was provided"
@@ -106,11 +106,11 @@ const G = (n) => (r) => {
106
106
  return [!1, void 0];
107
107
  }).then((y) => {
108
108
  var M;
109
- const [T, ee] = y;
109
+ const [A, te] = y;
110
110
  if (u = t.merge(
111
- ee,
111
+ te,
112
112
  (M = s()) != null ? M : m
113
- ), e(u, !0), T)
113
+ ), e(u, !0), A)
114
114
  return p();
115
115
  }).then(() => {
116
116
  g?.(u, void 0), u = s(), a = !0, c.forEach((y) => y(u));
@@ -119,26 +119,26 @@ const G = (n) => (r) => {
119
119
  });
120
120
  };
121
121
  return o.persist = {
122
- setOptions: (h) => {
122
+ setOptions: (C) => {
123
123
  t = {
124
124
  ...t,
125
- ...h
126
- }, h.storage && (i = h.storage);
125
+ ...C
126
+ }, C.storage && (i = C.storage);
127
127
  },
128
128
  clearStorage: () => {
129
129
  i?.removeItem(t.name);
130
130
  },
131
131
  getOptions: () => t,
132
- rehydrate: () => C(),
132
+ rehydrate: () => f(),
133
133
  hasHydrated: () => a,
134
- onHydrate: (h) => (d.add(h), () => {
135
- d.delete(h);
134
+ onHydrate: (C) => (d.add(C), () => {
135
+ d.delete(C);
136
136
  }),
137
- onFinishHydration: (h) => (c.add(h), () => {
138
- c.delete(h);
137
+ onFinishHydration: (C) => (c.add(C), () => {
138
+ c.delete(C);
139
139
  })
140
- }, t.skipHydration || C(), u || m;
141
- }, k = de, w = b()(
140
+ }, t.skipHydration || f(), u || m;
141
+ }, k = pe, _ = b()(
142
142
  k(
143
143
  (n, r) => ({
144
144
  user: null,
@@ -267,7 +267,7 @@ const G = (n) => (r) => {
267
267
  // 저장할 상태만 선택
268
268
  }
269
269
  )
270
- ), A = {
270
+ ), E = {
271
271
  CACHE_SIZE_LIMIT: 1e3
272
272
  }, l = {
273
273
  codeCache: /* @__PURE__ */ new Map(),
@@ -332,7 +332,7 @@ const G = (n) => (r) => {
332
332
  n({ isLoading: !0, error: null });
333
333
  try {
334
334
  console.log("시스템 공통코드 데이터 가져오기 시작: SCMSIGN00301");
335
- const e = await S(_("SRCH_CODE"), {
335
+ const e = await S(w("SRCH_CODE"), {
336
336
  crprCd: "100"
337
337
  });
338
338
  console.log("시스템 공통코드 응답:", e), console.log("시스템 공통코드목록:", e.code), console.log("시스템 공통코드옵션목록:", e.opt);
@@ -397,7 +397,7 @@ const G = (n) => (r) => {
397
397
  try {
398
398
  console.log("전체 공통코드 데이터 가져오기 시작 (시스템 + 업무)");
399
399
  const [e, s] = await Promise.all([
400
- S(_("SRCH_CODE"), {
400
+ S(w("SRCH_CODE"), {
401
401
  crprCd: "100"
402
402
  }),
403
403
  S("SCMSIGN00302", {
@@ -465,7 +465,7 @@ const G = (n) => (r) => {
465
465
  })
466
466
  }
467
467
  )
468
- ), F = b()(
468
+ ), T = b()(
469
469
  k(
470
470
  (n, r) => ({
471
471
  // 공통 데이터 스토어에서 상태 가져오기
@@ -494,36 +494,36 @@ const G = (n) => (r) => {
494
494
  excludeParentCode: d = !1
495
495
  } = s || {}, c = `simpleCodeList_${e}_${o}_${t}_${a}_${d}`;
496
496
  if (l.optionCache.has(c)) {
497
- const C = l.cacheHits.get(c) || 0;
498
- return l.cacheHits.set(c, C + 1), l.optionCache.get(c);
497
+ const f = l.cacheHits.get(c) || 0;
498
+ return l.cacheHits.set(c, f + 1), l.optionCache.get(c);
499
499
  }
500
500
  const i = I.getState().codeData;
501
501
  if (!i) return [];
502
502
  if (!l.isGroupLoaded(e) && !i[e])
503
503
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
504
- const p = [], f = i[e];
505
- f && Object.values(f).forEach((C) => {
506
- if (!(o && !C.enabled) && !(t && C.systemCodeYn !== "Y"))
504
+ const p = [], h = i[e];
505
+ h && Object.values(h).forEach((f) => {
506
+ if (!(o && !f.enabled) && !(t && f.systemCodeYn !== "Y"))
507
507
  if (d) {
508
- const h = e.length, N = C.codeValue.substring(h);
508
+ const C = e.length, N = f.codeValue.substring(C);
509
509
  N.length > 0 && p.push({
510
- ...C,
510
+ ...f,
511
511
  codeValue: N
512
512
  // 자식코드만 사용
513
513
  });
514
514
  } else
515
- p.push(C);
515
+ p.push(f);
516
516
  });
517
517
  let m;
518
- a ? m = p.sort((C, h) => C.sortOrder !== h.sortOrder ? C.sortOrder - h.sortOrder : C.codeValue.localeCompare(h.codeValue)) : m = p.sort(
519
- (C, h) => C.codeValue.localeCompare(h.codeValue)
518
+ a ? m = p.sort((f, C) => f.sortOrder !== C.sortOrder ? f.sortOrder - C.sortOrder : f.codeValue.localeCompare(C.codeValue)) : m = p.sort(
519
+ (f, C) => f.codeValue.localeCompare(C.codeValue)
520
520
  );
521
- const u = m.map((C) => ({
522
- label: C.codeNm,
523
- value: C.codeValue,
524
- tagColor: C.labelColor
521
+ const u = m.map((f) => ({
522
+ label: f.codeNm,
523
+ value: f.codeValue,
524
+ tagColor: f.labelColor
525
525
  }));
526
- return l.optionCache.size >= A.CACHE_SIZE_LIMIT && l.cleanupCache(), l.optionCache.set(c, u), l.cacheHits.set(c, 1), u;
526
+ return l.optionCache.size >= E.CACHE_SIZE_LIMIT && l.cleanupCache(), l.optionCache.set(c, u), l.cacheHits.set(c, 1), u;
527
527
  },
528
528
  // 2. 코드를 던졌을 때 코드명을 리턴 (대규모 최적화)
529
529
  getCodeName: (e) => {
@@ -592,9 +592,9 @@ const G = (n) => (r) => {
592
592
  });
593
593
  });
594
594
  const i = d.sort(
595
- (p, f) => p.codeValue.localeCompare(f.codeValue)
595
+ (p, h) => p.codeValue.localeCompare(h.codeValue)
596
596
  );
597
- return l.codeCache.size >= A.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(t, i), l.cacheHits.set(t, 1), i;
597
+ return l.codeCache.size >= E.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(t, i), l.cacheHits.set(t, 1), i;
598
598
  },
599
599
  // 6. 옵션코드별로 코드 목록 조회 (SimpleCodeItem 형태로 반환)
600
600
  getCodeListByOption: (e, s, o) => {
@@ -613,8 +613,8 @@ const G = (n) => (r) => {
613
613
  if (!i) return [];
614
614
  if (!l.isGroupLoaded(e) && !i[e])
615
615
  return console.warn(`그룹 ${e}가 아직 로드되지 않았습니다.`), [];
616
- const p = [], f = i[e];
617
- f && Object.values(f).forEach((u) => {
616
+ const p = [], h = i[e];
617
+ h && Object.values(h).forEach((u) => {
618
618
  t && !u.enabled || a && u.systemCodeYn !== "Y" || u.options && u.options[s] && p.push({
619
619
  label: u.options[s],
620
620
  // optnNm 값
@@ -625,9 +625,9 @@ const G = (n) => (r) => {
625
625
  });
626
626
  });
627
627
  let m;
628
- return d ? m = p.sort((u, C) => u.value.localeCompare(C.value)) : m = p.sort(
629
- (u, C) => u.value.localeCompare(C.value)
630
- ), l.codeCache.size >= A.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(c, m), l.cacheHits.set(c, 1), m;
628
+ return d ? m = p.sort((u, f) => u.value.localeCompare(f.value)) : m = p.sort(
629
+ (u, f) => u.value.localeCompare(f.value)
630
+ ), l.codeCache.size >= E.CACHE_SIZE_LIMIT && l.cleanupCache(), l.codeCache.set(c, m), l.cacheHits.set(c, 1), m;
631
631
  },
632
632
  // 7. 그룹코드 목록 조회
633
633
  getAvailableGroupCodes: () => {
@@ -656,7 +656,7 @@ const G = (n) => (r) => {
656
656
  })
657
657
  }
658
658
  )
659
- ), Le = b()(
659
+ ), De = b()(
660
660
  k(
661
661
  (n, r) => ({
662
662
  // 공통 데이터 스토어에서 상태 가져오기
@@ -714,7 +714,7 @@ const G = (n) => (r) => {
714
714
  })
715
715
  }
716
716
  )
717
- ), Pe = b()(
717
+ ), Oe = b()(
718
718
  k(
719
719
  (n, r) => ({
720
720
  // 공통 데이터 스토어에서 상태 가져오기
@@ -782,7 +782,7 @@ const G = (n) => (r) => {
782
782
  })
783
783
  }
784
784
  )
785
- ), ce = (n, r) => ({
785
+ ), le = (n, r) => ({
786
786
  nodes: {},
787
787
  rootIds: [],
788
788
  loadedFor: void 0,
@@ -794,11 +794,11 @@ const G = (n) => (r) => {
794
794
  (s) => s.type === "M" && s.menuId === e
795
795
  ),
796
796
  getPrntBkmkIdByMenuId: (e) => {
797
- const s = O(r().nodes, e);
797
+ const s = D(r().nodes, e);
798
798
  return s ? r().nodes[s]?.prntBkmkId ?? "-" : "-";
799
799
  },
800
800
  getNodeByMenuId: (e) => {
801
- const s = O(r().nodes, e);
801
+ const s = D(r().nodes, e);
802
802
  if (!s) return null;
803
803
  const o = r().nodes[s];
804
804
  return o?.type === "M" ? o : null;
@@ -823,7 +823,7 @@ const G = (n) => (r) => {
823
823
  if (!(!s && o.loadedFor === e && Object.keys(o.nodes).length)) {
824
824
  n({ loading: !0, error: void 0 });
825
825
  try {
826
- const t = await S("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], d = pe(a), c = P(
826
+ const t = await S("SCMBKMK00101", { userId: e }), a = Array.isArray(t?.sub) ? t.sub : [], d = ie(a), c = P(
827
827
  d.nodes,
828
828
  d.rootIds
829
829
  );
@@ -854,9 +854,9 @@ const G = (n) => (r) => {
854
854
  },
855
855
  // ====== 공통: 생성 ======
856
856
  addNode: async (e) => {
857
- const s = E(r()), o = le();
857
+ const s = K(r()), o = ue();
858
858
  n((t) => {
859
- const a = e.sortOrdr ?? z(t, e.prntBkmkId), d = {
859
+ const a = e.sortOrdr ?? j(t, e.prntBkmkId), d = {
860
860
  ...t,
861
861
  nodes: {
862
862
  ...t.nodes,
@@ -883,11 +883,11 @@ const G = (n) => (r) => {
883
883
  rootIds: t.rootIds.slice(),
884
884
  treeNodes: t.treeNodes
885
885
  };
886
- return ie(d, o, e.prntBkmkId), d.treeNodes = P(d.nodes, d.rootIds), d;
886
+ return me(d, o, e.prntBkmkId), d.treeNodes = P(d.nodes, d.rootIds), d;
887
887
  });
888
888
  try {
889
889
  let t = o;
890
- const a = z(r(), e.prntBkmkId), d = await S("SCMBKMK00102", {
890
+ const a = j(r(), e.prntBkmkId), d = await S("SCMBKMK00102", {
891
891
  iudFlag: "I",
892
892
  type: e.type,
893
893
  sysCd: e.sysCd,
@@ -901,7 +901,7 @@ const G = (n) => (r) => {
901
901
  chngId: v()
902
902
  });
903
903
  return t = String(d?.bkmkId ?? d?.itemId ?? o), n((c) => {
904
- const i = me(c, o, t);
904
+ const i = fe(c, o, t);
905
905
  return {
906
906
  ...i,
907
907
  treeNodes: P(i.nodes, i.rootIds)
@@ -920,17 +920,17 @@ const G = (n) => (r) => {
920
920
  if (!u || u.type !== "F")
921
921
  throw new Error("부모는 폴더만 가능합니다.");
922
922
  }
923
- const p = i.prntBkmkId ?? "-", f = p === "-" ? c : d[p].children ||= [];
923
+ const p = i.prntBkmkId ?? "-", h = p === "-" ? c : d[p].children ||= [];
924
924
  {
925
- const u = f.indexOf(e);
926
- u >= 0 && f.splice(u, 1);
925
+ const u = h.indexOf(e);
926
+ u >= 0 && h.splice(u, 1);
927
927
  }
928
928
  const m = s === "-" ? c : d[s].children ||= [];
929
929
  m.splice(
930
930
  Math.max(0, Math.min(o, m.length)),
931
931
  0,
932
932
  e
933
- ), i.prntBkmkId = s, n({ nodes: d, rootIds: c }), Y(d, c, s), Y(d, c, p);
933
+ ), i.prntBkmkId = s, n({ nodes: d, rootIds: c }), q(d, c, s), q(d, c, p);
934
934
  try {
935
935
  await S("SCMBKMK00104", {
936
936
  // 백엔드 명칭 호환
@@ -945,7 +945,7 @@ const G = (n) => (r) => {
945
945
  },
946
946
  // ====== 공통: 삭제 ======
947
947
  removeNode: async (e) => {
948
- const s = E(r());
948
+ const s = K(r());
949
949
  n((o) => {
950
950
  if (!o.nodes[e]) return o;
951
951
  const t = {
@@ -954,7 +954,7 @@ const G = (n) => (r) => {
954
954
  rootIds: o.rootIds.slice(),
955
955
  treeNodes: o.treeNodes
956
956
  };
957
- return Z(t, e), t.treeNodes = P(t.nodes, t.rootIds), t;
957
+ return V(t, e), t.treeNodes = P(t.nodes, t.rootIds), t;
958
958
  });
959
959
  try {
960
960
  await S("SCMBKMK00103", { bkmkId: e });
@@ -964,7 +964,7 @@ const G = (n) => (r) => {
964
964
  },
965
965
  // ====== 공통: 수정 ======
966
966
  editNode: async ({ bkmkId: e, userId: s, bkmkNm: o, prntBkmkId: t, sortOrdr: a }) => {
967
- const d = E(r());
967
+ const d = K(r());
968
968
  n((c) => {
969
969
  const i = { ...c, nodes: { ...c.nodes } }, p = i.nodes[e];
970
970
  return p?.type === "F" && typeof o == "string" && (i.nodes[e] = {
@@ -994,7 +994,7 @@ const G = (n) => (r) => {
994
994
  sysCd: o,
995
995
  userId: t
996
996
  }),
997
- addMenuToFolder: async (e, s) => O(r().nodes, s.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await r().addNode({
997
+ addMenuToFolder: async (e, s) => D(r().nodes, s.menuId) ? "이미 북마크에 저장된 메뉴입니다." : await r().addNode({
998
998
  type: "M",
999
999
  prntBkmkId: e,
1000
1000
  sysCd: "KH",
@@ -1011,8 +1011,8 @@ const G = (n) => (r) => {
1011
1011
  await r().removeNode(t.bkmkId);
1012
1012
  return;
1013
1013
  }
1014
- let a = j(o);
1015
- a || (await r().loadFavorites(e, !0), a = j(r())), a && await r().addNode({
1014
+ let a = Y(o);
1015
+ a || (await r().loadFavorites(e, !0), a = Y(r())), a && await r().addNode({
1016
1016
  type: "M",
1017
1017
  prntBkmkId: a,
1018
1018
  sysCd: "KH",
@@ -1022,7 +1022,7 @@ const G = (n) => (r) => {
1022
1022
  });
1023
1023
  },
1024
1024
  removeMenuByMenuId: async (e) => {
1025
- const s = r(), o = O(s.nodes, e);
1025
+ const s = r(), o = D(s.nodes, e);
1026
1026
  o && await r().removeNode(o);
1027
1027
  },
1028
1028
  removeMenu: async (e) => {
@@ -1046,8 +1046,8 @@ const G = (n) => (r) => {
1046
1046
  const i = e[c];
1047
1047
  if (!i || t && i.type !== "F") return null;
1048
1048
  if (i.type === "F") {
1049
- const p = i, f = (p.children || []).map((u) => d(u)).filter(Boolean);
1050
- return a(p.bkmkNm) || f.length > 0 ? {
1049
+ const p = i, h = (p.children || []).map((u) => d(u)).filter(Boolean);
1050
+ return a(p.bkmkNm) || h.length > 0 ? {
1051
1051
  key: p.bkmkId,
1052
1052
  type: "F",
1053
1053
  title: `📁 ${p.bkmkNm}`,
@@ -1055,14 +1055,14 @@ const G = (n) => (r) => {
1055
1055
  prntBkmkId: p.prntBkmkId,
1056
1056
  sortOrdr: p.sortOrdr,
1057
1057
  fullPath: p.fullPath,
1058
- children: f.length ? f : void 0
1058
+ children: h.length ? h : void 0
1059
1059
  } : null;
1060
1060
  } else {
1061
- const p = i, f = p.menuNm ? `${p.menuNm} (${p.menuId})` : p.menuId;
1062
- return a(f) ? {
1061
+ const p = i, h = p.menuNm ? `${p.menuNm} (${p.menuId})` : p.menuId;
1062
+ return a(h) ? {
1063
1063
  key: p.bkmkId,
1064
1064
  type: "M",
1065
- title: `📄 ${f}`,
1065
+ title: `📄 ${h}`,
1066
1066
  prntBkmkId: p.prntBkmkId,
1067
1067
  sortOrdr: p.sortOrdr,
1068
1068
  fullPath: p.fullPath,
@@ -1072,8 +1072,8 @@ const G = (n) => (r) => {
1072
1072
  };
1073
1073
  return s.map(d).filter(Boolean);
1074
1074
  }
1075
- }), J = b(ce);
1076
- function pe(n) {
1075
+ }), Z = b(le);
1076
+ function ie(n) {
1077
1077
  const r = {}, e = [], s = (o) => {
1078
1078
  o.forEach((t) => {
1079
1079
  const a = {
@@ -1112,22 +1112,22 @@ function pe(n) {
1112
1112
  );
1113
1113
  }), { nodes: r, rootIds: e };
1114
1114
  }
1115
- function E(n) {
1115
+ function K(n) {
1116
1116
  return {
1117
1117
  ...n,
1118
1118
  nodes: JSON.parse(JSON.stringify(n.nodes)),
1119
1119
  rootIds: n.rootIds.slice()
1120
1120
  };
1121
1121
  }
1122
- function le() {
1123
- return `tmp_${Math.random().toString(36).slice(2, 10)}`;
1122
+ function ue() {
1123
+ return `tmp_${G()}`;
1124
1124
  }
1125
- function z(n, r) {
1125
+ function j(n, r) {
1126
1126
  if (!r || r === "-") return n.rootIds.length;
1127
1127
  const e = n.nodes[r];
1128
1128
  return e ? e.children.length : 0;
1129
1129
  }
1130
- function ie(n, r, e) {
1130
+ function me(n, r, e) {
1131
1131
  const s = n.nodes[r];
1132
1132
  if (s)
1133
1133
  if (e && e !== "-") {
@@ -1137,7 +1137,7 @@ function ie(n, r, e) {
1137
1137
  } else
1138
1138
  s.prntBkmkId = "-", n.rootIds = [...n.rootIds, r];
1139
1139
  }
1140
- function ue(n, r) {
1140
+ function Ce(n, r) {
1141
1141
  const e = n.nodes[r];
1142
1142
  if (!e) return;
1143
1143
  const s = e.prntBkmkId;
@@ -1147,14 +1147,14 @@ function ue(n, r) {
1147
1147
  } else
1148
1148
  n.rootIds = n.rootIds.filter((o) => o !== r);
1149
1149
  }
1150
- function Z(n, r) {
1150
+ function V(n, r) {
1151
1151
  const e = n.nodes[r];
1152
1152
  if (!e) return;
1153
- e.type === "F" && e.children.slice().forEach((a) => Z(n, a)), ue(n, r);
1153
+ e.type === "F" && e.children.slice().forEach((a) => V(n, a)), Ce(n, r);
1154
1154
  const { [r]: s, ...o } = n.nodes;
1155
1155
  n.nodes = o;
1156
1156
  }
1157
- function me(n, r, e) {
1157
+ function fe(n, r, e) {
1158
1158
  if (r === e) return n;
1159
1159
  const s = n.nodes[r];
1160
1160
  if (!s) return n;
@@ -1173,7 +1173,7 @@ function me(n, r, e) {
1173
1173
  a = n.rootIds.map((d) => d === r ? e : d);
1174
1174
  return { ...n, nodes: t, rootIds: a };
1175
1175
  }
1176
- function j(n) {
1176
+ function Y(n) {
1177
1177
  return n.rootIds.find((r) => n.nodes[r]?.type === "F") ?? null;
1178
1178
  }
1179
1179
  function P(n, r) {
@@ -1189,12 +1189,12 @@ function P(n, r) {
1189
1189
  s.add(c);
1190
1190
  try {
1191
1191
  if (i.type === "F") {
1192
- const f = i, m = e[c] ?? [];
1192
+ const h = i, m = e[c] ?? [];
1193
1193
  return {
1194
1194
  type: "F",
1195
1195
  bkmkId: c,
1196
- bkmkNm: f.bkmkNm,
1197
- prntBkmkId: f.prntBkmkId,
1196
+ bkmkNm: h.bkmkNm,
1197
+ prntBkmkId: h.prntBkmkId,
1198
1198
  children: m.map(o).filter(Boolean)
1199
1199
  };
1200
1200
  }
@@ -1215,12 +1215,12 @@ function P(n, r) {
1215
1215
  /* @__PURE__ */ new Set([...r, ...t, ...a])
1216
1216
  ).map(o).filter(Boolean);
1217
1217
  }
1218
- function O(n, r) {
1218
+ function D(n, r) {
1219
1219
  for (const e of Object.values(n))
1220
1220
  if (e.type === "M" && e.menuId === r) return e.bkmkId;
1221
1221
  return null;
1222
1222
  }
1223
- function Y(n, r, e) {
1223
+ function q(n, r, e) {
1224
1224
  (!e || e === "-" ? r : n[e].children || []).forEach((o, t) => {
1225
1225
  const a = n[o];
1226
1226
  a && (a.sortOrdr = t);
@@ -1228,20 +1228,20 @@ function Y(n, r, e) {
1228
1228
  }
1229
1229
  const R = {
1230
1230
  DEFAULT_PRNT_GBCD: 1
1231
- }, Ce = (n) => n && typeof n == "object" && typeof n.menuId == "string" && typeof n.menuNm == "string", W = (n) => Array.isArray(n) && n.every(Ce);
1232
- let K = [], q = [];
1233
- const fe = (n) => {
1231
+ }, he = (n) => n && typeof n == "object" && typeof n.menuId == "string" && typeof n.menuNm == "string", X = (n) => Array.isArray(n) && n.every(he);
1232
+ let B = [], W = [];
1233
+ const Ie = (n) => {
1234
1234
  if (n && typeof n == "object") {
1235
1235
  const r = n;
1236
- if (r.menus && W(r.menus)) return r.menus;
1237
- if (W(n)) return n;
1236
+ if (r.menus && X(r.menus)) return r.menus;
1237
+ if (X(n)) return n;
1238
1238
  }
1239
1239
  return console.warn("⚠️ 메뉴 응답이 비어있거나 예상과 다릅니다."), [];
1240
- }, he = (n, r) => !!r && n.crprCd === r.crprCd && n.userId === r.userId && (n.prntGbcd ?? R.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? R.DEFAULT_PRNT_GBCD), Ie = (n) => {
1241
- if (K.length === n.length && K.every(
1240
+ }, ye = (n, r) => !!r && n.crprCd === r.crprCd && n.userId === r.userId && (n.prntGbcd ?? R.DEFAULT_PRNT_GBCD) === (r.prntGbcd ?? R.DEFAULT_PRNT_GBCD), ge = (n) => {
1241
+ if (B.length === n.length && B.every(
1242
1242
  (t, a) => t.menuId === n[a]?.menuId && t.menuPrntId === n[a]?.menuPrntId
1243
1243
  ))
1244
- return q;
1244
+ return W;
1245
1245
  if (!n.length) return [];
1246
1246
  const r = /* @__PURE__ */ new Map(), e = [];
1247
1247
  n.forEach((t) => t?.menuId && r.set(t.menuId, { ...t, children: [] })), n.forEach((t) => {
@@ -1252,8 +1252,8 @@ const fe = (n) => {
1252
1252
  ...a,
1253
1253
  children: a.children && a.children.length ? s(a.children) : void 0
1254
1254
  })), o = s(e);
1255
- return K = [...n], q = o, o;
1256
- }, $ = b((n, r) => ({
1255
+ return B = [...n], W = o, o;
1256
+ }, x = b((n, r) => ({
1257
1257
  // 📊 초기 상태값
1258
1258
  menuList: [],
1259
1259
  flatMenuList: [],
@@ -1268,13 +1268,13 @@ const fe = (n) => {
1268
1268
  userId: s,
1269
1269
  prntGbcd: o ?? R.DEFAULT_PRNT_GBCD
1270
1270
  };
1271
- if (he(t, r()._lastFetchParams)) {
1271
+ if (ye(t, r()._lastFetchParams)) {
1272
1272
  console.log("✅ 중복 fetch 차단", t);
1273
1273
  return;
1274
1274
  }
1275
1275
  n({ isLoading: !0, error: null, _lastFetchParams: t });
1276
1276
  try {
1277
- const a = await S(_("AUTH_MENU"), t), d = fe(a), c = Ie(d);
1277
+ const a = await S(w("AUTH_MENU"), t), d = Ie(a), c = ge(d);
1278
1278
  n({
1279
1279
  flatMenuList: d,
1280
1280
  // 평면 리스트 저장
@@ -1303,16 +1303,16 @@ const fe = (n) => {
1303
1303
  const { flatMenuList: s } = r();
1304
1304
  return s.find((o) => o.menuId === e) ?? null;
1305
1305
  }
1306
- })), D = {
1306
+ })), O = {
1307
1307
  MAX_TABS: 15
1308
- }, V = b((n, r) => ({
1308
+ }, Q = b((n, r) => ({
1309
1309
  // 📊 초기 상태값
1310
1310
  activeMenuId: null,
1311
1311
  activeMenuItem: null,
1312
1312
  activeDetailItem: null,
1313
1313
  tabs: [],
1314
1314
  sidebarCollapsed: !1,
1315
- maxTabs: D.MAX_TABS,
1315
+ maxTabs: O.MAX_TABS,
1316
1316
  tabProtectFlag: {},
1317
1317
  tabParams: {},
1318
1318
  componentLabelMap: {},
@@ -1325,7 +1325,7 @@ const fe = (n) => {
1325
1325
  activeDetailItem: null,
1326
1326
  tabs: [],
1327
1327
  sidebarCollapsed: !1,
1328
- maxTabs: D.MAX_TABS,
1328
+ maxTabs: O.MAX_TABS,
1329
1329
  tabProtectFlag: {},
1330
1330
  tabParams: {},
1331
1331
  componentLabelMap: {},
@@ -1342,7 +1342,7 @@ const fe = (n) => {
1342
1342
  r().focusTab(e.menuId), r().setTabParams(e.menuId, s || {}), e?.prsnInfoYn === "Y" && r().setProtectFlagForKey(e.menuId);
1343
1343
  return;
1344
1344
  }
1345
- se.confirm({
1345
+ re.confirm({
1346
1346
  title: `[${e.menuNm}] 메뉴이동 알림`,
1347
1347
  content: "이미 열린 화면입니다. 새로고침 하시겠습니까?",
1348
1348
  centered: !0,
@@ -1357,9 +1357,9 @@ const fe = (n) => {
1357
1357
  });
1358
1358
  return;
1359
1359
  }
1360
- if (t.length >= D.MAX_TABS) {
1361
- console.warn("❌ 최대 탭 개수를 초과했습니다."), B.warning(
1362
- `최대 ${D.MAX_TABS}개의 탭만 열 수 있습니다.
1360
+ if (t.length >= O.MAX_TABS) {
1361
+ console.warn("❌ 최대 탭 개수를 초과했습니다."), F.warning(
1362
+ `최대 ${O.MAX_TABS}개의 탭만 열 수 있습니다.
1363
1363
  기존 탭을 닫고 다시 시도해주세요.`
1364
1364
  );
1365
1365
  return;
@@ -1383,8 +1383,8 @@ const fe = (n) => {
1383
1383
  // 🔧 탭 추가 (메뉴 ID로)
1384
1384
  // URL 파라미터로 메뉴 열기 시 사용 (예: ?menuId=CM000301)
1385
1385
  openTabByMenuId: (e, s, o) => {
1386
- const t = $.getState().findMenuById(e);
1387
- t ? r().openTabFromMenu(t, s, o) : B.warning("메뉴 ID를 찾을 수 없습니다.");
1386
+ const t = x.getState().findMenuById(e);
1387
+ t ? r().openTabFromMenu(t, s, o) : F.warning("메뉴 ID를 찾을 수 없습니다.");
1388
1388
  },
1389
1389
  openDetailView: (e, s, o) => {
1390
1390
  const { tabs: t } = r();
@@ -1519,7 +1519,7 @@ const fe = (n) => {
1519
1519
  const t = r().pinnedTabs;
1520
1520
  s.slice(o + 1).filter((d) => !t.has(d.key)).forEach((d) => r().closeTab(d.key));
1521
1521
  }
1522
- })), ye = b((n, r) => ({
1522
+ })), Se = b((n, r) => ({
1523
1523
  popups: [],
1524
1524
  activePopupId: null,
1525
1525
  isLoading: !1,
@@ -1530,8 +1530,8 @@ const fe = (n) => {
1530
1530
  n({ isLoading: !0, error: null });
1531
1531
  try {
1532
1532
  let t = null;
1533
- const a = await S(_("SRCH_POPU"), {
1534
- crprCd: te()?.crprCd,
1533
+ const a = await S(w("SRCH_POPU"), {
1534
+ crprCd: oe()?.crprCd,
1535
1535
  popuCd: e
1536
1536
  });
1537
1537
  t = a?.mstr;
@@ -1540,8 +1540,8 @@ const fe = (n) => {
1540
1540
  const u = `팝업 정보를 찾을 수 없습니다: ${e}`;
1541
1541
  throw console.error(u), new Error(u);
1542
1542
  }
1543
- const i = ((u) => `/src/pages/views/popup/${u}`)(t.popuUrl), p = r().zIndexSeed + 1, f = {
1544
- popupId: `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
1543
+ const i = ((u) => `/src/pages/views/popup/${u}`)(t.popuUrl), p = r().zIndexSeed + 1, h = {
1544
+ popupId: `popup_${Date.now()}_${G()}`,
1545
1545
  popupCode: e,
1546
1546
  //config.title을 통해 팝업 제목 변경 가능
1547
1547
  popupTitle: o?.title || t.popuNm || "팝업",
@@ -1567,8 +1567,8 @@ const fe = (n) => {
1567
1567
  return;
1568
1568
  }
1569
1569
  n((u) => ({
1570
- popups: [...u.popups, f],
1571
- activePopupId: f.popupId,
1570
+ popups: [...u.popups, h],
1571
+ activePopupId: h.popupId,
1572
1572
  isLoading: !1,
1573
1573
  zIndexSeed: p
1574
1574
  }));
@@ -1581,7 +1581,7 @@ const fe = (n) => {
1581
1581
  },
1582
1582
  // 로컬 팝업 열기 (DB 조회 없이 레지스트리 매핑으로 렌더)
1583
1583
  openCorePopup: (e, s) => {
1584
- const o = `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`, t = r().zIndexSeed + 1, d = ne[e]?.defaultConfig || {}, c = {
1584
+ const o = `popup_${Date.now()}_${G()}`, t = r().zIndexSeed + 1, d = ae[e]?.defaultConfig || {}, c = {
1585
1585
  ...d,
1586
1586
  ...s,
1587
1587
  // buttons와 callback은 완전히 덮어쓰기 (병합하지 않음)
@@ -1594,19 +1594,19 @@ const fe = (n) => {
1594
1594
  const m = r().zIndexSeed + 1;
1595
1595
  n({ activePopupId: p.popupId, zIndexSeed: m }), n((u) => ({
1596
1596
  popups: u.popups.map(
1597
- (C) => C.popupId === p.popupId ? {
1598
- ...C,
1597
+ (f) => f.popupId === p.popupId ? {
1598
+ ...f,
1599
1599
  config: c,
1600
1600
  zIndex: m,
1601
1601
  close: () => {
1602
1602
  r().closePopup(p.popupId);
1603
1603
  }
1604
- } : C
1604
+ } : f
1605
1605
  )
1606
1606
  }));
1607
1607
  return;
1608
1608
  }
1609
- const f = {
1609
+ const h = {
1610
1610
  popupId: o,
1611
1611
  popupCode: e,
1612
1612
  popupTitle: c.title || e,
@@ -1626,7 +1626,7 @@ const fe = (n) => {
1626
1626
  }
1627
1627
  };
1628
1628
  n((m) => ({
1629
- popups: [...m.popups, f],
1629
+ popups: [...m.popups, h],
1630
1630
  activePopupId: o,
1631
1631
  zIndexSeed: t
1632
1632
  }));
@@ -1666,7 +1666,7 @@ const fe = (n) => {
1666
1666
  )
1667
1667
  }));
1668
1668
  }
1669
- })), Q = b()(
1669
+ })), ee = b()(
1670
1670
  k(
1671
1671
  (n, r) => ({
1672
1672
  systemMap: [],
@@ -2075,7 +2075,7 @@ const fe = (n) => {
2075
2075
  // localStorage key
2076
2076
  }
2077
2077
  )
2078
- ), Oe = b((n) => ({
2078
+ ), we = b((n) => ({
2079
2079
  requestCount: 0,
2080
2080
  loading: !1,
2081
2081
  showLoading: () => n((r) => {
@@ -2086,7 +2086,7 @@ const fe = (n) => {
2086
2086
  const e = Math.max(0, r.requestCount - 1);
2087
2087
  return { requestCount: e, loading: e > 0 };
2088
2088
  })
2089
- })), De = b((n) => ({
2089
+ })), Fe = b((n) => ({
2090
2090
  requestCount: 0,
2091
2091
  loading: !1,
2092
2092
  showLoading: () => n((r) => {
@@ -2098,8 +2098,8 @@ const fe = (n) => {
2098
2098
  return { requestCount: e, loading: e > 0 };
2099
2099
  })
2100
2100
  }));
2101
- function ge() {
2102
- const [n, r] = H(!1), e = U((s) => {
2101
+ function be() {
2102
+ const [n, r] = U(!1), e = $((s) => {
2103
2103
  const o = s?.getModifierState?.("CapsLock");
2104
2104
  typeof o == "boolean" && r(o);
2105
2105
  }, []);
@@ -2112,28 +2112,28 @@ function _e(n) {
2112
2112
  onAfterLogin: s,
2113
2113
  onError: o,
2114
2114
  rememberCookie: t = { enabled: !0, days: 30 }
2115
- } = n, [a, d] = H(!1), { capsOn: c, onKeyDown: i } = ge(), p = "SCMSIGN00101", f = `${__SYS_CD__}_login_id`, m = {
2116
- id: t?.enabled ? oe(f) : void 0,
2115
+ } = n, [a, d] = U(!1), { capsOn: c, onKeyDown: i } = be(), p = "SCMSIGN00101", h = `${__SYS_CD__}_login_id`, m = {
2116
+ id: t?.enabled ? se(h) : void 0,
2117
2117
  pswr: void 0
2118
- }, u = U(
2119
- async (C) => {
2118
+ }, u = $(
2119
+ async (f) => {
2120
2120
  d(!0);
2121
2121
  try {
2122
- const h = {
2122
+ const C = {
2123
2123
  crprCd: "100",
2124
- id: C.id,
2125
- pswr: await X(C.pswr)
2126
- }, g = await (r ?? ((y) => S(p, y)))(h);
2124
+ id: f.id,
2125
+ pswr: await J(f.pswr)
2126
+ }, g = await (r ?? ((y) => S(p, y)))(C);
2127
2127
  if (g?.userInfo?.userId) {
2128
- if (w.getState().setLoginUser(g.userInfo, g?.hrInfo), localStorage.setItem("LOGIN_USER_ID", g.userInfo.userId), t?.enabled) {
2128
+ if (_.getState().setLoginUser(g.userInfo, g?.hrInfo), localStorage.setItem("LOGIN_USER_ID", g.userInfo.userId), t?.enabled) {
2129
2129
  const y = t.days ?? 30;
2130
- C.remember ? x(f, C.id ?? "", y) : x(f, "", 0);
2130
+ f.remember ? z(h, f.id ?? "", y) : z(h, "", 0);
2131
2131
  }
2132
- return e ? await e() : await F.getState().fetchCommonCodes(), s(g), { user: g.userInfo, response: g };
2132
+ return e ? await e() : await T.getState().fetchCommonCodes(), s(g), { user: g.userInfo, response: g };
2133
2133
  } else
2134
2134
  throw o({ user: g.userInfo, response: g }), new Error("사용자 정보가 유효하지 않습니다.");
2135
- } catch (h) {
2136
- o(h);
2135
+ } catch (C) {
2136
+ o(C);
2137
2137
  } finally {
2138
2138
  d(!1);
2139
2139
  }
@@ -2156,30 +2156,31 @@ function _e(n) {
2156
2156
  doLogin: u
2157
2157
  };
2158
2158
  }
2159
- function we(n) {
2160
- const { loginApi: r, fetchCommonCodes: e, onAfterLogin: s, onError: o } = n, [t, a] = H("LOADING"), d = {
2161
- NO_TOKEN: "인증 정보가 없습니다.",
2162
- INVALID_USER: "사용자 정보가 유효하지 않습니다.",
2163
- UNKNOWN: "SSO 로그인 중 오류가 발생했습니다."
2164
- }, c = (p) => p === "NO_TOKEN" || p === "INVALID_USER" ? p : "UNKNOWN", i = U(
2165
- async (p) => {
2159
+ function Te(n) {
2160
+ const { loginApi: r, fetchCommonCodes: e, onAfterLogin: s, onError: o } = n, [t, a] = U("LOADING"), d = $(
2161
+ async (c) => {
2166
2162
  a("LOADING");
2167
2163
  try {
2168
- const f = await re.post("/api/auth", {});
2169
- f.data.result && f.data.userId && B.success(f.data.message);
2170
- const m = {
2164
+ const i = new URLSearchParams();
2165
+ i.append("ip", ne() || "");
2166
+ const p = await de.post("/api/sso", i);
2167
+ if (p.data.result && p.data.userId)
2168
+ F.success(p.data.message);
2169
+ else if (!p.data.result)
2170
+ throw console.error(p.data.code, " ::: ", p.data.message), F.error(p.data.message), new Error(p.data.message);
2171
+ const h = {
2171
2172
  crprCd: "100",
2172
- id: f.data.userId,
2173
- pswr: await X("krx2025!@")
2174
- }, C = await (r ?? ((h) => S("SCMSIGN00101", h)))(m);
2175
- if (C?.userInfo?.userId)
2176
- return w.getState().setLoginUser(C.userInfo, C?.hrInfo), localStorage.setItem("LOGIN_USER_ID", C.userInfo.userId), e ? await e() : await F.getState().fetchCommonCodes(), s(C), a("SUCCESS"), { user: C.userInfo, response: C };
2173
+ sysCd: c.sysCd,
2174
+ userId: p.data.userId,
2175
+ id: p.data.userId,
2176
+ pswr: await J("krx2025!@")
2177
+ }, u = await (r ?? ((f) => S("SCMSIGN00199", f)))(h);
2178
+ if (u?.userInfo?.userId)
2179
+ return _.getState().setLoginUser(u.userInfo, u?.hrInfo), localStorage.setItem("LOGIN_USER_ID", u.userInfo.userId), e ? await e() : await T.getState().fetchCommonCodes(), s(u), a("SUCCESS"), { user: u.userInfo, response: u };
2177
2180
  throw new Error("INVALID_USER");
2178
- } catch (f) {
2179
- const m = c(f?.message);
2181
+ } catch (i) {
2180
2182
  o?.({
2181
- code: m,
2182
- msg: d[m]
2183
+ msg: i.message
2183
2184
  }), a("FAIL");
2184
2185
  }
2185
2186
  },
@@ -2187,36 +2188,36 @@ function we(n) {
2187
2188
  );
2188
2189
  return {
2189
2190
  loginStatus: t,
2190
- doSsoLogin: i
2191
+ doSsoLogin: d
2191
2192
  };
2192
2193
  }
2193
- function Fe(n) {
2194
+ function Ae(n) {
2194
2195
  return () => {
2195
- w.getState().clearLoginUser(), Q.getState().clearSystemMap(), F.getState().clearCodes(), $.getState().clearMenu(), V.getState().clearMenuViewStore(), J.getState().clearFavorites(), localStorage.removeItem("LOGIN_USER_ID"), n?.();
2196
+ _.getState().clearLoginUser(), ee.getState().clearSystemMap(), T.getState().clearCodes(), x.getState().clearMenu(), Q.getState().clearMenuViewStore(), Z.getState().clearFavorites(), localStorage.removeItem("LOGIN_USER_ID"), n?.();
2196
2197
  };
2197
2198
  }
2198
- const Te = () => F.getState(), Ae = () => ye.getState(), Ee = () => w.getState(), Ke = () => J.getState(), Be = () => $.getState(), Ge = () => V.getState(), Re = () => Q.getState();
2199
+ const Ee = () => T.getState(), Ke = () => Se.getState(), Be = () => _.getState(), Ge = () => Z.getState(), He = () => x.getState(), Re = () => Q.getState(), Ue = () => ee.getState();
2199
2200
  export {
2200
- ge as useCapsLock,
2201
- Te as useCode,
2202
- F as useCodeStore,
2203
- Pe as useColorStore,
2204
- Ke as useFavorite,
2205
- J as useFavoriteStore,
2206
- Oe as useLoadingStore,
2201
+ be as useCapsLock,
2202
+ Ee as useCode,
2203
+ T as useCodeStore,
2204
+ Oe as useColorStore,
2205
+ Ge as useFavorite,
2206
+ Z as useFavoriteStore,
2207
+ we as useLoadingStore,
2207
2208
  _e as useLogin,
2208
- Fe as useLogout,
2209
- Be as useMenuModel,
2210
- $ as useMenuModelStore,
2211
- Ge as useMenuView,
2212
- V as useMenuViewStore,
2213
- Le as useOptionStore,
2214
- De as usePopupLoadingStore,
2215
- Ae as usePopupState,
2216
- ye as usePopupStore,
2217
- we as useSsoLogin,
2218
- Re as useSystemCode,
2219
- Q as useSystemStore,
2220
- Ee as useUser,
2221
- w as useUserStore
2209
+ Ae as useLogout,
2210
+ He as useMenuModel,
2211
+ x as useMenuModelStore,
2212
+ Re as useMenuView,
2213
+ Q as useMenuViewStore,
2214
+ De as useOptionStore,
2215
+ Fe as usePopupLoadingStore,
2216
+ Ke as usePopupState,
2217
+ Se as usePopupStore,
2218
+ Te as useSsoLogin,
2219
+ Ue as useSystemCode,
2220
+ ee as useSystemStore,
2221
+ Be as useUser,
2222
+ _ as useUserStore
2222
2223
  };