sales-frontend-components 0.0.66 → 0.0.68

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,12 +4,17 @@ 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');
7
+ var method = require('sales-frontend-api/method');
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('./debug-tool/debug-tool.module.scss');
10
12
  var salesFrontendUtils = require('sales-frontend-utils');
11
13
  var salesFrontendApi = require('sales-frontend-api');
12
- var styles$3 = require('./debug-tool/features/network-log/network-log.module.scss');
14
+ var styles$4 = require('./debug-tool/features/network-log/network-log.module.scss');
15
+ var styles$5 = require('./modal/standard/address-search/select-address.module.scss');
16
+ var styles$6 = require('./modal/pre-standard/job-vehicle-search-modal/job-vehicle-search-modal.module.scss');
17
+ var styles$7 = require('./modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss');
13
18
 
14
19
  const FormCheckboxButton = ({
15
20
  name,
@@ -19,7 +24,21 @@ const FormCheckboxButton = ({
19
24
  ...props
20
25
  }) => {
21
26
  const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
22
- return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.CheckboxButton, { ...props, ...field, id: field.name, checked: field.value, error: fieldState.invalid, children });
27
+ return /* @__PURE__ */ jsxRuntime.jsx(
28
+ salesFrontendDesignSystem.CheckboxButton,
29
+ {
30
+ ...props,
31
+ ...field,
32
+ id: field.name,
33
+ checked: field.value ?? false,
34
+ error: fieldState.invalid,
35
+ onChange: (checked) => {
36
+ field.onChange(checked);
37
+ props.onChange?.(checked);
38
+ },
39
+ children
40
+ }
41
+ );
23
42
  };
24
43
 
25
44
  const FormCheckbox = ({
@@ -97,73 +116,10 @@ const FormDateRangePicker = ({
97
116
  );
98
117
  };
99
118
 
100
- const FormSegmentGroup = ({
101
- name,
102
- control,
103
- disabled,
104
- ...props
105
- }) => {
106
- const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
107
- return /* @__PURE__ */ jsxRuntime.jsx(
108
- salesFrontendDesignSystem.SegmentGroup,
109
- {
110
- ...props,
111
- tabIndex: 0,
112
- id: field.name,
113
- ref: field.ref,
114
- defaultValue: field.value,
115
- disabled: field.disabled,
116
- error: fieldState.invalid,
117
- onBlur: field.onBlur,
118
- onValueChange: (selected) => {
119
- field.onChange(selected);
120
- props.onValueChange?.(selected);
121
- }
122
- }
123
- );
124
- };
125
-
126
- const FormTextField = ({
127
- name,
128
- control,
129
- size = "medium",
130
- disabled,
131
- error,
132
- onBlur,
133
- onChange,
134
- rootProps,
135
- ...props
136
- }) => {
137
- const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
138
- return /* @__PURE__ */ jsxRuntime.jsx(
139
- salesFrontendDesignSystem.FormField.TextField,
140
- {
141
- ...props,
142
- id: field.name,
143
- size,
144
- autoComplete: "off",
145
- name: field.name,
146
- value: field.value ?? "",
147
- disabled: field.disabled,
148
- error: fieldState.invalid || error,
149
- onChange: (e) => {
150
- field.onChange(e);
151
- onChange?.(e);
152
- },
153
- onBlur: (e) => {
154
- field.onBlur();
155
- onBlur?.(e);
156
- },
157
- rootProps: {
158
- ...rootProps,
159
- onClear: () => {
160
- field.onChange("");
161
- rootProps?.onClear?.();
162
- }
163
- }
164
- }
165
- );
166
- };
119
+ const JOB_SEARCH_TABS = [
120
+ { value: "jobName", label: "\uC9C1\uC885\uBA85 \uAC80\uC0C9" },
121
+ { value: "jobCode", label: "\uBD84\uB958\uB85C \uAC80\uC0C9" }
122
+ ];
167
123
 
168
124
  function getDefaultExportFromCjs (x) {
169
125
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -256,39 +212,671 @@ function requireBind () {
256
212
  var bindExports = requireBind();
257
213
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(bindExports);
258
214
 
259
- const cx$1 = classNames.bind(styles);
215
+ const highlightOnSearchKeyword = (originalText, targetString) => {
216
+ if (originalText?.includes(targetString)) {
217
+ const replacedText = [];
218
+ const splitText = originalText.split(targetString);
219
+ for (let i = 0; i < splitText.length; i++) {
220
+ replacedText.push(splitText[i]);
221
+ if (i !== splitText.length - 1) {
222
+ replacedText.push(/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: targetString }));
223
+ }
224
+ }
225
+ return replacedText;
226
+ }
227
+ return originalText;
228
+ };
229
+
230
+ const cx$9 = classNames.bind(styles);
231
+ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
232
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$9("category-section"), children: [
233
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$9("result-title"), children: [
234
+ "\uCD1D ",
235
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
236
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
237
+ ] }),
238
+ /* @__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: () => {
239
+ }, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxRuntime.jsxs(
240
+ salesFrontendDesignSystem.Accordion.Item,
241
+ {
242
+ id: `item-${job.occupationIndustryCode}-${index}-accordion`,
243
+ children: [
244
+ /* @__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: [
245
+ highlightOnSearchKeyword(job.occupationIndustryName, searchTerm),
246
+ "(",
247
+ job.occupationIndustryCode,
248
+ ")"
249
+ ] }) }) }),
250
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
251
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
252
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
253
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
254
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
255
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
256
+ ] }),
257
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
258
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
259
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
260
+ "2\uD589 1\uBC88\uC9F8 ",
261
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
262
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
263
+ ] }) })
264
+ ] })
265
+ ] }) }) })
266
+ ]
267
+ },
268
+ `item-${job.occupationIndustryCode}-${index}`
269
+ )) }) }),
270
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
271
+ "`",
272
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
273
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
274
+ ] })
275
+ ] }) });
276
+ }
277
+
278
+ const cx$8 = classNames.bind(styles);
279
+ function JobSearchFavorite({ filteredJobs, onJobSelect }) {
280
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$8("popular-jobs"), children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
282
+ /* @__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(
283
+ salesFrontendDesignSystem.Accordion.Item,
284
+ {
285
+ id: `item-${job.occupationIndustryCode}-${index}`,
286
+ className: cx$8("accordion-item"),
287
+ children: [
288
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { className: cx$8("accordion-header-item"), children: /* @__PURE__ */ jsxRuntime.jsxs(
289
+ salesFrontendDesignSystem.Radio.Item,
290
+ {
291
+ size: "small",
292
+ value: job.occupationIndustryCode,
293
+ onChange: () => onJobSelect(job),
294
+ className: cx$8("radio-item"),
295
+ children: [
296
+ job.occupationIndustryName,
297
+ "(",
298
+ job.occupationIndustryCode,
299
+ ")"
300
+ ]
301
+ }
302
+ ) }),
303
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: "\uD56D\uBAA9 1 \uB0B4\uC6A9" })
304
+ ]
305
+ },
306
+ `item-${job.occupationIndustryCode}-${index}`
307
+ )) }) })
308
+ ] }) });
309
+ }
310
+
311
+ const cx$7 = classNames.bind(styles);
312
+ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
313
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$7("popular-jobs"), children: [
314
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$7("result-title"), children: [
315
+ "\uCD1D ",
316
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filteredJobs.length }),
317
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
318
+ ] }),
319
+ /* @__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(
320
+ salesFrontendDesignSystem.Accordion.Item,
321
+ {
322
+ id: `item-${job.occupationIndustryCode}`,
323
+ children: [
324
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderDiv, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(
325
+ salesFrontendDesignSystem.Radio.Item,
326
+ {
327
+ id: `item-${job.occupationIndustryCode}`,
328
+ size: "small",
329
+ value: job.occupationIndustryCode,
330
+ onChange: () => {
331
+ onJobSelect(job);
332
+ },
333
+ children: highlightOnSearchKeyword(job.occupationIndustryName, searchTerm)
334
+ }
335
+ ) }) }),
336
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Table, { variant: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
337
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
338
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1" }),
339
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
340
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 1-2" }),
341
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
342
+ ] }),
343
+ /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
344
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: "\uD5E4\uB354 2" }),
345
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "d-flex-center-center", children: [
346
+ "2\uD589 1\uBC88\uC9F8 ",
347
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
348
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
349
+ ] }) })
350
+ ] })
351
+ ] }) }) })
352
+ ]
353
+ },
354
+ job.occupationIndustryCode
355
+ )) }) }),
356
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
357
+ "`",
358
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchTerm }),
359
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
360
+ ] })
361
+ ] }) });
362
+ }
363
+
364
+ const { TextField } = salesFrontendDesignSystem.FormField;
365
+ const cx$6 = classNames.bind(styles);
366
+ const { Option } = salesFrontendDesignSystem.Select;
367
+ function JobSearch({
368
+ activeTab,
369
+ onTabChange,
370
+ searchTerm,
371
+ setSearchInput,
372
+ filteredJobs,
373
+ onJobSelect,
374
+ setSearchTerm,
375
+ searchInput,
376
+ firstCategory,
377
+ setFirstCategory,
378
+ secondCategory,
379
+ setSecondCategory,
380
+ firstCategoryList,
381
+ secondCategoryList
382
+ }) {
383
+ const onKeyUp = (e) => {
384
+ if (e.key === "Enter") {
385
+ setSearchTerm(searchInput);
386
+ }
387
+ };
388
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
389
+ /* @__PURE__ */ jsxRuntime.jsx(
390
+ salesFrontendDesignSystem.Tab.Root,
391
+ {
392
+ defaultValue: activeTab,
393
+ onValueChange: onTabChange,
394
+ scroll: "fixed",
395
+ size: "small",
396
+ variant: "sub",
397
+ style: { gap: 0, overflow: "visible" },
398
+ children: JOB_SEARCH_TABS.map((tab) => /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Tab.Item, { value: tab.value, children: tab.label }, tab.value))
399
+ }
400
+ ),
401
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
402
+ activeTab === "jobName" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("favorite-jobs-section"), children: [
403
+ /* @__PURE__ */ jsxRuntime.jsx(
404
+ TextField,
405
+ {
406
+ placeholder: "\uC9C1\uC885\uBA85 \uAC80\uC0C9",
407
+ value: searchInput,
408
+ onKeyUp,
409
+ onChange: (e) => setSearchInput(e.target.value),
410
+ className: styles.searchInput,
411
+ size: "medium",
412
+ rootProps: {
413
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: () => setSearchTerm(searchInput) }),
414
+ onClear: () => {
415
+ setSearchTerm("");
416
+ setSearchInput("");
417
+ }
418
+ }
419
+ }
420
+ ),
421
+ !searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchFavorite, { filteredJobs, onJobSelect }),
422
+ searchTerm && /* @__PURE__ */ jsxRuntime.jsx(JobSearchResult, { filteredJobs, onJobSelect, searchTerm })
423
+ ] }),
424
+ activeTab === "jobCode" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("select-jobs-section"), children: [
425
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$6("category-section"), children: [
426
+ /* @__PURE__ */ jsxRuntime.jsx(
427
+ salesFrontendDesignSystem.Select,
428
+ {
429
+ name: "first_category",
430
+ onChange: (value) => {
431
+ setFirstCategory(value);
432
+ setSecondCategory("");
433
+ },
434
+ placeholder: "\uB300\uBD84\uB958 \uC120\uD0DD",
435
+ rootProps: {
436
+ style: {
437
+ // width: '300px'
438
+ }
439
+ },
440
+ size: "large",
441
+ value: firstCategory,
442
+ children: firstCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
443
+ }
444
+ ),
445
+ /* @__PURE__ */ jsxRuntime.jsx(
446
+ salesFrontendDesignSystem.Select,
447
+ {
448
+ name: "second_category",
449
+ onChange: setSecondCategory,
450
+ placeholder: "\uC911\uBD84\uB958 \uC120\uD0DD",
451
+ rootProps: {
452
+ style: {
453
+ // width: '300px'
454
+ }
455
+ },
456
+ size: "large",
457
+ value: secondCategory,
458
+ disabled: !firstCategory,
459
+ children: secondCategoryList.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
460
+ }
461
+ )
462
+ ] }),
463
+ firstCategory && secondCategory && /* @__PURE__ */ jsxRuntime.jsx(JobSearchCategory, { filteredJobs, onJobSelect, searchTerm })
464
+ ] })
465
+ ] })
466
+ ] });
467
+ }
468
+
469
+ const initData = [
470
+ {
471
+ occupationIndustryCode: "430101",
472
+ occupationIndustryName: "\uD68C\uC0AC \uC0AC\uBB34\uC9C1 \uC885\uC0AC\uC790",
473
+ occupationTypeCode: null,
474
+ historySequence: 0
475
+ },
476
+ {
477
+ occupationIndustryCode: "400301",
478
+ occupationIndustryName: "\uACBD\uC601\uC9C0\uC6D0 \uC0AC\uBB34\uC9C1 \uAD00\uB9AC\uC790",
479
+ occupationTypeCode: null,
480
+ historySequence: 0
481
+ },
482
+ {
483
+ occupationIndustryCode: "510201",
484
+ occupationIndustryName: "\uC804\uC5C5\uC8FC\uBD80",
485
+ occupationTypeCode: null,
486
+ historySequence: 0
487
+ },
488
+ {
489
+ occupationIndustryCode: "442501",
490
+ occupationIndustryName: "\uC8FC\uBC29\uC7A5 \uBC0F \uC870\uB9AC\uC0AC(\uC120\uBC15 \uC870\uB9AC\uC0AC \uC81C\uC678)",
491
+ occupationTypeCode: null,
492
+ historySequence: 0
493
+ },
494
+ {
495
+ occupationIndustryCode: "450303",
496
+ occupationIndustryName: "\uBCF4\uD5D8\uC124\uACC4\uC0AC(\uB2F9\uC0AC)",
497
+ occupationTypeCode: null,
498
+ historySequence: 0
499
+ }
500
+ ];
501
+ const useJobSearch = () => {
502
+ const [activeTab, setActiveTab] = React.useState(JOB_SEARCH_TABS[0]?.value ?? "");
503
+ const [selectedJob, setSelectedJob] = React.useState(null);
504
+ const [searchTerm, setSearchTerm] = React.useState("");
505
+ const [searchInput, setSearchInput] = React.useState("");
506
+ const handleJobSelect = (job) => {
507
+ setSelectedJob(job);
508
+ };
509
+ const [firstCategory, setFirstCategory] = React.useState("");
510
+ const [secondCategory, setSecondCategory] = React.useState("");
511
+ const [jobList, setJobList] = React.useState(initData);
512
+ const [firstCategoryList, setFirstCategoryList] = React.useState([]);
513
+ const [secondCategoryList, setSecondCategoryList] = React.useState([]);
514
+ const { data } = method.useSearchOccupationQuery({
515
+ occupationMajorCategoryCode: firstCategory,
516
+ occupationSearchTypeCode: searchTerm ? "4" : "3",
517
+ occupationSubCategoryCode: secondCategory,
518
+ searchOccupationIndustryName: searchTerm
519
+ });
520
+ const { data: firstCategoryData } = method.useSearchOccupationQuery({
521
+ occupationMajorCategoryCode: "",
522
+ occupationSearchTypeCode: "1",
523
+ occupationSubCategoryCode: "",
524
+ searchOccupationIndustryName: ""
525
+ });
526
+ const { data: secondCategoryData } = method.useSearchOccupationQuery({
527
+ occupationMajorCategoryCode: firstCategory,
528
+ occupationSearchTypeCode: "2",
529
+ occupationSubCategoryCode: "",
530
+ searchOccupationIndustryName: ""
531
+ });
532
+ React.useEffect(() => {
533
+ if (data && searchTerm && activeTab === "jobName") {
534
+ const filteredJobs = data.data.occupationList.filter((job) => job.occupationIndustryName.includes(searchTerm));
535
+ setJobList(filteredJobs);
536
+ } else if (!data && searchTerm && activeTab === "jobName") {
537
+ setJobList([]);
538
+ } else if (!searchTerm && activeTab === "jobName") {
539
+ setJobList(initData);
540
+ } else if (activeTab === "jobCode" && firstCategory && secondCategory) {
541
+ setJobList(data?.data.occupationList || []);
542
+ }
543
+ }, [searchTerm, data, firstCategory, secondCategory, secondCategoryData, activeTab]);
544
+ React.useEffect(() => {
545
+ console.log("jobList", jobList);
546
+ }, [jobList]);
547
+ React.useEffect(() => {
548
+ if (firstCategoryData) {
549
+ setFirstCategoryList(firstCategoryData.data.occupationList);
550
+ }
551
+ }, [firstCategoryData]);
552
+ React.useEffect(() => {
553
+ if (secondCategoryData) {
554
+ setSecondCategoryList(secondCategoryData.data.occupationList);
555
+ }
556
+ }, [secondCategoryData]);
557
+ return {
558
+ activeTab,
559
+ setActiveTab,
560
+ selectedJob,
561
+ searchTerm,
562
+ setSearchTerm,
563
+ handleJobSelect,
564
+ filteredJobs: jobList,
565
+ searchInput,
566
+ setSearchInput,
567
+ firstCategory,
568
+ setFirstCategory,
569
+ secondCategory,
570
+ setSecondCategory,
571
+ secondCategoryList,
572
+ firstCategoryList
573
+ };
574
+ };
575
+ function useJobSearchModal() {
576
+ const {
577
+ activeTab,
578
+ setActiveTab,
579
+ searchTerm,
580
+ setSearchTerm,
581
+ filteredJobs,
582
+ handleJobSelect,
583
+ selectedJob,
584
+ searchInput,
585
+ setSearchInput,
586
+ firstCategory,
587
+ setFirstCategory,
588
+ secondCategory,
589
+ setSecondCategory,
590
+ firstCategoryList,
591
+ secondCategoryList
592
+ } = useJobSearch();
593
+ const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState();
594
+ const onTabChange = (value) => {
595
+ setSearchTerm("");
596
+ setFirstCategory("");
597
+ setSecondCategory("");
598
+ setActiveTab(value);
599
+ };
600
+ return {
601
+ JobSearchModal: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
602
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
603
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
604
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
605
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { raw: true, children: /* @__PURE__ */ jsxRuntime.jsx(
606
+ JobSearch,
607
+ {
608
+ firstCategory,
609
+ firstCategoryList,
610
+ secondCategoryList,
611
+ setFirstCategory,
612
+ secondCategory,
613
+ activeTab,
614
+ onTabChange,
615
+ searchTerm,
616
+ setSearchInput,
617
+ filteredJobs: filteredJobs || [],
618
+ onJobSelect: handleJobSelect,
619
+ searchInput,
620
+ setSearchTerm,
621
+ setSecondCategory
622
+ }
623
+ ) }),
624
+ /* @__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" }) })
625
+ ] })
626
+ ] }),
627
+ JobSearchComponent: /* @__PURE__ */ jsxRuntime.jsx(
628
+ JobSearch,
629
+ {
630
+ firstCategoryList,
631
+ secondCategoryList,
632
+ firstCategory,
633
+ setFirstCategory,
634
+ secondCategory,
635
+ setSecondCategory,
636
+ activeTab,
637
+ onTabChange,
638
+ searchTerm,
639
+ setSearchInput,
640
+ filteredJobs: filteredJobs || [],
641
+ onJobSelect: handleJobSelect,
642
+ searchInput,
643
+ setSearchTerm
644
+ }
645
+ ),
646
+ isJobSearchOpen: isOpen,
647
+ openJobSearchModal: openModal,
648
+ closeJobSearchModal: closeModal,
649
+ selectedJob
650
+ };
651
+ }
652
+
653
+ const FormSearchJobField = ({
654
+ name,
655
+ control,
656
+ disabled,
657
+ rootProps,
658
+ error,
659
+ size = "medium",
660
+ placeholder = "\uC9C1\uC885 \uAC80\uC0C9",
661
+ ...props
662
+ }) => {
663
+ const [selected, setSelected] = React.useState();
664
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
665
+ const { JobSearchModal, openJobSearchModal, selectedJob } = useJobSearchModal();
666
+ React.useEffect(() => {
667
+ if (selectedJob) {
668
+ setSelected(selectedJob);
669
+ field.onChange(selectedJob.occupationIndustryCode);
670
+ props.onValueChange?.(selectedJob);
671
+ }
672
+ }, [selectedJob]);
673
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
674
+ /* @__PURE__ */ jsxRuntime.jsx(
675
+ salesFrontendDesignSystem.FormField.TextField,
676
+ {
677
+ ...props,
678
+ ...field,
679
+ id: field.name,
680
+ error: fieldState.invalid || error,
681
+ value: selected?.occupationIndustryName ?? "",
682
+ rootProps: {
683
+ ...rootProps,
684
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search" })
685
+ },
686
+ readOnly: true,
687
+ size,
688
+ placeholder,
689
+ style: { background: "#fff", cursor: "pointer" },
690
+ autoComplete: "off",
691
+ onClick: openJobSearchModal
692
+ }
693
+ ),
694
+ JobSearchModal
695
+ ] });
696
+ };
697
+
698
+ const FormSegmentGroup = ({
699
+ name,
700
+ control,
701
+ disabled,
702
+ disabledItems,
703
+ items,
704
+ ...props
705
+ }) => {
706
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
707
+ const itemList = items.map((item) => {
708
+ return {
709
+ ...item,
710
+ disabled: disabledItems?.includes(item.value)
711
+ };
712
+ });
713
+ return /* @__PURE__ */ jsxRuntime.jsx(
714
+ salesFrontendDesignSystem.SegmentGroup,
715
+ {
716
+ ...props,
717
+ tabIndex: 0,
718
+ id: field.name,
719
+ ref: field.ref,
720
+ defaultValue: field.value,
721
+ disabled: field.disabled,
722
+ error: fieldState.invalid,
723
+ onBlur: field.onBlur,
724
+ items: itemList,
725
+ onValueChange: (selected) => {
726
+ field.onChange(selected);
727
+ props.onValueChange?.(selected);
728
+ }
729
+ }
730
+ );
731
+ };
732
+
733
+ const FormSelect = ({
734
+ name,
735
+ control,
736
+ disabled,
737
+ error,
738
+ children,
739
+ ...props
740
+ }) => {
741
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
742
+ return /* @__PURE__ */ jsxRuntime.jsx(
743
+ salesFrontendDesignSystem.Select,
744
+ {
745
+ ...props,
746
+ id: field.name,
747
+ disabled: field.disabled,
748
+ error: fieldState.invalid || error,
749
+ onBlur: field.onBlur,
750
+ value: field.value,
751
+ onChange: (selected) => {
752
+ field.onChange(selected);
753
+ },
754
+ children
755
+ }
756
+ );
757
+ };
758
+ const FormSelectOption = ({ children, value, ...rest }) => {
759
+ return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Select.Option, { value, ...rest, children });
760
+ };
761
+ const FormSelectGroup = ({
762
+ options,
763
+ optionsProps,
764
+ ...props
765
+ }) => {
766
+ return /* @__PURE__ */ jsxRuntime.jsx(FormSelect, { ...props, children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(FormSelectOption, { value: option.value, ...optionsProps, children: option.label }, option.value)) });
767
+ };
768
+ FormSelect.Option = FormSelectOption;
769
+ FormSelect.Group = FormSelectGroup;
770
+
771
+ const FormTextField = ({
772
+ name,
773
+ control,
774
+ size = "medium",
775
+ disabled,
776
+ error,
777
+ onBlur,
778
+ onChange,
779
+ rootProps,
780
+ ...props
781
+ }) => {
782
+ const { field, fieldState } = reactHookForm.useController({ name, control, disabled });
783
+ return /* @__PURE__ */ jsxRuntime.jsx(
784
+ salesFrontendDesignSystem.FormField.TextField,
785
+ {
786
+ ...props,
787
+ id: field.name,
788
+ size,
789
+ autoComplete: "off",
790
+ name: field.name,
791
+ value: field.value ?? "",
792
+ disabled: field.disabled,
793
+ error: fieldState.invalid || error,
794
+ onChange: (e) => {
795
+ field.onChange(e);
796
+ onChange?.(e);
797
+ },
798
+ onBlur: (e) => {
799
+ field.onBlur();
800
+ onBlur?.(e);
801
+ },
802
+ rootProps: {
803
+ ...rootProps,
804
+ onClear: () => {
805
+ field.onChange("");
806
+ rootProps?.onClear?.();
807
+ }
808
+ }
809
+ }
810
+ );
811
+ };
812
+
813
+ const cx$5 = classNames.bind(styles$1);
260
814
  const StepIndicator = ({
261
815
  items,
262
816
  onClickItem,
263
817
  currentIndex = 0,
264
818
  defaultValue = "",
265
- dotCount = 3
819
+ dotCount = 3,
820
+ isLoading
266
821
  }) => {
822
+ const [steps, setSteps] = React.useState(
823
+ Array.from({ length: 10 }).map(() => ({ label: "-", value: "" }))
824
+ );
267
825
  const [current, setCurrent] = React.useState(currentIndex);
268
826
  React.useEffect(() => {
269
- items.map((item, idx) => {
270
- if (item.value === defaultValue) {
271
- setCurrent(idx);
272
- }
273
- });
827
+ if (items.length > 0) {
828
+ setSteps(items);
829
+ items.map((item, idx) => {
830
+ if (item.value === defaultValue) {
831
+ setCurrent(idx);
832
+ }
833
+ });
834
+ }
274
835
  }, [items, defaultValue]);
275
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$1("stepper-layout"), children: [
276
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$1("stepper"), children: items.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
836
+ const handleClickStep = (item) => {
837
+ const index = steps.findIndex((step) => step.value === item.value);
838
+ if (index === -1) {
839
+ console.error("error not found index");
840
+ return;
841
+ }
842
+ if (steps[index < 1 ? index : index - 1]?.isCompleted) {
843
+ onClickItem?.(item);
844
+ } else {
845
+ 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");
846
+ }
847
+ };
848
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$5("stepper-layout", { loading: isLoading }), children: [
849
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$5("stepper"), children: steps.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
277
850
  /* @__PURE__ */ jsxRuntime.jsx(
278
851
  "div",
279
852
  {
280
- className: cx$1("circle", (defaultValue === item.value || current === idx) && "active"),
281
- onClick: () => onClickItem?.(item),
282
- children: item.isCompleted || idx < current ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$1("completed") }) : ++idx
853
+ className: cx$5(
854
+ "circle",
855
+ { completed: item.isCompleted ?? false },
856
+ { active: defaultValue === item.value || current === idx }
857
+ ),
858
+ onClick: () => handleClickStep?.(item),
859
+ children: item.isCompleted ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$5("completed-icon") }) : idx + 1
283
860
  }
