@bwg-ui/core 1.2.30 → 1.2.32
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/{CMSearchIntfGwP01-CIf-fHXy.js → CMSearchIntfGwP01-C_y_G3xh.js} +108 -94
- package/dist/chunks/CMSearchIntfGwP01-uJxdFXUb.cjs +1 -0
- package/dist/chunks/{MenuReport-DQS5SAmi.cjs → MenuReport-DkWB3Yyc.cjs} +1 -1
- package/dist/chunks/{MenuReport-GeXRkcDD.js → MenuReport-XwdiwiFn.js} +1 -1
- package/dist/chunks/{common-components-DNos8aEG.js → common-components-Cxh8PLBH.js} +5 -5
- package/dist/chunks/{common-components-CyqUT5Vj.cjs → common-components-DcTm1Tn1.cjs} +1 -1
- package/dist/chunks/layout-components-B4ptqDmC.cjs +35 -0
- package/dist/chunks/{layout-components-C4ehuALr.js → layout-components-Bp6b-T1V.js} +495 -474
- package/dist/components/common/BwgPopup.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/BwgMaskedPicker.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +683 -615
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/popup/CMSearchIntfGwP01.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/provider/contexts/ServiceCodeContext.d.ts.map +1 -1
- package/dist/provider/index.cjs +1 -1
- package/dist/provider/index.js +90 -90
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/styles/layout.css +1234 -1176
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/CMSearchIntfGwP01-C4Kg1iWo.cjs +0 -1
- package/dist/chunks/layout-components-USIA9TVn.cjs +0 -35
- package/dist/components/common/BwgDraggable.d.ts +0 -25
- package/dist/components/common/BwgDraggable.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../chunks/common-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../chunks/common-components-DcTm1Tn1.cjs"),a=require("react"),w=require("antd"),o=require("../../utils/index.cjs"),l=require("../core/index.cjs"),B=require("../../provider/index.cjs"),y=()=>e.jsx(t.BwgSpace,{children:"BwgComponentGuide"}),b=()=>e.jsx(t.BwgSpace,{children:"BwgDeveloperGuide"}),f=()=>{const s=a.useRef(null),r=a.useRef(null),[u,m]=a.useState(""),n=a.useMemo(()=>[{reqNo:"REQ-2025-001",eventType:"결혼",employeeId:"E001",employeeName:"김지원",relation:"본인",eventDate:"2025-10-05",amount:"200000",docTitle:"본인 결혼 경조사",note:"",requestDate:"2025-10-01",status:"접수",fileGrpKey:"293",aprvKey:"4d04f9f9a0ca4de8b475bc0b86263e7"},{reqNo:"REQ-2025-002",eventType:"출산",employeeId:"E002",employeeName:"박지영",relation:"배우자",eventDate:"2025-09-28",amount:"150000",docTitle:"배우자 출산 경조사",note:"증빙 파일 첨부",requestDate:"2025-09-29",status:"완료",fileGrpKey:"294"},{reqNo:"REQ-2025-003",eventType:"조의",employeeId:"E003",employeeName:"이도현",relation:"부모",eventDate:"2025-10-10",amount:"100000",docTitle:"부모상 조의",note:"",requestDate:"2025-10-11",status:"진행",fileGrpKey:"295"}],[]),d=a.useMemo(()=>[{fieldName:"reqNo",width:120,header:{text:"신청번호"},styleName:"center"},{fieldName:"aprvKey",width:120,header:{text:"그룹웨어 신청번호"},styleName:"center"},{fieldName:"eventType",width:110,header:{text:"경조구분"},styleName:"center"},{fieldName:"employeeName",width:120,header:{text:"대상자"},styleName:"left"},{fieldName:"relation",width:100,header:{text:"관계"},styleName:"center"},{fieldName:"amount",width:120,header:{text:"금액"},styleName:"right"},{fieldName:"docTitle",width:120,header:{text:"제목"},styleName:"left"},{fieldName:"requestDate",width:130,header:{text:"신청일자"},styleName:"center"},{fieldName:"status",width:100,header:{text:"상태"},styleName:"center"},{fieldName:"fileGrpKey",width:100,header:{text:"파일그룹키"},styleName:"center"},{fieldName:"testData",width:100,header:{text:"테스트 값"},lookupDisplay:!0,labels:["메인메뉴","서브메뉴","프로그램"],values:["CMPRGRM","CMPRGRS","CMPRGRP"]}],[]),c=a.useCallback((i,p)=>{const x=i.getDataSource().getJsonRow(p.dataRow);m(x.fileGrpKey)},[]),h=a.useMemo(()=>({onCurrentChanged:c}),[c]),g={search:()=>{s.current?.addAllData?.(n)},new:()=>{r.current?.resetFields?.(),r.current?.setFieldsValue?.({status:"임시"})}};return e.jsxs(t.ContentLayOut,{type:"horizontal",children:[e.jsxs(t.ContentBox,{border:!0,children:[e.jsx(t.BwgTitleBox,{title:"경조사비 신청",children:e.jsx(t.ButtonAccessController,{buttons:[{id:"search",label:"조회",onClick:()=>{g.search()}},{id:"new",label:"신규",onClick:()=>{g.new()}}]})}),e.jsx(t.BwgGrid,{ref:s,bindRef:r,gridColumns:d,gridEvents:h,gridInitCallback:()=>{s.current?.addAllData?.(n)},gridOptions:{edit:{editable:!0}}})]}),e.jsxs(t.ContentBox,{border:!0,style:{width:"40%"},children:[e.jsx(t.BwgTitleBox,{title:"상세 정보",children:e.jsx(l.BwgButton,{size:"small",onClick:()=>{const i=r.current?.getFieldsValue()?.fileGrpKey;console.log(i),o.submitGwApproval().then(p=>{console.log(p)})},children:"기안"})}),e.jsxs(l.BwgForm,{ref:r,children:[e.jsx(w.Divider,{orientation:"left",plain:!0,children:"기본 정보"}),e.jsxs(t.BwgRow,{style:{marginBottom:8},children:[e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgInput,{itemProps:{name:"reqNo",label:"신청번호"},inputProps:{disabled:!0}})}),e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgSelect,{itemProps:{name:"status",label:"상태"},selectProps:{options:[{label:"임시",value:"임시"},{label:"접수",value:"접수"},{label:"진행",value:"진행"},{label:"완료",value:"완료"},{label:"반려",value:"반려"}]}})})]}),e.jsxs(t.BwgRow,{style:{marginBottom:8},children:[e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgSelect,{itemProps:{name:"eventType",label:"경조구분"},selectProps:{options:[{label:"결혼",value:"결혼"},{label:"출산",value:"출산"},{label:"조의",value:"조의"},{label:"기타",value:"기타"}]}})}),e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgSelect,{itemProps:{name:"relation",label:"관계"},selectProps:{options:[{label:"본인",value:"본인"},{label:"배우자",value:"배우자"},{label:"부모",value:"부모"},{label:"자녀",value:"자녀"},{label:"형제자매",value:"형제자매"},{label:"기타",value:"기타"}]}})})]}),e.jsxs(t.BwgRow,{style:{marginBottom:8},children:[e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgInput,{itemProps:{name:"employeeId",label:"사번"}})}),e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgInput,{itemProps:{name:"employeeName",label:"대상자"}})})]}),e.jsxs(t.BwgRow,{style:{marginBottom:8},children:[e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgDatePicker,{type:"date",itemProps:{name:"eventDate",label:"경조일자"}})}),e.jsx(t.BwgCol,{span:12,children:e.jsx(l.BwgInput,{itemProps:{name:"amount",label:"금액"},inputProps:{placeholder:"숫자만",style:{textAlign:"right"}}})})]}),e.jsx(t.BwgRow,{style:{marginBottom:8},children:e.jsx(t.BwgCol,{span:24,children:e.jsx(l.BwgInput,{itemProps:{name:"docTitle",label:"제목"}})})}),e.jsx(w.Divider,{style:{margin:"8px 0"}}),e.jsx(l.BwgInput,{itemProps:{name:"aprvKey",label:"그룹웨어 신청번호"}}),e.jsx(l.BwgInput,{itemProps:{name:"fileGrpKey",label:"파일그룹키"},inputProps:{disabled:!0}}),e.jsx(l.BwgUploader,{itemProps:{name:"files",label:"첨부파일"},fileGrpKey:u,onUploadComplete:i=>{console.log(i)}})]})]})]})},C=()=>{a.useEffect(()=>{s.current&&s.current.addAllData(m)},[]),B.usePopup(),a.useRef(null),a.useRef(null),a.useRef(null),a.useRef(null);const s=a.useRef(null),r=a.useRef(null),u=[{fieldName:"sysCd",width:100,header:{text:"시스템 코드"}},{fieldName:"aprvKey",width:100,header:{text:"연계Key"}},{fieldName:"dcmtGb",width:100,header:{text:"GW/내부결제 구분"}},{fieldName:"formId",width:100,header:{text:"FormId"}},{fieldName:"docTitle",width:100,header:{text:"문서 제목"}},{fieldName:"aprvStts",width:100,header:{text:"결재 상태"}},{fieldName:"draftDt",width:100,header:{text:"기안 날짜"}}],m=[{a0:"a0",a1:"a1",a2:"a2",a3:"a3",ab1:"ab1"}];return e.jsx(t.ContentLayOut,{children:e.jsxs(t.ContentBox,{className:"ml10",children:[e.jsx(t.BwgTitleBox,{title:"전자결재 목록",children:e.jsx(l.BwgButton,{onClick:()=>{o.callService("SCMINTF00101",{crprCd:o.getCrprCd(),sysCd:__SYS_CD__}).then(n=>{r.current?.addAllData(n.sub)})},children:"조회"})}),e.jsx(t.BwgGrid,{gridColumns:u,gridEvents:{onCellDblClicked(n,d){console.log(d);const c=n.getDataSource().getJsonRow(d.dataRow);o.openGwDraftByAprvKey(c.aprvKey)}},ref:r,gridInitCallback:()=>{o.callService("SCMINTF00101",{crprCd:o.getCrprCd(),sysCd:__SYS_CD__}).then(n=>{r.current?.addAllData(n.sub)})}})]})})},j=()=>e.jsx(t.BwgView,{buttons:{grant:[{id:"search",label:"조회",onClick:()=>{console.log("search")}},{id:"new",label:"신규",onClick:()=>{console.log("new")}}],custom:[{id:"manual",label:"매뉴얼",onClick:()=>{console.log("manual")}}]},children:e.jsx(t.BwgTabs,{items:[{key:"M01S00",label:"경조사비 신청",children:e.jsx(f,{})},{key:"M01S01",label:"기안연계 목록",children:e.jsx(C,{})}]})});exports.BwgComponentGuide=y;exports.BwgDeveloperGuide=b;exports.BwgPracticeGuide=j;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { b as B, C as D, d as f, e as g, f as K, h as P, i as s, j as l, k, l as S } from "../../chunks/common-components-
|
|
2
|
+
import { b as B, C as D, d as f, e as g, f as K, h as P, i as s, j as l, k, l as S } from "../../chunks/common-components-Cxh8PLBH.js";
|
|
3
3
|
import { useRef as n, useState as T, useMemo as b, useCallback as M, useEffect as I } from "react";
|
|
4
4
|
import { Divider as C } from "antd";
|
|
5
5
|
import { submitGwApproval as E, callService as N, getCrprCd as v, openGwDraftByAprvKey as _ } from "../../utils/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigurableSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/custom/ConfigurableSidebar.tsx"],"names":[],"mappings":"AAoBA,OAAO,EACL,EAAE,EAMH,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAYxC,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"ConfigurableSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/custom/ConfigurableSidebar.tsx"],"names":[],"mappings":"AAoBA,OAAO,EACL,EAAE,EAMH,MAAM,OAAO,CAAC;AAKf,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAYxC,QAAA,MAAM,mBAAmB,EAAE,EAAE,CAAC,YAAY,CAksBzC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/layout-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../chunks/layout-components-B4ptqDmC.cjs");exports.AppWrapper=e.AppWrapper;exports.BwgCoreLogin=e.BwgCoreLogin;exports.BwgPortal01=e.BwgPortal01;exports.BwgPortal02=e.BwgPortal02;exports.ConfigurableContent=e.ConfigurableContent;exports.ConfigurableHeader=e.ConfigurableHeader;exports.ConfigurableMenuTab=e.ConfigurableMenuTab;exports.ConfigurableSidebar=e.ConfigurableSidebar;exports.ContentContainer=e.ContentContainer;exports.DefaultLoginView=e.DefaultLoginView;exports.LandingContainer=e.LandingContainer;exports.LoadingContainer=e.LoadingContainer;exports.PopupContainer=e.PopupContainer;exports.ProtectWrapper=e.ProtectWrapper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as n, b as o, B as r, a as i, d as s, e as t, f as g, g as C, C as p, D as b, c as f, L as l, P as u, h as d } from "../../chunks/layout-components-
|
|
1
|
+
import { A as n, b as o, B as r, a as i, d as s, e as t, f as g, g as C, C as p, D as b, c as f, L as l, P as u, h as d } from "../../chunks/layout-components-Bp6b-T1V.js";
|
|
2
2
|
export {
|
|
3
3
|
n as AppWrapper,
|
|
4
4
|
o as BwgCoreLogin,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CMSearchIntfGwP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/CMSearchIntfGwP01.tsx"],"names":[],"mappings":"AAyCA;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,GAAI,oBAAoB,GAAG,
|
|
1
|
+
{"version":3,"file":"CMSearchIntfGwP01.d.ts","sourceRoot":"","sources":["../../../src/components/popup/CMSearchIntfGwP01.tsx"],"names":[],"mappings":"AAyCA;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,GAAI,oBAAoB,GAAG,4CAwZjD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../chunks/common-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../chunks/common-components-DcTm1Tn1.cjs");exports.CMPrgrMstrP02=r.CMPrgrMstrP02;exports.SearchDepartmentP01=r.SearchDepartmentP01;exports.SearchDepartmentP02=r.SearchDepartmentP02;exports.SearchHolidayP01=r.CMHldyMstrP01;exports.SearchOrganizationP01=r.SearchOrganizationP01;exports.SearchOrganizationP02=r.SearchOrganizationP02;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as e, x as t, y as s, D as P, z as n, A as c } from "../../chunks/common-components-
|
|
1
|
+
import { E as e, x as t, y as s, D as P, z as n, A as c } from "../../chunks/common-components-Cxh8PLBH.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CMPrgrMstrP02,
|
|
4
4
|
t as SearchDepartmentP01,
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/index.cjs"),r=require("./stores/index.cjs"),o=require("./chunks/common-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/index.cjs"),r=require("./stores/index.cjs"),o=require("./chunks/common-components-DcTm1Tn1.cjs"),t=require("./components/core/index.cjs"),s=require("./chunks/layout-components-B4ptqDmC.cjs"),i=require("./provider/index.cjs");exports.ApiError=e.ApiError;exports.DEFAULT_FMT=e.DEFAULT_FMT;exports.DEFAULT_SERVICE_CODES=e.DEFAULT_SERVICE_CODES;exports.THEME_COOKIE_NAME=e.THEME_COOKIE_NAME;exports.add=e.add;exports.apiUtils=e.apiUtils;exports.arrAverage=e.arrAverage;exports.arrCount=e.arrCount;exports.arrMax=e.arrMax;exports.arrMin=e.arrMin;exports.arrReverse=e.arrReverse;exports.arrSum=e.arrSum;exports.arrUnique=e.arrUnique;exports.bwgUtils=e.bwgUtils;exports.callEndpoint=e.callEndpoint;exports.callService=e.callService;exports.callServiceBySysCd=e.callServiceBySysCd;exports.clamp=e.clamp;exports.clearSessionStorage=e.clearSessionStorage;exports.closeAllMessages=e.closeAllMessages;exports.closeMessage=e.closeMessage;exports.closeNotification=e.closeNotification;exports.colorFormat=e.colorFormat;exports.colorUtils=e.colorUtils;exports.commonUtils=e.commonUtils;exports.configureEnvUtils=e.configureEnvUtils;exports.copyToClipboard=e.copyToClipboard;exports.debounce=e.debounce;exports.deleteCookie=e.deleteCookie;exports.destroyNotifications=e.destroyNotifications;exports.diff=e.diff;exports.downloadByFileKey=e.downloadByFileKey;exports.downloadFile=e.downloadFile;exports.duplicates=e.duplicates;exports.encryptSha256=e.encryptSha256;exports.endOf=e.endOf;exports.envUtils=e.envUtils;exports.fileUtils=e.fileUtils;exports.format=e.format;exports.generateRandomColor=e.generateRandomColor;exports.generateRandomString=e.generateRandomString;exports.generateUID=e.generateUID;exports.getAllServiceCodes=e.getAllServiceCodes;exports.getApiDeps=e.getApiDeps;exports.getClientIp=e.getClientIp;exports.getCookie=e.getCookie;exports.getCrprCd=e.getCrprCd;exports.getDepartmentInfo=e.getDepartmentInfo;exports.getDeviceType=e.getDeviceType;exports.getDisplayName=e.getDisplayName;exports.getDprtCd=e.getDprtCd;exports.getDprtNm=e.getDprtNm;exports.getEmplNo=e.getEmplNo;exports.getEnvCode=e.getEnvCode;exports.getFullDprtCd=e.getFullDprtCd;exports.getFullDprtNm=e.getFullDprtNm;exports.getHrInfo=e.getHrInfo;exports.getJbdtCd=e.getJbdtCd;exports.getJbgdCd=e.getJbgdCd;exports.getJbkdCd=e.getJbkdCd;exports.getJbpsCd=e.getJbpsCd;exports.getPermissionService=e.getPermissionService;exports.getRoleList=e.getRoleList;exports.getServiceCode=e.getServiceCode;exports.getSessionStorage=e.getSessionStorage;exports.getTodateString=e.getTodateString;exports.getUserDvsn=e.getUserDvsn;exports.getUserId=e.getUserId;exports.getUserInfo=e.getUserInfo;exports.getUserNm=e.getUserNm;exports.getWkplCd=e.getWkplCd;exports.hasAllRoles=e.hasAllRoles;exports.hasAnyRole=e.hasAnyRole;exports.hasRole=e.hasRole;exports.hasUserInfo=e.hasUserInfo;exports.initApiDeps=e.initApiDeps;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isDesktop=e.isDesktop;exports.isDev=e.isDev;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isFunction=e.isFunction;exports.isLocal=e.isLocal;exports.isLoggedIn=e.isLoggedIn;exports.isMobile=e.isMobile;exports.isNull=e.isNull;exports.isNullOrUndefined=e.isNullOrUndefined;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isProd=e.isProd;exports.isSafeEmpty=e.isSafeEmpty;exports.isString=e.isString;exports.isTablet=e.isTablet;exports.isUndefined=e.isUndefined;exports.isValid=e.isValid;exports.isValidDate=e.isValidDate;exports.isValidEmail=e.isValidEmail;exports.isValidUrl=e.isValidUrl;exports.isValidYear=e.isValidYear;exports.isValidYearMonth=e.isValidYearMonth;exports.logServiceCodeConfig=e.logServiceCodeConfig;exports.messageUtils=e.messageUtils;exports.notiBwgError=e.notiBwgError;exports.notiError=e.notiError;exports.notiInfo=e.notiInfo;exports.notiSuccess=e.notiSuccess;exports.notiWarning=e.notiWarning;exports.notificationService=e.notificationService;exports.notificationUtils=e.notificationUtils;exports.now=e.now;exports.openGwDraftByAprvKey=e.openGwDraftByAprvKey;exports.padLeft=e.padLeft;exports.padRight=e.padRight;exports.random=e.random;exports.realFormat=e.realFormat;exports.removeSessionStorage=e.removeSessionStorage;exports.round=e.round;exports.serviceUtils=e.serviceUtils;exports.setClientIp=e.setClientIp;exports.setCookie=e.setCookie;exports.setServiceCodeOverrides=e.setServiceCodeOverrides;exports.setSessionStorage=e.setSessionStorage;exports.showApiError=e.showApiError;exports.showDuplicateError=e.showDuplicateError;exports.showError=e.showError;exports.showInfo=e.showInfo;exports.showLoading=e.showLoading;exports.showRequiredError=e.showRequiredError;exports.showSaveError=e.showSaveError;exports.showSaveSuccess=e.showSaveSuccess;exports.showSuccess=e.showSuccess;exports.showWarning=e.showWarning;exports.startOf=e.startOf;exports.submitGwApproval=e.submitGwApproval;exports.throttle=e.throttle;exports.toCamelCase=e.toCamelCase;exports.uploadFilesViaSftp=e.uploadFilesViaSftp;exports.userUtils=e.userUtils;exports.verifyClientIp=e.verifyClientIp;exports.useCapsLock=r.useCapsLock;exports.useCode=r.useCode;exports.useCodeStore=r.useCodeStore;exports.useColorStore=r.useColorStore;exports.useFavorite=r.useFavorite;exports.useFavoriteStore=r.useFavoriteStore;exports.useLoadingStore=r.useLoadingStore;exports.useLogin=r.useLogin;exports.useLogout=r.useLogout;exports.useMenuModel=r.useMenuModel;exports.useMenuModelStore=r.useMenuModelStore;exports.useMenuView=r.useMenuView;exports.useMenuViewStore=r.useMenuViewStore;exports.useOptionStore=r.useOptionStore;exports.usePopupLoadingStore=r.usePopupLoadingStore;exports.usePopupState=r.usePopupState;exports.usePopupStore=r.usePopupStore;exports.useSystemCode=r.useSystemCode;exports.useSystemStore=r.useSystemStore;exports.useUser=r.useUser;exports.useUserStore=r.useUserStore;exports.ButtonAccessController=o.ButtonAccessController;exports.BwgButtonGroup=o.BwgButtonGroup;exports.BwgCmptArea=o.BwgCmptArea;exports.BwgCol=o.BwgCol;exports.BwgComponentGuideM01=o.BwgComponentGuideM01;exports.BwgConfigProvider=o.BwgConfigProvider;exports.BwgDetail=o.BwgDetail;exports.BwgDeveloperGuideM01=o.BwgDeveloperGuideM01;exports.BwgDrawer=o.BwgDrawer;exports.BwgEditor=o.BwgEditor;exports.BwgGrid=o.BwgGrid;exports.BwgInfoArea=o.BwgInfoArea;exports.BwgPagination=o.BwgPagination;exports.BwgPopup=o.BwgPopup;exports.BwgReactGuideM01=o.BwgReactGuideM01;exports.BwgRow=o.BwgRow;exports.BwgSpace=o.BwgSpace;exports.BwgTable=o.BwgTable;exports.BwgTabs=o.BwgTabs;exports.BwgTitleBox=o.BwgTitleBox;exports.BwgView=o.BwgView;exports.CMAdminBoardM01=o.CMAdminBoardM01;exports.CMAuthMstrM01=o.CMAuthMstrM01;exports.CMBoardS01=o.CMBoardCommentS01;exports.CMFileMstrM01=o.CMFileMstrM01;exports.CMHldyCfg=o.CMHldyCfg;exports.CMMenuMstrM01=o.CMMenuMstrM01;exports.CMMenuPrgrSelectModal=o.CMMenuPrgrSelectModal;exports.CMMenuPrntSelectModal=o.CMMenuPrntSelectModal;exports.CMMyBoardM01=o.CMMyBoardM01;exports.CMPopupMstrM01=o.CMPopuMstrM01;exports.CMPrgrMstrM01=o.CMPrgrMstrM01;exports.CMPrgrMstrP02=o.CMPrgrMstrP02;exports.CMRoleMstrM01=o.CMRoleMstrM01;exports.CMSystCfgM01=o.CMSystCfgM01;exports.CMSystCodeM01=o.CMSystCodeM01;exports.CMUserMstrM01=o.CMUserMstrM01;exports.ContentBox=o.ContentBox;exports.ContentLayOut=o.ContentLayOut;exports.GlobalConfigProvider=o.GlobalConfigProvider;exports.QuickServiceToggle=o.QuickServiceToggle;exports.SSOHandler=o.SSOHandler;exports.SearchBox=o.SearchBox;exports.SearchDepartmentP01=o.SearchDepartmentP01;exports.SearchDepartmentP02=o.SearchDepartmentP02;exports.SearchHolidayP01=o.CMHldyMstrP01;exports.SearchOrganizationP01=o.SearchOrganizationP01;exports.SearchOrganizationP02=o.SearchOrganizationP02;exports.SystemCodeManage=o.SystemCodeManage;exports.createBwgGridRenderer=o.createBwgGridRenderer;exports.BwgButton=t.BwgButton;exports.BwgCheck=t.BwgCheck;exports.BwgCheckList=t.BwgCheckList;exports.BwgDatePicker=t.BwgDatePicker;exports.BwgDownload=t.BwgDownload;exports.BwgForm=t.BwgForm;exports.BwgFormItem=t.BwgFormItem;exports.BwgInput=t.BwgInput;exports.BwgLargeUploader=t.BwgLargeUploader;exports.BwgMaskedInput=t.BwgMaskedInput;exports.BwgMaskedPicker=t.BwgMaskedPicker;exports.BwgMultiSelect=t.BwgMultiSelect;exports.BwgNumber=t.BwgNumber;exports.BwgRadio=t.BwgRadio;exports.BwgRangePicker=t.BwgRangePicker;exports.BwgSearch=t.BwgSearch;exports.BwgSelect=t.BwgSelect;exports.BwgSwitch=t.BwgSwitch;exports.BwgTextArea=t.BwgTextArea;exports.BwgUploader=t.BwgUploader;exports.AppWrapper=s.AppWrapper;exports.BwgCoreLogin=s.BwgCoreLogin;exports.BwgPortal01=s.BwgPortal01;exports.BwgPortal02=s.BwgPortal02;exports.ConfigurableContent=s.ConfigurableContent;exports.ConfigurableHeader=s.ConfigurableHeader;exports.ConfigurableMenuTab=s.ConfigurableMenuTab;exports.ConfigurableSidebar=s.ConfigurableSidebar;exports.ContentContainer=s.ContentContainer;exports.DefaultLoginView=s.DefaultLoginView;exports.LandingContainer=s.LandingContainer;exports.LoadingContainer=s.LoadingContainer;exports.PopupContainer=s.PopupContainer;exports.ProtectWrapper=s.ProtectWrapper;exports.AuthProvider=i.AuthProvider;exports.CommonCodeProvider=i.CommonCodeProvider;exports.ScreenProtectProvider=i.ScreenProtectProvider;exports.SearchBoxProvider=i.SearchBoxProvider;exports.ServiceCodeProvider=i.ServiceCodeProvider;exports.useAllServiceCodes=i.useAllServiceCodes;exports.useAuth=i.useAuth;exports.useCodeColor=i.useCodeColor;exports.useCodeList=i.useCodeList;exports.useCodeListByOption=i.useCodeListByOption;exports.useCodeName=i.useCodeName;exports.useCommonCode=i.useCommonCode;exports.useGridLookup=i.useGridLookup;exports.useLock=i.useLock;exports.useLogServiceCodeConfig=i.useLogServiceCodeConfig;exports.usePopup=i.usePopup;exports.useSearchBox=i.useSearchBox;exports.useServiceCode=i.useServiceCode;exports.useServiceCodeValue=i.useServiceCodeValue;
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ApiError as r, DEFAULT_FMT as s, DEFAULT_SERVICE_CODES as a, THEME_COOKIE_NAME as t, add as i, apiUtils as n, arrAverage as g, arrCount as l, arrMax as d, arrMin as u, arrReverse as C, arrSum as p, arrUnique as c, bwgUtils as S, callEndpoint as w, callService as M, callServiceBySysCd as B, clamp as m, clearSessionStorage as f, closeAllMessages as v, closeMessage as P, closeNotification as h, colorFormat as y, colorUtils as D, commonUtils as U, configureEnvUtils as A, copyToClipboard as E, debounce as L, deleteCookie as b, destroyNotifications as I, diff as k, downloadByFileKey as F, downloadFile as R, duplicates as O, encryptSha256 as T, endOf as x, envUtils as N, fileUtils as V, format as G, generateRandomColor as H, generateRandomString as W, generateUID as _, getAllServiceCodes as J, getApiDeps as K, getClientIp as q, getCookie as z, getCrprCd as Y, getDepartmentInfo as j, getDeviceType as Q, getDisplayName as X, getDprtCd as Z, getDprtNm as $, getEmplNo as ee, getEnvCode as oe, getFullDprtCd as re, getFullDprtNm as se, getHrInfo as ae, getJbdtCd as te, getJbgdCd as ie, getJbkdCd as ne, getJbpsCd as ge, getPermissionService as le, getRoleList as de, getServiceCode as ue, getSessionStorage as Ce, getTodateString as pe, getUserDvsn as ce, getUserId as Se, getUserInfo as we, getUserNm as Me, getWkplCd as Be, hasAllRoles as me, hasAnyRole as fe, hasRole as ve, hasUserInfo as Pe, initApiDeps as he, isArray as ye, isBoolean as De, isDesktop as Ue, isDev as Ae, isEmpty as Ee, isEmptyArray as Le, isFunction as be, isLocal as Ie, isLoggedIn as ke, isMobile as Fe, isNull as Re, isNullOrUndefined as Oe, isNumber as Te, isObject as xe, isProd as Ne, isSafeEmpty as Ve, isString as Ge, isTablet as He, isUndefined as We, isValid as _e, isValidDate as Je, isValidEmail as Ke, isValidUrl as qe, isValidYear as ze, isValidYearMonth as Ye, logServiceCodeConfig as je, messageUtils as Qe, notiBwgError as Xe, notiError as Ze, notiInfo as $e, notiSuccess as eo, notiWarning as oo, notificationService as ro, notificationUtils as so, now as ao, openGwDraftByAprvKey as to, padLeft as io, padRight as no, random as go, realFormat as lo, removeSessionStorage as uo, round as Co, serviceUtils as po, setClientIp as co, setCookie as So, setServiceCodeOverrides as wo, setSessionStorage as Mo, showApiError as Bo, showDuplicateError as mo, showError as fo, showInfo as vo, showLoading as Po, showRequiredError as ho, showSaveError as yo, showSaveSuccess as Do, showSuccess as Uo, showWarning as Ao, startOf as Eo, submitGwApproval as Lo, throttle as bo, toCamelCase as Io, uploadFilesViaSftp as ko, userUtils as Fo, verifyClientIp as Ro } from "./utils/index.js";
|
|
2
2
|
import { useCapsLock as To, useCode as xo, useCodeStore as No, useColorStore as Vo, useFavorite as Go, useFavoriteStore as Ho, useLoadingStore as Wo, useLogin as _o, useLogout as Jo, useMenuModel as Ko, useMenuModelStore as qo, useMenuView as zo, useMenuViewStore as Yo, useOptionStore as jo, usePopupLoadingStore as Qo, usePopupState as Xo, usePopupStore as Zo, useSystemCode as $o, useSystemStore as er, useUser as or, useUserStore as rr } from "./stores/index.js";
|
|
3
|
-
import { f as ar, q as tr, r as ir, j as nr, I as gr, B as lr, s as dr, J as ur, t as Cr, p as pr, h as cr, u as Sr, o as wr, n as Mr, K as Br, i as mr, b as fr, v as vr, l as Pr, e as hr, k as yr, Y as Dr, F as Ur, Z as Ar, L as Er, T as Lr, M as br, N as Ir, O as kr, _ as Fr, P as Rr, R as Or, E as Tr, H as xr, U as Nr, V as Vr, X as Gr, d as Hr, C as Wr, G as _r, Q as Jr, w as Kr, S as qr, x as zr, y as Yr, D as jr, z as Qr, A as Xr, W as Zr, m as $r } from "./chunks/common-components-
|
|
3
|
+
import { f as ar, q as tr, r as ir, j as nr, I as gr, B as lr, s as dr, J as ur, t as Cr, p as pr, h as cr, u as Sr, o as wr, n as Mr, K as Br, i as mr, b as fr, v as vr, l as Pr, e as hr, k as yr, Y as Dr, F as Ur, Z as Ar, L as Er, T as Lr, M as br, N as Ir, O as kr, _ as Fr, P as Rr, R as Or, E as Tr, H as xr, U as Nr, V as Vr, X as Gr, d as Hr, C as Wr, G as _r, Q as Jr, w as Kr, S as qr, x as zr, y as Yr, D as jr, z as Qr, A as Xr, W as Zr, m as $r } from "./chunks/common-components-Cxh8PLBH.js";
|
|
4
4
|
import { BwgButton as os, BwgCheck as rs, BwgCheckList as ss, BwgDatePicker as as, BwgDownload as ts, BwgForm as is, BwgFormItem as ns, BwgInput as gs, BwgLargeUploader as ls, BwgMaskedInput as ds, BwgMaskedPicker as us, BwgMultiSelect as Cs, BwgNumber as ps, BwgRadio as cs, BwgRangePicker as Ss, BwgSearch as ws, BwgSelect as Ms, BwgSwitch as Bs, BwgTextArea as ms, BwgUploader as fs } from "./components/core/index.js";
|
|
5
|
-
import { A as Ps, b as hs, B as ys, a as Ds, d as Us, e as As, f as Es, g as Ls, C as bs, D as Is, c as ks, L as Fs, P as Rs, h as Os } from "./chunks/layout-components-
|
|
5
|
+
import { A as Ps, b as hs, B as ys, a as Ds, d as Us, e as As, f as Es, g as Ls, C as bs, D as Is, c as ks, L as Fs, P as Rs, h as Os } from "./chunks/layout-components-Bp6b-T1V.js";
|
|
6
6
|
import { AuthProvider as xs, CommonCodeProvider as Ns, ScreenProtectProvider as Vs, SearchBoxProvider as Gs, ServiceCodeProvider as Hs, useAllServiceCodes as Ws, useAuth as _s, useCodeColor as Js, useCodeList as Ks, useCodeListByOption as qs, useCodeName as zs, useCommonCode as Ys, useGridLookup as js, useLock as Qs, useLogServiceCodeConfig as Xs, usePopup as Zs, useSearchBox as $s, useServiceCode as ea, useServiceCodeValue as oa } from "./provider/index.js";
|
|
7
7
|
export {
|
|
8
8
|
r as ApiError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceCodeContext.d.ts","sourceRoot":"","sources":["../../../src/provider/contexts/ServiceCodeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ServiceCodeContext.d.ts","sourceRoot":"","sources":["../../../src/provider/contexts/ServiceCodeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EACF,SAAS,EAGV,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAGnC,UAAU,sBAAsB;IAC9B,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,cAAc,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,MAAM,CAAC;CACjD;AAMD,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CA2C5D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,QAAO,sBAMjC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,cAAc,KAAG,MAGzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,QAAO,MAAM,CAAC,cAAc,EAAE,MAAM,CASlE,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,QAAO,IAU1C,CAAC;AAGF,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/provider/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),O=require("../stores/index.cjs"),l=require("react/jsx-runtime"),V=require("antd"),y=require("../utils/index.cjs"),F=r.createContext(null),_=({children:e,serviceCodes:t={}})=>{y.setServiceCodeOverrides(t),r.useLayoutEffect(()=>{y.setServiceCodeOverrides(t)},[t]);const i={serviceCodes:t,getServiceCode:n=>t[n]&&t[n].trim()!==""?t[n]:y.DEFAULT_SERVICE_CODES[n]};return l.jsx(F.Provider,{value:i,children:e})},P=()=>{const e=r.useContext(F);if(!e)throw new Error("useServiceCode must be used within a ServiceCodeProvider");return e},U=e=>{const{getServiceCode:t}=P();return t(e)},q=()=>{const{getServiceCode:e}=P(),t={};for(const o of Object.keys(y.DEFAULT_SERVICE_CODES))t[o]=e(o);return t},G=()=>{const{getServiceCode:e}=P();console.log("🔧 bwg-core 서비스코드 설정:"),console.log("📋 Provider 설정 > 기본값 순서로 확인");for(const t of Object.keys(y.DEFAULT_SERVICE_CODES)){const o=e(t);console.log(` ${t}: ${o}`)}},A=r.createContext(null),M=({children:e})=>{const t=r.useRef(null),C={searchBoxRef:t,getFormData:()=>t.current?.getFormData()||{},setFormData:a=>{t.current?.setFormData(a)},resetForm:()=>{t.current?.resetForm()},validateForm:async()=>await t.current?.validateForm()||{success:!1,error:null}};return l.jsx(A.Provider,{value:C,children:e})},W=()=>{const e=r.useContext(A);if(!e)throw new Error("useSearchBox must be used within a SearchBoxProvider");return e},$=()=>{const{popups:e,activePopupId:t,setActivePopup:o,closePopup:i,openPopup:n,openCorePopup:u}=O.usePopupStore(),C=r.useCallback(async(h,v,s)=>{try{await n(h,v,s)}catch(c){throw console.error("팝업 열기 실패:",c),c}},[n]),a=r.useCallback((h,v)=>{try{u(h,v)}catch(s){throw console.error("로컬 팝업 열기 실패:",s),s}},[u]);return{popups:e,activePopupId:t,setActivePopup:o,closePopup:i,showPopup:C,openCorePopup:a,isPopup:e.length>0}},I=r.createContext(null),z=()=>{const e=r.useContext(I);if(!e)throw new Error("useAuth must be used within AuthProvider");return e},J=({children:e})=>{const[t,o]=r.useState(!1),[i,n]=r.useState(!1),u=async s=>{const c=(await s.text()).trim().toLowerCase();try{const d=JSON.parse(c);if(typeof d=="object"&&d&&(d.ok===!0||d.success===!0))return!0}catch{}return!!["true","ok","1","y"].includes(c)},C=async s=>{n(!0);try{const c=await fetch("/serviceEndpoint/sso_check.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"token="+encodeURIComponent(s)}),d=c.ok&&await u(c);return o(d),d}catch{return!1}finally{n(!1)}},a=async s=>{n(!0);try{const c=await fetch("/serviceEndpoint/sso_reauth.jsp",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"pin="+encodeURIComponent(s)});return c.ok&&await u(c)?(o(!0),!0):!1}catch{return!1}finally{n(!1)}},h=()=>{o(!1)},v=r.useMemo(()=>({authed:t,busy:i,verifyWithToken:C,reauthWithPin:a,logout:h}),[t,i]);return l.jsx(I.Provider,{value:v,children:e})},B=r.createContext(void 0),H=({children:e})=>{const{codeData:t,isLoading:o,error:i,lastUpdated:n,getCodeList:u,getCodeListByOption:C,getCodeName:a,getCodeColor:h,getCodeByOption:v,getAvailableGroupCodes:s,getGridLookup:c,fetchCommonCodes:d}=O.useCodeStore(),L={codeData:t,isLoading:o,error:i,lastUpdated:n,getCodeList:u,getCodeListByOption:C,getCodeName:a,getCodeColor:h,getCodeByOption:v,getAvailableGroupCodes:s,getGridLookup:c,refreshCodes:d};return l.jsx(B.Provider,{value:L,children:e})},f=()=>{const e=r.useContext(B);if(e===void 0)throw new Error("useCommonCode must be used within a CommonCodeProvider");return e},Q=()=>{const{getCodeList:e,isLoading:t,error:o}=f();return{getCodeList:e,isLoading:t,error:o}},X=()=>{const{getCodeName:e,isLoading:t,error:o}=f();return{getCodeName:e,isLoading:t,error:o}},Y=()=>{const{getCodeColor:e,isLoading:t,error:o}=f();return{getCodeColor:e,isLoading:t,error:o}},Z=()=>{const{getCodeListByOption:e,isLoading:t,error:o}=f();return{getCodeListByOption:e,isLoading:t,error:o}},K=()=>{const{getGridLookup:e,isLoading:t,error:o}=f();return{getGridLookup:e,isLoading:t,error:o}},D=r.createContext(null),ee=()=>{const e=r.useContext(D);if(!e)throw new Error("useLock must be used within ScreenProtectProvider");return e},te=({children:e,idleMs:t=1e4,onUnlock:o,persistLocked:i=!0,storageKey:n="inactivityLocked",eventTarget:u,overlayScope:C="global",overlayId:a="lock-overlay-root",overlayPosition:h="fixed"})=>{const v=i&&typeof window<"u"&&window.localStorage.getItem(n)==="1",[s,c]=r.useState(v),[d,L]=r.useState(t),k=Number.isFinite(d)&&d>0,w=r.useRef(null),T=()=>{try{i&&window.localStorage.setItem(n,"1")}catch{}c(!0)},b=async m=>{if(!(o&&!await o(m))){try{i&&window.localStorage.removeItem(n)}catch{}c(!1),k&&E()}},N=()=>{try{i&&window.localStorage.setItem(n,"1")}catch{}c(!0)},E=()=>{k&&(w.current&&window.clearTimeout(w.current),w.current=window.setTimeout(()=>{N()},d))};r.useEffect(()=>{if(!k)return;const m=()=>{s||E()},x={passive:!0},g=["pointermove","pointerdown","keydown","wheel","touchstart"],S=u??window;return g.forEach(p=>S.addEventListener(p,m,x)),E(),()=>{w.current&&window.clearTimeout(w.current),g.forEach(p=>S.removeEventListener(p,m))}},[d,s,u,k]),r.useEffect(()=>{if(!s)return;const m=p=>{const j=document.getElementById(a);j&&j.contains(p.target)||(p.stopPropagation(),p.preventDefault())},x={capture:!0},g=["pointerdown","pointerup","pointermove","click","wheel","keydown","keyup","touchstart","touchmove"],S=C==="scoped"?u??window:window;return g.forEach(p=>S.addEventListener(p,m,x)),()=>g.forEach(p=>S.removeEventListener(p,m,x))},[s,C,a,u]);const R=r.useMemo(()=>({locked:s,lock:T,unlock:b,setIdleMs:L}),[s]);return l.jsxs(D.Provider,{value:R,children:[l.jsx("div",{style:{width:"100%",height:"100%"},...s?{inert:""}:{},...s?{"aria-hidden":!0}:{},children:e}),s&&l.jsx(oe,{onUnlock:b,overlayId:a,overlayPosition:h})]})},oe=({onUnlock:e,overlayId:t="lock-overlay-root",overlayPosition:o="fixed"})=>{const[i]=r.useState(4),[n,u]=r.useState("");return l.jsx("div",{id:t,"aria-modal":"true",role:"dialog","aria-label":"Locked screen",style:{position:o,inset:0,background:"rgba(12, 14, 18, 0.85)",backdropFilter:"blur(4px)",display:"grid",placeItems:"center",zIndex:9999},children:l.jsxs("div",{className:"lockscreen-form",style:{width:420,maxWidth:"92vw"},children:[l.jsx("div",{className:"lock-icon-wrap",children:l.jsx("span",{className:"lock-icon-box"})}),l.jsx("h2",{children:"잠금됨"}),l.jsx("p",{children:"PIN 번호를 입력하세요"}),l.jsx("div",{className:"lock-ipt-wrap",style:{display:"flex",justifyContent:"center"},children:l.jsx(V.Input.OTP,{mask:"*",autoFocus:!0,length:i,value:n,onChange:C=>{const a=(C??"").replace(/\D/g,"").slice(0,i);u(a),a.length===i&&e(a)}})})]})})};exports.AuthProvider=J;exports.CommonCodeProvider=H;exports.ScreenProtectProvider=te;exports.SearchBoxProvider=M;exports.ServiceCodeProvider=_;exports.useAllServiceCodes=q;exports.useAuth=z;exports.useCodeColor=Y;exports.useCodeList=Q;exports.useCodeListByOption=Z;exports.useCodeName=X;exports.useCommonCode=f;exports.useGridLookup=K;exports.useLock=ee;exports.useLogServiceCodeConfig=G;exports.usePopup=$;exports.useSearchBox=W;exports.useServiceCode=P;exports.useServiceCodeValue=U;
|
package/dist/provider/index.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { usePopupStore as
|
|
3
|
-
import { jsx as d, jsxs as
|
|
4
|
-
import { Input as
|
|
5
|
-
import { setServiceCodeOverrides as
|
|
6
|
-
const
|
|
1
|
+
import { useLayoutEffect as z, createContext as k, useContext as x, useRef as N, useCallback as B, useState as w, useMemo as j, useEffect as A } from "react";
|
|
2
|
+
import { usePopupStore as J, useCodeStore as q } from "../stores/index.js";
|
|
3
|
+
import { jsx as d, jsxs as T } from "react/jsx-runtime";
|
|
4
|
+
import { Input as H } from "antd";
|
|
5
|
+
import { setServiceCodeOverrides as D, DEFAULT_SERVICE_CODES as E } from "../utils/index.js";
|
|
6
|
+
const V = k(null), te = ({
|
|
7
7
|
children: e,
|
|
8
8
|
serviceCodes: t = {}
|
|
9
9
|
}) => {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
D(t), z(() => {
|
|
11
|
+
D(t);
|
|
12
12
|
}, [t]);
|
|
13
13
|
const c = {
|
|
14
14
|
serviceCodes: t,
|
|
15
|
-
getServiceCode: (r) => t[r] && t[r].trim() !== "" ? t[r] :
|
|
15
|
+
getServiceCode: (r) => t[r] && t[r].trim() !== "" ? t[r] : E[r]
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */ d(
|
|
18
|
-
},
|
|
19
|
-
const e = x(
|
|
17
|
+
return /* @__PURE__ */ d(V.Provider, { value: c, children: e });
|
|
18
|
+
}, F = () => {
|
|
19
|
+
const e = x(V);
|
|
20
20
|
if (!e)
|
|
21
21
|
throw new Error("useServiceCode must be used within a ServiceCodeProvider");
|
|
22
22
|
return e;
|
|
23
|
-
},
|
|
24
|
-
const { getServiceCode: t } =
|
|
23
|
+
}, oe = (e) => {
|
|
24
|
+
const { getServiceCode: t } = F();
|
|
25
25
|
return t(e);
|
|
26
|
-
},
|
|
27
|
-
const { getServiceCode: e } =
|
|
28
|
-
for (const o of Object.keys(
|
|
26
|
+
}, re = () => {
|
|
27
|
+
const { getServiceCode: e } = F(), t = {};
|
|
28
|
+
for (const o of Object.keys(E))
|
|
29
29
|
t[o] = e(o);
|
|
30
30
|
return t;
|
|
31
|
-
},
|
|
32
|
-
const { getServiceCode: e } =
|
|
31
|
+
}, ne = () => {
|
|
32
|
+
const { getServiceCode: e } = F();
|
|
33
33
|
console.log("🔧 bwg-core 서비스코드 설정:"), console.log("📋 Provider 설정 > 기본값 순서로 확인");
|
|
34
|
-
for (const t of Object.keys(
|
|
34
|
+
for (const t of Object.keys(E)) {
|
|
35
35
|
const o = e(t);
|
|
36
36
|
console.log(` ${t}: ${o}`);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
const t =
|
|
38
|
+
}, R = k(null), se = ({ children: e }) => {
|
|
39
|
+
const t = N(null), l = {
|
|
40
40
|
searchBoxRef: t,
|
|
41
41
|
getFormData: () => t.current?.getFormData() || {},
|
|
42
42
|
setFormData: (u) => {
|
|
@@ -50,13 +50,13 @@ const T = k(null), ee = ({
|
|
|
50
50
|
error: null
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return /* @__PURE__ */ d(
|
|
54
|
-
},
|
|
55
|
-
const e = x(
|
|
53
|
+
return /* @__PURE__ */ d(R.Provider, { value: l, children: e });
|
|
54
|
+
}, ce = () => {
|
|
55
|
+
const e = x(R);
|
|
56
56
|
if (!e)
|
|
57
57
|
throw new Error("useSearchBox must be used within a SearchBoxProvider");
|
|
58
58
|
return e;
|
|
59
|
-
},
|
|
59
|
+
}, ie = () => {
|
|
60
60
|
const {
|
|
61
61
|
popups: e,
|
|
62
62
|
activePopupId: t,
|
|
@@ -64,19 +64,19 @@ const T = k(null), ee = ({
|
|
|
64
64
|
closePopup: c,
|
|
65
65
|
openPopup: r,
|
|
66
66
|
openCorePopup: i
|
|
67
|
-
} =
|
|
68
|
-
async (m,
|
|
67
|
+
} = J(), l = B(
|
|
68
|
+
async (m, f, n) => {
|
|
69
69
|
try {
|
|
70
|
-
await r(m,
|
|
70
|
+
await r(m, f, n);
|
|
71
71
|
} catch (s) {
|
|
72
72
|
throw console.error("팝업 열기 실패:", s), s;
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
[r]
|
|
76
|
-
), u =
|
|
77
|
-
(m,
|
|
76
|
+
), u = B(
|
|
77
|
+
(m, f) => {
|
|
78
78
|
try {
|
|
79
|
-
i(m,
|
|
79
|
+
i(m, f);
|
|
80
80
|
} catch (n) {
|
|
81
81
|
throw console.error("로컬 팝업 열기 실패:", n), n;
|
|
82
82
|
}
|
|
@@ -92,11 +92,11 @@ const T = k(null), ee = ({
|
|
|
92
92
|
openCorePopup: u,
|
|
93
93
|
isPopup: e.length > 0
|
|
94
94
|
};
|
|
95
|
-
},
|
|
96
|
-
const e = x(
|
|
95
|
+
}, G = k(null), ue = () => {
|
|
96
|
+
const e = x(G);
|
|
97
97
|
if (!e) throw new Error("useAuth must be used within AuthProvider");
|
|
98
98
|
return e;
|
|
99
|
-
},
|
|
99
|
+
}, ae = ({ children: e }) => {
|
|
100
100
|
const [t, o] = w(!1), [c, r] = w(!1), i = async (n) => {
|
|
101
101
|
const s = (await n.text()).trim().toLowerCase();
|
|
102
102
|
try {
|
|
@@ -136,14 +136,14 @@ const T = k(null), ee = ({
|
|
|
136
136
|
}
|
|
137
137
|
}, m = () => {
|
|
138
138
|
o(!1);
|
|
139
|
-
},
|
|
139
|
+
}, f = j(
|
|
140
140
|
() => ({ authed: t, busy: c, verifyWithToken: l, reauthWithPin: u, logout: m }),
|
|
141
141
|
[t, c]
|
|
142
142
|
);
|
|
143
|
-
return /* @__PURE__ */ d(
|
|
144
|
-
},
|
|
143
|
+
return /* @__PURE__ */ d(G.Provider, { value: f, children: e });
|
|
144
|
+
}, U = k(
|
|
145
145
|
void 0
|
|
146
|
-
),
|
|
146
|
+
), de = ({
|
|
147
147
|
children: e
|
|
148
148
|
}) => {
|
|
149
149
|
const {
|
|
@@ -155,11 +155,11 @@ const T = k(null), ee = ({
|
|
|
155
155
|
getCodeListByOption: l,
|
|
156
156
|
getCodeName: u,
|
|
157
157
|
getCodeColor: m,
|
|
158
|
-
getCodeByOption:
|
|
158
|
+
getCodeByOption: f,
|
|
159
159
|
getAvailableGroupCodes: n,
|
|
160
160
|
getGridLookup: s,
|
|
161
161
|
fetchCommonCodes: a
|
|
162
|
-
} =
|
|
162
|
+
} = q(), L = {
|
|
163
163
|
codeData: t,
|
|
164
164
|
isLoading: o,
|
|
165
165
|
error: c,
|
|
@@ -168,39 +168,39 @@ const T = k(null), ee = ({
|
|
|
168
168
|
getCodeListByOption: l,
|
|
169
169
|
getCodeName: u,
|
|
170
170
|
getCodeColor: m,
|
|
171
|
-
getCodeByOption:
|
|
171
|
+
getCodeByOption: f,
|
|
172
172
|
getAvailableGroupCodes: n,
|
|
173
173
|
getGridLookup: s,
|
|
174
174
|
refreshCodes: a
|
|
175
175
|
};
|
|
176
|
-
return /* @__PURE__ */ d(
|
|
176
|
+
return /* @__PURE__ */ d(U.Provider, { value: L, children: e });
|
|
177
177
|
}, P = () => {
|
|
178
|
-
const e = x(
|
|
178
|
+
const e = x(U);
|
|
179
179
|
if (e === void 0)
|
|
180
180
|
throw new Error("useCommonCode must be used within a CommonCodeProvider");
|
|
181
181
|
return e;
|
|
182
|
-
},
|
|
182
|
+
}, le = () => {
|
|
183
183
|
const { getCodeList: e, isLoading: t, error: o } = P();
|
|
184
184
|
return {
|
|
185
185
|
getCodeList: e,
|
|
186
186
|
isLoading: t,
|
|
187
187
|
error: o
|
|
188
188
|
};
|
|
189
|
-
},
|
|
189
|
+
}, pe = () => {
|
|
190
190
|
const { getCodeName: e, isLoading: t, error: o } = P();
|
|
191
191
|
return {
|
|
192
192
|
getCodeName: e,
|
|
193
193
|
isLoading: t,
|
|
194
194
|
error: o
|
|
195
195
|
};
|
|
196
|
-
},
|
|
196
|
+
}, me = () => {
|
|
197
197
|
const { getCodeColor: e, isLoading: t, error: o } = P();
|
|
198
198
|
return {
|
|
199
199
|
getCodeColor: e,
|
|
200
200
|
isLoading: t,
|
|
201
201
|
error: o
|
|
202
202
|
};
|
|
203
|
-
},
|
|
203
|
+
}, fe = () => {
|
|
204
204
|
const { getCodeListByOption: e, isLoading: t, error: o } = P();
|
|
205
205
|
return {
|
|
206
206
|
getCodeListByOption: e,
|
|
@@ -214,12 +214,12 @@ const T = k(null), ee = ({
|
|
|
214
214
|
isLoading: t,
|
|
215
215
|
error: o
|
|
216
216
|
};
|
|
217
|
-
},
|
|
218
|
-
const e = x(
|
|
217
|
+
}, _ = k(null), we = () => {
|
|
218
|
+
const e = x(_);
|
|
219
219
|
if (!e)
|
|
220
220
|
throw new Error("useLock must be used within ScreenProtectProvider");
|
|
221
221
|
return e;
|
|
222
|
-
},
|
|
222
|
+
}, ve = ({
|
|
223
223
|
children: e,
|
|
224
224
|
idleMs: t = 1e4,
|
|
225
225
|
onUnlock: o,
|
|
@@ -230,21 +230,21 @@ const T = k(null), ee = ({
|
|
|
230
230
|
overlayId: u = "lock-overlay-root",
|
|
231
231
|
overlayPosition: m = "fixed"
|
|
232
232
|
}) => {
|
|
233
|
-
const
|
|
233
|
+
const f = c && typeof window < "u" && window.localStorage.getItem(r) === "1", [n, s] = w(f), [a, L] = w(t), S = Number.isFinite(a) && a > 0, v = N(null), W = () => {
|
|
234
234
|
try {
|
|
235
235
|
c && window.localStorage.setItem(r, "1");
|
|
236
236
|
} catch {
|
|
237
237
|
}
|
|
238
238
|
s(!0);
|
|
239
|
-
},
|
|
240
|
-
if (!(o && !await o(
|
|
239
|
+
}, I = async (h) => {
|
|
240
|
+
if (!(o && !await o(h))) {
|
|
241
241
|
try {
|
|
242
242
|
c && window.localStorage.removeItem(r);
|
|
243
243
|
} catch {
|
|
244
244
|
}
|
|
245
245
|
s(!1), S && b();
|
|
246
246
|
}
|
|
247
|
-
},
|
|
247
|
+
}, M = () => {
|
|
248
248
|
try {
|
|
249
249
|
c && window.localStorage.setItem(r, "1");
|
|
250
250
|
} catch {
|
|
@@ -252,12 +252,12 @@ const T = k(null), ee = ({
|
|
|
252
252
|
s(!0);
|
|
253
253
|
}, b = () => {
|
|
254
254
|
S && (v.current && window.clearTimeout(v.current), v.current = window.setTimeout(() => {
|
|
255
|
-
|
|
255
|
+
M();
|
|
256
256
|
}, a));
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
A(() => {
|
|
259
259
|
if (!S) return;
|
|
260
|
-
const
|
|
260
|
+
const h = () => {
|
|
261
261
|
n || b();
|
|
262
262
|
}, C = { passive: !0 }, g = [
|
|
263
263
|
"pointermove",
|
|
@@ -266,14 +266,14 @@ const T = k(null), ee = ({
|
|
|
266
266
|
"wheel",
|
|
267
267
|
"touchstart"
|
|
268
268
|
], y = i ?? window;
|
|
269
|
-
return g.forEach((p) => y.addEventListener(p,
|
|
270
|
-
v.current && window.clearTimeout(v.current), g.forEach((p) => y.removeEventListener(p,
|
|
269
|
+
return g.forEach((p) => y.addEventListener(p, h, C)), b(), () => {
|
|
270
|
+
v.current && window.clearTimeout(v.current), g.forEach((p) => y.removeEventListener(p, h));
|
|
271
271
|
};
|
|
272
|
-
}, [a, n, i, S]),
|
|
272
|
+
}, [a, n, i, S]), A(() => {
|
|
273
273
|
if (!n) return;
|
|
274
|
-
const
|
|
275
|
-
const
|
|
276
|
-
|
|
274
|
+
const h = (p) => {
|
|
275
|
+
const O = document.getElementById(u);
|
|
276
|
+
O && O.contains(p.target) || (p.stopPropagation(), p.preventDefault());
|
|
277
277
|
}, C = { capture: !0 }, g = [
|
|
278
278
|
"pointerdown",
|
|
279
279
|
"pointerup",
|
|
@@ -285,13 +285,13 @@ const T = k(null), ee = ({
|
|
|
285
285
|
"touchstart",
|
|
286
286
|
"touchmove"
|
|
287
287
|
], y = l === "scoped" ? i ?? window : window;
|
|
288
|
-
return g.forEach((p) => y.addEventListener(p,
|
|
288
|
+
return g.forEach((p) => y.addEventListener(p, h, C)), () => g.forEach((p) => y.removeEventListener(p, h, C));
|
|
289
289
|
}, [n, l, u, i]);
|
|
290
|
-
const
|
|
291
|
-
() => ({ locked: n, lock:
|
|
290
|
+
const $ = j(
|
|
291
|
+
() => ({ locked: n, lock: W, unlock: I, setIdleMs: L }),
|
|
292
292
|
[n]
|
|
293
293
|
);
|
|
294
|
-
return /* @__PURE__ */
|
|
294
|
+
return /* @__PURE__ */ T(_.Provider, { value: $, children: [
|
|
295
295
|
/* @__PURE__ */ d(
|
|
296
296
|
"div",
|
|
297
297
|
{
|
|
@@ -302,15 +302,15 @@ const T = k(null), ee = ({
|
|
|
302
302
|
}
|
|
303
303
|
),
|
|
304
304
|
n && /* @__PURE__ */ d(
|
|
305
|
-
|
|
305
|
+
Q,
|
|
306
306
|
{
|
|
307
|
-
onUnlock:
|
|
307
|
+
onUnlock: I,
|
|
308
308
|
overlayId: u,
|
|
309
309
|
overlayPosition: m
|
|
310
310
|
}
|
|
311
311
|
)
|
|
312
312
|
] });
|
|
313
|
-
},
|
|
313
|
+
}, Q = ({
|
|
314
314
|
onUnlock: e,
|
|
315
315
|
overlayId: t = "lock-overlay-root",
|
|
316
316
|
overlayPosition: o = "fixed"
|
|
@@ -332,7 +332,7 @@ const T = k(null), ee = ({
|
|
|
332
332
|
placeItems: "center",
|
|
333
333
|
zIndex: 9999
|
|
334
334
|
},
|
|
335
|
-
children: /* @__PURE__ */
|
|
335
|
+
children: /* @__PURE__ */ T("div", { className: "lockscreen-form", style: { width: 420, maxWidth: "92vw" }, children: [
|
|
336
336
|
/* @__PURE__ */ d("div", { className: "lock-icon-wrap", children: /* @__PURE__ */ d("span", { className: "lock-icon-box" }) }),
|
|
337
337
|
/* @__PURE__ */ d("h2", { children: "잠금됨" }),
|
|
338
338
|
/* @__PURE__ */ d("p", { children: "PIN 번호를 입력하세요" }),
|
|
@@ -342,7 +342,7 @@ const T = k(null), ee = ({
|
|
|
342
342
|
className: "lock-ipt-wrap",
|
|
343
343
|
style: { display: "flex", justifyContent: "center" },
|
|
344
344
|
children: /* @__PURE__ */ d(
|
|
345
|
-
|
|
345
|
+
H.OTP,
|
|
346
346
|
{
|
|
347
347
|
mask: "*",
|
|
348
348
|
autoFocus: !0,
|
|
@@ -361,23 +361,23 @@ const T = k(null), ee = ({
|
|
|
361
361
|
);
|
|
362
362
|
};
|
|
363
363
|
export {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
364
|
+
ae as AuthProvider,
|
|
365
|
+
de as CommonCodeProvider,
|
|
366
|
+
ve as ScreenProtectProvider,
|
|
367
|
+
se as SearchBoxProvider,
|
|
368
|
+
te as ServiceCodeProvider,
|
|
369
|
+
re as useAllServiceCodes,
|
|
370
|
+
ue as useAuth,
|
|
371
|
+
me as useCodeColor,
|
|
372
|
+
le as useCodeList,
|
|
373
|
+
fe as useCodeListByOption,
|
|
374
|
+
pe as useCodeName,
|
|
375
375
|
P as useCommonCode,
|
|
376
376
|
he as useGridLookup,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
377
|
+
we as useLock,
|
|
378
|
+
ne as useLogServiceCodeConfig,
|
|
379
|
+
ie as usePopup,
|
|
380
|
+
ce as useSearchBox,
|
|
381
|
+
F as useServiceCode,
|
|
382
|
+
oe as useServiceCodeValue
|
|
383
383
|
};
|