sales-frontend-components 0.0.158 → 0.0.160

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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { FieldValues, UseControllerProps } from 'react-hook-form';
3
3
  import { CheckboxButtonProps, CheckboxProps, DatePickerSingleHtmlProps, DatePickerRangeHtmlProps, FormField, SegmentItems, SegmentGroupHtmlProps, SelectProps, OptionProps, useDropDown } from 'sales-frontend-design-system';
4
4
  import * as React$1 from 'react';
5
- import React__default from 'react';
5
+ import React__default, { JSX } from 'react';
6
6
  import * as sales_frontend_api_method from 'sales-frontend-api/method';
7
7
  import { AddressStandardizationResponseDto, AddressResponseDto, CodeDto, CustomerSearchProps, CustomerDto, NationalityResponseDto, VisaStatusResponseDto, PersonalCustomerProfileResponseDto, EmployeeProfileResponseDto, OccupationResponseDto, OccupationDetailResponseDto, OrganizationProfileResponse, RemoteIdentityVerificationSystemTokenRequestDto, ApiConfig } from 'sales-frontend-api/method';
8
8
  import { NxlOneResponse, NxlOneProps } from 'sales-frontend-solution';
@@ -347,6 +347,8 @@ declare const useNationalityComponent: () => {
347
347
  nationality: NationalityResponseDto | undefined;
348
348
  openModal: () => void;
349
349
  NationalitySearchComponent: () => react_jsx_runtime.JSX.Element;
350
+ isConfirmed: boolean;
351
+ setIsConfirmed: React__default.Dispatch<React__default.SetStateAction<boolean>>;
350
352
  };
351
353
 
352
354
  type Step = 'appInit' | 'tabletEformInit' | 'tabletEformRe' | 'tabletEformSubInfo' | 'smartphoneEformSubInfo' | 'smartphoneEformAlimtalkInit' | 'smartphoneEformAlimtalkRe' | 'tabletNewCustomer' | 'tabletNewCustomerLegalRep' | 'tabletCustomerInfoPlanAgreement' | 'tabletCustomerInfoProductAgreement';
@@ -459,6 +461,8 @@ declare const useVisaComponent: () => {
459
461
  isOpen: boolean;
460
462
  closeModal: () => void;
461
463
  setVisa: React__default.Dispatch<React__default.SetStateAction<VisaStatusResponseDto | undefined>>;
464
+ isConfirmed: boolean;
465
+ setIsConfirmed: React__default.Dispatch<React__default.SetStateAction<boolean>>;
462
466
  };
463
467
 
464
468
  interface DeaCustomerSearchModalProps {
@@ -480,6 +484,7 @@ declare function useJobSearchModal(): {
480
484
  JobSearchComponent: react_jsx_runtime.JSX.Element;
481
485
  isJobSearchOpen: boolean;
482
486
  isConfirmed: boolean;
487
+ setIsConfirmed: React$1.Dispatch<React$1.SetStateAction<boolean>>;
483
488
  openJobSearchModal: () => void;
484
489
  closeJobSearchModal: () => void;
485
490
  selectedJob: OccupationResponseDto | null;
@@ -496,6 +501,7 @@ declare function useJobVehicleSearchModal(): {
496
501
  hospitalizationGrade: string;
497
502
  isOpenJobVehicleModal: boolean;
498
503
  isConfirmed: boolean;
504
+ setIsConfirmed: React$1.Dispatch<React$1.SetStateAction<boolean>>;
499
505
  openJobVehicleModal: () => void;
500
506
  closeJobVehicleModal: () => void;
501
507
  JobVehicleSearchModalComponent: react_jsx_runtime.JSX.Element;
@@ -514,6 +520,9 @@ interface JobVehicleSearchModalProps {
514
520
  }
515
521
  declare function JobVehicleSearchModal({ onClose }: JobVehicleSearchModalProps): react_jsx_runtime.JSX.Element;
516
522
 
523
+ declare const highlightOnSearchKeyword: (originalText: string, targetString: string) => string | (string | JSX.Element)[];
524
+ declare const getGenderName: (genderCode?: string) => "" | "남성" | "여성";
525
+
517
526
  interface VerificationResponse {
518
527
  command: 'webClose';
519
528
  args: {
@@ -643,5 +652,5 @@ declare const useDownloader: () => {
643
652
  isError: boolean;
644
653
  };
645
654
 
646
- export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
655
+ export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
647
656
  export type { AttachedPhoto, AttachmentProps, BankStockSearchModalProps, CodeSet, DownloadProps, DownloadTargetInfo, DownloaderProps, FormSegmentGroupProps, PaintProps, Pen, RemoteIdentityVerificationSuccess, RivUrlParams, Step, StepIndicatorProps, StepItem, UseRemoteIdentityVerificationProps, VerificationResponse, cameraItemType, cameraOptions };
package/dist/index.esm.js CHANGED
@@ -1273,7 +1273,7 @@ const NationalitySearchInitialText = ({
1273
1273
  /* @__PURE__ */ jsx("ul", { className: cx$h("favorite"), children: favoriteList.map((item, index) => /* @__PURE__ */ jsx("li", { onClick: () => set(item.nationalityCodeName), children: /* @__PURE__ */ jsx("button", { children: item.nationalityCodeName }) }, `${item.nationalityCode}-${index}`)) })
1274
1274
  ] });
1275
1275
  };
1276
- const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) => {
1276
+ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect, onConfirm }) => {
1277
1277
  const [filterList, setFilterList] = useState([]);
1278
1278
  useEffect(() => {
1279
1279
  const filterList2 = nationalityList.filter((item) => item.nationalityCodeName.includes(searchKeyWord)) || [];
@@ -1286,7 +1286,10 @@ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) =
1286
1286
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1287
1287
  ] }),
