sales-frontend-components 0.0.67 → 0.0.69

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
@@ -4,17 +4,13 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var reactHookForm = require('react-hook-form');
5
5
  var salesFrontendDesignSystem = require('sales-frontend-design-system');
6
6
  var React = require('react');
7
- var styles = require('./step-indicator/step-indicator.module.scss');
8
- var styles$1 = require('./camera/camera.module.scss');
9
- var styles$2 = require('./debug-tool/debug-tool.module.scss');
10
- var salesFrontendUtils = require('sales-frontend-utils');
11
- var salesFrontendApi = require('sales-frontend-api');
12
- var styles$3 = require('./debug-tool/features/network-log/network-log.module.scss');
13
7
  var method = require('sales-frontend-api/method');
14
- var styles$4 = require('./modal/standard/address-search/select-address.module.scss');
15
- var styles$5 = require('./modal/pre-standard/job-vehicle-search-modal/job-vehicle-search-modal.module.scss');
16
- var styles$6 = require('./modal/pre-standard/job-search-modal/job-search-modal.module.scss');
17
- var styles$7 = require('./modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss');
8
+ var styles = require('./modal/pre-standard/job-search-modal/job-search-modal.module.scss');
9
+ var styles$1 = require('./step-indicator/step-indicator.module.scss');
10
+ var styles$2 = require('./camera/camera.module.scss');
11
+ var styles$3 = require('./modal/standard/address-search/select-address.module.scss');
12
+ var styles$4 = require('./modal/pre-standard/job-vehicle-search-modal/job-vehicle-search-modal.module.scss');
13
+ var styles$5 = require('./modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss');
18
14
 
19
15
  const FormCheckboxButton = ({
20
16
  name,
@@ -24,7 +20,21 @@ const FormCheckboxButton = ({
24
20
  ...props
25
21
  }) => {
26
22
  const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
27
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.CheckboxButton, { ...props, ...field, id: field.name, checked: field.value, error: fieldState.invalid, children });
23
+ return /* @__PURE__ */ jsxRuntime.jsx(
24
+ salesFrontendDesignSystem.CheckboxButton,
25
+ {
26
+ ...props,
27
+ ...field,
28
+ id: field.name,
29
+ checked: field.value ?? false,
30
+ error: fieldState.invalid,
31
+ onChange: (checked) => {
32
+ field.onChange(checked);
33
+ props.onChange?.(checked);
34
+ },
35
+ children
36
+ }
37
+ );
28
38
  };
29
39
 
30
40
  const FormCheckbox = ({
@@ -102,73 +112,10 @@ const FormDateRangePicker = ({
102
112
  );
103
113
  };
104
114
 
105
- const FormSegmentGroup = ({
106
- name,
107
- control,
108
- disabled,
109
- ...props
110
- }) => {
111
- const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
112
- return /* @__PURE__ */ jsxRuntime.jsx(
113
- salesFrontendDesignSystem.SegmentGroup,
114
- {
115
- ...props,
116
- tabIndex: 0,
117
- id: field.name,
118
- ref: field.ref,
119
- defaultValue: field.value,
120
- disabled: field.disabled,
121
- error: fieldState.invalid,
122
- onBlur: field.onBlur,
123
- onValueChange: (selected) => {
124
- field.onChange(selected);
125
- props.onValueChange?.(selected);
126
- }
127
- }
128
- );
129
- };
130
-
131
- const FormTextField = ({
132
- name,
133
- control,
134
- size = "medium",
135
- disabled,
136
- error,
137
- onBlur,
138
- onChange,
139
- rootProps,
140
- ...props
141
- }) => {
142
- const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
143
- return /* @__PURE__ */ jsxRuntime.jsx(
144
- salesFrontendDesignSystem.FormField.TextField,
145
- {
146
- ...props,
147
- id: field.name,
148
- size,
149
- autoComplete: "off",
150
- name: field.name,
151
- value: field.value ?? "",
152
- disabled: field.disabled,
153
- error: fieldState.invalid || error,
154
- onChange: (e) => {
155
- field.onChange(e);
156
- onChange?.(e);
157
- },
158
- onBlur: (e) => {
159
- field.onBlur();
160
- onBlur?.(e);
161
- },
162
- rootProps: {
163
- ...rootProps,
164
- onClear: () => {
165
- field.onChange("");
166
- rootProps?.onClear?.();
167
- }
168
- }
169
- }
170
- );
171
- };
115
+ const JOB_SEARCH_TABS = [
116
+ { value: "jobName", label: "\uC9C1\uC885\uBA85 \uAC80\uC0C9" },
117
+ { value: "jobCode", label: "\uBD84\uB958\uB85C \uAC80\uC0C9" }
118
+ ];
172
119
 
173
120
  function getDefaultExportFromCjs (x) {
174
121
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -261,2053 +208,1491 @@ function requireBind () {
261
208
  var bindExports = requireBind();
262
209
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(bindExports);
263
210
 
264
- const cx$9 = classNames.bind(styles);
265
- const StepIndicator = ({
266
- items,
267
- onClickItem,
268
- currentIndex = 0,
269
- defaultValue = "",
270
- dotCount = 3
271
- }) => {
272
- const [current, setCurrent] = React.useState(currentIndex);
273
- React.useEffect(() => {
274
- items.map((item, idx) => {
275
- if (item.value === defaultValue) {
276
- setCurrent(idx);
211
+ const highlightOnSearchKeyword = (originalText, targetString) => {
212
+ if (originalText?.includes(targetString)) {
213
+ const replacedText = [];
214
+ const splitText = originalText.split(targetString);
215
+ for (let i = 0; i < splitText.length; i++) {
216
+ replacedText.push(splitText[i]);
217
+ if (i !== splitText.length - 1) {
218
+ replacedText.push(/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: targetString }));
277
219
  }
278
- });
279
- }, [items, defaultValue]);
280
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$9("stepper-layout"), children: [
281
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$9("stepper"), children: items.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
282
- /* @__PURE__ */ jsxRuntime.jsx(
283
- "div",
284
- {
285
- className: cx$9("circle", (defaultValue === item.value || current === idx) && "active"),
286
- onClick: () => onClickItem?.(item),
287
- children: item.isCompleted || idx < current ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$9("completed") }) : ++idx
288
- }
289
- ),
290
- idx < items.length && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$9("dot") }, `dot-${idx}-${dotIdx}`))
291
- ] }, `num-${idx}`)) }),
292
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$9("step-labels"), children: items.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: cx$9((defaultValue === item.value || current === idx) && "active"), children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label ?? item.value }) }, `label-${idx}`)) })
293
- ] });
220
+ }
221
+ return replacedText;
222
+ }
223
+ return originalText;
294
224
  };
295
225
 
296
- const cx$8 = classNames.bind(styles$1);
297
- function Attachment({
298
- photos,
299
- onAddPhoto,
300
- onRemovePhoto,
301
- show,
302
- type = "multiple",
303
- buttonText
304
- }) {
305
- const handleAddPhoto = () => {
306
- onAddPhoto();
307
- };
308
- const handleRemovePhoto = (id) => {
309
- onRemovePhoto(id);
310
- };
311
- const renderPhotoSingle = () => {
312
- if (photos.length === 0) {
313
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx$8("add-photo-button-single"), onClick: handleAddPhoto, children: [
314
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
315
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uC0AC\uC9C4 \uCCA8\uBD80\uD558\uAE30" })
316
- ] }) });
317
- }
318
- return photos.map((photo) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$8("single-photo-item"), children: [
319
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx$8("photo-image") }) }),
320
- /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$8("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
321
- ] }, photo.id));
322
- };
323
- const renderPhotoGrid = () => {
324
- const maxPhotos = type === "single" ? 1 : 4;
325
- const gridItems = [];
326
- if (photos.length < maxPhotos) {
327
- gridItems.push(
328
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx$8("add-photo-button"), onClick: handleAddPhoto, children: [
329
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
330
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uCCA8\uBD80\uD558\uAE30" }),
331
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx$8("photo-count"), children: [
226
+ const cx$9 = classNames.bind(styles);
227
+ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
228
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$9("category-section"), children: [
229
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$9("result-title"), children: [
230
+ "\uCD1D ",
231
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
232
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
233
+ ] }),
234
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$9("job-radio-root"), onToggle: () => {
235
+ }, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
236
+ salesFrontendDesignSystem.Accordion.Item,
237
+ {
238
+ id: `item-${job.occupationIndustryCode}-${index}-accordion`,
239
+ children: [
240
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Radio.Item, { size: "small", value: job.occupationIndustryCode, onChange: () => onJobSelect(job), children: [
241
+ highlightOnSearchKeyword(job.occupationIndustryName, searchTerm),
332
242
  "(",
333
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$8("photo-count-number"), children: photos.length }),
334
- "/",
335
- maxPhotos,
243
+ job.occupationIndustryCode,
336
244
  ")"
337
- ] })
338
- ] }) }, "add-photo")
339
- );
340
- }
341
- photos.forEach((photo) => {
342
- gridItems.push(
343
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$8("photo-item"), children: [
344
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx$8("photo-image") }) }),
345
- /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$8("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
346
- ] }, photo.id)
347
- );
348
- });
349
- return gridItems;
350
- };
351
- const isVisible = show || !show && photos.length > 0;
352
- if (!isVisible) {
353
- return null;
354
- }
355
- if (type === "single") {
356
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("photo-single"), children: renderPhotoSingle() });
357
- }
358
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$8("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
245
+ ] }) }) }),
246
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
247
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
248
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
249
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
250
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
251
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
252
+ ] }),
253
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
254
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
255
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
256
+ "2\uD589 1\uBC88\uC9F8 ",
257
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
258
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
259
+ ] }) })
260
+ ] })
261
+ ] }) }) })
262
+ ]
263
+ },
264
+ `item-${job.occupationIndustryCode}-${index}`
265
+ )) }) }),
266
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
267
+ "`",
268
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
269
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
270
+ ] })
271
+ ] }) });
359
272
  }
360
273
 
361
- const maxImageSize = 3 * 1024 * 1024;
362
- function resize(image, options = { ext: "jpeg", filesize: maxImageSize }) {
363
- return new Promise((resolve, reject) => {
364
- const canvas = document.createElement("canvas");
365
- const ctx = canvas.getContext("2d");
366
- if (!ctx) {
367
- reject(new Error("Canvas context\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
368
- return;
369
- }
370
- const img = new Image();
371
- img.crossOrigin = "anonymous";
372
- img.onload = () => {
373
- let { width, height } = img;
374
- const { filesize, ext } = options;
375
- if (filesize) {
376
- const originalSize = width * height * 4;
377
- if (originalSize > filesize) {
378
- const ratio = Math.sqrt(filesize / originalSize);
379
- width = Math.floor(width * ratio);
380
- height = Math.floor(height * ratio);
381
- }
382
- } else {
383
- const { width: targetWidth, height: targetHeight } = options;
384
- if (targetWidth && targetHeight) {
385
- width = targetWidth;
386
- height = targetHeight;
387
- } else if (targetWidth) {
388
- const ratio = targetWidth / width;
389
- width = targetWidth;
390
- height = Math.floor(height * ratio);
391
- } else if (targetHeight) {
392
- const ratio = targetHeight / height;
393
- height = targetHeight;
394
- width = Math.floor(width * ratio);
395
- }
396
- }
397
- canvas.width = width;
398
- canvas.height = height;
399
- ctx.drawImage(img, 0, 0, width, height);
400
- if (typeof image === "string") {
401
- const mimeType = ext === "png" ? "image/png" : "image/jpeg";
402
- const quality = ext === "png" ? 1 : 0.8;
403
- const base64 = canvas.toDataURL(mimeType, quality);
404
- resolve(base64);
405
- } else {
406
- canvas.toBlob(
407
- (blob) => {
408
- if (!blob) {
409
- reject(new Error("Blob\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
410
- return;
411
- }
412
- const mimeType = ext === "png" ? "image/png" : "image/jpeg";
413
- const fileName = image.name ? `${image.name.replace(/\.[^/.]+$/, "")}.${ext}` : `resized.${ext}`;
414
- const resizedFile = new File([blob], fileName, { type: mimeType });
415
- resolve(resizedFile);
416
- },
417
- ext === "png" ? "image/png" : "image/jpeg",
418
- ext === "png" ? 1 : 0.8
419
- );
420
- }
421
- };
422
- img.onerror = () => {
423
- reject(new Error("\uC774\uBBF8\uC9C0\uB97C \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
424
- };
425
- if (typeof image === "string") {
426
- img.src = image;
427
- } else {
428
- const reader = new FileReader();
429
- reader.onload = (e) => {
430
- if (e.target?.result) {
431
- img.src = e.target.result;
432
- } else {
433
- reject(new Error("\uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
434
- }
435
- };
436
- reader.onerror = () => {
437
- reject(new Error("\uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
438
- };
439
- reader.readAsDataURL(image);
440
- }
441
- });
274
+ const cx$8 = classNames.bind(styles);
275
+ function JobSearchFavorite({ filteredJobs, onJobSelect }) {
276
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$8("popular-jobs"), children: [
277
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
278
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$8("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
279
+ salesFrontendDesignSystem.Accordion.Item,
280
+ {
281
+ id: `item-${job.occupationIndustryCode}-${index}`,
282
+ className: cx$8("accordion-item"),
283
+ children: [
284
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { className: cx$8("accordion-header-item"), children: /* @__PURE__ */ jsxRuntime.jsxs(
285
+ salesFrontendDesignSystem.Radio.Item,
286
+ {
287
+ size: "small",
288
+ value: job.occupationIndustryCode,
289
+ onChange: () => onJobSelect(job),
290
+ className: cx$8("radio-item"),
291
+ children: [
292
+ job.occupationIndustryName,
293
+ "(",
294
+ job.occupationIndustryCode,
295
+ ")"
296
+ ]
297
+ }
298
+ ) }),
299
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: "\uD56D\uBAA9 1 \uB0B4\uC6A9" })
300
+ ]
301
+ },
302
+ `item-${job.occupationIndustryCode}-${index}`
303
+ )) }) })
304
+ ] }) });
442
305
  }
443
306
 
444
- const genImageId = () => `camera-${Date.now()}-${Math.random()}`;
445
- function useCamera({
446
- onChange,
447
- resize: resizeOption,
448
- cameraOnly,
449
- onDelete,
450
- show,
451
- type = "multiple",
452
- buttonText
453
- } = {}) {
454
- const [attachedPhotos, setAttachedPhotos] = React.useState([]);
455
- const findImage = (imageId) => {
456
- return attachedPhotos.find((image) => image.id === imageId);
457
- };
458
- const onClick = () => {
459
- const input = document.createElement("input");
460
- input.type = "file";
461
- input.accept = "image/*";
462
- if (cameraOnly) {
463
- input.capture = "camera";
464
- }
465
- input.addEventListener("change", async (event) => {
466
- const target = event.target;
467
- const { files } = target;
468
- if (files && files.length > 0) {
469
- const file = files[0];
470
- if (file) {
471
- const resizedFile = await resize(file, resizeOption);
472
- const newPhoto = {
473
- id: genImageId(),
474
- src: URL.createObjectURL(resizedFile),
475
- name: `\uC11C\uB958\uC0AC\uC9C4_${attachedPhotos.length + 1}`
476
- };
477
- if (type === "single") {
478
- setAttachedPhotos([newPhoto]);
479
- } else {
480
- setAttachedPhotos([...attachedPhotos, newPhoto]);
481
- }
482
- onChange && onChange(file);
483
- }
484
- }
485
- document.body.removeChild(input);
486
- });
487
- input.style.display = "none";
488
- document.body.appendChild(input);
489
- input.click();
490
- };
491
- const deleteImage = (imageId) => {
492
- const imageIndex = attachedPhotos.findIndex((image) => image.id === imageId);
493
- if (imageIndex > -1) {
494
- const item = attachedPhotos.splice(imageIndex, 1);
495
- item[0] && URL.revokeObjectURL(item[0].src);
496
- setAttachedPhotos([...attachedPhotos]);
497
- onDelete && onDelete(imageId);
498
- }
499
- };
500
- const CameraComponent = () => /* @__PURE__ */ jsxRuntime.jsx(
501
- Attachment,
502
- {
503
- show: !!show,
504
- onAddPhoto: onClick,
505
- onRemovePhoto: deleteImage,
506
- photos: attachedPhotos,
507
- type,
508
- buttonText
509
- }
510
- );
511
- React.useEffect(() => {
512
- return () => {
513
- attachedPhotos.forEach((image) => {
514
- URL.revokeObjectURL(image.src);
515
- });
516
- };
517
- }, []);
518
- return {
519
- onClick,
520
- getImage: findImage,
521
- deleteImage,
522
- attachedPhotos,
523
- Attachment: CameraComponent
524
- };
307
+ const cx$7 = classNames.bind(styles);
308
+ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
309
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$7("popular-jobs"), children: [
310
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$7("result-title"), children: [
311
+ "\uCD1D ",
312
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
313
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
314
+ ] }),
315
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$7("job-radio-root"), children: filteredJobs.map((job) => /* @__PURE__ */ jsxRuntime.jsxs(
316
+ salesFrontendDesignSystem.Accordion.Item,
317
+ {
318
+ id: `item-${job.occupationIndustryCode}`,
319
+ children: [
320
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
321
+ salesFrontendDesignSystem.Radio.Item,
322
+ {
323
+ id: `item-${job.occupationIndustryCode}`,
324
+ size: "small",
325
+ value: job.occupationIndustryCode,
326
+ onChange: () => {
327
+ onJobSelect(job);
328
+ },
329
+ children: highlightOnSearchKeyword(job.occupationIndustryName, searchTerm)
330
+ }
331
+ ) }) }),
332
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
333
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
334
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
335
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
336
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
337
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
338
+ ] }),
339
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
340
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
341
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
342
+ "2\uD589 1\uBC88\uC9F8 ",
343
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
344
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
345
+ ] }) })
346
+ ] })
347
+ ] }) }) })
348
+ ]
349
+ },
350
+ job.occupationIndustryCode
351
+ )) }) }),
352
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
353
+ "`",
354
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
355
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
356
+ ] })
357
+ ] }) });
525
358
  }
