@bwg-ui/core 1.1.15 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{BwgLargeUploader-Nx2-wiD8.js → BwgLargeUploader-CBwGaHh6.js} +69 -70
- package/dist/chunks/BwgLargeUploader-CBwGaHh6.js.map +1 -0
- package/dist/chunks/BwgLargeUploader-CVdp_rxx.cjs +3 -0
- package/dist/chunks/BwgLargeUploader-CVdp_rxx.cjs.map +1 -0
- package/dist/chunks/{SSOHandler-DrKRTb6h.js → SSOHandler-BfRH51hZ.js} +250 -249
- package/dist/chunks/SSOHandler-BfRH51hZ.js.map +1 -0
- package/dist/chunks/{SSOHandler-DZeC8Xgh.cjs → SSOHandler-DoidypM2.cjs} +43 -43
- package/dist/chunks/SSOHandler-DoidypM2.cjs.map +1 -0
- package/dist/chunks/{SearchBoxContext-Cpr9xa1S.cjs → SearchBoxContext-CNoEc4uu.cjs} +2 -2
- package/dist/chunks/{SearchBoxContext-Cpr9xa1S.cjs.map → SearchBoxContext-CNoEc4uu.cjs.map} +1 -1
- package/dist/chunks/{SearchBoxContext-BxtHF9BO.js → SearchBoxContext-CjdCL1e9.js} +10 -10
- package/dist/chunks/{SearchBoxContext-BxtHF9BO.js.map → SearchBoxContext-CjdCL1e9.js.map} +1 -1
- package/dist/chunks/ViewContainer-DUjKBgcl.cjs +36 -0
- package/dist/chunks/ViewContainer-DUjKBgcl.cjs.map +1 -0
- package/dist/chunks/{ViewContainer-v1V83KBq.js → ViewContainer-Du3IzFYo.js} +93 -60
- package/dist/chunks/ViewContainer-Du3IzFYo.js.map +1 -0
- package/dist/chunks/apiUtils-DlsnkCO4.cjs +3 -0
- package/dist/chunks/apiUtils-DlsnkCO4.cjs.map +1 -0
- package/dist/chunks/apiUtils-IzgDPO-1.js +1277 -0
- package/dist/chunks/apiUtils-IzgDPO-1.js.map +1 -0
- package/dist/chunks/{codeStore-BzT5wSd9.js → codeStore-Dsjc4uXs.js} +2 -2
- package/dist/chunks/{codeStore-BzT5wSd9.js.map → codeStore-Dsjc4uXs.js.map} +1 -1
- package/dist/chunks/{codeStore-BGLhSpAM.cjs → codeStore-HfLmmkAL.cjs} +2 -2
- package/dist/chunks/{codeStore-BGLhSpAM.cjs.map → codeStore-HfLmmkAL.cjs.map} +1 -1
- package/dist/chunks/envUtils-C4Yv5Nfg.cjs +2 -0
- package/dist/chunks/{envUtils-CduTHoHu.cjs.map → envUtils-C4Yv5Nfg.cjs.map} +1 -1
- package/dist/chunks/envUtils-Ck_DT0s_.js +43 -0
- package/dist/chunks/{envUtils-C9Gf5aek.js.map → envUtils-Ck_DT0s_.js.map} +1 -1
- package/dist/chunks/{favoriteStore-C9utQ6sm.js → favoriteStore-C0o6Sj55.js} +6 -6
- package/dist/chunks/favoriteStore-C0o6Sj55.js.map +1 -0
- package/dist/chunks/{favoriteStore-3YceyayF.cjs → favoriteStore-DOz2rAJu.cjs} +2 -2
- package/dist/chunks/favoriteStore-DOz2rAJu.cjs.map +1 -0
- package/dist/chunks/popupStore-Cm5utmtA.cjs +2 -0
- package/dist/chunks/popupStore-Cm5utmtA.cjs.map +1 -0
- package/dist/chunks/popupStore-D6b6b5-T.js +92 -0
- package/dist/chunks/popupStore-D6b6b5-T.js.map +1 -0
- package/dist/chunks/usePopup-BG24CocH.cjs +2 -0
- package/dist/chunks/usePopup-BG24CocH.cjs.map +1 -0
- package/dist/chunks/usePopup-Dm-UyUbV.js +109 -0
- package/dist/chunks/usePopup-Dm-UyUbV.js.map +1 -0
- package/dist/components/common/BwgButtonGroup.d.ts.map +1 -1
- package/dist/components/common/BwgGrid.d.ts +5 -1
- package/dist/components/common/BwgGrid.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgDatePicker.d.ts.map +1 -1
- package/dist/components/core/BwgLargeUploader.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedInput.d.ts +1 -1
- package/dist/components/core/BwgMaskedInput.d.ts.map +1 -1
- package/dist/components/core/BwgMaskedPicker.d.ts +1 -1
- package/dist/components/core/BwgMaskedPicker.d.ts.map +1 -1
- package/dist/components/core/BwgNumber.d.ts +0 -1
- package/dist/components/core/BwgNumber.d.ts.map +1 -1
- package/dist/components/core/BwgUploader.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +1 -1
- package/dist/components/layout/PrivateProtectedOverlay.d.ts +2 -1
- package/dist/components/layout/PrivateProtectedOverlay.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.d.ts +1 -0
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +7 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +218 -313
- package/dist/index.js.map +1 -1
- package/dist/provider/contexts/index.d.ts +0 -1
- package/dist/provider/contexts/index.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +24 -31
- package/dist/stores/favoriteStore.d.ts.map +1 -1
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +8 -8
- package/dist/utils/commonUtils.d.ts +236 -37
- package/dist/utils/commonUtils.d.ts.map +1 -1
- package/dist/utils/{FileUtils.d.ts → fileUtils.d.ts} +9 -1
- package/dist/utils/fileUtils.d.ts.map +1 -0
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +381 -15
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +215 -208
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/notificationUtils.d.ts +5 -5
- package/dist/utils/notificationUtils.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs +0 -3
- package/dist/chunks/BwgLargeUploader-CgrJUwFW.cjs.map +0 -1
- package/dist/chunks/BwgLargeUploader-Nx2-wiD8.js.map +0 -1
- package/dist/chunks/FileUtils-Bbz3AvQn.js +0 -141
- package/dist/chunks/FileUtils-Bbz3AvQn.js.map +0 -1
- package/dist/chunks/FileUtils-D73GVmB8.cjs +0 -2
- package/dist/chunks/FileUtils-D73GVmB8.cjs.map +0 -1
- package/dist/chunks/SSOHandler-DZeC8Xgh.cjs.map +0 -1
- package/dist/chunks/SSOHandler-DrKRTb6h.js.map +0 -1
- package/dist/chunks/ViewContainer-DQl7Mb0U.cjs +0 -36
- package/dist/chunks/ViewContainer-DQl7Mb0U.cjs.map +0 -1
- package/dist/chunks/ViewContainer-v1V83KBq.js.map +0 -1
- package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs +0 -2
- package/dist/chunks/_commonjsHelpers-DKOUU3wS.cjs.map +0 -1
- package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +0 -9
- package/dist/chunks/_commonjsHelpers-DaMA6jEr.js.map +0 -1
- package/dist/chunks/apiUtils-C45AWfu-.js +0 -957
- package/dist/chunks/apiUtils-C45AWfu-.js.map +0 -1
- package/dist/chunks/apiUtils-Cbg6NQLv.cjs +0 -4
- package/dist/chunks/apiUtils-Cbg6NQLv.cjs.map +0 -1
- package/dist/chunks/commonUtils-BH6QwGUb.cjs +0 -2
- package/dist/chunks/commonUtils-BH6QwGUb.cjs.map +0 -1
- package/dist/chunks/commonUtils-Bb16Yqjk.js +0 -629
- package/dist/chunks/commonUtils-Bb16Yqjk.js.map +0 -1
- package/dist/chunks/envUtils-C9Gf5aek.js +0 -30
- package/dist/chunks/envUtils-CduTHoHu.cjs +0 -2
- package/dist/chunks/favoriteStore-3YceyayF.cjs.map +0 -1
- package/dist/chunks/favoriteStore-C9utQ6sm.js.map +0 -1
- package/dist/chunks/popupStore-DmFbkkjd.js +0 -98
- package/dist/chunks/popupStore-DmFbkkjd.js.map +0 -1
- package/dist/chunks/popupStore-DnWLaQ70.cjs +0 -2
- package/dist/chunks/popupStore-DnWLaQ70.cjs.map +0 -1
- package/dist/chunks/usePopup-C8FrbrDD.cjs +0 -2
- package/dist/chunks/usePopup-C8FrbrDD.cjs.map +0 -1
- package/dist/chunks/usePopup-pfh-ajfP.js +0 -241
- package/dist/chunks/usePopup-pfh-ajfP.js.map +0 -1
- package/dist/provider/contexts/UtilsContext.d.ts +0 -195
- package/dist/provider/contexts/UtilsContext.d.ts.map +0 -1
- package/dist/utils/FileUtils.d.ts.map +0 -1
- package/dist/utils/arrayUtils.d.ts +0 -35
- package/dist/utils/arrayUtils.d.ts.map +0 -1
- package/dist/utils/cookieUtils.d.ts +0 -5
- package/dist/utils/cookieUtils.d.ts.map +0 -1
- package/dist/utils/dateUtils.d.ts +0 -27
- package/dist/utils/dateUtils.d.ts.map +0 -1
- package/dist/utils/imageUtils.d.ts +0 -32
- package/dist/utils/imageUtils.d.ts.map +0 -1
- package/dist/utils/objectUtils.d.ts +0 -28
- package/dist/utils/objectUtils.d.ts.map +0 -1
- package/dist/utils/stringUtils.d.ts +0 -143
- package/dist/utils/stringUtils.d.ts.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const e = (() => {
|
|
2
|
+
try {
|
|
3
|
+
if (import.meta.env.DEV)
|
|
4
|
+
return !0;
|
|
5
|
+
} catch {
|
|
6
|
+
}
|
|
7
|
+
return !1;
|
|
8
|
+
})();
|
|
9
|
+
let o = [], n = [];
|
|
10
|
+
function u(t) {
|
|
11
|
+
t.devHosts && (o = t.devHosts), t.prodHosts && (n = t.prodHosts);
|
|
12
|
+
}
|
|
13
|
+
function r() {
|
|
14
|
+
if (typeof window < "u" && window.location)
|
|
15
|
+
return window.location.hostname;
|
|
16
|
+
}
|
|
17
|
+
const s = (() => {
|
|
18
|
+
const t = r();
|
|
19
|
+
return !!(t && o.includes(t));
|
|
20
|
+
})(), i = (() => {
|
|
21
|
+
const t = r();
|
|
22
|
+
return !!(t && n.includes(t));
|
|
23
|
+
})();
|
|
24
|
+
function c() {
|
|
25
|
+
return e ? "X" : s ? "D" : i ? "P" : "X";
|
|
26
|
+
}
|
|
27
|
+
const d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28
|
+
__proto__: null,
|
|
29
|
+
configureEnvUtils: u,
|
|
30
|
+
getEnvCode: c,
|
|
31
|
+
isDev: s,
|
|
32
|
+
isLocal: e,
|
|
33
|
+
isProd: i
|
|
34
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
35
|
+
export {
|
|
36
|
+
s as a,
|
|
37
|
+
i as b,
|
|
38
|
+
u as c,
|
|
39
|
+
d as e,
|
|
40
|
+
c as g,
|
|
41
|
+
e as i
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=envUtils-Ck_DT0s_.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envUtils-
|
|
1
|
+
{"version":3,"file":"envUtils-Ck_DT0s_.js","sources":["../../src/utils/envUtils.ts"],"sourcesContent":["/**\r\n * 현재 코드가 실행되는 최종 애플리케이션의 환경이 개발 환경인지 여부를 반환합니다.\r\n * 이 라이브러리를 사용하는 프로젝트의 빌드 도구(Vite 등)가 이 값을 결정합니다.\r\n *\r\n * @example\r\n * // 최종 앱이 `npm run dev`로 실행될 때: isLocal === true\r\n * // 최종 앱이 `npm run build`로 빌드될 때: isLocal === false\r\n */\r\nexport const isLocal: boolean = (() => {\r\n try {\r\n // `import.meta.env.DEV`는 Vite와 같은 모던 빌드 도구에서 제공하는 표준적인 방식입니다.\r\n // 라이브러리 빌드 시점에는 이 코드가 그대로 유지되며,\r\n // 최종 사용되는 프로젝트에서 빌드될 때 해당 프로젝트의 환경에 맞게 `true` 또는 `false`로 대체됩니다.\r\n if ((import.meta as any).env.DEV) {\r\n return true;\r\n }\r\n } catch (e) {\r\n // `import.meta`를 지원하지 않는 환경(예: CommonJS, 일부 테스트 환경)을 위한 폴백입니다.\r\n }\r\n return false;\r\n})();\r\n\r\nlet devHosts: string[] = [];\r\nlet prodHosts: string[] = [];\r\n\r\nexport function configureEnvUtils(opts: {\r\n devHosts?: string[];\r\n prodHosts?: string[];\r\n}) {\r\n if (opts.devHosts) devHosts = opts.devHosts;\r\n if (opts.prodHosts) prodHosts = opts.prodHosts;\r\n}\r\n\r\nfunction getHostName(): string | undefined {\r\n if (typeof window !== \"undefined\" && window.location) {\r\n return window.location.hostname;\r\n }\r\n return undefined;\r\n}\r\n\r\nexport const isDev: boolean = (() => {\r\n const host = getHostName();\r\n return !!(host && devHosts.includes(host));\r\n})();\r\n\r\nexport const isProd: boolean = (() => {\r\n const host = getHostName();\r\n return !!(host && prodHosts.includes(host));\r\n})();\r\n\r\n// ✅ 환경코드 반환 유틸\r\nexport function getEnvCode(): \"X\" | \"D\" | \"P\" {\r\n if (isLocal) return \"X\"; // Local\r\n if (isDev) return \"D\"; // Dev\r\n if (isProd) return \"P\"; // Prod\r\n return \"X\"; // 기본값은 Local로\r\n}\r\n"],"names":["isLocal","devHosts","prodHosts","configureEnvUtils","opts","getHostName","isDev","host","isProd","getEnvCode"],"mappings":"AAQO,MAAMA,KAAoB,MAAM;AACrC,MAAI;AAIF,QAAK,YAAA,IAAA;AACH,aAAO;AAAA,EAEX,QAAY;AAAA,EAEZ;AACA,SAAO;AACT,GAAA;AAEA,IAAIC,IAAqB,CAAA,GACrBC,IAAsB,CAAA;AAEnB,SAASC,EAAkBC,GAG/B;AACD,EAAIA,EAAK,aAAUH,IAAWG,EAAK,WAC/BA,EAAK,cAAWF,IAAYE,EAAK;AACvC;AAEA,SAASC,IAAkC;AACzC,MAAI,OAAO,SAAW,OAAe,OAAO;AAC1C,WAAO,OAAO,SAAS;AAG3B;AAEO,MAAMC,KAAkB,MAAM;AACnC,QAAMC,IAAOF,EAAA;AACb,SAAO,CAAC,EAAEE,KAAQN,EAAS,SAASM,CAAI;AAC1C,GAAA,GAEaC,KAAmB,MAAM;AACpC,QAAMD,IAAOF,EAAA;AACb,SAAO,CAAC,EAAEE,KAAQL,EAAU,SAASK,CAAI;AAC3C,GAAA;AAGO,SAASE,IAA8B;AAC5C,SAAIT,IAAgB,MAChBM,IAAc,MACdE,IAAe,MACZ;AACT;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as
|
|
4
|
-
const u =
|
|
1
|
+
import { i as l } from "./envUtils-Ck_DT0s_.js";
|
|
2
|
+
import { create as d } from "zustand";
|
|
3
|
+
import { c as i, ag as c } from "./apiUtils-IzgDPO-1.js";
|
|
4
|
+
const u = d((t, n) => ({
|
|
5
5
|
favorites: [],
|
|
6
6
|
isLoading: !1,
|
|
7
7
|
error: null,
|
|
@@ -14,7 +14,7 @@ const u = l((t, n) => ({
|
|
|
14
14
|
userId: a
|
|
15
15
|
});
|
|
16
16
|
let r = [];
|
|
17
|
-
if (e?.favorites && Array.isArray(e.favorites) ? r = e.favorites : Array.isArray(e) ? r = e : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r),
|
|
17
|
+
if (e?.favorites && Array.isArray(e.favorites) ? r = e.favorites : Array.isArray(e) ? r = e : (console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."), r = []), console.log("즐겨찾기 메뉴 로드 완료:", r), l && r.length === 0) {
|
|
18
18
|
const s = [
|
|
19
19
|
{
|
|
20
20
|
crprCd: "100",
|
|
@@ -109,4 +109,4 @@ const u = l((t, n) => ({
|
|
|
109
109
|
export {
|
|
110
110
|
u
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=favoriteStore-
|
|
112
|
+
//# sourceMappingURL=favoriteStore-C0o6Sj55.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favoriteStore-C0o6Sj55.js","sources":["../../src/stores/favoriteStore.ts"],"sourcesContent":["import { isLocal } from \"@/utils/envUtils\";\r\nimport { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport type { MenuItem } from \"./menuModelStore\";\r\n\r\n// 즐겨찾기 메뉴 타입 정의\r\nexport interface FavoriteMenuItem extends MenuItem {\r\n addedAt: string; // 즐겨찾기 추가 시간\r\n userId: string; // 사용자 ID\r\n}\r\n\r\n// 즐겨찾기 스토어 타입 정의\r\nexport interface FavoriteStore {\r\n favorites: FavoriteMenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: (params: { crprCd: string; userId: string }) => Promise<void>;\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: (menuItem: MenuItem, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: (menuId: string, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => boolean;\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => void;\r\n}\r\n\r\n// 즐겨찾기 스토어 생성\r\nexport const useFavoriteStore = create<FavoriteStore>((set, get) => ({\r\n favorites: [],\r\n isLoading: false,\r\n error: null,\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: async ({ crprCd, userId }) => {\r\n console.log(\"즐겨찾기 메뉴 요청:\", { crprCd, userId });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n // 서버에서 즐겨찾기 메뉴 가져오기\r\n const data = await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n crprCd,\r\n userId,\r\n });\r\n\r\n let favoritesList: FavoriteMenuItem[] = [];\r\n\r\n if (data?.favorites && Array.isArray(data.favorites)) {\r\n favoritesList = data.favorites;\r\n } else if (Array.isArray(data)) {\r\n favoritesList = data;\r\n } else {\r\n console.warn(\"즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다.\");\r\n favoritesList = [];\r\n }\r\n\r\n console.log(\"즐겨찾기 메뉴 로드 완료:\", favoritesList);\r\n\r\n // 개발 모드에서 테스트용 즐겨찾기 데이터 추가\r\n if (isLocal && favoritesList.length === 0) {\r\n const testFavorites: FavoriteMenuItem[] = [\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST001\",\r\n menuNm: \"API 테스트\",\r\n scrnId: \"TEST001\",\r\n menuNo: 1,\r\n scrnPath: \"/dev/ApiTest\",\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST002\",\r\n menuNm: \"프로젝트 개요\",\r\n scrnId: \"DOCS001\",\r\n menuNo: 2,\r\n scrnPath: \"/docs/ProjectOverview\",\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n ];\r\n set({ favorites: testFavorites, isLoading: false, error: null });\r\n console.log(\"개발 모드: 테스트용 즐겨찾기 데이터 추가\");\r\n } else {\r\n set({ favorites: favoritesList, isLoading: false, error: null });\r\n }\r\n } catch (error) {\r\n console.error(\"즐겨찾기 메뉴 로드 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"즐겨찾기 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: async (menuItem: MenuItem, userId: string) => {\r\n const { favorites } = get();\r\n\r\n // 이미 즐겨찾기에 있는지 확인\r\n if (favorites.some((fav) => fav.menuId === menuItem.menuId)) {\r\n console.log(\"이미 즐겨찾기에 추가된 메뉴입니다:\", menuItem.menuNm);\r\n return;\r\n }\r\n\r\n try {\r\n // 서버에 즐겨찾기 추가 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"add\",\r\n crprCd: menuItem.crprCd,\r\n userId,\r\n menuId: menuItem.menuId,\r\n menuNm: menuItem.menuNm,\r\n scrnPath: menuItem.scrnPath,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const newFavorite: FavoriteMenuItem = {\r\n ...menuItem,\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n };\r\n\r\n set({ favorites: [...favorites, newFavorite] });\r\n console.log(\"즐겨찾기 추가 완료:\", menuItem.menuNm);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 추가 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: async (menuId: string, userId: string) => {\r\n const { favorites } = get();\r\n\r\n try {\r\n // 서버에 즐겨찾기 제거 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"remove\",\r\n crprCd: \"100\", // 기본값\r\n userId,\r\n menuId,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const updatedFavorites = favorites.filter((fav) => fav.menuId !== menuId);\r\n set({ favorites: updatedFavorites });\r\n console.log(\"즐겨찾기 제거 완료:\", menuId);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 제거 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => {\r\n const { favorites } = get();\r\n return favorites.some((fav) => fav.menuId === menuId);\r\n },\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => {\r\n set({ favorites: [], isLoading: false, error: null });\r\n },\r\n}));\r\n"],"names":["useFavoriteStore","create","set","get","crprCd","userId","data","callService","getServiceCode","favoritesList","isLocal","testFavorites","error","menuItem","favorites","fav","newFavorite","menuId","updatedFavorites"],"mappings":";;;AAmCO,MAAMA,IAAmBC,EAAsB,CAACC,GAAKC,OAAS;AAAA,EACnE,WAAW,CAAA;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA;AAAA,EAGP,gBAAgB,OAAO,EAAE,QAAAC,GAAQ,QAAAC,QAAa;AAC5C,YAAQ,IAAI,eAAe,EAAE,QAAAD,GAAQ,QAAAC,GAAQ,GAC7CH,EAAI,EAAE,WAAW,IAAM,OAAO,MAAM;AAEpC,QAAI;AAEF,YAAMI,IAAO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EAAE,WAAAH,EAAA,IAAcX,EAAA;AACtB,WAAOW,EAAU,KAAK,CAACC,MAAQA,EAAI,WAAWE,CAAM;AAAA,EACtD;AAAA;AAAA,EAGA,gBAAgB,MAAM;AACpB,IAAAf,EAAI,EAAE,WAAW,CAAA,GAAI,WAAW,IAAO,OAAO,MAAM;AAAA,EACtD;AACF,EAAE;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const c=require("
|
|
2
|
-
//# sourceMappingURL=favoriteStore-
|
|
1
|
+
"use strict";const c=require("./envUtils-C4Yv5Nfg.cjs"),l=require("zustand"),n=require("./apiUtils-DlsnkCO4.cjs"),d=l.create((t,s)=>({favorites:[],isLoading:!1,error:null,fetchFavorites:async({crprCd:e,userId:a})=>{console.log("즐겨찾기 메뉴 요청:",{crprCd:e,userId:a}),t({isLoading:!0,error:null});try{const o=await n.callService(n.getServiceCode("AUTH_BMRK"),{crprCd:e,userId:a});let r=[];if(o?.favorites&&Array.isArray(o.favorites)?r=o.favorites:Array.isArray(o)?r=o:(console.warn("즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다."),r=[]),console.log("즐겨찾기 메뉴 로드 완료:",r),c.isLocal&&r.length===0){const i=[{crprCd:"100",menuGbCd:"CMPRGRP",menuPrntId:"FAV001",menuId:"FAV_TEST001",menuNm:"API 테스트",scrnId:"TEST001",menuNo:1,scrnPath:"/dev/ApiTest",rootMenu:"FAV001",addedAt:new Date().toISOString(),userId:a},{crprCd:"100",menuGbCd:"CMPRGRP",menuPrntId:"FAV001",menuId:"FAV_TEST002",menuNm:"프로젝트 개요",scrnId:"DOCS001",menuNo:2,scrnPath:"/docs/ProjectOverview",rootMenu:"FAV001",addedAt:new Date().toISOString(),userId:a}];t({favorites:i,isLoading:!1,error:null}),console.log("개발 모드: 테스트용 즐겨찾기 데이터 추가")}else t({favorites:r,isLoading:!1,error:null})}catch(o){console.error("즐겨찾기 메뉴 로드 실패:",o),t({error:o instanceof Error?o.message:"즐겨찾기 로드 실패",isLoading:!1})}},addFavorite:async(e,a)=>{const{favorites:o}=s();if(o.some(r=>r.menuId===e.menuId)){console.log("이미 즐겨찾기에 추가된 메뉴입니다:",e.menuNm);return}try{await n.callService(n.getServiceCode("AUTH_BMRK"),{action:"add",crprCd:e.crprCd,userId:a,menuId:e.menuId,menuNm:e.menuNm,scrnPath:e.scrnPath});const r={...e,addedAt:new Date().toISOString(),userId:a};t({favorites:[...o,r]}),console.log("즐겨찾기 추가 완료:",e.menuNm)}catch(r){throw console.error("즐겨찾기 추가 실패:",r),r}},removeFavorite:async(e,a)=>{const{favorites:o}=s();try{await n.callService(n.getServiceCode("AUTH_BMRK"),{action:"remove",crprCd:"100",userId:a,menuId:e});const r=o.filter(i=>i.menuId!==e);t({favorites:r}),console.log("즐겨찾기 제거 완료:",e)}catch(r){throw console.error("즐겨찾기 제거 실패:",r),r}},isFavorite:e=>{const{favorites:a}=s();return a.some(o=>o.menuId===e)},clearFavorites:()=>{t({favorites:[],isLoading:!1,error:null})}}));exports.useFavoriteStore=d;
|
|
2
|
+
//# sourceMappingURL=favoriteStore-DOz2rAJu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favoriteStore-DOz2rAJu.cjs","sources":["../../src/stores/favoriteStore.ts"],"sourcesContent":["import { isLocal } from \"@/utils/envUtils\";\r\nimport { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\nimport type { MenuItem } from \"./menuModelStore\";\r\n\r\n// 즐겨찾기 메뉴 타입 정의\r\nexport interface FavoriteMenuItem extends MenuItem {\r\n addedAt: string; // 즐겨찾기 추가 시간\r\n userId: string; // 사용자 ID\r\n}\r\n\r\n// 즐겨찾기 스토어 타입 정의\r\nexport interface FavoriteStore {\r\n favorites: FavoriteMenuItem[];\r\n isLoading: boolean;\r\n error: string | null;\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: (params: { crprCd: string; userId: string }) => Promise<void>;\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: (menuItem: MenuItem, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: (menuId: string, userId: string) => Promise<void>;\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => boolean;\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => void;\r\n}\r\n\r\n// 즐겨찾기 스토어 생성\r\nexport const useFavoriteStore = create<FavoriteStore>((set, get) => ({\r\n favorites: [],\r\n isLoading: false,\r\n error: null,\r\n\r\n // 즐겨찾기 메뉴 가져오기\r\n fetchFavorites: async ({ crprCd, userId }) => {\r\n console.log(\"즐겨찾기 메뉴 요청:\", { crprCd, userId });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n // 서버에서 즐겨찾기 메뉴 가져오기\r\n const data = await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n crprCd,\r\n userId,\r\n });\r\n\r\n let favoritesList: FavoriteMenuItem[] = [];\r\n\r\n if (data?.favorites && Array.isArray(data.favorites)) {\r\n favoritesList = data.favorites;\r\n } else if (Array.isArray(data)) {\r\n favoritesList = data;\r\n } else {\r\n console.warn(\"즐겨찾기 데이터가 비어있거나 예상과 다른 구조입니다.\");\r\n favoritesList = [];\r\n }\r\n\r\n console.log(\"즐겨찾기 메뉴 로드 완료:\", favoritesList);\r\n\r\n // 개발 모드에서 테스트용 즐겨찾기 데이터 추가\r\n if (isLocal && favoritesList.length === 0) {\r\n const testFavorites: FavoriteMenuItem[] = [\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST001\",\r\n menuNm: \"API 테스트\",\r\n scrnId: \"TEST001\",\r\n menuNo: 1,\r\n scrnPath: \"/dev/ApiTest\",\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n {\r\n crprCd: \"100\",\r\n menuGbCd: \"CMPRGRP\",\r\n menuPrntId: \"FAV001\",\r\n menuId: \"FAV_TEST002\",\r\n menuNm: \"프로젝트 개요\",\r\n scrnId: \"DOCS001\",\r\n menuNo: 2,\r\n scrnPath: \"/docs/ProjectOverview\",\r\n rootMenu: \"FAV001\",\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n },\r\n ];\r\n set({ favorites: testFavorites, isLoading: false, error: null });\r\n console.log(\"개발 모드: 테스트용 즐겨찾기 데이터 추가\");\r\n } else {\r\n set({ favorites: favoritesList, isLoading: false, error: null });\r\n }\r\n } catch (error) {\r\n console.error(\"즐겨찾기 메뉴 로드 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"즐겨찾기 로드 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 즐겨찾기 추가\r\n addFavorite: async (menuItem: MenuItem, userId: string) => {\r\n const { favorites } = get();\r\n\r\n // 이미 즐겨찾기에 있는지 확인\r\n if (favorites.some((fav) => fav.menuId === menuItem.menuId)) {\r\n console.log(\"이미 즐겨찾기에 추가된 메뉴입니다:\", menuItem.menuNm);\r\n return;\r\n }\r\n\r\n try {\r\n // 서버에 즐겨찾기 추가 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"add\",\r\n crprCd: menuItem.crprCd,\r\n userId,\r\n menuId: menuItem.menuId,\r\n menuNm: menuItem.menuNm,\r\n scrnPath: menuItem.scrnPath,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const newFavorite: FavoriteMenuItem = {\r\n ...menuItem,\r\n addedAt: new Date().toISOString(),\r\n userId,\r\n };\r\n\r\n set({ favorites: [...favorites, newFavorite] });\r\n console.log(\"즐겨찾기 추가 완료:\", menuItem.menuNm);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 추가 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 제거\r\n removeFavorite: async (menuId: string, userId: string) => {\r\n const { favorites } = get();\r\n\r\n try {\r\n // 서버에 즐겨찾기 제거 요청\r\n await callService(getServiceCode(\"AUTH_BMRK\"), {\r\n action: \"remove\",\r\n crprCd: \"100\", // 기본값\r\n userId,\r\n menuId,\r\n });\r\n\r\n // 로컬 상태 업데이트\r\n const updatedFavorites = favorites.filter((fav) => fav.menuId !== menuId);\r\n set({ favorites: updatedFavorites });\r\n console.log(\"즐겨찾기 제거 완료:\", menuId);\r\n } catch (error) {\r\n console.error(\"즐겨찾기 제거 실패:\", error);\r\n throw error;\r\n }\r\n },\r\n\r\n // 즐겨찾기 여부 확인\r\n isFavorite: (menuId: string) => {\r\n const { favorites } = get();\r\n return favorites.some((fav) => fav.menuId === menuId);\r\n },\r\n\r\n // 즐겨찾기 초기화\r\n clearFavorites: () => {\r\n set({ favorites: [], isLoading: false, error: null });\r\n },\r\n}));\r\n"],"names":["useFavoriteStore","create","set","get","crprCd","userId","data","callService","getServiceCode","favoritesList","isLocal","testFavorites","error","menuItem","favorites","fav","newFavorite","menuId","updatedFavorites"],"mappings":"kHAmCaA,EAAmBC,EAAAA,OAAsB,CAACC,EAAKC,KAAS,CACnE,UAAW,CAAA,EACX,UAAW,GACX,MAAO,KAGP,eAAgB,MAAO,CAAE,OAAAC,EAAQ,OAAAC,KAAa,CAC5C,QAAQ,IAAI,cAAe,CAAE,OAAAD,EAAQ,OAAAC,EAAQ,EAC7CH,EAAI,CAAE,UAAW,GAAM,MAAO,KAAM,EAEpC,GAAI,CAEF,MAAMI,EAAO,MAAMC,EAAAA,YAAYC,EAAAA,eAAe,WAAW,EAAG,CAC1D,OAAAJ,EACA,OAAAC,CAAA,CACD,EAED,IAAII,EAAoC,CAAA,EAcxC,GAZIH,GAAM,WAAa,MAAM,QAAQA,EAAK,SAAS,EACjDG,EAAgBH,EAAK,UACZ,MAAM,QAAQA,CAAI,EAC3BG,EAAgBH,GAEhB,QAAQ,KAAK,+BAA+B,EAC5CG,EAAgB,CAAA,GAGlB,QAAQ,IAAI,iBAAkBA,CAAa,EAGv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,OAASD,EAAO,CACd,cAAQ,MAAM,cAAeA,CAAK,EAC5BA,CACR,CACF,EAGA,eAAgB,MAAOK,EAAgBZ,IAAmB,CACxD,KAAM,CAAE,UAAAS,CAAA,EAAcX,EAAA,EAEtB,GAAI,CAEF,MAAMI,EAAAA,YAAYC,iBAAe,WAAW,EAAG,CAC7C,OAAQ,SACR,OAAQ,MACR,OAAAH,EACA,OAAAY,CAAA,CACD,EAGD,MAAMC,EAAmBJ,EAAU,OAAQC,GAAQA,EAAI,SAAWE,CAAM,EACxEf,EAAI,CAAE,UAAWgB,EAAkB,EACnC,QAAQ,IAAI,cAAeD,CAAM,CACnC,OAASL,EAAO,CACd,cAAQ,MAAM,cAAeA,CAAK,EAC5BA,CACR,CACF,EAGA,WAAaK,GAAmB,CAC9B,KAAM,CAAE,UAAAH,CAAA,EAAcX,EAAA,EACtB,OAAOW,EAAU,KAAMC,GAAQA,EAAI,SAAWE,CAAM,CACtD,EAGA,eAAgB,IAAM,CACpBf,EAAI,CAAE,UAAW,CAAA,EAAI,UAAW,GAAO,MAAO,KAAM,CACtD,CACF,EAAE"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const c=require("./apiUtils-DlsnkCO4.cjs"),P=require("zustand"),I=P.create((r,n)=>({popups:[],activePopupId:null,isLoading:!1,error:null,openPopup:async(u,t,e)=>{r({isLoading:!0,error:null});try{let p=null;const s=await c.callService(c.getServiceCode("SRCH_POPU"),{crprCd:c.getUserInfo()?.crprCd,popuCd:u});p=s?.mstr;const i=s?.dtls||[];if(!p||!p.popuUrl){const o=`팝업 정보를 찾을 수 없습니다: ${u}`;throw console.error(o),new Error(o)}const d=(o=>`/src/pages/views/popup/${o}`)(p.popuUrl),a={popupId:`popup_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,popupCode:u,popupTitle:e?.title||p.popuNm||"팝업",popupUrl:d,popupParams:t,width:p.popuWdth||800,height:p.popuHght||600,resizable:!0,draggable:!0,buttonList:i,config:e},l=n().popups.find(o=>o.popupCode===u);if(l){r({activePopupId:l.popupId,popups:n().popups.map(o=>o.popupId===l.popupId?{...o,config:e}:o),isLoading:!1});return}r(o=>({popups:[...o.popups,a],activePopupId:a.popupId,isLoading:!1}))}catch(p){r({error:p instanceof Error?p.message:"팝업 열기 실패",isLoading:!1})}},closePopup:u=>{const{popups:t,activePopupId:e}=n(),p=t.filter(i=>i.popupId!==u);let s=e;e===u&&(s=p.length>0?p[p.length-1].popupId:null),r({popups:p,activePopupId:s})},closeAllPopups:()=>{r({popups:[],activePopupId:null})},setActivePopup:u=>{r({activePopupId:u})},updatePopupConfig:(u,t)=>{r(e=>({popups:e.popups.map(p=>p.popupId===u?{...p,config:{...p.config,...t}}:p)}))}}));exports.usePopupStore=I;
|
|
2
|
+
//# sourceMappingURL=popupStore-Cm5utmtA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popupStore-Cm5utmtA.cjs","sources":["../../src/stores/popupStore.ts"],"sourcesContent":["import { getUserInfo } from \"@/utils/userUtils\";\r\nimport { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\n\r\n// 팝업 아이템 타입 정의\r\nexport interface PopupItem {\r\n popupId: string; // 팝업 ID\r\n popupCode: string; // 팝업 코드\r\n popupTitle: string; // 팝업 제목\r\n popupUrl: string; // 팝업 프로그램 URL\r\n popupParams?: any; // 팝업 파라미터\r\n buttonList?: any[]; // 버튼 목록\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n config?: PopupConfig; // 팝업 설정\r\n close?: () => void; // 팝업 닫기 함수\r\n}\r\n\r\n// 팝업 스토어 타입 정의\r\nexport interface PopupStore {\r\n popups: PopupItem[]; // 열린 팝업 목록\r\n activePopupId: string | null; // 현재 활성 팝업 ID\r\n isLoading: boolean; // 로딩 상태\r\n error: string | null; // 에러 상태\r\n\r\n // 팝업 관련 액션들\r\n openPopup: (\r\n popupCode: string,\r\n data?: any,\r\n config?: PopupConfig\r\n ) => Promise<void>;\r\n closePopup: (popupId: string) => void;\r\n closeAllPopups: () => void;\r\n setActivePopup: (popupId: string) => void;\r\n\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => void;\r\n}\r\n\r\nexport interface PopupButton {\r\n key: string; // 버튼 고유 키\r\n text: string; // 버튼 텍스트\r\n type?: \"primary\" | \"default\" | \"dashed\" | \"link\" | \"text\"; // 버튼 타입\r\n danger?: boolean; // 위험 버튼 여부\r\n disabled?: boolean; // 비활성화 여부\r\n icon?: string; // 아이콘 (Ant Design 아이콘명)\r\n onClick?: (popupData?: any) => void | Promise<void>; // 클릭 이벤트\r\n}\r\n\r\n/**\r\n * 팝업 설정 타입 정의\r\n */\r\nexport interface PopupConfig {\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n title?: string; // 팝업 제목\r\n buttons?: PopupButton[]; // 팝업 버튼들\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n closable?: boolean; // 닫기 버튼 표시 여부\r\n maskClosable?: boolean; // 마스크 클릭 시 닫기 여부\r\n destroyOnClose?: boolean; // 닫을 때 컴포넌트 파괴 여부\r\n searchBox?: {\r\n reqArea: any;\r\n subArea?: any;\r\n style?: any;\r\n };\r\n /**\r\n * 팝업 콜백\r\n * 팝업 콜백은 팝업이 닫힐 때 호출되는 함수입니다.\r\n */\r\n callback?: (callbackParams?: any) => void;\r\n}\r\n\r\n/**\r\n * 팝업 내부 뷰 컴포넌트 타입\r\n */\r\nexport interface PopupViewProps {\r\n /**\r\n * 팝업정보\r\n */\r\n popup?: PopupItem;\r\n /** 팝업 이벤트 전달 프로퍼티 */\r\n popupEvent?: any;\r\n /** 팝업 닫기 이벤트 전달 프로퍼티 */\r\n onClose?: () => void;\r\n}\r\n\r\n// 팝업 스토어 생성\r\nexport const usePopupStore = create<PopupStore>((set, get) => ({\r\n popups: [],\r\n activePopupId: null,\r\n isLoading: false,\r\n error: null,\r\n\r\n // 팝업 열기\r\n openPopup: async (popupCode: string, data?: any, config?: PopupConfig) => {\r\n //console.log(\"팝업 열기 요청:\", { popupCode, data, config });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n //console.log(\"팝업 열기 시작:\", popupCode);\r\n\r\n // 개발 환경에서는 모의 데이터 사용\r\n let popupInfo: any = null;\r\n\r\n const response = await callService(getServiceCode(\"SRCH_POPU\"), {\r\n crprCd: getUserInfo()?.crprCd,\r\n popuCd: popupCode,\r\n });\r\n //console.log(\"팝업 정보 조회 결과:\", response);\r\n\r\n // 응답 구조 파싱: { mstr: {...}, dtls: [...] }\r\n popupInfo = response?.mstr;\r\n const buttonList = response?.dtls || [];\r\n\r\n //console.info(\"popupInfo:\", popupInfo);\r\n\r\n if (!popupInfo || !popupInfo.popuUrl) {\r\n const errorMsg = `팝업 정보를 찾을 수 없습니다: ${popupCode}`;\r\n console.error(errorMsg);\r\n throw new Error(errorMsg);\r\n }\r\n\r\n //console.log(\"파싱된 팝업 정보:\", popupInfo);\r\n //console.log(\"버튼 목록:\", buttonList);\r\n\r\n // 팝업 URL 경로 변환: 서버 경로 -> 클라이언트 경로\r\n const convertPopupUrl = (serverUrl: string): string => {\r\n // 서버에서 받은 경로: \"cm/CMAuthMstrP01\"\r\n // 클라이언트에서 사용할 경로: \"/src/pages/views/popup/cm/CMAuthMstrP01\"\r\n return `/src/pages/views/popup/${serverUrl}`;\r\n };\r\n\r\n const convertedPopupUrl = convertPopupUrl(popupInfo.popuUrl);\r\n //console.log(\"변환된 팝업 URL:\", convertedPopupUrl);\r\n\r\n // 팝업 아이템 생성\r\n const popupItem: PopupItem = {\r\n popupId: `popup_${Date.now()}_${Math.random()\r\n .toString(36)\r\n .substr(2, 9)}`,\r\n popupCode: popupCode,\r\n //config.title을 통해 팝업 제목 변경 가능\r\n popupTitle: config?.title || popupInfo.popuNm || \"팝업\",\r\n popupUrl: convertedPopupUrl,\r\n popupParams: data,\r\n width: popupInfo.popuWdth || 800,\r\n height: popupInfo.popuHght || 600,\r\n resizable: true,\r\n draggable: true,\r\n buttonList: buttonList, // 버튼 목록 추가\r\n config: config,\r\n };\r\n\r\n //console.log(\"생성된 팝업 아이템:\", popupItem);\r\n\r\n // 이미 같은 팝업이 열려있는지 확인\r\n const existingPopup = get().popups.find((p) => p.popupCode === popupCode);\r\n if (existingPopup) {\r\n //console.log(\"기존 팝업 업데이트:\", existingPopup.popupId);\r\n // 기존 팝업을 활성화하고 데이터 업데이트\r\n set({\r\n activePopupId: existingPopup.popupId,\r\n popups: get().popups.map((p) =>\r\n p.popupId === existingPopup.popupId ? { ...p, config: config } : p\r\n ),\r\n isLoading: false,\r\n });\r\n return;\r\n }\r\n\r\n // 새 팝업 추가\r\n //console.log(\"새 팝업 추가:\", popupItem.popupId);\r\n set((state) => ({\r\n popups: [...state.popups, popupItem],\r\n activePopupId: popupItem.popupId,\r\n isLoading: false,\r\n }));\r\n\r\n //console.log(\"팝업 열기 완료:\", popupItem);\r\n } catch (error) {\r\n // console.error(\"팝업 열기 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"팝업 열기 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 팝업 닫기\r\n closePopup: (popupId: string) => {\r\n const { popups, activePopupId } = get();\r\n const newPopups = popups.filter((p) => p.popupId !== popupId);\r\n\r\n // 닫힌 팝업이 현재 활성 팝업이었다면 다른 팝업을 활성화\r\n let newActivePopupId = activePopupId;\r\n if (activePopupId === popupId) {\r\n newActivePopupId =\r\n newPopups.length > 0 ? newPopups[newPopups.length - 1].popupId : null;\r\n }\r\n\r\n set({\r\n popups: newPopups,\r\n activePopupId: newActivePopupId,\r\n });\r\n },\r\n\r\n // 모든 팝업 닫기\r\n closeAllPopups: () => {\r\n set({\r\n popups: [],\r\n activePopupId: null,\r\n });\r\n },\r\n\r\n // 활성 팝업 설정\r\n setActivePopup: (popupId: string) => {\r\n set({ activePopupId: popupId });\r\n },\r\n\r\n // 팝업 설정 업데이트\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => {\r\n set((state) => ({\r\n popups: state.popups.map((p) =>\r\n p.popupId === popupId ? { ...p, config: { ...p.config, ...config } } : p\r\n ),\r\n }));\r\n },\r\n}));\r\n"],"names":["usePopupStore","create","set","get","popupCode","data","config","popupInfo","response","callService","getServiceCode","getUserInfo","buttonList","errorMsg","convertedPopupUrl","serverUrl","popupItem","existingPopup","p","state","error","popupId","popups","activePopupId","newPopups","newActivePopupId"],"mappings":"6EA2FaA,EAAgBC,EAAAA,OAAmB,CAACC,EAAKC,KAAS,CAC7D,OAAQ,CAAA,EACR,cAAe,KACf,UAAW,GACX,MAAO,KAGP,UAAW,MAAOC,EAAmBC,EAAYC,IAAyB,CAExEJ,EAAI,CAAE,UAAW,GAAM,MAAO,KAAM,EAEpC,GAAI,CAIF,IAAIK,EAAiB,KAErB,MAAMC,EAAW,MAAMC,EAAAA,YAAYC,EAAAA,eAAe,WAAW,EAAG,CAC9D,OAAQC,EAAAA,eAAe,OACvB,OAAQP,CAAA,CACT,EAIDG,EAAYC,GAAU,KACtB,MAAMI,EAAaJ,GAAU,MAAQ,CAAA,EAIrC,GAAI,CAACD,GAAa,CAACA,EAAU,QAAS,CACpC,MAAMM,EAAW,qBAAqBT,CAAS,GAC/C,cAAQ,MAAMS,CAAQ,EAChB,IAAI,MAAMA,CAAQ,CAC1B,CAYA,MAAMC,GANmBC,GAGhB,0BAA0BA,CAAS,IAGFR,EAAU,OAAO,EAIrDS,EAAuB,CAC3B,QAAS,SAAS,KAAK,IAAA,CAAK,IAAI,KAAK,OAAA,EAClC,SAAS,EAAE,EACX,OAAO,EAAG,CAAC,CAAC,GACf,UAAAZ,EAEA,WAAYE,GAAQ,OAASC,EAAU,QAAU,KACjD,SAAUO,EACV,YAAaT,EACb,MAAOE,EAAU,UAAY,IAC7B,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@@
|
|
|
1
|
+
import { c as d, ag as P, av as g } from "./apiUtils-IzgDPO-1.js";
|
|
2
|
+
import { create as I } from "zustand";
|
|
3
|
+
const h = I((u, n) => ({
|
|
4
|
+
popups: [],
|
|
5
|
+
activePopupId: null,
|
|
6
|
+
isLoading: !1,
|
|
7
|
+
error: null,
|
|
8
|
+
// 팝업 열기
|
|
9
|
+
openPopup: async (r, t, e) => {
|
|
10
|
+
u({ isLoading: !0, error: null });
|
|
11
|
+
try {
|
|
12
|
+
let p = null;
|
|
13
|
+
const s = await d(P("SRCH_POPU"), {
|
|
14
|
+
crprCd: g()?.crprCd,
|
|
15
|
+
popuCd: r
|
|
16
|
+
});
|
|
17
|
+
p = s?.mstr;
|
|
18
|
+
const a = s?.dtls || [];
|
|
19
|
+
if (!p || !p.popuUrl) {
|
|
20
|
+
const o = `팝업 정보를 찾을 수 없습니다: ${r}`;
|
|
21
|
+
throw console.error(o), new Error(o);
|
|
22
|
+
}
|
|
23
|
+
const c = ((o) => `/src/pages/views/popup/${o}`)(p.popuUrl), l = {
|
|
24
|
+
popupId: `popup_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
|
|
25
|
+
popupCode: r,
|
|
26
|
+
//config.title을 통해 팝업 제목 변경 가능
|
|
27
|
+
popupTitle: e?.title || p.popuNm || "팝업",
|
|
28
|
+
popupUrl: c,
|
|
29
|
+
popupParams: t,
|
|
30
|
+
width: p.popuWdth || 800,
|
|
31
|
+
height: p.popuHght || 600,
|
|
32
|
+
resizable: !0,
|
|
33
|
+
draggable: !0,
|
|
34
|
+
buttonList: a,
|
|
35
|
+
// 버튼 목록 추가
|
|
36
|
+
config: e
|
|
37
|
+
}, i = n().popups.find((o) => o.popupCode === r);
|
|
38
|
+
if (i) {
|
|
39
|
+
u({
|
|
40
|
+
activePopupId: i.popupId,
|
|
41
|
+
popups: n().popups.map(
|
|
42
|
+
(o) => o.popupId === i.popupId ? { ...o, config: e } : o
|
|
43
|
+
),
|
|
44
|
+
isLoading: !1
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
u((o) => ({
|
|
49
|
+
popups: [...o.popups, l],
|
|
50
|
+
activePopupId: l.popupId,
|
|
51
|
+
isLoading: !1
|
|
52
|
+
}));
|
|
53
|
+
} catch (p) {
|
|
54
|
+
u({
|
|
55
|
+
error: p instanceof Error ? p.message : "팝업 열기 실패",
|
|
56
|
+
isLoading: !1
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
// 팝업 닫기
|
|
61
|
+
closePopup: (r) => {
|
|
62
|
+
const { popups: t, activePopupId: e } = n(), p = t.filter((a) => a.popupId !== r);
|
|
63
|
+
let s = e;
|
|
64
|
+
e === r && (s = p.length > 0 ? p[p.length - 1].popupId : null), u({
|
|
65
|
+
popups: p,
|
|
66
|
+
activePopupId: s
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
// 모든 팝업 닫기
|
|
70
|
+
closeAllPopups: () => {
|
|
71
|
+
u({
|
|
72
|
+
popups: [],
|
|
73
|
+
activePopupId: null
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
// 활성 팝업 설정
|
|
77
|
+
setActivePopup: (r) => {
|
|
78
|
+
u({ activePopupId: r });
|
|
79
|
+
},
|
|
80
|
+
// 팝업 설정 업데이트
|
|
81
|
+
updatePopupConfig: (r, t) => {
|
|
82
|
+
u((e) => ({
|
|
83
|
+
popups: e.popups.map(
|
|
84
|
+
(p) => p.popupId === r ? { ...p, config: { ...p.config, ...t } } : p
|
|
85
|
+
)
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
89
|
+
export {
|
|
90
|
+
h as u
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=popupStore-D6b6b5-T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popupStore-D6b6b5-T.js","sources":["../../src/stores/popupStore.ts"],"sourcesContent":["import { getUserInfo } from \"@/utils/userUtils\";\r\nimport { create } from \"zustand\";\r\nimport { callService } from \"../utils/apiUtils\";\r\nimport { getServiceCode } from \"../utils/serviceConfig\";\r\n\r\n// 팝업 아이템 타입 정의\r\nexport interface PopupItem {\r\n popupId: string; // 팝업 ID\r\n popupCode: string; // 팝업 코드\r\n popupTitle: string; // 팝업 제목\r\n popupUrl: string; // 팝업 프로그램 URL\r\n popupParams?: any; // 팝업 파라미터\r\n buttonList?: any[]; // 버튼 목록\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n config?: PopupConfig; // 팝업 설정\r\n close?: () => void; // 팝업 닫기 함수\r\n}\r\n\r\n// 팝업 스토어 타입 정의\r\nexport interface PopupStore {\r\n popups: PopupItem[]; // 열린 팝업 목록\r\n activePopupId: string | null; // 현재 활성 팝업 ID\r\n isLoading: boolean; // 로딩 상태\r\n error: string | null; // 에러 상태\r\n\r\n // 팝업 관련 액션들\r\n openPopup: (\r\n popupCode: string,\r\n data?: any,\r\n config?: PopupConfig\r\n ) => Promise<void>;\r\n closePopup: (popupId: string) => void;\r\n closeAllPopups: () => void;\r\n setActivePopup: (popupId: string) => void;\r\n\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => void;\r\n}\r\n\r\nexport interface PopupButton {\r\n key: string; // 버튼 고유 키\r\n text: string; // 버튼 텍스트\r\n type?: \"primary\" | \"default\" | \"dashed\" | \"link\" | \"text\"; // 버튼 타입\r\n danger?: boolean; // 위험 버튼 여부\r\n disabled?: boolean; // 비활성화 여부\r\n icon?: string; // 아이콘 (Ant Design 아이콘명)\r\n onClick?: (popupData?: any) => void | Promise<void>; // 클릭 이벤트\r\n}\r\n\r\n/**\r\n * 팝업 설정 타입 정의\r\n */\r\nexport interface PopupConfig {\r\n width?: number; // 팝업 너비\r\n height?: number; // 팝업 높이\r\n title?: string; // 팝업 제목\r\n buttons?: PopupButton[]; // 팝업 버튼들\r\n resizable?: boolean; // 크기 조절 가능 여부\r\n draggable?: boolean; // 드래그 가능 여부\r\n closable?: boolean; // 닫기 버튼 표시 여부\r\n maskClosable?: boolean; // 마스크 클릭 시 닫기 여부\r\n destroyOnClose?: boolean; // 닫을 때 컴포넌트 파괴 여부\r\n searchBox?: {\r\n reqArea: any;\r\n subArea?: any;\r\n style?: any;\r\n };\r\n /**\r\n * 팝업 콜백\r\n * 팝업 콜백은 팝업이 닫힐 때 호출되는 함수입니다.\r\n */\r\n callback?: (callbackParams?: any) => void;\r\n}\r\n\r\n/**\r\n * 팝업 내부 뷰 컴포넌트 타입\r\n */\r\nexport interface PopupViewProps {\r\n /**\r\n * 팝업정보\r\n */\r\n popup?: PopupItem;\r\n /** 팝업 이벤트 전달 프로퍼티 */\r\n popupEvent?: any;\r\n /** 팝업 닫기 이벤트 전달 프로퍼티 */\r\n onClose?: () => void;\r\n}\r\n\r\n// 팝업 스토어 생성\r\nexport const usePopupStore = create<PopupStore>((set, get) => ({\r\n popups: [],\r\n activePopupId: null,\r\n isLoading: false,\r\n error: null,\r\n\r\n // 팝업 열기\r\n openPopup: async (popupCode: string, data?: any, config?: PopupConfig) => {\r\n //console.log(\"팝업 열기 요청:\", { popupCode, data, config });\r\n set({ isLoading: true, error: null });\r\n\r\n try {\r\n //console.log(\"팝업 열기 시작:\", popupCode);\r\n\r\n // 개발 환경에서는 모의 데이터 사용\r\n let popupInfo: any = null;\r\n\r\n const response = await callService(getServiceCode(\"SRCH_POPU\"), {\r\n crprCd: getUserInfo()?.crprCd,\r\n popuCd: popupCode,\r\n });\r\n //console.log(\"팝업 정보 조회 결과:\", response);\r\n\r\n // 응답 구조 파싱: { mstr: {...}, dtls: [...] }\r\n popupInfo = response?.mstr;\r\n const buttonList = response?.dtls || [];\r\n\r\n //console.info(\"popupInfo:\", popupInfo);\r\n\r\n if (!popupInfo || !popupInfo.popuUrl) {\r\n const errorMsg = `팝업 정보를 찾을 수 없습니다: ${popupCode}`;\r\n console.error(errorMsg);\r\n throw new Error(errorMsg);\r\n }\r\n\r\n //console.log(\"파싱된 팝업 정보:\", popupInfo);\r\n //console.log(\"버튼 목록:\", buttonList);\r\n\r\n // 팝업 URL 경로 변환: 서버 경로 -> 클라이언트 경로\r\n const convertPopupUrl = (serverUrl: string): string => {\r\n // 서버에서 받은 경로: \"cm/CMAuthMstrP01\"\r\n // 클라이언트에서 사용할 경로: \"/src/pages/views/popup/cm/CMAuthMstrP01\"\r\n return `/src/pages/views/popup/${serverUrl}`;\r\n };\r\n\r\n const convertedPopupUrl = convertPopupUrl(popupInfo.popuUrl);\r\n //console.log(\"변환된 팝업 URL:\", convertedPopupUrl);\r\n\r\n // 팝업 아이템 생성\r\n const popupItem: PopupItem = {\r\n popupId: `popup_${Date.now()}_${Math.random()\r\n .toString(36)\r\n .substr(2, 9)}`,\r\n popupCode: popupCode,\r\n //config.title을 통해 팝업 제목 변경 가능\r\n popupTitle: config?.title || popupInfo.popuNm || \"팝업\",\r\n popupUrl: convertedPopupUrl,\r\n popupParams: data,\r\n width: popupInfo.popuWdth || 800,\r\n height: popupInfo.popuHght || 600,\r\n resizable: true,\r\n draggable: true,\r\n buttonList: buttonList, // 버튼 목록 추가\r\n config: config,\r\n };\r\n\r\n //console.log(\"생성된 팝업 아이템:\", popupItem);\r\n\r\n // 이미 같은 팝업이 열려있는지 확인\r\n const existingPopup = get().popups.find((p) => p.popupCode === popupCode);\r\n if (existingPopup) {\r\n //console.log(\"기존 팝업 업데이트:\", existingPopup.popupId);\r\n // 기존 팝업을 활성화하고 데이터 업데이트\r\n set({\r\n activePopupId: existingPopup.popupId,\r\n popups: get().popups.map((p) =>\r\n p.popupId === existingPopup.popupId ? { ...p, config: config } : p\r\n ),\r\n isLoading: false,\r\n });\r\n return;\r\n }\r\n\r\n // 새 팝업 추가\r\n //console.log(\"새 팝업 추가:\", popupItem.popupId);\r\n set((state) => ({\r\n popups: [...state.popups, popupItem],\r\n activePopupId: popupItem.popupId,\r\n isLoading: false,\r\n }));\r\n\r\n //console.log(\"팝업 열기 완료:\", popupItem);\r\n } catch (error) {\r\n // console.error(\"팝업 열기 실패:\", error);\r\n set({\r\n error: error instanceof Error ? error.message : \"팝업 열기 실패\",\r\n isLoading: false,\r\n });\r\n }\r\n },\r\n\r\n // 팝업 닫기\r\n closePopup: (popupId: string) => {\r\n const { popups, activePopupId } = get();\r\n const newPopups = popups.filter((p) => p.popupId !== popupId);\r\n\r\n // 닫힌 팝업이 현재 활성 팝업이었다면 다른 팝업을 활성화\r\n let newActivePopupId = activePopupId;\r\n if (activePopupId === popupId) {\r\n newActivePopupId =\r\n newPopups.length > 0 ? newPopups[newPopups.length - 1].popupId : null;\r\n }\r\n\r\n set({\r\n popups: newPopups,\r\n activePopupId: newActivePopupId,\r\n });\r\n },\r\n\r\n // 모든 팝업 닫기\r\n closeAllPopups: () => {\r\n set({\r\n popups: [],\r\n activePopupId: null,\r\n });\r\n },\r\n\r\n // 활성 팝업 설정\r\n setActivePopup: (popupId: string) => {\r\n set({ activePopupId: popupId });\r\n },\r\n\r\n // 팝업 설정 업데이트\r\n updatePopupConfig: (popupId: string, config: Partial<PopupConfig>) => {\r\n set((state) => ({\r\n popups: state.popups.map((p) =>\r\n p.popupId === popupId ? { ...p, config: { ...p.config, ...config } } : p\r\n ),\r\n }));\r\n },\r\n}));\r\n"],"names":["usePopupStore","create","set","get","popupCode","data","config","popupInfo","response","callService","getServiceCode","getUserInfo","buttonList","errorMsg","convertedPopupUrl","serverUrl","popupItem","existingPopup","p","state","error","popupId","popups","activePopupId","newPopups","newActivePopupId"],"mappings":";;AA2FO,MAAMA,IAAgBC,EAAmB,CAACC,GAAKC,OAAS;AAAA,EAC7D,QAAQ,CAAA;AAAA,EACR,eAAe;AAAA,EACf,WAAW;AAAA,EACX,OAAO;AAAA;AAAA,EAGP,WAAW,OAAOC,GAAmBC,GAAYC,MAAyB;AAExE,IAAAJ,EAAI,EAAE,WAAW,IAAM,OAAO,MAAM;AAEpC,QAAI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zB,WAAW;AAAA,MAAA,EACX;AAAA,IAGJ,SAASI,GAAO;AAEd,MAAAlB,EAAI;AAAA,QACF,OAAOkB,aAAiB,QAAQA,EAAM,UAAU;AAAA,QAChD,WAAW;AAAA,MAAA,CACZ;AAAA,IACH;AAAA,EACF;AAAA;AAAA,EAGA,YAAY,CAACC,MAAoB;AAC/B,UAAM,EAAE,QAAAC,GAAQ,eAAAC,EAAA,IAAkBpB,EAAA,GAC5BqB,IAAYF,EAAO,OAAO,CAACJ,MAAMA,EAAE,YAAYG,CAAO;AAG5D,QAAII,IAAmBF;AACvB,IAAIA,MAAkBF,MACpBI,IACED,EAAU,SAAS,IAAIA,EAAUA,EAAU,SAAS,CAAC,EAAE,UAAU,OAGrEtB,EAAI;AAAA,MACF,QAAQsB;AAAA,MACR,eAAeC;AAAA,IAAA,CAChB;AAAA,EACH;AAAA;AAAA,EAGA,gBAAgB,MAAM;AACpB,IAAAvB,EAAI;AAAA,MACF,QAAQ,CAAA;AAAA,MACR,eAAe;AAAA,IAAA,CAChB;AAAA,EACH;AAAA;AAAA,EAGA,gBAAgB,CAACmB,MAAoB;AACnC,IAAAnB,EAAI,EAAE,eAAemB,GAAS;AAAA,EAChC;AAAA;AAAA,EAGA,mBAAmB,CAACA,GAAiBf,MAAiC;AACpE,IAAAJ,EAAI,CAACiB,OAAW;AAAA,MACd,QAAQA,EAAM,OAAO;AAAA,QAAI,CAAC,MACxB,EAAE,YAAYE,IAAU,EAAE,GAAG,GAAG,QAAQ,EAAE,GAAG,EAAE,QAAQ,GAAGf,EAAA,MAAa;AAAA,MAAA;AAAA,IACzE,EACA;AAAA,EACJ;AACF,EAAE;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const P=require("./jsx-runtime-CeSfJrVB.cjs"),x=require("./codeStore-HfLmmkAL.cjs"),c=require("react"),v=require("./popupStore-Cm5utmtA.cjs"),a=c.createContext(void 0),h=({children:o})=>{const{codeData:e,isLoading:t,error:u,lastUpdated:s,getCodeList:d,getCodeListByOption:i,getCodeName:C,getCodeColor:p,getCodeByOption:n,getAvailableGroupCodes:m,getGridLookup:g,fetchCommonCodes:L}=x.useCodeStore(),l={codeData:e,isLoading:t,error:u,lastUpdated:s,getCodeList:d,getCodeListByOption:i,getCodeName:C,getCodeColor:p,getCodeByOption:n,getAvailableGroupCodes:m,getGridLookup:g,refreshCodes:L};return P.jsxRuntimeExports.jsx(a.Provider,{value:l,children:o})},r=()=>{const o=c.useContext(a);if(o===void 0)throw new Error("useCommonCode must be used within a CommonCodeProvider");return o},y=()=>{const{getCodeList:o,isLoading:e,error:t}=r();return{getCodeList:o,isLoading:e,error:t}},w=()=>{const{getCodeName:o,isLoading:e,error:t}=r();return{getCodeName:o,isLoading:e,error:t}},k=()=>{const{getCodeColor:o,isLoading:e,error:t}=r();return{getCodeColor:o,isLoading:e,error:t}},B=()=>{const{getCodeListByOption:o,isLoading:e,error:t}=r();return{getCodeListByOption:o,isLoading:e,error:t}},G=()=>{const{getGridLookup:o,isLoading:e,error:t}=r();return{getGridLookup:o,isLoading:e,error:t}},O=()=>!1,f=()=>{const{popups:o,activePopupId:e,setActivePopup:t,closePopup:u,openPopup:s}=v.usePopupStore(),d=c.useCallback(async(i,C,p)=>{try{await s(i,C,p)}catch(n){throw console.error("팝업 열기 실패:",n),n}},[s]);return{popups:o,activePopupId:e,setActivePopup:t,closePopup:u,showPopup:d,isPopup:o.length>0}};exports.CommonCodeProvider=h;exports.useCodeColor=k;exports.useCodeList=y;exports.useCodeListByOption=B;exports.useCodeName=w;exports.useCommonCode=r;exports.useGridLookup=G;exports.usePopup=f;exports.usePopupContext=O;
|
|
2
|
+
//# sourceMappingURL=usePopup-BG24CocH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopup-BG24CocH.cjs","sources":["../../src/provider/contexts/CommonCodeContext.tsx","../../src/provider/hooks/usePopup.ts"],"sourcesContent":["import { useCodeStore, type CommonCodeContextType } from '../../stores/codeStore';\r\nimport { createContext, useContext, ReactNode } from 'react';\r\n\r\n// 공통코드 컨텍스트 생성\r\nconst CommonCodeContext = createContext<CommonCodeContextType | undefined>(\r\n undefined\r\n);\r\n\r\n// 공통코드 컨텍스트 프로바이더 컴포넌트\r\ninterface CommonCodeProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport const CommonCodeProvider: React.FC<CommonCodeProviderProps> = ({\r\n children,\r\n}) => {\r\n const {\r\n codeData,\r\n isLoading,\r\n error,\r\n lastUpdated,\r\n getCodeList,\r\n getCodeListByOption,\r\n getCodeName,\r\n getCodeColor,\r\n getCodeByOption,\r\n getAvailableGroupCodes,\r\n getGridLookup,\r\n fetchCommonCodes,\r\n } = useCodeStore();\r\n\r\n const contextValue: CommonCodeContextType = {\r\n codeData,\r\n isLoading,\r\n error,\r\n lastUpdated,\r\n getCodeList,\r\n getCodeListByOption,\r\n getCodeName,\r\n getCodeColor,\r\n getCodeByOption,\r\n getAvailableGroupCodes,\r\n getGridLookup,\r\n refreshCodes: fetchCommonCodes,\r\n };\r\n\r\n return (\r\n <CommonCodeContext.Provider value={contextValue}>\r\n {children}\r\n </CommonCodeContext.Provider>\r\n );\r\n};\r\n\r\n// 공통코드 컨텍스트 사용 훅\r\nexport const useCommonCode = (): CommonCodeContextType => {\r\n const context = useContext(CommonCodeContext);\r\n if (context === undefined) {\r\n throw new Error('useCommonCode must be used within a CommonCodeProvider');\r\n }\r\n return context;\r\n};\r\n\r\n// 편의 훅들 (Fast Refresh 호환성을 위해 매개변수 없는 함수로 변경)\r\nexport const useCodeList = () => {\r\n const { getCodeList, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeList,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeName = () => {\r\n const { getCodeName, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeName,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeColor = () => {\r\n const { getCodeColor, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeColor,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeListByOption = () => {\r\n const { getCodeListByOption, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeListByOption,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useGridLookup = () => {\r\n const { getGridLookup, isLoading, error } = useCommonCode();\r\n return {\r\n getGridLookup,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n","import { useCallback } from 'react';\r\nimport { usePopupStore, type PopupConfig } from '../../stores/popupStore';\r\n\r\n/**\r\n * 팝업 컨텍스트를 감지하는 훅\r\n * 팝업 내부에서 사용하면 true, 일반 페이지에서는 false 반환\r\n */\r\nexport const usePopupContext = (): boolean => {\r\n // 팝업 내부에서만 true를 반환하도록 수정\r\n // 현재는 팝업이 열려있으면 모든 컴포넌트가 팝업으로 인식되는 문제가 있음\r\n // 임시로 false 반환 (수동으로 isPopup prop 사용 권장)\r\n return false;\r\n};\r\n\r\n/**\r\n * 팝업 데이터와 이벤트를 관리하는 훅\r\n */\r\nexport const usePopup = () => {\r\n const { popups, activePopupId, setActivePopup, closePopup, openPopup } =\r\n usePopupStore();\r\n\r\n // 팝업 열기 함수\r\n const showPopup = useCallback(\r\n async (popupCode: string, popParams?: any, config?: PopupConfig) => {\r\n try {\r\n await openPopup(popupCode, popParams, config);\r\n } catch (error) {\r\n console.error('팝업 열기 실패:', error);\r\n throw error;\r\n }\r\n },\r\n [openPopup]\r\n );\r\n\r\n return {\r\n popups,\r\n activePopupId,\r\n setActivePopup,\r\n closePopup,\r\n showPopup,\r\n isPopup: popups.length > 0,\r\n };\r\n};\r\n"],"names":["CommonCodeContext","createContext","CommonCodeProvider","children","codeData","isLoading","error","lastUpdated","getCodeList","getCodeListByOption","getCodeName","getCodeColor","getCodeByOption","getAvailableGroupCodes","getGridLookup","fetchCommonCodes","useCodeStore","contextValue","useCommonCode","context","useContext","useCodeList","useCodeName","useCodeColor","useCodeListByOption","useGridLookup","usePopupContext","usePopup","popups","activePopupId","setActivePopup","closePopup","openPopup","usePopupStore","showPopup","useCallback","popupCode","popParams","config"],"mappings":"2JAIMA,EAAoBC,EAAAA,cACxB,MACF,EAOaC,EAAwD,CAAC,CACpE,SAAAC,CACF,IAAM,CACJ,KAAM,CACJ,SAAAC,EACA,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EACA,oBAAAC,EACA,YAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,uBAAAC,EACA,cAAAC,EACA,iBAAAC,CAAA,EACEC,eAAA,EAEEC,EAAsC,CAC1C,SAAAb,EACA,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,YAAAC,EACA,oBAAAC,EACA,YAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,uBAAAC,EACA,cAAAC,EACA,aAAcC,CAAA,EAGhB,+BACGf,EAAkB,SAAlB,CAA2B,MAAOiB,EAChC,SAAAd,EACH,CAEJ,EAGae,EAAgB,IAA6B,CACxD,MAAMC,EAAUC,EAAAA,WAAWpB,CAAiB,EAC5C,GAAImB,IAAY,OACd,MAAM,IAAI,MAAM,wDAAwD,EAE1E,OAAOA,CACT,EAGaE,EAAc,IAAM,CAC/B,KAAM,CAAE,YAAAb,EAAa,UAAAH,EAAW,MAAAC,CAAA,EAAUY,EAAA,EAC1C,MAAO,CACL,YAAAV,EACA,UAAAH,EACA,MAAAC,CAAA,CAEJ,EAEagB,EAAc,IAAM,CAC/B,KAAM,CAAE,YAAAZ,EAAa,UAAAL,EAAW,MAAAC,CAAA,EAAUY,EAAA,EAC1C,MAAO,CACL,YAAAR,EACA,UAAAL,EACA,MAAAC,CAAA,CAEJ,EAEaiB,EAAe,IAAM,CAChC,KAAM,CAAE,aAAAZ,EAAc,UAAAN,EAAW,MAAAC,CAAA,EAAUY,EAAA,EAC3C,MAAO,CACL,aAAAP,EACA,UAAAN,EACA,MAAAC,CAAA,CAEJ,EAEakB,EAAsB,IAAM,CACvC,KAAM,CAAE,oBAAAf,EAAqB,UAAAJ,EAAW,MAAAC,CAAA,EAAUY,EAAA,EAClD,MAAO,CACL,oBAAAT,EACA,UAAAJ,EACA,MAAAC,CAAA,CAEJ,EAEamB,EAAgB,IAAM,CACjC,KAAM,CAAE,cAAAX,EAAe,UAAAT,EAAW,MAAAC,CAAA,EAAUY,EAAA,EAC5C,MAAO,CACL,cAAAJ,EACA,UAAAT,EACA,MAAAC,CAAA,CAEJ,ECnGaoB,EAAkB,IAItB,GAMIC,EAAW,IAAM,CAC5B,KAAM,CAAE,OAAAC,EAAQ,cAAAC,EAAe,eAAAC,EAAgB,WAAAC,EAAY,UAAAC,CAAA,EACzDC,gBAAA,EAGIC,EAAYC,EAAAA,YAChB,MAAOC,EAAmBC,EAAiBC,IAAyB,CAClE,GAAI,CACF,MAAMN,EAAUI,EAAWC,EAAWC,CAAM,CAC9C,OAAShC,EAAO,CACd,cAAQ,MAAM,YAAaA,CAAK,EAC1BA,CACR,CACF,EACA,CAAC0B,CAAS,CAAA,EAGZ,MAAO,CACL,OAAAJ,EACA,cAAAC,EACA,eAAAC,EACA,WAAAC,EACA,UAAAG,EACA,QAASN,EAAO,OAAS,CAAA,CAE7B"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { j as l } from "./jsx-runtime-Dpn_P65e.js";
|
|
2
|
+
import { u as P } from "./codeStore-Dsjc4uXs.js";
|
|
3
|
+
import { createContext as x, useContext as f, useCallback as v } from "react";
|
|
4
|
+
import { u as h } from "./popupStore-D6b6b5-T.js";
|
|
5
|
+
const C = x(
|
|
6
|
+
void 0
|
|
7
|
+
), B = ({
|
|
8
|
+
children: o
|
|
9
|
+
}) => {
|
|
10
|
+
const {
|
|
11
|
+
codeData: e,
|
|
12
|
+
isLoading: t,
|
|
13
|
+
error: u,
|
|
14
|
+
lastUpdated: s,
|
|
15
|
+
getCodeList: i,
|
|
16
|
+
getCodeListByOption: d,
|
|
17
|
+
getCodeName: a,
|
|
18
|
+
getCodeColor: p,
|
|
19
|
+
getCodeByOption: n,
|
|
20
|
+
getAvailableGroupCodes: c,
|
|
21
|
+
getGridLookup: m,
|
|
22
|
+
fetchCommonCodes: g
|
|
23
|
+
} = P(), L = {
|
|
24
|
+
codeData: e,
|
|
25
|
+
isLoading: t,
|
|
26
|
+
error: u,
|
|
27
|
+
lastUpdated: s,
|
|
28
|
+
getCodeList: i,
|
|
29
|
+
getCodeListByOption: d,
|
|
30
|
+
getCodeName: a,
|
|
31
|
+
getCodeColor: p,
|
|
32
|
+
getCodeByOption: n,
|
|
33
|
+
getAvailableGroupCodes: c,
|
|
34
|
+
getGridLookup: m,
|
|
35
|
+
refreshCodes: g
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ l.jsx(C.Provider, { value: L, children: o });
|
|
38
|
+
}, r = () => {
|
|
39
|
+
const o = f(C);
|
|
40
|
+
if (o === void 0)
|
|
41
|
+
throw new Error("useCommonCode must be used within a CommonCodeProvider");
|
|
42
|
+
return o;
|
|
43
|
+
}, G = () => {
|
|
44
|
+
const { getCodeList: o, isLoading: e, error: t } = r();
|
|
45
|
+
return {
|
|
46
|
+
getCodeList: o,
|
|
47
|
+
isLoading: e,
|
|
48
|
+
error: t
|
|
49
|
+
};
|
|
50
|
+
}, O = () => {
|
|
51
|
+
const { getCodeName: o, isLoading: e, error: t } = r();
|
|
52
|
+
return {
|
|
53
|
+
getCodeName: o,
|
|
54
|
+
isLoading: e,
|
|
55
|
+
error: t
|
|
56
|
+
};
|
|
57
|
+
}, j = () => {
|
|
58
|
+
const { getCodeColor: o, isLoading: e, error: t } = r();
|
|
59
|
+
return {
|
|
60
|
+
getCodeColor: o,
|
|
61
|
+
isLoading: e,
|
|
62
|
+
error: t
|
|
63
|
+
};
|
|
64
|
+
}, N = () => {
|
|
65
|
+
const { getCodeListByOption: o, isLoading: e, error: t } = r();
|
|
66
|
+
return {
|
|
67
|
+
getCodeListByOption: o,
|
|
68
|
+
isLoading: e,
|
|
69
|
+
error: t
|
|
70
|
+
};
|
|
71
|
+
}, A = () => {
|
|
72
|
+
const { getGridLookup: o, isLoading: e, error: t } = r();
|
|
73
|
+
return {
|
|
74
|
+
getGridLookup: o,
|
|
75
|
+
isLoading: e,
|
|
76
|
+
error: t
|
|
77
|
+
};
|
|
78
|
+
}, E = () => !1, S = () => {
|
|
79
|
+
const { popups: o, activePopupId: e, setActivePopup: t, closePopup: u, openPopup: s } = h(), i = v(
|
|
80
|
+
async (d, a, p) => {
|
|
81
|
+
try {
|
|
82
|
+
await s(d, a, p);
|
|
83
|
+
} catch (n) {
|
|
84
|
+
throw console.error("팝업 열기 실패:", n), n;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[s]
|
|
88
|
+
);
|
|
89
|
+
return {
|
|
90
|
+
popups: o,
|
|
91
|
+
activePopupId: e,
|
|
92
|
+
setActivePopup: t,
|
|
93
|
+
closePopup: u,
|
|
94
|
+
showPopup: i,
|
|
95
|
+
isPopup: o.length > 0
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
B as C,
|
|
100
|
+
G as a,
|
|
101
|
+
O as b,
|
|
102
|
+
j as c,
|
|
103
|
+
N as d,
|
|
104
|
+
A as e,
|
|
105
|
+
E as f,
|
|
106
|
+
S as g,
|
|
107
|
+
r as u
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=usePopup-Dm-UyUbV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePopup-Dm-UyUbV.js","sources":["../../src/provider/contexts/CommonCodeContext.tsx","../../src/provider/hooks/usePopup.ts"],"sourcesContent":["import { useCodeStore, type CommonCodeContextType } from '../../stores/codeStore';\r\nimport { createContext, useContext, ReactNode } from 'react';\r\n\r\n// 공통코드 컨텍스트 생성\r\nconst CommonCodeContext = createContext<CommonCodeContextType | undefined>(\r\n undefined\r\n);\r\n\r\n// 공통코드 컨텍스트 프로바이더 컴포넌트\r\ninterface CommonCodeProviderProps {\r\n children: ReactNode;\r\n}\r\n\r\nexport const CommonCodeProvider: React.FC<CommonCodeProviderProps> = ({\r\n children,\r\n}) => {\r\n const {\r\n codeData,\r\n isLoading,\r\n error,\r\n lastUpdated,\r\n getCodeList,\r\n getCodeListByOption,\r\n getCodeName,\r\n getCodeColor,\r\n getCodeByOption,\r\n getAvailableGroupCodes,\r\n getGridLookup,\r\n fetchCommonCodes,\r\n } = useCodeStore();\r\n\r\n const contextValue: CommonCodeContextType = {\r\n codeData,\r\n isLoading,\r\n error,\r\n lastUpdated,\r\n getCodeList,\r\n getCodeListByOption,\r\n getCodeName,\r\n getCodeColor,\r\n getCodeByOption,\r\n getAvailableGroupCodes,\r\n getGridLookup,\r\n refreshCodes: fetchCommonCodes,\r\n };\r\n\r\n return (\r\n <CommonCodeContext.Provider value={contextValue}>\r\n {children}\r\n </CommonCodeContext.Provider>\r\n );\r\n};\r\n\r\n// 공통코드 컨텍스트 사용 훅\r\nexport const useCommonCode = (): CommonCodeContextType => {\r\n const context = useContext(CommonCodeContext);\r\n if (context === undefined) {\r\n throw new Error('useCommonCode must be used within a CommonCodeProvider');\r\n }\r\n return context;\r\n};\r\n\r\n// 편의 훅들 (Fast Refresh 호환성을 위해 매개변수 없는 함수로 변경)\r\nexport const useCodeList = () => {\r\n const { getCodeList, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeList,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeName = () => {\r\n const { getCodeName, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeName,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeColor = () => {\r\n const { getCodeColor, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeColor,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useCodeListByOption = () => {\r\n const { getCodeListByOption, isLoading, error } = useCommonCode();\r\n return {\r\n getCodeListByOption,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n\r\nexport const useGridLookup = () => {\r\n const { getGridLookup, isLoading, error } = useCommonCode();\r\n return {\r\n getGridLookup,\r\n isLoading,\r\n error,\r\n };\r\n};\r\n","import { useCallback } from 'react';\r\nimport { usePopupStore, type PopupConfig } from '../../stores/popupStore';\r\n\r\n/**\r\n * 팝업 컨텍스트를 감지하는 훅\r\n * 팝업 내부에서 사용하면 true, 일반 페이지에서는 false 반환\r\n */\r\nexport const usePopupContext = (): boolean => {\r\n // 팝업 내부에서만 true를 반환하도록 수정\r\n // 현재는 팝업이 열려있으면 모든 컴포넌트가 팝업으로 인식되는 문제가 있음\r\n // 임시로 false 반환 (수동으로 isPopup prop 사용 권장)\r\n return false;\r\n};\r\n\r\n/**\r\n * 팝업 데이터와 이벤트를 관리하는 훅\r\n */\r\nexport const usePopup = () => {\r\n const { popups, activePopupId, setActivePopup, closePopup, openPopup } =\r\n usePopupStore();\r\n\r\n // 팝업 열기 함수\r\n const showPopup = useCallback(\r\n async (popupCode: string, popParams?: any, config?: PopupConfig) => {\r\n try {\r\n await openPopup(popupCode, popParams, config);\r\n } catch (error) {\r\n console.error('팝업 열기 실패:', error);\r\n throw error;\r\n }\r\n },\r\n [openPopup]\r\n );\r\n\r\n return {\r\n popups,\r\n activePopupId,\r\n setActivePopup,\r\n closePopup,\r\n showPopup,\r\n isPopup: popups.length > 0,\r\n };\r\n};\r\n"],"names":["CommonCodeContext","createContext","CommonCodeProvider","children","codeData","isLoading","error","lastUpdated","getCodeList","getCodeListByOption","getCodeName","getCodeColor","getCodeByOption","getAvailableGroupCodes","getGridLookup","fetchCommonCodes","useCodeStore","contextValue","useCommonCode","context","useContext","useCodeList","useCodeName","useCodeColor","useCodeListByOption","useGridLookup","usePopupContext","usePopup","popups","activePopupId","setActivePopup","closePopup","openPopup","usePopupStore","showPopup","useCallback","popupCode","popParams","config"],"mappings":";;;;AAIA,MAAMA,IAAoBC;AAAA,EACxB;AACF,GAOaC,IAAwD,CAAC;AAAA,EACpE,UAAAC;AACF,MAAM;AACJ,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,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EAAE,qBAAAf,GAAqB,WAAAJ,GAAW,OAAAC,EAAA,IAAUY,EAAA;AAClD,SAAO;AAAA,IACL,qBAAAT;AAAA,IACA,WAAAJ;AAAA,IACA,OAAAC;AAAA,EAAA;AAEJ,GAEamB,IAAgB,MAAM;AACjC,QAAM,EAAE,eAAAX,GAAe,WAAAT,GAAW,OAAAC,EAAA,IAAUY,EAAA;AAC5C,SAAO;AAAA,IACL,eAAAJ;AAAA,IACA,WAAAT;AAAA,IACA,OAAAC;AAAA,EAAA;AAEJ,GCnGaoB,IAAkB,MAItB,IAMIC,IAAW,MAAM;AAC5B,QAAM,EAAE,QAAAC,GAAQ,eAAAC,GAAe,gBAAAC,GAAgB,YAAAC,GAAY,WAAAC,EAAA,IACzDC,EAAA,GAGIC,IAAYC;AAAA,IAChB,OAAOC,GAAmBC,GAAiBC,MAAyB;AAClE,UAAI;AACF,cAAMN,EAAUI,GAAWC,GAAWC,CAAM;AAAA,MAC9C,SAAShC,GAAO;AACd,sBAAQ,MAAM,aAAaA,CAAK,GAC1BA;AAAA,MACR;AAAA,IACF;AAAA,IACA,CAAC0B,CAAS;AAAA,EAAA;AAGZ,SAAO;AAAA,IACL,QAAAJ;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAG;AAAA,IACA,SAASN,EAAO,SAAS;AAAA,EAAA;AAE7B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/common/BwgButtonGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BwgButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/common/BwgButtonGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAGD,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QACT,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACvD,CAAC;IACF,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED;;;GAGG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2NjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -431,6 +431,10 @@ interface BwgGridColHeaderProps {
|
|
|
431
431
|
* `checkLocation` - {@link ColumnHeaderItemLocation}
|
|
432
432
|
*/
|
|
433
433
|
checkLocation?: ColumnHeaderItemLocation;
|
|
434
|
+
/**
|
|
435
|
+
* 그룹헤더 이용시 그룹헤더 숨김처리
|
|
436
|
+
*/
|
|
437
|
+
visible?: boolean;
|
|
434
438
|
}
|
|
435
439
|
interface BwgGridColProps extends DataColumn {
|
|
436
440
|
/** 컬럼명 (큰 의미를 갖지는 않는다.) */
|
|
@@ -509,5 +513,5 @@ export interface BwgGridRenderType {
|
|
|
509
513
|
export declare const createBwgGridRenderer: (renderFunction: (grid: any, model: any, w: any, h: any, root: any) => void) => BwgGridRenderType;
|
|
510
514
|
declare const _default: React.ComponentType<BwgGridProps>;
|
|
511
515
|
export default _default;
|
|
512
|
-
export type { BwgGridColHeaderProps, BwgGridColProps,
|
|
516
|
+
export type { BwgGridColHeaderProps, BwgGridColProps, BwgGridDataLoadOption, BwgGridEventList, BwgGridOptions, BwgGridProps, BwgGridRef };
|
|
513
517
|
//# sourceMappingURL=BwgGrid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgGrid.d.ts","sourceRoot":"","sources":["../../../src/components/common/BwgGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,YAAY,
|
|
1
|
+
{"version":3,"file":"BwgGrid.d.ts","sourceRoot":"","sources":["../../../src/components/common/BwgGrid.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,YAAY,EAIb,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,EAEZ,gBAAgB,EAOjB,MAAM,OAAO,CAAC;AAEf,OAAO,QAAQ,EAAE,EACf,SAAS,EACT,SAAS,EACT,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAEhB,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EAGd,QAAQ,EACR,eAAe,EACf,SAAS,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ9D,UAAU,qBAAqB;IAC7B,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe;IACf,UAAU,CAAC,EAAE;QACX,SAAS,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IAAI,CAAC;IACjC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC;IAClC,KAAK,EAAE,MAAM,GAAG,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,KACzE,iBAkCF,CAAC;wBAGwB,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC;AAA3D,wBAA4D;AAC5D,YAAY,EACV,qBAAqB,EACrB,eAAe,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EACtF,UAAU,EACX,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/SSOHandler-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/SSOHandler-DoidypM2.cjs"),r=require("../../chunks/BwgSpace-b0hmM1Ht.cjs"),o=require("../../chunks/realFormat-Cha7OTd9.cjs");exports.BwgButtonGroup=e.BwgButtonGroup;exports.BwgCmptArea=e.BwgCmptArea;exports.BwgCol=e.BwgCol;exports.BwgConfigProvider=e.BwgConfigProvider;exports.BwgDetail=e.BwgDetail;exports.BwgDrawer=e.BwgDrawer;exports.BwgEditor=e.BwgEditor;exports.BwgGrid=e.BwgGrid;exports.BwgInfoArea=e.BwgInfoArea;exports.BwgPopup=e.BwgPopup;exports.BwgRow=e.BwgRow;exports.BwgTable=e.BwgTable;exports.BwgTabs=e.BwgTabs;exports.BwgTitleBox=e.BwgTitleBox;exports.BwgView=e.BwgView;exports.ContentBox=e.ContentBox;exports.ContentLayOut=e.ContentLayOut;exports.GlobalConfigProvider=e.GlobalConfigProvider;exports.QuickServiceToggle=e.QuickServiceToggle;exports.SSOHandler=e.SSOHandler;exports.SearchBox=e.SearchBox;exports.createBwgGridRenderer=e.createBwgGridRenderer;exports.BwgSpace=r.BwgSpace;exports.realFormat=o.realFormat;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as r, a as o, b as s, c as B, d as g, e as w, f as t, g as i, h as n, i as l, j as p, k as d, l as f, m as C, n as c, C as m, o as x, G as S, Q as u, p as G, S as b, q as T } from "../../chunks/SSOHandler-
|
|
1
|
+
import { B as r, a as o, b as s, c as B, d as g, e as w, f as t, g as i, h as n, i as l, j as p, k as d, l as f, m as C, n as c, C as m, o as x, G as S, Q as u, p as G, S as b, q as T } from "../../chunks/SSOHandler-BfRH51hZ.js";
|
|
2
2
|
import { B as P } from "../../chunks/BwgSpace-CnLM4qcg.js";
|
|
3
3
|
import { r as k } from "../../chunks/realFormat-DRGLFabQ.js";
|
|
4
4
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgDatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgDatePicker.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAaD,QAAA,MAAM,aAAa,GAAI,2CAKpB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"BwgDatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgDatePicker.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAaD,QAAA,MAAM,aAAa,GAAI,2CAKpB,kBAAkB,4CAkEpB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgLargeUploader.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgLargeUploader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BwgLargeUploader.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgLargeUploader.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAuCxC,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE;QAC/B,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,KAAK,IAAI,CAAC;IACX,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAoZrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { InputProps } from 'antd';
|
|
3
2
|
import { MaskedOptions } from 'imask';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
4
|
import { BwgFormItemProps } from './BwgFormItem';
|
|
5
5
|
export type MaskInputType = string | string[] | MaskedOptions<any>;
|
|
6
6
|
export type BwgMaskedInputProps = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgMaskedInput.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgMaskedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BwgMaskedInput.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgMaskedInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAEnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,eAAe;IACf,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,6BAA6B;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,aAAa;IACb,IAAI,EAAE,aAAa,CAAC;CACrB,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AA4B3C;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoCjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgMaskedPicker.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgMaskedPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BwgMaskedPicker.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgMaskedPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAkBjD,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;AAE3C,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA2HnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BwgNumber.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgNumber.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BwgNumber.d.ts","sourceRoot":"","sources":["../../../src/components/core/BwgNumber.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACrD,OAAoB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG;IAC3C,aAAa;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED,QAAA,MAAM,SAAS,GAAI,2BAA2B,cAAc,4CA+C3D,CAAC;AAEF,eAAe,SAAS,CAAC"}
|