sales-frontend-components 0.0.106 → 0.0.107

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
@@ -236,12 +236,12 @@ const highlightOnSearchKeyword$1 = (originalText, targetString) => {
236
236
  return originalText;
237
237
  };
238
238
 
239
- const cx$j = classNames.bind(styles);
240
- const { InputBox: InputBox$3, Input: Input$3 } = salesFrontendDesignSystem.FormCore;
239
+ const cx$k = classNames.bind(styles);
240
+ const { InputBox: InputBox$4, Input: Input$4 } = salesFrontendDesignSystem.FormCore;
241
241
  const AddressSearchInitialText = () => {
242
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("search-result-list"), children: [
243
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$j("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
244
- /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$j("guide"), children: [
242
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
243
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$k("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
244
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$k("guide"), children: [
245
245
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
246
246
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
247
247
  /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
@@ -257,8 +257,8 @@ const AddressSearchResult = ({
257
257
  searchKeyword,
258
258
  selectedAddress
259
259
  }) => {
260
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("search-result-list"), children: [
261
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$j("guide-title"), children: [
260
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
261
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$k("guide-title"), children: [
262
262
  "\uCD1D ",
263
263
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: addressSearchList.length }),
264
264
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
@@ -270,15 +270,15 @@ const AddressSearchResult = ({
270
270
  return {
271
271
  value: JSON.stringify(item),
272
272
  select: item.roadNameBaseAddress === selectedAddress?.roadNameBaseAddress && item.roadNameDetailAddress === selectedAddress?.roadNameDetailAddress && item.mainBuildingName === selectedAddress?.mainBuildingName,
273
- label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("search-result"), children: [
274
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("zipcode"), children: highlightOnSearchKeyword$1(`${item.firstPostalCode}${item.secondPostalCode}`, searchKeyword) }),
275
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("divider") }),
276
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("address-info"), children: [
277
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("address"), children: highlightOnSearchKeyword$1(
273
+ label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result"), children: [
274
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("zipcode"), children: highlightOnSearchKeyword$1(`${item.firstPostalCode}${item.secondPostalCode}`, searchKeyword) }),
275
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("divider") }),
276
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("address-info"), children: [
277
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("address"), children: highlightOnSearchKeyword$1(
278
278
  `${item.roadNameBaseAddress} ${item.roadNameDetailAddress} ${item.mainBuildingName}`,
279
279
  searchKeyword
280
280
  ) }),
281
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("old-address"), children: highlightOnSearchKeyword$1(
281
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("old-address"), children: highlightOnSearchKeyword$1(
282
282
  `${item.landNumberBaseAddress} ${item.landNumberDetailAddress}`,
283
283
  searchKeyword
284
284
  ) })
@@ -287,7 +287,7 @@ const AddressSearchResult = ({
287
287
  id: JSON.stringify(item)
288
288
  };
289
289
  }),
290
- className: cx$j("radio-group"),
290
+ className: cx$k("radio-group"),
291
291
  name: "address-search",
292
292
  size: "medium",
293
293
  defaultValue: "",
@@ -309,7 +309,7 @@ const AddressSearchDetailInput = ({
309
309
  detailAddressInput
310
310
  }) => {
311
311
  const { land, road } = selectedStandardizationAddress;
312
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("search-result-list"), children: [
312
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result-list"), children: [
313
313
  /* @__PURE__ */ jsxRuntime.jsx(
314
314
  salesFrontendDesignSystem.Radio.Root,
315
315
  {
@@ -319,21 +319,21 @@ const AddressSearchDetailInput = ({
319
319
  children: /* @__PURE__ */ jsxRuntime.jsx(
320
320
  salesFrontendDesignSystem.Radio.Item,
321
321
  {
322
- className: cx$j("radio-group"),
322
+ className: cx$k("radio-group"),
323
323
  value: JSON.stringify(selectedStandardizationAddress),
324
324
  onChange: onStandardizationChange,
325
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("search-result"), children: [
325
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("search-result"), children: [
326
326
  /* @__PURE__ */ jsxRuntime.jsx(
327
327
  "div",
328
328
  {
329
- className: cx$j("zipcode"),
329
+ className: cx$k("zipcode"),
330
330
  children: `${selectedStandardizationAddress.land?.firstPostalCode}${land?.secondPostalCode}`
331
331
  }
332
332
  ),
333
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("divider") }),
334
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("address-info"), children: [
335
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("address"), children: `${road?.baseAddress} ${road?.detailAddress}` }),
336
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("old-address"), children: `${land?.baseAddress} ${land?.detailAddress}` })
333
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$k("divider") }),
334
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$k("address-info"), children: [
335
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("address"), children: `${road?.baseAddress} ${road?.detailAddress}` }),
336
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$k("old-address"), children: `${land?.baseAddress} ${land?.detailAddress}` })
337
337
  ] })