526
359
 
527
- const HISTORY_SIZE = 100;
528
- const DEFAULT_DOWNLOAD_PROPS = {
529
- fileExtendsion: "png",
530
- fileName: "image",
531
- transparent: true,
532
- backgroundColor: "white",
533
- width: 500,
534
- height: 500
535
- };
536
- function useCanvasPaint(paintProps = {}) {
537
- const { pen = { strokeWeight: 5, strokeColor: "black" }, onChange, onStart, onEnd } = paintProps;
538
- const [canvasRefState, setCanvasRefState] = React.useState(null);
539
- const contextRef = React.useRef(null);
540
- const [isPainting, setIsPainting] = React.useState(false);
541
- const [history, setHistory] = React.useState([]);
542
- const [historyIndex, setHistoryIndex] = React.useState(-1);
543
- const saveState = React.useCallback(() => {
544
- if (!canvasRefState) {
545
- return;
546
- }
547
- const dataUrl = canvasRefState.toDataURL();
548
- const newHistory = history.slice(0, historyIndex + 1);
549
- if (newHistory.length >= HISTORY_SIZE) {
550
- newHistory.shift();
360
+ const { TextField } = salesFrontendDesignSystem.FormField;
361
+ const cx$6 = classNames.bind(styles);
362
+ const { Option } = salesFrontendDesignSystem.Select;
363
+ function JobSearch({
364
+ activeTab,
365
+ onTabChange,
366
+ searchTerm,
367
+ setSearchInput,
368
+ filteredJobs,
369
+ onJobSelect,
370
+ setSearchTerm,
371
+ searchInput,
372
+ firstCategory,
373
+ setFirstCategory,
374
+ secondCategory,
375
+ setSecondCategory,
376
+ firstCategoryList,
377
+ secondCategoryList
378
+ }) {
379
+ const onKeyUp = (e) => {
380
+ if (e.key === "Enter") {
381
+ setSearchTerm(searchInput);
551
382
  }
552
- newHistory.push(dataUrl);
553
- setHistory(newHistory);
554
- setHistoryIndex(newHistory.length - 1);
555
- onChange && onChange();
556
- }, [history, historyIndex, onChange, canvasRefState]);
557
- const restoreState = React.useCallback(
558
- (index) => {
559
- const context = contextRef.current;
560
- if (!canvasRefState || !context || !history[index]) {
561
- return;
383
+ };
384
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
385
+ /* @__PURE__ */ jsxRuntime.jsx(
386
+ salesFrontendDesignSystem.Tab.Root,
387
+ {
388
+ defaultValue: activeTab,
389
+ onValueChange: onTabChange,
390
+ scroll: "fixed",
391
+ size: "small",
392
+ variant: "sub",
393
+ style: { gap: 0, overflow: "visible" },
394
+ children: JOB_SEARCH_TABS.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Tab.Item, { value: tab.value, children: tab.label }, tab.value))
562
395
  }
563
- const dataUrl = history[index];
564
- const img = new Image();
565
- img.onload = () => {
566
- context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
567
- context.drawImage(img, 0, 0);
568
- };
569
- img.src = dataUrl;
570
- onChange && onChange();
571
- },
572
- [history, onChange, canvasRefState]
573
- );
574
- React.useEffect(() => {
575
- if (!canvasRefState) {
576
- return;
577
- }
578
- const context = canvasRefState.getContext("2d", { willReadFrequently: true });
579
- if (!context) {
580
- return;
581
- }
582
- contextRef.current = context;
583
- const initialDataUrl = canvasRefState.toDataURL();
584
- setHistory([initialDataUrl]);
585
- setHistoryIndex(0);
586
- }, [canvasRefState]);
396
+ ),
397
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
398
+ activeTab === "jobName" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("favorite-jobs-section"), children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx(
400
+ TextField,
401
+ {
402
+ placeholder: "\uC9C1\uC885\uBA85 \uAC80\uC0C9",
403
+ value: searchInput,
404
+ onKeyUp,
405
+ onChange: (e) => setSearchInput(e.target.value),
406
+ className: styles.searchInput,
407
+ size: "medium",
408
+ rootProps: {
409
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: () => setSearchTerm(searchInput) }),
410
+ onClear: () => {
411
+ setSearchTerm("");
412
+ setSearchInput("");
413
+ }
414
+ }
415
+ }
416
+ ),
417
+ !searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchFavorite, { filteredJobs, onJobSelect }),
418
+ searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchResult, { filteredJobs, onJobSelect, searchTerm })
419
+ ] }),
420
+ activeTab === "jobCode" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("select-jobs-section"), children: [
421
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("category-section"), children: [
422
+ /* @__PURE__ */ jsxRuntime.jsx(
423
+ salesFrontendDesignSystem.Select,
424
+ {
425
+ name: "first_category",
426
+ onChange: (value) => {
427
+ setFirstCategory(value);
428
+ setSecondCategory("");
429
+ },
430
+ placeholder: "\uB300\uBD84\uB958 \uC120\uD0DD",
431
+ rootProps: {
432
+ style: {
433
+ // width: '300px'
434
+ }
435
+ },
436
+ size: "large",
437
+ value: firstCategory,
438
+ children: firstCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
439
+ }
440
+ ),
441
+ /* @__PURE__ */ jsxRuntime.jsx(
442
+ salesFrontendDesignSystem.Select,
443
+ {
444
+ name: "second_category",
445
+ onChange: setSecondCategory,
446
+ placeholder: "\uC911\uBD84\uB958 \uC120\uD0DD",
447
+ rootProps: {
448
+ style: {
449
+ // width: '300px'
450
+ }
451
+ },
452
+ size: "large",
453
+ value: secondCategory,
454
+ disabled: !firstCategory,
455
+ children: secondCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
456
+ }
457
+ )
458
+ ] }),
459
+ firstCategory && secondCategory && /* @__PURE__ */ jsxRuntime.jsx(JobSearchCategory, { filteredJobs, onJobSelect, searchTerm })
460
+ ] })
461
+ ] })
462
+ ] });
463
+ }
464
+
465
+ const initData = [
466
+ {
467
+ occupationIndustryCode: "430101",
468
+ occupationIndustryName: "\uD68C\uC0AC \uC0AC\uBB34\uC9C1 \uC885\uC0AC\uC790",
469
+ occupationTypeCode: null,
470
+ historySequence: 0
471
+ },
472
+ {
473
+ occupationIndustryCode: "400301",
474
+ occupationIndustryName: "\uACBD\uC601\uC9C0\uC6D0 \uC0AC\uBB34\uC9C1 \uAD00\uB9AC\uC790",
475
+ occupationTypeCode: null,
476
+ historySequence: 0
477
+ },
478
+ {
479
+ occupationIndustryCode: "510201",
480
+ occupationIndustryName: "\uC804\uC5C5\uC8FC\uBD80",
481
+ occupationTypeCode: null,
482
+ historySequence: 0
483
+ },
484
+ {
485
+ occupationIndustryCode: "442501",
486
+ occupationIndustryName: "\uC8FC\uBC29\uC7A5 \uBC0F \uC870\uB9AC\uC0AC(\uC120\uBC15 \uC870\uB9AC\uC0AC \uC81C\uC678)",
487
+ occupationTypeCode: null,
488
+ historySequence: 0
489
+ },
490
+ {
491
+ occupationIndustryCode: "450303",
492
+ occupationIndustryName: "\uBCF4\uD5D8\uC124\uACC4\uC0AC(\uB2F9\uC0AC)",
493
+ occupationTypeCode: null,
494
+ historySequence: 0
495
+ }
496
+ ];
497
+ const useJobSearch = () => {
498
+ const [activeTab, setActiveTab] = React.useState(JOB_SEARCH_TABS[0]?.value ?? "");
499
+ const [selectedJob, setSelectedJob] = React.useState(null);
500
+ const [searchTerm, setSearchTerm] = React.useState("");
501
+ const [searchInput, setSearchInput] = React.useState("");
502
+ const handleJobSelect = (job) => {
503
+ setSelectedJob(job);
504
+ };
505
+ const [firstCategory, setFirstCategory] = React.useState("");
506
+ const [secondCategory, setSecondCategory] = React.useState("");
507
+ const [jobList, setJobList] = React.useState(initData);
508
+ const [firstCategoryList, setFirstCategoryList] = React.useState([]);
509
+ const [secondCategoryList, setSecondCategoryList] = React.useState([]);
510
+ const { data } = method.useSearchOccupationQuery({
511
+ occupationMajorCategoryCode: firstCategory,
512
+ occupationSearchTypeCode: searchTerm ? "4" : "3",
513
+ occupationSubCategoryCode: secondCategory,
514
+ searchOccupationIndustryName: searchTerm
515
+ });
516
+ const { data: firstCategoryData } = method.useSearchOccupationQuery({
517
+ occupationMajorCategoryCode: "",
518
+ occupationSearchTypeCode: "1",
519
+ occupationSubCategoryCode: "",
520
+ searchOccupationIndustryName: ""
521
+ });
522
+ const { data: secondCategoryData } = method.useSearchOccupationQuery({
523
+ occupationMajorCategoryCode: firstCategory,
524
+ occupationSearchTypeCode: "2",
525
+ occupationSubCategoryCode: "",
526
+ searchOccupationIndustryName: ""
527
+ });
587
528
  React.useEffect(() => {
588
- const context = contextRef.current;
589
- if (context) {
590
- context.lineWidth = pen.strokeWeight;
591
- context.strokeStyle = pen.strokeColor;
592
- }
593
- }, [pen]);
594
- const getEventPosition = React.useCallback(
595
- (event) => {
596
- if (!canvasRefState) {
597
- return null;
598
- }
599
- const rect = canvasRefState.getBoundingClientRect();
600
- const scaleX = canvasRefState.width / rect.width;
601
- const scaleY = canvasRefState.height / rect.height;
602
- let clientX;
603
- let clientY;
604
- if (event instanceof MouseEvent) {
605
- clientX = event.clientX;
606
- clientY = event.clientY;
607
- } else if (event instanceof TouchEvent) {
608
- const touch = event.touches[0];
609
- if (!touch) {
610
- return null;
611
- }
612
- clientX = touch.clientX;
613
- clientY = touch.clientY;
614
- } else {
615
- return null;
616
- }
617
- const offsetX = (clientX - rect.left) * scaleX;
618
- const offsetY = (clientY - rect.top) * scaleY;
619
- return { offsetX, offsetY };
620
- },
621
- [canvasRefState]
622
- );
623
- const startPainting = React.useCallback(
624
- (event) => {
625
- event.preventDefault();
626
- const context = contextRef.current;
627
- if (!context) {
628
- return;
629
- }
630
- const pos = getEventPosition(event);
631
- if (!pos) {
632
- return;
633
- }
634
- onStart && onStart();
635
- const { offsetX, offsetY } = pos;
636
- context.beginPath();
637
- context.moveTo(offsetX, offsetY);
638
- setIsPainting(true);
639
- },
640
- [onStart, getEventPosition]
641
- );
642
- const stopPainting = React.useCallback(() => {
643
- const context = contextRef.current;
644
- if (!context || !isPainting) {
645
- return;
529
+ if (data && searchTerm && activeTab === "jobName") {
530
+ const filteredJobs = data.data.occupationList.filter((job) => job.occupationIndustryName.includes(searchTerm));
531
+ setJobList(filteredJobs);
532
+ } else if (!data && searchTerm && activeTab === "jobName") {
533
+ setJobList([]);
534
+ } else if (!searchTerm && activeTab === "jobName") {
535
+ setJobList(initData);
536
+ } else if (activeTab === "jobCode" && firstCategory && secondCategory) {
537
+ setJobList(data?.data.occupationList || []);
646
538
  }
647
- context.closePath();
648
- setIsPainting(false);
649
- onEnd && onEnd();
650
- saveState();
651
- }, [isPainting, onEnd, saveState]);
652
- const paint = React.useCallback(
653
- (event) => {
654
- event.preventDefault();
655
- if (!isPainting || !contextRef.current) {
656
- return;
657
- }
658
- const pos = getEventPosition(event);
659
- if (!pos) {
660
- return;
661
- }
662
- const { offsetX, offsetY } = pos;
663
- contextRef.current.lineTo(offsetX, offsetY);
664
- contextRef.current.stroke();
665
- },
666
- [isPainting, getEventPosition]
667
- );
539
+ }, [searchTerm, data, firstCategory, secondCategory, secondCategoryData, activeTab]);
668
540
  React.useEffect(() => {
669
- if (!canvasRefState) {
670
- return;
671
- }
672
- canvasRefState.addEventListener("mousedown", startPainting);
673
- canvasRefState.addEventListener("mouseup", stopPainting);
674
- canvasRefState.addEventListener("mousemove", paint);
675
- canvasRefState.addEventListener("mouseleave", stopPainting);
676
- canvasRefState.addEventListener("touchstart", startPainting);
677
- canvasRefState.addEventListener("touchend", stopPainting);
678
- canvasRefState.addEventListener("touchmove", paint);
679
- canvasRefState.addEventListener("touchcancel", stopPainting);
680
- return () => {
681
- canvasRefState.removeEventListener("mousedown", startPainting);
682
- canvasRefState.removeEventListener("mouseup", stopPainting);
683
- canvasRefState.removeEventListener("mousemove", paint);
684
- canvasRefState.removeEventListener("mouseleave", stopPainting);
685
- canvasRefState.removeEventListener("touchstart", startPainting);
686
- canvasRefState.removeEventListener("touchend", stopPainting);
687
- canvasRefState.removeEventListener("touchmove", paint);
688
- canvasRefState.removeEventListener("touchcancel", stopPainting);
689
- };
690
- }, [startPainting, stopPainting, paint, canvasRefState]);
691
- const clear = () => {
692
- const context = contextRef.current;
693
- if (canvasRefState && context) {
694
- context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
695
- const initialDataUrl = canvasRefState.toDataURL();
696
- setHistory([initialDataUrl]);
697
- setHistoryIndex(0);
698
- onChange && onChange();
699
- }
700
- };
701
- const undo = () => {
702
- if (historyIndex > 0) {
703
- const newIndex = historyIndex - 1;
704
- setHistoryIndex(newIndex);
705
- restoreState(newIndex);
706
- }
707
- };
708
- const redo = () => {
709
- if (historyIndex < history.length - 1) {
710
- const newIndex = historyIndex + 1;
711
- setHistoryIndex(newIndex);
712
- restoreState(newIndex);
713
- }
714
- };
715
- const loadImage = (base64String) => {
716
- const context = contextRef.current;
717
- if (!canvasRefState || !context) {
718
- return;
719
- }
720
- const img = new Image();
721
- img.onload = () => {
722
- context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
723
- context.drawImage(img, 0, 0, canvasRefState.width, canvasRefState.height);
724
- saveState();
725
- };
726
- img.src = base64String;
727
- };
728
- const getBase64String = (imageProps) => {
729
- const props = { ...DEFAULT_DOWNLOAD_PROPS, ...imageProps };
730
- const { fileExtendsion, transparent, backgroundColor, width, height } = props;
731
- const originalCanvas = canvasRefState;
732
- if (!originalCanvas) {
733
- return;
734
- }
735
- const tempCanvas = document.createElement("canvas");
736
- tempCanvas.width = width;
737
- tempCanvas.height = height;
738
- const tempCtx = tempCanvas.getContext("2d");
739
- if (tempCtx) {
740
- if (!transparent) {
741
- tempCtx.fillStyle = backgroundColor || "white";
742
- tempCtx.fillRect(0, 0, width, height);
743
- }
744
- tempCtx.drawImage(originalCanvas, 0, 0, width, height);
745
- return tempCanvas.toDataURL(`image/${fileExtendsion}`);
746
- }
747
- };
748
- const download = (downloadProps) => {
749
- const props = { ...DEFAULT_DOWNLOAD_PROPS, ...downloadProps };
750
- const { fileName, fileExtendsion, transparent, backgroundColor, width, height } = props;
751
- const originalCanvas = canvasRefState;
752
- if (!originalCanvas) {
753
- return;
754
- }
755
- const tempCanvas = document.createElement("canvas");
756
- tempCanvas.width = width;
757
- tempCanvas.height = height;
758
- const tempCtx = tempCanvas.getContext("2d");
759
- if (tempCtx) {
760
- if (!transparent) {
761
- tempCtx.fillStyle = backgroundColor || "white";
762
- tempCtx.fillRect(0, 0, width, height);
763
- }
764
- tempCtx.drawImage(originalCanvas, 0, 0, width, height);
765
- const link = document.createElement("a");
766
- link.download = `${fileName}.${fileExtendsion}`;
767
- link.href = tempCanvas.toDataURL(`image/${fileExtendsion}`);
768
- link.click();
769
- }
770
- };
771
- const isCanvasBlank = () => {
772
- if (!canvasRefState) {
773
- return true;
774
- }
775
- const { width, height } = canvasRefState;
776
- const ctx = canvasRefState.getContext("2d");
777
- if (!ctx) {
778
- console.error("2D context not available");
779
- return true;
780
- }
781
- const imageData = ctx.getImageData(0, 0, width, height);
782
- const { data } = imageData;
783
- for (let i = 0; i < data.length; i += 4) {
784
- if (data[i + 3] !== 0) {
785
- return false;
786
- }
541
+ console.log("jobList", jobList);
542
+ }, [jobList]);
543
+ React.useEffect(() => {
544
+ if (firstCategoryData) {
545
+ setFirstCategoryList(firstCategoryData.data.occupationList);
787
546
  }
788
- return true;
547
+ }, [firstCategoryData]);
548
+ React.useEffect(() => {
549
+ if (secondCategoryData) {
550
+ setSecondCategoryList(secondCategoryData.data.occupationList);
551
+ }
552
+ }, [secondCategoryData]);
553
+ return {
554
+ activeTab,
555
+ setActiveTab,
556
+ selectedJob,
557
+ searchTerm,
558
+ setSearchTerm,
559
+ handleJobSelect,
560
+ filteredJobs: jobList,
561
+ searchInput,
562
+ setSearchInput,
563
+ firstCategory,
564
+ setFirstCategory,
565
+ secondCategory,
566
+ setSecondCategory,
567
+ secondCategoryList,
568
+ firstCategoryList
569
+ };
570
+ };
571
+ function useJobSearchModal() {
572
+ const {
573
+ activeTab,
574
+ setActiveTab,
575
+ searchTerm,
576
+ setSearchTerm,
577
+ filteredJobs,
578
+ handleJobSelect,
579
+ selectedJob,
580
+ searchInput,
581
+ setSearchInput,
582
+ firstCategory,
583
+ setFirstCategory,
584
+ secondCategory,
585
+ setSecondCategory,
586
+ firstCategoryList,
587
+ secondCategoryList
588
+ } = useJobSearch();
589
+ const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState();
590
+ const onTabChange = (value) => {
591
+ setSearchTerm("");
592
+ setFirstCategory("");
593
+ setSecondCategory("");
594
+ setActiveTab(value);
789
595
  };
790
596
  return {
791
- clear,
792
- undo,
793
- redo,
794
- loadImage,
795
- download,
796
- getBase64String,
797
- isCanvasBlank,
798
- setCanvasRefState,
799
- canvasRefState
597
+ JobSearchModal: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
598
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
599
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
600
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
601
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { raw: true, children: /* @__PURE__ */ jsxRuntime.jsx(
602
+ JobSearch,
603
+ {
604
+ firstCategory,
605
+ firstCategoryList,
606
+ secondCategoryList,
607
+ setFirstCategory,
608
+ secondCategory,
609
+ activeTab,
610
+ onTabChange,
611
+ searchTerm,
612
+ setSearchInput,
613
+ filteredJobs: filteredJobs || [],
614
+ onJobSelect: handleJobSelect,
615
+ searchInput,
616
+ setSearchTerm,
617
+ setSecondCategory
618
+ }
619
+ ) }),
620
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: closeModal, children: "\uD655\uC778" }) })
621
+ ] })
622
+ ] }),
623
+ JobSearchComponent: /* @__PURE__ */ jsxRuntime.jsx(
624
+ JobSearch,
625
+ {
626
+ firstCategoryList,
627
+ secondCategoryList,
628
+ firstCategory,
629
+ setFirstCategory,
630
+ secondCategory,
631
+ setSecondCategory,
632
+ activeTab,
633
+ onTabChange,
634
+ searchTerm,
635
+ setSearchInput,
636
+ filteredJobs: filteredJobs || [],
637
+ onJobSelect: handleJobSelect,
638
+ searchInput,
639
+ setSearchTerm
640
+ }
641
+ ),
642
+ isJobSearchOpen: isOpen,
643
+ openJobSearchModal: openModal,
644
+ closeJobSearchModal: closeModal,
645
+ selectedJob
800
646
  };
