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.cjs.js CHANGED
@@ -1275,7 +1275,7 @@ const NationalitySearchInitialText = ({
1275
1275
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$h("favorite"), children: favoriteList.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => set(item.nationalityCodeName), children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: item.nationalityCodeName }) }, `${item.nationalityCode}-${index}`)) })
1276
1276
  ] });
1277
1277
  };
1278
- const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) => {
1278
+ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect, onConfirm }) => {
1279
1279
  const [filterList, setFilterList] = React.useState([]);
1280
1280
  React.useEffect(() => {
1281
1281
  const filterList2 = nationalityList.filter((item) => item.nationalityCodeName.includes(searchKeyWord)) || [];
@@ -1288,7 +1288,10 @@ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) =
1288
1288
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1289
1289
  ] }),
1290
1290
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$h("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
1291
- return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => onSelect(item.nationalityCodeName), children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
1291
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => {
1292
+ onSelect(item.nationalityCodeName);
1293
+ onConfirm();
1294
+ }, children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(item.nationalityCodeName, searchKeyWord) }) }, `${index}-${item.nationalityCode}`);
1292
1295
  }) }),
1293
1296
  filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$h("search-result"), children: [
1294
1297
  "`",
@@ -1297,7 +1300,7 @@ const NationalitySearchResult = ({ nationalityList, searchKeyWord, onSelect }) =
1297
1300
  ] })
1298
1301
  ] });
1299
1302
  };
1300
- function NationalityComponent({ isOpen, onClose, setValue }) {
1303
+ function NationalityComponent({ isOpen, onClose, setValue, onConfirm }) {
1301
1304
  const {
1302
1305
  search,
1303
1306
  onClear,
@@ -1339,7 +1342,7 @@ function NationalityComponent({ isOpen, onClose, setValue }) {
1339
1342
  }
1340
1343
  ),
1341
1344
  !searchKeyWord && /* @__PURE__ */ jsxRuntime.jsx(NationalitySearchInitialText, { setSearchInput, setSearchKeyword }),
1342
- searchKeyWord && /* @__PURE__ */ jsxRuntime.jsx(NationalitySearchResult, { nationalityList: searchList, searchKeyWord, onSelect })
1345
+ searchKeyWord && /* @__PURE__ */ jsxRuntime.jsx(NationalitySearchResult, { nationalityList: searchList, searchKeyWord, onSelect, onConfirm })
1343
1346
  ] })
1344
1347
  ] })
1345
1348
  ] }) });
@@ -1405,14 +1408,24 @@ function useSearchNationality({ setValue, onClose, isOpen }) {
1405
1408
  const useNationalityComponent = () => {
1406
1409
  const [nationality, setNationality] = React.useState();
1407
1410
  const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
1408
- const NationalitySearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality });
1411
+ const [isConfirmed, setIsConfirmed] = React.useState(false);
1412
+ const onConfirm = () => {
1413
+ setIsConfirmed(true);
1414
+ };
1415
+ const openInitModal = () => {
1416
+ setIsConfirmed(false);
1417
+ openModal();
1418
+ };
1419
+ const NationalitySearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(NationalityComponent, { isOpen, onClose: closeModal, setValue: setNationality, onConfirm });
1409
1420
  return {
1410
1421
  isOpen,
1411
1422
  closeModal,
1412
1423
  setNationality,
1413
1424
  nationality,
1414
- openModal,
1415
- NationalitySearchComponent
1425
+ openModal: openInitModal,
1426
+ NationalitySearchComponent,
1427
+ isConfirmed,
1428
+ setIsConfirmed
1416
1429
  };
1417
1430
  };
1418
1431
 
@@ -1840,12 +1853,15 @@ function useNxlOneModal({
1840
1853
 
1841
1854
  const cx$g = classNames.bind(styles$4);
1842
1855
  const { InputBox, Input } = salesFrontendDesignSystem.FormCore;
1843
- const VisaSearchInitialText = ({ visaList, onSelect }) => {
1856
+ const VisaSearchInitialText = ({ visaList, onSelect, onConfirm }) => {
1844
1857
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$g("favorite-container"), children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$g("favorite"), children: visaList.map((item, index) => {
1845
- return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => onSelect(item), children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: item.integrationCodeValueName }) }, `${index}-${item.integrationCodeValueName}`);
1858
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => {
1859
+ onSelect(item);
1860
+ onConfirm();
1861
+ }, children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: item.integrationCodeValueName }) }, `${index}-${item.integrationCodeValueName}`);
1846
1862
  }) }) });
1847
1863
  };
1848
- const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1864
+ const VisaSearchResult = ({ visaList, searchKeyword, onSelect, onConfirm }) => {
1849
1865
  const [filterList, setFilterList] = React.useState([]);
1850
1866
  React.useEffect(() => {
1851
1867
  const filterList2 = visaList.filter((item) => item.integrationCodeValueName?.includes(searchKeyword)) || [];
@@ -1858,7 +1874,10 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1858
1874
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1859
1875
  ] }),