338
338
  ] })
339
339
  }
@@ -390,8 +390,8 @@ function AddressComponent({ isOpen, onClose, setValue }) {
390
390
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
391
391
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
392
392
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
393
- /* @__PURE__ */ jsxRuntime.jsx(InputBox$3, { clearable: true, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: onAddressSearchClear, children: /* @__PURE__ */ jsxRuntime.jsx(
394
- Input$3,
393
+ /* @__PURE__ */ jsxRuntime.jsx(InputBox$4, { clearable: true, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: onAddressSearchClear, children: /* @__PURE__ */ jsxRuntime.jsx(
394
+ Input$4,
395
395
  {
396
396
  ...addressSearchStep !== "detail-input" && { autoFocus: true },
397
397
  onChange: onSearch,
@@ -1063,7 +1063,7 @@ const useCustomerSearch = (onSelect) => {
1063
1063
  };
1064
1064
  };
1065
1065
 
1066
- const cx$i = classNames.bind(styles$2);
1066
+ const cx$j = classNames.bind(styles$2);
1067
1067
  const highlightOnSearchKeyword = (originalText, targetString) => {
1068
1068
  if (!targetString || !originalText?.includes(targetString)) {
1069
1069
  return originalText;
@@ -1080,7 +1080,7 @@ const highlightOnSearchKeyword = (originalText, targetString) => {
1080
1080
  }
1081
1081
  return replacedText;
1082
1082
  };
1083
- const { InputBox: InputBox$2, Input: Input$2 } = salesFrontendDesignSystem.FormCore;
1083
+ const { InputBox: InputBox$3, Input: Input$3 } = salesFrontendDesignSystem.FormCore;
1084
1084
  const CustomerSearch = ({ onSelect }) => {
1085
1085
  const {
1086
1086
  triggerRef,
@@ -1095,9 +1095,9 @@ const CustomerSearch = ({ onSelect }) => {
1095
1095
  onClear,
1096
1096
  handleSelectItem
1097
1097
  } = useCustomerSearch(onSelect);
1098
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("container"), children: [
1099
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1100
- Input$2,
1098
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("container"), children: [
1099
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(InputBox$3, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1100
+ Input$3,
1101
1101
  {
1102
1102
  onChange: onSearchInputChange,
1103
1103
  onKeyUp,
@@ -1107,14 +1107,14 @@ const CustomerSearch = ({ onSelect }) => {
1107
1107
  ref: triggerRef
1108
1108
  }
1109
1109
  ) }) }),
1110
- isOpen && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(DropDown, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("result-container"), children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { children: customerList.map((customer) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.ListItem, { onClick: () => handleSelectItem(customer), selectable: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("customer-item"), children: [
1111
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
1112
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("details"), children: [
1110
+ isOpen && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(DropDown, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("result-container"), children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { children: customerList.map((customer) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.ListItem, { onClick: () => handleSelectItem(customer), selectable: true, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("customer-item"), children: [
1111
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
1112
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("details"), children: [
1113
1113
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate }),
1114
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
1114
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
1115
1115
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.genderCode }),
1116
1116
  customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1117
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
1117
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$j("separator"), children: "|" }),
1118
1118
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
1119
1119
  ] })
1120
1120
  ] })
@@ -1122,6 +1122,80 @@ const CustomerSearch = ({ onSelect }) => {
1122
1122
  ] });
1123
1123
  };
1124
1124
 
1125
+ const cx$i = classNames.bind(styles$2);
1126
+ const { InputBox: InputBox$2, Input: Input$2 } = salesFrontendDesignSystem.FormCore;
1127
+ function CustomerSearchModal({ isOpen, closeModal, onSelect }) {
1128
+ const {
1129
+ triggerRef,
1130
+ searchInput,
1131
+ customerList,
1132
+ searchKeyword,
1133
+ onSearchInputChange,
1134
+ setSearchKeyword,
1135
+ setSearchInput,
1136
+ setCustomerList,
1137
+ onKeyUp,
1138
+ search,
1139
+ onClear,
1140
+ handleSelectItem
1141
+ } = useCustomerSearch(onSelect);
1142
+ return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "full-screen", children: [
1143
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
1144
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1145
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uACE0\uAC1D \uAC80\uC0C9", showCloseButton: true }),
1146
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1147
+ /* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1148
+ Input$2,
1149
+ {
1150
+ onChange: onSearchInputChange,
1151
+ onKeyUp,
1152
+ value: searchInput,
1153
+ placeholder: "\uACE0\uAC1D\uBA85\uC744 \uB450 \uAE00\uC790 \uC774\uC0C1 \uC785\uB825\uD574\uC8FC\uC138\uC694.",
1154
+ size: "large",
1155
+ ref: triggerRef
1156
+ }
1157
+ ) }),
1158
+ searchKeyword && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$i("result-count"), children: [
1159
+ "\uCD1D ",
1160
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: customerList.length }),
1161
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1162
+ ] }),
1163
+ searchKeyword && customerList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("search-result"), children: [
1164
+ "`",
1165
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
1166
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
1167
+ ] }),
1168
+ searchKeyword && customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: customerList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { rootProps: { style: { width: "100%" } }, children: customerList.map((customer) => /* @__PURE__ */ jsxRuntime.jsx(
1169
+ salesFrontendDesignSystem.ListItem,
1170
+ {
1171
+ onClick: () => {
1172
+ handleSelectItem(customer);
1173
+ setSearchKeyword("");
1174
+ setSearchInput("");
1175
+ setCustomerList([]);
1176
+ closeModal();
1177
+ },
1178
+ selectable: true,
1179
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("customer-item", "modal"), children: [
1180
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$i("name"), children: highlightOnSearchKeyword$1(customer.customerName || "", searchKeyword) }),
1181
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$i("details", "modal"), children: [
1182
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.birthDate }),
1183
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
1184
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.genderCode }),
1185
+ customer.baseAddress && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1186
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$i("separator"), children: "|" }),
1187
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: customer.baseAddress })
1188
+ ] })
1189
+ ] })
1190
+ ] })
1191
+ },
1192
+ customer.customerId
1193
+ )) }) })
1194
+ ] })
1195
+ ] })
1196
+ ] });
1197
+ }
1198
+
1125
1199
  const cx$h = classNames.bind(styles$3);
1126
1200
  const { InputBox: InputBox$1, Input: Input$1 } = salesFrontendDesignSystem.FormCore;
1127
1201
  const favoriteList = [
@@ -3983,6 +4057,7 @@ exports.Attachment = Attachment;
3983
4057
  exports.BankStockSearchModal = BankStockSearchModal;
3984
4058
  exports.CODES = CODES;
3985
4059
  exports.CustomerSearch = CustomerSearch;
4060
+ exports.CustomerSearchModal = CustomerSearchModal;
3986
4061
  exports.DeaCustomerSearchModal = DeaCustomerSearchModal;
3987
4062
  exports.EmployeeSearchModal = EmployeeSearchModal;
3988
4063
  exports.FormCheckbox = FormCheckbox;