284
861
  ),
285
- idx < items.length && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$1("dot") }, `dot-${idx}-${dotIdx}`))
862
+ idx < steps.length - 1 && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$5("dot") }, `dot-${idx}-${dotIdx}`))
286
863
  ] }, `num-${idx}`)) }),
287
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$1("step-labels"), children: items.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: cx$1((defaultValue === item.value || current === idx) && "active"), children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.label ?? item.value }) }, `label-${idx}`)) })
864
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx$5("step-labels"), children: steps.map((item, idx) => /* @__PURE__ */ jsxRuntime.jsx(
865
+ "li",
866
+ {
867
+ className: cx$5(
868
+ { completed: steps[idx < 1 ? idx : idx - 1]?.isCompleted ?? false },
869
+ { active: defaultValue === item.value || current === idx }
870
+ ),
871
+ onClick: () => handleClickStep?.(item),
872
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-ellipsis", children: item.label ?? item.value })
873
+ },
874
+ `label-${idx}`
875
+ )) })
288
876
  ] });
289
877
  };
290
878
 
291
- const cx = classNames.bind(styles$1);
879
+ const cx$4 = classNames.bind(styles$2);
292
880
  function Attachment({
293
881
  photos,
294
882
  onAddPhoto,
@@ -305,14 +893,14 @@ function Attachment({
305
893
  };
306
894
  const renderPhotoSingle = () => {
307
895
  if (photos.length === 0) {
308
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx("add-photo-button-single"), onClick: handleAddPhoto, children: [
896
+ 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: [
309
897
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
310
898
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uC0AC\uC9C4 \uCCA8\uBD80\uD558\uAE30" })
311
899
  ] }) });
312
900
  }
313
- return photos.map((photo) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("single-photo-item"), children: [
314
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx("photo-image") }) }),
315
- /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
901
+ return photos.map((photo) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$4("single-photo-item"), children: [
902
+ /* @__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") }) }),
903
+ /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
316
904
  ] }, photo.id));
317
905
  };
318
906
  const renderPhotoGrid = () => {
@@ -320,12 +908,12 @@ function Attachment({
320
908
  const gridItems = [];
321
909
  if (photos.length < maxPhotos) {
322
910
  gridItems.push(
323
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxRuntime.jsxs("button", { className: cx("add-photo-button"), onClick: handleAddPhoto, children: [
911
+ /* @__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: [
324
912
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/camera" }),
325
913
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: buttonText || "\uCCA8\uBD80\uD558\uAE30" }),
326
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx("photo-count"), children: [
914
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx$4("photo-count"), children: [
327
915
  "(",
328
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("photo-count-number"), children: photos.length }),
916
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$4("photo-count-number"), children: photos.length }),
329
917
  "/",
330
918
  maxPhotos,
331
919
  ")"
@@ -335,9 +923,9 @@ function Attachment({
335
923
  }
336
924
  photos.forEach((photo) => {
337
925
  gridItems.push(
338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("photo-item"), children: [
339
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-placeholder"), children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: photo.src, alt: photo.name, className: cx("photo-image") }) }),
340
- /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
926
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$4("photo-item"), children: [
927
+ /* @__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") }) }),
928
+ /* @__PURE__ */ jsxRuntime.jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
341
929
  ] }, photo.id)
