@bwg-ui/core 1.3.2 → 1.3.3

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 (60) hide show
  1. package/dist/chunks/{CMSearchIntfGwP01-Bx5cpkhH.js → CMSearchIntfGwP01-Co6lrDf9.js} +9 -9
  2. package/dist/chunks/CMSearchIntfGwP01-Do_ZDjmX.cjs +1 -0
  3. package/dist/chunks/{MenuReport-DxJIaW8D.js → MenuReport-BTtoDFz-.js} +146 -141
  4. package/dist/chunks/MenuReport-Bn5NyNel.cjs +1 -0
  5. package/dist/chunks/{common-components-dzN5Nuq0.js → common-components-0IMhPxxg.js} +11521 -10978
  6. package/dist/chunks/common-components-Csd3OioX.cjs +1109 -0
  7. package/dist/chunks/core-components-CX6NGtTh.cjs +1 -0
  8. package/dist/chunks/core-components-Ckwf4Rd7.js +1969 -0
  9. package/dist/chunks/layout-components-BMLp8YAy.cjs +38 -0
  10. package/dist/chunks/{layout-components-B25FFvXj.js → layout-components-DphZY34c.js} +942 -741
  11. package/dist/components/common/index.cjs +1 -1
  12. package/dist/components/common/index.js +1 -1
  13. package/dist/components/core/BwgEmpSearch.d.ts +28 -0
  14. package/dist/components/core/BwgEmpSearch.d.ts.map +1 -0
  15. package/dist/components/core/index.cjs +1 -1
  16. package/dist/components/core/index.js +22 -1846
  17. package/dist/components/guide/index.cjs +1 -1
  18. package/dist/components/guide/index.js +13 -13
  19. package/dist/components/layout/AppWrapper.d.ts +2 -1
  20. package/dist/components/layout/AppWrapper.d.ts.map +1 -1
  21. package/dist/components/layout/BwgCoreLogin.d.ts +1 -2
  22. package/dist/components/layout/BwgCoreLogin.d.ts.map +1 -1
  23. package/dist/components/layout/BwgSessionNotice.d.ts +15 -0
  24. package/dist/components/layout/BwgSessionNotice.d.ts.map +1 -0
  25. package/dist/components/layout/BwgSsoLogin.d.ts +19 -0
  26. package/dist/components/layout/BwgSsoLogin.d.ts.map +1 -0
  27. package/dist/components/layout/custom/ConfigurableHeader.d.ts.map +1 -1
  28. package/dist/components/layout/index.cjs +1 -1
  29. package/dist/components/layout/index.d.ts +2 -0
  30. package/dist/components/layout/index.d.ts.map +1 -1
  31. package/dist/components/layout/index.js +16 -14
  32. package/dist/components/pages/board/CMAdminBoardM01.d.ts.map +1 -1
  33. package/dist/components/pages/board/CMMyBoardM01.d.ts.map +1 -1
  34. package/dist/components/popup/MenuReport.d.ts.map +1 -1
  35. package/dist/components/popup/SearchOrganizationP01.d.ts +1 -1
  36. package/dist/components/popup/SearchOrganizationP01.d.ts.map +1 -1
  37. package/dist/components/popup/index.cjs +1 -1
  38. package/dist/components/popup/index.js +1 -1
  39. package/dist/index.cjs +1 -1
  40. package/dist/index.js +160 -157
  41. package/dist/stores/index.cjs +2 -2
  42. package/dist/stores/index.d.ts +2 -1
  43. package/dist/stores/index.d.ts.map +1 -1
  44. package/dist/stores/index.js +368 -335
  45. package/dist/stores/loginStore.d.ts +55 -10
  46. package/dist/stores/loginStore.d.ts.map +1 -1
  47. package/dist/stores/userStore.d.ts +1 -2
  48. package/dist/stores/userStore.d.ts.map +1 -1
  49. package/dist/styles/assets/images/header/icon/ico-bell.svg +3 -3
  50. package/dist/styles/assets/images/header/icon/ico-logout.svg +10 -10
  51. package/dist/styles/assets/images/header/icon/ico-setting.svg +4 -4
  52. package/dist/styles/assets/images/header/icon/ico-sidebar-arrow.svg +3 -3
  53. package/dist/utils/index.cjs +1 -1
  54. package/dist/utils/index.d.ts.map +1 -1
  55. package/dist/utils/index.js +455 -454
  56. package/package.json +1 -1
  57. package/dist/chunks/CMSearchIntfGwP01-Uhl4uqiV.cjs +0 -1
  58. package/dist/chunks/MenuReport-CPwq8w-z.cjs +0 -1
  59. package/dist/chunks/common-components-Dd_AsKs7.cjs +0 -1109
  60. package/dist/chunks/layout-components-Cz7Zets7.cjs +0 -35