801
647
  }
802
648
 
803
- const testSignatureBase64Data = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAACoy2Z3AAAQAElEQVR4AeydV6g2ORnHj733smvBiliws9jbhYoFREVQsYIFVBBRUBQRvbCgKIgFCyqoCCqiXiioN/ZesKEXYlkVXV11Xdde/z+/L/u95z0zSeadlmT+h+RkJvMkeZ5/kudJm3kveeQ/I1AvAncX67+S/+8B/glKM6X7uzIbwofI7YxA3QjYgNRdf1vl/p4S/Dz5L8qfLT/UfVkJLpSfymE8LjtVZs7HCNSCgA1ILTVlPkHg4/r3Z/nPy19XPteh4En7ICW4sjwzl48qHOMwQP9RBsw6hhoP0h0dKbGdEagZARuQmmuvfd6fLhF/Kv9veRT1gxVeUT7HMUN5nwjvKn95+YfKf0IeA6RglIOfqyiHS8jnun+IEHr8pXRtZwSqR8AGpPoqbE6Ar0miv8pjMN6q8Mbyue30t6J9vjxKmqWtx+n6q/JTOWYy8JXDz67BgJ/LTcWE8zECpSCQ0xFK4XWPD982gsBLJMfv5VHM+HN0zYxBQbY7V5S3l2dZ6zUKp3bMWuAtd6nqn2LABkMg2LWNgA1I2/VbqnTvFm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bS6Mek6nGZ7w9jqLGmKO4l8aTMik77GOAYWgbDBaW5sflZSJAJWWSmswIGIFWENiTg895oKgx5ugEFPiSnjIp2/sYexVT+i0VVzqP5s8IGAEjYAQKRMAGpMBKMUtGwAgYgRoQsAE5pJacxggYASNgBI5sQNwIjIARMAJG4CAEbEAOgs2JjIARWAkBF1sQAjYgBVWGWTECRsAI1ISADUhNtWVejYARMAIFIWADUlBlLMGKyzACRsAITIWADchUSDofI2AEjMDGELAB2ViFW1wjYATWQqC9cm1A2qtTS2QEjIARWAQBG5BFYHYhRsAIGIH2ELABaa9OW5XIchkBI1AYAjYghVWI2TECRsAI1IKADUgtNWU+jYARMAJrIdBTrg1IDzCONgJGwAgYgTgCNiBxfPzUCBgBI2AEehCwAekBxtFGYDoEnJMRaBMBG5A269VSGQEjYARmR8AGZHaIXYARMAJGoE0EajAgbSJvqYyAETAClSNgA1J5BZp9I2AEjMBaCNiArIW8yzUCNSBgHo1ABAEbkAg4fmQEjIARMAL9CNiA9GPjJ0bACBgBIxBBwAYkAs74R87BCBgBI9AuAjYg7datJTMCRsAIzIqADcis8DpzI2AE1kLA5c6PwP8AAAD//+3/3TsAAAAGSURBVAMAJI6e9smFlTAAAAAASUVORK5CYII=";
804
-
805
- const FloatingButton = ({ onClick }) => {
806
- const [position, setPosition] = React.useState({ x: 0, y: 0 });
807
- const [isDragging, setIsDragging] = React.useState(false);
808
- const dragHappened = React.useRef(false);
809
- const dragStartPos = React.useRef({ x: 0, y: 0 });
810
- const elementStartPos = React.useRef({ x: 0, y: 0 });
811
- const handleMouseDown = (e) => {
812
- if (e.button !== 0) {
813
- return;
649
+ const FormSearchJobField = ({
650
+ name,
651
+ control,
652
+ disabled,
653
+ rootProps,
654
+ error,
655
+ size = "medium",
656
+ placeholder = "\uC9C1\uC885 \uAC80\uC0C9",
657
+ ...props
658
+ }) => {
659
+ const [selected, setSelected] = React.useState();
660
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
661
+ const { JobSearchModal, openJobSearchModal, selectedJob } = useJobSearchModal();
662
+ React.useEffect(() => {
663
+ if (selectedJob) {
664
+ setSelected(selectedJob);
665
+ field.onChange(selectedJob.occupationIndustryCode);
666
+ props.onValueChange?.(selectedJob);
814
667
  }
815
- dragHappened.current = false;
816
- setIsDragging(true);
817
- dragStartPos.current = { x: e.clientX, y: e.clientY };
818
- elementStartPos.current = { ...position };
819
- const handleMouseMove = (event) => {
820
- const dx = event.clientX - dragStartPos.current.x;
821
- const dy = event.clientY - dragStartPos.current.y;
822
- if (!dragHappened.current && (Math.abs(dx) > 5 || Math.abs(dy) > 5)) {
823
- dragHappened.current = true;
668
+ }, [selectedJob]);
669
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
670
+ /* @__PURE__ */ jsxRuntime.jsx(
671
+ salesFrontendDesignSystem.FormField.TextField,
672
+ {
673
+ ...props,
674
+ ...field,
675
+ id: field.name,
676
+ error: fieldState.invalid || error,
677
+ value: selected?.occupationIndustryName ?? "",
678
+ rootProps: {
679
+ ...rootProps,
680
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search" })
681
+ },
682
+ readOnly: true,
683
+ size,
684
+ placeholder,
685
+ style: { background: "#fff", cursor: "pointer" },
686
+ autoComplete: "off",
687
+ onClick: openJobSearchModal
824
688
  }
825
- setPosition({
826
- x: elementStartPos.current.x + dx,
827
- y: elementStartPos.current.y + dy
828
- });
829
- };
830
- const handleMouseUp = () => {
831
- window.removeEventListener("mousemove", handleMouseMove);
832
- window.removeEventListener("mouseup", handleMouseUp);
833
- setIsDragging(false);
834
- };
835
- window.addEventListener("mousemove", handleMouseMove);
836
- window.addEventListener("mouseup", handleMouseUp);
837
- };
838
- const handleClick = (e) => {
839
- if (dragHappened.current) {
840
- e.preventDefault();
841
- e.stopPropagation();
842
- return;
843
- }
844
- onClick();
845
- };
846
- return /* @__PURE__ */ jsxRuntime.jsx(
847
- salesFrontendDesignSystem.Button,
848
- {
849
- variant: "secondary",
850
- appearance: "filled",
851
- size: "xsmall",
852
- className: styles$2["debug-floating-button"],
853
- style: {
854
- transform: `translate(${position.x}px, ${position.y}px)`,
855
- cursor: isDragging ? "grabbing" : "grab"
856
- },
857
- onMouseDown: handleMouseDown,
858
- onClick: handleClick,
859
- children: "DEBUG"
860
- }
861
- );
862
- };
863
-
864
- const MenuPanel = ({ menuItems, onMenuItemClick, onClose }) => {
865
- return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "small", children: [
866
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
867
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
868
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "Debug Menu", showCloseButton: true }),
869
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.List, { selectable: true, children: menuItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.ListItem, { onClick: () => onMenuItemClick(item.component), children: item.label }, item.id)) }) })
870
- ] })
689
+ ),
690
+ JobSearchModal
871
691
  ] });
872
692
  };
873
693
 
874
- let globalLogs = [];
875
- let listeners = [];
876
- const originalConsoleMethods = {};
877
- let isConsoleOverridden = false;
878
- const addLog = (type, ...args) => {
879
- const newLog = {
880
- id: Date.now() + Math.random(),
881
- type,
882
- timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
883
- message: args
884
- };
885
- globalLogs = [...globalLogs, newLog];
886
- listeners.forEach((listener) => listener([...globalLogs]));
887
- };
888
- const initializeConsoleLogOverride = () => {
889
- if (!salesFrontendUtils.isClient() || isConsoleOverridden) {
890
- return;
891
- }
892
- const logTypes = ["log", "info", "warn", "error", "debug"];
893
- logTypes.forEach((type) => {
894
- originalConsoleMethods[type] = console[type];
895
- console[type] = (...args) => {
896
- if (originalConsoleMethods[type]) {
897
- originalConsoleMethods[type]?.apply(console, args);
898
- }
899
- addLog(type, ...args);
694
+ const FormSegmentGroup = ({
695
+ name,
696
+ control,
697
+ disabled,
698
+ disabledItems,
699
+ items,
700
+ ...props
701
+ }) => {
702
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
703
+ const itemList = items.map((item) => {
704
+ return {
705
+ ...item,
706
+ disabled: disabledItems?.includes(item.value)
900
707
  };
901
708
  });
902
- isConsoleOverridden = true;
903
- };
904
- const restoreConsoleLog = () => {
905
- if (!salesFrontendUtils.isClient() || !isConsoleOverridden) {
906
- return;
907
- }
908
- const logTypes = ["log", "info", "warn", "error", "debug"];
909
- logTypes.forEach((type) => {
910
- if (originalConsoleMethods[type]) {
911
- console[type] = originalConsoleMethods[type];
709
+ return /* @__PURE__ */ jsxRuntime.jsx(
710
+ salesFrontendDesignSystem.SegmentGroup,
711
+ {
712
+ ...props,
713
+ tabIndex: 0,
714
+ id: field.name,
715
+ ref: field.ref,
716
+ defaultValue: field.value,
717
+ disabled: field.disabled,
718
+ error: fieldState.invalid,
719
+ onBlur: field.onBlur,
720
+ items: itemList,
721
+ onValueChange: (selected) => {
722
+ field.onChange(selected);
723
+ props.onValueChange?.(selected);
724
+ }
912
725
  }
913
- });
914
- isConsoleOverridden = false;
915
- };
916
- const useConsoleLog = () => {
917
- const [logs, setLogs] = React.useState(globalLogs);
918
- React.useEffect(() => {
919
- listeners.push(setLogs);
920
- return () => {
921
- listeners = listeners.filter((l) => l !== setLogs);
922
- };
923
- }, []);
924
- const clearLogs = React.useCallback(() => {
925
- globalLogs = [];
926
- listeners.forEach((listener) => listener([]));
927
- }, []);
928
- return { logs, clearLogs };
726
+ );
929
727
  };
930
728
 
931
- const safeStringify$1 = (obj) => {
932
- try {
933
- return JSON.stringify(obj, null, 2);
934
- } catch (e) {
935
- return "[Unserializable Object]";
936
- }
937
- };
938
- const LogMessage = ({ entry }) => {
939
- const messageParts = entry.message.map((part) => {
940
- if (typeof part === "object" && part !== null) {
941
- return safeStringify$1(part);
729
+ const FormSelect = ({
730
+ name,
731
+ control,
732
+ disabled,
733
+ error,
734
+ children,
735
+ ...props
736
+ }) => {
737
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
738
+ return /* @__PURE__ */ jsxRuntime.jsx(
739
+ salesFrontendDesignSystem.Select,
740
+ {
741
+ ...props,
742
+ id: field.name,
743
+ disabled: field.disabled,
744
+ error: fieldState.invalid || error,
745
+ onBlur: field.onBlur,
746
+ value: field.value,
747
+ onChange: (selected) => {
748
+ field.onChange(selected);
749
+ },
750
+ children
942
751
  }
943
- return String(part);
944
- });
945
- return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${entry.type}`]}`, children: messageParts.join(" ") });
752
+ );
946
753
  };
947
- const ConsoleLogPanel = ({ onClose }) => {
948
- const { logs, clearLogs } = useConsoleLog();
949
- const [filter, setFilter] = React.useState("all");
950
- const logContainerRef = React.useRef(null);
951
- const filteredLogs = React.useMemo(() => {
952
- if (filter === "all") {
953
- return logs;
954
- }
955
- return logs.filter((log) => log.type === filter);
956
- }, [logs, filter]);
957
- React.useEffect(() => {
958
- if (logContainerRef.current) {
959
- logContainerRef.current.scrollTop = logContainerRef.current.scrollHeight;
960
- }
961
- }, [filteredLogs]);
962
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
963
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "Console Logs", showCloseButton: true }),
964
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
965
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["panel-toolbar"], children: [
966
- /* @__PURE__ */ jsxRuntime.jsxs(
967
- salesFrontendDesignSystem.Segment.Root,
968
- {
969
- size: "xsmall",
970
- appearance: "outline",
971
- align: "left",
972
- defaultValue: filter,
973
- onValueChange: (value) => setFilter(value),
974
- children: [
975
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Segment.Item, { value: "all", children: "All" }),
976
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Segment.Item, { value: "log", children: "Log" }),
977
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Segment.Item, { value: "warn", children: "Warn" }),
978
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Segment.Item, { value: "error", children: "Error" })
979
- ]
980
- }
981
- ),
982
- /* @__PURE__ */ jsxRuntime.jsx(
983
- salesFrontendDesignSystem.Button,
984
- {
985
- variant: "neutral",
986
- appearance: "outline",
987
- size: "xsmall",
988
- onClick: clearLogs,
989
- style: { marginLeft: "auto" },
990
- children: "Clear"
991
- }
992
- )
993
- ] }),
994
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["log-list-container"], ref: logContainerRef, children: filteredLogs.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["log-item"], children: [
995
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
996
- /* @__PURE__ */ jsxRuntime.jsx(LogMessage, { entry: log })
997
- ] }, log.id)) })
998
- ] })
999
- ] }) });
754
+ const FormSelectOption = ({ children, value, ...rest }) => {
755
+ return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Select.Option, { value, ...rest, children });
756
+ };
757
+ const FormSelectGroup = ({
758
+ options,
759
+ optionsProps,
760
+ ...props
761
+ }) => {
762
+ return /* @__PURE__ */ jsxRuntime.jsx(FormSelect, { ...props, children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(FormSelectOption, { value: option.value, ...optionsProps, children: option.label }, option.value)) });
1000
763
  };
764
+ FormSelect.Option = FormSelectOption;
765
+ FormSelect.Group = FormSelectGroup;
1001
766
 