342
930
  );
343
931
  });
@@ -348,9 +936,9 @@ function Attachment({
348
936
  return null;
349
937
  }
350
938
  if (type === "single") {
351
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-single"), children: renderPhotoSingle() });
939
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-single"), children: renderPhotoSingle() });
352
940
  }
353
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
941
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$4("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
354
942
  }
355
943
 
356
944
  const maxImageSize = 3 * 1024 * 1024;
@@ -844,7 +1432,7 @@ const FloatingButton = ({ onClick }) => {
844
1432
  variant: "secondary",
845
1433
  appearance: "filled",
846
1434
  size: "xsmall",
847
- className: styles$2["debug-floating-button"],
1435
+ className: styles$3["debug-floating-button"],
848
1436
  style: {
849
1437
  transform: `translate(${position.x}px, ${position.y}px)`,
850
1438
  cursor: isDragging ? "grabbing" : "grab"
@@ -937,7 +1525,7 @@ const LogMessage = ({ entry }) => {
937
1525
  }
938
1526
  return String(part);
939
1527
  });
940
- return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${entry.type}`]}`, children: messageParts.join(" ") });
1528
+ return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: `${styles$3["log-message"]} ${styles$3[`log-${entry.type}`]}`, children: messageParts.join(" ") });
941
1529
  };