@@ -4,8 +4,8 @@ import { message as V } from "antd";
4
4
  import { useRef as x, useState as m, useMemo as N, useCallback as R, useEffect as B } from "react";
5
5
  import p from "dayjs";
6
6
  import { generateUID as te, callService as ae } from "../utils/index.js";
7
- import { m as oe, C as re, d as ne, S as se, i as E, j as g, e as ce, h as le, n as de } from "./common-components-dzN5Nuq0.js";
8
- import { BwgInput as ie, BwgSelect as me, BwgRangePicker as M, BwgButton as ge } from "../components/core/index.js";
7
+ import { m as oe, C as re, d as ne, S as se, i as E, j as g, e as ce, h as le, n as de } from "./common-components-0IMhPxxg.js";
8
+ import { b as ie, c as me, j as M, B as ge } from "./core-components-Ckwf4Rd7.js";
9
9
  const fe = [
10
10
  { label: "전체", value: "" },
11
11
  { label: "기안", value: "DRAFT" },
@@ -13,7 +13,7 @@ const fe = [
13
13
  { label: "승인", value: "APPROVED" },
14
14
  { label: "반려", value: "REJECTED" }
15
15
  ], Pe = ({ popup: c, onClose: H }) => {
16
- const v = x(null), b = x(null), K = x(null), [A, O] = m([]), [T, $] = m(!1), [f, I] = m(null), [L, F] = m(1), [h, U] = m(10), [G, j] = m(0), z = N(() => {
16
+ const v = x(null), b = x(null), K = x(null), [A, O] = m([]), [T, $] = m(!1), [f, I] = m(null), [L, j] = m(1), [h, U] = m(10), [F, G] = m(0), z = N(() => {
17
17
  const o = p(), s = [];
18
18
  for (let a = 1; a <= 120; a++) {
19
19
  const r = [
@@ -50,14 +50,14 @@ const fe = [
50
50
  aprvKey: e.aprvKey ?? void 0
51
51
  })
52
52
  );
53
- O(l), j(Number(n?.totalCount ?? n?.total ?? l.length));
53
+ O(l), G(Number(n?.totalCount ?? n?.total ?? l.length));
54
54
  return;
55
55
  }
56
56
  const C = z.filter((n) => {
57
57
  const l = d.keyword?.trim()?.toLowerCase(), e = !l || n.gwDcmtKey.toLowerCase().includes(l) || n.gwDcmtNm.toLowerCase().includes(l) || n.userId.toLowerCase().includes(l) || n.dprtNo.toLowerCase().includes(l), D = !d.status || n.aprvStts === d.status, i = d.createdAt, X = !i || (p(n.createdAt).isAfter(i[0].startOf("day")) || p(n.createdAt).isSame(i[0], "day")) && (p(n.createdAt).isBefore(i[1].endOf("day")) || p(n.createdAt).isSame(i[1], "day"));
58
58
  return e && D && X;
59
59
  });
60
- j(C.length);
60
+ G(C.length);
61
61
  const S = (r - 1) * w, _ = C.slice(S, S + w);
62
62
  O(_);
63
63
  } catch {
@@ -72,10 +72,10 @@ const fe = [
72
72
  u();
73
73
  }, []);
74
74
  const J = R(() => {
75
- F(1), u(1, h);
75
+ j(1), u(1, h);
76
76
  }, [u, h]), q = R(
77
77
  (o, s) => {
78
- F(o), U(s), u(o, s);
78
+ j(o), U(s), u(o, s);
79
79
  },
80
80
  [u]
81
81
  ), k = R(() => {
@@ -179,8 +179,8 @@ const fe = [
179
179
  return B(() => {
180
180
  v.current && v.current.addAllData(A || []);
181
181
  }, [A]), B(() => {
182
- b.current && b.current.setTotalData(G || 0);
183
- }, [G]), /* @__PURE__ */ t(
182
+ b.current && b.current.setTotalData(F || 0);
183
+ }, [F]), /* @__PURE__ */ t(
184
184
  oe,
185
185
  {
186
186
  popup: c,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),U=require("@ant-design/icons"),L=require("antd"),o=require("react"),p=require("dayjs"),F=require("../utils/index.cjs"),l=require("./common-components-Csd3OioX.cjs"),h=require("./core-components-CX6NGtTh.cjs"),W=[{label:"전체",value:""},{label:"기안",value:"DRAFT"},{label:"결재중",value:"IN_PROGRESS"},{label:"승인",value:"APPROVED"},{label:"반려",value:"REJECTED"}],Y=({popup:i,onClose:G})=>{const D=o.useRef(null),P=o.useRef(null),B=o.useRef(null),[j,v]=o.useState([]),[k,A]=o.useState(!1),[m,N]=o.useState(null),[I,E]=o.useState(1),[C,M]=o.useState(10),[K,O]=o.useState(0),T=o.useMemo(()=>{const a=p(),c=[];for(let s=1;s<=120;s++){const n=["DRAFT","IN_PROGRESS","APPROVED","REJECTED"];c.push({gwDcmtKey:`GW-${String(1e4+s)}`,gwDcmtNm:`업무 기안서 #${s}`,userId:`user${s%7+1}`,dprtNo:["HR","GEN","DEV1","DEV2","FIN"][s%5],aprvStts:n[s%n.length],aprvKey:F.generateUID(),createdAt:a.add(-(s%45),"day").hour(9+s%8).toISOString()})}return c},[]),w=o.useCallback(async(a,c)=>{A(!0),N(null);try{const s=B.current?.getFormData?.()??{},n=a??I,f=c??C,u={...s,page:n,pageSize:f},y=i?.popupParams?.serviceCode;if(y){const r=await F.callService(y,u),d=(r?.list||r?.data||[]).map(t=>({gwDcmtKey:t.gwDcmtKey??t.docNo??t.doc_id??t.id??"",gwDcmtNm:t.gwDcmtNm??t.title??t.subject??"",userId:t.userId??t.drafter??t.writerName??"",dprtNo:t.dprtNo??t.deptName??t.department??"",aprvStts:t.aprvStts??t.status??"DRAFT",createdAt:t.createdAt??t.writeYmd??t.created_at??"",aprvKey:t.aprvKey??void 0}));v(d),O(Number(r?.totalCount??r?.total??d.length));return}const S=T.filter(r=>{const d=u.keyword?.trim()?.toLowerCase(),t=!d||r.gwDcmtKey.toLowerCase().includes(d)||r.gwDcmtNm.toLowerCase().includes(d)||r.userId.toLowerCase().includes(d)||r.dprtNo.toLowerCase().includes(d),R=!u.status||r.aprvStts===u.status,g=u.createdAt,H=!g||(p(r.createdAt).isAfter(g[0].startOf("day"))||p(r.createdAt).isSame(g[0],"day"))&&(p(r.createdAt).isBefore(g[1].endOf("day"))||p(r.createdAt).isSame(g[1],"day"));return t&&R&&H});O(S.length);const x=(n-1)*f,$=S.slice(x,x+f);v($)}catch{L.message.error("목록 조회 중 오류가 발생했습니다.")}finally{A(!1)}},[I,C,i?.popupParams,T]);o.useEffect(()=>{w()},[]);const q=o.useCallback(()=>{E(1),w(1,C)},[w,C]),z=o.useCallback((a,c)=>{E(a),M(c),w(a,c)},[w]),b=o.useCallback(()=>{if(!m){L.message.warning("항목을 선택해주세요.");return}const a=i?.config;a?.onSelect?a.onSelect(m):i?.popupParams?.onSelect?i.popupParams.onSelect(m):i?.config?.callback&&i.config.callback(m),a?.onClose?.(),i?.close?.()},[m,i]),J=o.useMemo(()=>[{fieldName:"gwDcmtKey",name:"gwDcmtKey",header:{text:"문서번호"},width:140},{fieldName:"gwDcmtNm",name:"gwDcmtNm",header:{text:"제목"},width:260,button:"action"},{fieldName:"userId",name:"userId",header:{text:"기안자"},width:120},{fieldName:"aprvKey",name:"aprvKey",header:{text:"기안연계키값"},width:120},{fieldName:"dprtNo",name:"dprtNo",header:{text:"기안부서"},width:140},{fieldName:"aprvStts",name:"aprvStts",header:{text:"상태"},width:110},{fieldName:"createdAt",name:"createdAt",header:{text:"기안일"},width:160}],[]),_=o.useMemo(()=>({header:{height:40},display:{rowHeight:36},container:{indicator:!0,check:!1,footer:!1},edit:{editable:!1}}),[]),V=o.useMemo(()=>({onCellClicked:(a,c)=>{try{const s=c?.itemIndex??c?.dataRow??-1;if(s<0)return;const n=a.getDataSource()?.getJsonRow(s);n&&N(n)}catch{}},onCellDblClicked:(a,c)=>{try{const s=c?.itemIndex??c?.dataRow??-1;if(s<0)return;const n=a.getDataSource()?.getJsonRow(s);n&&(N(n),setTimeout(()=>b(),0))}catch{}},onCellButtonClicked(a,c,s){if(c.dataRow===void 0)return;let n=a.getDataSource().getJsonRow(c.dataRow);const f="https://kgwd.krx.co.kr/ezConn/ezApprGate.do",u="width=1000,height=600";console.log(n);const y=n?.dprtNo,S=n?.emplNo,x=n?.aprvKey,r=`${n?.formId}:${y}:${S}:${x}:SAMP`;console.log("@@ params",r);const d=new TextEncoder().encode(r),t=Array.from(d,g=>String.fromCharCode(g)).join(""),R=`${f}?connkey=${btoa(t)}`;console.log("@@ url",R),window.open(R,"_blank",u)}}),[b]);return o.useEffect(()=>{D.current&&D.current.addAllData(j||[])},[j]),o.useEffect(()=>{P.current&&P.current.setTotalData(K||0)},[K]),e.jsx(l.BwgPopup,{popup:i,buttons:[{id:"confirm",label:"확인",type:"primary",onClick:b}],onClose:()=>{i?.config?.onClose?.(),G?.(),i?.close?.()},children:e.jsx(l.ContentLayOut,{children:e.jsxs(l.ContentBox,{border:!1,style:{paddingBottom:16},children:[e.jsx(l.SearchBox,{ref:B,reqRows:e.jsx(e.Fragment,{children:e.jsx(l.BwgRow,{children:e.jsxs(l.BwgCol,{span:24,children:[e.jsx(l.BwgTitleBox,{title:"기안 검색"}),e.jsxs(l.BwgRow,{gutter:[12,8],style:{marginTop:8},children:[e.jsx(l.BwgCol,{span:8,children:e.jsx(h.BwgInput,{inputProps:{placeholder:"제목/기안자/부서/문서번호",prefix:e.jsx(U.SearchOutlined,{}),allowClear:!0,onPressEnter:q},itemProps:{name:"keyword"}})}),e.jsx(l.BwgCol,{span:6,children:e.jsx(h.BwgSelect,{selectProps:{options:W},itemProps:{label:"상태",name:"status"}})}),e.jsxs(l.BwgCol,{span:8,children:[e.jsx(h.BwgRangePicker,{type:"datetime",itemProps:{label:"기안일",name:"createdAt"},inputProps:{style:{width:"100%"},allowEmpty:[!1,!1]}}),e.jsx(h.BwgRangePicker,{type:"datetime",itemProps:{label:"기안완료일",name:"completedAt"},inputProps:{style:{width:"100%"},allowEmpty:[!1,!1]}})]}),e.jsx(l.BwgCol,{span:2,children:e.jsx(h.BwgButton,{type:"primary",onClick:q,loading:k,style:{width:"100%"},children:"검색"})})]})]})})})}),e.jsx(l.BwgGrid,{ref:D,type:"nrml",gridColumns:J,gridOptions:_,gridEvents:V}),e.jsx(l.BwgPagination,{ref:P,mode:"server",onServerPageChange:z,pageSizeOptions:[10,20,50,100]}),j.length===0&&!k&&e.jsx(l.BwgRow,{style:{display:"none"},children:e.jsx(l.BwgCol,{span:24,children:e.jsx("span",{})})})]})})})};exports.default=Y;