1002
- const LoginPanel = ({ onClose, onLogin }) => {
1003
- const [selectedTypeId, setSelectedTypeId] = React.useState(loginTypes[0]?.id || "");
1004
- const [formData, setFormData] = React.useState({});
1005
- const selectedType = React.useMemo(() => loginTypes.find((t) => t.id === selectedTypeId), [selectedTypeId]);
1006
- const handleInputChange = (e) => {
1007
- const { name, value } = e.target;
1008
- setFormData((prev) => ({ ...prev, [name]: value }));
1009
- };
1010
- const handleSubmit = (e) => {
1011
- e.preventDefault();
1012
- if (selectedType) {
1013
- onLogin(selectedType.id, formData);
1014
- onClose();
767
+ const FormTextField = ({
768
+ name,
769
+ control,
770
+ size = "medium",
771
+ disabled,
772
+ error,
773
+ onBlur,
774
+ onChange,
775
+ rootProps,
776
+ ...props
777
+ }) => {
778
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
779
+ return /* @__PURE__ */ jsxRuntime.jsx(
780
+ salesFrontendDesignSystem.FormField.TextField,
781
+ {
782
+ ...props,
783
+ id: field.name,
784
+ size,
785
+ autoComplete: "off",
786
+ name: field.name,
787
+ value: field.value ?? "",
788
+ disabled: field.disabled,
789
+ error: fieldState.invalid || error,
790
+ onChange: (e) => {
791
+ field.onChange(e);
792
+ onChange?.(e);
793
+ },
794
+ onBlur: (e) => {
795
+ field.onBlur();
796
+ onBlur?.(e);
797
+ },
798
+ rootProps: {
799
+ ...rootProps,
800
+ onClear: () => {
801
+ field.onChange("");
802
+ rootProps?.onClear?.();
803
+ }
804
+ }
1015
805
  }
1016
- };
1017
- React.useEffect(() => {
1018
- setFormData({});
1019
- }, [selectedType]);
1020
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1021
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uAC04\uD3B8 \uB85C\uADF8\uC778", showCloseButton: true }),
1022
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("form", { className: styles$2["login-form-container"], onSubmit: handleSubmit, children: [
1023
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.FormField.FieldControl, { children: [
1024
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { htmlFor: "login-type-select", children: "\uB85C\uADF8\uC778 \uC720\uD615" }),
1025
- /* @__PURE__ */ jsxRuntime.jsx(
1026
- salesFrontendDesignSystem.Select,
1027
- {
1028
- value: selectedTypeId,
1029
- onChange: setSelectedTypeId,
1030
- size: "xsmall",
1031
- rootProps: { style: { width: "100%" } },
1032
- children: loginTypes.map((type) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Select.Option, { value: type.id, children: type.label }, type.id))
1033
- }
1034
- )
1035
- ] }),
1036
- selectedType?.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.FormField.FieldControl, { children: [
1037
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { htmlFor: field.name, children: field.label }),
1038
- /* @__PURE__ */ jsxRuntime.jsx(
1039
- salesFrontendDesignSystem.FormField.TextField,
1040
- {
1041
- size: "xsmall",
1042
- type: field.type,
1043
- id: field.name,
1044
- name: field.name,
1045
- placeholder: field.placeholder,
1046
- value: formData[field.name] || "",
1047
- onChange: handleInputChange,
1048
- required: true
1049
- }
1050
- )
1051
- ] }, field.name)),
1052
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["form-actions"], children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { type: "submit", variant: "primary", appearance: "filled", size: "xsmall", children: "\uB85C\uADF8\uC778" }) })
1053
- ] }) })
1054
- ] }) });
806
+ );
1055
807
  };
1056
808
 
1057
- const SEARCH_SECTIONS = [
1058
- { value: "all", label: "\uC804\uCCB4" },
1059
- { value: "url", label: "\uC8FC\uC18C" },
1060
- { value: "headers", label: "\uD5E4\uB354" },
1061
- { value: "params", label: "\uD30C\uB77C\uBBF8\uD130" },
1062
- { value: "data", label: "\uC694\uCCAD" },
1063
- { value: "response", label: "\uC751\uB2F5" },
1064
- { value: "error", label: "\uC5D0\uB7EC" }
1065
- ];
1066
- const getLogInfo = (log) => {
1067
- if (log.holdStatus === "held") {
1068
- if ("request" in log) {
1069
- return log.request;
1070
- }
1071
- if ("response" in log) {
1072
- return log.response;
1073
- }
1074
- if ("error" in log) {
1075
- return log.error;
1076
- }
1077
- }
1078
- return log;
1079
- };
1080
- const NetworkLog = ({ onClose }) => {
1081
- const {
1082
- requests,
1083
- responses,
1084
- errors,
1085
- clear,
1086
- isHold,
1087
- toggleHold,
1088
- heldRequests,
1089
- heldResponses,
1090
- heldErrors,
1091
- playAllRequests,
1092
- playAllResponses
1093
- } = salesFrontendApi.useDebugStore();
1094
- const [searchTerm, setSearchTerm] = React.useState("");
1095
- const [searchSection, setSearchSection] = React.useState(SEARCH_SECTIONS[0]?.value);
1096
- const allLogs = React.useMemo(() => {
1097
- const logs = [];
1098
- requests.forEach((req) => logs.push({ ...req, type: "request" }));
1099
- responses.forEach((res) => logs.push({ ...res, type: "response" }));
1100
- errors.forEach((err) => logs.push({ ...err, type: "error" }));
1101
- heldRequests.forEach((req) => logs.push({ ...req, type: "request", holdStatus: "held" }));
1102
- heldResponses.forEach((res) => logs.push({ ...res, type: "response", holdStatus: "held" }));
1103
- heldErrors.forEach((err) => logs.push({ ...err, type: "error", holdStatus: "held" }));
1104
- logs.sort((a, b) => {
1105
- const aInfo = getLogInfo(a);
1106
- const bInfo = getLogInfo(b);
1107
- const aTime = "startTime" in aInfo ? aInfo.startTime : 0;
1108
- const bTime = "startTime" in bInfo ? bInfo.startTime : 0;
1109
- return bTime - aTime;
1110
- });
1111
- return logs;
1112
- }, [requests, responses, errors, heldRequests, heldResponses, heldErrors]);
1113
- const filteredLogs = React.useMemo(() => {
1114
- if (!searchTerm) {
1115
- return allLogs;
1116
- }
1117
- const lowercasedTerm = searchTerm.toLowerCase();
1118
- return allLogs.filter((log) => {
1119
- const logInfo = getLogInfo(log);
1120
- switch (searchSection) {
1121
- case "url":
1122
- return logInfo.url?.toLowerCase().includes(lowercasedTerm);
1123
- case "headers":
1124
- return "headers" in logInfo && logInfo.headers && JSON.stringify(logInfo.headers)?.toLowerCase().includes(lowercasedTerm);
1125
- case "params":
1126
- return "params" in logInfo && logInfo.params && JSON.stringify(logInfo.params)?.toLowerCase().includes(lowercasedTerm);
1127
- case "data":
1128
- return "data" in logInfo && logInfo.data && log.type === "request" && JSON.stringify(logInfo.data)?.toLowerCase().includes(lowercasedTerm);
1129
- case "response":
1130
- return "data" in logInfo && logInfo.data && log.type === "response" && JSON.stringify(logInfo.data)?.toLowerCase().includes(lowercasedTerm);
1131
- case "error":
1132
- return log.type === "error" && JSON.stringify(logInfo)?.toLowerCase().includes(lowercasedTerm);
1133
- case "all":
1134
- default:
1135
- return JSON.stringify(logInfo).toLowerCase().includes(lowercasedTerm);
1136
- }
1137
- });
1138
- }, [allLogs, searchTerm, searchSection]);
1139
- const renderLogSummary = (log) => {
1140
- const logInfo = getLogInfo(log);
1141
- const prefix = log.holdStatus === "held" ? "[HELD] " : "";
1142
- if (log.type === "request") {
1143
- return `${prefix}[REQ] ${logInfo.method.toUpperCase()} ${logInfo.url}`;
1144
- }
1145
- if (log.type === "response" && "status" in logInfo) {
1146
- return `${prefix}[RES] ${logInfo.method.toUpperCase()} ${logInfo.url} - ${logInfo.status}`;
809
+ const cx$5 = classNames.bind(styles$1);
810
+ const StepIndicator = ({
811
+ items,
812
+ onClickItem,
813
+ currentIndex = 0,
814
+ defaultValue = "",
815
+ dotCount = 3,
816
+ isLoading
817
+ }) => {
818
+ const [steps, setSteps] = React.useState(
819
+ Array.from({ length: 10 }).map(() => ({ label: "-", value: "" }))
820
+ );
821
+ const [current, setCurrent] = React.useState(currentIndex);
822
+ React.useEffect(() => {
823
+ if (items.length > 0) {
824
+ setSteps(items);
825
+ items.map((item, idx) => {
826
+ if (item.value === defaultValue) {
827
+ setCurrent(idx);
828
+ }
829
+ });
1147
830
  }
1148
- if (log.type === "error" && "message" in logInfo) {
1149
- return `${prefix}[ERR] ${logInfo.method.toUpperCase()} ${logInfo.url} - ${logInfo.message}`;
831
+ }, [items, defaultValue]);
832
+ const handleClickStep = (item) => {
833
+ const index = steps.findIndex((step) => step.value === item.value);
834
+ if (index === -1) {
835
+ console.error("error not found index");
836
+ return;
1150
837
  }
1151
- return "Unknown Log";
1152
- };
1153
- const renderLogContent = (log) => {
1154
- const logInfo = getLogInfo(log);
1155
- return /* @__PURE__ */ jsxRuntime.jsx("pre", { children: JSON.stringify(logInfo, null, 2) });
1156
- };
1157
- return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: [
1158
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
1159
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1160
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uB124\uD2B8\uC6CC\uD06C \uB85C\uADF8", showCloseButton: true }),
1161
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1162
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["search-container"], children: [
1163
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Select, { value: searchSection, onChange: (value) => setSearchSection(value), size: "xsmall", children: SEARCH_SECTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Select.Option, { value: option.value, children: option.label }, option.value)) }),
1164
- /* @__PURE__ */ jsxRuntime.jsx(
1165
- salesFrontendDesignSystem.FormField.TextField,
1166
- {
1167
- placeholder: "\uAC80\uC0C9...",
1168
- value: searchTerm,
1169
- size: "xsmall",
1170
- onChange: (e) => setSearchTerm(e.target.value)
1171
- }
1172
- ),
1173
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Checkbox, { id: "hold-checkbox", checked: isHold, onChange: toggleHold, size: "small", variant: "main", children: "Hold" }),
1174
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: clear, children: "clear" })
1175
- ] }),
1176
- isHold && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "row" }, children: [
1177
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { size: "xsmall", onClick: () => playAllRequests(), variant: "primary", appearance: "outline", children: "REQ Resolve" }),
1178
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { size: "xsmall", onClick: () => playAllResponses(), variant: "primary", appearance: "outline", children: "RES Resolve" })
1179
- ] }),
1180
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-list"], children: filteredLogs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uD45C\uC2DC\uD560 \uB85C\uADF8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: filteredLogs.map((log, index) => /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Accordion.Item, { children: [
1181
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderButton, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$3["log-summary"], children: renderLogSummary(log) }) }),
1182
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-content"], children: renderLogContent(log) }) })
1183
- ] }, index)) }) })
1184
- ] })
1185
- ] })
1186
- ] });
1187
- };
1188
-
1189
- const PageNavigationPanel = ({ onClose }) => {
1190
- const [url, setUrl] = React.useState("");
1191
- const handleNavigate = () => {
1192
- if (url) {
1193
- self.location.href = url;
838
+ if (steps[index < 1 ? index : index - 1]?.isCompleted) {
839
+ onClickItem?.(item);
840
+ } else {
841
+ salesFrontendDesignSystem.ModalUtils.alert("\uC774\uC804 \uB2E8\uACC4\uB97C \uBAA8\uB450 \uC644\uB8CC\uD574\uC57C \uC120\uD0DD\uD55C \uB2E8\uACC4\uB85C\n\uC774\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.", "\uC774\uC804 \uB2E8\uACC4\uB97C \uBA3C\uC800 \uC9C4\uD589\uD574\uC8FC\uC138\uC694");
1194
842
  }
1195
843
  };
1196
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1197
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uD398\uC774\uC9C0 \uC774\uB3D9", showCloseButton: true }),
1198
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["page-navigation-content"], children: [
844
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$5("stepper-layout", { loading: isLoading }), children: [
845
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$5("stepper"), children: steps.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1199
846
  /* @__PURE__ */ jsxRuntime.jsx(
1200
- salesFrontendDesignSystem.FormField.TextField,
847
+ "div",
1201
848
  {
1202
- size: "xsmall",
1203
- type: "text",
1204
- value: url,
1205
- onChange: (e) => setUrl(e.target.value),
1206
- placeholder: "\uC774\uB3D9\uD560 URL\uC744 \uC785\uB825\uD558\uC138\uC694 (\uC608: /main)",
1207
- rootProps: { style: { flex: 1 } }
849
+ className: cx$5(
850
+ "circle",
851
+ { completed: item.isCompleted ?? false },
852
+ { active: defaultValue === item.value || current === idx }
853
+ ),
854
+ onClick: () => handleClickStep?.(item),
855
+ children: item.isCompleted ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$5("completed-icon") }) : idx + 1
1208
856
  }
1209
857
  ),
1210
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "primary", appearance: "filled", size: "xsmall", onClick: handleNavigate, children: "\uC774\uB3D9" })
1211
- ] }) })
1212
- ] }) });
858
+ idx < steps.length - 1 && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$5("dot") }, `dot-${idx}-${dotIdx}`))
859
+ ] }, `num-${idx}`)) }),
860
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$5("step-labels"), children: steps.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx(
861
+ "li",
862
+ {
863
+ className: cx$5(
864
+ { completed: steps[idx < 1 ? idx : idx - 1]?.isCompleted ?? false },
865
+ { active: defaultValue === item.value || current === idx }
866
+ ),
867
+ onClick: () => handleClickStep?.(item),
868
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ellipsis", children: item.label ?? item.value })
869
+ },
870
+ `label-${idx}`
871
+ )) })
872
+ ] });
1213
873
  };
1214
874
 
1215
- const safeStringify = (obj) => {
1216
- try {
1217
- const replacer = (key, value) => typeof value === "bigint" ? value.toString() : value;
1218
- return JSON.stringify(obj, replacer, 2);
1219
- } catch (e) {
1220
- return "[Unserializable Object]";
875
+ const cx$4 = classNames.bind(styles$2);
876
+ function Attachment({
877
+ photos,
878
+ onAddPhoto,
879
+ onRemovePhoto,
880
+ show,
881
+ type = "multiple",
882
+ buttonText
883
+ }) {
884
+ const handleAddPhoto = () => {
885
+ onAddPhoto();
886
+ };
887
+ const handleRemovePhoto = (id) => {
888
+ onRemovePhoto(id);
889
+ };
890
+ const renderPhotoSingle = () => {
891
+ if (photos.length === 0) {
892
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx$4("add-photo-button-single"), onClick: handleAddPhoto, children: [
893
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
894
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uC0AC\uC9C4 \uCCA8\uBD80\uD558\uAE30" })
895
+ ] }) });
896
+ }
897
+ return photos.map((photo) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$4("single-photo-item"), children: [
898
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx$4("photo-image") }) }),
899
+ /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
900
+ ] }, photo.id));
901
+ };
902
+ const renderPhotoGrid = () => {
903
+ const maxPhotos = type === "single" ? 1 : 4;
904
+ const gridItems = [];
905
+ if (photos.length < maxPhotos) {
906
+ gridItems.push(
907
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx$4("add-photo-button"), onClick: handleAddPhoto, children: [
908
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
909
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uCCA8\uBD80\uD558\uAE30" }),
910
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx$4("photo-count"), children: [
911
+ "(",
912
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$4("photo-count-number"), children: photos.length }),
913
+ "/",
914
+ maxPhotos,
915
+ ")"
916
+ ] })
917
+ ] }) }, "add-photo")
918
+ );
919
+ }
920
+ photos.forEach((photo) => {
921
+ gridItems.push(
922
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$4("photo-item"), children: [
923
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx$4("photo-image") }) }),
924
+ /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
925
+ ] }, photo.id)
926
+ );
927
+ });
928
+ return gridItems;
929
+ };
930
+ const isVisible = show || !show && photos.length > 0;
931
+ if (!isVisible) {
932
+ return null;
1221
933
  }