942
1530
  const ConsoleLogPanel = ({ onClose }) => {
943
1531
  const { logs, clearLogs } = useConsoleLog();
@@ -957,7 +1545,7 @@ const ConsoleLogPanel = ({ onClose }) => {
957
1545
  return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
958
1546
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "Console Logs", showCloseButton: true }),
959
1547
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
960
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["panel-toolbar"], children: [
1548
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["panel-toolbar"], children: [
961
1549
  /* @__PURE__ */ jsxRuntime.jsxs(
962
1550
  salesFrontendDesignSystem.Segment.Root,
963
1551
  {
@@ -986,8 +1574,8 @@ const ConsoleLogPanel = ({ onClose }) => {
986
1574
  }
987
1575
  )
988
1576
  ] }),
989
- /* @__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: [
990
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
1577
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-list-container"], ref: logContainerRef, children: filteredLogs.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["log-item"], children: [
1578
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$3["log-timestamp"], children: log.timestamp }),
991
1579
  /* @__PURE__ */ jsxRuntime.jsx(LogMessage, { entry: log })
992
1580
  ] }, log.id)) })
993
1581
  ] })
@@ -1014,7 +1602,7 @@ const LoginPanel = ({ onClose, onLogin }) => {
1014
1602
  }, [selectedType]);
