sales-frontend-components 0.0.155 → 0.0.157
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 +26 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.esm.js +25 -7
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/dist/index.cjs.js
CHANGED
|
@@ -633,7 +633,17 @@ const useAddressComponent = () => {
|
|
|
633
633
|
};
|
|
634
634
|
};
|
|
635
635
|
|
|
636
|
-
const
|
|
636
|
+
const BANK_STOCK_SEARCH_MODAL_TABS = [
|
|
637
|
+
{
|
|
638
|
+
value: "bank",
|
|
639
|
+
label: "\uC740\uD589"
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
value: "stock",
|
|
643
|
+
label: "\uC99D\uAD8C\uC0AC"
|
|
644
|
+
}
|
|
645
|
+
];
|
|
646
|
+
const BANK_STOCK_ICON_LIST = [
|
|
637
647
|
{
|
|
638
648
|
codeVal: "002",
|
|
639
649
|
codeName: "\uC0B0\uC5C5\uC740\uD589",
|
|
@@ -974,7 +984,7 @@ function BankStockSearchModal({ open, onClose, onSelect }) {
|
|
|
974
984
|
const chunkedList = chunk(list, 5);
|
|
975
985
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$1["list-container"], children: chunkedList.map((chunk2, chunkIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$1.row, children: [
|
|
976
986
|
chunk2.map((item) => {
|
|
977
|
-
const findItem =
|
|
987
|
+
const findItem = BANK_STOCK_ICON_LIST.find((icon) => icon.codeVal === item.codeVal);
|
|
978
988
|
const convertedItem = findItem ? findItem : {
|
|
979
989
|
icon: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconGraphicsStockHochulEopsum, {}),
|
|
980
990
|
replaceName: item.codeName
|
|
@@ -1078,7 +1088,7 @@ const useCustomerSearch = (onSelect) => {
|
|
|
1078
1088
|
|
|
1079
1089
|
const cx$j = classNames.bind(styles$2);
|
|
1080
1090
|
const { InputBox: InputBox$3, Input: Input$3 } = salesFrontendDesignSystem.FormCore;
|
|
1081
|
-
const CustomerSearch = ({ onSelectCustomer, placeholder, rootProps, ...props }) => {
|
|
1091
|
+
const CustomerSearch = ({ onSelectCustomer, onSearchClear, placeholder, rootProps, ...props }) => {
|
|
1082
1092
|
const {
|
|
1083
1093
|
triggerRef,
|
|
1084
1094
|
isOpen,
|
|
@@ -1092,8 +1102,12 @@ const CustomerSearch = ({ onSelectCustomer, placeholder, rootProps, ...props })
|
|
|
1092
1102
|
onClear,
|
|
1093
1103
|
handleSelectItem
|
|
1094
1104
|
} = useCustomerSearch(onSelectCustomer);
|
|
1105
|
+
const handleClear = () => {
|
|
1106
|
+
onClear();
|
|
1107
|
+
onSearchClear?.();
|
|
1108
|
+
};
|
|
1095
1109
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$j("container"), children: [
|
|
1096
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(InputBox$3, { ...rootProps, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1110
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$j("search-bar"), children: /* @__PURE__ */ jsxRuntime.jsx(InputBox$3, { ...rootProps, endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: handleClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1097
1111
|
Input$3,
|
|
1098
1112
|
{
|
|
1099
1113
|
...props,
|
|
@@ -1134,7 +1148,7 @@ const CustomerSearch = ({ onSelectCustomer, placeholder, rootProps, ...props })
|
|
|
1134
1148
|
|
|
1135
1149
|
const cx$i = classNames.bind(styles$2);
|
|
1136
1150
|
const { InputBox: InputBox$2, Input: Input$2 } = salesFrontendDesignSystem.FormCore;
|
|
1137
|
-
function CustomerSearchModal({ isOpen, closeModal, onSelect }) {
|
|
1151
|
+
function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear }) {
|
|
1138
1152
|
const {
|
|
1139
1153
|
triggerRef,
|
|
1140
1154
|
searchInput,
|
|
@@ -1149,12 +1163,16 @@ function CustomerSearchModal({ isOpen, closeModal, onSelect }) {
|
|
|
1149
1163
|
onClear,
|
|
1150
1164
|
handleSelectItem
|
|
1151
1165
|
} = useCustomerSearch(onSelect);
|
|
1166
|
+
const handleClear = () => {
|
|
1167
|
+
onClear();
|
|
1168
|
+
onSearchClear?.();
|
|
1169
|
+
};
|
|
1152
1170
|
return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "full-screen", children: [
|
|
1153
1171
|
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
|
|
1154
1172
|
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
|
|
1155
1173
|
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uACE0\uAC1D \uAC80\uC0C9", showCloseButton: true }),
|
|
1156
1174
|
/* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
|
|
1157
|
-
/* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1175
|
+
/* @__PURE__ */ jsxRuntime.jsx(InputBox$2, { endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendAssets.IconMainUiSearch, { onClick: search }), onClear: handleClear, clearable: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1158
1176
|
Input$2,
|
|
1159
1177
|
{
|
|
1160
1178
|
onChange: onSearchInputChange,
|
|
@@ -4419,6 +4437,8 @@ const useDownloader = () => {
|
|
|
4419
4437
|
};
|
|
4420
4438
|
|
|
4421
4439
|
exports.Attachment = Attachment;
|
|
4440
|
+
exports.BANK_STOCK_ICON_LIST = BANK_STOCK_ICON_LIST;
|
|
4441
|
+
exports.BANK_STOCK_SEARCH_MODAL_TABS = BANK_STOCK_SEARCH_MODAL_TABS;
|
|
4422
4442
|
exports.BankStockSearchModal = BankStockSearchModal;
|
|
4423
4443
|
exports.CODES = CODES;
|
|
4424
4444
|
exports.CustomerSearch = CustomerSearch;
|