1222
- };
1223
- const ResultMessage = ({ log }) => {
1224
- const messageParts = log.message.map((part) => {
1225
- if (typeof part === "object" && part !== null) {
1226
- return safeStringify(part);
934
+ if (type === "single") {
935
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-single"), children: renderPhotoSingle() });
936
+ }
937
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
938
+ }
939
+
940
+ const maxImageSize = 3 * 1024 * 1024;
941
+ function resize(image, options = { ext: "jpeg", filesize: maxImageSize }) {
942
+ return new Promise((resolve, reject) => {
943
+ const canvas = document.createElement("canvas");
944
+ const ctx = canvas.getContext("2d");
945
+ if (!ctx) {
946
+ reject(new Error("Canvas context\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
947
+ return;
1227
948
  }
1228
- return String(part);
1229
- });
1230
- const prefix = log.type === "return" ? "\u21A9 " : "";
1231
- return /* @__PURE__ */ jsxRuntime.jsxs("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${log.type}`]}`, children: [
1232
- prefix,
1233
- messageParts.join(" ")
1234
- ] });
1235
- };
1236
- const ScriptExecutorPanel = ({ onClose }) => {
1237
- const [code, setCode] = React.useState('// \uC5EC\uAE30\uC5D0 \uC2E4\uD589\uD560 \uCF54\uB4DC\uB97C \uC785\uB825\uD558\uC138\uC694\nconsole.log("Hello, World!");');
1238
- const [results, setResults] = React.useState([]);
1239
- const addResult = (type, ...args) => {
1240
- setResults((prevResults) => [
1241
- ...prevResults,
1242
- {
1243
- id: Date.now() + Math.random(),
1244
- type,
1245
- timestamp: (/* @__PURE__ */ new Date()).toLocaleTimeString(),
1246
- message: args
949
+ const img = new Image();
950
+ img.crossOrigin = "anonymous";
951
+ img.onload = () => {
952
+ let { width, height } = img;
953
+ const { filesize, ext } = options;
954
+ if (filesize) {
955
+ const originalSize = width * height * 4;
956
+ if (originalSize > filesize) {
957
+ const ratio = Math.sqrt(filesize / originalSize);
958
+ width = Math.floor(width * ratio);
959
+ height = Math.floor(height * ratio);
960
+ }
961
+ } else {
962
+ const { width: targetWidth, height: targetHeight } = options;
963
+ if (targetWidth && targetHeight) {
964
+ width = targetWidth;
965
+ height = targetHeight;
966
+ } else if (targetWidth) {
967
+ const ratio = targetWidth / width;
968
+ width = targetWidth;
969
+ height = Math.floor(height * ratio);
970
+ } else if (targetHeight) {
971
+ const ratio = targetHeight / height;
972
+ height = targetHeight;
973
+ width = Math.floor(width * ratio);
974
+ }
1247
975
  }
1248
- ]);
1249
- };
1250
- const handleExecute = () => {
1251
- const originalConsole = { ...console };
1252
- const newConsole = {
1253
- log: (...args) => {
1254
- originalConsole.log(...args);
1255
- addResult("log", ...args);
1256
- },
1257
- warn: (...args) => {
1258
- originalConsole.warn(...args);
1259
- addResult("warn", ...args);
1260
- },
1261
- error: (...args) => {
1262
- originalConsole.error(...args);
1263
- addResult("error", ...args);
976
+ canvas.width = width;
977
+ canvas.height = height;
978
+ ctx.drawImage(img, 0, 0, width, height);
979
+ if (typeof image === "string") {
980
+ const mimeType = ext === "png" ? "image/png" : "image/jpeg";
981
+ const quality = ext === "png" ? 1 : 0.8;
982
+ const base64 = canvas.toDataURL(mimeType, quality);
983
+ resolve(base64);
984
+ } else {
985
+ canvas.toBlob(
986
+ (blob) => {
987
+ if (!blob) {
988
+ reject(new Error("Blob\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
989
+ return;
990
+ }
991
+ const mimeType = ext === "png" ? "image/png" : "image/jpeg";
992
+ const fileName = image.name ? `${image.name.replace(/\.[^/.]+$/, "")}.${ext}` : `resized.${ext}`;
993
+ const resizedFile = new File([blob], fileName, { type: mimeType });
994
+ resolve(resizedFile);
995
+ },
996
+ ext === "png" ? "image/png" : "image/jpeg",
997
+ ext === "png" ? 1 : 0.8
998
+ );
1264
999
  }
1265
1000
  };
1266
- try {
1267
- Object.assign(console, newConsole);
1268
- const result = new Function(code)();
1269
- if (result !== void 0) {
1270
- addResult("return", result);
1001
+ img.onerror = () => {
1002
+ reject(new Error("\uC774\uBBF8\uC9C0\uB97C \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
1003
+ };
1004
+ if (typeof image === "string") {
1005
+ img.src = image;
1006
+ } else {
1007
+ const reader = new FileReader();
1008
+ reader.onload = (e) => {
1009
+ if (e.target?.result) {
1010
+ img.src = e.target.result;
1011
+ } else {
1012
+ reject(new Error("\uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
1013
+ }
1014
+ };
1015
+ reader.onerror = () => {
1016
+ reject(new Error("\uD30C\uC77C\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."));
1017
+ };
1018
+ reader.readAsDataURL(image);
1019
+ }
1020
+ });
1021
+ }
1022
+
1023
+ const genImageId = () => `camera-${Date.now()}-${Math.random()}`;
1024
+ function useCamera({
1025
+ onChange,
1026
+ resize: resizeOption,
1027
+ cameraOnly,
1028
+ onDelete,
1029
+ show,
1030
+ type = "multiple",
1031
+ buttonText
1032
+ } = {}) {
1033
+ const [attachedPhotos, setAttachedPhotos] = React.useState([]);
1034
+ const findImage = (imageId) => {
1035
+ return attachedPhotos.find((image) => image.id === imageId);
1036
+ };
1037
+ const onClick = () => {
1038
+ const input = document.createElement("input");
1039
+ input.type = "file";
1040
+ input.accept = "image/*";
1041
+ if (cameraOnly) {
1042
+ input.capture = "camera";
1043
+ }
1044
+ input.addEventListener("change", async (event) => {
1045
+ const target = event.target;
1046
+ const { files } = target;
1047
+ if (files && files.length > 0) {
1048
+ const file = files[0];
1049
+ if (file) {
1050
+ const resizedFile = await resize(file, resizeOption);
1051
+ const newPhoto = {
1052
+ id: genImageId(),
1053
+ src: URL.createObjectURL(resizedFile),
1054
+ name: `\uC11C\uB958\uC0AC\uC9C4_${attachedPhotos.length + 1}`
1055
+ };
1056
+ if (type === "single") {
1057
+ setAttachedPhotos([newPhoto]);
1058
+ } else {
1059
+ setAttachedPhotos([...attachedPhotos, newPhoto]);
1060
+ }
1061
+ onChange && onChange(file);
1062
+ }
1271
1063
  }
1272
- } catch (e) {
1273
- addResult("error", e.name, e.message);
1274
- } finally {
1275
- Object.assign(console, originalConsole);
1064
+ document.body.removeChild(input);
1065
+ });
1066
+ input.style.display = "none";
1067
+ document.body.appendChild(input);
1068
+ input.click();
1069
+ };
1070
+ const deleteImage = (imageId) => {
1071
+ const imageIndex = attachedPhotos.findIndex((image) => image.id === imageId);
1072
+ if (imageIndex > -1) {
1073
+ const item = attachedPhotos.splice(imageIndex, 1);
1074
+ item[0] && URL.revokeObjectURL(item[0].src);
1075
+ setAttachedPhotos([...attachedPhotos]);
1076
+ onDelete && onDelete(imageId);
1276
1077
  }
1277
1078
  };
1278
- const handleClear = () => {
1279
- setResults([]);
1079
+ const CameraComponent = () => /* @__PURE__ */ jsxRuntime.jsx(
1080
+ Attachment,
1081
+ {
1082
+ show: !!show,
1083
+ onAddPhoto: onClick,
1084
+ onRemovePhoto: deleteImage,
1085
+ photos: attachedPhotos,
1086
+ type,
1087
+ buttonText
1088
+ }
1089
+ );
1090
+ React.useEffect(() => {
1091
+ return () => {
1092
+ attachedPhotos.forEach((image) => {
1093
+ URL.revokeObjectURL(image.src);
1094
+ });
1095
+ };
1096
+ }, []);
1097
+ return {
1098
+ onClick,
1099
+ getImage: findImage,
1100
+ deleteImage,
1101
+ attachedPhotos,
1102
+ Attachment: CameraComponent
1280
1103
  };
1281
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1282
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC2A4\uD06C\uB9BD\uD2B8 \uC2E4\uD589", showCloseButton: true }),
1283
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles$2["debug-feature-panel"]} ${styles$2["script-executor-panel"]}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-executor-content"], children: [
1284
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-input-section"], children: [
1285
- /* @__PURE__ */ jsxRuntime.jsx(
1286
- "textarea",
1287
- {
1288
- className: styles$2["script-textarea"],
1289
- value: code,
1290
- onChange: (e) => setCode(e.target.value),
1291
- spellCheck: "false"
1292
- }
1293
- ),
1294
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-actions"], children: [
1295
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleExecute, children: "\uC2E4\uD589 (\u25B6)" }),
1296
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleClear, children: "\uACB0\uACFC \uC9C0\uC6B0\uAE30" })
1297
- ] })
1298
- ] }),
1299
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-output-section"], children: [
1300
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["panel-header"], children: /* @__PURE__ */ jsxRuntime.jsx("h3", { children: "\uACB0\uACFC" }) }),
1301
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["log-list-container"], children: results.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["log-item"], children: [
1302
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
1303
- /* @__PURE__ */ jsxRuntime.jsx(ResultMessage, { log })
1304
- ] }, log.id)) })
1305
- ] })
1306
- ] }) }) })
1307
- ] }) });
1308
- };
1104
+ }
1309
1105
 