1015
1603
  return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1016
1604
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uAC04\uD3B8 \uB85C\uADF8\uC778", showCloseButton: true }),
1017
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("form", { className: styles$2["login-form-container"], onSubmit: handleSubmit, children: [
1605
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("form", { className: styles$3["login-form-container"], onSubmit: handleSubmit, children: [
1018
1606
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.FormField.FieldControl, { children: [
1019
1607
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { htmlFor: "login-type-select", children: "\uB85C\uADF8\uC778 \uC720\uD615" }),
1020
1608
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1044,7 +1632,7 @@ const LoginPanel = ({ onClose, onLogin }) => {
1044
1632
  }
1045
1633
  )
1046
1634
  ] }, field.name)),
1047
- /* @__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" }) })
1635
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["form-actions"], children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { type: "submit", variant: "primary", appearance: "filled", size: "xsmall", children: "\uB85C\uADF8\uC778" }) })
1048
1636
  ] }) })
1049
1637
  ] }) });
1050
1638
  };
@@ -1154,7 +1742,7 @@ const NetworkLog = ({ onClose }) => {
1154
1742
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1155
1743
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uB124\uD2B8\uC6CC\uD06C \uB85C\uADF8", showCloseButton: true }),
1156
1744
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1157
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["search-container"], children: [
1745
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$4["search-container"], children: [
1158
1746
  /* @__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)) }),
1159
1747
  /* @__PURE__ */ jsxRuntime.jsx(
1160
1748
  salesFrontendDesignSystem.FormField.TextField,
@@ -1172,9 +1760,9 @@ const NetworkLog = ({ onClose }) => {
1172
1760
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { size: "xsmall", onClick: () => playAllRequests(), variant: "primary", appearance: "outline", children: "REQ Resolve" }),
1173
1761
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { size: "xsmall", onClick: () => playAllResponses(), variant: "primary", appearance: "outline", children: "RES Resolve" })
1174
1762
  ] }),
1175
- /* @__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: [
1176
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderButton, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$3["log-summary"], children: renderLogSummary(log) }) }),
1177
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-content"], children: renderLogContent(log) }) })
1763
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$4["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: [
1764
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.HeaderButton, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles$4["log-summary"], children: renderLogSummary(log) }) }),
1765
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$4["log-content"], children: renderLogContent(log) }) })
1178
1766
  ] }, index)) }) })
1179
1767
  ] })
1180
1768
  ] })
@@ -1190,7 +1778,7 @@ const PageNavigationPanel = ({ onClose }) => {
1190
1778
  };
1191
1779
  return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1192
1780
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uD398\uC774\uC9C0 \uC774\uB3D9", showCloseButton: true }),
1193
- /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["page-navigation-content"], children: [
1781
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["page-navigation-content"], children: [
1194
1782
  /* @__PURE__ */ jsxRuntime.jsx(
1195
1783
  salesFrontendDesignSystem.FormField.TextField,
1196
1784
  {
@@ -1223,7 +1811,7 @@ const ResultMessage = ({ log }) => {
1223
1811
  return String(part);
1224
1812
  });
1225
1813
  const prefix = log.type === "return" ? "\u21A9 " : "";
1226
- return /* @__PURE__ */ jsxRuntime.jsxs("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${log.type}`]}`, children: [
1814
+ return /* @__PURE__ */ jsxRuntime.jsxs("pre", { className: `${styles$3["log-message"]} ${styles$3[`log-${log.type}`]}`, children: [
1227
1815
  prefix,
1228
1816
  messageParts.join(" ")
1229
1817
  ] });
@@ -1275,26 +1863,26 @@ const ScriptExecutorPanel = ({ onClose }) => {
1275
1863
  };
1276
1864
  return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1277
1865
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC2A4\uD06C\uB9BD\uD2B8 \uC2E4\uD589", showCloseButton: true }),
1278
- /* @__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: [
1279
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-input-section"], children: [
1866
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles$3["debug-feature-panel"]} ${styles$3["script-executor-panel"]}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["script-executor-content"], children: [
1867
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["script-input-section"], children: [
1280
1868
  /* @__PURE__ */ jsxRuntime.jsx(
1281
1869
  "textarea",
1282
1870
  {
1283
- className: styles$2["script-textarea"],
1871
+ className: styles$3["script-textarea"],
1284
1872
  value: code,
1285
1873
  onChange: (e) => setCode(e.target.value),
1286
1874
  spellCheck: "false"
1287
1875
  }
1288
1876
  ),
1289
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-actions"], children: [
1877
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["script-actions"], children: [
1290
1878
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleExecute, children: "\uC2E4\uD589 (\u25B6)" }),
1291
1879
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleClear, children: "\uACB0\uACFC \uC9C0\uC6B0\uAE30" })
1292
1880
  ] })
1293
1881
  ] }),
1294
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["script-output-section"], children: [
1295
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["panel-header"], children: /* @__PURE__ */ jsxRuntime.jsx("h3", { children: "\uACB0\uACFC" }) }),
1296
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["log-list-container"], children: results.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$2["log-item"], children: [
1297
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
1882
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["script-output-section"], children: [
1883
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["panel-header"], children: /* @__PURE__ */ jsxRuntime.jsx("h3", { children: "\uACB0\uACFC" }) }),
1884
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-list-container"], children: results.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$3["log-item"], children: [
1885
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$3["log-timestamp"], children: log.timestamp }),
1298
1886
  /* @__PURE__ */ jsxRuntime.jsx(ResultMessage, { log })
