sales-frontend-components 0.0.213 → 0.0.215
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/camera/camera.module.scss +2 -2
- package/dist/index.cjs.js +43 -26
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.esm.js +44 -26
- package/dist/index.esm.js.map +1 -1
- package/package.json +15 -15
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
width: 100%;
|
|
93
93
|
height: 100%;
|
|
94
94
|
background-color: #f5f5f5;
|
|
95
|
-
border: 1px solid colors(border-
|
|
95
|
+
border: 1px solid colors(border-neutral_3);
|
|
96
96
|
border-radius: radius-basic(xlarge);
|
|
97
97
|
|
|
98
98
|
.photo-image {
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
height: 100%;
|
|
140
140
|
color: colors(text-body);
|
|
141
141
|
cursor: pointer;
|
|
142
|
-
background-color: colors(background-
|
|
142
|
+
background-color: colors(background-200);
|
|
143
143
|
border: 1px solid colors(border-neutral_3);
|
|
144
144
|
border-radius: radius-basic(xlarge);
|
|
145
145
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -149,7 +149,7 @@ var isClient = () => {
|
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
var getBusinessWorkDivisionCode = () => {
|
|
152
|
+
var getBusinessWorkDivisionCode = (pathname) => {
|
|
153
153
|
return location.pathname.split("/")[1] ?? "";
|
|
154
154
|
};
|
|
155
155
|
var getServicePath = () => {
|
|
@@ -211,23 +211,40 @@ function base64ToBlob(base64String, contentType = "") {
|
|
|
211
211
|
const regex = /^data:([a-zA-Z0-9/+.-]+);base64,/;
|
|
212
212
|
const matches = base64String.match(regex);
|
|
213
213
|
if (matches === null) {
|
|
214
|
-
|
|
214
|
+
const debugInfo = {
|
|
215
|
+
base64String
|
|
216
|
+
};
|
|
217
|
+
throw new Error(`Invalid base64 string format. Debug info: ${JSON.stringify(debugInfo, null, 2)}`);
|
|
215
218
|
}
|
|
216
219
|
const contentTypeFinal = contentType || matches[1];
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
try {
|
|
221
|
+
const byteCharacters = atob(base64String.replace(regex, ""));
|
|
222
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
223
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
224
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
225
|
+
}
|
|
226
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
227
|
+
return new Blob([byteArray], { type: contentTypeFinal });
|
|
228
|
+
} catch (error) {
|
|
229
|
+
throw new Error(
|
|
230
|
+
`Failed to decode base64 string. Original error: ${error instanceof Error ? error.message : "Unknown error"}. String length: ${base64String?.length}, Content type: ${contentTypeFinal}`
|
|
231
|
+
);
|
|
221
232
|
}
|
|
222
|
-
const byteArray = new Uint8Array(byteNumbers);
|
|
223
|
-
return new Blob([byteArray], { type: contentTypeFinal });
|
|
224
233
|
}
|
|
225
234
|
function base64ToFile(base64String, fileName, contentType = "") {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
235
|
+
try {
|
|
236
|
+
const blob = base64ToBlob(base64String, contentType);
|
|
237
|
+
if (!blob) {
|
|
238
|
+
throw new Error(
|
|
239
|
+
`Failed to create blob. FileName: ${fileName}, ContentType: ${contentType}, StringLength: ${base64String?.length}`
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
return blobToFile(blob, fileName);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
throw new Error(
|
|
245
|
+
`base64ToFile failed for "${fileName}". ${error instanceof Error ? error.message : "Unknown error"}`
|
|
246
|
+
);
|
|
229
247
|
}
|
|
230
|
-
return blobToFile(blob, fileName);
|
|
231
248
|
}
|
|
232
249
|
function blobToFile(blob, fileName) {
|
|
233
250
|
return new File([blob], fileName, {
|
|
@@ -465,6 +482,19 @@ function isBackspace(event) {
|
|
|
465
482
|
}
|
|
466
483
|
return false;
|
|
467
484
|
}
|
|
485
|
+
var GENDER_LABEL_MAP = {
|
|
486
|
+
"1": "\uB0A8\uC131",
|
|
487
|
+
"2": "\uC5EC\uC131",
|
|
488
|
+
"3": "\uB0A8\uC131",
|
|
489
|
+
"4": "\uC5EC\uC131",
|
|
490
|
+
"5": "\uB0A8\uC131",
|
|
491
|
+
"6": "\uC5EC\uC131",
|
|
492
|
+
"7": "\uB0A8\uC131",
|
|
493
|
+
"8": "\uC5EC\uC131"
|
|
494
|
+
};
|
|
495
|
+
var getGenderName = (genderCode) => {
|
|
496
|
+
return genderCode ? GENDER_LABEL_MAP[genderCode] : "";
|
|
497
|
+
};
|
|
468
498
|
|
|
469
499
|
const FormDatePicker = ({
|
|
470
500
|
name,
|
|
@@ -641,18 +671,6 @@ const highlightOnSearchKeyword = (originalText, targetString) => {
|
|
|
641
671
|
}
|
|
642
672
|
return replacedText;
|
|
643
673
|
};
|
|
644
|
-
const getGenderName = (genderCode) => {
|
|
645
|
-
switch (genderCode) {
|
|
646
|
-
case "1":
|
|
647
|
-
case "3":
|
|
648
|
-
return "\uB0A8\uC131";
|
|
649
|
-
case "2":
|
|
650
|
-
case "4":
|
|
651
|
-
return "\uC5EC\uC131";
|
|
652
|
-
default:
|
|
653
|
-
return "";
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
674
|
|
|
657
675
|
const cx$l = classNames.bind(styles);
|
|
658
676
|
const { InputBox: InputBox$4, Input: Input$4 } = salesFrontendDesignSystem.FormCore;
|
|
@@ -2529,7 +2547,7 @@ const DeaCustomerSearchModal = ({
|
|
|
2529
2547
|
const { data, isFetching } = reactQuery.useQuery({
|
|
2530
2548
|
queryKey: ["deaCustomerSearch", searchParams],
|
|
2531
2549
|
queryFn: () => method.getDspCustomerListMethod(searchParams),
|
|
2532
|
-
enabled: !!searchParams,
|
|
2550
|
+
enabled: !!searchParams?.e2edata && !!searchParams?.residentNumberFront,
|
|
2533
2551
|
retry: false
|
|
2534
2552
|
});
|
|
2535
2553
|
const [customerList, setCustomerList] = React.useState([]);
|
|
@@ -4968,7 +4986,6 @@ exports.JobVehicleSearchModal = JobVehicleSearchModal;
|
|
|
4968
4986
|
exports.OrganizationSearchModal = OrganizationSearchModal;
|
|
4969
4987
|
exports.RIV_SEARCH_PARAM_MAP = RIV_SEARCH_PARAM_MAP;
|
|
4970
4988
|
exports.StepIndicator = StepIndicator;
|
|
4971
|
-
exports.getGenderName = getGenderName;
|
|
4972
4989
|
exports.highlightOnSearchKeyword = highlightOnSearchKeyword;
|
|
4973
4990
|
exports.resize = resize;
|
|
4974
4991
|
exports.testSignatureBase64Data = testSignatureBase64Data;
|