sales-frontend-components 0.0.158 → 0.0.159

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
@@ -347,6 +347,7 @@ declare const useNationalityComponent: () => {
347
347
  nationality: NationalityResponseDto | undefined;
348
348
  openModal: () => void;
349
349
  NationalitySearchComponent: () => react_jsx_runtime.JSX.Element;
350
+ isConfirmed: boolean;
350
351
  };
351
352
 
352
353
  type Step = 'appInit' | 'tabletEformInit' | 'tabletEformRe' | 'tabletEformSubInfo' | 'smartphoneEformSubInfo' | 'smartphoneEformAlimtalkInit' | 'smartphoneEformAlimtalkRe' | 'tabletNewCustomer' | 'tabletNewCustomerLegalRep' | 'tabletCustomerInfoPlanAgreement' | 'tabletCustomerInfoProductAgreement';
@@ -459,6 +460,7 @@ declare const useVisaComponent: () => {
459
460
  isOpen: boolean;
460
461
  closeModal: () => void;
461
462
  setVisa: React__default.Dispatch<React__default.SetStateAction<VisaStatusResponseDto | undefined>>;
463
+ isConfirmed: boolean;
462
464
  };
463
465
 
464
466
  interface DeaCustomerSearchModalProps {
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,19 @@ 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 NationalitySearchComponent = () => /* @__PURE__ */ jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality, onConfirm });
1407
1414
  return {
1408
1415
  isOpen,
1409
1416
  closeModal,
1410
1417
  setNationality,
1411
1418
  nationality,
1412
1419
  openModal,
1413
- NationalitySearchComponent
1420
+ NationalitySearchComponent,
1421
+ isConfirmed
1414
1422
  };
1415
1423
  };
1416
1424
 
@@ -1838,12 +1846,15 @@ function useNxlOneModal({
1838
1846
 
1839
1847
  const cx$g = classNames.bind(styles$4);
1840
1848
  const { InputBox, Input } = FormCore;
1841
- const VisaSearchInitialText = ({ visaList, onSelect }) => {
1849
+ const VisaSearchInitialText = ({ visaList, onSelect, onConfirm }) => {
1842
1850
  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}`);
1851
+ return /* @__PURE__ */ jsx("li", { onClick: () => {
1852
+ onSelect(item);
1853
+ onConfirm();
1854
+ }, children: /* @__PURE__ */ jsx("button", { children: item.integrationCodeValueName }) }, `${index}-${item.integrationCodeValueName}`);
1844
1855
  }) }) });
1845
1856
  };
1846
- const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1857
+ const VisaSearchResult = ({ visaList, searchKeyword, onSelect, onConfirm }) => {
1847
1858
  const [filterList, setFilterList] = useState([]);
1848
1859
  useEffect(() => {
1849
1860
  const filterList2 = visaList.filter((item) => item.integrationCodeValueName?.includes(searchKeyword)) || [];
@@ -1856,7 +1867,10 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1856
1867
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1857
1868
  ] }),
1858
1869
  /* @__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}`);
1870
+ return /* @__PURE__ */ jsx("li", { onClick: () => {
1871
+ onSelect(item);
1872
+ onConfirm();
1873
+ }, children: /* @__PURE__ */ jsx("button", { children: highlightOnSearchKeyword(`${item.integrationCodeValueName}`, searchKeyword) }) }, `${index}-${item.integrationCodeValueName}`);
1860
1874
  }) }),
1861
1875
  filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$g("search-result"), children: [
1862
1876
  "`",
@@ -1865,7 +1879,7 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1865
1879
  ] })
1866
1880
  ] });
1867
1881
  };
1868
- function VisaComponent({ isOpen, onClose, setValue }) {
1882
+ function VisaComponent({ isOpen, onClose, setValue, onConfirm }) {
1869
1883
  const { search, onClear, searchKeyword, onKeyUp, onSearch, searchList, searchInput, onSelect } = useSearchVisa({
1870
1884
  setValue,
1871
1885
  onClose,
@@ -1895,8 +1909,8 @@ function VisaComponent({ isOpen, onClose, setValue }) {
1895
1909
  )
1896
1910
  }
1897
1911
  ),
1898
- !searchKeyword && /* @__PURE__ */ jsx(VisaSearchInitialText, { visaList: searchList, onSelect }),
1899
- searchKeyword && /* @__PURE__ */ jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect })
1912
+ !searchKeyword && /* @__PURE__ */ jsx(VisaSearchInitialText, { visaList: searchList, onSelect, onConfirm }),
1913
+ searchKeyword && /* @__PURE__ */ jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect, onConfirm })
1900
1914
  ] })
1901
1915
  ] })
1902
1916
  ] }) });
@@ -1959,15 +1973,20 @@ function useSearchVisa({ setValue, onClose, isOpen }) {
1959
1973
  }
1960
1974
  const useVisaComponent = () => {
1961
1975
  const [visa, setVisa] = useState();
1976
+ const [isConfirmed, setIsConfirmed] = useState(false);
1962
1977
  const { isOpen, closeModal, openModal } = useModalState();
1963
- const VisaSearchComponent = () => /* @__PURE__ */ jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa });
1978
+ const onConfirm = () => {
1979
+ setIsConfirmed(true);
1980
+ };
1981
+ const VisaSearchComponent = () => /* @__PURE__ */ jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa, onConfirm });
1964
1982
  return {
1965
1983
  visa,
1966
1984
  openModal,
1967
1985
  VisaSearchComponent,
1968
1986
  isOpen,
1969
1987
  closeModal,
1970
- setVisa
1988
+ setVisa,
1989
+ isConfirmed
1971
1990
  };
1972
1991
  };
1973
1992