1310
- const setCookie = (name, value) => {
1311
- document.cookie = `${name}=${encodeURIComponent(value)};path=/`;
1312
- };
1313
- const removeCookie = (name) => {
1314
- document.cookie = `${name}=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
1106
+ const HISTORY_SIZE = 100;
1107
+ const DEFAULT_DOWNLOAD_PROPS = {
1108
+ fileExtendsion: "png",
1109
+ fileName: "image",
1110
+ transparent: true,
1111
+ backgroundColor: "white",
1112
+ width: 500,
1113
+ height: 500
1315
1114
  };
1316
- const useStorage = (storageType) => {
1317
- const [items, setItems] = React.useState([]);
1318
- const loadItems = React.useCallback(() => {
1319
- const newItems = [];
1320
- if (storageType === "localStorage") {
1321
- for (let i = 0; i < localStorage.length; i++) {
1322
- const key = localStorage.key(i);
1323
- if (key) {
1324
- newItems.push({ key, value: localStorage.getItem(key) || "" });
1325
- }
1115
+ function useCanvasPaint(paintProps = {}) {
1116
+ const { pen = { strokeWeight: 5, strokeColor: "black" }, onChange, onStart, onEnd } = paintProps;
1117
+ const [canvasRefState, setCanvasRefState] = React.useState(null);
1118
+ const contextRef = React.useRef(null);
1119
+ const [isPainting, setIsPainting] = React.useState(false);
1120
+ const [history, setHistory] = React.useState([]);
1121
+ const [historyIndex, setHistoryIndex] = React.useState(-1);
1122
+ const saveState = React.useCallback(() => {
1123
+ if (!canvasRefState) {
1124
+ return;
1125
+ }
1126
+ const dataUrl = canvasRefState.toDataURL();
1127
+ const newHistory = history.slice(0, historyIndex + 1);
1128
+ if (newHistory.length >= HISTORY_SIZE) {
1129
+ newHistory.shift();
1130
+ }
1131
+ newHistory.push(dataUrl);
1132
+ setHistory(newHistory);
1133
+ setHistoryIndex(newHistory.length - 1);
1134
+ onChange && onChange();
1135
+ }, [history, historyIndex, onChange, canvasRefState]);
1136
+ const restoreState = React.useCallback(
1137
+ (index) => {
1138
+ const context = contextRef.current;
1139
+ if (!canvasRefState || !context || !history[index]) {
1140
+ return;
1326
1141
  }
1327
- } else {
1328
- const cookies = document.cookie.split(";");
1329
- cookies.forEach((cookie) => {
1330
- const parts = cookie.split("=");
1331
- const key = parts.shift()?.trim();
1332
- if (key) {
1333
- newItems.push({ key, value: decodeURIComponent(parts.join("=")) });
1334
- }
1335
- });
1142
+ const dataUrl = history[index];
1143
+ const img = new Image();
1144
+ img.onload = () => {
1145
+ context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
1146
+ context.drawImage(img, 0, 0);
1147
+ };
1148
+ img.src = dataUrl;
1149
+ onChange && onChange();
1150
+ },
1151
+ [history, onChange, canvasRefState]
1152
+ );
1153
+ React.useEffect(() => {
1154
+ if (!canvasRefState) {
1155
+ return;
1156
+ }
1157
+ const context = canvasRefState.getContext("2d", { willReadFrequently: true });
1158
+ if (!context) {
1159
+ return;
1336
1160
  }
1337
- setItems(newItems);
1338
- }, [storageType]);
1161
+ contextRef.current = context;
1162
+ const initialDataUrl = canvasRefState.toDataURL();
1163
+ setHistory([initialDataUrl]);
1164
+ setHistoryIndex(0);
1165
+ }, [canvasRefState]);
1339
1166
  React.useEffect(() => {
1340
- loadItems();
1341
- }, [loadItems]);
1342
- const setItem = React.useCallback(
1343
- (key, value) => {
1344
- if (storageType === "localStorage") {
1345
- localStorage.setItem(key, value);
1167
+ const context = contextRef.current;
1168
+ if (context) {
1169
+ context.lineWidth = pen.strokeWeight;
1170
+ context.strokeStyle = pen.strokeColor;
1171
+ }
1172
+ }, [pen]);
1173
+ const getEventPosition = React.useCallback(
1174
+ (event) => {
1175
+ if (!canvasRefState) {
1176
+ return null;
1177
+ }
1178
+ const rect = canvasRefState.getBoundingClientRect();
1179
+ const scaleX = canvasRefState.width / rect.width;
1180
+ const scaleY = canvasRefState.height / rect.height;
1181
+ let clientX;
1182
+ let clientY;
1183
+ if (event instanceof MouseEvent) {
1184
+ clientX = event.clientX;
1185
+ clientY = event.clientY;
1186
+ } else if (event instanceof TouchEvent) {
1187
+ const touch = event.touches[0];
1188
+ if (!touch) {
1189
+ return null;
1190
+ }
1191
+ clientX = touch.clientX;
1192
+ clientY = touch.clientY;
1346
1193
  } else {
1347
- setCookie(key, value);
1194
+ return null;
1348
1195
  }
1349
- loadItems();
1196
+ const offsetX = (clientX - rect.left) * scaleX;
1197
+ const offsetY = (clientY - rect.top) * scaleY;
1198
+ return { offsetX, offsetY };
1350
1199
  },
1351
- [storageType, loadItems]
1200
+ [canvasRefState]
1352
1201
  );
1353
- const removeItem = React.useCallback(
1354
- (key) => {
1355
- if (storageType === "localStorage") {
1356
- localStorage.removeItem(key);
1357
- } else {
1358
- removeCookie(key);
1202
+ const startPainting = React.useCallback(
1203
+ (event) => {
1204
+ event.preventDefault();
1205
+ const context = contextRef.current;
1206
+ if (!context) {
1207
+ return;
1208
+ }
1209
+ const pos = getEventPosition(event);
1210
+ if (!pos) {
1211
+ return;
1359
1212
  }
1360
- loadItems();
1213
+ onStart && onStart();
1214
+ const { offsetX, offsetY } = pos;
1215
+ context.beginPath();
1216
+ context.moveTo(offsetX, offsetY);
1217
+ setIsPainting(true);
1361
1218
  },
1362
- [storageType, loadItems]
1219
+ [onStart, getEventPosition]
1363
1220
  );
1364
- return { items, setItem, removeItem, loadItems };
1365
- };
1366
-
1367
- const ValueDisplay = ({ value }) => {
1368
- try {
1369
- const parsed = JSON.parse(value);
1370
- if (typeof parsed === "object" && parsed !== null) {
1371
- return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: styles$2["log-content"], children: JSON.stringify(parsed, null, 2) });
1372
- }
1373
- } catch (e) {
1374
- }
1375
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["log-content"], children: value });
1376
- };
1377
- const EditableRow = ({ item, onSave, onRemove }) => {
1378
- const [isEditing, setIsEditing] = React.useState(false);
1379
- const [value, setValue] = React.useState(item.value);
1380
- const handleSave = () => {
1381
- onSave(item.key, value);
1382
- setIsEditing(false);
1383
- };
1384
- const handleEdit = () => {
1385
- setValue(item.value);
1386
- setIsEditing(true);
1387
- };
1388
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Accordion.Item, { children: [
1389
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Accordion.HeaderButton, { children: [
1390
- " ",
1391
- item.key
1392
- ] }),
1393
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Accordion.Content, { variant: "text", style: { flex: 1, display: "flex", flexDirection: "column" }, children: [
1394
- isEditing ? /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleSave, children: "Save" }) : /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleEdit, children: "Edit" }),
1395
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: () => onRemove(item.key), children: "Remove" }),
1396
- isEditing ? /* @__PURE__ */ jsxRuntime.jsx("textarea", { value, onChange: (e) => setValue(e.target.value) }) : /* @__PURE__ */ jsxRuntime.jsx(ValueDisplay, { value: item.value })
1397
- ] })
1398
- ] }) });
1399
- };
1400
- const StoragePanel = ({ onClose, storageType }) => {
1401
- const { items, setItem, removeItem } = useStorage(storageType);
1402
- const [filter, setFilter] = React.useState("");
1403
- const filteredItems = React.useMemo(() => {
1404
- if (!filter) {
1405
- return items;
1221
+ const stopPainting = React.useCallback(() => {
1222
+ const context = contextRef.current;
1223
+ if (!context || !isPainting) {
1224
+ return;
1406
1225
  }
1407
- return items.filter(
1408
- (item) => item.key.toLowerCase().includes(filter.toLowerCase()) || item.value.toLowerCase().includes(filter.toLowerCase())
1409
- );
1410
- }, [items, filter]);
1411
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1412
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: storageType === "localStorage" ? "Local Storage" : "Cookies", showCloseButton: true }),
1413
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1414
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["panel-toolbar"], children: /* @__PURE__ */ jsxRuntime.jsx(
1415
- salesFrontendDesignSystem.FormField.TextField,
1416
- {
1417
- placeholder: "Search key or value...",
1418
- size: "xsmall",
1419
- value: filter,
1420
- onChange: (e) => setFilter(e.target.value),
1421
- rootProps: { style: { width: "100%" } }
1422
- }
1423
- ) }),
1424
- /* @__PURE__ */ jsxRuntime.jsx("ul", { children: filteredItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(EditableRow, { item, onSave: setItem, onRemove: removeItem }) }, item.key)) })
1425
- ] })
1426
- ] }) });
1427
- };
1428
-
1429
- const loginTypes = [
1430
- {
1431
- id: "fp",
1432
- label: "FP \uB85C\uADF8\uC778",
1433
- fields: [{ name: "employeeId", label: "\uC0AC\uBC88", type: "text", placeholder: "\uC0AC\uBC88\uC744 \uC785\uB825\uD558\uC138\uC694" }]
1434
- },
1435
- {
1436
- id: "customer",
1437
- label: "\uACE0\uAC1D \uB85C\uADF8\uC778",
1438
- fields: [
1439
- { name: "name", label: "\uC774\uB984", type: "text", placeholder: "\uC774\uB984" },
1440
- { name: "phone", label: "\uC804\uD654\uBC88\uD638", type: "tel", placeholder: "\uC804\uD654\uBC88\uD638" },
1441
- { name: "residentNumber", label: "\uC8FC\uBBFC\uBC88\uD638", type: "text", placeholder: "\uC8FC\uBBFC\uBC88\uD638 \uC55E 7\uC790\uB9AC" },
1442
- { name: "userId", label: "\uC544\uC774\uB514", type: "text", placeholder: "\uC544\uC774\uB514" },
1443
- { name: "password", label: "\uBE44\uBC00\uBC88\uD638", type: "password", placeholder: "\uBE44\uBC00\uBC88\uD638" }
1444
- ]
1445
- }
1446
- ];
1447
- const menuItems = [
1448
- {
1449
- id: "network-log",
1450
- label: "\uB124\uD2B8\uC6CC\uD06C \uB85C\uADF8",
1451
- component: NetworkLog,
1452
- display: true
1453
- },
1454
- {
1455
- id: "console-log",
1456
- label: "\uCF58\uC194 \uB85C\uADF8 \uD655\uC778",
1457
- component: ConsoleLogPanel,
1458
- display: true
1459
- },
1460
- {
1461
- id: "local-storage",
1462
- label: "\uB85C\uCEEC \uC2A4\uD1A0\uB9AC\uC9C0 \uAD00\uB9AC",
1463
- // StoragePanel은 재사용 가능한 컴포넌트이므로, props를 통해 어떤 스토리지를 다룰지 지정합니다.
1464
- component: (props) => /* @__PURE__ */ jsxRuntime.jsx(StoragePanel, { ...props, storageType: "localStorage" }),
1465
- display: true
1466
- },
1467
- {
1468
- id: "cookie-management",
1469
- label: "\uCFE0\uD0A4 \uAD00\uB9AC",
1470
- component: (props) => /* @__PURE__ */ jsxRuntime.jsx(StoragePanel, { ...props, storageType: "cookie" }),
1471
- display: true
1472
- },
1473
- {
1474
- id: "quick-login",
1475
- label: "\uAC04\uD3B8 \uB85C\uADF8\uC778",
1476
- component: LoginPanel,
1477
- display: true
1478
- // 실제 표시는 DebugTool.tsx에서 onLogin prop 존재 여부에 따라 결정됩니다.
1479
- },
1480
- {
1481
- id: "script-executor",
1482
- label: "\uC2A4\uD06C\uB9BD\uD2B8 \uC2E4\uD589",
1483
- component: ScriptExecutorPanel,
1484
- display: true
1485
- },
1486
- {
1487
- id: "page-navigation",
1488
- label: "\uD398\uC774\uC9C0 \uC774\uB3D9",
1489
- component: PageNavigationPanel,
1490
- display: true
1491
- }
1492
- ];
1493
-
1494
- const useEnvironment = () => {
1495
- const [envInfo, setEnvInfo] = React.useState({
1496
- env: "prd"
1497
- });
1498
- React.useEffect(() => {
1499
- const { hostname } = window.location;
1500
- setEnvInfo({ env: salesFrontendUtils.getEnvironmentFromHostname(hostname) });
1501
- }, []);
1502
- return envInfo;
1503
- };
1504
-
1505
- const DebugTool = ({ onLogin, envOverride, menuItemsOverride }) => {
1226
+ context.closePath();
1227
+ setIsPainting(false);
1228
+ onEnd && onEnd();
1229
+ saveState();
1230
+ }, [isPainting, onEnd, saveState]);
1231
+ const paint = React.useCallback(
1232
+ (event) => {
1233
+ event.preventDefault();
1234
+ if (!isPainting || !contextRef.current) {
1235
+ return;
1236
+ }
1237
+ const pos = getEventPosition(event);
1238
+ if (!pos) {
1239
+ return;
1240
+ }
1241
+ const { offsetX, offsetY } = pos;
1242
+ contextRef.current.lineTo(offsetX, offsetY);
1243
+ contextRef.current.stroke();
1244
+ },
1245
+ [isPainting, getEventPosition]
1246
+ );
1506
1247
  React.useEffect(() => {
1507
- initializeConsoleLogOverride();
1248
+ if (!canvasRefState) {
1249
+ return;
1250
+ }
1251
+ canvasRefState.addEventListener("mousedown", startPainting);
1252
+ canvasRefState.addEventListener("mouseup", stopPainting);
1253
+ canvasRefState.addEventListener("mousemove", paint);
1254
+ canvasRefState.addEventListener("mouseleave", stopPainting);
1255
+ canvasRefState.addEventListener("touchstart", startPainting);
1256
+ canvasRefState.addEventListener("touchend", stopPainting);
1257
+ canvasRefState.addEventListener("touchmove", paint);
1258
+ canvasRefState.addEventListener("touchcancel", stopPainting);
1508
1259
  return () => {
1509
- restoreConsoleLog();
1260
+ canvasRefState.removeEventListener("mousedown", startPainting);
1261
+ canvasRefState.removeEventListener("mouseup", stopPainting);
1262
+ canvasRefState.removeEventListener("mousemove", paint);
1263
+ canvasRefState.removeEventListener("mouseleave", stopPainting);
1264
+ canvasRefState.removeEventListener("touchstart", startPainting);
1265
+ canvasRefState.removeEventListener("touchend", stopPainting);
1266
+ canvasRefState.removeEventListener("touchmove", paint);
1267
+ canvasRefState.removeEventListener("touchcancel", stopPainting);
1510
1268
  };
1511
- }, []);
1512
- const environment = useEnvironment();
1513
- const env = envOverride || environment.env;
1514
- const menuItems$1 = menuItemsOverride || menuItems;
1515
- const [isMenuOpen, setMenuOpen] = React.useState(false);
1516
- const [activeFeature, setActiveFeature] = React.useState(null);
1517
- const isVisible = ["local", "dev", "stg"].includes(env);
1518
- const handleMenuClick = (itemComponent) => {
1519
- setActiveFeature(() => itemComponent);
1520
- setMenuOpen(false);
1269
+ }, [startPainting, stopPainting, paint, canvasRefState]);
1270
+ const clear = () => {
1271
+ const context = contextRef.current;
1272
+ if (canvasRefState && context) {
1273
+ context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
1274
+ const initialDataUrl = canvasRefState.toDataURL();
1275
+ setHistory([initialDataUrl]);
1276
+ setHistoryIndex(0);
1277
+ onChange && onChange();
1278
+ }
1279
+ };
1280
+ const undo = () => {
1281
+ if (historyIndex > 0) {
1282
+ const newIndex = historyIndex - 1;
1283
+ setHistoryIndex(newIndex);
1284
+ restoreState(newIndex);
1285
+ }
1521
1286
  };
1522
- const handleCloseFeature = () => {
1523
- setActiveFeature(null);
1287
+ const redo = () => {
1288
+ if (historyIndex < history.length - 1) {
1289
+ const newIndex = historyIndex + 1;
1290
+ setHistoryIndex(newIndex);
1291
+ restoreState(newIndex);
1292
+ }
1524
1293
  };
1525
- if (!isVisible) {
1526
- return null;
1527
- }
1528
- const toggleMenu = () => {
1529
- setMenuOpen((prev) => !prev);
1530
- if (!isMenuOpen) {
1531
- setActiveFeature(null);
1294
+ const loadImage = (base64String) => {
1295
+ const context = contextRef.current;
1296
+ if (!canvasRefState || !context) {
1297
+ return;
1532
1298
  }
1299
+ const img = new Image();
1300
+ img.onload = () => {
1301
+ context.clearRect(0, 0, canvasRefState.width, canvasRefState.height);
1302
+ context.drawImage(img, 0, 0, canvasRefState.width, canvasRefState.height);
1303
+ saveState();
1304
+ };
1305
+ img.src = base64String;
1533
1306
  };
1534
- const availableMenuItems = menuItems$1.filter(
1535
- (item) => item.display && // config에서 display가 true인 항목만 필터링합니다.
1536
- // 'quick-login' 기능은 onLogin prop이 제공된 경우에만 활성화합니다.
1537
- (item.id !== "quick-login" || item.id === "quick-login" && onLogin)
1538
- );
1539
- if (activeFeature) {
1540
- const FeatureComponent = activeFeature;
1541
- return /* @__PURE__ */ jsxRuntime.jsx(FeatureComponent, { onClose: handleCloseFeature, onLogin });
1542
- }
1543
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "debug-tool-container", children: [
1544
- /* @__PURE__ */ jsxRuntime.jsx(FloatingButton, { onClick: toggleMenu }),
1545
- isMenuOpen && /* @__PURE__ */ jsxRuntime.jsx(
1546
- MenuPanel,
1547
- {
1548
- menuItems: availableMenuItems,
1549
- onMenuItemClick: handleMenuClick,
1550
- onClose: () => setMenuOpen(false)
1551
- }
1552
- )
1553
- ] });
1554
- };
1555
-
1556
- const highlightOnSearchKeyword = (originalText, targetString) => {
1557
- if (originalText?.includes(targetString)) {
1558
- const replacedText = [];
1559
- const splitText = originalText.split(targetString);
1560
- for (let i = 0; i < splitText.length; i++) {
1561
- replacedText.push(splitText[i]);
1562
- if (i !== splitText.length - 1) {
1563
- replacedText.push(/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: targetString }));
1564
- }
1307
+ const getBase64String = (imageProps) => {
1308
+ const props = { ...DEFAULT_DOWNLOAD_PROPS, ...imageProps };
1309
+ const { fileExtendsion, transparent, backgroundColor, width, height } = props;
1310
+ const originalCanvas = canvasRefState;
1311
+ if (!originalCanvas) {
1312
+ return;
1565
1313
  }
1566
- return replacedText;
1567
- }
1568
- return originalText;
1569
- };
1570
-
1571
- const cx$7 = classNames.bind(styles$4);
1572
- const { InputBox, Input } = salesFrontendDesignSystem.FormCore;
1573
- const AddressSearchInitialText = () => {
1574
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1575
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$7("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
1576
- /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$7("guide"), children: [
1577
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1578
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
1579
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1580
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) \uC5EC\uC758\uB3C4\uB3D9, \uC5ED\uC0BC\uB3D9" }),
1581
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC6B0\uD3B8\uBC88\uD638 \uB2E4\uC12F\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1582
- /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 07345, 06232" })
1583
- ] })
1584
- ] });
1585
- };
1586
- const AddressSearchResult = ({
1587
- addressSearchList,
1588
- onChange,
1589
- searchKeyword,
1590
- selectedAddress
1591
- }) => {
1592
- const [filterList, setFilterList] = React.useState([]);
1593
- React.useEffect(() => {
1594
- const filterList2 = addressSearchList.filter(
1595
- (item) => item.address.includes(searchKeyword) || item.oldAddress.includes(searchKeyword)
1596
- ) || [];
1597
- setFilterList(filterList2);
1598
- }, [addressSearchList, searchKeyword]);
1599
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1600
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$7("guide-title"), children: [
1601
- "\uCD1D ",
1602
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filterList.length }),
1603
- "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1604
- ] }),
1605
- filterList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1606
- salesFrontendDesignSystem.RadioGroup,
1607
- {
1608
- items: filterList.map((item) => ({
1609
- value: item.address,
1610
- select: item.address === selectedAddress?.address && item.zipCode === selectedAddress?.zipCode,
1611
- label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$7("search-result"), children: [
1612
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$7("zipcode"), children: [
1613
- " ",
1614
- highlightOnSearchKeyword(item.zipCode, searchKeyword)
1615
- ] }),
1616
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$7("divider") }),
1617
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$7("address-info"), children: [
1618
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$7("address"), children: highlightOnSearchKeyword(item.address, searchKeyword) }),
1619
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$7("old-address"), children: highlightOnSearchKeyword(item.oldAddress, searchKeyword) })
1620
- ] })
1621
- ] }),
1622
- id: item.address
1623
- })),
1624
- className: cx$7("radio-group"),
1625
- name: "address-search",
1626
- size: "medium",
1627
- defaultValue: "",
1628
- onChange
1314
+ const tempCanvas = document.createElement("canvas");
1315
+ tempCanvas.width = width;
1316
+ tempCanvas.height = height;
1317
+ const tempCtx = tempCanvas.getContext("2d");
1318
+ if (tempCtx) {
1319
+ if (!transparent) {
1320
+ tempCtx.fillStyle = backgroundColor || "white";
1321
+ tempCtx.fillRect(0, 0, width, height);
1629
1322
  }
1630
- ),
1631
- filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1632
- "`",
1633
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
1634
- "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
1635
- ] })
1636
- ] });
1637
- };
1638
- const AddressSearchDetailInput = ({
1639
- selectedAddress,
1640
- onDetailChange,
1641
- step,
1642
- detailAddressInput
1643
- }) => {
1644
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1645
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1646
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1647
- " ",
1648
- selectedAddress.zipCode
1649
- ] }),
1650
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1651
- "|",
1652
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: `${selectedAddress.address}` })
1653
- ] })
1654
- ] }),
1655
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1656
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { id: "detail", style: { width: "90px" }, children: "\uC0C1\uC138\uC8FC\uC18C" }),
1657
- /* @__PURE__ */ jsxRuntime.jsx(
1658
- Input,
1659
- {
1660
- placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
1661
- onChange: onDetailChange,
1662
- size: "large",
1663
- value: detailAddressInput,
1664
- ...step === "detail-input" && { autoFocus: true }
1665
- }
1666
- )
1667
- ] })
1668
- ] });
1669
- };
1670
- function AddressComponent({ isOpen, onClose, setValue }) {
1671
- const {
1672
- onAddressSearchClear,
1673
- addressSearchKeyword,
1674
- addressSearchStep,
1675
- onAddressSearchNext,
1676
- nextButtonDisabled,
1677
- detailAddressInput,
1678
- addressSearchList,
1679
- onSearch,
1680
- onKeyUp,
1681
- onSelectChange,
1682
- setDetail,
1683
- search,
1684
- searchInput,
1685
- selectedAddress
1686
- } = useSearchAddress({
1687
- setValue,
1688
- onClose,
1689
- isOpen
1690
- });
1691
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
1692
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
1693
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1694
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
1695
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1696
- /* @__PURE__ */ jsxRuntime.jsx(
1697
- InputBox,
1698
- {
1699
- clearable: true,
1700
- endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: search }),
1701
- onClear: onAddressSearchClear,
1702
- children: /* @__PURE__ */ jsxRuntime.jsx(
1703
- Input,
1704
- {
1705
- ...addressSearchStep !== "detail-input" && { autoFocus: true },
1706
- onChange: onSearch,
1707
- onKeyUp,
1708
- value: searchInput,
1709
- placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
1710
- size: "large"
1711
- }
1712
- )
1713
- }
1714
- ),
1715
- addressSearchStep === "initial" && /* @__PURE__ */ jsxRuntime.jsx(AddressSearchInitialText, {}),
1716
- addressSearchStep === "search-result" && /* @__PURE__ */ jsxRuntime.jsx(
1717
- AddressSearchResult,
1718
- {
1719
- onChange: onSelectChange,
1720
- addressSearchList: addressSearchList || [],
1721
- searchKeyword: addressSearchKeyword,
1722
- selectedAddress
1723
- }
1724
- ),
1725
- addressSearchStep === "detail-input" && selectedAddress && /* @__PURE__ */ jsxRuntime.jsx(
1726
- AddressSearchDetailInput,
1727
- {
1728
- selectedAddress,
1729
- onDetailChange: setDetail,
1730
- step: addressSearchStep,
1731
- detailAddressInput
1732
- }
1733
- )
1734
- ] }),
1735
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxRuntime.jsxs(
1736
- salesFrontendDesignSystem.Button,
1737
- {
1738
- onClick: onAddressSearchNext,
1739
- variant: "primary",
1740
- size: "medium",
1741
- appearance: "filled",
1742
- width: "full",
1743
- disabled: nextButtonDisabled,
1744
- children: [
1745
- addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
1746
- addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
1747
- ]
1748
- }
1749
- ) })
1750
- ] })
1751
- ] }) });
1752
- }
1753
-
1754
- function useSearchAddress({ setValue, onClose, isOpen }) {
1755
- const [searchKeyword, setSearchKeyword] = React.useState("");
1756
- const [step, setStep] = React.useState("initial");
1757
- const [selectedAddress, setSelectedAddress] = React.useState(null);
1758
- const [searchInput, setSearchInput] = React.useState("");
1759
- const [detailAddressInput, setDetailAddressInput] = React.useState("");
1760
- const { data: addressList } = method.useSearchModalAddressQuery({ searchKeyword });
1761
- const [nextButtonDisabled, setNextButtonDisabled] = React.useState(false);
1762
- const onNext = () => {
1763
- if (step === "search-result") {
1764
- setStep("detail-input");
1765
- setNextButtonDisabled(true);
1766
- } else {
1767
- setValue({
1768
- address: selectedAddress?.address || "",
1769
- oldAddress: selectedAddress?.oldAddress || "",
1770
- zipCode: selectedAddress?.zipCode || "",
1771
- detail: detailAddressInput || ""
1772
- });
1773
- onClose();
1323
+ tempCtx.drawImage(originalCanvas, 0, 0, width, height);
1324
+ return tempCanvas.toDataURL(`image/${fileExtendsion}`);
1774
1325
  }
1775
1326
  };
1776
- const onSearch = (e) => {
1777
- const typeStr = e.target.value;
1778
- setSearchInput(typeStr);
1779
- };
1780
- const search = () => {
1781
- if (searchInput === "") {
1782
- onClear();
1327
+ const download = (downloadProps) => {
1328
+ const props = { ...DEFAULT_DOWNLOAD_PROPS, ...downloadProps };
1329
+ const { fileName, fileExtendsion, transparent, backgroundColor, width, height } = props;
1330
+ const originalCanvas = canvasRefState;
1331
+ if (!originalCanvas) {
1783
1332
  return;
1784
1333
  }
1785
- if (searchInput && searchInput.length > 1) {
1786
- setSearchKeyword(searchInput);
1787
- setStep("search-result");
1788
- setSelectedAddress(null);
1789
- setDetailAddressInput("");
1790
- setNextButtonDisabled(true);
1334
+ const tempCanvas = document.createElement("canvas");
1335
+ tempCanvas.width = width;
1336
+ tempCanvas.height = height;
1337
+ const tempCtx = tempCanvas.getContext("2d");
1338
+ if (tempCtx) {
1339
+ if (!transparent) {
1340
+ tempCtx.fillStyle = backgroundColor || "white";
1341
+ tempCtx.fillRect(0, 0, width, height);
1342
+ }
1343
+ tempCtx.drawImage(originalCanvas, 0, 0, width, height);
1344
+ const link = document.createElement("a");
1345
+ link.download = `${fileName}.${fileExtendsion}`;
1346
+ link.href = tempCanvas.toDataURL(`image/${fileExtendsion}`);
1347
+ link.click();
1791
1348
  }
1792
1349
  };
1793
- const onKeyUp = (e) => {
1794
- if (e.key === "Enter") {
1795
- search();
1350
+ const isCanvasBlank = () => {
1351
+ if (!canvasRefState) {
1352
+ return true;
1796
1353
  }
1797
- };
1798
- const onSelectChange = (e) => {
1799
- const selectedAddress2 = e.target.value;
1800
- if (selectedAddress2) {
1801
- const adr = addressList?.find((addr) => {
1802
- return addr.address === selectedAddress2;
1803
- });
1804
- setSelectedAddress(adr || null);
1805
- setNextButtonDisabled(false);
1354
+ const { width, height } = canvasRefState;
1355
+ const ctx = canvasRefState.getContext("2d");
1356
+ if (!ctx) {
1357
+ console.error("2D context not available");
1358
+ return true;
1806
1359
  }
1807
- };
1808
- const onClear = React.useCallback(() => {
1809
- setSearchKeyword("");
1810
- setSearchInput("");
1811
- setSelectedAddress(null);
1812
- setDetailAddressInput("");
1813
- setStep("initial");
1814
- }, []);
1815
- const setDetail = (e) => {
1816
- const detail = e.target.value;
1817
- setDetailAddressInput(detail);
1818
- if (detail) {
1819
- setNextButtonDisabled(false);
1820
- } else {
1821
- setNextButtonDisabled(true);
1360
+ const imageData = ctx.getImageData(0, 0, width, height);
1361
+ const { data } = imageData;
1362
+ for (let i = 0; i < data.length; i += 4) {
1363
+ if (data[i + 3] !== 0) {
1364
+ return false;
1365
+ }
1822
1366
  }
1367
+ return true;
1823
1368
  };
1824
- React.useEffect(() => {
1825
- if (isOpen) {
1826
- setSelectedAddress(null);
1827
- setDetailAddressInput("");
1828
- setStep("initial");
1829
- setSearchKeyword("");
1830
- }
1831
- }, [isOpen]);
1832
1369
  return {
1833
- onAddressSearchClear: onClear,
1834
- onAddressSearchNext: onNext,
1835
- addressSearchKeyword: searchKeyword,
1836
- addressSearchList: addressList,
1837
- addressSearchStep: step,
1838
- selectedAddress,
1839
- addressSearchOnValueChange: onSelectChange,
1840
- nextButtonDisabled,
1841
- detailAddressInput,
1842
- onSearch,
1843
- onKeyUp,
1844
- onSelectChange,
1845
- setDetail,
1846
- search,
1847
- searchInput
1370
+ clear,
1371
+ undo,
1372
+ redo,
1373
+ loadImage,
1374
+ download,
1375
+ getBase64String,
1376
+ isCanvasBlank,
1377
+ setCanvasRefState,
1378
+ canvasRefState
1848
1379
  };
1849
1380
  }
1850
- const useAddressComponent = () => {
1851
- const [fullAddress, setFullAddress] = React.useState(null);
1852
- const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
1853
- const AddressSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
1854
- return {
1855
- fullAddress,
1856
- openModal,
1857
- AddressSearchComponent
1858
- };
1859
- };
1860
1381
 
1861
- const cx$6 = classNames.bind(styles$5);
1862
- const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
1863
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("grade-section"), children: [
1864
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("icon-title"), children: [
1865
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/grade" }),
1866
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-title5 text-body", children: "\uB4F1\uAE09" })
1867
- ] }),
1868
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "typo-body2 text-body_3", children: "\uC9C1\uC885, \uC6B4\uC804 \uC5EC\uBD80 \uC120\uD0DD\uC2DC \uC790\uB3D9\uC73C\uB85C \uC0B0\uC815\uB429\uB2C8\uB2E4." }),
1869
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("grade-list"), children: [
1870
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("grade"), children: [
1871
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC704\uD5D8\uB4F1\uAE09" }),
1872
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: riskGrade || "-" })
1873
- ] }),
1874
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("grade"), children: [
1875
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC785\uC6D0\uB4F1\uAE09" }),
1876
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: hospitalizationGrade || "-" })
1877
- ] })
1382
+ const testSignatureBase64Data = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAABkCAYAAACoy2Z3AAAQAElEQVR4AeydV6g2ORnHj733smvBiliws9jbhYoFREVQsYIFVBBRUBQRvbCgKIgFCyqoCCqiXiioN/ZesKEXYlkVXV11Xdde/z+/L/u95z0zSeadlmT+h+RkJvMkeZ5/kudJm3kveeQ/I1AvAncX67+S/+8B/glKM6X7uzIbwofI7YxA3QjYgNRdf1vl/p4S/Dz5L8qfLT/UfVkJLpSfymE8LjtVZs7HCNSCgA1ILTVlPkHg4/r3Z/nPy19XPteh4En7ICW4sjwzl48qHOMwQP9RBsw6hhoP0h0dKbGdEagZARuQmmuvfd6fLhF/Kv9veRT1gxVeUT7HMUN5nwjvKn95+YfKf0IeA6RglIOfqyiHS8jnun+IEHr8pXRtZwSqR8AGpPoqbE6Ar0miv8pjMN6q8Mbyue30t6J9vjxKmqWtx+n6q/JTOWYy8JXDz67BgJ/LTcWE8zECpSCQ0xFK4XWPD982gsBLJMfv5VHM+HN0zYxBQbY7V5S3l2dZ6zUKp3bMWuAtd6nqn2LABkMg2LWNgA1I2/VbqnTvFmP/kkcpv0zhNeQPcT9SolvIM0v5rsKpXTAcuctmyMPMI9fQTM2v8zMCiyJgA7Io3JstjKUolpcYmaNkOUJ76D4A6X8oJK8vj/HAiOhyUjfUcDCDYpmK/rSJmcekaDuzahGgwVfLvBkvFoEPiTNOGqHs8WyGX1txl5Y/xGF4vqWEN5Knzd5aIe9/KJjUYdTgd8iMA8NxrUm5cGZGoBIE6IyVsGo2K0DgXeIRBfxIhShWBQc7Nqw/otTkw5LQnXX9c/k5HKeq4Jtltdz84c/9Jxct0zWJgDvAGtXaXpm/kUgo4CcrHONYCnqeMsBosJH+CF3P5cJJL/ge0g8wHIG/uXhzvkagCgSGdJwqBDKTiyDA+xi7Cvg6B5bKhvNXlBaFjGcp6HW6n9sx48BADSnnLyKGx6HplMzOC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RaBMBG5A269VSGQEjYARmR8AGZHaIXYARMAJGoE0EajAgbSJvqYyAETAClSNgA1J5BZp9I2AEjMBaCNiArIW8yzUCNSBgHo1ABAEbkAg4fmQEjIARMAL9CNiA9GPjJ0bACBgBIxBBwAYkAs74R87BCBgBI9AuAjYg7datJTMCRsAIzIqADcis8DpzI2AE1kLA5c6PwP8AAAD//+3/3TsAAAAGSURBVAMAJI6e9smFlTAAAAAASUVORK5CYII=";
1383
+
1384
+ const cx$3 = classNames.bind(styles$3);
1385
+ const { InputBox, Input } = salesFrontendDesignSystem.FormCore;
1386
+ const AddressSearchInitialText = () => {
1387
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1388
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$3("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
1389
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$3("guide"), children: [
1390
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1391
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
1392
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1393
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) \uC5EC\uC758\uB3C4\uB3D9, \uC5ED\uC0BC\uB3D9" }),
1394
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC6B0\uD3B8\uBC88\uD638 \uB2E4\uC12F\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
1395
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 07345, 06232" })
1878
1396
  ] })
