@bwg-ui/core 1.1.25 → 1.1.27

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 (122) hide show
  1. package/dist/chunks/common-components-CniOkOzu.js +15776 -0
  2. package/dist/chunks/common-components-DrcQahsO.cjs +183 -0
  3. package/dist/chunks/{core-Dl0PdDdT.js → core-CEDyqniq.js} +1 -2
  4. package/dist/chunks/core-lmAmbqvY.cjs +1 -0
  5. package/dist/chunks/{enc-base64-D7t4BoUA.js → enc-base64-CF2tIkYl.js} +4 -5
  6. package/dist/chunks/enc-base64-Dxq399hI.cjs +1 -0
  7. package/dist/chunks/{sha256-C2-s1oZe.js → sha256-DYurgXCU.js} +12 -13
  8. package/dist/chunks/sha256-H5WWQnKT.cjs +1 -0
  9. package/dist/components/common/BwgPagination.d.ts +1 -1
  10. package/dist/components/common/BwgPagination.d.ts.map +1 -1
  11. package/dist/components/common/index.cjs +1 -2
  12. package/dist/components/common/index.d.ts +3 -1
  13. package/dist/components/common/index.d.ts.map +1 -1
  14. package/dist/components/common/index.js +16 -17
  15. package/dist/components/core/BwgFormItem.d.ts +2 -2
  16. package/dist/components/core/BwgFormItem.d.ts.map +1 -1
  17. package/dist/components/core/BwgInput.d.ts.map +1 -1
  18. package/dist/components/core/index.cjs +1 -2
  19. package/dist/components/core/index.js +1218 -23
  20. package/dist/components/guide/index.cjs +1 -2
  21. package/dist/components/guide/index.js +3 -4
  22. package/dist/components/layout/index.cjs +35 -2
  23. package/dist/components/layout/index.js +350 -10
  24. package/dist/components/popup/MenuReport.d.ts.map +1 -1
  25. package/dist/index.cjs +1 -2
  26. package/dist/index.js +211 -222
  27. package/dist/provider/index.cjs +1 -2
  28. package/dist/provider/index.js +384 -25
  29. package/dist/stores/index.cjs +2 -2
  30. package/dist/stores/index.js +1394 -24
  31. package/dist/utils/index.cjs +1 -2
  32. package/dist/utils/index.js +1369 -200
  33. package/package.json +2 -3
  34. package/dist/chunks/AuthContext-CXng9fj0.cjs +0 -2
  35. package/dist/chunks/AuthContext-CXng9fj0.cjs.map +0 -1
  36. package/dist/chunks/AuthContext-DrEpBrpB.js +0 -57
  37. package/dist/chunks/AuthContext-DrEpBrpB.js.map +0 -1
  38. package/dist/chunks/BwgSpace-CnLM4qcg.js +0 -27
  39. package/dist/chunks/BwgSpace-CnLM4qcg.js.map +0 -1
  40. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs +0 -2
  41. package/dist/chunks/BwgSpace-b0hmM1Ht.cjs.map +0 -1
  42. package/dist/chunks/BwgSwitch-DOlc57wi.cjs +0 -2
  43. package/dist/chunks/BwgSwitch-DOlc57wi.cjs.map +0 -1
  44. package/dist/chunks/BwgSwitch-D_scwi9_.js +0 -269
  45. package/dist/chunks/BwgSwitch-D_scwi9_.js.map +0 -1
  46. package/dist/chunks/BwgUploader-CkXwkcUL.cjs +0 -3
  47. package/dist/chunks/BwgUploader-CkXwkcUL.cjs.map +0 -1
  48. package/dist/chunks/BwgUploader-DBFF9BPF.js +0 -3250
  49. package/dist/chunks/BwgUploader-DBFF9BPF.js.map +0 -1
  50. package/dist/chunks/LoadingOverlay-DAZJF5wg.js +0 -19
  51. package/dist/chunks/LoadingOverlay-DAZJF5wg.js.map +0 -1
  52. package/dist/chunks/LoadingOverlay-DcmKvoZA.cjs +0 -2
  53. package/dist/chunks/LoadingOverlay-DcmKvoZA.cjs.map +0 -1
  54. package/dist/chunks/SSOHandler-BY6LXMLc.cjs +0 -237
  55. package/dist/chunks/SSOHandler-BY6LXMLc.cjs.map +0 -1
  56. package/dist/chunks/SSOHandler-CxvxEBaH.js +0 -28654
  57. package/dist/chunks/SSOHandler-CxvxEBaH.js.map +0 -1
  58. package/dist/chunks/ScreenProtectContext-3my4PHFa.js +0 -154
  59. package/dist/chunks/ScreenProtectContext-3my4PHFa.js.map +0 -1
  60. package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs +0 -2
  61. package/dist/chunks/ScreenProtectContext-CVuXrJm6.cjs.map +0 -1
  62. package/dist/chunks/SearchBoxContext-DwFDOyYG.cjs +0 -2
  63. package/dist/chunks/SearchBoxContext-DwFDOyYG.cjs.map +0 -1
  64. package/dist/chunks/SearchBoxContext-gWM7FHIw.js +0 -86
  65. package/dist/chunks/SearchBoxContext-gWM7FHIw.js.map +0 -1
  66. package/dist/chunks/ViewContainer-Bhq22_B3.cjs +0 -36
  67. package/dist/chunks/ViewContainer-Bhq22_B3.cjs.map +0 -1
  68. package/dist/chunks/ViewContainer-D9SKBnrn.js +0 -338
  69. package/dist/chunks/ViewContainer-D9SKBnrn.js.map +0 -1
  70. package/dist/chunks/apiUtils-BZ6s0_NI.cjs +0 -3
  71. package/dist/chunks/apiUtils-BZ6s0_NI.cjs.map +0 -1
  72. package/dist/chunks/apiUtils-DSwE62oG.js +0 -1450
  73. package/dist/chunks/apiUtils-DSwE62oG.js.map +0 -1
  74. package/dist/chunks/codeStore-il4-kZPe.cjs +0 -2
  75. package/dist/chunks/codeStore-il4-kZPe.cjs.map +0 -1
  76. package/dist/chunks/codeStore-vPj4Y0TK.js +0 -450
  77. package/dist/chunks/codeStore-vPj4Y0TK.js.map +0 -1
  78. package/dist/chunks/core-BHejg5iS.cjs +0 -2
  79. package/dist/chunks/core-BHejg5iS.cjs.map +0 -1
  80. package/dist/chunks/core-Dl0PdDdT.js.map +0 -1
  81. package/dist/chunks/enc-base64-BkBtNBQV.cjs +0 -2
  82. package/dist/chunks/enc-base64-BkBtNBQV.cjs.map +0 -1
  83. package/dist/chunks/enc-base64-D7t4BoUA.js.map +0 -1
  84. package/dist/chunks/favoriteStore-Bh1FuZm9.js +0 -439
  85. package/dist/chunks/favoriteStore-Bh1FuZm9.js.map +0 -1
  86. package/dist/chunks/favoriteStore-CcKg_nEH.cjs +0 -2
  87. package/dist/chunks/favoriteStore-CcKg_nEH.cjs.map +0 -1
  88. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs +0 -31
  89. package/dist/chunks/jsx-runtime-CeSfJrVB.cjs.map +0 -1
  90. package/dist/chunks/jsx-runtime-Dpn_P65e.js +0 -634
  91. package/dist/chunks/jsx-runtime-Dpn_P65e.js.map +0 -1
  92. package/dist/chunks/popupStore-BRRmB4zH.js +0 -92
  93. package/dist/chunks/popupStore-BRRmB4zH.js.map +0 -1
  94. package/dist/chunks/popupStore-DUApUBF2.cjs +0 -2
  95. package/dist/chunks/popupStore-DUApUBF2.cjs.map +0 -1
  96. package/dist/chunks/realFormat-Cha7OTd9.cjs +0 -2
  97. package/dist/chunks/realFormat-Cha7OTd9.cjs.map +0 -1
  98. package/dist/chunks/realFormat-DRGLFabQ.js +0 -305
  99. package/dist/chunks/realFormat-DRGLFabQ.js.map +0 -1
  100. package/dist/chunks/sha256-C2-s1oZe.js.map +0 -1
  101. package/dist/chunks/sha256-DiIRoCQ8.cjs +0 -2
  102. package/dist/chunks/sha256-DiIRoCQ8.cjs.map +0 -1
  103. package/dist/chunks/usePopup-D2JEuDrO.cjs +0 -2
  104. package/dist/chunks/usePopup-D2JEuDrO.cjs.map +0 -1
  105. package/dist/chunks/usePopup-DarKTbRC.js +0 -109
  106. package/dist/chunks/usePopup-DarKTbRC.js.map +0 -1
  107. package/dist/components/common/index.cjs.map +0 -1
  108. package/dist/components/common/index.js.map +0 -1
  109. package/dist/components/core/index.cjs.map +0 -1
  110. package/dist/components/core/index.js.map +0 -1
  111. package/dist/components/guide/index.cjs.map +0 -1
  112. package/dist/components/guide/index.js.map +0 -1
  113. package/dist/components/layout/index.cjs.map +0 -1
  114. package/dist/components/layout/index.js.map +0 -1
  115. package/dist/index.cjs.map +0 -1
  116. package/dist/index.js.map +0 -1
  117. package/dist/provider/index.cjs.map +0 -1
  118. package/dist/provider/index.js.map +0 -1
  119. package/dist/stores/index.cjs.map +0 -1
  120. package/dist/stores/index.js.map +0 -1
  121. package/dist/utils/index.cjs.map +0 -1
  122. package/dist/utils/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bwg-ui/core",
3
- "version": "1.1.25",
3
+ "version": "1.1.27",
4
4
  "description": "bankwareglobal UI 라이브러리입니다.",
5
5
  "author": "kyeongdon.park",
6
6
  "license": "ISC",
@@ -12,8 +12,7 @@
12
12
  ".": {
13
13
  "types": "./dist/index.d.ts",
14
14
  "import": "./dist/index.js",
15
- "require": "./dist/index.cjs",
16
- "default": "./dist/index.js"
15
+ "require": "./dist/index.cjs"
17
16
  },