1288
1288
  /* @__PURE__ */ jsx("ul", { className: cx$h("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
1289
- return /* @__PURE__ */ jsx("li", { onClick: () => onSelect(item.nationalityCodeName), children: /* @__PURE__ */ jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
1289
+ return /* @__PURE__ */ jsx("li", { onClick: () => {
1290
+ onSelect(item.nationalityCodeName);
1291
+ onConfirm();
1292
+ }, children: /* @__PURE__ */ jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
1290
1293
  }) }),
1291
1294
  filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$h("search-result"), children: [
1292
1295
  "`",
@@ -1295,7 +1298,7 @@ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) =
1295
1298
  ] })
1296
1299
  ] });
1297
1300
  };
1298
- function NationalityComponent({ isOpen, onClose, setValue }) {
1301
+ function NationalityComponent({ isOpen, onClose, setValue, onConfirm }) {
1299
1302
  const {
1300
1303
  search,
1301
1304
  onClear,
@@ -1337,7 +1340,7 @@ function NationalityComponent({ isOpen, onClose, setValue }) {
1337
1340
  }
1338
1341
  ),
1339
1342
  !searchKeyWord && /* @__PURE__ */ jsx(NationalitySearchInitialText, { setSearchInput, setSearchKeyword }),
1340
- searchKeyWord && /* @__PURE__ */ jsx(NationalitySearchResult, { nationalityList: searchList, searchKeyWord, onSelect })
1343
+ searchKeyWord && /* @__PURE__ */ jsx(NationalitySearchResult, { nationalityList: searchList, searchKeyWord, onSelect, onConfirm })
1341
1344
  ] })
1342
1345
  ] })
1343
1346
  ] }) });
@@ -1403,14 +1406,24 @@ function useSearchNationality({ setValue, onClose, isOpen }) {
1403
1406
  const useNationalityComponent = () => {
1404
1407
  const [nationality, setNationality] = useState();
1405
1408
  const { isOpen, closeModal, openModal } = useModalState();
1406
- const NationalitySearchComponent = () => /* @__PURE__ */ jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality });
1409
+ const [isConfirmed, setIsConfirmed] = useState(false);
1410
+ const onConfirm = () => {
1411
+ setIsConfirmed(true);
1412
+ };
1413
+ const openInitModal = () => {
1414
+ setIsConfirmed(false);
1415
+ openModal();
1416
+ };
1417
+ const NationalitySearchComponent = () => /* @__PURE__ */ jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality, onConfirm });
1407
1418
  return {
1408
1419
  isOpen,
1409
1420
  closeModal,
1410
1421
  setNationality,
1411
1422
  nationality,
1412
- openModal,
1413
- NationalitySearchComponent
1423
+ openModal: openInitModal,
1424
+ NationalitySearchComponent,
1425
+ isConfirmed,
1426
+ setIsConfirmed
1414
1427
  };
1415
1428
  };
1416
1429
 
@@ -1838,12 +1851,15 @@ function useNxlOneModal({
1838
1851
 
1839
1852
  const cx$g = classNames.bind(styles$4);
1840
1853
  const { InputBox, Input } = FormCore;
1841
- const VisaSearchInitialText = ({ visaList, onSelect }) => {
1854
+ const VisaSearchInitialText = ({ visaList, onSelect, onConfirm }) => {
1842
1855
  return /* @__PURE__ */ jsx("div", { className: cx$g("favorite-container"), children: /* @__PURE__ */ jsx("ul", { className: cx$g("favorite"), children: visaList.map((item, index) => {
1843
- return /* @__PURE__ */ jsx("li", { onClick: () => onSelect(item), children: /* @__PURE__ */ jsx("button", { children: item.integrationCodeValueName }) }, `${index}-${item.integrationCodeValueName}`);
1856
+ return /* @__PURE__ */ jsx("li", { onClick: () => {
1857
+ onSelect(item);
1858
+ onConfirm();
1859
+ }, children: /* @__PURE__ */ jsx("button", { children: item.integrationCodeValueName }) }, `${index}-${item.integrationCodeValueName}`);
1844
1860
  }) }) });
1845
1861
  };
1846
- const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1862
+ const VisaSearchResult = ({ visaList, searchKeyword, onSelect, onConfirm }) => {
1847
1863
  const [filterList, setFilterList] = useState([]);
1848
1864
  useEffect(() => {
1849
1865
  const filterList2 = visaList.filter((item) => item.integrationCodeValueName?.includes(searchKeyword)) || [];
@@ -1856,7 +1872,10 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1856
1872
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1857
1873
  ] }),
1858
1874
  /* @__PURE__ */ jsx("ul", { className: cx$g("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
1859
- return /* @__PURE__ */ jsx("li", { onClick: () => onSelect(item), children: /* @__PURE__ */ jsx("button", { children: highlightOnSearchKeyword(`${item.integrationCodeValueName}`, searchKeyword) }) }, `${index}-${item.integrationCodeValueName}`);
1875
+ return /* @__PURE__ */ jsx("li", { onClick: () => {
1876
+ onSelect(item);
1877
+ onConfirm();
1878
+ }, children: /* @__PURE__ */ jsx("button", { children: highlightOnSearchKeyword(`${item.integrationCodeValueName}`, searchKeyword) }) }, `${index}-${item.integrationCodeValueName}`);
1860
1879
  }) }),
1861
1880
  filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$g("search-result"), children: [
1862
1881
  "`",
@@ -1865,7 +1884,7 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1865
1884
  ] })