1879
1397
  ] });
1880
1398
  };
1881
-
1882
- const JOB_SEARCH_TABS = [
1883
- { value: "jobName", label: "\uC9C1\uC885\uBA85 \uAC80\uC0C9" },
1884
- { value: "jobCode", label: "\uBD84\uB958\uB85C \uAC80\uC0C9" }
1885
- ];
1886
-
1887
- const cx$5 = classNames.bind(styles$6);
1888
- function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
1889
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$5("category-section"), children: [
1890
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$5("result-title"), children: [
1891
- "\uCD1D ",
1892
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
1893
- "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1894
- ] }),
1895
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$5("job-radio-root"), onToggle: () => {
1896
- }, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
1897
- salesFrontendDesignSystem.Accordion.Item,
1898
- {
1899
- id: `item-${job.occupationIndustryCode}-${index}-accordion`,
1900
- children: [
1901
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Radio.Item, { size: "small", value: job.occupationIndustryCode, onChange: () => onJobSelect(job), children: [
1902
- highlightOnSearchKeyword(job.occupationIndustryName, searchTerm),
1903
- "(",
1904
- job.occupationIndustryCode,
1905
- ")"
1906
- ] }) }) }),
1907
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
1908
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1909
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
1910
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
1911
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
1912
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
1913
- ] }),
1914
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1915
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
1916
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
1917
- "2\uD589 1\uBC88\uC9F8 ",
1918
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
1919
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
1920
- ] }) })
1921
- ] })
1922
- ] }) }) })
1923
- ]
1924
- },
1925
- `item-${job.occupationIndustryCode}-${index}`
1926
- )) }) }),
1927
- filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1928
- "`",
1929
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
1930
- "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
1931
- ] })
1932
- ] }) });
1933
- }
1934
-
1935
- const cx$4 = classNames.bind(styles$6);
1936
- function JobSearchFavorite({ filteredJobs, onJobSelect }) {
1937
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$4("popular-jobs"), children: [
1938
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
1939
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$4("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
1940
- salesFrontendDesignSystem.Accordion.Item,
1941
- {
1942
- id: `item-${job.occupationIndustryCode}-${index}`,
1943
- className: cx$4("accordion-item"),
1944
- children: [
1945
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { className: cx$4("accordion-header-item"), children: /* @__PURE__ */ jsxRuntime.jsxs(
1946
- salesFrontendDesignSystem.Radio.Item,
1947
- {
1948
- size: "small",
1949
- value: job.occupationIndustryCode,
1950
- onChange: () => onJobSelect(job),
1951
- className: cx$4("radio-item"),
1952
- children: [
1953
- job.occupationIndustryName,
1954
- "(",
1955
- job.occupationIndustryCode,
1956
- ")"
1957
- ]
1958
- }
1959
- ) }),
1960
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: "\uD56D\uBAA9 1 \uB0B4\uC6A9" })
1961
- ]
1962
- },
1963
- `item-${job.occupationIndustryCode}-${index}`
1964
- )) }) })
1965
- ] }) });
1966
- }
1967
-
1968
- const cx$3 = classNames.bind(styles$6);
1969
- function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
1970
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("popular-jobs"), children: [
1971
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$3("result-title"), children: [
1399
+ const AddressSearchResult = ({
1400
+ addressSearchList,
1401
+ onChange,
1402
+ searchKeyword,
1403
+ selectedAddress
1404
+ }) => {
1405
+ const [filterList, setFilterList] = React.useState([]);
1406
+ React.useEffect(() => {
1407
+ const filterList2 = addressSearchList.filter(
1408
+ (item) => item.address.includes(searchKeyword) || item.oldAddress.includes(searchKeyword)
1409
+ ) || [];
1410
+ setFilterList(filterList2);
1411
+ }, [addressSearchList, searchKeyword]);
1412
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1413
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$3("guide-title"), children: [
1972
1414
  "\uCD1D ",
1973
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
1415
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filterList.length }),
1974
1416
  "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
1975
1417
  ] }),
1976
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "job-selection", size: "small", className: cx$3("job-radio-root"), children: filteredJobs.map((job) => /* @__PURE__ */ jsxRuntime.jsxs(
1977
- salesFrontendDesignSystem.Accordion.Item,
1418
+ filterList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1419
+ salesFrontendDesignSystem.RadioGroup,
1978
1420
  {
1979
- id: `item-${job.occupationIndustryCode}`,
1980
- children: [
1981
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1982
- salesFrontendDesignSystem.Radio.Item,
1983
- {
1984
- id: `item-${job.occupationIndustryCode}`,
1985
- size: "small",
1986
- value: job.occupationIndustryCode,
1987
- onChange: () => {
1988
- onJobSelect(job);
1989
- },
1990
- children: highlightOnSearchKeyword(job.occupationIndustryName, searchTerm)
1991
- }
1992
- ) }) }),
1993
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
1994
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
1995
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
1996
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
1997
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
1998
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
1421
+ items: filterList.map((item) => ({
1422
+ value: item.address,
1423
+ select: item.address === selectedAddress?.address && item.zipCode === selectedAddress?.zipCode,
1424
+ label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("search-result"), children: [
1425
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("zipcode"), children: [
1426
+ " ",
1427
+ highlightOnSearchKeyword(item.zipCode, searchKeyword)
1999
1428
  ] }),
2000
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
2001
- /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
2002
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
2003
- "2\uD589 1\uBC88\uC9F8 ",
2004
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
2005
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
2006
- ] }) })
1429
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$3("divider") }),
1430
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("address-info"), children: [
1431
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$3("address"), children: highlightOnSearchKeyword(item.address, searchKeyword) }),
1432
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$3("old-address"), children: highlightOnSearchKeyword(item.oldAddress, searchKeyword) })
2007
1433
  ] })
2008
- ] }) }) })
2009
- ]
2010
- },
2011
- job.occupationIndustryCode
2012
- )) }) }),
2013
- filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1434
+ ] }),
1435
+ id: item.address
1436
+ })),
1437
+ className: cx$3("radio-group"),
1438
+ name: "address-search",
1439
+ size: "medium",
1440
+ defaultValue: "",
1441
+ onChange
1442
+ }
1443
+ ),
1444
+ filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2014
1445
  "`",
2015
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
1446
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
2016
1447
  "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
2017
1448
  ] })
2018
- ] }) });
2019
- }
2020
-
2021
- const { TextField } = salesFrontendDesignSystem.FormField;
2022
- const cx$2 = classNames.bind(styles$6);
2023
- const { Option } = salesFrontendDesignSystem.Select;
2024
- function JobSearch({
2025
- activeTab,
2026
- onTabChange,
2027
- searchTerm,
2028
- setSearchInput,
2029
- filteredJobs,
2030
- onJobSelect,
2031
- setSearchTerm,
2032
- searchInput,
2033
- firstCategory,
2034
- setFirstCategory,
2035
- secondCategory,
2036
- setSecondCategory,
2037
- firstCategoryList,
2038
- secondCategoryList
2039
- }) {
2040
- const onKeyUp = (e) => {
2041
- if (e.key === "Enter") {
2042
- setSearchTerm(searchInput);
2043
- }
2044
- };
2045
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2046
- /* @__PURE__ */ jsxRuntime.jsx(
2047
- salesFrontendDesignSystem.Tab.Root,
2048
- {
2049
- defaultValue: activeTab,
2050
- onValueChange: onTabChange,
2051
- scroll: "fixed",
2052
- size: "small",
2053
- variant: "sub",
2054
- style: { gap: 0, overflow: "visible" },
2055
- children: JOB_SEARCH_TABS.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Tab.Item, { value: tab.value, children: tab.label }, tab.value))
2056
- }
2057
- ),
1449
+ ] });
1450
+ };
1451
+ const AddressSearchDetailInput = ({
1452
+ selectedAddress,
1453
+ onDetailChange,
1454
+ step,
1455
+ detailAddressInput
1456
+ }) => {
1457
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1458
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1459
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1460
+ " ",
1461
+ selectedAddress.zipCode
1462
+ ] }),
1463
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1464
+ "|",
1465
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: `${selectedAddress.address}` })
1466
+ ] })
1467
+ ] }),
2058
1468
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2059
- activeTab === "jobName" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("favorite-jobs-section"), children: [
1469
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { id: "detail", style: { width: "90px" }, children: "\uC0C1\uC138\uC8FC\uC18C" }),
1470
+ /* @__PURE__ */ jsxRuntime.jsx(
1471
+ Input,
1472
+ {
1473
+ placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
1474
+ onChange: onDetailChange,
1475
+ size: "large",
1476
+ value: detailAddressInput,
1477
+ ...step === "detail-input" && { autoFocus: true }
1478
+ }
1479
+ )
1480
+ ] })
1481
+ ] });
1482
+ };
1483
+ function AddressComponent({ isOpen, onClose, setValue }) {
1484
+ const {
1485
+ onAddressSearchClear,
1486
+ addressSearchKeyword,
1487
+ addressSearchStep,
1488
+ onAddressSearchNext,
1489
+ nextButtonDisabled,
1490
+ detailAddressInput,
1491
+ addressSearchList,
1492
+ onSearch,
1493
+ onKeyUp,
1494
+ onSelectChange,
1495
+ setDetail,
1496
+ search,
1497
+ searchInput,
1498
+ selectedAddress
1499
+ } = useSearchAddress({
1500
+ setValue,
1501
+ onClose,
1502
+ isOpen
1503
+ });
1504
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
1505
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
1506
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1507
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
1508
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
2060
1509
  /* @__PURE__ */ jsxRuntime.jsx(
2061
- TextField,
1510
+ InputBox,
2062
1511
  {
2063
- placeholder: "\uC9C1\uC885\uBA85 \uAC80\uC0C9",
2064
- value: searchInput,
2065
- onKeyUp,
2066
- onChange: (e) => setSearchInput(e.target.value),
2067
- className: styles$6.searchInput,
2068
- size: "medium",
2069
- rootProps: {
2070
- endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: () => setSearchTerm(searchInput) }),
2071
- onClear: () => {
2072
- setSearchTerm("");
2073
- setSearchInput("");
1512
+ clearable: true,
1513
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: search }),
1514
+ onClear: onAddressSearchClear,
1515
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1516
+ Input,
1517
+ {
1518
+ ...addressSearchStep !== "detail-input" && { autoFocus: true },
1519
+ onChange: onSearch,
1520
+ onKeyUp,
1521
+ value: searchInput,
1522
+ placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
1523
+ size: "large"
2074
1524
  }
2075
- }
1525
+ )
2076
1526
  }