1299
1887
  ] }, log.id)) })
1300
1888
  ] })
@@ -1363,11 +1951,11 @@ const ValueDisplay = ({ value }) => {
1363
1951
  try {
1364
1952
  const parsed = JSON.parse(value);
1365
1953
  if (typeof parsed === "object" && parsed !== null) {
1366
- return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: styles$2["log-content"], children: JSON.stringify(parsed, null, 2) });
1954
+ return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: styles$3["log-content"], children: JSON.stringify(parsed, null, 2) });
1367
1955
  }
1368
1956
  } catch (e) {
1369
1957
  }
1370
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["log-content"], children: value });
1958
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["log-content"], children: value });
1371
1959
  };
1372
1960
  const EditableRow = ({ item, onSave, onRemove }) => {
1373
1961
  const [isEditing, setIsEditing] = React.useState(false);
@@ -1406,7 +1994,7 @@ const StoragePanel = ({ onClose, storageType }) => {
1406
1994
  return /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
1407
1995
  /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: storageType === "localStorage" ? "Local Storage" : "Cookies", showCloseButton: true }),
1408
1996
  /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
1409
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$2["panel-toolbar"], children: /* @__PURE__ */ jsxRuntime.jsx(
1997
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$3["panel-toolbar"], children: /* @__PURE__ */ jsxRuntime.jsx(
1410
1998
  salesFrontendDesignSystem.FormField.TextField,
1411
1999
  {
1412
2000
  placeholder: "Search key or value...",
@@ -1548,17 +2136,505 @@ const DebugTool = ({ onLogin, envOverride, menuItemsOverride }) => {
1548
2136
  ] });
1549
2137
  };
1550
2138
 
