sales-frontend-components 0.0.187 → 0.0.189
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 +134 -109
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +134 -109
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -144,6 +144,16 @@ var isClient = () => {
|
|
|
144
144
|
return false;
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
+
var getBusinessWorkDivisionCode = () => {
|
|
148
|
+
return location.pathname.split("/")[1] ?? "";
|
|
149
|
+
};
|
|
150
|
+
var getServicePath = () => {
|
|
151
|
+
if (typeof window.isStorybookEnv === "boolean") {
|
|
152
|
+
return "";
|
|
153
|
+
} else {
|
|
154
|
+
return `/${getBusinessWorkDivisionCode()}`;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
147
157
|
var isAndroidDevice = () => {
|
|
148
158
|
if (isClient() === false) {
|
|
149
159
|
return false;
|
|
@@ -3002,53 +3012,64 @@ function useJobSearchModal() {
|
|
|
3002
3012
|
openModal();
|
|
3003
3013
|
};
|
|
3004
3014
|
const closeModalWithCheck = () => {
|
|
3005
|
-
setIsConfirmed(true);
|
|
3006
3015
|
if (!selectedJob) {
|
|
3007
3016
|
ModalUtils.alert("\uC9C1\uC885\uC744 \uC120\uD0DD\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uC9C1\uC885 \uC120\uD0DD \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.", "\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694.", {
|
|
3008
3017
|
modalId: "job-search-alert-no-selected"
|
|
3009
3018
|
});
|
|
3010
3019
|
return;
|
|
3011
3020
|
}
|
|
3021
|
+
setIsConfirmed(true);
|
|
3012
3022
|
closeModal();
|
|
3013
3023
|
};
|
|
3014
3024
|
return {
|
|
3015
|
-
JobSearchModal: /* @__PURE__ */ jsxs(
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3025
|
+
JobSearchModal: /* @__PURE__ */ jsxs(
|
|
3026
|
+
Modal.Root,
|
|
3027
|
+
{
|
|
3028
|
+
isOpen,
|
|
3029
|
+
onClose: () => {
|
|
3030
|
+
closeModal();
|
|
3031
|
+
setIsConfirmed(false);
|
|
3032
|
+
},
|
|
3033
|
+
modalSize: "xlarge",
|
|
3034
|
+
children: [
|
|
3035
|
+
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
3036
|
+
/* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
|
|
3037
|
+
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
|
|
3038
|
+
/* @__PURE__ */ jsx(Modal.Body, { raw: true, children: /* @__PURE__ */ jsx(
|
|
3039
|
+
JobSearch,
|
|
3040
|
+
{
|
|
3041
|
+
firstCategory,
|
|
3042
|
+
firstCategoryList,
|
|
3043
|
+
secondCategoryList,
|
|
3044
|
+
setFirstCategory,
|
|
3045
|
+
secondCategory,
|
|
3046
|
+
activeTab,
|
|
3047
|
+
onTabChange,
|
|
3048
|
+
searchTerm,
|
|
3049
|
+
setSearchInput,
|
|
3050
|
+
filteredJobs: filteredJobs || [],
|
|
3051
|
+
onJobSelect: handleJobSelect,
|
|
3052
|
+
searchInput,
|
|
3053
|
+
setSearchTerm,
|
|
3054
|
+
setSecondCategory,
|
|
3055
|
+
isLoading
|
|
3056
|
+
}
|
|
3057
|
+
) }),
|
|
3058
|
+
/* @__PURE__ */ jsx(Modal.Footer, { children: /* @__PURE__ */ jsx(
|
|
3059
|
+
Button,
|
|
3060
|
+
{
|
|
3061
|
+
variant: "primary",
|
|
3062
|
+
size: "medium",
|
|
3063
|
+
appearance: "filled",
|
|
3064
|
+
width: "full",
|
|
3065
|
+
onClick: closeModalWithCheck,
|
|
3066
|
+
children: "\uD655\uC778"
|
|
3067
|
+
}
|
|
3068
|
+
) })
|
|
3069
|
+
] })
|
|
3070
|
+
]
|
|
3071
|
+
}
|
|
3072
|
+
),
|
|
3052
3073
|
JobSearchComponent: /* @__PURE__ */ jsx(
|
|
3053
3074
|
JobSearch,
|
|
3054
3075
|
{
|
|
@@ -3261,57 +3282,78 @@ function useJobVehicleSearchModal() {
|
|
|
3261
3282
|
setIsConfirmed,
|
|
3262
3283
|
openJobVehicleModal: openInitModal,
|
|
3263
3284
|
closeJobVehicleModal: closeModal,
|
|
3264
|
-
JobVehicleSearchModalComponent: /* @__PURE__ */ jsxs(
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3285
|
+
JobVehicleSearchModalComponent: /* @__PURE__ */ jsxs(
|
|
3286
|
+
Modal.Root,
|
|
3287
|
+
{
|
|
3288
|
+
isOpen,
|
|
3289
|
+
onClose: () => {
|
|
3290
|
+
closeModal();
|
|
3291
|
+
setIsConfirmed(false);
|
|
3292
|
+
},
|
|
3293
|
+
modalSize: "xlarge",
|
|
3294
|
+
children: [
|
|
3295
|
+
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
3296
|
+
/* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
|
|
3297
|
+
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885\xB7\uC6B4\uC804\uCC28\uC885 \uAC80\uC0C9", showCloseButton: true }),
|
|
3298
|
+
/* @__PURE__ */ jsx(Modal.Body, { className: cx$5("job-vehicle-search-modal"), raw: true, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3299
|
+
/* @__PURE__ */ jsxs("div", { className: cx$5("left-panel"), children: [
|
|
3300
|
+
/* @__PURE__ */ jsxs("div", { className: cx$5("card-section"), children: [
|
|
3301
|
+
/* @__PURE__ */ jsxs(
|
|
3302
|
+
"div",
|
|
3303
|
+
{
|
|
3304
|
+
className: cx$5("card-menu", { "card-selected": rightPanelView === "jobSearch" }),
|
|
3305
|
+
onClick: () => setRightPanelView("jobSearch"),
|
|
3306
|
+
children: [
|
|
3307
|
+
/* @__PURE__ */ jsxs("div", { className: cx$5("card-title"), children: [
|
|
3308
|
+
/* @__PURE__ */ jsx(IconIllustJob, { className: cx$5("card-icon") }),
|
|
3309
|
+
/* @__PURE__ */ jsx("span", { className: cx$5("card-text", "typo-title5", "text-body"), children: "\uC9C1\uC885" }),
|
|
3310
|
+
/* @__PURE__ */ jsx(IconSubUiArrowRight, {})
|
|
3311
|
+
] }),
|
|
3312
|
+
/* @__PURE__ */ jsx("div", { className: "typo-body2 text-body_2", children: selectedJob ? selectedJob.occupationIndustryName : "\uBBF8\uC120\uD0DD" })
|
|
3313
|
+
]
|
|
3314
|
+
}
|
|
3315
|
+
),
|
|
3316
|
+
/* @__PURE__ */ jsxs(
|
|
3317
|
+
"div",
|
|
3318
|
+
{
|
|
3319
|
+
className: cx$5("card-menu", { "card-selected": rightPanelView === "vehicleSelection" }),
|
|
3320
|
+
onClick: () => setRightPanelView("vehicleSelection"),
|
|
3321
|
+
children: [
|
|
3322
|
+
/* @__PURE__ */ jsxs("div", { className: cx$5("card-title"), children: [
|
|
3323
|
+
/* @__PURE__ */ jsx(IconIllustVehicle, { className: cx$5("card-icon") }),
|
|
3324
|
+
/* @__PURE__ */ jsx("span", { className: cx$5("card-text", "typo-title5", "text-body"), children: "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885" }),
|
|
3325
|
+
/* @__PURE__ */ jsx(IconSubUiArrowRight, {})
|
|
3326
|
+
] }),
|
|
3327
|
+
/* @__PURE__ */ jsxs("div", { className: "typo-body2 text-body_2", children: [
|
|
3328
|
+
selectedVehicle?.integrationCodeValueName,
|
|
3329
|
+
selectedVehicle?.integrationCodeValue || "\uBBF8\uC120\uD0DD"
|
|
3330
|
+
] })
|
|
3331
|
+
]
|
|
3332
|
+
}
|
|
3333
|
+
)
|
|
3334
|
+
] }),
|
|
3335
|
+
/* @__PURE__ */ jsx(JobVehicleSearchGrade, { riskGrade, hospitalizationGrade })
|
|
3336
|
+
] }),
|
|
3337
|
+
/* @__PURE__ */ jsx("div", { className: cx$5("right-panel"), children: rightPanelView === "jobSearch" ? JobSearch : VehicleSearch })
|
|
3338
|
+
] }) }),
|
|
3339
|
+
/* @__PURE__ */ jsx(Modal.Footer, { style: { marginTop: 0 }, children: /* @__PURE__ */ jsx(
|
|
3340
|
+
Button,
|
|
3341
|
+
{
|
|
3342
|
+
variant: "primary",
|
|
3343
|
+
size: "medium",
|
|
3344
|
+
appearance: "filled",
|
|
3345
|
+
width: "full",
|
|
3346
|
+
onClick: () => {
|
|
3347
|
+
validate();
|
|
3348
|
+
setIsConfirmed(true);
|
|
3349
|
+
},
|
|
3350
|
+
children: "\uD655\uC778"
|
|
3351
|
+
}
|
|
3352
|
+
) })
|
|
3353
|
+
] })
|
|
3354
|
+
]
|
|
3355
|
+
}
|
|
3356
|
+
)
|
|
3315
3357
|
};
|
|
3316
3358
|
}
|
|
3317
3359
|
|
|
@@ -4555,26 +4597,9 @@ const useDownloader = () => {
|
|
|
4555
4597
|
const [isLoading, setIsLoading] = useState(false);
|
|
4556
4598
|
const downloadFile = async (url, fileName) => {
|
|
4557
4599
|
try {
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
if (!response.ok) {
|
|
4562
|
-
throw new Error(`Failed to download ${url}`);
|
|
4563
|
-
}
|
|
4564
|
-
const blob = await response.blob();
|
|
4565
|
-
downloadUrl = window.URL.createObjectURL(blob);
|
|
4566
|
-
} else if (url.startsWith("blob")) {
|
|
4567
|
-
downloadUrl = url;
|
|
4568
|
-
} else {
|
|
4569
|
-
throw new Error(`unknown type : ${url}`);
|
|
4570
|
-
}
|
|
4571
|
-
const a = document.createElement("a");
|
|
4572
|
-
a.href = downloadUrl;
|
|
4573
|
-
a.download = fileName || url.split("/").pop() || "download";
|
|
4574
|
-
document.body.appendChild(a);
|
|
4575
|
-
a.click();
|
|
4576
|
-
a.remove();
|
|
4577
|
-
window.URL.revokeObjectURL(downloadUrl);
|
|
4600
|
+
const servicePath = getServicePath();
|
|
4601
|
+
const downloadUrl = `${servicePath}/internal/api/download?filename=${encodeURIComponent(fileName)}&filepath=${encodeURIComponent(url)}`;
|
|
4602
|
+
window.location.href = downloadUrl;
|
|
4578
4603
|
} catch (e) {
|
|
4579
4604
|
console.error(e);
|
|
4580
4605
|
throw e;
|