sales-frontend-components 2.0.2 → 2.0.4
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
|
@@ -227,6 +227,18 @@ var _MessageEventManager = class _MessageEventManager2 {
|
|
|
227
227
|
};
|
|
228
228
|
__publicField(_MessageEventManager, "instance");
|
|
229
229
|
var MessageEventManager = _MessageEventManager;
|
|
230
|
+
function getCanvasExportFileInfo(imageUrl) {
|
|
231
|
+
const ext = imageUrl.split(".").pop()?.split("?")[0]?.toLowerCase();
|
|
232
|
+
switch (ext) {
|
|
233
|
+
case "jpg":
|
|
234
|
+
case "jpeg":
|
|
235
|
+
return { contentType: "image/jpeg", fileExt: "jpg" };
|
|
236
|
+
case "webp":
|
|
237
|
+
return { contentType: "image/webp", fileExt: "webp" };
|
|
238
|
+
default:
|
|
239
|
+
return { contentType: "image/png", fileExt: "png" };
|
|
240
|
+
}
|
|
241
|
+
}
|
|
230
242
|
function base64ToBlob(base64String, contentType = "") {
|
|
231
243
|
const regex = /^data:([a-zA-Z0-9/+.-]+);base64,/;
|
|
232
244
|
const matches = base64String.match(regex);
|
|
@@ -320,41 +332,46 @@ async function imageUrlToFileFetch(imageUrl) {
|
|
|
320
332
|
const file = new File([blob], name, { type });
|
|
321
333
|
return file;
|
|
322
334
|
}
|
|
323
|
-
async function imageUrlToFile(imageUrl) {
|
|
324
|
-
|
|
325
|
-
const fileConvertType = getCookie$1(fileConvertTypeCookieKey);
|
|
326
|
-
if (fileConvertType === "fetch") {
|
|
335
|
+
async function imageUrlToFile(imageUrl, convertType) {
|
|
336
|
+
if (convertType === "fetch") {
|
|
327
337
|
return await imageUrlToFileFetch(imageUrl);
|
|
328
338
|
}
|
|
329
|
-
if (
|
|
339
|
+
if (convertType === "xhr") {
|
|
330
340
|
return await imageUrlToFileWithXMLHttpRequest(imageUrl);
|
|
331
341
|
}
|
|
332
342
|
return await imageUrlToFileWithCanvas(imageUrl);
|
|
333
343
|
}
|
|
334
344
|
async function imageUrlToFileWithCanvas(imageUrl) {
|
|
335
345
|
const newImage = new Image();
|
|
336
|
-
newImage.src = imageUrl;
|
|
337
|
-
newImage.crossOrigin = "Anonymous";
|
|
338
346
|
return new Promise((resolve, reject) => {
|
|
339
347
|
newImage.onload = () => {
|
|
340
348
|
const canvas = document.createElement("canvas");
|
|
341
349
|
canvas.width = newImage.width;
|
|
342
350
|
canvas.height = newImage.height;
|
|
343
351
|
const ctx = canvas.getContext("2d");
|
|
344
|
-
if (ctx) {
|
|
352
|
+
if (!ctx) {
|
|
353
|
+
reject(new Error("Failed to get canvas 2d context."));
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
try {
|
|
345
357
|
ctx.drawImage(newImage, 0, 0);
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
358
|
+
const { contentType, fileExt } = getCanvasExportFileInfo(imageUrl);
|
|
359
|
+
const dataUrl = canvas.toDataURL(contentType);
|
|
360
|
+
const blob = base64ToBlob(dataUrl, contentType);
|
|
361
|
+
resolve(blobToFile(blob, `image.${fileExt}`));
|
|
362
|
+
} catch (error) {
|
|
363
|
+
reject(
|
|
364
|
+
new Error(
|
|
365
|
+
`imageUrlToFileWithCanvas failed for "${imageUrl}". ${error instanceof Error ? error.message : "Unknown error"}`
|
|
366
|
+
)
|
|
367
|
+
);
|
|
353
368
|
}
|
|
354
369
|
};
|
|
355
370
|
newImage.onerror = (e) => {
|
|
356
371
|
reject(JSON.stringify(e));
|
|
357
372
|
};
|
|
373
|
+
newImage.crossOrigin = "Anonymous";
|
|
374
|
+
newImage.src = imageUrl;
|
|
358
375
|
});
|
|
359
376
|
}
|
|
360
377
|
async function imageUrlToFileWithXMLHttpRequest(imageUrl) {
|
|
@@ -727,7 +744,7 @@ const AddressSearchDetailInput = ({
|
|
|
727
744
|
}) => {
|
|
728
745
|
const { land, road } = selectedStandardizationAddress || {};
|
|
729
746
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
730
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "address-search-standardization", size: "medium", className: "mb-xxlarge", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Item, { wrapperProps: { className: cx$x("search-result-radio") }, value: "", checked: true, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx$x("search-result"), children: [
|
|
747
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "address-search-standardization", size: "medium", align: "vertical", className: "mb-xxlarge", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Item, { wrapperProps: { className: cx$x("search-result-radio") }, value: "", checked: true, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx$x("search-result"), children: [
|
|
731
748
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
732
749
|
"span",
|
|
733
750
|
{
|
|
@@ -2452,7 +2469,7 @@ function DeaCustomerSearchResult({
|
|
|
2452
2469
|
/* @__PURE__ */ jsxRuntime.jsx("th", { className: cx$q("th-padding"), children: "\uC8FC\uC18C" })
|
|
2453
2470
|
] }) }),
|
|
2454
2471
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: customerList.length > 0 ? customerList.map((customer, index) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2455
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2472
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: cx$q("radio-cell"), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "d-flex-center-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2456
2473
|
salesFrontendDesignSystem.Radio.Item,
|
|
2457
2474
|
{
|
|
2458
2475
|
id: `radio-${index}`,
|
|
@@ -2464,7 +2481,7 @@ function DeaCustomerSearchResult({
|
|
|
2464
2481
|
onCustomerSelect(customer);
|
|
2465
2482
|
}
|
|
2466
2483
|
}
|
|
2467
|
-
) }),
|
|
2484
|
+
) }) }),
|
|
2468
2485
|
/* @__PURE__ */ jsxRuntime.jsx("td", { children: customer.customerId }),
|
|
2469
2486
|
/* @__PURE__ */ jsxRuntime.jsx("td", { children: customer.customerName }),
|
|
2470
2487
|
/* @__PURE__ */ jsxRuntime.jsx("td", { children: customer.residentNumber }),
|
|
@@ -3006,8 +3023,7 @@ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3006
3023
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3007
3024
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3008
3025
|
] }),
|
|
3009
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$m("job-radio-root"),
|
|
3010
|
-
}, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3026
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$m("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3011
3027
|
salesFrontendDesignSystem.Accordion.Item,
|
|
3012
3028
|
{
|
|
3013
3029
|
id: `item-${job.occupationIndustryCode}-${index}-accordion`,
|
|
@@ -3041,7 +3057,7 @@ const cx$l = classNames.bind(styles$8);
|
|
|
3041
3057
|
function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
3042
3058
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$l("popular-jobs"), children: [
|
|
3043
3059
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
|
|
3044
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$l("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3060
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$l("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3045
3061
|
salesFrontendDesignSystem.Accordion.Item,
|
|
3046
3062
|
{
|
|
3047
3063
|
id: `item-${job.occupationIndustryCode}-${index}`,
|
|
@@ -3085,7 +3101,7 @@ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3085
3101
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3086
3102
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3087
3103
|
] }),
|
|
3088
|
-
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$k("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$k("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3089
3105
|
salesFrontendDesignSystem.Accordion.Item,
|
|
3090
3106
|
{
|
|
3091
3107
|
id: `item-${job.occupationIndustryCode}`,
|
|
@@ -3505,6 +3521,7 @@ function VehicleSearch({ vehicles, onVehicleSelect, selectedVehicle }) {
|
|
|
3505
3521
|
{
|
|
3506
3522
|
name: "vehicle-selection",
|
|
3507
3523
|
size: "small",
|
|
3524
|
+
align: "vertical",
|
|
3508
3525
|
className: cx$h("vehicle-radio-root"),
|
|
3509
3526
|
defaultValue: selectedVehicle?.integrationCodeValue || "",
|
|
3510
3527
|
children: vehicles.map((vehicle, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4566,7 +4583,8 @@ function useCamera({
|
|
|
4566
4583
|
buttonText,
|
|
4567
4584
|
initData,
|
|
4568
4585
|
useNativeCamera = false,
|
|
4569
|
-
responseFileType
|
|
4586
|
+
responseFileType,
|
|
4587
|
+
convertType = "canvas"
|
|
4570
4588
|
} = {}) {
|
|
4571
4589
|
const convertedInitData = initData?.map((data, index) => ({ ...data, id: String(index + 1) }));
|
|
4572
4590
|
const [attachedPhotos, setAttachedPhotos] = React9.useState(convertedInitData || []);
|
|
@@ -4590,7 +4608,7 @@ function useCamera({
|
|
|
4590
4608
|
};
|
|
4591
4609
|
const processImage = async (uri) => {
|
|
4592
4610
|
if (responseFileType === "scheme") {
|
|
4593
|
-
const file = await imageUrlToFile(uri);
|
|
4611
|
+
const file = await imageUrlToFile(uri, convertType);
|
|
4594
4612
|
await imageHandler(file);
|
|
4595
4613
|
} else {
|
|
4596
4614
|
const file = await base64ToFile(uri, "image.jpg");
|
package/dist/index.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface cameraOptions {
|
|
|
118
118
|
cameraOnly: boolean;
|
|
119
119
|
buttonText?: string;
|
|
120
120
|
responseFileType?: 'base64' | 'scheme';
|
|
121
|
+
convertType?: 'fetch' | 'xhr' | 'canvas';
|
|
121
122
|
resize: {
|
|
122
123
|
resizeRatio?: number;
|
|
123
124
|
processType?: 'quality' | 'px' | 'mixed';
|
|
@@ -175,7 +176,7 @@ interface AddImageInfo {
|
|
|
175
176
|
* responseFileType fetch로 이미지자원을 가져올때 ios이슈가 있어서,
|
|
176
177
|
* scheme, base64 두가지 타입으로 설정가능하도록 변경됨
|
|
177
178
|
*/
|
|
178
|
-
declare function useCamera({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData, useNativeCamera, responseFileType }?: Partial<cameraOptions>): {
|
|
179
|
+
declare function useCamera({ onChange, resize: resizeOption, cameraOnly, onDelete, show, type, buttonText, initData, useNativeCamera, responseFileType, convertType }?: Partial<cameraOptions>): {
|
|
179
180
|
onClick: () => void;
|
|
180
181
|
getImage: (imageId: string) => AttachedPhoto | undefined;
|
|
181
182
|
deleteImage: (imageId: string) => void;
|
package/dist/index.esm.js
CHANGED
|
@@ -225,6 +225,18 @@ var _MessageEventManager = class _MessageEventManager2 {
|
|
|
225
225
|
};
|
|
226
226
|
__publicField(_MessageEventManager, "instance");
|
|
227
227
|
var MessageEventManager = _MessageEventManager;
|
|
228
|
+
function getCanvasExportFileInfo(imageUrl) {
|
|
229
|
+
const ext = imageUrl.split(".").pop()?.split("?")[0]?.toLowerCase();
|
|
230
|
+
switch (ext) {
|
|
231
|
+
case "jpg":
|
|
232
|
+
case "jpeg":
|
|
233
|
+
return { contentType: "image/jpeg", fileExt: "jpg" };
|
|
234
|
+
case "webp":
|
|
235
|
+
return { contentType: "image/webp", fileExt: "webp" };
|
|
236
|
+
default:
|
|
237
|
+
return { contentType: "image/png", fileExt: "png" };
|
|
238
|
+
}
|
|
239
|
+
}
|
|
228
240
|
function base64ToBlob(base64String, contentType = "") {
|
|
229
241
|
const regex = /^data:([a-zA-Z0-9/+.-]+);base64,/;
|
|
230
242
|
const matches = base64String.match(regex);
|
|
@@ -318,41 +330,46 @@ async function imageUrlToFileFetch(imageUrl) {
|
|
|
318
330
|
const file = new File([blob], name, { type });
|
|
319
331
|
return file;
|
|
320
332
|
}
|
|
321
|
-
async function imageUrlToFile(imageUrl) {
|
|
322
|
-
|
|
323
|
-
const fileConvertType = getCookie$1(fileConvertTypeCookieKey);
|
|
324
|
-
if (fileConvertType === "fetch") {
|
|
333
|
+
async function imageUrlToFile(imageUrl, convertType) {
|
|
334
|
+
if (convertType === "fetch") {
|
|
325
335
|
return await imageUrlToFileFetch(imageUrl);
|
|
326
336
|
}
|
|
327
|
-
if (
|
|
337
|
+
if (convertType === "xhr") {
|
|
328
338
|
return await imageUrlToFileWithXMLHttpRequest(imageUrl);
|
|
329
339
|
}
|
|
330
340
|
return await imageUrlToFileWithCanvas(imageUrl);
|
|
331
341
|
}
|
|
332
342
|
async function imageUrlToFileWithCanvas(imageUrl) {
|
|
333
343
|
const newImage = new Image();
|
|
334
|
-
newImage.src = imageUrl;
|
|
335
|
-
newImage.crossOrigin = "Anonymous";
|
|
336
344
|
return new Promise((resolve, reject) => {
|
|
337
345
|
newImage.onload = () => {
|
|
338
346
|
const canvas = document.createElement("canvas");
|
|
339
347
|
canvas.width = newImage.width;
|
|
340
348
|
canvas.height = newImage.height;
|
|
341
349
|
const ctx = canvas.getContext("2d");
|
|
342
|
-
if (ctx) {
|
|
350
|
+
if (!ctx) {
|
|
351
|
+
reject(new Error("Failed to get canvas 2d context."));
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
try {
|
|
343
355
|
ctx.drawImage(newImage, 0, 0);
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
356
|
+
const { contentType, fileExt } = getCanvasExportFileInfo(imageUrl);
|
|
357
|
+
const dataUrl = canvas.toDataURL(contentType);
|
|
358
|
+
const blob = base64ToBlob(dataUrl, contentType);
|
|
359
|
+
resolve(blobToFile(blob, `image.${fileExt}`));
|
|
360
|
+
} catch (error) {
|
|
361
|
+
reject(
|
|
362
|
+
new Error(
|
|
363
|
+
`imageUrlToFileWithCanvas failed for "${imageUrl}". ${error instanceof Error ? error.message : "Unknown error"}`
|
|
364
|
+
)
|
|
365
|
+
);
|
|
351
366
|
}
|
|
352
367
|
};
|
|
353
368
|
newImage.onerror = (e) => {
|
|
354
369
|
reject(JSON.stringify(e));
|
|
355
370
|
};
|
|
371
|
+
newImage.crossOrigin = "Anonymous";
|
|
372
|
+
newImage.src = imageUrl;
|
|
356
373
|
});
|
|
357
374
|
}
|
|
358
375
|
async function imageUrlToFileWithXMLHttpRequest(imageUrl) {
|
|
@@ -725,7 +742,7 @@ const AddressSearchDetailInput = ({
|
|
|
725
742
|
}) => {
|
|
726
743
|
const { land, road } = selectedStandardizationAddress || {};
|
|
727
744
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
728
|
-
/* @__PURE__ */ jsx(Radio.Root, { name: "address-search-standardization", size: "medium", className: "mb-xxlarge", children: /* @__PURE__ */ jsx(Radio.Item, { wrapperProps: { className: cx$x("search-result-radio") }, value: "", checked: true, children: /* @__PURE__ */ jsxs("span", { className: cx$x("search-result"), children: [
|
|
745
|
+
/* @__PURE__ */ jsx(Radio.Root, { name: "address-search-standardization", size: "medium", align: "vertical", className: "mb-xxlarge", children: /* @__PURE__ */ jsx(Radio.Item, { wrapperProps: { className: cx$x("search-result-radio") }, value: "", checked: true, children: /* @__PURE__ */ jsxs("span", { className: cx$x("search-result"), children: [
|
|
729
746
|
/* @__PURE__ */ jsx(
|
|
730
747
|
"span",
|
|
731
748
|
{
|
|
@@ -2450,7 +2467,7 @@ function DeaCustomerSearchResult({
|
|
|
2450
2467
|
/* @__PURE__ */ jsx("th", { className: cx$q("th-padding"), children: "\uC8FC\uC18C" })
|
|
2451
2468
|
] }) }),
|
|
2452
2469
|
/* @__PURE__ */ jsx("tbody", { children: customerList.length > 0 ? customerList.map((customer, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
2453
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(
|
|
2470
|
+
/* @__PURE__ */ jsx("td", { className: cx$q("radio-cell"), children: /* @__PURE__ */ jsx("div", { className: "d-flex-center-center", children: /* @__PURE__ */ jsx(
|
|
2454
2471
|
Radio.Item,
|
|
2455
2472
|
{
|
|
2456
2473
|
id: `radio-${index}`,
|
|
@@ -2462,7 +2479,7 @@ function DeaCustomerSearchResult({
|
|
|
2462
2479
|
onCustomerSelect(customer);
|
|
2463
2480
|
}
|
|
2464
2481
|
}
|
|
2465
|
-
) }),
|
|
2482
|
+
) }) }),
|
|
2466
2483
|
/* @__PURE__ */ jsx("td", { children: customer.customerId }),
|
|
2467
2484
|
/* @__PURE__ */ jsx("td", { children: customer.customerName }),
|
|
2468
2485
|
/* @__PURE__ */ jsx("td", { children: customer.residentNumber }),
|
|
@@ -3004,8 +3021,7 @@ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3004
3021
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3005
3022
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3006
3023
|
] }),
|
|
3007
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$m("job-radio-root"),
|
|
3008
|
-
}, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3024
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$m("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3009
3025
|
Accordion.Item,
|
|
3010
3026
|
{
|
|
3011
3027
|
id: `item-${job.occupationIndustryCode}-${index}-accordion`,
|
|
@@ -3039,7 +3055,7 @@ const cx$l = classNames.bind(styles$8);
|
|
|
3039
3055
|
function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
3040
3056
|
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$l("popular-jobs"), children: [
|
|
3041
3057
|
/* @__PURE__ */ jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
|
|
3042
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$l("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3058
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$l("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3043
3059
|
Accordion.Item,
|
|
3044
3060
|
{
|
|
3045
3061
|
id: `item-${job.occupationIndustryCode}-${index}`,
|
|
@@ -3083,7 +3099,7 @@ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3083
3099
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3084
3100
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3085
3101
|
] }),
|
|
3086
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$k("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3102
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$k("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3087
3103
|
Accordion.Item,
|
|
3088
3104
|
{
|
|
3089
3105
|
id: `item-${job.occupationIndustryCode}`,
|
|
@@ -3503,6 +3519,7 @@ function VehicleSearch({ vehicles, onVehicleSelect, selectedVehicle }) {
|
|
|
3503
3519
|
{
|
|
3504
3520
|
name: "vehicle-selection",
|
|
3505
3521
|
size: "small",
|
|
3522
|
+
align: "vertical",
|
|
3506
3523
|
className: cx$h("vehicle-radio-root"),
|
|
3507
3524
|
defaultValue: selectedVehicle?.integrationCodeValue || "",
|
|
3508
3525
|
children: vehicles.map((vehicle, index) => /* @__PURE__ */ jsxs(
|
|
@@ -4564,7 +4581,8 @@ function useCamera({
|
|
|
4564
4581
|
buttonText,
|
|
4565
4582
|
initData,
|
|
4566
4583
|
useNativeCamera = false,
|
|
4567
|
-
responseFileType
|
|
4584
|
+
responseFileType,
|
|
4585
|
+
convertType = "canvas"
|
|
4568
4586
|
} = {}) {
|
|
4569
4587
|
const convertedInitData = initData?.map((data, index) => ({ ...data, id: String(index + 1) }));
|
|
4570
4588
|
const [attachedPhotos, setAttachedPhotos] = useState(convertedInitData || []);
|
|
@@ -4588,7 +4606,7 @@ function useCamera({
|
|
|
4588
4606
|
};
|
|
4589
4607
|
const processImage = async (uri) => {
|
|
4590
4608
|
if (responseFileType === "scheme") {
|
|
4591
|
-
const file = await imageUrlToFile(uri);
|
|
4609
|
+
const file = await imageUrlToFile(uri, convertType);
|
|
4592
4610
|
await imageHandler(file);
|
|
4593
4611
|
} else {
|
|
4594
4612
|
const file = await base64ToFile(uri, "image.jpg");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sales-frontend-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"sales-frontend-stores": "0.0.15",
|
|
46
46
|
"sales-frontend-typescript-config": "0.0.2",
|
|
47
47
|
"sales-frontend-assets": "0.0.27",
|
|
48
|
-
"sales-frontend-api": "0.0.
|
|
49
|
-
"sales-frontend-design-system": "0.2.
|
|
50
|
-
"sales-frontend-bridge": "0.0.
|
|
51
|
-
"sales-frontend-hooks": "0.0.
|
|
52
|
-
"sales-frontend-solution": "0.0.
|
|
53
|
-
"sales-frontend-debug": "0.0.
|
|
48
|
+
"sales-frontend-api": "0.0.179",
|
|
49
|
+
"sales-frontend-design-system": "0.2.3",
|
|
50
|
+
"sales-frontend-bridge": "0.0.119",
|
|
51
|
+
"sales-frontend-hooks": "0.0.180",
|
|
52
|
+
"sales-frontend-solution": "0.0.59",
|
|
53
|
+
"sales-frontend-debug": "0.0.77",
|
|
54
54
|
"sales-frontend-vitest-config": "0.0.3"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
@@ -58,19 +58,19 @@
|
|
|
58
58
|
"react": ">=19.0.0",
|
|
59
59
|
"react-dom": ">=19.0.0",
|
|
60
60
|
"react-hook-form": "^7.58.1",
|
|
61
|
-
"sales-frontend-api": "0.0.
|
|
61
|
+
"sales-frontend-api": "0.0.179",
|
|
62
62
|
"sales-frontend-assets": "0.0.27",
|
|
63
63
|
"sales-frontend-stores": "0.0.15",
|
|
64
|
-
"sales-frontend-design-system": "0.2.
|
|
65
|
-
"sales-frontend-bridge": "0.0.
|
|
66
|
-
"sales-frontend-hooks": "0.0.
|
|
67
|
-
"sales-frontend-solution": "0.0.
|
|
64
|
+
"sales-frontend-design-system": "0.2.3",
|
|
65
|
+
"sales-frontend-bridge": "0.0.119",
|
|
66
|
+
"sales-frontend-hooks": "0.0.180",
|
|
67
|
+
"sales-frontend-solution": "0.0.59"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"classnames": "^2.5.1",
|
|
71
71
|
"dayjs": "^1.11.13",
|
|
72
|
-
"sales-frontend-utils": "0.0.
|
|
73
|
-
"sales-frontend-debug": "0.0.
|
|
72
|
+
"sales-frontend-utils": "0.0.71",
|
|
73
|
+
"sales-frontend-debug": "0.0.77"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
76
|
"lint": "eslint . --max-warnings 0",
|