1866
1885
  ] });
1867
1886
  };
1868
- function VisaComponent({ isOpen, onClose, setValue }) {
1887
+ function VisaComponent({ isOpen, onClose, setValue, onConfirm }) {
1869
1888
  const { search, onClear, searchKeyword, onKeyUp, onSearch, searchList, searchInput, onSelect } = useSearchVisa({
1870
1889
  setValue,
1871
1890
  onClose,
@@ -1895,8 +1914,8 @@ function VisaComponent({ isOpen, onClose, setValue }) {
1895
1914
  )
1896
1915
  }
1897
1916
  ),
1898
- !searchKeyword && /* @__PURE__ */ jsx(VisaSearchInitialText, { visaList: searchList, onSelect }),
1899
- searchKeyword && /* @__PURE__ */ jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect })
1917
+ !searchKeyword && /* @__PURE__ */ jsx(VisaSearchInitialText, { visaList: searchList, onSelect, onConfirm }),
1918
+ searchKeyword && /* @__PURE__ */ jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect, onConfirm })
1900
1919
  ] })
1901
1920
  ] })
1902
1921
  ] }) });
@@ -1959,15 +1978,25 @@ function useSearchVisa({ setValue, onClose, isOpen }) {
1959
1978
  }
1960
1979
  const useVisaComponent = () => {
1961
1980
  const [visa, setVisa] = useState();
1981
+ const [isConfirmed, setIsConfirmed] = useState(false);
1962
1982
  const { isOpen, closeModal, openModal } = useModalState();
1963
- const VisaSearchComponent = () => /* @__PURE__ */ jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa });
1983
+ const onConfirm = () => {
1984
+ setIsConfirmed(true);
1985
+ };
1986
+ const openInitModal = () => {
1987
+ setIsConfirmed(false);
1988
+ openModal();
1989
+ };
1990
+ const VisaSearchComponent = () => /* @__PURE__ */ jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa, onConfirm });
1964
1991
  return {
1965
1992
  visa,
1966
- openModal,
1993
+ openModal: openInitModal,
1967
1994
  VisaSearchComponent,
1968
1995
  isOpen,
1969
1996
  closeModal,
1970
- setVisa
1997
+ setVisa,
1998
+ isConfirmed,
1999
+ setIsConfirmed
1971
2000
  };
1972
2001
  };
1973
2002
 
@@ -2827,6 +2856,7 @@ function useJobSearchModal() {
2827
2856
  reset();
2828
2857
  setSelectedJob(null);
2829
2858
  setActiveTab("jobName");
2859
+ setIsConfirmed(false);
2830
2860
  openModal();
2831
2861
  };
2832
2862
  const closeModalWithCheck = () => {
@@ -2899,6 +2929,7 @@ function useJobSearchModal() {
2899
2929
  ),
2900
2930
  isJobSearchOpen: isOpen,
2901
2931
  isConfirmed,
2932
+ setIsConfirmed,
2902
2933
  openJobSearchModal: openInitModal,
2903
2934
  closeJobSearchModal: closeModal,
2904
2935
  selectedJob,
@@ -3071,6 +3102,7 @@ function useJobVehicleSearchModal() {
3071
3102
  };
3072
3103
  const openInitModal = () => {
3073
3104
  resetJobVehicleSearch();
3105
+ setIsConfirmed(false);
3074
3106
  openModal();
3075
3107
  };
3076
3108
  return {
@@ -3081,6 +3113,7 @@ function useJobVehicleSearchModal() {
3081
3113
  hospitalizationGrade,
3082
3114
  isOpenJobVehicleModal: isOpen,
3083
3115
  isConfirmed,
3116
+ setIsConfirmed,
3084
3117
  openJobVehicleModal: openInitModal,
3085
3118
  closeJobVehicleModal: closeModal,
3086
3119
  JobVehicleSearchModalComponent: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
@@ -4442,5 +4475,5 @@ const useDownloader = () => {
4442
4475
  };
4443
4476
  };
4444
4477
 
4445
- export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
4478
+ export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
4446
4479
  //# sourceMappingURL=index.esm.js.map