2077
1527
  ),
2078
- !searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchFavorite, { filteredJobs, onJobSelect }),
2079
- searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchResult, { filteredJobs, onJobSelect, searchTerm })
1528
+ addressSearchStep === "initial" && /* @__PURE__ */ jsxRuntime.jsx(AddressSearchInitialText, {}),
1529
+ addressSearchStep === "search-result" && /* @__PURE__ */ jsxRuntime.jsx(
1530
+ AddressSearchResult,
1531
+ {
1532
+ onChange: onSelectChange,
1533
+ addressSearchList: addressSearchList || [],
1534
+ searchKeyword: addressSearchKeyword,
1535
+ selectedAddress
1536
+ }
1537
+ ),
1538
+ addressSearchStep === "detail-input" && selectedAddress && /* @__PURE__ */ jsxRuntime.jsx(
1539
+ AddressSearchDetailInput,
1540
+ {
1541
+ selectedAddress,
1542
+ onDetailChange: setDetail,
1543
+ step: addressSearchStep,
1544
+ detailAddressInput
1545
+ }
1546
+ )
2080
1547
  ] }),
2081
- activeTab === "jobCode" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("select-jobs-section"), children: [
2082
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("category-section"), children: [
2083
- /* @__PURE__ */ jsxRuntime.jsx(
2084
- salesFrontendDesignSystem.Select,
2085
- {
2086
- name: "first_category",
2087
- onChange: (value) => {
2088
- setFirstCategory(value);
2089
- setSecondCategory("");
2090
- },
2091
- placeholder: "\uB300\uBD84\uB958 \uC120\uD0DD",
2092
- rootProps: {
2093
- style: {
2094
- // width: '300px'
2095
- }
2096
- },
2097
- size: "large",
2098
- value: firstCategory,
2099
- children: firstCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
2100
- }
2101
- ),
2102
- /* @__PURE__ */ jsxRuntime.jsx(
2103
- salesFrontendDesignSystem.Select,
2104
- {
2105
- name: "second_category",
2106
- onChange: setSecondCategory,
2107
- placeholder: "\uC911\uBD84\uB958 \uC120\uD0DD",
2108
- rootProps: {
2109
- style: {
2110
- // width: '300px'
2111
- }
2112
- },
2113
- size: "large",
2114
- value: secondCategory,
2115
- disabled: !firstCategory,
2116
- children: secondCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
2117
- }
2118
- )
2119
- ] }),
2120
- firstCategory && secondCategory && /* @__PURE__ */ jsxRuntime.jsx(JobSearchCategory, { filteredJobs, onJobSelect, searchTerm })
2121
- ] })
1548
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxRuntime.jsxs(
1549
+ salesFrontendDesignSystem.Button,
1550
+ {
1551
+ onClick: onAddressSearchNext,
1552
+ variant: "primary",
1553
+ size: "medium",
1554
+ appearance: "filled",
1555
+ width: "full",
1556
+ disabled: nextButtonDisabled,
1557
+ children: [
1558
+ addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
1559
+ addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
1560
+ ]
1561
+ }
1562
+ ) })
2122
1563
  ] })
2123
- ] });
2124
- }
2125
-
2126
- const initData = [
2127
- {
2128
- occupationIndustryCode: "430101",
2129
- occupationIndustryName: "\uD68C\uC0AC \uC0AC\uBB34\uC9C1 \uC885\uC0AC\uC790",
2130
- occupationTypeCode: null,
2131
- historySequence: 0
2132
- },
2133
- {
2134
- occupationIndustryCode: "400301",
2135
- occupationIndustryName: "\uACBD\uC601\uC9C0\uC6D0 \uC0AC\uBB34\uC9C1 \uAD00\uB9AC\uC790",
2136
- occupationTypeCode: null,
2137
- historySequence: 0
2138
- },
2139
- {
2140
- occupationIndustryCode: "510201",
2141
- occupationIndustryName: "\uC804\uC5C5\uC8FC\uBD80",
2142
- occupationTypeCode: null,
2143
- historySequence: 0
2144
- },
2145
- {
2146
- occupationIndustryCode: "442501",
2147
- occupationIndustryName: "\uC8FC\uBC29\uC7A5 \uBC0F \uC870\uB9AC\uC0AC(\uC120\uBC15 \uC870\uB9AC\uC0AC \uC81C\uC678)",
2148
- occupationTypeCode: null,
2149
- historySequence: 0
2150
- },
2151
- {
2152
- occupationIndustryCode: "450303",
2153
- occupationIndustryName: "\uBCF4\uD5D8\uC124\uACC4\uC0AC(\uB2F9\uC0AC)",
2154
- occupationTypeCode: null,
2155
- historySequence: 0
2156
- }
2157
- ];
2158
- const useJobSearch = () => {
2159
- const [activeTab, setActiveTab] = React.useState(JOB_SEARCH_TABS[0]?.value ?? "");
2160
- const [selectedJob, setSelectedJob] = React.useState(null);
2161
- const [searchTerm, setSearchTerm] = React.useState("");
1564
+ ] }) });
1565
+ }
1566
+
1567
+ function useSearchAddress({ setValue, onClose, isOpen }) {
1568
+ const [searchKeyword, setSearchKeyword] = React.useState("");
1569
+ const [step, setStep] = React.useState("initial");
1570
+ const [selectedAddress, setSelectedAddress] = React.useState(null);
2162
1571
  const [searchInput, setSearchInput] = React.useState("");
2163
- const handleJobSelect = (job) => {
2164
- setSelectedJob(job);
1572
+ const [detailAddressInput, setDetailAddressInput] = React.useState("");
1573
+ const { data: addressList } = method.useSearchModalAddressQuery({ searchKeyword });
1574
+ const [nextButtonDisabled, setNextButtonDisabled] = React.useState(false);
1575
+ const onNext = () => {
1576
+ if (step === "search-result") {
1577
+ setStep("detail-input");
1578
+ setNextButtonDisabled(true);
1579
+ } else {
1580
+ setValue({
1581
+ address: selectedAddress?.address || "",
1582
+ oldAddress: selectedAddress?.oldAddress || "",
1583
+ zipCode: selectedAddress?.zipCode || "",
1584
+ detail: detailAddressInput || ""
1585
+ });
1586
+ onClose();
1587
+ }
2165
1588
  };
2166
- const [firstCategory, setFirstCategory] = React.useState("");
2167
- const [secondCategory, setSecondCategory] = React.useState("");
2168
- const [jobList, setJobList] = React.useState(initData);
2169
- const [firstCategoryList, setFirstCategoryList] = React.useState([]);
2170
- const [secondCategoryList, setSecondCategoryList] = React.useState([]);
2171
- const { data } = method.useSearchOccupationQuery({
2172
- occupationMajorCategoryCode: firstCategory,
2173
- occupationSearchTypeCode: searchTerm ? "4" : "3",
2174
- occupationSubCategoryCode: secondCategory,
2175
- searchOccupationIndustryName: searchTerm
2176
- });
2177
- const { data: firstCategoryData } = method.useSearchOccupationQuery({
2178
- occupationMajorCategoryCode: "",
2179
- occupationSearchTypeCode: "1",
2180
- occupationSubCategoryCode: "",
2181
- searchOccupationIndustryName: ""
2182
- });
2183
- const { data: secondCategoryData } = method.useSearchOccupationQuery({
2184
- occupationMajorCategoryCode: firstCategory,
2185
- occupationSearchTypeCode: "2",
2186
- occupationSubCategoryCode: "",
2187
- searchOccupationIndustryName: ""
2188
- });
2189
- React.useEffect(() => {
2190
- if (data && searchTerm && activeTab === "jobName") {
2191
- const filteredJobs = data.data.occupationList.filter((job) => job.occupationIndustryName.includes(searchTerm));
2192
- setJobList(filteredJobs);
2193
- } else if (!data && searchTerm && activeTab === "jobName") {
2194
- setJobList([]);
2195
- } else if (!searchTerm && activeTab === "jobName") {
2196
- setJobList(initData);
2197
- } else if (activeTab === "jobCode" && firstCategory && secondCategory) {
2198
- setJobList(data?.data.occupationList || []);
1589
+ const onSearch = (e) => {
1590
+ const typeStr = e.target.value;
1591
+ setSearchInput(typeStr);
1592
+ };
1593
+ const search = () => {
1594
+ if (searchInput === "") {
1595
+ onClear();
1596
+ return;
2199
1597
  }
2200
- }, [searchTerm, data, firstCategory, secondCategory, secondCategoryData, activeTab]);
2201
- React.useEffect(() => {
2202
- console.log("jobList", jobList);
2203
- }, [jobList]);
2204
- React.useEffect(() => {
2205
- if (firstCategoryData) {
2206
- setFirstCategoryList(firstCategoryData.data.occupationList);
1598
+ if (searchInput && searchInput.length > 1) {
1599
+ setSearchKeyword(searchInput);
1600
+ setStep("search-result");
1601
+ setSelectedAddress(null);
1602
+ setDetailAddressInput("");
1603
+ setNextButtonDisabled(true);
2207
1604
  }
2208
- }, [firstCategoryData]);
2209
- React.useEffect(() => {
2210
- if (secondCategoryData) {
2211
- setSecondCategoryList(secondCategoryData.data.occupationList);
1605
+ };
1606
+ const onKeyUp = (e) => {
1607
+ if (e.key === "Enter") {
1608
+ search();
2212
1609
  }
2213
- }, [secondCategoryData]);
2214
- return {
2215
- activeTab,
2216
- setActiveTab,
2217
- selectedJob,
2218
- searchTerm,
2219
- setSearchTerm,
2220
- handleJobSelect,
2221
- filteredJobs: jobList,
2222
- searchInput,
2223
- setSearchInput,
2224
- firstCategory,
2225
- setFirstCategory,
2226
- secondCategory,
2227
- setSecondCategory,
2228
- secondCategoryList,
2229
- firstCategoryList
2230
1610
  };
2231
- };
2232
- function useJobSearchModal() {
2233
- const {
2234
- activeTab,
2235
- setActiveTab,
2236
- searchTerm,
2237
- setSearchTerm,
2238
- filteredJobs,
2239
- handleJobSelect,
2240
- selectedJob,
2241
- searchInput,
2242
- setSearchInput,
2243
- firstCategory,
2244
- setFirstCategory,
2245
- secondCategory,
2246
- setSecondCategory,
2247
- firstCategoryList,
2248
- secondCategoryList
2249
- } = useJobSearch();
2250
- const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState();
2251
- const onTabChange = (value) => {
2252
- setSearchTerm("");
2253
- setFirstCategory("");
2254
- setSecondCategory("");
2255
- setActiveTab(value);
1611
+ const onSelectChange = (e) => {
1612
+ const selectedAddress2 = e.target.value;
1613
+ if (selectedAddress2) {
1614
+ const adr = addressList?.find((addr) => {
1615
+ return addr.address === selectedAddress2;
1616
+ });
1617
+ setSelectedAddress(adr || null);
1618
+ setNextButtonDisabled(false);
1619
+ }
1620
+ };
1621
+ const onClear = React.useCallback(() => {
1622
+ setSearchKeyword("");
1623
+ setSearchInput("");
1624
+ setSelectedAddress(null);
1625
+ setDetailAddressInput("");
1626
+ setStep("initial");
1627
+ }, []);
1628
+ const setDetail = (e) => {
1629
+ const detail = e.target.value;
1630
+ setDetailAddressInput(detail);
1631
+ if (detail) {
1632
+ setNextButtonDisabled(false);
1633
+ } else {
1634
+ setNextButtonDisabled(true);
1635
+ }
2256
1636
  };
1637
+ React.useEffect(() => {
1638
+ if (isOpen) {
1639
+ setSelectedAddress(null);
1640
+ setDetailAddressInput("");
1641
+ setStep("initial");
1642
+ setSearchKeyword("");
1643
+ }
1644
+ }, [isOpen]);
2257
1645
  return {
2258
- JobSearchModal: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
2259
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
2260
- /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
2261
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
2262
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { raw: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2263
- JobSearch,
2264
- {
2265
- firstCategory,
2266
- firstCategoryList,
2267
- secondCategoryList,
2268
- setFirstCategory,
2269
- secondCategory,
2270
- activeTab,
2271
- onTabChange,
2272
- searchTerm,
2273
- setSearchInput,
2274
- filteredJobs: filteredJobs || [],
2275
- onJobSelect: handleJobSelect,
2276
- searchInput,
2277
- setSearchTerm,
2278
- setSecondCategory
2279
- }
2280
- ) }),
2281
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: closeModal, children: "\uD655\uC778" }) })
2282
- ] })
2283
- ] }),
2284
- JobSearchComponent: /* @__PURE__ */ jsxRuntime.jsx(
2285
- JobSearch,
2286
- {
2287
- firstCategoryList,
2288
- secondCategoryList,
2289
- firstCategory,
2290
- setFirstCategory,
2291
- secondCategory,
2292
- setSecondCategory,
2293
- activeTab,
2294
- onTabChange,
2295
- searchTerm,
2296
- setSearchInput,
2297
- filteredJobs: filteredJobs || [],
2298
- onJobSelect: handleJobSelect,
2299
- searchInput,
2300
- setSearchTerm
2301
- }
2302
- ),
2303
- isJobSearchOpen: isOpen,
2304
- openJobSearchModal: openModal,
2305
- closeJobSearchModal: closeModal,
2306
- selectedJob
1646
+ onAddressSearchClear: onClear,
1647
+ onAddressSearchNext: onNext,
1648
+ addressSearchKeyword: searchKeyword,
1649
+ addressSearchList: addressList,
1650
+ addressSearchStep: step,
1651
+ selectedAddress,
1652
+ addressSearchOnValueChange: onSelectChange,
1653
+ nextButtonDisabled,
1654
+ detailAddressInput,
1655
+ onSearch,
1656
+ onKeyUp,
1657
+ onSelectChange,
1658
+ setDetail,
1659
+ search,
1660
+ searchInput
2307
1661
  };
2308
1662
  }
1663
+ const useAddressComponent = () => {
1664
+ const [fullAddress, setFullAddress] = React.useState(null);
1665
+ const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
1666
+ const AddressSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
1667
+ return {
1668
+ fullAddress,
1669
+ openModal,
1670
+ AddressSearchComponent
1671
+ };
1672
+ };
1673
+
1674
+ const cx$2 = classNames.bind(styles$4);
1675
+ const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
1676
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade-section"), children: [
1677
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("icon-title"), children: [
1678
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/grade" }),
1679
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-title5 text-body", children: "\uB4F1\uAE09" })
1680
+ ] }),
1681
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "typo-body2 text-body_3", children: "\uC9C1\uC885, \uC6B4\uC804 \uC5EC\uBD80 \uC120\uD0DD\uC2DC \uC790\uB3D9\uC73C\uB85C \uC0B0\uC815\uB429\uB2C8\uB2E4." }),
1682
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade-list"), children: [
1683
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade"), children: [
1684
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC704\uD5D8\uB4F1\uAE09" }),
1685
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: riskGrade || "-" })
1686
+ ] }),
1687
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade"), children: [
1688
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC785\uC6D0\uB4F1\uAE09" }),
1689
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: hospitalizationGrade || "-" })
1690
+ ] })
1691
+ ] })
1692
+ ] });
1693
+ };
2309
1694
 
2310
- const cx$1 = classNames.bind(styles$7);
1695
+ const cx$1 = classNames.bind(styles$5);
2311
1696
  function VehicleSearch({ vehicles, onVehicleSelect }) {
2312
1697
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$1("vehicle-search-section"), children: [
2313
1698
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uC6B4\uC804 \uCC28\uC885" }),
@@ -2373,7 +1758,7 @@ const useJobVehicleSearch = () => {
2373
1758
  };
2374
1759
  };
2375
1760
 
2376
- const cx = classNames.bind(styles$5);
1761
+ const cx = classNames.bind(styles$4);
2377
1762
  function useJobVehicleSearchModal() {
2378
1763
  const {
2379
1764
  selectedVehicle,
@@ -2466,14 +1851,28 @@ function useJobVehicleSearchModal() {
2466
1851
  };
2467
1852
  }
2468
1853
 
1854
+ const JobSearchModal = ({ onClose }) => {
1855
+ const { JobSearchComponent } = useJobSearchModal();
1856
+ return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "xlarge", children: [
1857
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
1858
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
1859
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
1860
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { raw: true, children: JobSearchComponent }),
1861
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: onClose, children: "\uD655\uC778" }) })
1862
+ ] })
1863
+ ] });
1864
+ };
1865
+
2469
1866
  exports.Attachment = Attachment;
2470
- exports.DebugTool = DebugTool;
2471
1867
  exports.FormCheckbox = FormCheckbox;
2472
1868
  exports.FormCheckboxButton = FormCheckboxButton;
2473
1869
  exports.FormDatePicker = FormDatePicker;
2474
1870
  exports.FormDateRangePicker = FormDateRangePicker;
1871
+ exports.FormSearchJobField = FormSearchJobField;
2475
1872
  exports.FormSegmentGroup = FormSegmentGroup;
1873
+ exports.FormSelect = FormSelect;
2476
1874
  exports.FormTextField = FormTextField;
1875
+ exports.JobSearchModal = JobSearchModal;
2477
1876
  exports.StepIndicator = StepIndicator;
2478
1877
  exports.resize = resize;
2479
1878
  exports.testSignatureBase64Data = testSignatureBase64Data;