1860
1876
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$g("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
1861
- return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => onSelect(item), children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(`${item.integrationCodeValueName}`, searchKeyword) }) }, `${index}-${item.integrationCodeValueName}`);
1877
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { onClick: () => {
1878
+ onSelect(item);
1879
+ onConfirm();
1880
+ }, children: /* @__PURE__ */ jsxRuntime.jsx("button", { children: highlightOnSearchKeyword(`${item.integrationCodeValueName}`, searchKeyword) }) }, `${index}-${item.integrationCodeValueName}`);
1862
1881
  }) }),
1863
1882
  filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$g("search-result"), children: [
1864
1883
  "`",
@@ -1867,7 +1886,7 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect }) => {
1867
1886
  ] })
1868
1887
  ] });
1869
1888
  };
1870
- function VisaComponent({ isOpen, onClose, setValue }) {
1889
+ function VisaComponent({ isOpen, onClose, setValue, onConfirm }) {
1871
1890
  const { search, onClear, searchKeyword, onKeyUp, onSearch, searchList, searchInput, onSelect } = useSearchVisa({
1872
1891
  setValue,
1873
1892
  onClose,
@@ -1897,8 +1916,8 @@ function VisaComponent({ isOpen, onClose, setValue }) {
1897
1916
  )
1898
1917
  }
1899
1918
  ),
1900
- !searchKeyword && /* @__PURE__ */ jsxRuntime.jsx(VisaSearchInitialText, { visaList: searchList, onSelect }),
1901
- searchKeyword && /* @__PURE__ */ jsxRuntime.jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect })
1919
+ !searchKeyword && /* @__PURE__ */ jsxRuntime.jsx(VisaSearchInitialText, { visaList: searchList, onSelect, onConfirm }),
1920
+ searchKeyword && /* @__PURE__ */ jsxRuntime.jsx(VisaSearchResult, { visaList: searchList, searchKeyword, onSelect, onConfirm })
1902
1921
  ] })
1903
1922
  ] })
1904
1923
  ] }) });
@@ -1961,15 +1980,25 @@ function useSearchVisa({ setValue, onClose, isOpen }) {
1961
1980
  }
1962
1981
  const useVisaComponent = () => {
1963
1982
  const [visa, setVisa] = React.useState();
1983
+ const [isConfirmed, setIsConfirmed] = React.useState(false);
1964
1984
  const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
1965
- const VisaSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa });
1985
+ const onConfirm = () => {
1986
+ setIsConfirmed(true);
1987
+ };
1988
+ const openInitModal = () => {
1989
+ setIsConfirmed(false);
1990
+ openModal();
1991
+ };
1992
+ const VisaSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(VisaComponent, { isOpen, onClose: closeModal, setValue: setVisa, onConfirm });
1966
1993
  return {
1967
1994
  visa,
1968
- openModal,
1995
+ openModal: openInitModal,
1969
1996
  VisaSearchComponent,
1970
1997
  isOpen,
1971
1998
  closeModal,
1972
- setVisa
1999
+ setVisa,
2000
+ isConfirmed,
2001
+ setIsConfirmed
1973
2002
  };
1974
2003
  };
1975
2004
 
@@ -2829,6 +2858,7 @@ function useJobSearchModal() {
2829
2858
  reset();
2830
2859
  setSelectedJob(null);
2831
2860
  setActiveTab("jobName");
2861
+ setIsConfirmed(false);
2832
2862
  openModal();
2833
2863
  };
2834
2864
  const closeModalWithCheck = () => {
@@ -2901,6 +2931,7 @@ function useJobSearchModal() {
2901
2931
  ),
2902
2932
  isJobSearchOpen: isOpen,
2903
2933
  isConfirmed,
2934
+ setIsConfirmed,
2904
2935
  openJobSearchModal: openInitModal,
2905
2936
  closeJobSearchModal: closeModal,
2906
2937
  selectedJob,
@@ -3073,6 +3104,7 @@ function useJobVehicleSearchModal() {
3073
3104
  };
3074
3105
  const openInitModal = () => {
3075
3106
  resetJobVehicleSearch();
3107
+ setIsConfirmed(false);
3076
3108
  openModal();
3077
3109
  };
3078
3110
  return {
@@ -3083,6 +3115,7 @@ function useJobVehicleSearchModal() {
3083
3115
  hospitalizationGrade,
3084
3116
  isOpenJobVehicleModal: isOpen,
3085
3117
  isConfirmed,
3118
+ setIsConfirmed,
3086
3119
  openJobVehicleModal: openInitModal,
3087
3120
  closeJobVehicleModal: closeModal,
3088
3121
  JobVehicleSearchModalComponent: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
@@ -4467,6 +4500,8 @@ exports.JobVehicleSearchModal = JobVehicleSearchModal;
4467
4500
  exports.OrganizationSearchModal = OrganizationSearchModal;
4468
4501
  exports.RIV_SEARCH_PARAM_MAP = RIV_SEARCH_PARAM_MAP;
4469
4502
  exports.StepIndicator = StepIndicator;
4503
+ exports.getGenderName = getGenderName;
4504
+ exports.highlightOnSearchKeyword = highlightOnSearchKeyword;
4470
4505
  exports.resize = resize;
4471
4506
  exports.testSignatureBase64Data = testSignatureBase64Data;
4472
4507
  exports.useAddressComponent = useAddressComponent;