18
17
  "./common": {
19
18
  "types": "./dist/components/common/index.d.ts",
@@ -1,2 +0,0 @@
1
- "use strict";const y=require("./jsx-runtime-CeSfJrVB.cjs"),r=require("react"),h=r.createContext(null),w=()=>{const o=r.useContext(h);if(!o)throw new Error("useAuth must be used within AuthProvider");return o},x=({children:o})=>{const[c,u]=r.useState(!1),[a,n]=r.useState(!1),i=async s=>{const e=(await s.text()).trim().toLowerCase();try{const t=JSON.parse(e);if(typeof t=="object"&&t&&(t.ok===!0||t.success===!0))return!0}catch{}return!!["true","ok","1","y"].includes(e)},d=async s=>{n(!0);try{const e=await fetch("/serviceEndpoint/sso_check.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"token="+encodeURIComponent(s)}),t=e.ok&&await i(e);return u(t),t}catch{return!1}finally{n(!1)}},l=async s=>{n(!0);try{const e=await fetch("/serviceEndpoint/sso_reauth.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"pin="+encodeURIComponent(s)});return e.ok&&await i(e)?(u(!0),!0):!1}catch{return!1}finally{n(!1)}},f=()=>{u(!1)},p=r.useMemo(()=>({authed:c,busy:a,verifyWithToken:d,reauthWithPin:l,logout:f}),[c,a]);return y.jsxRuntimeExports.jsx(h.Provider,{value:p,children:o})};exports.AuthProvider=x;exports.useAuth=w;
2
- //# sourceMappingURL=AuthContext-CXng9fj0.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthContext-CXng9fj0.cjs","sources":["../../src/provider/contexts/AuthContext.tsx"],"sourcesContent":["import {\r\n createContext,\r\n FC,\r\n ReactNode,\r\n useContext,\r\n useMemo,\r\n useState,\r\n} from 'react';\r\n\r\ntype AuthContextValue = {\r\n authed: boolean;\r\n busy: boolean; // show global progress when true\r\n verifyWithToken: (token: string) => Promise<boolean>; // initial SSO\r\n reauthWithPin: (pin: string) => Promise<boolean>; // unlock SSO\r\n logout: () => void;\r\n};\r\n\r\nconst AuthContext = createContext<AuthContextValue | null>(null);\r\nexport const useAuth = () => {\r\n const ctx = useContext(AuthContext);\r\n if (!ctx) throw new Error('useAuth must be used within AuthProvider');\r\n return ctx;\r\n};\r\n\r\nexport const AuthProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const [authed, setAuthed] = useState(false);\r\n const [busy, setBusy] = useState(false);\r\n\r\n // Heuristic text parser for JSP boolean responses\r\n const parseOk = async (res: Response) => {\r\n const text = (await res.text()).trim().toLowerCase();\r\n try {\r\n const j = JSON.parse(text);\r\n if (typeof j === 'object' && j && (j.ok === true || j.success === true))\r\n return true;\r\n } catch {}\r\n if (['true', 'ok', '1', 'y'].includes(text)) return true;\r\n return false;\r\n };\r\n\r\n const verifyWithToken = async (token: string) => {\r\n setBusy(true);\r\n try {\r\n // TODO: replace with your real endpoint\r\n const res = await fetch('/serviceEndpoint/sso_check.jsp', {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: 'token=' + encodeURIComponent(token),\r\n });\r\n const ok = res.ok && (await parseOk(res));\r\n setAuthed(ok);\r\n return ok;\r\n } catch (e) {\r\n return false;\r\n } finally {\r\n setBusy(false);\r\n }\r\n };\r\n\r\n const reauthWithPin = async (pin: string) => {\r\n setBusy(true);\r\n try {\r\n // TODO: replace with your real endpoint\r\n const res = await fetch('/serviceEndpoint/sso_reauth.jsp', {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: 'pin=' + encodeURIComponent(pin),\r\n });\r\n const ok = res.ok && (await parseOk(res));\r\n // Keep authed true only if reauth succeeds\r\n if (!ok) return false;\r\n setAuthed(true);\r\n return true;\r\n } catch (e) {\r\n return false;\r\n } finally {\r\n setBusy(false);\r\n }\r\n };\r\n\r\n const logout = () => {\r\n setAuthed(false);\r\n };\r\n\r\n const value = useMemo(\r\n () => ({ authed, busy, verifyWithToken, reauthWithPin, logout }),\r\n [authed, busy]\r\n );\r\n return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;\r\n};\r\n"],"names":["AuthContext","createContext","useAuth","ctx","useContext","AuthProvider","children","authed","setAuthed","useState","busy","setBusy","parseOk","res","text","j","verifyWithToken","token","ok","reauthWithPin","pin","logout","value","useMemo","jsx"],"mappings":"8EAiBMA,EAAcC,EAAAA,cAAuC,IAAI,EAClDC,EAAU,IAAM,CAC3B,MAAMC,EAAMC,EAAAA,WAAWJ,CAAW,EAClC,GAAI,CAACG,EAAK,MAAM,IAAI,MAAM,0CAA0C,EACpE,OAAOA,CACT,EAEaE,EAA4C,CAAC,CAAE,SAAAC,KAAe,CACzE,KAAM,CAACC,EAAQC,CAAS,EAAIC,EAAAA,SAAS,EAAK,EACpC,CAACC,EAAMC,CAAO,EAAIF,EAAAA,SAAS,EAAK,EAGhCG,EAAU,MAAOC,GAAkB,CACvC,MAAMC,GAAQ,MAAMD,EAAI,QAAQ,KAAA,EAAO,YAAA,EACvC,GAAI,CACF,MAAME,EAAI,KAAK,MAAMD,CAAI,EACzB,GAAI,OAAOC,GAAM,UAAYA,IAAMA,EAAE,KAAO,IAAQA,EAAE,UAAY,IAChE,MAAO,EACX,MAAQ,CAAC,CACT,MAAI,GAAC,OAAQ,KAAM,IAAK,GAAG,EAAE,SAASD,CAAI,CAE5C,EAEME,EAAkB,MAAOC,GAAkB,CAC/CN,EAAQ,EAAI,EACZ,GAAI,CAEF,MAAME,EAAM,MAAM,MAAM,iCAAkC,CACxD,OAAQ,OACR,QAAS,CAAE,eAAgB,mCAAA,EAC3B,KAAM,SAAW,mBAAmBI,CAAK,CAAA,CAC1C,EACKC,EAAKL,EAAI,IAAO,MAAMD,EAAQC,CAAG,EACvC,OAAAL,EAAUU,CAAE,EACLA,CACT,MAAY,CACV,MAAO,EACT,QAAA,CACEP,EAAQ,EAAK,CACf,CACF,EAEMQ,EAAgB,MAAOC,GAAgB,CAC3CT,EAAQ,EAAI,EACZ,GAAI,CAEF,MAAME,EAAM,MAAM,MAAM,kCAAmC,CACzD,OAAQ,OACR,QAAS,CAAE,eAAgB,mCAAA,EAC3B,KAAM,OAAS,mBAAmBO,CAAG,CAAA,CACtC,EAGD,OAFWP,EAAI,IAAO,MAAMD,EAAQC,CAAG,GAGvCL,EAAU,EAAI,EACP,IAFS,EAGlB,MAAY,CACV,MAAO,EACT,QAAA,CACEG,EAAQ,EAAK,CACf,CACF,EAEMU,EAAS,IAAM,CACnBb,EAAU,EAAK,CACjB,EAEMc,EAAQC,EAAAA,QACZ,KAAO,CAAE,OAAAhB,EAAQ,KAAAG,EAAM,gBAAAM,EAAiB,cAAAG,EAAe,OAAAE,CAAA,GACvD,CAACd,EAAQG,CAAI,CAAA,EAEf,OAAOc,EAAAA,kBAAAA,IAACxB,EAAY,SAAZ,CAAqB,MAAAsB,EAAe,SAAAhB,CAAA,CAAS,CACvD"}
@@ -1,57 +0,0 @@
1
- import { j as y } from "./jsx-runtime-Dpn_P65e.js";
2
- import { useContext as w, createContext as m, useState as i, useMemo as x } from "react";
3
- const f = m(null), j = () => {
4
- const r = w(f);
5
- if (!r) throw new Error("useAuth must be used within AuthProvider");
6
- return r;
7
- }, v = ({ children: r }) => {
8
- const [u, n] = i(!1), [a, s] = i(!1), c = async (o) => {
9
- const t = (await o.text()).trim().toLowerCase();
10
- try {
11
- const e = JSON.parse(t);
12
- if (typeof e == "object" && e && (e.ok === !0 || e.success === !0))
13
- return !0;
14
- } catch {
15
- }
16
- return !!["true", "ok", "1", "y"].includes(t);
17
- }, h = async (o) => {
18
- s(!0);
19
- try {
20
- const t = await fetch("/serviceEndpoint/sso_check.jsp", {
21
- method: "POST",
22
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
23
- body: "token=" + encodeURIComponent(o)
24
- }), e = t.ok && await c(t);
25
- return n(e), e;
26
- } catch {
27
- return !1;
28
- } finally {
29
- s(!1);
30
- }
31
- }, l = async (o) => {
32
- s(!0);
33
- try {
34
- const t = await fetch("/serviceEndpoint/sso_reauth.jsp", {
35
- method: "POST",
36
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
37
- body: "pin=" + encodeURIComponent(o)
38
- });
39
- return t.ok && await c(t) ? (n(!0), !0) : !1;
40
- } catch {
41
- return !1;
42
- } finally {
43
- s(!1);
44
- }
45
- }, d = () => {
46
- n(!1);
47
- }, p = x(
48
- () => ({ authed: u, busy: a, verifyWithToken: h, reauthWithPin: l, logout: d }),
49
- [u, a]
50
- );
51
- return /* @__PURE__ */ y.jsx(f.Provider, { value: p, children: r });
52
- };
53
- export {
54
- v as A,
55
- j as u
56
- };
57
- //# sourceMappingURL=AuthContext-DrEpBrpB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AuthContext-DrEpBrpB.js","sources":["../../src/provider/contexts/AuthContext.tsx"],"sourcesContent":["import {\r\n createContext,\r\n FC,\r\n ReactNode,\r\n useContext,\r\n useMemo,\r\n useState,\r\n} from 'react';\r\n\r\ntype AuthContextValue = {\r\n authed: boolean;\r\n busy: boolean; // show global progress when true\r\n verifyWithToken: (token: string) => Promise<boolean>; // initial SSO\r\n reauthWithPin: (pin: string) => Promise<boolean>; // unlock SSO\r\n logout: () => void;\r\n};\r\n\r\nconst AuthContext = createContext<AuthContextValue | null>(null);\r\nexport const useAuth = () => {\r\n const ctx = useContext(AuthContext);\r\n if (!ctx) throw new Error('useAuth must be used within AuthProvider');\r\n return ctx;\r\n};\r\n\r\nexport const AuthProvider: FC<{ children: ReactNode }> = ({ children }) => {\r\n const [authed, setAuthed] = useState(false);\r\n const [busy, setBusy] = useState(false);\r\n\r\n // Heuristic text parser for JSP boolean responses\r\n const parseOk = async (res: Response) => {\r\n const text = (await res.text()).trim().toLowerCase();\r\n try {\r\n const j = JSON.parse(text);\r\n if (typeof j === 'object' && j && (j.ok === true || j.success === true))\r\n return true;\r\n } catch {}\r\n if (['true', 'ok', '1', 'y'].includes(text)) return true;\r\n return false;\r\n };\r\n\r\n const verifyWithToken = async (token: string) => {\r\n setBusy(true);\r\n try {\r\n // TODO: replace with your real endpoint\r\n const res = await fetch('/serviceEndpoint/sso_check.jsp', {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: 'token=' + encodeURIComponent(token),\r\n });\r\n const ok = res.ok && (await parseOk(res));\r\n setAuthed(ok);\r\n return ok;\r\n } catch (e) {\r\n return false;\r\n } finally {\r\n setBusy(false);\r\n }\r\n };\r\n\r\n const reauthWithPin = async (pin: string) => {\r\n setBusy(true);\r\n try {\r\n // TODO: replace with your real endpoint\r\n const res = await fetch('/serviceEndpoint/sso_reauth.jsp', {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/x-www-form-urlencoded' },\r\n body: 'pin=' + encodeURIComponent(pin),\r\n });\r\n const ok = res.ok && (await parseOk(res));\r\n // Keep authed true only if reauth succeeds\r\n if (!ok) return false;\r\n setAuthed(true);\r\n return true;\r\n } catch (e) {\r\n return false;\r\n } finally {\r\n setBusy(false);\r\n }\r\n };\r\n\r\n const logout = () => {\r\n setAuthed(false);\r\n };\r\n\r\n const value = useMemo(\r\n () => ({ authed, busy, verifyWithToken, reauthWithPin, logout }),\r\n [authed, busy]\r\n );\r\n return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;\r\n};\r\n"],"names":["AuthContext","createContext","useAuth","ctx","useContext","AuthProvider","children","authed","setAuthed","useState","busy","setBusy","parseOk","res","text","j","verifyWithToken","token","ok","reauthWithPin","pin","logout","value","useMemo","jsx"],"mappings":";;AAiBA,MAAMA,IAAcC,EAAuC,IAAI,GAClDC,IAAU,MAAM;AAC3B,QAAMC,IAAMC,EAAWJ,CAAW;AAClC,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Y;AACV,aAAO;AAAA,IACT,UAAA;AACE,MAAAG,EAAQ,EAAK;AAAA,IACf;AAAA,EACF,GAEMU,IAAS,MAAM;AACnB,IAAAb,EAAU,EAAK;AAAA,EACjB,GAEMc,IAAQC;AAAA,IACZ,OAAO,EAAE,QAAAhB,GAAQ,MAAAG,GAAM,iBAAAM,GAAiB,eAAAG,GAAe,QAAAE,EAAA;AAAA,IACvD,CAACd,GAAQG,CAAI;AAAA,EAAA;AAEf,SAAOc,gBAAAA,EAAAA,IAACxB,EAAY,UAAZ,EAAqB,OAAAsB,GAAe,UAAAhB,EAAA,CAAS;AACvD;"}
@@ -1,27 +0,0 @@
1
- import { j as d } from "./jsx-runtime-Dpn_P65e.js";
2
- const i = ({ children: r }) => /* @__PURE__ */ d.jsx(
3
- "div",
4
- {
5
- style: {
6
- height: "100%",
7
- padding: "20px 30px 26px"
8
- },
9
- children: /* @__PURE__ */ d.jsx(
10
- "div",
11
- {
12
- style: {
13
- width: "100%",
14
- height: "100%",
15
- border: "1px solid #ddd",
16
- borderRadius: "15px",
17
- background: "#fff"
18
- },
19
- children: r
20
- }
21
- )
22
- }
23
- );
24
- export {
25
- i as B
26
- };
27
- //# sourceMappingURL=BwgSpace-CnLM4qcg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSpace-CnLM4qcg.js","sources":["../../src/components/common/BwgSpace.tsx"],"sourcesContent":["import { ReactNode } from 'react';\r\n\r\n/**\r\n * BwgSpace : 공간컴포넌트\r\n * 추후 style => className 변경 예정\r\n * @param children 하위 컴포넌트\r\n * @returns\r\n */\r\nconst BwgSpace = ({ children }: { children: ReactNode }) => {\r\n return (\r\n <div\r\n style={{\r\n height: '100%',\r\n padding: '20px 30px 26px',\r\n }}\r\n >\r\n <div\r\n style={{\r\n width: '100%',\r\n height: '100%',\r\n border: '1px solid #ddd',\r\n borderRadius: '15px',\r\n background: '#fff',\r\n }}\r\n >\r\n {children}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default BwgSpace;\r\n"],"names":["BwgSpace","children","jsx"],"mappings":";AAQA,MAAMA,IAAW,CAAC,EAAE,UAAAC,QAEhBC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAGX,UAAAA,gBAAAA,EAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,QAAQ;AAAA,UACR,cAAc;AAAA,UACd,YAAY;AAAA,QAAA;AAAA,QAGb,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AAAA;"}
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("./jsx-runtime-CeSfJrVB.cjs"),t=({children:s})=>e.jsxRuntimeExports.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:e.jsxRuntimeExports.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:s})});exports.BwgSpace=t;
2
- //# sourceMappingURL=BwgSpace-b0hmM1Ht.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSpace-b0hmM1Ht.cjs","sources":["../../src/components/common/BwgSpace.tsx"],"sourcesContent":["import { ReactNode } from 'react';\r\n\r\n/**\r\n * BwgSpace : 공간컴포넌트\r\n * 추후 style => className 변경 예정\r\n * @param children 하위 컴포넌트\r\n * @returns\r\n */\r\nconst BwgSpace = ({ children }: { children: ReactNode }) => {\r\n return (\r\n <div\r\n style={{\r\n height: '100%',\r\n padding: '20px 30px 26px',\r\n }}\r\n >\r\n <div\r\n style={{\r\n width: '100%',\r\n height: '100%',\r\n border: '1px solid #ddd',\r\n borderRadius: '15px',\r\n background: '#fff',\r\n }}\r\n >\r\n {children}\r\n </div>\r\n </div>\r\n );\r\n};\r\n\r\nexport default BwgSpace;\r\n"],"names":["BwgSpace","children","jsx"],"mappings":"2DAQMA,EAAW,CAAC,CAAE,SAAAC,KAEhBC,EAAAA,kBAAAA,IAAC,MAAA,CACC,MAAO,CACL,OAAQ,OACR,QAAS,gBAAA,EAGX,SAAAA,EAAAA,kBAAAA,IAAC,MAAA,CACC,MAAO,CACL,MAAO,OACP,OAAQ,OACR,OAAQ,iBACR,aAAc,OACd,WAAY,MAAA,EAGb,SAAAD,CAAA,CAAA,CACH,CAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("./jsx-runtime-CeSfJrVB.cjs"),l=require("antd"),u=require("dayjs"),Y=require("react"),c=Y.memo(({children:a,label:t,name:o,rules:i,initialValue:e,style:m,...x})=>{const r={fontWeight:"bold"},d=Array.isArray(i)&&i.some(f=>f.required===!0),n=()=>typeof t=="string"?s.jsxRuntimeExports.jsxs("span",{style:r,children:[t,d&&s.jsxRuntimeExports.jsx("span",{style:{color:"#ff4d4f",marginLeft:"4px"},children:"*"})]}):s.jsxRuntimeExports.jsx("span",{style:r,children:t});return s.jsxRuntimeExports.jsx(l.Form.Item,{className:"bwg-form-item",label:t?n():void 0,labelAlign:"left",name:o,rules:i,colon:!1,initialValue:e,style:m,...x,children:a})}),F=({itemProps:a,inputProps:t={format:"YN"}})=>{const o=l.Form.useFormInstance(),i=e=>{t.format==="boolean"?o.setFieldValue(a?.name,e.target.checked):o.setFieldValue(a?.name,e.target.checked?"Y":"N"),t.onChange&&t.onChange(e)};return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:e=>({checked:t.format==="boolean"?!!e:e==="Y"}),normalize:e=>typeof e=="boolean"?t.format==="boolean"?e:e?"Y":"N":t.format==="boolean"?!!e:e?"Y":"N",children:s.jsxRuntimeExports.jsx(l.Checkbox,{...t,onChange:i,children:t?.title})})},g={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"},time:{displayFormat:"HH:mm",outputFormat:"HHmm"},datetime:{displayFormat:"YYYY-MM-DD HH:mm",outputFormat:"YYYYMMDDHHmm"}},p=({itemProps:a,inputProps:t,type:o="date",returnType:i="string"})=>{const{displayFormat:e,outputFormat:m}=Y.useMemo(()=>g[o],[o]),x=Y.useMemo(()=>Object.values(g).map(r=>r.outputFormat).sort((r,d)=>{if(r.length===d.length){if(r===m)return-1;if(d===m)return 1}return d.length-r.length}),[m]);return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:r=>({value:r?u.isDayjs(r)?r:u(r,x):null}),normalize:r=>r?i==="dayjs"?r:r.format(m):null,children:s.jsxRuntimeExports.jsx(l.DatePicker,{...t,picker:o==="datetime"?"date":o,showTime:t?.showTime??(o==="datetime"||o==="time"),format:e})})},j=Y.forwardRef(({children:a,labelCol:t,style:o,className:i,...e},m)=>s.jsxRuntimeExports.jsx(l.ConfigProvider,{form:{validateMessages:{required:"'${label}을(를) 입력해주세요.'"}},children:s.jsxRuntimeExports.jsx(l.Form,{ref:m,...e,requiredMark:!1,labelCol:t||{flex:"100px"},style:{padding:"10px",...o},className:`bwg-form ${i??""}`,children:a})}));j.displayName="BwgForm";const w=({itemProps:a,inputProps:t})=>s.jsxRuntimeExports.jsx(c,{...a,children:s.jsxRuntimeExports.jsx(l.Input,{...t})}),{RangePicker:M}=l.DatePicker,h={year:{displayFormat:"YYYY",outputFormat:"YYYY"},month:{displayFormat:"YYYY-MM",outputFormat:"YYYYMM"},date:{displayFormat:"YYYY-MM-DD",outputFormat:"YYYYMMDD"},time:{displayFormat:"HH:mm",outputFormat:"HHmm"},datetime:{displayFormat:"YYYY-MM-DD HH:mm",outputFormat:"YYYYMMDDHHmm"}},y=({itemProps:a,inputProps:t,type:o="date",minDate:i,maxDate:e,returnType:m="string"})=>{const{displayFormat:x,outputFormat:r}=Y.useMemo(()=>h[o],[o]),d=Y.useMemo(()=>Object.values(h).map(n=>n.outputFormat).sort((n,f)=>{if(n.length===f.length){if(n===r)return-1;if(f===r)return 1}return f.length-n.length}),[r]);return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:n=>({value:n&&n.length>0?[n[0]?u.isDayjs(n[0])?n[0]:u(n[0],d):null,n[1]?u.isDayjs(n[1])?n[1]:u(n[1],d):null]:null}),normalize:n=>n?m==="dayjs"?[n[0]??void 0,n[1]??void 0]:[n[0]?n[0].format(r):void 0,n[1]?n[1].format(r):void 0]:[void 0,void 0],children:s.jsxRuntimeExports.jsx(M,{...t,order:!0,minDate:i?u(i,d):void 0,maxDate:e?u(e,d):void 0,picker:o==="datetime"?"date":o,showTime:t?.showTime??(o==="datetime"||o==="time"),format:x})})},R=({itemProps:a,selectProps:t={options:[],allowClear:!0}})=>{const o=l.Form.useFormInstance(),i=!!o,e=Y.useMemo(()=>t?.addField==="ALL"?[{label:"전체",value:""},...t?.options||[]]:t?.addField==="NULL"?[{label:"",value:""},...t?.options||[]]:t?.options||[],[t.options,t.addField]),m=d=>{t.onChange?.(d)},x={...t,allowClear:t.allowClear??!0,options:e,onChange:m,variant:t.variant},r=s.jsxRuntimeExports.jsx(l.Select,{...x,disabled:t.disabled});return t.copyable&&!i&&console.warn("BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."),t.copyable?s.jsxRuntimeExports.jsx(c,{...a,name:void 0,children:s.jsxRuntimeExports.jsxs(l.Space.Compact,{block:!0,children:[s.jsxRuntimeExports.jsx(l.Form.Item,{name:a?.name,rules:a?.rules,style:{width:"100%",marginBottom:0},validateStatus:"",help:"",children:r}),s.jsxRuntimeExports.jsx(l.Typography.Paragraph,{copyable:{text:i&&o?.getFieldValue(a?.name)?.toString()||"",tooltips:["코드복사","코드복사됨"]},style:{margin:0,backgroundColor:"#f5f5f5",borderRadius:"4px",border:"1px solid #d9d9d9",fontSize:"12px",color:"#666",display:"flex",alignItems:"center",height:"30px",padding:"0 8px"}})]})}):s.jsxRuntimeExports.jsx(c,{...a,children:r})},b=({itemProps:a,inputProps:t={format:"YN"}})=>{const o=l.Form.useFormInstance(),i=(e,m)=>{t.format==="boolean"?o.setFieldValue(a?.name,e):o.setFieldValue(a?.name,e?"Y":"N"),t.onChange&&t.onChange(e,m)};return s.jsxRuntimeExports.jsx(c,{...a,getValueProps:e=>({checked:t.format==="boolean"?!!e:e==="Y"}),normalize:e=>typeof e=="boolean"?t.format==="boolean"?e:e?"Y":"N":t.format==="boolean"?!!e:e?"Y":"N",children:s.jsxRuntimeExports.jsx(l.Switch,{...t,onChange:(e,m)=>i(e,m)})})};exports.BwgCheck=F;exports.BwgDatePicker=p;exports.BwgForm=j;exports.BwgFormItem=c;exports.BwgInput=w;exports.BwgRangePicker=y;exports.BwgSelect=R;exports.BwgSwitch=b;
2
- //# sourceMappingURL=BwgSwitch-DOlc57wi.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSwitch-DOlc57wi.cjs","sources":["../../src/components/core/BwgFormItem.tsx","../../src/components/core/BwgCheck.tsx","../../src/components/core/BwgDatePicker.tsx","../../src/components/core/BwgForm.tsx","../../src/components/core/BwgInput.tsx","../../src/components/core/BwgRangePicker.tsx","../../src/components/core/BwgSelect.tsx","../../src/components/core/BwgSwitch.tsx"],"sourcesContent":["import { Form, FormItemProps } from 'antd';\r\nimport React, { memo, ReactNode } from 'react';\r\n\r\nexport interface BwgFormItemProps extends FormItemProps {\r\n /** 폼 아이템 이름 */\r\n name?: string | string[];\r\n /** 폼 아이템 라벨 */\r\n label?: string | ReactNode;\r\n /** 폼 아이템 규칙 */\r\n rules?: any;\r\n /** 폼 아이템 초기값 */\r\n initialValue?: any;\r\n /** 폼 아이템 자식 컴포넌트 */\r\n children?: ReactNode;\r\n}\r\n\r\n/** 입력 폼 아이템 컴포넌트 */\r\nconst BwgFormItem = memo(\r\n ({\r\n children,\r\n label,\r\n name,\r\n rules,\r\n initialValue,\r\n style,\r\n ...rest\r\n }: BwgFormItemProps) => {\r\n const labelStyle = {\r\n fontWeight: 'bold',\r\n };\r\n\r\n // rules에서 required 필드 확인\r\n const isRequired =\r\n Array.isArray(rules) && rules.some((rule: any) => rule.required === true);\r\n\r\n // 라벨 렌더링 함수\r\n const renderLabel = () => {\r\n if (typeof label === 'string') {\r\n return (\r\n <span style={labelStyle}>\r\n {label}\r\n {isRequired && (\r\n <span style={{ color: '#ff4d4f', marginLeft: '4px' }}>*</span>\r\n )}\r\n </span>\r\n );\r\n }\r\n return <span style={labelStyle}>{label}</span>;\r\n };\r\n\r\n return (\r\n <Form.Item\r\n className='bwg-form-item'\r\n label={label ? renderLabel() : undefined}\r\n labelAlign='left'\r\n name={name}\r\n rules={rules}\r\n colon={false}\r\n initialValue={initialValue}\r\n style={style}\r\n {...rest}\r\n >\r\n {children}\r\n </Form.Item>\r\n );\r\n }\r\n);\r\n\r\nexport default BwgFormItem;\r\n","import { Checkbox, CheckboxProps, Form } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type BwgCheckBoxProps = CheckboxProps & {\r\n format?: 'boolean' | 'YN';\r\n};\r\n\r\nexport interface BwgCheckProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgCheckBoxProps;\r\n}\r\n\r\n/**\r\n * 체크박스 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgCheckBoxProps\r\n * @returns \r\n * @example\r\n * <BwgCheck\r\n * itemProps={{ name: 'check' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n */\r\nconst BwgCheck = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgCheckProps) => {\r\n const form = Form.useFormInstance();\r\n\r\n const handleChange = (e: any) => {\r\n //console.log('handleChange :: ', e.target.checked);\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, e.target.checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, e.target.checked ? 'Y' : 'N');\r\n }\r\n\r\n inputProps.onChange && inputProps.onChange(e);\r\n };\r\n\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => {\r\n //console.log('getValueProps :: ', value);\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked }; // ✅ 수정: value 대신 checked 반환\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Checkbox {...inputProps} onChange={handleChange}>\r\n {inputProps?.title}\r\n </Checkbox>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgCheck;\r\n","import { DatePicker } from 'antd';\r\nimport { DatePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgDatePickerProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: DatePickerProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgDatePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n returnType = 'string',\r\n}: BwgDatePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환\r\n value: value\r\n ? dayjs.isDayjs(value)\r\n ? (value as Dayjs)\r\n : dayjs(value as any, allOutputFormats)\r\n : null,\r\n })}\r\n normalize={value => {\r\n // DatePicker에서 넘어온 Dayjs를 returnType에 따라 반환\r\n if (!value) return null;\r\n if (returnType === 'dayjs') return value as Dayjs;\r\n return value.format(outputFormat);\r\n }}\r\n >\r\n <DatePicker\r\n {...inputProps}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 중복되는 handleChange를 제거합니다.\r\n ></DatePicker>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgDatePicker;\r\n","import { ConfigProvider, Form, FormProps } from 'antd';\r\nimport { forwardRef, ReactNode } from 'react';\r\n\r\nexport interface BwgFormProps extends FormProps {\r\n children: ReactNode;\r\n}\r\n\r\nconst BwgForm = forwardRef<any, BwgFormProps>(\r\n ({ children, labelCol, style, className, ...props }, ref) => {\r\n return (\r\n <ConfigProvider\r\n form={{\r\n //기존 rule.message의 default message인 $name을를 입력해주세요를 변경\r\n validateMessages: { required: \"'${label}을(를) 입력해주세요.'\" },\r\n }}\r\n >\r\n <Form\r\n ref={ref}\r\n {...props}\r\n requiredMark={false}\r\n labelCol={labelCol || { flex: '100px' }}\r\n style={{ padding: '10px', ...style }}\r\n className={`bwg-form ${className ?? ''}`}\r\n >\r\n {children}\r\n </Form>\r\n </ConfigProvider>\r\n );\r\n }\r\n);\r\n\r\nBwgForm.displayName = 'BwgForm';\r\n\r\nexport default BwgForm;\r\n","import React, { FC } from 'react';\r\nimport { Input, InputProps } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgInputProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: InputProps;\r\n}\r\n\r\nconst BwgInput: FC<BwgInputProps> = ({ itemProps, inputProps }) => {\r\n return (\r\n <BwgFormItem {...itemProps}>\r\n <Input {...inputProps} />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgInput;\r\n","import { DatePicker } from 'antd';\r\nimport { RangePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nconst { RangePicker } = DatePicker;\r\n\r\nexport interface BwgRangePickerProps {\r\n inputProps?: RangePickerProps;\r\n itemProps?: BwgFormItemProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n minDate?: string;\r\n maxDate?: string;\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgRangePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n minDate,\r\n maxDate,\r\n returnType = 'string',\r\n}: BwgRangePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환\r\n value:\r\n value && value.length > 0\r\n ? [\r\n value[0]\r\n ? dayjs.isDayjs(value[0])\r\n ? (value[0] as Dayjs)\r\n : dayjs(value[0] as any, allOutputFormats)\r\n : null,\r\n value[1]\r\n ? dayjs.isDayjs(value[1])\r\n ? (value[1] as Dayjs)\r\n : dayjs(value[1] as any, allOutputFormats)\r\n : null,\r\n ]\r\n : null,\r\n })}\r\n normalize={(value: [Dayjs, Dayjs] | null) => {\r\n // RangePicker에서 넘어온 dayjs 객체 배열을 현재 type에 맞는 outputFormat으로 변환합니다.\r\n if (!value) {\r\n return [undefined, undefined];\r\n }\r\n if (returnType === 'dayjs') {\r\n return [value[0] ?? undefined, value[1] ?? undefined];\r\n }\r\n return [\r\n value[0] ? value[0].format(outputFormat) : undefined,\r\n value[1] ? value[1].format(outputFormat) : undefined,\r\n ];\r\n }}\r\n >\r\n <RangePicker\r\n {...inputProps}\r\n order={true}\r\n // minDate/maxDate도 모든 포맷으로 파싱하도록 수정\r\n minDate={minDate ? dayjs(minDate, allOutputFormats) : undefined}\r\n maxDate={maxDate ? dayjs(maxDate, allOutputFormats) : undefined}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 제거합니다.\r\n />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgRangePicker;\r\n","import { Form, Select, Space, Typography } from 'antd';\r\nimport { SelectProps } from 'antd/es/select';\r\nimport { useMemo } from 'react';\r\nimport { SimpleCodeItem } from '../../stores/codeStore';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type SelectBoxProps = SelectProps & {\r\n addField?: 'ALL' | 'NULL';\r\n options: SimpleCodeItem[];\r\n copyable?: boolean;\r\n};\r\n\r\nexport interface BwgSelectProps {\r\n /** 폼 아이템 속성 */\r\n itemProps?: BwgFormItemProps;\r\n selectProps?: SelectBoxProps;\r\n}\r\n\r\nconst BwgSelect = ({\r\n itemProps,\r\n selectProps = {\r\n options: [],\r\n allowClear: true,\r\n },\r\n}: BwgSelectProps) => {\r\n // Form 컨텍스트 체크\r\n const form = Form.useFormInstance();\r\n const isFormContext = !!form;\r\n\r\n // 옵션 리스트 메모이제이션\r\n const optionList = useMemo(() => {\r\n if (selectProps?.addField === 'ALL') {\r\n return [{ label: '전체', value: '' }, ...(selectProps?.options || [])];\r\n } else if (selectProps?.addField === 'NULL') {\r\n return [{ label: '', value: '' }, ...(selectProps?.options || [])];\r\n } else {\r\n return selectProps?.options || [];\r\n }\r\n }, [selectProps.options, selectProps.addField]);\r\n\r\n const handleChange = (newValue: string) => {\r\n selectProps.onChange?.(newValue);\r\n };\r\n\r\n // Select 컴포넌트에 전달할 props\r\n const selectComponentProps = {\r\n ...selectProps,\r\n allowClear: selectProps.allowClear ?? true,\r\n options: optionList,\r\n onChange: handleChange,\r\n variant: selectProps.variant,\r\n };\r\n\r\n // console.log(\"selectComponentProps :: \", selectComponentProps);\r\n\r\n const selectComponent = (\r\n <Select {...selectComponentProps} disabled={selectProps.disabled} />\r\n );\r\n\r\n // copyable일 때 Form 컨텍스트 체크\r\n if (selectProps.copyable && !isFormContext) {\r\n console.warn(\r\n 'BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다.'\r\n );\r\n }\r\n\r\n if (selectProps.copyable) {\r\n return (\r\n <BwgFormItem {...itemProps} name={undefined}>\r\n <Space.Compact block>\r\n <Form.Item\r\n name={itemProps?.name}\r\n rules={itemProps?.rules}\r\n style={{ width: '100%', marginBottom: 0 }}\r\n validateStatus=''\r\n help=''\r\n >\r\n {selectComponent}\r\n </Form.Item>\r\n <Typography.Paragraph\r\n copyable={{\r\n text: isFormContext\r\n ? form?.getFieldValue(itemProps?.name)?.toString() || ''\r\n : '',\r\n tooltips: ['코드복사', '코드복사됨'],\r\n }}\r\n style={{\r\n margin: 0,\r\n backgroundColor: '#f5f5f5',\r\n borderRadius: '4px',\r\n border: '1px solid #d9d9d9',\r\n fontSize: '12px',\r\n color: '#666',\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '30px',\r\n padding: '0 8px',\r\n }}\r\n />\r\n </Space.Compact>\r\n </BwgFormItem>\r\n );\r\n } else {\r\n return <BwgFormItem {...itemProps}>{selectComponent}</BwgFormItem>;\r\n }\r\n};\r\n\r\nexport default BwgSelect;\r\n","import { Form, Switch, SwitchProps } from \"antd\";\r\nimport BwgFormItem, { BwgFormItemProps } from \"./BwgFormItem\";\r\n\r\nexport type BwgSwitchItemProps = SwitchProps & {\r\n format?: 'boolean' | 'YN';\r\n };\r\n \r\n export interface BwgSwitchProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgSwitchItemProps;\r\n }\r\n\r\n/**\r\n * 스위치 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgSwitchItemProps\r\n * @returns \r\n * @example\r\n * <BwgSwitch\r\n * itemProps={{ name: 'switch' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n * @returns \r\n */\r\nconst BwgSwitch = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgSwitchProps) => {\r\n const form = Form.useFormInstance();\r\n \r\n const handleChange = (checked: boolean, e: any) => {\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, checked ? 'Y' : 'N');\r\n }\r\n \r\n inputProps.onChange && inputProps.onChange(checked, e as any);\r\n };\r\n\r\n return <BwgFormItem {...itemProps} \r\n getValueProps={value => {\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked };\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Switch {...inputProps} onChange={(checked: boolean, e: any) => handleChange(checked, e)} />\r\n </BwgFormItem>;\r\n};\r\n\r\nexport default BwgSwitch;"],"names":["BwgFormItem","memo","children","label","name","rules","initialValue","style","rest","labelStyle","isRequired","rule","renderLabel","jsxs","jsx","Form","BwgCheck","itemProps","inputProps","form","handleChange","value","Checkbox","formatMap","BwgDatePicker","type","returnType","displayFormat","outputFormat","useMemo","allOutputFormats","f","a","b","dayjs","DatePicker","BwgForm","forwardRef","labelCol","className","props","ref","ConfigProvider","BwgInput","Input","RangePicker","BwgRangePicker","minDate","maxDate","BwgSelect","selectProps","isFormContext","optionList","newValue","selectComponentProps","selectComponent","Select","Space","Typography","BwgSwitch","checked","e","Switch"],"mappings":"mHAiBMA,EAAcC,EAAAA,KAClB,CAAC,CACC,SAAAC,EACA,MAAAC,EACA,KAAAC,EACA,MAAAC,EACA,aAAAC,EACA,MAAAC,EACA,GAAGC,CAAA,IACmB,CACtB,MAAMC,EAAa,CACjB,WAAY,MAAA,EAIRC,EACJ,MAAM,QAAQL,CAAK,GAAKA,EAAM,KAAMM,GAAcA,EAAK,WAAa,EAAI,EAGpEC,EAAc,IACd,OAAOT,GAAU,SAEjBU,EAAAA,kBAAAA,KAAC,OAAA,CAAK,MAAOJ,EACV,SAAA,CAAAN,EACAO,GACCI,EAAAA,kBAAAA,IAAC,OAAA,CAAK,MAAO,CAAE,MAAO,UAAW,WAAY,OAAS,SAAA,GAAA,CAAC,CAAA,EAE3D,EAGGA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,MAAOL,EAAa,SAAAN,EAAM,EAGzC,OACEW,EAAAA,kBAAAA,IAACC,EAAAA,KAAK,KAAL,CACC,UAAU,gBACV,MAAOZ,EAAQS,EAAA,EAAgB,OAC/B,WAAW,OACX,KAAAR,EACA,MAAAC,EACA,MAAO,GACP,aAAAC,EACA,MAAAC,EACC,GAAGC,EAEH,SAAAN,CAAA,CAAA,CAGP,CACF,EC3CMc,EAAW,CAAC,CAChB,UAAAC,EACA,WAAAC,EAAa,CACX,OAAQ,IAAA,CAEZ,IAAqB,CACnB,MAAMC,EAAOJ,EAAAA,KAAK,gBAAA,EAEZK,EAAgB,GAAW,CAE3BF,EAAW,SAAW,UACxBC,EAAK,cAAcF,GAAW,KAAM,EAAE,OAAO,OAAO,EAEpDE,EAAK,cAAcF,GAAW,K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AASC,CAAC,CAAA,CAAG,CAAA,CAAA,CAElG"}
@@ -1,269 +0,0 @@
1
- import { j as m } from "./jsx-runtime-Dpn_P65e.js";
2
- import { Form as f, Checkbox as j, DatePicker as x, ConfigProvider as y, Input as M, Select as b, Space as p, Typography as w, Switch as C } from "antd";
3
- import d from "dayjs";
4
- import { memo as D, useMemo as g, forwardRef as H } from "react";
5
- const Y = D(
6
- ({
7
- children: n,
8
- label: t,
9
- name: o,
10
- rules: l,
11
- initialValue: e,
12
- style: i,
13
- ...c
14
- }) => {
15
- const r = {
16
- fontWeight: "bold"
17
- }, s = Array.isArray(l) && l.some((u) => u.required === !0), a = () => typeof t == "string" ? /* @__PURE__ */ m.jsxs("span", { style: r, children: [
18
- t,
19
- s && /* @__PURE__ */ m.jsx("span", { style: { color: "#ff4d4f", marginLeft: "4px" }, children: "*" })
20
- ] }) : /* @__PURE__ */ m.jsx("span", { style: r, children: t });
21
- return /* @__PURE__ */ m.jsx(
22
- f.Item,
23
- {
24
- className: "bwg-form-item",
25
- label: t ? a() : void 0,
26
- labelAlign: "left",
27
- name: o,
28
- rules: l,
29
- colon: !1,
30
- initialValue: e,
31
- style: i,
32
- ...c,
33
- children: n
34
- }
35
- );
36
- }
37
- ), L = ({
38
- itemProps: n,
39
- inputProps: t = {
40
- format: "YN"
41
- }
42
- }) => {
43
- const o = f.useFormInstance(), l = (e) => {
44
- t.format === "boolean" ? o.setFieldValue(n?.name, e.target.checked) : o.setFieldValue(n?.name, e.target.checked ? "Y" : "N"), t.onChange && t.onChange(e);
45
- };
46
- return /* @__PURE__ */ m.jsx(
47
- Y,
48
- {
49
- ...n,
50
- getValueProps: (e) => ({ checked: t.format === "boolean" ? !!e : e === "Y" }),
51
- normalize: (e) => typeof e == "boolean" ? t.format === "boolean" ? e : e ? "Y" : "N" : t.format === "boolean" ? !!e : e ? "Y" : "N",
52
- children: /* @__PURE__ */ m.jsx(j, { ...t, onChange: l, children: t?.title })
53
- }
54
- );
55
- }, h = {
56
- year: { displayFormat: "YYYY", outputFormat: "YYYY" },
57
- month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
58
- date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
59
- time: { displayFormat: "HH:mm", outputFormat: "HHmm" },
60
- datetime: {
61
- displayFormat: "YYYY-MM-DD HH:mm",
62
- outputFormat: "YYYYMMDDHHmm"
63
- }
64
- }, R = ({
65
- itemProps: n,
66
- inputProps: t,
67
- type: o = "date",
68
- returnType: l = "string"
69
- }) => {
70
- const { displayFormat: e, outputFormat: i } = g(
71
- () => h[o],
72
- [o]
73
- ), c = g(
74
- () => Object.values(h).map((r) => r.outputFormat).sort((r, s) => {
75
- if (r.length === s.length) {
76
- if (r === i) return -1;
77
- if (s === i) return 1;
78
- }
79
- return s.length - r.length;
80
- }),
81
- [i]
82
- // type(outputFormat)이 바뀔 때마다 재정렬
83
- );
84
- return /* @__PURE__ */ m.jsx(
85
- Y,
86
- {
87
- ...n,
88
- getValueProps: (r) => ({
89
- // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환
90
- value: r ? d.isDayjs(r) ? r : d(r, c) : null
91
- }),
92
- normalize: (r) => r ? l === "dayjs" ? r : r.format(i) : null,
93
- children: /* @__PURE__ */ m.jsx(
94
- x,
95
- {
96
- ...t,
97
- picker: o === "datetime" ? "date" : o,
98
- showTime: t?.showTime ?? (o === "datetime" || o === "time"),
99
- format: e
100
- }
101
- )
102
- }
103
- );
104
- }, k = H(
105
- ({ children: n, labelCol: t, style: o, className: l, ...e }, i) => /* @__PURE__ */ m.jsx(
106
- y,
107
- {
108
- form: {
109
- //기존 rule.message의 default message인 $name을를 입력해주세요를 변경
110
- validateMessages: { required: "'${label}을(를) 입력해주세요.'" }
111
- },
112
- children: /* @__PURE__ */ m.jsx(
113
- f,
114
- {
115
- ref: i,
116
- ...e,
117
- requiredMark: !1,
118
- labelCol: t || { flex: "100px" },
119
- style: { padding: "10px", ...o },
120
- className: `bwg-form ${l ?? ""}`,
121
- children: n
122
- }
123
- )
124
- }
125
- )
126
- );
127
- k.displayName = "BwgForm";
128
- const z = ({ itemProps: n, inputProps: t }) => /* @__PURE__ */ m.jsx(Y, { ...n, children: /* @__PURE__ */ m.jsx(M, { ...t }) }), { RangePicker: B } = x, F = {
129
- year: { displayFormat: "YYYY", outputFormat: "YYYY" },
130
- month: { displayFormat: "YYYY-MM", outputFormat: "YYYYMM" },
131
- date: { displayFormat: "YYYY-MM-DD", outputFormat: "YYYYMMDD" },
132
- time: { displayFormat: "HH:mm", outputFormat: "HHmm" },
133
- datetime: {
134
- displayFormat: "YYYY-MM-DD HH:mm",
135
- outputFormat: "YYYYMMDDHHmm"
136
- }
137
- }, T = ({
138
- itemProps: n,
139
- inputProps: t,
140
- type: o = "date",
141
- minDate: l,
142
- maxDate: e,
143
- returnType: i = "string"
144
- }) => {
145
- const { displayFormat: c, outputFormat: r } = g(
146
- () => F[o],
147
- [o]
148
- ), s = g(
149
- () => Object.values(F).map((a) => a.outputFormat).sort((a, u) => {
150
- if (a.length === u.length) {
151
- if (a === r) return -1;
152
- if (u === r) return 1;
153
- }
154
- return u.length - a.length;
155
- }),
156
- [r]
157
- // type(outputFormat)이 바뀔 때마다 재정렬
158
- );
159
- return /* @__PURE__ */ m.jsx(
160
- Y,
161
- {
162
- ...n,
163
- getValueProps: (a) => ({
164
- // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환
165
- value: a && a.length > 0 ? [
166
- a[0] ? d.isDayjs(a[0]) ? a[0] : d(a[0], s) : null,
167
- a[1] ? d.isDayjs(a[1]) ? a[1] : d(a[1], s) : null
168
- ] : null
169
- }),
170
- normalize: (a) => a ? i === "dayjs" ? [a[0] ?? void 0, a[1] ?? void 0] : [
171
- a[0] ? a[0].format(r) : void 0,
172
- a[1] ? a[1].format(r) : void 0
173
- ] : [void 0, void 0],
174
- children: /* @__PURE__ */ m.jsx(
175
- B,
176
- {
177
- ...t,
178
- order: !0,
179
- minDate: l ? d(l, s) : void 0,
180
- maxDate: e ? d(e, s) : void 0,
181
- picker: o === "datetime" ? "date" : o,
182
- showTime: t?.showTime ?? (o === "datetime" || o === "time"),
183
- format: c
184
- }
185
- )
186
- }
187
- );
188
- }, q = ({
189
- itemProps: n,
190
- selectProps: t = {
191
- options: [],
192
- allowClear: !0
193
- }
194
- }) => {
195
- const o = f.useFormInstance(), l = !!o, e = g(() => t?.addField === "ALL" ? [{ label: "전체", value: "" }, ...t?.options || []] : t?.addField === "NULL" ? [{ label: "", value: "" }, ...t?.options || []] : t?.options || [], [t.options, t.addField]), i = (s) => {
196
- t.onChange?.(s);
197
- }, c = {
198
- ...t,
199
- allowClear: t.allowClear ?? !0,
200
- options: e,
201
- onChange: i,
202
- variant: t.variant
203
- }, r = /* @__PURE__ */ m.jsx(b, { ...c, disabled: t.disabled });
204
- return t.copyable && !l && console.warn(
205
- "BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다."
206
- ), t.copyable ? /* @__PURE__ */ m.jsx(Y, { ...n, name: void 0, children: /* @__PURE__ */ m.jsxs(p.Compact, { block: !0, children: [
207
- /* @__PURE__ */ m.jsx(
208
- f.Item,
209
- {
210
- name: n?.name,
211
- rules: n?.rules,
212
- style: { width: "100%", marginBottom: 0 },
213
- validateStatus: "",
214
- help: "",
215
- children: r
216
- }
217
- ),
218
- /* @__PURE__ */ m.jsx(
219
- w.Paragraph,
220
- {
221
- copyable: {
222
- text: l && o?.getFieldValue(n?.name)?.toString() || "",
223
- tooltips: ["코드복사", "코드복사됨"]
224
- },
225
- style: {
226
- margin: 0,
227
- backgroundColor: "#f5f5f5",
228
- borderRadius: "4px",
229
- border: "1px solid #d9d9d9",
230
- fontSize: "12px",
231
- color: "#666",
232
- display: "flex",
233
- alignItems: "center",
234
- height: "30px",
235
- padding: "0 8px"
236
- }
237
- }
238
- )
239
- ] }) }) : /* @__PURE__ */ m.jsx(Y, { ...n, children: r });
240
- }, A = ({
241
- itemProps: n,
242
- inputProps: t = {
243
- format: "YN"
244
- }
245
- }) => {
246
- const o = f.useFormInstance(), l = (e, i) => {
247
- t.format === "boolean" ? o.setFieldValue(n?.name, e) : o.setFieldValue(n?.name, e ? "Y" : "N"), t.onChange && t.onChange(e, i);
248
- };
249
- return /* @__PURE__ */ m.jsx(
250
- Y,
251
- {
252
- ...n,
253
- getValueProps: (e) => ({ checked: t.format === "boolean" ? !!e : e === "Y" }),
254
- normalize: (e) => typeof e == "boolean" ? t.format === "boolean" ? e : e ? "Y" : "N" : t.format === "boolean" ? !!e : e ? "Y" : "N",
255
- children: /* @__PURE__ */ m.jsx(C, { ...t, onChange: (e, i) => l(e, i) })
256
- }
257
- );
258
- };
259
- export {
260
- L as B,
261
- R as a,
262
- k as b,
263
- Y as c,
264
- z as d,
265
- T as e,
266
- q as f,
267
- A as g
268
- };
269
- //# sourceMappingURL=BwgSwitch-D_scwi9_.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BwgSwitch-D_scwi9_.js","sources":["../../src/components/core/BwgFormItem.tsx","../../src/components/core/BwgCheck.tsx","../../src/components/core/BwgDatePicker.tsx","../../src/components/core/BwgForm.tsx","../../src/components/core/BwgInput.tsx","../../src/components/core/BwgRangePicker.tsx","../../src/components/core/BwgSelect.tsx","../../src/components/core/BwgSwitch.tsx"],"sourcesContent":["import { Form, FormItemProps } from 'antd';\r\nimport React, { memo, ReactNode } from 'react';\r\n\r\nexport interface BwgFormItemProps extends FormItemProps {\r\n /** 폼 아이템 이름 */\r\n name?: string | string[];\r\n /** 폼 아이템 라벨 */\r\n label?: string | ReactNode;\r\n /** 폼 아이템 규칙 */\r\n rules?: any;\r\n /** 폼 아이템 초기값 */\r\n initialValue?: any;\r\n /** 폼 아이템 자식 컴포넌트 */\r\n children?: ReactNode;\r\n}\r\n\r\n/** 입력 폼 아이템 컴포넌트 */\r\nconst BwgFormItem = memo(\r\n ({\r\n children,\r\n label,\r\n name,\r\n rules,\r\n initialValue,\r\n style,\r\n ...rest\r\n }: BwgFormItemProps) => {\r\n const labelStyle = {\r\n fontWeight: 'bold',\r\n };\r\n\r\n // rules에서 required 필드 확인\r\n const isRequired =\r\n Array.isArray(rules) && rules.some((rule: any) => rule.required === true);\r\n\r\n // 라벨 렌더링 함수\r\n const renderLabel = () => {\r\n if (typeof label === 'string') {\r\n return (\r\n <span style={labelStyle}>\r\n {label}\r\n {isRequired && (\r\n <span style={{ color: '#ff4d4f', marginLeft: '4px' }}>*</span>\r\n )}\r\n </span>\r\n );\r\n }\r\n return <span style={labelStyle}>{label}</span>;\r\n };\r\n\r\n return (\r\n <Form.Item\r\n className='bwg-form-item'\r\n label={label ? renderLabel() : undefined}\r\n labelAlign='left'\r\n name={name}\r\n rules={rules}\r\n colon={false}\r\n initialValue={initialValue}\r\n style={style}\r\n {...rest}\r\n >\r\n {children}\r\n </Form.Item>\r\n );\r\n }\r\n);\r\n\r\nexport default BwgFormItem;\r\n","import { Checkbox, CheckboxProps, Form } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type BwgCheckBoxProps = CheckboxProps & {\r\n format?: 'boolean' | 'YN';\r\n};\r\n\r\nexport interface BwgCheckProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgCheckBoxProps;\r\n}\r\n\r\n/**\r\n * 체크박스 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgCheckBoxProps\r\n * @returns \r\n * @example\r\n * <BwgCheck\r\n * itemProps={{ name: 'check' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n */\r\nconst BwgCheck = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgCheckProps) => {\r\n const form = Form.useFormInstance();\r\n\r\n const handleChange = (e: any) => {\r\n //console.log('handleChange :: ', e.target.checked);\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, e.target.checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, e.target.checked ? 'Y' : 'N');\r\n }\r\n\r\n inputProps.onChange && inputProps.onChange(e);\r\n };\r\n\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => {\r\n //console.log('getValueProps :: ', value);\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked }; // ✅ 수정: value 대신 checked 반환\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Checkbox {...inputProps} onChange={handleChange}>\r\n {inputProps?.title}\r\n </Checkbox>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgCheck;\r\n","import { DatePicker } from 'antd';\r\nimport { DatePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgDatePickerProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: DatePickerProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgDatePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n returnType = 'string',\r\n}: BwgDatePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 DatePicker가 요구하는 Dayjs로 변환\r\n value: value\r\n ? dayjs.isDayjs(value)\r\n ? (value as Dayjs)\r\n : dayjs(value as any, allOutputFormats)\r\n : null,\r\n })}\r\n normalize={value => {\r\n // DatePicker에서 넘어온 Dayjs를 returnType에 따라 반환\r\n if (!value) return null;\r\n if (returnType === 'dayjs') return value as Dayjs;\r\n return value.format(outputFormat);\r\n }}\r\n >\r\n <DatePicker\r\n {...inputProps}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 중복되는 handleChange를 제거합니다.\r\n ></DatePicker>\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgDatePicker;\r\n","import { ConfigProvider, Form, FormProps } from 'antd';\r\nimport { forwardRef, ReactNode } from 'react';\r\n\r\nexport interface BwgFormProps extends FormProps {\r\n children: ReactNode;\r\n}\r\n\r\nconst BwgForm = forwardRef<any, BwgFormProps>(\r\n ({ children, labelCol, style, className, ...props }, ref) => {\r\n return (\r\n <ConfigProvider\r\n form={{\r\n //기존 rule.message의 default message인 $name을를 입력해주세요를 변경\r\n validateMessages: { required: \"'${label}을(를) 입력해주세요.'\" },\r\n }}\r\n >\r\n <Form\r\n ref={ref}\r\n {...props}\r\n requiredMark={false}\r\n labelCol={labelCol || { flex: '100px' }}\r\n style={{ padding: '10px', ...style }}\r\n className={`bwg-form ${className ?? ''}`}\r\n >\r\n {children}\r\n </Form>\r\n </ConfigProvider>\r\n );\r\n }\r\n);\r\n\r\nBwgForm.displayName = 'BwgForm';\r\n\r\nexport default BwgForm;\r\n","import React, { FC } from 'react';\r\nimport { Input, InputProps } from 'antd';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport interface BwgInputProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: InputProps;\r\n}\r\n\r\nconst BwgInput: FC<BwgInputProps> = ({ itemProps, inputProps }) => {\r\n return (\r\n <BwgFormItem {...itemProps}>\r\n <Input {...inputProps} />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgInput;\r\n","import { DatePicker } from 'antd';\r\nimport { RangePickerProps } from 'antd/es/date-picker';\r\nimport dayjs, { Dayjs } from 'dayjs';\r\nimport { useMemo } from 'react';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nconst { RangePicker } = DatePicker;\r\n\r\nexport interface BwgRangePickerProps {\r\n inputProps?: RangePickerProps;\r\n itemProps?: BwgFormItemProps;\r\n type?: 'year' | 'month' | 'date' | 'time' | 'datetime';\r\n minDate?: string;\r\n maxDate?: string;\r\n returnType?: 'dayjs' | 'string';\r\n}\r\n\r\nconst formatMap = {\r\n year: { displayFormat: 'YYYY', outputFormat: 'YYYY' },\r\n month: { displayFormat: 'YYYY-MM', outputFormat: 'YYYYMM' },\r\n date: { displayFormat: 'YYYY-MM-DD', outputFormat: 'YYYYMMDD' },\r\n time: { displayFormat: 'HH:mm', outputFormat: 'HHmm' },\r\n datetime: {\r\n displayFormat: 'YYYY-MM-DD HH:mm',\r\n outputFormat: 'YYYYMMDDHHmm',\r\n },\r\n};\r\n\r\nconst BwgRangePicker = ({\r\n itemProps,\r\n inputProps,\r\n type = 'date',\r\n minDate,\r\n maxDate,\r\n returnType = 'string',\r\n}: BwgRangePickerProps) => {\r\n // type이 변경될 때 format이 업데이트되도록 useMemo를 사용합니다.\r\n const { displayFormat, outputFormat } = useMemo(\r\n () => formatMap[type],\r\n [type]\r\n );\r\n\r\n // 현재 type의 포맷을 우선순위로 두어 파싱 순서 결정\r\n const allOutputFormats = useMemo(\r\n () =>\r\n Object.values(formatMap)\r\n .map(f => f.outputFormat)\r\n .sort((a, b) => {\r\n if (a.length === b.length) {\r\n if (a === outputFormat) return -1; // 현재 포맷이면 우선순위를 높인다\r\n if (b === outputFormat) return 1;\r\n }\r\n return b.length - a.length;\r\n }),\r\n [outputFormat] // type(outputFormat)이 바뀔 때마다 재정렬\r\n );\r\n return (\r\n <BwgFormItem\r\n {...itemProps}\r\n getValueProps={value => ({\r\n // 폼에 저장된 값(문자열 또는 Dayjs)을 RangePicker가 요구하는 Dayjs 배열로 변환\r\n value:\r\n value && value.length > 0\r\n ? [\r\n value[0]\r\n ? dayjs.isDayjs(value[0])\r\n ? (value[0] as Dayjs)\r\n : dayjs(value[0] as any, allOutputFormats)\r\n : null,\r\n value[1]\r\n ? dayjs.isDayjs(value[1])\r\n ? (value[1] as Dayjs)\r\n : dayjs(value[1] as any, allOutputFormats)\r\n : null,\r\n ]\r\n : null,\r\n })}\r\n normalize={(value: [Dayjs, Dayjs] | null) => {\r\n // RangePicker에서 넘어온 dayjs 객체 배열을 현재 type에 맞는 outputFormat으로 변환합니다.\r\n if (!value) {\r\n return [undefined, undefined];\r\n }\r\n if (returnType === 'dayjs') {\r\n return [value[0] ?? undefined, value[1] ?? undefined];\r\n }\r\n return [\r\n value[0] ? value[0].format(outputFormat) : undefined,\r\n value[1] ? value[1].format(outputFormat) : undefined,\r\n ];\r\n }}\r\n >\r\n <RangePicker\r\n {...inputProps}\r\n order={true}\r\n // minDate/maxDate도 모든 포맷으로 파싱하도록 수정\r\n minDate={minDate ? dayjs(minDate, allOutputFormats) : undefined}\r\n maxDate={maxDate ? dayjs(maxDate, allOutputFormats) : undefined}\r\n // antd DatePicker는 type 대신 picker와 showTime 속성을 사용합니다.\r\n picker={type === 'datetime' ? 'date' : type}\r\n showTime={\r\n inputProps?.showTime ?? (type === 'datetime' || type === 'time')\r\n }\r\n // useMask 속성 관련 로직이 불분명하고, displayFormat을 직접 사용하는 것이 더 확실합니다.\r\n format={displayFormat}\r\n // onChange 이벤트는 BwgFormItem의 normalize로 처리하므로 제거합니다.\r\n />\r\n </BwgFormItem>\r\n );\r\n};\r\n\r\nexport default BwgRangePicker;\r\n","import { Form, Select, Space, Typography } from 'antd';\r\nimport { SelectProps } from 'antd/es/select';\r\nimport { useMemo } from 'react';\r\nimport { SimpleCodeItem } from '../../stores/codeStore';\r\nimport BwgFormItem, { BwgFormItemProps } from './BwgFormItem';\r\n\r\nexport type SelectBoxProps = SelectProps & {\r\n addField?: 'ALL' | 'NULL';\r\n options: SimpleCodeItem[];\r\n copyable?: boolean;\r\n};\r\n\r\nexport interface BwgSelectProps {\r\n /** 폼 아이템 속성 */\r\n itemProps?: BwgFormItemProps;\r\n selectProps?: SelectBoxProps;\r\n}\r\n\r\nconst BwgSelect = ({\r\n itemProps,\r\n selectProps = {\r\n options: [],\r\n allowClear: true,\r\n },\r\n}: BwgSelectProps) => {\r\n // Form 컨텍스트 체크\r\n const form = Form.useFormInstance();\r\n const isFormContext = !!form;\r\n\r\n // 옵션 리스트 메모이제이션\r\n const optionList = useMemo(() => {\r\n if (selectProps?.addField === 'ALL') {\r\n return [{ label: '전체', value: '' }, ...(selectProps?.options || [])];\r\n } else if (selectProps?.addField === 'NULL') {\r\n return [{ label: '', value: '' }, ...(selectProps?.options || [])];\r\n } else {\r\n return selectProps?.options || [];\r\n }\r\n }, [selectProps.options, selectProps.addField]);\r\n\r\n const handleChange = (newValue: string) => {\r\n selectProps.onChange?.(newValue);\r\n };\r\n\r\n // Select 컴포넌트에 전달할 props\r\n const selectComponentProps = {\r\n ...selectProps,\r\n allowClear: selectProps.allowClear ?? true,\r\n options: optionList,\r\n onChange: handleChange,\r\n variant: selectProps.variant,\r\n };\r\n\r\n // console.log(\"selectComponentProps :: \", selectComponentProps);\r\n\r\n const selectComponent = (\r\n <Select {...selectComponentProps} disabled={selectProps.disabled} />\r\n );\r\n\r\n // copyable일 때 Form 컨텍스트 체크\r\n if (selectProps.copyable && !isFormContext) {\r\n console.warn(\r\n 'BwgSelect: copyable 기능은 Form 컨텍스트 내에서만 사용 가능합니다.'\r\n );\r\n }\r\n\r\n if (selectProps.copyable) {\r\n return (\r\n <BwgFormItem {...itemProps} name={undefined}>\r\n <Space.Compact block>\r\n <Form.Item\r\n name={itemProps?.name}\r\n rules={itemProps?.rules}\r\n style={{ width: '100%', marginBottom: 0 }}\r\n validateStatus=''\r\n help=''\r\n >\r\n {selectComponent}\r\n </Form.Item>\r\n <Typography.Paragraph\r\n copyable={{\r\n text: isFormContext\r\n ? form?.getFieldValue(itemProps?.name)?.toString() || ''\r\n : '',\r\n tooltips: ['코드복사', '코드복사됨'],\r\n }}\r\n style={{\r\n margin: 0,\r\n backgroundColor: '#f5f5f5',\r\n borderRadius: '4px',\r\n border: '1px solid #d9d9d9',\r\n fontSize: '12px',\r\n color: '#666',\r\n display: 'flex',\r\n alignItems: 'center',\r\n height: '30px',\r\n padding: '0 8px',\r\n }}\r\n />\r\n </Space.Compact>\r\n </BwgFormItem>\r\n );\r\n } else {\r\n return <BwgFormItem {...itemProps}>{selectComponent}</BwgFormItem>;\r\n }\r\n};\r\n\r\nexport default BwgSelect;\r\n","import { Form, Switch, SwitchProps } from \"antd\";\r\nimport BwgFormItem, { BwgFormItemProps } from \"./BwgFormItem\";\r\n\r\nexport type BwgSwitchItemProps = SwitchProps & {\r\n format?: 'boolean' | 'YN';\r\n };\r\n \r\n export interface BwgSwitchProps {\r\n itemProps?: BwgFormItemProps;\r\n inputProps?: BwgSwitchItemProps;\r\n }\r\n\r\n/**\r\n * 스위치 컴포넌트\r\n * @param itemProps - BwgFormItemProps\r\n * @param inputProps - BwgSwitchItemProps\r\n * @returns \r\n * @example\r\n * <BwgSwitch\r\n * itemProps={{ name: 'switch' }}\r\n * inputProps={{ format: 'YN' }}\r\n * />\r\n * @returns \r\n */\r\nconst BwgSwitch = ({\r\n itemProps,\r\n inputProps = {\r\n format: 'YN',\r\n },\r\n}: BwgSwitchProps) => {\r\n const form = Form.useFormInstance();\r\n \r\n const handleChange = (checked: boolean, e: any) => {\r\n if (inputProps.format === 'boolean') {\r\n form.setFieldValue(itemProps?.name, checked);\r\n } else {\r\n form.setFieldValue(itemProps?.name, checked ? 'Y' : 'N');\r\n }\r\n \r\n inputProps.onChange && inputProps.onChange(checked, e as any);\r\n };\r\n\r\n return <BwgFormItem {...itemProps} \r\n getValueProps={value => {\r\n const checked =\r\n inputProps.format === 'boolean'\r\n ? Boolean(value)\r\n : value === 'Y'\r\n ? true\r\n : false;\r\n return { checked };\r\n }}\r\n normalize={value => {\r\n //console.log('normalize :: ', value);\r\n // 체크박스의 경우 e.target.checked 값이 전달되므로 이를 처리\r\n if (typeof value === 'boolean') {\r\n if (inputProps.format === 'boolean') {\r\n return value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }\r\n // 문자열이나 다른 값의 경우 기존 로직 유지\r\n if (inputProps.format === 'boolean') {\r\n return !!value;\r\n }\r\n return value ? 'Y' : 'N';\r\n }}\r\n >\r\n <Switch {...inputProps} onChange={(checked: boolean, e: any) => handleChange(checked, e)} />\r\n </BwgFormItem>;\r\n};\r\n\r\nexport default BwgSwitch;"],"names":["BwgFormItem","memo","children","label","name","rules","initialValue","style","rest","labelStyle","isRequired","rule","renderLabel","jsxs","jsx","Form","BwgCheck","itemProps","inputProps","form","handleChange","value","Checkbox","formatMap","BwgDatePicker","type","returnType","displayFormat","outputFormat","useMemo","allOutputFormats","f","a","b","dayjs","DatePicker","BwgForm","forwardRef","labelCol","className","props","ref","ConfigProvider","BwgInput","Input","RangePicker","BwgRangePicker","minDate","maxDate","BwgSelect","selectProps","isFormContext","optionList","newValue","selectComponentProps","selectComponent","Select","Space","Typography","BwgSwitch","checked","e","Switch"],"mappings":";;;;AAiBA,MAAMA,IAAcC;AAAA,EAClB,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MACmB;AACtB,UAAMC,IAAa;AAAA,MACjB,YAAY;AAAA,IAAA,GAIRC,IACJ,MAAM,QAAQL,CAAK,KAAKA,EAAM,KAAK,CAACM,MAAcA,EAAK,aAAa,EAAI,GAGpEC,IAAc,MACd,OAAOT,KAAU,WAEjBU,gBAAAA,EAAAA,KAAC,QAAA,EAAK,OAAOJ,GACV,UAAA;AAAA,MAAAN;AAAA,MACAO,KACCI,gBAAAA,EAAAA,IAAC,QAAA,EAAK,OAAO,EAAE,OAAO,WAAW,YAAY,SAAS,UAAA,IAAA,CAAC;AAAA,IAAA,GAE3D,IAGGA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,OAAOL,GAAa,UAAAN,GAAM;AAGzC,WACEW,gBAAAA,EAAAA;AAAAA,MAACC,EAAK;AAAA,MAAL;AAAA,QACC,WAAU;AAAA,QACV,OAAOZ,IAAQS,EAAA,IAAgB;AAAA,QAC/B,YAAW;AAAA,QACX,MAAAR;AAAA,QACA,OAAAC;AAAA,QACA,OAAO;AAAA,QACP,cAAAC;AAAA,QACA,OAAAC;AAAA,QACC,G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