2139
+ const cx$3 = classNames.bind(styles$5);
2140
+ const { InputBox, Input } = salesFrontendDesignSystem.FormCore;
2141
+ const AddressSearchInitialText = () => {
2142
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2143
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx$3("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
2144
+ /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: cx$3("guide"), children: [
2145
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2146
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
2147
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2148
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) \uC5EC\uC758\uB3C4\uB3D9, \uC5ED\uC0BC\uB3D9" }),
2149
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC6B0\uD3B8\uBC88\uD638 \uB2E4\uC12F\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2150
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: "\uC608) 07345, 06232" })
2151
+ ] })
2152
+ ] });
2153
+ };
2154
+ const AddressSearchResult = ({
2155
+ addressSearchList,
2156
+ onChange,
2157
+ searchKeyword,
2158
+ selectedAddress
2159
+ }) => {
2160
+ const [filterList, setFilterList] = React.useState([]);
2161
+ React.useEffect(() => {
2162
+ const filterList2 = addressSearchList.filter(
2163
+ (item) => item.address.includes(searchKeyword) || item.oldAddress.includes(searchKeyword)
2164
+ ) || [];
2165
+ setFilterList(filterList2);
2166
+ }, [addressSearchList, searchKeyword]);
2167
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2168
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cx$3("guide-title"), children: [
2169
+ "\uCD1D ",
2170
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: filterList.length }),
2171
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
2172
+ ] }),
2173
+ filterList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
2174
+ salesFrontendDesignSystem.RadioGroup,
2175
+ {
2176
+ items: filterList.map((item) => ({
2177
+ value: item.address,
2178
+ select: item.address === selectedAddress?.address && item.zipCode === selectedAddress?.zipCode,
2179
+ label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("search-result"), children: [
2180
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("zipcode"), children: [
2181
+ " ",
2182
+ highlightOnSearchKeyword(item.zipCode, searchKeyword)
2183
+ ] }),
2184
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx$3("divider") }),
2185
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$3("address-info"), children: [
2186
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$3("address"), children: highlightOnSearchKeyword(item.address, searchKeyword) }),
2187
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx$3("old-address"), children: highlightOnSearchKeyword(item.oldAddress, searchKeyword) })
2188
+ ] })
2189
+ ] }),
2190
+ id: item.address
2191
+ })),
2192
+ className: cx$3("radio-group"),
2193
+ name: "address-search",
2194
+ size: "medium",
2195
+ defaultValue: "",
2196
+ onChange
2197
+ }
2198
+ ),
2199
+ filterList.length === 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2200
+ "`",
2201
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: searchKeyword }),
2202
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
2203
+ ] })
2204
+ ] });
2205
+ };
2206
+ const AddressSearchDetailInput = ({
2207
+ selectedAddress,
2208
+ onDetailChange,
2209
+ step,
2210
+ detailAddressInput
2211
+ }) => {
2212
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2213
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2214
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2215
+ " ",
2216
+ selectedAddress.zipCode
2217
+ ] }),
2218
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2219
+ "|",
2220
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: `${selectedAddress.address}` })
2221
+ ] })
2222
+ ] }),
2223
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2224
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.FormField.Label, { id: "detail", style: { width: "90px" }, children: "\uC0C1\uC138\uC8FC\uC18C" }),
2225
+ /* @__PURE__ */ jsxRuntime.jsx(
2226
+ Input,
2227
+ {
2228
+ placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
2229
+ onChange: onDetailChange,
2230
+ size: "large",
2231
+ value: detailAddressInput,
2232
+ ...step === "detail-input" && { autoFocus: true }
2233
+ }
2234
+ )
2235
+ ] })
2236
+ ] });
2237
+ };
2238
+ function AddressComponent({ isOpen, onClose, setValue }) {
2239
+ const {
2240
+ onAddressSearchClear,
2241
+ addressSearchKeyword,
2242
+ addressSearchStep,
2243
+ onAddressSearchNext,
2244
+ nextButtonDisabled,
2245
+ detailAddressInput,
2246
+ addressSearchList,
2247
+ onSearch,
2248
+ onKeyUp,
2249
+ onSelectChange,
2250
+ setDetail,
2251
+ search,
2252
+ searchInput,
2253
+ selectedAddress
2254
+ } = useSearchAddress({
2255
+ setValue,
2256
+ onClose,
2257
+ isOpen
2258
+ });
2259
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
2260
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
2261
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { children: [
2262
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
2263
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Body, { children: [
2264
+ /* @__PURE__ */ jsxRuntime.jsx(
2265
+ InputBox,
2266
+ {
2267
+ clearable: true,
2268
+ endElement: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/search", onClick: search }),
2269
+ onClear: onAddressSearchClear,
2270
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2271
+ Input,
2272
+ {
2273
+ ...addressSearchStep !== "detail-input" && { autoFocus: true },
2274
+ onChange: onSearch,
2275
+ onKeyUp,
2276
+ value: searchInput,
2277
+ placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
2278
+ size: "large"
2279
+ }
2280
+ )
2281
+ }
2282
+ ),
2283
+ addressSearchStep === "initial" && /* @__PURE__ */ jsxRuntime.jsx(AddressSearchInitialText, {}),
2284
+ addressSearchStep === "search-result" && /* @__PURE__ */ jsxRuntime.jsx(
2285
+ AddressSearchResult,
2286
+ {
2287
+ onChange: onSelectChange,
2288
+ addressSearchList: addressSearchList || [],
2289
+ searchKeyword: addressSearchKeyword,
2290
+ selectedAddress
2291
+ }
2292
+ ),
2293
+ addressSearchStep === "detail-input" && selectedAddress && /* @__PURE__ */ jsxRuntime.jsx(
2294
+ AddressSearchDetailInput,
2295
+ {
2296
+ selectedAddress,
2297
+ onDetailChange: setDetail,
2298
+ step: addressSearchStep,
2299
+ detailAddressInput
2300
+ }
2301
+ )
2302
+ ] }),
2303
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxRuntime.jsxs(
2304
+ salesFrontendDesignSystem.Button,
2305
+ {
2306
+ onClick: onAddressSearchNext,
2307
+ variant: "primary",
2308
+ size: "medium",
2309
+ appearance: "filled",
2310
+ width: "full",
2311
+ disabled: nextButtonDisabled,
2312
+ children: [
2313
+ addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
2314
+ addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
2315
+ ]
2316
+ }
2317
+ ) })
2318
+ ] })
2319
+ ] }) });
2320
+ }
2321
+
2322
+ function useSearchAddress({ setValue, onClose, isOpen }) {
2323
+ const [searchKeyword, setSearchKeyword] = React.useState("");
2324
+ const [step, setStep] = React.useState("initial");
2325
+ const [selectedAddress, setSelectedAddress] = React.useState(null);
2326
+ const [searchInput, setSearchInput] = React.useState("");
2327
+ const [detailAddressInput, setDetailAddressInput] = React.useState("");
2328
+ const { data: addressList } = method.useSearchModalAddressQuery({ searchKeyword });
2329
+ const [nextButtonDisabled, setNextButtonDisabled] = React.useState(false);
2330
+ const onNext = () => {
2331
+ if (step === "search-result") {
2332
+ setStep("detail-input");
2333
+ setNextButtonDisabled(true);
2334
+ } else {
2335
+ setValue({
2336
+ address: selectedAddress?.address || "",
2337
+ oldAddress: selectedAddress?.oldAddress || "",
2338
+ zipCode: selectedAddress?.zipCode || "",
2339
+ detail: detailAddressInput || ""
2340
+ });
2341
+ onClose();
2342
+ }
2343
+ };
2344
+ const onSearch = (e) => {
2345
+ const typeStr = e.target.value;
2346
+ setSearchInput(typeStr);
2347
+ };
2348
+ const search = () => {
2349
+ if (searchInput === "") {
2350
+ onClear();
2351
+ return;
2352
+ }
2353
+ if (searchInput && searchInput.length > 1) {
2354
+ setSearchKeyword(searchInput);
2355
+ setStep("search-result");
2356
+ setSelectedAddress(null);
2357
+ setDetailAddressInput("");
2358
+ setNextButtonDisabled(true);
2359
+ }
2360
+ };
2361
+ const onKeyUp = (e) => {
2362
+ if (e.key === "Enter") {
2363
+ search();
2364
+ }
2365
+ };
2366
+ const onSelectChange = (e) => {
2367
+ const selectedAddress2 = e.target.value;
2368
+ if (selectedAddress2) {
2369
+ const adr = addressList?.find((addr) => {
2370
+ return addr.address === selectedAddress2;
2371
+ });
2372
+ setSelectedAddress(adr || null);
2373
+ setNextButtonDisabled(false);
2374
+ }
2375
+ };
2376
+ const onClear = React.useCallback(() => {
2377
+ setSearchKeyword("");
2378
+ setSearchInput("");
2379
+ setSelectedAddress(null);
2380
+ setDetailAddressInput("");
2381
+ setStep("initial");
2382
+ }, []);
2383
+ const setDetail = (e) => {
2384
+ const detail = e.target.value;
2385
+ setDetailAddressInput(detail);
2386
+ if (detail) {
2387
+ setNextButtonDisabled(false);
2388
+ } else {
2389
+ setNextButtonDisabled(true);
2390
+ }
2391
+ };
2392
+ React.useEffect(() => {
2393
+ if (isOpen) {
2394
+ setSelectedAddress(null);
2395
+ setDetailAddressInput("");
2396
+ setStep("initial");
2397
+ setSearchKeyword("");
2398
+ }
2399
+ }, [isOpen]);
2400
+ return {
2401
+ onAddressSearchClear: onClear,
2402
+ onAddressSearchNext: onNext,
2403
+ addressSearchKeyword: searchKeyword,
2404
+ addressSearchList: addressList,
2405
+ addressSearchStep: step,
2406
+ selectedAddress,
2407
+ addressSearchOnValueChange: onSelectChange,
2408
+ nextButtonDisabled,
2409
+ detailAddressInput,
2410
+ onSearch,
2411
+ onKeyUp,
2412
+ onSelectChange,
2413
+ setDetail,
2414
+ search,
2415
+ searchInput
2416
+ };
2417
+ }
2418
+ const useAddressComponent = () => {
2419
+ const [fullAddress, setFullAddress] = React.useState(null);
2420
+ const { isOpen, closeModal, openModal } = salesFrontendDesignSystem.useModalState();
2421
+ const AddressSearchComponent = () => /* @__PURE__ */ jsxRuntime.jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
2422
+ return {
2423
+ fullAddress,
2424
+ openModal,
2425
+ AddressSearchComponent
2426
+ };
2427
+ };
2428
+
2429
+ const cx$2 = classNames.bind(styles$6);
2430
+ const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
2431
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade-section"), children: [
2432
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("icon-title"), children: [
2433
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/grade" }),
2434
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-title5 text-body", children: "\uB4F1\uAE09" })
2435
+ ] }),
2436
+ /* @__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." }),
2437
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade-list"), children: [
2438
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade"), children: [
2439
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC704\uD5D8\uB4F1\uAE09" }),
2440
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: riskGrade || "-" })
2441
+ ] }),
2442
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$2("grade"), children: [
2443
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\uC785\uC6D0\uB4F1\uAE09" }),
2444
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary typo-subtitle3", children: hospitalizationGrade || "-" })
2445
+ ] })
2446
+ ] })
2447
+ ] });
2448
+ };
2449
+
2450
+ const cx$1 = classNames.bind(styles$7);
2451
+ function VehicleSearch({ vehicles, onVehicleSelect }) {
2452
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx$1("vehicle-search-section"), children: [
2453
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "\uC6B4\uC804 \uCC28\uC885" }),
2454
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Radio.Root, { name: "vehicle-selection", size: "small", className: cx$1("vehicle-radio-root"), children: vehicles.map((vehicle, index) => /* @__PURE__ */ jsxRuntime.jsxs(
2455
+ salesFrontendDesignSystem.Radio.Item,
2456
+ {
2457
+ id: `item-${vehicle.integrationCodeValue}`,
2458
+ size: "small",
2459
+ value: vehicle.integrationCodeValue || "",
2460
+ onChange: (e) => {
2461
+ const { value } = e.target;
2462
+ console.log(e.target.value);
2463
+ const selected = vehicles.find((v) => v.integrationCodeValue === value);
2464
+ if (selected) {
2465
+ onVehicleSelect(selected);
2466
+ }
2467
+ },
2468
+ className: cx$1("item"),
2469
+ children: [
2470
+ vehicle.integrationCodeValueName,
2471
+ "(",
2472
+ vehicle.integrationCodeValue,
2473
+ ")"
2474
+ ]
2475
+ },
2476
+ `item-${vehicle.integrationCodeValue}-${index}`
2477
+ )) })
2478
+ ] });
2479
+ }
2480
+
2481
+ const useVehicleSearch = () => {
2482
+ const [selectedVehicle, setSelectedVehicle] = React.useState();
2483
+ const { data } = method.useSearchVehicleQuery();
2484
+ return {
2485
+ VehicleSearchComponent: /* @__PURE__ */ jsxRuntime.jsx(VehicleSearch, { vehicles: data?.data?.vehicleTypeList || [], onVehicleSelect: setSelectedVehicle }),
2486
+ selectedVehicle,
2487
+ setSelectedVehicle,
2488
+ vehicleList: data
2489
+ };
2490
+ };
2491
+
2492
+ const useJobVehicleSearch = () => {
2493
+ const [rightPanelView, setRightPanelView] = React.useState("jobSearch");
2494
+ const [riskGrade, setRiskGrade] = React.useState("");
2495
+ const [hospitalizationGrade, setHospitalizationGrade] = React.useState("");
2496
+ const { selectedJob, JobSearchComponent } = useJobSearchModal();
2497
+ const { selectedVehicle, VehicleSearchComponent } = useVehicleSearch();
2498
+ React.useEffect(() => {
2499
+ if (selectedJob && selectedVehicle) {
2500
+ setRiskGrade("\uC77C\uBC18(\uBE44\uC704\uD5D8\uC9C1)(0)");
2501
+ setHospitalizationGrade("\uC77C\uBC18\uC785\uC6D0(\uBE44\uC704\uD5D8\uC9C1)(0)");
2502
+ }
2503
+ }, [selectedJob, selectedVehicle]);
2504
+ return {
2505
+ selectedVehicle,
2506
+ rightPanelView,
2507
+ setRightPanelView,
2508
+ selectedJob,
2509
+ JobSearch: JobSearchComponent,
2510
+ VehicleSearch: VehicleSearchComponent,
2511
+ riskGrade,
2512
+ hospitalizationGrade
2513
+ };
2514
+ };
2515
+
2516
+ const cx = classNames.bind(styles$6);
2517
+ function useJobVehicleSearchModal() {
2518
+ const {
2519
+ selectedVehicle,
2520
+ rightPanelView,
2521
+ setRightPanelView,
2522
+ selectedJob,
2523
+ JobSearch,
2524
+ VehicleSearch,
2525
+ riskGrade,
2526
+ hospitalizationGrade
2527
+ } = useJobVehicleSearch();
2528
+ const { isOpen, openModal, closeModal } = salesFrontendDesignSystem.useModalState({ initialValue: true });
2529
+ const validate = () => {
2530
+ console.log({ selectedJob, selectedVehicle });
2531
+ if (!selectedJob && !selectedVehicle) {
2532
+ return salesFrontendDesignSystem.ModalUtils.alert(
2533
+ "\uC9C1\uC885\uACFC \uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uBAA8\uB450 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.",
2534
+ "\uC9C1\uC885\uACFC \uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694",
2535
+ {
2536
+ modalSize: "small"
2537
+ }
2538
+ );
2539
+ }
2540
+ if (!selectedJob) {
2541
+ return salesFrontendDesignSystem.ModalUtils.alert("\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.", "\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694", {
2542
+ modalSize: "small"
2543
+ });
2544
+ }
2545
+ if (!selectedVehicle) {
2546
+ return salesFrontendDesignSystem.ModalUtils.alert("\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.", "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694", {
2547
+ modalSize: "small"
2548
+ });
2549
+ }
2550
+ closeModal();
2551
+ };
2552
+ return {
2553
+ selectedJob,
2554
+ selectedVehicle,
2555
+ riskGrade,
2556
+ hospitalizationGrade,
2557
+ openJobVehicleModal: openModal,
2558
+ JobVehicleSearchModalComponent: /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
2559
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
2560
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
2561
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885\xB7\uC6B4\uC804\uCC28\uC885 \uAC80\uC0C9", showCloseButton: true }),
2562
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { className: cx("job-vehicle-search-modal"), raw: true, children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2563
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("left-panel"), children: [
2564
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("card-section"), children: [
2565
+ /* @__PURE__ */ jsxRuntime.jsxs(
2566
+ "div",
2567
+ {
2568
+ className: cx("card-menu", { "card-selected": rightPanelView === "jobSearch" }),
2569
+ onClick: () => setRightPanelView("jobSearch"),
2570
+ children: [
2571
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("card-title"), children: [
2572
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/job", className: cx("card-icon") }),
2573
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("card-text", "typo-title5", "text-body"), children: "\uC9C1\uC885" }),
2574
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/arrow/right" })
2575
+ ] }),
2576
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "typo-body2 text-body_2", children: selectedJob ? selectedJob.occupationIndustryName : "\uBBF8\uC120\uD0DD" })
2577
+ ]
2578
+ }
2579
+ ),
2580
+ /* @__PURE__ */ jsxRuntime.jsxs(
2581
+ "div",
2582
+ {
2583
+ className: cx("card-menu", { "card-selected": rightPanelView === "vehicleSelection" }),
2584
+ onClick: () => setRightPanelView("vehicleSelection"),
2585
+ children: [
2586
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx("card-title"), children: [
2587
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "illust/vehicle", className: cx("card-icon") }),
2588
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx("card-text", "typo-title5", "text-body"), children: "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885" }),
2589
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Icon, { name: "sub-ui/arrow/right" })
2590
+ ] }),
2591
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "typo-body2 text-body_2", children: [
2592
+ selectedVehicle?.integrationCodeValueName,
2593
+ selectedVehicle?.integrationCodeValue || "\uBBF8\uC120\uD0DD"
2594
+ ] })
2595
+ ]
2596
+ }
2597
+ )
2598
+ ] }),
2599
+ /* @__PURE__ */ jsxRuntime.jsx(JobVehicleSearchGrade, { riskGrade, hospitalizationGrade })
2600
+ ] }),
2601
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx("right-panel"), children: rightPanelView === "jobSearch" ? JobSearch : VehicleSearch })
2602
+ ] }) }),
2603
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Footer, { style: { marginTop: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: validate, children: "\uD655\uC778" }) })
2604
+ ] })
2605
+ ] })
2606
+ };
2607
+ }
2608
+
2609
+ const JobSearchModal = ({ onClose }) => {
2610
+ const { JobSearchComponent } = useJobSearchModal();
2611
+ return /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Root, { isOpen: true, onClose, modalSize: "xlarge", children: [
2612
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Overlay, {}),
2613
+ /* @__PURE__ */ jsxRuntime.jsxs(salesFrontendDesignSystem.Modal.Content, { style: { height: "697px" }, children: [
2614
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
2615
+ /* @__PURE__ */ jsxRuntime.jsx(salesFrontendDesignSystem.Modal.Body, { raw: true, children: JobSearchComponent }),
2616
+ /* @__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" }) })
2617
+ ] })
2618
+ ] });
2619
+ };
2620
+
1551
2621
  exports.Attachment = Attachment;
1552
2622
  exports.DebugTool = DebugTool;
1553
2623
  exports.FormCheckbox = FormCheckbox;
1554
2624
  exports.FormCheckboxButton = FormCheckboxButton;
1555
2625
  exports.FormDatePicker = FormDatePicker;
1556
2626
  exports.FormDateRangePicker = FormDateRangePicker;
2627
+ exports.FormSearchJobField = FormSearchJobField;
1557
2628
  exports.FormSegmentGroup = FormSegmentGroup;
2629
+ exports.FormSelect = FormSelect;
1558
2630
  exports.FormTextField = FormTextField;
2631
+ exports.JobSearchModal = JobSearchModal;
1559
2632
  exports.StepIndicator = StepIndicator;
1560
2633
  exports.resize = resize;
1561
2634
  exports.testSignatureBase64Data = testSignatureBase64Data;
2635
+ exports.useAddressComponent = useAddressComponent;
1562
2636
  exports.useCamera = useCamera;
1563
2637
  exports.useCanvasPaint = useCanvasPaint;
2638
+ exports.useJobVehicleSearchModal = useJobVehicleSearchModal;
2639
+ exports.useSearchAddress = useSearchAddress;
1564
2640
  //# sourceMappingURL=index.cjs.js.map