sales-frontend-components 3.0.9 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/camera/camera.module.scss +136 -1
- package/dist/index.cjs.js +751 -442
- package/dist/index.d.ts +186 -12
- package/dist/index.esm.js +751 -443
- package/dist/modal/standard/customer-search/customer-search.module.scss +8 -0
- package/package.json +12 -12
package/dist/index.esm.js
CHANGED
|
@@ -20,8 +20,8 @@ import styles$9 from './modal/pre-standard/job-vehicle-search-modal/job-vehicle-
|
|
|
20
20
|
import styles$a from './modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss';
|
|
21
21
|
import styles$b from './modal/pre-standard/organization-search-modal/organization-search-modal.module.scss';
|
|
22
22
|
import styles$c from './step-indicator/step-indicator.module.scss';
|
|
23
|
-
import { Bridge } from 'sales-frontend-bridge';
|
|
24
23
|
import styles$d from './camera/camera.module.scss';
|
|
24
|
+
import { Bridge } from 'sales-frontend-bridge';
|
|
25
25
|
import { useRemoteIdentityVerificationCore } from 'sales-frontend-headless/remote-identity-verification';
|
|
26
26
|
import styles$e from './terms/components/unit/terms-radio.module.scss';
|
|
27
27
|
import styles$f from './terms/components/unit/terms-rating-bar.module.scss';
|
|
@@ -174,12 +174,6 @@ var isClient$1 = () => {
|
|
|
174
174
|
return false;
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
var isAndroidDevice = () => {
|
|
178
|
-
if (isClient$1() === false) {
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
return /Android/i.test(navigator.userAgent);
|
|
182
|
-
};
|
|
183
177
|
var _MessageEventManager = class _MessageEventManager2 {
|
|
184
178
|
constructor() {
|
|
185
179
|
__publicField(this, "handlers", /* @__PURE__ */ new Map());
|
|
@@ -661,12 +655,12 @@ const highlightOnSearchKeyword = (originalText, targetString) => {
|
|
|
661
655
|
return replacedText;
|
|
662
656
|
};
|
|
663
657
|
|
|
664
|
-
const cx$
|
|
658
|
+
const cx$y = classNames$1.bind(styles);
|
|
665
659
|
const { InputBox: InputBox$4, Input: Input$4 } = FormCore;
|
|
666
660
|
const AddressSearchInitialText = () => {
|
|
667
661
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
668
|
-
/* @__PURE__ */ jsx("p", { className: cx$
|
|
669
|
-
/* @__PURE__ */ jsxs("ul", { className: cx$
|
|
662
|
+
/* @__PURE__ */ jsx("p", { className: cx$y("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
|
|
663
|
+
/* @__PURE__ */ jsxs("ul", { className: cx$y("guide"), children: [
|
|
670
664
|
/* @__PURE__ */ jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
|
|
671
665
|
/* @__PURE__ */ jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
|
|
672
666
|
/* @__PURE__ */ jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
|
|
@@ -683,31 +677,32 @@ const AddressSearchResult = ({
|
|
|
683
677
|
selectedAddress
|
|
684
678
|
}) => {
|
|
685
679
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
686
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
680
|
+
/* @__PURE__ */ jsxs("div", { className: cx$y("guide-title"), children: [
|
|
687
681
|
"\uCD1D ",
|
|
688
682
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: addressSearchList.length }),
|
|
689
683
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
690
684
|
] }),
|
|
691
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
692
|
-
return /* @__PURE__ */ jsx("div", { className: cx$
|
|
685
|
+
/* @__PURE__ */ jsx("div", { className: cx$y("search-result-wrapper"), children: addressSearchList?.map((item, index) => {
|
|
686
|
+
return /* @__PURE__ */ jsx("div", { className: cx$y("search-result-row"), children: /* @__PURE__ */ jsx(
|
|
693
687
|
Radio.Item,
|
|
694
688
|
{
|
|
695
|
-
wrapperProps: { className: cx$
|
|
689
|
+
wrapperProps: { className: cx$y("search-result-radio") },
|
|
696
690
|
id: `address-search-result--${index}`,
|
|
697
691
|
size: "medium",
|
|
698
692
|
name: "address-search",
|
|
693
|
+
clampLabel: false,
|
|
699
694
|
onChange,
|
|
700
695
|
value: String(index),
|
|
701
696
|
checked: item.firstPostalCode === selectedAddress?.firstPostalCode && item.secondPostalCode === selectedAddress?.secondPostalCode && item.roadNameBaseAddress === selectedAddress?.roadNameBaseAddress && item.roadNameDetailAddress === selectedAddress?.roadNameDetailAddress,
|
|
702
|
-
children: /* @__PURE__ */ jsxs("span", { className: cx$
|
|
703
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
704
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
705
|
-
/* @__PURE__ */ jsxs("span", { className: cx$
|
|
706
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
697
|
+
children: /* @__PURE__ */ jsxs("span", { className: cx$y("search-result"), children: [
|
|
698
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("zipcode"), children: highlightOnSearchKeyword(`${item.firstPostalCode}${item.secondPostalCode}`, searchKeyword) }),
|
|
699
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("divider") }),
|
|
700
|
+
/* @__PURE__ */ jsxs("span", { className: cx$y("address-info"), children: [
|
|
701
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("road-address"), children: highlightOnSearchKeyword(
|
|
707
702
|
`${item.roadNameBaseAddress} ${item.roadNameDetailAddress} ${item.mainBuildingName}`,
|
|
708
703
|
searchKeyword
|
|
709
704
|
) }),
|
|
710
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
705
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("land-address"), children: highlightOnSearchKeyword(
|
|
711
706
|
`${item.landNumberBaseAddress} ${item.landNumberDetailAddress}`,
|
|
712
707
|
searchKeyword
|
|
713
708
|
) })
|
|
@@ -731,20 +726,29 @@ const AddressSearchDetailInput = ({
|
|
|
731
726
|
}) => {
|
|
732
727
|
const { land, road } = selectedStandardizationAddress || {};
|
|
733
728
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
734
|
-
/* @__PURE__ */ jsx(Radio.Root, { name: "address-search-standardization", size: "medium", align: "vertical", className: "mb-xxlarge", children: /* @__PURE__ */ jsx(
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
{
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
729
|
+
/* @__PURE__ */ jsx(Radio.Root, { name: "address-search-standardization", size: "medium", align: "vertical", className: "mb-xxlarge", children: /* @__PURE__ */ jsx(
|
|
730
|
+
Radio.Item,
|
|
731
|
+
{
|
|
732
|
+
wrapperProps: { className: cx$y("search-result-radio") },
|
|
733
|
+
value: "",
|
|
734
|
+
checked: true,
|
|
735
|
+
clampLabel: false,
|
|
736
|
+
children: /* @__PURE__ */ jsxs("span", { className: cx$y("search-result"), children: [
|
|
737
|
+
/* @__PURE__ */ jsx(
|
|
738
|
+
"span",
|
|
739
|
+
{
|
|
740
|
+
className: cx$y("zipcode"),
|
|
741
|
+
children: `${selectedStandardizationAddress?.land?.firstPostalCode}${land?.secondPostalCode}`
|
|
742
|
+
}
|
|
743
|
+
),
|
|
744
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("divider") }),
|
|
745
|
+
/* @__PURE__ */ jsxs("span", { className: cx$y("address-info"), children: [
|
|
746
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("road-address"), children: `${road?.baseAddress} ${road?.detailAddress}` }),
|
|
747
|
+
/* @__PURE__ */ jsx("span", { className: cx$y("land-address"), children: `${land?.baseAddress} ${land?.detailAddress}` })
|
|
748
|
+
] })
|
|
749
|
+
] })
|
|
750
|
+
}
|
|
751
|
+
) }),
|
|
748
752
|
/* @__PURE__ */ jsxs("div", { className: "d-flex gap-large items-center", children: [
|
|
749
753
|
/* @__PURE__ */ jsx(FormField.Label, { htmlFor: "detail", children: "\uC0C1\uC138\uC8FC\uC18C" }),
|
|
750
754
|
/* @__PURE__ */ jsx(
|
|
@@ -800,7 +804,7 @@ function AddressComponent({ isOpen, onClose, setValue, inputProps, inputBoxProps
|
|
|
800
804
|
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
801
805
|
/* @__PURE__ */ jsxs(Modal.Content, { children: [
|
|
802
806
|
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
|
|
803
|
-
/* @__PURE__ */ jsxs(Modal.Body, { className: cx$
|
|
807
|
+
/* @__PURE__ */ jsxs(Modal.Body, { className: cx$y("modal-body"), children: [
|
|
804
808
|
/* @__PURE__ */ jsx(
|
|
805
809
|
InputBox$4,
|
|
806
810
|
{
|
|
@@ -824,7 +828,7 @@ function AddressComponent({ isOpen, onClose, setValue, inputProps, inputBoxProps
|
|
|
824
828
|
}
|
|
825
829
|
),
|
|
826
830
|
addressSearchStep === "initial" && /* @__PURE__ */ jsx(AddressSearchInitialText, {}),
|
|
827
|
-
isLoading && /* @__PURE__ */ jsx(Loading.Wait, { className: cx$
|
|
831
|
+
isLoading && /* @__PURE__ */ jsx(Loading.Wait, { className: cx$y("loading") }),
|
|
828
832
|
!isLoading && addressSearchStep === "search-result" && /* @__PURE__ */ jsx(
|
|
829
833
|
AddressSearchResult,
|
|
830
834
|
{
|
|
@@ -1495,26 +1499,26 @@ function useBankStockSearch({ onSelect, commonCodeId }) {
|
|
|
1495
1499
|
};
|
|
1496
1500
|
}
|
|
1497
1501
|
|
|
1498
|
-
const cx$
|
|
1502
|
+
const cx$x = classNames$1.bind(styles$1);
|
|
1499
1503
|
function BankStockSearchModal({ open, onClose, onSelect, commonCodeId }) {
|
|
1500
1504
|
const { bankList, stockList, handleSelect } = useBankStockSearch({
|
|
1501
1505
|
onSelect,
|
|
1502
1506
|
commonCodeId
|
|
1503
1507
|
});
|
|
1504
1508
|
const renderItems = (list) => {
|
|
1505
|
-
return /* @__PURE__ */ jsx("div", { className: cx$
|
|
1509
|
+
return /* @__PURE__ */ jsx("div", { className: cx$x("grid-container"), children: list.map((item) => {
|
|
1506
1510
|
const findItem = BANK_STOCK_ICON_LIST.find((icon) => icon.codeVal === item.codeVal);
|
|
1507
1511
|
const convertedItem = findItem ? findItem : {
|
|
1508
1512
|
replaceName: item.codeName
|
|
1509
1513
|
};
|
|
1510
|
-
return /* @__PURE__ */ jsxs("button", { className: cx$
|
|
1511
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1514
|
+
return /* @__PURE__ */ jsxs("button", { className: cx$x("grid-item", "text-pre-line"), onClick: () => handleSelect(item), children: [
|
|
1515
|
+
/* @__PURE__ */ jsx("span", { className: cx$x("icon-box"), children: /* @__PURE__ */ jsx(
|
|
1512
1516
|
"span",
|
|
1513
1517
|
{
|
|
1514
|
-
className: `${cx$
|
|
1518
|
+
className: `${cx$x("icon")} dsp-icons ${findItem?.className ?? "dsp-icons-graphics-stock-hochul-eopsum"}`
|
|
1515
1519
|
}
|
|
1516
1520
|
) }),
|
|
1517
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1521
|
+
/* @__PURE__ */ jsx("span", { className: cx$x("icon-name"), children: convertedItem?.replaceName })
|
|
1518
1522
|
] }, item.codeVal);
|
|
1519
1523
|
}) });
|
|
1520
1524
|
};
|
|
@@ -1522,13 +1526,13 @@ function BankStockSearchModal({ open, onClose, onSelect, commonCodeId }) {
|
|
|
1522
1526
|
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
1523
1527
|
/* @__PURE__ */ jsxs(Modal.Content, { children: [
|
|
1524
1528
|
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC740\uD589/\uC99D\uAD8C\uC0AC \uC120\uD0DD", showCloseButton: true }),
|
|
1525
|
-
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1526
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
1527
|
-
/* @__PURE__ */ jsx("h2", { className: cx$
|
|
1529
|
+
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("div", { className: cx$x("container"), children: [
|
|
1530
|
+
/* @__PURE__ */ jsxs("div", { className: cx$x("section"), children: [
|
|
1531
|
+
/* @__PURE__ */ jsx("h2", { className: cx$x("section-title"), children: "\uC740\uD589\uC0AC" }),
|
|
1528
1532
|
renderItems(bankList || [])
|
|
1529
1533
|
] }),
|
|
1530
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
1531
|
-
/* @__PURE__ */ jsx("h2", { className: cx$
|
|
1534
|
+
/* @__PURE__ */ jsxs("div", { className: cx$x("section"), children: [
|
|
1535
|
+
/* @__PURE__ */ jsx("h2", { className: cx$x("section-title"), children: "\uC99D\uAD8C\uC0AC" }),
|
|
1532
1536
|
renderItems(stockList || [])
|
|
1533
1537
|
] })
|
|
1534
1538
|
] }) })
|
|
@@ -1547,7 +1551,7 @@ const useCustomerSearch = (onSelect, options) => {
|
|
|
1547
1551
|
const [customerList, setCustomerList] = useState([]);
|
|
1548
1552
|
const [selectedCustomer, setSelectedCustomer] = useState(null);
|
|
1549
1553
|
const setSentryCustInfo = useSetSentryCustInfo();
|
|
1550
|
-
const { data } = useSearchCustomerListQuery({ customerName: searchKeyword });
|
|
1554
|
+
const { data, isFetching } = useSearchCustomerListQuery({ customerName: searchKeyword });
|
|
1551
1555
|
const search = () => {
|
|
1552
1556
|
if (searchInput.length >= 2) {
|
|
1553
1557
|
setSearchKeyword(searchInput);
|
|
@@ -1600,6 +1604,7 @@ const useCustomerSearch = (onSelect, options) => {
|
|
|
1600
1604
|
searchInput,
|
|
1601
1605
|
customerList,
|
|
1602
1606
|
searchKeyword,
|
|
1607
|
+
isLoading: isFetching && searchKeyword.length > 0,
|
|
1603
1608
|
onSearchInputChange,
|
|
1604
1609
|
onKeyUp,
|
|
1605
1610
|
search,
|
|
@@ -1613,7 +1618,7 @@ const useCustomerSearch = (onSelect, options) => {
|
|
|
1613
1618
|
};
|
|
1614
1619
|
};
|
|
1615
1620
|
|
|
1616
|
-
const cx$
|
|
1621
|
+
const cx$w = classNames$1.bind(styles$2);
|
|
1617
1622
|
const { InputBox: InputBox$3, Input: Input$3 } = FormCore;
|
|
1618
1623
|
const CustomerSearch = ({
|
|
1619
1624
|
onSelectCustomer,
|
|
@@ -1630,6 +1635,7 @@ const CustomerSearch = ({
|
|
|
1630
1635
|
searchInput,
|
|
1631
1636
|
customerList,
|
|
1632
1637
|
searchKeyword,
|
|
1638
|
+
isLoading,
|
|
1633
1639
|
onSearchInputChange,
|
|
1634
1640
|
onKeyUp,
|
|
1635
1641
|
search,
|
|
@@ -1640,8 +1646,8 @@ const CustomerSearch = ({
|
|
|
1640
1646
|
onClear();
|
|
1641
1647
|
onSearchClear?.();
|
|
1642
1648
|
};
|
|
1643
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1644
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
1649
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$w("container"), children: [
|
|
1650
|
+
/* @__PURE__ */ jsx("div", { className: cx$w("search-bar"), children: /* @__PURE__ */ jsx(
|
|
1645
1651
|
InputBox$3,
|
|
1646
1652
|
{
|
|
1647
1653
|
endElement: /* @__PURE__ */ jsx(IconMainUiSearch, { onClick: search, style: { width: "20px", height: "20px" } }),
|
|
@@ -1662,34 +1668,38 @@ const CustomerSearch = ({
|
|
|
1662
1668
|
)
|
|
1663
1669
|
}
|
|
1664
1670
|
) }),
|
|
1665
|
-
isOpen &&
|
|
1671
|
+
isOpen && searchKeyword && /* @__PURE__ */ jsx(DropDown, { children: /* @__PURE__ */ jsx("div", { className: cx$w("result-container"), children: customerList.length > 0 ? /* @__PURE__ */ jsx(List, { children: customerList.map((customer, index) => /* @__PURE__ */ jsx(
|
|
1666
1672
|
ListItem,
|
|
1667
1673
|
{
|
|
1668
1674
|
onClick: () => handleSelectItem(customer),
|
|
1669
1675
|
selectable: true,
|
|
1670
|
-
children: /* @__PURE__ */ jsxs("button", { className: cx$
|
|
1671
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
1672
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
1676
|
+
children: /* @__PURE__ */ jsxs("button", { className: cx$w("customer-item"), children: [
|
|
1677
|
+
/* @__PURE__ */ jsx("div", { className: cx$w("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1678
|
+
/* @__PURE__ */ jsxs("div", { className: cx$w("details"), children: [
|
|
1673
1679
|
/* @__PURE__ */ jsx("span", { children: customer.birthDate && convertDateString({
|
|
1674
1680
|
dateString: customer.birthDate,
|
|
1675
1681
|
fromFormat: "YYYYMMDD",
|
|
1676
1682
|
toFormat: "YYYY.MM.DD"
|
|
1677
1683
|
}) }),
|
|
1678
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1684
|
+
/* @__PURE__ */ jsx("span", { className: cx$w("separator"), children: "|" }),
|
|
1679
1685
|
/* @__PURE__ */ jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1680
1686
|
customer.baseAddress && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1681
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1687
|
+
/* @__PURE__ */ jsx("span", { className: cx$w("separator"), children: "|" }),
|
|
1682
1688
|
/* @__PURE__ */ jsx("span", { children: customer.baseAddress })
|
|
1683
1689
|
] })
|
|
1684
1690
|
] })
|
|
1685
1691
|
] })
|
|
1686
1692
|
},
|
|
1687
1693
|
`cust-item-${customer.customerId}-${index}`
|
|
1688
|
-
)) })
|
|
1694
|
+
)) }) : !isLoading && /* @__PURE__ */ jsxs("div", { className: cx$w("no-result-message"), children: [
|
|
1695
|
+
"`",
|
|
1696
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
1697
|
+
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
1698
|
+
] }) }) })
|
|
1689
1699
|
] });
|
|
1690
1700
|
};
|
|
1691
1701
|
|
|
1692
|
-
const cx$
|
|
1702
|
+
const cx$v = classNames$1.bind(styles$2);
|
|
1693
1703
|
const { InputBox: InputBox$2, Input: Input$2 } = FormCore;
|
|
1694
1704
|
function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear, inputProps, inputBoxProps }) {
|
|
1695
1705
|
const {
|
|
@@ -1736,12 +1746,12 @@ function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear, inpu
|
|
|
1736
1746
|
)
|
|
1737
1747
|
}
|
|
1738
1748
|
),
|
|
1739
|
-
searchKeyword && /* @__PURE__ */ jsxs("p", { className: cx$
|
|
1749
|
+
searchKeyword && /* @__PURE__ */ jsxs("p", { className: cx$v("result-count"), children: [
|
|
1740
1750
|
"\uCD1D ",
|
|
1741
1751
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: customerList.length }),
|
|
1742
1752
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1743
1753
|
] }),
|
|
1744
|
-
searchKeyword && customerList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1754
|
+
searchKeyword && customerList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$v("search-result"), children: [
|
|
1745
1755
|
"`",
|
|
1746
1756
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
1747
1757
|
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
@@ -1757,18 +1767,18 @@ function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear, inpu
|
|
|
1757
1767
|
closeModal();
|
|
1758
1768
|
},
|
|
1759
1769
|
selectable: true,
|
|
1760
|
-
children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1761
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
1762
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
1770
|
+
children: /* @__PURE__ */ jsxs("div", { className: cx$v("customer-item", "modal"), children: [
|
|
1771
|
+
/* @__PURE__ */ jsx("div", { className: cx$v("name"), children: highlightOnSearchKeyword(customer.customerName || "", searchKeyword) }),
|
|
1772
|
+
/* @__PURE__ */ jsxs("div", { className: cx$v("details", "modal"), children: [
|
|
1763
1773
|
/* @__PURE__ */ jsx("span", { children: customer.birthDate && convertDateString({
|
|
1764
1774
|
dateString: customer.birthDate,
|
|
1765
1775
|
fromFormat: "YYYYMMDD",
|
|
1766
1776
|
toFormat: "YYYY.MM.DD"
|
|
1767
1777
|
}) }),
|
|
1768
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1778
|
+
/* @__PURE__ */ jsx("span", { className: cx$v("separator"), children: "|" }),
|
|
1769
1779
|
/* @__PURE__ */ jsx("span", { children: getGenderName(customer.genderCode) }),
|
|
1770
1780
|
customer.baseAddress && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1771
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
1781
|
+
/* @__PURE__ */ jsx("span", { className: cx$v("separator"), children: "|" }),
|
|
1772
1782
|
/* @__PURE__ */ jsx("span", { children: customer.baseAddress })
|
|
1773
1783
|
] })
|
|
1774
1784
|
] })
|
|
@@ -1781,7 +1791,7 @@ function CustomerSearchModal({ isOpen, closeModal, onSelect, onSearchClear, inpu
|
|
|
1781
1791
|
] });
|
|
1782
1792
|
}
|
|
1783
1793
|
|
|
1784
|
-
const cx$
|
|
1794
|
+
const cx$u = classNames$1.bind(styles$3);
|
|
1785
1795
|
const { InputBox: InputBox$1, Input: Input$1 } = FormCore;
|
|
1786
1796
|
const favoriteList = [
|
|
1787
1797
|
{
|
|
@@ -1823,9 +1833,9 @@ const NationalitySearchInitialText = ({
|
|
|
1823
1833
|
setSearchInput(keyword);
|
|
1824
1834
|
setSearchKeyword(keyword);
|
|
1825
1835
|
};
|
|
1826
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1827
|
-
/* @__PURE__ */ jsx("p", { className: cx$
|
|
1828
|
-
/* @__PURE__ */ jsx("ul", { className: cx$
|
|
1836
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$u("favorite-container"), children: [
|
|
1837
|
+
/* @__PURE__ */ jsx("p", { className: cx$u("favorite-title"), children: "\uB9CE\uC774 \uCC3E\uB294 \uAD6D\uC801" }),
|
|
1838
|
+
/* @__PURE__ */ jsx("ul", { className: cx$u("favorite"), children: favoriteList.map((item, index) => /* @__PURE__ */ jsx("li", { onClick: () => set(item.nationalityCodeName), children: /* @__PURE__ */ jsx("button", { children: item.nationalityCodeName }) }, `${item.nationalityCode}-${index}`)) })
|
|
1829
1839
|
] });
|
|
1830
1840
|
};
|
|
1831
1841
|
const NationalitySearchResult = ({
|
|
@@ -1840,12 +1850,12 @@ const NationalitySearchResult = ({
|
|
|
1840
1850
|
setFilterList(filterList2);
|
|
1841
1851
|
}, [nationalityList, searchKeyWord]);
|
|
1842
1852
|
return /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
|
|
1843
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
1853
|
+
/* @__PURE__ */ jsxs("p", { className: cx$u("favorite-title"), children: [
|
|
1844
1854
|
"\uCD1D ",
|
|
1845
1855
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filterList.length }),
|
|
1846
1856
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
1847
1857
|
] }),
|
|
1848
|
-
/* @__PURE__ */ jsx("ul", { className: cx$
|
|
1858
|
+
/* @__PURE__ */ jsx("ul", { className: cx$u("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
|
|
1849
1859
|
return /* @__PURE__ */ jsx(
|
|
1850
1860
|
"li",
|
|
1851
1861
|
{
|
|
@@ -1858,7 +1868,7 @@ const NationalitySearchResult = ({
|
|
|
1858
1868
|
`${index}-${item.nationalityCode}`
|
|
1859
1869
|
);
|
|
1860
1870
|
}) }),
|
|
1861
|
-
filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$
|
|
1871
|
+
filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$u("search-result"), children: [
|
|
1862
1872
|
"`",
|
|
1863
1873
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: searchKeyWord }),
|
|
1864
1874
|
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
@@ -1893,7 +1903,7 @@ function NationalityComponent({ isOpen, onClose, setValue, onConfirm, inputProps
|
|
|
1893
1903
|
clearable: true,
|
|
1894
1904
|
endElement: /* @__PURE__ */ jsx("button", { children: /* @__PURE__ */ jsx(IconMainUiSearch, { onClick: search }) }),
|
|
1895
1905
|
onClear,
|
|
1896
|
-
className: cx$
|
|
1906
|
+
className: cx$u("search-input"),
|
|
1897
1907
|
...inputBoxProps,
|
|
1898
1908
|
children: /* @__PURE__ */ jsx(
|
|
1899
1909
|
Input$1,
|
|
@@ -2004,7 +2014,7 @@ const useNationalityComponent = () => {
|
|
|
2004
2014
|
};
|
|
2005
2015
|
};
|
|
2006
2016
|
|
|
2007
|
-
const cx$
|
|
2017
|
+
const cx$t = classNames$1.bind(styles$4);
|
|
2008
2018
|
const AUTH_TEMPLATE_CODES = {
|
|
2009
2019
|
appInit: {
|
|
2010
2020
|
dev: {
|
|
@@ -2235,7 +2245,7 @@ function useNxlOneModal({
|
|
|
2235
2245
|
isNxlOneModalOpen: isOpen,
|
|
2236
2246
|
NxlModalComponent: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize, children: [
|
|
2237
2247
|
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
2238
|
-
/* @__PURE__ */ jsx(Modal.Content, { children: /* @__PURE__ */ jsxs(Modal.Body, { raw: true, className: cx$
|
|
2248
|
+
/* @__PURE__ */ jsx(Modal.Content, { children: /* @__PURE__ */ jsxs(Modal.Body, { raw: true, className: cx$t("modal-body", `modal-body-${modalSize}`), children: [
|
|
2239
2249
|
isIframeShow && /* @__PURE__ */ jsx(
|
|
2240
2250
|
NxlOneIframe,
|
|
2241
2251
|
{
|
|
@@ -2245,7 +2255,7 @@ function useNxlOneModal({
|
|
|
2245
2255
|
env: nxlOnePropsState.env,
|
|
2246
2256
|
bizCode: nxlOnePropsState.bizCode || bizCode,
|
|
2247
2257
|
tmplCode: nxlOnePropsState.tmplCode || tmplCode,
|
|
2248
|
-
className: cx$
|
|
2258
|
+
className: cx$t("nxl-one-iframe"),
|
|
2249
2259
|
onSuccess: (result) => {
|
|
2250
2260
|
onSuccess(result);
|
|
2251
2261
|
setIsIframeShow(false);
|
|
@@ -2257,16 +2267,16 @@ function useNxlOneModal({
|
|
|
2257
2267
|
}
|
|
2258
2268
|
}
|
|
2259
2269
|
),
|
|
2260
|
-
!isIframeShow && /* @__PURE__ */ jsx("div", { className: cx$
|
|
2270
|
+
!isIframeShow && /* @__PURE__ */ jsx("div", { className: cx$t("nxl-one-iframe") })
|
|
2261
2271
|
] }) })
|
|
2262
2272
|
] })
|
|
2263
2273
|
};
|
|
2264
2274
|
}
|
|
2265
2275
|
|
|
2266
|
-
const cx$
|
|
2276
|
+
const cx$s = classNames$1.bind(styles$5);
|
|
2267
2277
|
const { InputBox, Input } = FormCore;
|
|
2268
2278
|
const VisaSearchInitialText = ({ visaList, onSelect, onConfirm }) => {
|
|
2269
|
-
return /* @__PURE__ */ jsx("div", { className: cx$
|
|
2279
|
+
return /* @__PURE__ */ jsx("div", { className: cx$s("favorite-container"), children: /* @__PURE__ */ jsx("ul", { className: cx$s("favorite"), children: visaList.map((item, index) => {
|
|
2270
2280
|
return /* @__PURE__ */ jsx(
|
|
2271
2281
|
"li",
|
|
2272
2282
|
{
|
|
@@ -2287,12 +2297,12 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect, onConfirm }) => {
|
|
|
2287
2297
|
setFilterList(filterList2);
|
|
2288
2298
|
}, [visaList, searchKeyword]);
|
|
2289
2299
|
return /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
|
|
2290
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
2300
|
+
/* @__PURE__ */ jsxs("p", { className: cx$s("favorite-title"), children: [
|
|
2291
2301
|
"\uCD1D ",
|
|
2292
2302
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filterList.length }),
|
|
2293
2303
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
2294
2304
|
] }),
|
|
2295
|
-
/* @__PURE__ */ jsx("ul", { className: cx$
|
|
2305
|
+
/* @__PURE__ */ jsx("ul", { className: cx$s("favorite"), children: filterList.length > 0 && filterList.map((item, index) => {
|
|
2296
2306
|
return /* @__PURE__ */ jsx(
|
|
2297
2307
|
"li",
|
|
2298
2308
|
{
|
|
@@ -2305,7 +2315,7 @@ const VisaSearchResult = ({ visaList, searchKeyword, onSelect, onConfirm }) => {
|
|
|
2305
2315
|
`${index}-${item.integrationCodeValueName}`
|
|
2306
2316
|
);
|
|
2307
2317
|
}) }),
|
|
2308
|
-
filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$
|
|
2318
|
+
filterList.length === 0 && /* @__PURE__ */ jsxs("div", { className: cx$s("search-result"), children: [
|
|
2309
2319
|
"`",
|
|
2310
2320
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: searchKeyword }),
|
|
2311
2321
|
"`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
|
|
@@ -2329,7 +2339,7 @@ function VisaComponent({ isOpen, onClose, setValue, onConfirm, inputProps, input
|
|
|
2329
2339
|
clearable: true,
|
|
2330
2340
|
endElement: /* @__PURE__ */ jsx("button", { children: /* @__PURE__ */ jsx(IconMainUiSearch, { onClick: search }) }),
|
|
2331
2341
|
onClear,
|
|
2332
|
-
className: cx$
|
|
2342
|
+
className: cx$s("search-input"),
|
|
2333
2343
|
...inputBoxProps,
|
|
2334
2344
|
children: /* @__PURE__ */ jsx(
|
|
2335
2345
|
Input,
|
|
@@ -2441,30 +2451,30 @@ const useVisaComponent = () => {
|
|
|
2441
2451
|
};
|
|
2442
2452
|
};
|
|
2443
2453
|
|
|
2444
|
-
const cx$
|
|
2454
|
+
const cx$r = classNames$1.bind(styles$6);
|
|
2445
2455
|
function DeaCustomerSearchResult({
|
|
2446
2456
|
customerList,
|
|
2447
2457
|
onCustomerSelect,
|
|
2448
2458
|
selectedCustomer
|
|
2449
2459
|
}) {
|
|
2450
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
2451
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
2460
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$r("result-section"), children: [
|
|
2461
|
+
/* @__PURE__ */ jsxs("p", { className: cx$r("result-title"), children: [
|
|
2452
2462
|
"\uCD1D ",
|
|
2453
2463
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: customerList.length }),
|
|
2454
2464
|
"\uAC74"
|
|
2455
2465
|
] }),
|
|
2456
2466
|
/* @__PURE__ */ jsxs(Table, { variant: "vertical", style: { tableLayout: "fixed" }, height: "292px", children: [
|
|
2457
2467
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
2458
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2459
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2460
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2461
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2462
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2463
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2464
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2468
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding", "select-col"), children: "\uC120\uD0DD" }),
|
|
2469
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uACE0\uAC1DID" }),
|
|
2470
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uACE0\uAC1D\uBA85" }),
|
|
2471
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uC8FC\uBBFC\uB4F1\uB85D\uBC88\uD638" }),
|
|
2472
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uC9C1\uC885\uC5C5\uC885\uBA85" }),
|
|
2473
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uC804\uD654\uBC88\uD638" }),
|
|
2474
|
+
/* @__PURE__ */ jsx("th", { className: cx$r("th-padding"), children: "\uC8FC\uC18C" })
|
|
2465
2475
|
] }) }),
|
|
2466
2476
|
/* @__PURE__ */ jsx("tbody", { children: customerList.length > 0 ? customerList.map((customer, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
2467
|
-
/* @__PURE__ */ jsx("td", { className: cx$
|
|
2477
|
+
/* @__PURE__ */ jsx("td", { className: cx$r("radio-cell"), children: /* @__PURE__ */ jsx("div", { className: "d-flex-center-center", children: /* @__PURE__ */ jsx(
|
|
2468
2478
|
Radio.Item,
|
|
2469
2479
|
{
|
|
2470
2480
|
id: `radio-${index}`,
|
|
@@ -2483,7 +2493,7 @@ function DeaCustomerSearchResult({
|
|
|
2483
2493
|
/* @__PURE__ */ jsx("td", { children: customer.occupationKindName }),
|
|
2484
2494
|
/* @__PURE__ */ jsx("td", { children: customer.mobilePhoneNumber }),
|
|
2485
2495
|
/* @__PURE__ */ jsx("td", { children: customer.address })
|
|
2486
|
-
] }, `cust-item-${customer.customerId}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 7, children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
2496
|
+
] }, `cust-item-${customer.customerId}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 7, children: /* @__PURE__ */ jsxs("div", { className: cx$r("no-result"), children: [
|
|
2487
2497
|
/* @__PURE__ */ jsx(IconGraphicsFeedbackEmpty, {}),
|
|
2488
2498
|
/* @__PURE__ */ jsx("p", { children: "\uC870\uD68C \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
2489
2499
|
/* @__PURE__ */ jsx("p", { children: "\uC785\uB825\uD55C \uC815\uBCF4\uB97C \uB2E4\uC2DC \uD655\uC778\uD574\uC8FC\uC138\uC694." })
|
|
@@ -2493,7 +2503,7 @@ function DeaCustomerSearchResult({
|
|
|
2493
2503
|
}
|
|
2494
2504
|
|
|
2495
2505
|
const { TextField: TextField$3 } = FormField;
|
|
2496
|
-
const cx$
|
|
2506
|
+
const cx$q = classNames$1.bind(styles$6);
|
|
2497
2507
|
function DeaCustomerSearch({
|
|
2498
2508
|
setSearchParams,
|
|
2499
2509
|
customerList,
|
|
@@ -2564,15 +2574,15 @@ function DeaCustomerSearch({
|
|
|
2564
2574
|
}
|
|
2565
2575
|
}, [initSearchParams]);
|
|
2566
2576
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2567
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
2568
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2569
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2577
|
+
/* @__PURE__ */ jsx("div", { className: cx$q("search-section"), children: /* @__PURE__ */ jsxs("div", { className: cx$q("search-filters"), children: [
|
|
2578
|
+
/* @__PURE__ */ jsxs("div", { className: cx$q("search-filters-wrap"), children: [
|
|
2579
|
+
/* @__PURE__ */ jsxs("div", { className: cx$q("search-filter-section", "flex-1"), children: [
|
|
2570
2580
|
/* @__PURE__ */ jsx(FormField.Label, { className: "subtitle3 text-body-1", children: "\uACE0\uAC1D \uAD6C\uBD84" }),
|
|
2571
2581
|
/* @__PURE__ */ jsx(Select, { value: "personal", placeholder: "\uAC1C\uC778", disabled: true, size: "small", className: "w-full", children: /* @__PURE__ */ jsx(Select.Option, { value: "personal", children: "\uAC1C\uC778" }) })
|
|
2572
2582
|
] }),
|
|
2573
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2583
|
+
/* @__PURE__ */ jsxs("div", { className: cx$q("search-filter-section", "flex-2"), children: [
|
|
2574
2584
|
/* @__PURE__ */ jsx(FormField.Label, { className: "subtitle3 text-body-1", children: "\uC8FC\uBBFC\uB4F1\uB85D\uBC88\uD638" }),
|
|
2575
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2585
|
+
/* @__PURE__ */ jsxs("div", { className: cx$q("resident-number-inputs"), children: [
|
|
2576
2586
|
/* @__PURE__ */ jsx(
|
|
2577
2587
|
TextField$3,
|
|
2578
2588
|
{
|
|
@@ -2586,7 +2596,7 @@ function DeaCustomerSearch({
|
|
|
2586
2596
|
onKeyDown,
|
|
2587
2597
|
onFocus: onFocusResidentFrontInput,
|
|
2588
2598
|
rootProps: {
|
|
2589
|
-
className: cx$
|
|
2599
|
+
className: cx$q("search-input"),
|
|
2590
2600
|
onClear: () => {
|
|
2591
2601
|
setResidentNumberFront("");
|
|
2592
2602
|
}
|
|
@@ -2610,16 +2620,16 @@ function DeaCustomerSearch({
|
|
|
2610
2620
|
onFocus: onFocusResidentBackInput,
|
|
2611
2621
|
rootProps: {
|
|
2612
2622
|
clearable: false,
|
|
2613
|
-
className: cx$
|
|
2623
|
+
className: cx$q("search-input")
|
|
2614
2624
|
}
|
|
2615
2625
|
}
|
|
2616
2626
|
)
|
|
2617
2627
|
] })
|
|
2618
2628
|
] })
|
|
2619
2629
|
] }),
|
|
2620
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
2630
|
+
/* @__PURE__ */ jsx("div", { className: cx$q("search-buttons"), children: /* @__PURE__ */ jsx(Button, { appearance: "filled", size: "small", variant: "primary", className: "button", onClick: handleSearch, children: "\uC870\uD68C" }) })
|
|
2621
2631
|
] }) }),
|
|
2622
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
2632
|
+
/* @__PURE__ */ jsx("div", { className: cx$q("divider") }),
|
|
2623
2633
|
/* @__PURE__ */ jsx(
|
|
2624
2634
|
DeaCustomerSearchResult,
|
|
2625
2635
|
{
|
|
@@ -2732,28 +2742,28 @@ const EMPLOYEE_SEARCH_TABS = [
|
|
|
2732
2742
|
{ value: "WKIS", label: "\uB0B4\uADFC" }
|
|
2733
2743
|
];
|
|
2734
2744
|
|
|
2735
|
-
const cx$
|
|
2745
|
+
const cx$p = classNames$1.bind(styles$7);
|
|
2736
2746
|
function EmployeeSearchResult({
|
|
2737
2747
|
filteredEmployees,
|
|
2738
2748
|
onEmployeeSelect,
|
|
2739
2749
|
selectedEmployee
|
|
2740
2750
|
}) {
|
|
2741
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
2742
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
2751
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$p("result-section"), children: [
|
|
2752
|
+
/* @__PURE__ */ jsxs("p", { className: cx$p("result-title"), children: [
|
|
2743
2753
|
"\uCD1D ",
|
|
2744
2754
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredEmployees.length }),
|
|
2745
2755
|
"\uAC74"
|
|
2746
2756
|
] }),
|
|
2747
2757
|
/* @__PURE__ */ jsxs(Table, { variant: "vertical", style: { tableLayout: "fixed" }, height: "292px", children: [
|
|
2748
2758
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
2749
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2750
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2751
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2752
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2753
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
2759
|
+
/* @__PURE__ */ jsx("th", { className: cx$p("th-padding", "select-col"), children: "\uC120\uD0DD" }),
|
|
2760
|
+
/* @__PURE__ */ jsx("th", { className: cx$p("th-padding"), children: "\uC0AC\uC6D0\uBC88\uD638" }),
|
|
2761
|
+
/* @__PURE__ */ jsx("th", { className: cx$p("th-padding"), children: "\uC0AC\uC6D0\uBA85" }),
|
|
2762
|
+
/* @__PURE__ */ jsx("th", { className: cx$p("th-padding"), children: "\uC18C\uC18D\uAE30\uAD00\uBA85" }),
|
|
2763
|
+
/* @__PURE__ */ jsx("th", { className: cx$p("th-padding"), children: "\uC0AC\uC6D0\uAD6C\uBD84" })
|
|
2754
2764
|
] }) }),
|
|
2755
2765
|
/* @__PURE__ */ jsx("tbody", { children: filteredEmployees.length > 0 ? filteredEmployees.map((employee, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
2756
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
2766
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$p("td-padding"), children: /* @__PURE__ */ jsx(
|
|
2757
2767
|
Radio.Item,
|
|
2758
2768
|
{
|
|
2759
2769
|
id: `radio-${index}`,
|
|
@@ -2766,11 +2776,11 @@ function EmployeeSearchResult({
|
|
|
2766
2776
|
}
|
|
2767
2777
|
}
|
|
2768
2778
|
) }) }),
|
|
2769
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
2770
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
2771
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
2772
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
2773
|
-
] }, `${employee.employeeNumber}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 5, children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
2779
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$p("td-padding"), children: employee.employeeNumber }) }),
|
|
2780
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$p("td-padding"), children: employee.employeeName }) }),
|
|
2781
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$p("td-padding"), children: employee.organizationName }) }),
|
|
2782
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$p("td-padding"), children: employee.employeeDivisionCodeName }) })
|
|
2783
|
+
] }, `${employee.employeeNumber}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 5, children: /* @__PURE__ */ jsxs("div", { className: cx$p("no-result"), children: [
|
|
2774
2784
|
/* @__PURE__ */ jsx(IconGraphicsFeedbackEmpty, {}),
|
|
2775
2785
|
/* @__PURE__ */ jsx("p", { children: "\uC870\uD68C \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
2776
2786
|
/* @__PURE__ */ jsx("p", { children: "\uC785\uB825\uD55C \uC815\uBCF4\uB97C \uB2E4\uC2DC \uD655\uC778\uD574\uC8FC\uC138\uC694." })
|
|
@@ -2780,7 +2790,7 @@ function EmployeeSearchResult({
|
|
|
2780
2790
|
}
|
|
2781
2791
|
|
|
2782
2792
|
const { TextField: TextField$2 } = FormField;
|
|
2783
|
-
const cx$
|
|
2793
|
+
const cx$o = classNames$1.bind(styles$7);
|
|
2784
2794
|
function EmployeeSearch({
|
|
2785
2795
|
activeTab,
|
|
2786
2796
|
onTabChange,
|
|
@@ -2799,9 +2809,9 @@ function EmployeeSearch({
|
|
|
2799
2809
|
setSearchInput("");
|
|
2800
2810
|
};
|
|
2801
2811
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2802
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
2803
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2804
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2812
|
+
/* @__PURE__ */ jsx("div", { className: cx$o("search-section"), children: /* @__PURE__ */ jsxs("div", { className: cx$o("search-filters"), children: [
|
|
2813
|
+
/* @__PURE__ */ jsxs("div", { className: cx$o("search-filters-wrap"), children: [
|
|
2814
|
+
/* @__PURE__ */ jsxs("div", { className: cx$o("search-filter-section", "flex-1"), children: [
|
|
2805
2815
|
/* @__PURE__ */ jsx(FormField.Label, { className: "subtitle3 text-body-1", children: "\uC131\uBA85/\uC0AC\uBC88" }),
|
|
2806
2816
|
/* @__PURE__ */ jsx(
|
|
2807
2817
|
TextField$2,
|
|
@@ -2814,12 +2824,12 @@ function EmployeeSearch({
|
|
|
2814
2824
|
rootProps: {
|
|
2815
2825
|
onClear: handleReset,
|
|
2816
2826
|
clearable: true,
|
|
2817
|
-
className: cx$
|
|
2827
|
+
className: cx$o("search-input")
|
|
2818
2828
|
}
|
|
2819
2829
|
}
|
|
2820
2830
|
)
|
|
2821
2831
|
] }),
|
|
2822
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2832
|
+
/* @__PURE__ */ jsxs("div", { className: cx$o("search-filter-section"), children: [
|
|
2823
2833
|
/* @__PURE__ */ jsx(FormField.Label, { className: "subtitle3 text-body-1", children: "\uC0AC\uC6D0 \uAD6C\uBD84" }),
|
|
2824
2834
|
/* @__PURE__ */ jsx(
|
|
2825
2835
|
Select,
|
|
@@ -2833,7 +2843,7 @@ function EmployeeSearch({
|
|
|
2833
2843
|
)
|
|
2834
2844
|
] })
|
|
2835
2845
|
] }),
|
|
2836
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
2846
|
+
/* @__PURE__ */ jsxs("div", { className: cx$o("search-buttons"), children: [
|
|
2837
2847
|
/* @__PURE__ */ jsx(
|
|
2838
2848
|
Button,
|
|
2839
2849
|
{
|
|
@@ -2841,14 +2851,14 @@ function EmployeeSearch({
|
|
|
2841
2851
|
size: "small",
|
|
2842
2852
|
variant: "secondary",
|
|
2843
2853
|
onClick: handleReset,
|
|
2844
|
-
className: cx$
|
|
2854
|
+
className: cx$o("button"),
|
|
2845
2855
|
children: "\uCD08\uAE30\uD654"
|
|
2846
2856
|
}
|
|
2847
2857
|
),
|
|
2848
|
-
/* @__PURE__ */ jsx(Button, { appearance: "filled", size: "small", variant: "primary", onClick: handleSearch, className: cx$
|
|
2858
|
+
/* @__PURE__ */ jsx(Button, { appearance: "filled", size: "small", variant: "primary", onClick: handleSearch, className: cx$o("button"), children: "\uC870\uD68C" })
|
|
2849
2859
|
] })
|
|
2850
2860
|
] }) }),
|
|
2851
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
2861
|
+
/* @__PURE__ */ jsx("div", { className: cx$o("divider") }),
|
|
2852
2862
|
searchTerm && /* @__PURE__ */ jsx(
|
|
2853
2863
|
EmployeeSearchResult,
|
|
2854
2864
|
{
|
|
@@ -3010,15 +3020,15 @@ function JobSearchDetail({ occupationTypeCode, occupationIndustryCode }) {
|
|
|
3010
3020
|
] }) }) });
|
|
3011
3021
|
}
|
|
3012
3022
|
|
|
3013
|
-
const cx$
|
|
3023
|
+
const cx$n = classNames$1.bind(styles$8);
|
|
3014
3024
|
function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
|
|
3015
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3016
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
3025
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$n("category-section"), children: [
|
|
3026
|
+
/* @__PURE__ */ jsxs("p", { className: cx$n("result-title"), children: [
|
|
3017
3027
|
"\uCD1D ",
|
|
3018
3028
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3019
3029
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3020
3030
|
] }),
|
|
3021
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$
|
|
3031
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$n("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3022
3032
|
Accordion.Item,
|
|
3023
3033
|
{
|
|
3024
3034
|
id: `item-${job.occupationIndustryCode}-${index}-accordion`,
|
|
@@ -3048,24 +3058,24 @@ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3048
3058
|
] }) });
|
|
3049
3059
|
}
|
|
3050
3060
|
|
|
3051
|
-
const cx$
|
|
3061
|
+
const cx$m = classNames$1.bind(styles$8);
|
|
3052
3062
|
function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
3053
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3063
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$m("popular-jobs"), children: [
|
|
3054
3064
|
/* @__PURE__ */ jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
|
|
3055
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$
|
|
3065
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$m("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3056
3066
|
Accordion.Item,
|
|
3057
3067
|
{
|
|
3058
3068
|
id: `item-${job.occupationIndustryCode}-${index}`,
|
|
3059
|
-
className: cx$
|
|
3069
|
+
className: cx$m("accordion-item"),
|
|
3060
3070
|
children: [
|
|
3061
|
-
/* @__PURE__ */ jsx(Accordion.HeaderDiv, { className: cx$
|
|
3071
|
+
/* @__PURE__ */ jsx(Accordion.HeaderDiv, { className: cx$m("accordion-header-item"), children: /* @__PURE__ */ jsxs(
|
|
3062
3072
|
Radio.Item,
|
|
3063
3073
|
{
|
|
3064
3074
|
size: "small",
|
|
3065
3075
|
id: `item-radio-${job.occupationIndustryCode}-${index}`,
|
|
3066
3076
|
value: job.occupationIndustryCode,
|
|
3067
3077
|
onChange: () => onJobSelect(job),
|
|
3068
|
-
className: cx$
|
|
3078
|
+
className: cx$m("radio-item"),
|
|
3069
3079
|
children: [
|
|
3070
3080
|
job.occupationIndustryName,
|
|
3071
3081
|
"(",
|
|
@@ -3088,15 +3098,15 @@ function JobSearchFavorite({ filteredJobs, onJobSelect }) {
|
|
|
3088
3098
|
] }) });
|
|
3089
3099
|
}
|
|
3090
3100
|
|
|
3091
|
-
const cx$
|
|
3101
|
+
const cx$l = classNames$1.bind(styles$8);
|
|
3092
3102
|
function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
|
|
3093
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3094
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
3103
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$l("popular-jobs"), children: [
|
|
3104
|
+
/* @__PURE__ */ jsxs("p", { className: cx$l("result-title"), children: [
|
|
3095
3105
|
"\uCD1D ",
|
|
3096
3106
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
|
|
3097
3107
|
"\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
|
|
3098
3108
|
] }),
|
|
3099
|
-
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$
|
|
3109
|
+
/* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", align: "vertical", className: cx$l("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
|
|
3100
3110
|
Accordion.Item,
|
|
3101
3111
|
{
|
|
3102
3112
|
id: `item-${job.occupationIndustryCode}`,
|
|
@@ -3133,7 +3143,7 @@ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
|
|
|
3133
3143
|
}
|
|
3134
3144
|
|
|
3135
3145
|
const { TextField: TextField$1 } = FormField;
|
|
3136
|
-
const cx$
|
|
3146
|
+
const cx$k = classNames$1.bind(styles$8);
|
|
3137
3147
|
const { Option } = Select;
|
|
3138
3148
|
function JobSearch({
|
|
3139
3149
|
activeTab,
|
|
@@ -3171,7 +3181,7 @@ function JobSearch({
|
|
|
3171
3181
|
}
|
|
3172
3182
|
),
|
|
3173
3183
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3174
|
-
activeTab === "jobName" && /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3184
|
+
activeTab === "jobName" && /* @__PURE__ */ jsxs("div", { className: cx$k("favorite-jobs-section"), children: [
|
|
3175
3185
|
/* @__PURE__ */ jsx(
|
|
3176
3186
|
TextField$1,
|
|
3177
3187
|
{
|
|
@@ -3193,8 +3203,8 @@ function JobSearch({
|
|
|
3193
3203
|
!searchTerm && /* @__PURE__ */ jsx(JobSearchFavorite, { filteredJobs, onJobSelect }),
|
|
3194
3204
|
searchTerm && !isLoading && /* @__PURE__ */ jsx(JobSearchResult, { filteredJobs, onJobSelect, searchTerm })
|
|
3195
3205
|
] }),
|
|
3196
|
-
activeTab === "jobCode" && /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3197
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3206
|
+
activeTab === "jobCode" && /* @__PURE__ */ jsxs("div", { className: cx$k("select-jobs-section"), children: [
|
|
3207
|
+
/* @__PURE__ */ jsxs("div", { className: cx$k("category-section"), children: [
|
|
3198
3208
|
/* @__PURE__ */ jsx(
|
|
3199
3209
|
Select,
|
|
3200
3210
|
{
|
|
@@ -3486,20 +3496,20 @@ function useJobSearchModal() {
|
|
|
3486
3496
|
};
|
|
3487
3497
|
}
|
|
3488
3498
|
|
|
3489
|
-
const cx$
|
|
3499
|
+
const cx$j = classNames$1.bind(styles$9);
|
|
3490
3500
|
const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
|
|
3491
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3492
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3501
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$j("grade-section"), children: [
|
|
3502
|
+
/* @__PURE__ */ jsxs("div", { className: cx$j("icon-title"), children: [
|
|
3493
3503
|
/* @__PURE__ */ jsx(IconIllustGrade, {}),
|
|
3494
3504
|
/* @__PURE__ */ jsx("span", { className: "typo-title5 text-body", children: "\uB4F1\uAE09" })
|
|
3495
3505
|
] }),
|
|
3496
3506
|
/* @__PURE__ */ 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." }),
|
|
3497
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3498
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3507
|
+
/* @__PURE__ */ jsxs("div", { className: cx$j("grade-list"), children: [
|
|
3508
|
+
/* @__PURE__ */ jsxs("div", { className: cx$j("grade"), children: [
|
|
3499
3509
|
/* @__PURE__ */ jsx("span", { children: "\uC704\uD5D8\uB4F1\uAE09" }),
|
|
3500
3510
|
/* @__PURE__ */ jsx("span", { className: "text-primary typo-subtitle3", children: riskGrade || "-" })
|
|
3501
3511
|
] }),
|
|
3502
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3512
|
+
/* @__PURE__ */ jsxs("div", { className: cx$j("grade"), children: [
|
|
3503
3513
|
/* @__PURE__ */ jsx("span", { children: "\uC785\uC6D0\uB4F1\uAE09" }),
|
|
3504
3514
|
/* @__PURE__ */ jsx("span", { className: "text-primary typo-subtitle3", children: hospitalizationGrade || "-" })
|
|
3505
3515
|
] })
|
|
@@ -3507,9 +3517,9 @@ const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
|
|
|
3507
3517
|
] });
|
|
3508
3518
|
};
|
|
3509
3519
|
|
|
3510
|
-
const cx$
|
|
3520
|
+
const cx$i = classNames$1.bind(styles$a);
|
|
3511
3521
|
function VehicleSearch({ vehicles, onVehicleSelect, selectedVehicle }) {
|
|
3512
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3522
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$i("vehicle-search-section"), children: [
|
|
3513
3523
|
/* @__PURE__ */ jsx("p", { children: "\uC6B4\uC804 \uCC28\uC885" }),
|
|
3514
3524
|
/* @__PURE__ */ jsx(
|
|
3515
3525
|
Radio.Root,
|
|
@@ -3517,7 +3527,7 @@ function VehicleSearch({ vehicles, onVehicleSelect, selectedVehicle }) {
|
|
|
3517
3527
|
name: "vehicle-selection",
|
|
3518
3528
|
size: "small",
|
|
3519
3529
|
align: "vertical",
|
|
3520
|
-
className: cx$
|
|
3530
|
+
className: cx$i("vehicle-radio-root"),
|
|
3521
3531
|
defaultValue: selectedVehicle?.integrationCodeValue || "",
|
|
3522
3532
|
children: vehicles.map((vehicle, index) => /* @__PURE__ */ jsxs(
|
|
3523
3533
|
Radio.Item,
|
|
@@ -3532,7 +3542,7 @@ function VehicleSearch({ vehicles, onVehicleSelect, selectedVehicle }) {
|
|
|
3532
3542
|
onVehicleSelect(selected);
|
|
3533
3543
|
}
|
|
3534
3544
|
},
|
|
3535
|
-
className: cx$
|
|
3545
|
+
className: cx$i("item"),
|
|
3536
3546
|
children: [
|
|
3537
3547
|
vehicle.integrationCodeValueName,
|
|
3538
3548
|
"(",
|
|
@@ -3611,7 +3621,7 @@ const useJobVehicleSearch = () => {
|
|
|
3611
3621
|
};
|
|
3612
3622
|
};
|
|
3613
3623
|
|
|
3614
|
-
const cx$
|
|
3624
|
+
const cx$h = classNames$1.bind(styles$9);
|
|
3615
3625
|
function useJobVehicleSearchModal() {
|
|
3616
3626
|
const {
|
|
3617
3627
|
selectedVehicle,
|
|
@@ -3680,18 +3690,18 @@ function useJobVehicleSearchModal() {
|
|
|
3680
3690
|
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
3681
3691
|
/* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
|
|
3682
3692
|
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885\xB7\uC6B4\uC804\uCC28\uC885 \uAC80\uC0C9", showCloseButton: true }),
|
|
3683
|
-
/* @__PURE__ */ jsx(Modal.Body, { className: cx$
|
|
3684
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3685
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3693
|
+
/* @__PURE__ */ jsx(Modal.Body, { className: cx$h("job-vehicle-search-modal"), raw: true, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3694
|
+
/* @__PURE__ */ jsxs("div", { className: cx$h("left-panel"), children: [
|
|
3695
|
+
/* @__PURE__ */ jsxs("div", { className: cx$h("card-section"), children: [
|
|
3686
3696
|
/* @__PURE__ */ jsxs(
|
|
3687
3697
|
"div",
|
|
3688
3698
|
{
|
|
3689
|
-
className: cx$
|
|
3699
|
+
className: cx$h("card-menu", { "card-selected": rightPanelView === "jobSearch" }),
|
|
3690
3700
|
onClick: () => setRightPanelView("jobSearch"),
|
|
3691
3701
|
children: [
|
|
3692
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3693
|
-
/* @__PURE__ */ jsx(IconIllustJob, { className: cx$
|
|
3694
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
3702
|
+
/* @__PURE__ */ jsxs("div", { className: cx$h("card-title"), children: [
|
|
3703
|
+
/* @__PURE__ */ jsx(IconIllustJob, { className: cx$h("card-icon") }),
|
|
3704
|
+
/* @__PURE__ */ jsx("span", { className: cx$h("card-text", "typo-title5", "text-body"), children: "\uC9C1\uC885" }),
|
|
3695
3705
|
/* @__PURE__ */ jsx(IconSubUiArrowRight, {})
|
|
3696
3706
|
] }),
|
|
3697
3707
|
/* @__PURE__ */ jsx("div", { className: "typo-body2 text-body_2", children: selectedJob ? selectedJob.occupationIndustryName : "\uBBF8\uC120\uD0DD" })
|
|
@@ -3701,12 +3711,12 @@ function useJobVehicleSearchModal() {
|
|
|
3701
3711
|
/* @__PURE__ */ jsxs(
|
|
3702
3712
|
"div",
|
|
3703
3713
|
{
|
|
3704
|
-
className: cx$
|
|
3714
|
+
className: cx$h("card-menu", { "card-selected": rightPanelView === "vehicleSelection" }),
|
|
3705
3715
|
onClick: () => setRightPanelView("vehicleSelection"),
|
|
3706
3716
|
children: [
|
|
3707
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3708
|
-
/* @__PURE__ */ jsx(IconIllustVehicle, { className: cx$
|
|
3709
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
3717
|
+
/* @__PURE__ */ jsxs("div", { className: cx$h("card-title"), children: [
|
|
3718
|
+
/* @__PURE__ */ jsx(IconIllustVehicle, { className: cx$h("card-icon") }),
|
|
3719
|
+
/* @__PURE__ */ jsx("span", { className: cx$h("card-text", "typo-title5", "text-body"), children: "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885" }),
|
|
3710
3720
|
/* @__PURE__ */ jsx(IconSubUiArrowRight, {})
|
|
3711
3721
|
] }),
|
|
3712
3722
|
/* @__PURE__ */ jsxs("div", { className: "typo-body2 text-body_2", children: [
|
|
@@ -3719,7 +3729,7 @@ function useJobVehicleSearchModal() {
|
|
|
3719
3729
|
] }),
|
|
3720
3730
|
/* @__PURE__ */ jsx(JobVehicleSearchGrade, { riskGrade, hospitalizationGrade })
|
|
3721
3731
|
] }),
|
|
3722
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
3732
|
+
/* @__PURE__ */ jsx("div", { className: cx$h("right-panel"), children: rightPanelView === "jobSearch" ? JobSearch : VehicleSearch })
|
|
3723
3733
|
] }) }),
|
|
3724
3734
|
/* @__PURE__ */ jsx(Modal.Footer, { style: { marginTop: 0 }, children: /* @__PURE__ */ jsx(
|
|
3725
3735
|
Button,
|
|
@@ -3742,27 +3752,27 @@ function useJobVehicleSearchModal() {
|
|
|
3742
3752
|
};
|
|
3743
3753
|
}
|
|
3744
3754
|
|
|
3745
|
-
const cx$
|
|
3755
|
+
const cx$g = classNames$1.bind(styles$b);
|
|
3746
3756
|
function OrganizationSearchResult({
|
|
3747
3757
|
filteredOrganizations,
|
|
3748
3758
|
selectedOrganization,
|
|
3749
3759
|
onOrganizationSelect
|
|
3750
3760
|
}) {
|
|
3751
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3752
|
-
/* @__PURE__ */ jsxs("p", { className: cx$
|
|
3761
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$g("result-section"), children: [
|
|
3762
|
+
/* @__PURE__ */ jsxs("p", { className: cx$g("result-title"), children: [
|
|
3753
3763
|
"\uCD1D ",
|
|
3754
3764
|
/* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredOrganizations.length }),
|
|
3755
3765
|
"\uAC74"
|
|
3756
3766
|
] }),
|
|
3757
3767
|
/* @__PURE__ */ jsxs(Table, { variant: "vertical", style: { tableLayout: "fixed" }, height: "292px", children: [
|
|
3758
3768
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
3759
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
3760
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
3761
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
3762
|
-
/* @__PURE__ */ jsx("th", { className: cx$
|
|
3769
|
+
/* @__PURE__ */ jsx("th", { className: cx$g("th-padding", "select-col"), children: "\uC120\uD0DD" }),
|
|
3770
|
+
/* @__PURE__ */ jsx("th", { className: cx$g("th-padding"), children: "\uAE30\uAD00\uCF54\uB4DC" }),
|
|
3771
|
+
/* @__PURE__ */ jsx("th", { className: cx$g("th-padding"), children: "\uAE30\uAD00\uC774\uB984" }),
|
|
3772
|
+
/* @__PURE__ */ jsx("th", { className: cx$g("th-padding"), children: "\uD3D0\uC1C4\uC77C\uC790" })
|
|
3763
3773
|
] }) }),
|
|
3764
3774
|
/* @__PURE__ */ jsx("tbody", { children: filteredOrganizations.length > 0 ? filteredOrganizations.map((organization, index) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
3765
|
-
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$
|
|
3775
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: cx$g("td-padding"), children: /* @__PURE__ */ jsx(
|
|
3766
3776
|
Radio.Item,
|
|
3767
3777
|
{
|
|
3768
3778
|
id: `radio-${index}`,
|
|
@@ -3778,7 +3788,7 @@ function OrganizationSearchResult({
|
|
|
3778
3788
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: "td-padding", children: organization.organizationCode }) }),
|
|
3779
3789
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: "td-padding", children: organization.organizationName }) }),
|
|
3780
3790
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: "td-padding", children: organization.closeDate }) })
|
|
3781
|
-
] }, `${organization.organizationCode}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 4, children: /* @__PURE__ */ jsxs("div", { className: cx$
|
|
3791
|
+
] }, `${organization.organizationCode}-${index}`)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 4, children: /* @__PURE__ */ jsxs("div", { className: cx$g("no-result"), children: [
|
|
3782
3792
|
/* @__PURE__ */ jsx(IconGraphicsFeedbackEmpty, {}),
|
|
3783
3793
|
/* @__PURE__ */ jsx("p", { children: "\uC870\uD68C \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
3784
3794
|
/* @__PURE__ */ jsx("p", { children: "\uC785\uB825\uD55C \uC815\uBCF4\uB97C \uB2E4\uC2DC \uD655\uC778\uD574\uC8FC\uC138\uC694." })
|
|
@@ -3788,7 +3798,7 @@ function OrganizationSearchResult({
|
|
|
3788
3798
|
}
|
|
3789
3799
|
|
|
3790
3800
|
const { TextField } = FormField;
|
|
3791
|
-
const cx$
|
|
3801
|
+
const cx$f = classNames$1.bind(styles$b);
|
|
3792
3802
|
function OrganizationSearch({
|
|
3793
3803
|
searchTerm,
|
|
3794
3804
|
setSearchTerm,
|
|
@@ -3805,8 +3815,8 @@ function OrganizationSearch({
|
|
|
3805
3815
|
setSearchInput("");
|
|
3806
3816
|
};
|
|
3807
3817
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3808
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
3809
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3818
|
+
/* @__PURE__ */ jsx("div", { className: cx$f("search-section"), children: /* @__PURE__ */ jsxs("div", { className: cx$f("search-filters"), children: [
|
|
3819
|
+
/* @__PURE__ */ jsxs("div", { className: cx$f("search-filter-section"), children: [
|
|
3810
3820
|
/* @__PURE__ */ jsx(FormField.Label, { className: "subtitle3 text-body-1", children: "\uAE30\uAD00\uCF54\uB4DC(\uBA85)" }),
|
|
3811
3821
|
/* @__PURE__ */ jsx(
|
|
3812
3822
|
TextField,
|
|
@@ -3817,19 +3827,19 @@ function OrganizationSearch({
|
|
|
3817
3827
|
size: "small",
|
|
3818
3828
|
onKeyUp: (e) => isEnter(e) && handleSearch(),
|
|
3819
3829
|
rootProps: {
|
|
3820
|
-
className: cx$
|
|
3830
|
+
className: cx$f("search-input"),
|
|
3821
3831
|
clearable: true,
|
|
3822
3832
|
onClear: handleReset
|
|
3823
3833
|
}
|
|
3824
3834
|
}
|
|
3825
3835
|
)
|
|
3826
3836
|
] }),
|
|
3827
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
3828
|
-
/* @__PURE__ */ jsx(Button, { appearance: "outline", size: "small", variant: "secondary", className: cx$
|
|
3829
|
-
/* @__PURE__ */ jsx(Button, { appearance: "filled", size: "small", variant: "primary", className: cx$
|
|
3837
|
+
/* @__PURE__ */ jsxs("div", { className: cx$f("search-buttons"), children: [
|
|
3838
|
+
/* @__PURE__ */ jsx(Button, { appearance: "outline", size: "small", variant: "secondary", className: cx$f("button"), onClick: handleReset, children: "\uCD08\uAE30\uD654" }),
|
|
3839
|
+
/* @__PURE__ */ jsx(Button, { appearance: "filled", size: "small", variant: "primary", className: cx$f("button"), onClick: handleSearch, children: "\uC870\uD68C" })
|
|
3830
3840
|
] })
|
|
3831
3841
|
] }) }),
|
|
3832
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
3842
|
+
/* @__PURE__ */ jsx("div", { className: cx$f("divider") }),
|
|
3833
3843
|
searchTerm && /* @__PURE__ */ jsx(
|
|
3834
3844
|
OrganizationSearchResult,
|
|
3835
3845
|
{
|
|
@@ -3917,14 +3927,14 @@ const OrganizationSearchModal = ({
|
|
|
3917
3927
|
] });
|
|
3918
3928
|
};
|
|
3919
3929
|
|
|
3920
|
-
const cx$
|
|
3930
|
+
const cx$e = classNames$1.bind(styles$a);
|
|
3921
3931
|
function JobVehicleSearchModal({ onClose }) {
|
|
3922
3932
|
const { selectedVehicle, VehicleSearchComponent } = useVehicleSearch();
|
|
3923
3933
|
return /* @__PURE__ */ jsxs(Modal.Root, { isOpen: true, onClose, modalSize: "xlarge", children: [
|
|
3924
3934
|
/* @__PURE__ */ jsx(Modal.Overlay, {}),
|
|
3925
3935
|
/* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
|
|
3926
3936
|
/* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC6B4\uC804\uCC28\uC885 \uAC80\uC0C9", showCloseButton: true }),
|
|
3927
|
-
/* @__PURE__ */ jsx(Modal.Body, { className: cx$
|
|
3937
|
+
/* @__PURE__ */ jsx(Modal.Body, { className: cx$e("job-vehicle-search-modal"), raw: true, children: VehicleSearchComponent }),
|
|
3928
3938
|
/* @__PURE__ */ jsx(Modal.Footer, { style: { marginTop: 0 }, children: /* @__PURE__ */ jsxs(Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: onClose, children: [
|
|
3929
3939
|
"\uD655\uC778(",
|
|
3930
3940
|
selectedVehicle?.integrationCodeValueName || "\uBBF8\uC120\uD0DD",
|
|
@@ -4242,7 +4252,7 @@ const HookFormDateRangePickerRenew = ({
|
|
|
4242
4252
|
return /* @__PURE__ */ jsx(DatePickerRangeRenew, { startDateProps: startDateMergedProps, endDateProps: endDateMergedProps });
|
|
4243
4253
|
};
|
|
4244
4254
|
|
|
4245
|
-
const cx$
|
|
4255
|
+
const cx$d = classNames$1.bind(styles$c);
|
|
4246
4256
|
const StepIndicator = ({
|
|
4247
4257
|
items,
|
|
4248
4258
|
onClickItem,
|
|
@@ -4277,26 +4287,26 @@ const StepIndicator = ({
|
|
|
4277
4287
|
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");
|
|
4278
4288
|
}
|
|
4279
4289
|
};
|
|
4280
|
-
return /* @__PURE__ */ jsxs("div", { className: cx$
|
|
4281
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
4290
|
+
return /* @__PURE__ */ jsxs("div", { className: cx$d("stepper-layout", { loading: isLoading }), children: [
|
|
4291
|
+
/* @__PURE__ */ jsx("div", { className: cx$d("stepper"), children: steps.map((item, idx) => /* @__PURE__ */ jsxs(React9.Fragment, { children: [
|
|
4282
4292
|
/* @__PURE__ */ jsx(
|
|
4283
4293
|
"div",
|
|
4284
4294
|
{
|
|
4285
|
-
className: cx$
|
|
4295
|
+
className: cx$d(
|
|
4286
4296
|
"circle",
|
|
4287
4297
|
{ completed: item.isCompleted ?? false },
|
|
4288
4298
|
{ active: defaultValue === item.value || current === idx }
|
|
4289
4299
|
),
|
|
4290
4300
|
onClick: () => handleClickStep?.(item),
|
|
4291
|
-
children: item.isCompleted ? /* @__PURE__ */ jsx("span", { className: cx$
|
|
4301
|
+
children: item.isCompleted ? /* @__PURE__ */ jsx("span", { className: cx$d("completed-icon") }) : idx + 1
|
|
4292
4302
|
}
|
|
4293
4303
|
),
|
|
4294
|
-
idx < steps.length - 1 && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsx("span", { className: cx$
|
|
4304
|
+
idx < steps.length - 1 && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsx("span", { className: cx$d("dot") }, `dot-${idx}-${dotIdx}`))
|
|
4295
4305
|
] }, `num-${idx}`)) }),
|
|
4296
|
-
/* @__PURE__ */ jsx("ul", { className: cx$
|
|
4306
|
+
/* @__PURE__ */ jsx("ul", { className: cx$d("step-labels"), children: steps.map((item, idx) => /* @__PURE__ */ jsx(
|
|
4297
4307
|
"li",
|
|
4298
4308
|
{
|
|
4299
|
-
className: cx$
|
|
4309
|
+
className: cx$d(
|
|
4300
4310
|
{ completed: steps[idx < 1 ? idx : idx - 1]?.isCompleted ?? false },
|
|
4301
4311
|
{ active: defaultValue === item.value || current === idx }
|
|
4302
4312
|
),
|
|
@@ -4308,15 +4318,17 @@ const StepIndicator = ({
|
|
|
4308
4318
|
] });
|
|
4309
4319
|
};
|
|
4310
4320
|
|
|
4311
|
-
const cx$
|
|
4321
|
+
const cx$c = classNames$1.bind(styles$d);
|
|
4312
4322
|
function Attachment({
|
|
4313
4323
|
photos,
|
|
4314
4324
|
onAddPhoto,
|
|
4315
4325
|
onRemovePhoto,
|
|
4316
4326
|
show,
|
|
4317
4327
|
type = "multiple",
|
|
4318
|
-
buttonText
|
|
4328
|
+
buttonText,
|
|
4329
|
+
maxPhotos
|
|
4319
4330
|
}) {
|
|
4331
|
+
const resolvedMaxPhotos = maxPhotos ?? (type === "single" ? 1 : 4);
|
|
4320
4332
|
const handleAddPhoto = () => {
|
|
4321
4333
|
onAddPhoto();
|
|
4322
4334
|
};
|
|
@@ -4325,17 +4337,17 @@ function Attachment({
|
|
|
4325
4337
|
};
|
|
4326
4338
|
const renderPhotoSingle = () => {
|
|
4327
4339
|
if (photos.length === 0) {
|
|
4328
|
-
return /* @__PURE__ */ jsx("div", { className: cx$
|
|
4340
|
+
return /* @__PURE__ */ jsx("div", { className: cx$c("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx$c("add-photo-button-single"), onClick: handleAddPhoto, children: [
|
|
4329
4341
|
/* @__PURE__ */ jsx(IconIllustCamera, {}),
|
|
4330
4342
|
/* @__PURE__ */ jsx("span", { children: buttonText || "\uC0AC\uC9C4 \uCCA8\uBD80\uD558\uAE30" })
|
|
4331
4343
|
] }) });
|
|
4332
4344
|
}
|
|
4333
|
-
return photos.map((photo) => /* @__PURE__ */ jsxs("div", { className: cx$
|
|
4334
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
4345
|
+
return photos.map((photo) => /* @__PURE__ */ jsxs("div", { className: cx$c("single-photo-item"), children: [
|
|
4346
|
+
/* @__PURE__ */ jsx("div", { className: cx$c("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx$c("photo-image") }) }),
|
|
4335
4347
|
/* @__PURE__ */ jsx(
|
|
4336
4348
|
"button",
|
|
4337
4349
|
{
|
|
4338
|
-
className: cx$
|
|
4350
|
+
className: cx$c("remove-button", "dsp-icons", "dsp-icons-icons-sub-ui-reset"),
|
|
4339
4351
|
onClick: () => handleRemovePhoto(photo.id),
|
|
4340
4352
|
"aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C"
|
|
4341
4353
|
}
|
|
@@ -4343,18 +4355,17 @@ function Attachment({
|
|
|
4343
4355
|
] }, photo.id));
|
|
4344
4356
|
};
|
|
4345
4357
|
const renderPhotoGrid = () => {
|
|
4346
|
-
const maxPhotos = type === "single" ? 1 : 4;
|
|
4347
4358
|
const gridItems = [];
|
|
4348
|
-
if (photos.length <
|
|
4359
|
+
if (photos.length < resolvedMaxPhotos) {
|
|
4349
4360
|
gridItems.push(
|
|
4350
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
4361
|
+
/* @__PURE__ */ jsx("div", { className: cx$c("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx$c("add-photo-button"), onClick: handleAddPhoto, children: [
|
|
4351
4362
|
/* @__PURE__ */ jsx(IconIllustCamera, {}),
|
|
4352
4363
|
/* @__PURE__ */ jsx("span", { children: buttonText || "\uCCA8\uBD80\uD558\uAE30" }),
|
|
4353
|
-
/* @__PURE__ */ jsxs("span", { className: cx$
|
|
4364
|
+
/* @__PURE__ */ jsxs("span", { className: cx$c("photo-count"), children: [
|
|
4354
4365
|
"(",
|
|
4355
|
-
/* @__PURE__ */ jsx("span", { className: cx$
|
|
4366
|
+
/* @__PURE__ */ jsx("span", { className: cx$c("photo-count-number"), children: photos.length }),
|
|
4356
4367
|
"/",
|
|
4357
|
-
|
|
4368
|
+
resolvedMaxPhotos,
|
|
4358
4369
|
")"
|
|
4359
4370
|
] })
|
|
4360
4371
|
] }) }, "add-photo")
|
|
@@ -4362,12 +4373,12 @@ function Attachment({
|
|
|
4362
4373
|
}
|
|
4363
4374
|
photos.forEach((photo) => {
|
|
4364
4375
|
gridItems.push(
|
|
4365
|
-
/* @__PURE__ */ jsxs("div", { className: cx$
|
|
4366
|
-
/* @__PURE__ */ jsx("div", { className: cx$
|
|
4376
|
+
/* @__PURE__ */ jsxs("div", { className: cx$c("photo-item"), children: [
|
|
4377
|
+
/* @__PURE__ */ jsx("div", { className: cx$c("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx$c("photo-image") }) }),
|
|
4367
4378
|
/* @__PURE__ */ jsx(
|
|
4368
4379
|
"button",
|
|
4369
4380
|
{
|
|
4370
|
-
className: cx$
|
|
4381
|
+
className: cx$c("remove-button", "dsp-icons", "dsp-icons-icons-sub-ui-reset"),
|
|
4371
4382
|
onClick: () => handleRemovePhoto(photo.id),
|
|
4372
4383
|
"aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C"
|
|
4373
4384
|
}
|
|
@@ -4382,9 +4393,96 @@ function Attachment({
|
|
|
4382
4393
|
return null;
|
|
4383
4394
|
}
|
|
4384
4395
|
if (type === "single") {
|
|
4385
|
-
return /* @__PURE__ */ jsx("div", { className: cx$
|
|
4396
|
+
return /* @__PURE__ */ jsx("div", { className: cx$c("photo-single"), children: renderPhotoSingle() });
|
|
4397
|
+
}
|
|
4398
|
+
return /* @__PURE__ */ jsx("div", { className: cx$c("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
|
|
4399
|
+
}
|
|
4400
|
+
|
|
4401
|
+
const CAMERA_DEBUG_STORAGE_KEY = "dsp-camera-debug";
|
|
4402
|
+
const CAMERA_DEBUG_COOKIE_VALUE = "camera";
|
|
4403
|
+
const DEBUG_FILTER_COOKIE_KEY = "dsp-debug-mode-filter-name=";
|
|
4404
|
+
function isCameraDebugEnabled() {
|
|
4405
|
+
if (typeof window === "undefined") {
|
|
4406
|
+
return false;
|
|
4407
|
+
}
|
|
4408
|
+
const localStorageEnabled = getLocalStorageDebugEnabled();
|
|
4409
|
+
const cookieEnabled = typeof document !== "undefined" && document.cookie.split(";").some((cookie) => cookie.trim().startsWith(DEBUG_FILTER_COOKIE_KEY) && cookie.includes(CAMERA_DEBUG_COOKIE_VALUE));
|
|
4410
|
+
return localStorageEnabled || cookieEnabled;
|
|
4411
|
+
}
|
|
4412
|
+
function logCameraDebug(message, detail) {
|
|
4413
|
+
if (!isCameraDebugEnabled()) {
|
|
4414
|
+
return;
|
|
4415
|
+
}
|
|
4416
|
+
console.debug(`[camera] ${message}`, detail ?? "");
|
|
4417
|
+
}
|
|
4418
|
+
function logCameraError(message, error) {
|
|
4419
|
+
console.error(`[camera] ${message}`, error ?? "");
|
|
4420
|
+
}
|
|
4421
|
+
function getLocalStorageDebugEnabled() {
|
|
4422
|
+
try {
|
|
4423
|
+
return window.localStorage?.getItem(CAMERA_DEBUG_STORAGE_KEY) === "true";
|
|
4424
|
+
} catch {
|
|
4425
|
+
return false;
|
|
4386
4426
|
}
|
|
4387
|
-
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
const MIN_PAGE_LIMIT = 1;
|
|
4430
|
+
const MAX_PAGE_LIMIT = 20;
|
|
4431
|
+
function clampPageLimit(pageLimit) {
|
|
4432
|
+
if (!pageLimit || Number.isNaN(pageLimit)) {
|
|
4433
|
+
return MIN_PAGE_LIMIT;
|
|
4434
|
+
}
|
|
4435
|
+
return Math.min(MAX_PAGE_LIMIT, Math.max(MIN_PAGE_LIMIT, Math.floor(pageLimit)));
|
|
4436
|
+
}
|
|
4437
|
+
async function convertSourceToFile(source, convertType) {
|
|
4438
|
+
if (source.kind === "file") {
|
|
4439
|
+
return source.file;
|
|
4440
|
+
}
|
|
4441
|
+
if (source.kind === "base64") {
|
|
4442
|
+
return base64ToFile(source.uri, "image.jpg");
|
|
4443
|
+
}
|
|
4444
|
+
return imageUrlToFile(source.uri, convertType);
|
|
4445
|
+
}
|
|
4446
|
+
async function captureNativeDocuments({ pageLimit }) {
|
|
4447
|
+
const clampedPageLimit = clampPageLimit(pageLimit);
|
|
4448
|
+
logCameraDebug("native documentCapture requested", { pageLimit: clampedPageLimit });
|
|
4449
|
+
const response = await Bridge.native.documentCapture({ pageLimit: clampedPageLimit });
|
|
4450
|
+
if (response.uris && response.uris.length > 0) {
|
|
4451
|
+
logCameraDebug("native documentCapture android uris", { count: response.uris.length });
|
|
4452
|
+
return response.uris.map((uri) => ({ kind: "scheme", uri }));
|
|
4453
|
+
}
|
|
4454
|
+
if (response.sessionId) {
|
|
4455
|
+
return pullIosSession(response.sessionId, response.count ?? 0);
|
|
4456
|
+
}
|
|
4457
|
+
logCameraDebug("native documentCapture canceled or empty");
|
|
4458
|
+
return [];
|
|
4459
|
+
}
|
|
4460
|
+
async function pullIosSession(sessionId, count) {
|
|
4461
|
+
logCameraDebug("native documentCapture ios session", { sessionId, count });
|
|
4462
|
+
const sources = [];
|
|
4463
|
+
try {
|
|
4464
|
+
for (let index = 0; index < count; index += 1) {
|
|
4465
|
+
const { base64 } = await Bridge.native.documentCaptureNext({ sessionId, index });
|
|
4466
|
+
sources.push({ kind: "base64", uri: base64 });
|
|
4467
|
+
}
|
|
4468
|
+
} catch (error) {
|
|
4469
|
+
logCameraError("native documentCaptureNext failed", error);
|
|
4470
|
+
} finally {
|
|
4471
|
+
await Bridge.native.documentCaptureEnd({ sessionId });
|
|
4472
|
+
logCameraDebug("native documentCaptureEnd called", { sessionId });
|
|
4473
|
+
}
|
|
4474
|
+
return sources;
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4477
|
+
const DEFAULT_CAPTURE_ENGINE_TYPE = "input";
|
|
4478
|
+
function resolveCaptureEngineType(options) {
|
|
4479
|
+
if (options.captureEngineType) {
|
|
4480
|
+
return options.captureEngineType;
|
|
4481
|
+
}
|
|
4482
|
+
if (options.useNativeCamera) {
|
|
4483
|
+
return "native";
|
|
4484
|
+
}
|
|
4485
|
+
return DEFAULT_CAPTURE_ENGINE_TYPE;
|
|
4388
4486
|
}
|
|
4389
4487
|
|
|
4390
4488
|
const maxImageSize = 300 * 1024;
|
|
@@ -4560,161 +4658,259 @@ function resize(image, options = { ext: "jpeg", filesize: maxImageSize }) {
|
|
|
4560
4658
|
});
|
|
4561
4659
|
}
|
|
4562
4660
|
|
|
4563
|
-
const
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
cameraOnly,
|
|
4575
|
-
onDelete,
|
|
4576
|
-
show,
|
|
4577
|
-
type = "multiple",
|
|
4578
|
-
buttonText,
|
|
4579
|
-
initData,
|
|
4580
|
-
useNativeCamera = false,
|
|
4581
|
-
responseFileType,
|
|
4582
|
-
convertType = "canvas"
|
|
4583
|
-
} = {}) {
|
|
4584
|
-
const convertedInitData = initData?.map((data, index) => ({ ...data, id: String(index + 1) }));
|
|
4585
|
-
const [attachedPhotos, setAttachedPhotos] = useState(convertedInitData || []);
|
|
4586
|
-
const findImage = (imageId) => {
|
|
4587
|
-
return attachedPhotos.find((image) => image.id === imageId);
|
|
4661
|
+
const cx$b = classNames$1.bind(styles$d);
|
|
4662
|
+
const VIDEO_CAPTURE_MIME_TYPE = "image/jpeg";
|
|
4663
|
+
const VIDEO_CAPTURE_QUALITY = 0.92;
|
|
4664
|
+
function createVideoCaptureConstraints() {
|
|
4665
|
+
return {
|
|
4666
|
+
audio: false,
|
|
4667
|
+
video: {
|
|
4668
|
+
facingMode: { ideal: "environment" },
|
|
4669
|
+
width: { ideal: 1920 },
|
|
4670
|
+
height: { ideal: 1080 }
|
|
4671
|
+
}
|
|
4588
4672
|
};
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4673
|
+
}
|
|
4674
|
+
async function createVideoCaptureFile(video) {
|
|
4675
|
+
const width = video.videoWidth;
|
|
4676
|
+
const height = video.videoHeight;
|
|
4677
|
+
if (width <= 0 || height <= 0) {
|
|
4678
|
+
throw new Error("Video frame is not ready");
|
|
4679
|
+
}
|
|
4680
|
+
const canvas = document.createElement("canvas");
|
|
4681
|
+
canvas.width = width;
|
|
4682
|
+
canvas.height = height;
|
|
4683
|
+
const context = canvas.getContext("2d");
|
|
4684
|
+
if (!context) {
|
|
4685
|
+
throw new Error("Canvas 2D context is not available");
|
|
4686
|
+
}
|
|
4687
|
+
context.drawImage(video, 0, 0, width, height);
|
|
4688
|
+
const blob = await canvasToBlob(canvas);
|
|
4689
|
+
return new File([blob], `camera-video-${Date.now()}.jpg`, {
|
|
4690
|
+
type: blob.type || VIDEO_CAPTURE_MIME_TYPE,
|
|
4691
|
+
lastModified: Date.now()
|
|
4692
|
+
});
|
|
4693
|
+
}
|
|
4694
|
+
function VideoCaptureModal({ open, onCapture, onClose, maxShots = 1 }) {
|
|
4695
|
+
const videoRef = useRef(null);
|
|
4696
|
+
const streamRef = useRef(null);
|
|
4697
|
+
const [errorMessage, setErrorMessage] = useState(null);
|
|
4698
|
+
const [isReady, setIsReady] = useState(false);
|
|
4699
|
+
const [isCapturing, setIsCapturing] = useState(false);
|
|
4700
|
+
const [capturedShots, setCapturedShots] = useState([]);
|
|
4701
|
+
const normalizedMaxShots = maxShots > 0 ? maxShots : 1;
|
|
4702
|
+
const isMultiShot = normalizedMaxShots > 1;
|
|
4703
|
+
const canCaptureMore = capturedShots.length < normalizedMaxShots;
|
|
4704
|
+
const revokeAllPreviewUrls = (shots) => {
|
|
4705
|
+
shots.forEach((shot) => URL.revokeObjectURL(shot.previewUrl));
|
|
4706
|
+
};
|
|
4707
|
+
useEffect(() => {
|
|
4708
|
+
if (!open) {
|
|
4709
|
+
setCapturedShots((prev) => {
|
|
4710
|
+
revokeAllPreviewUrls(prev);
|
|
4711
|
+
return [];
|
|
4712
|
+
});
|
|
4713
|
+
return void 0;
|
|
4599
4714
|
}
|
|
4600
|
-
|
|
4601
|
-
|
|
4715
|
+
let canceled = false;
|
|
4716
|
+
const startVideoStream = async () => {
|
|
4717
|
+
try {
|
|
4718
|
+
setErrorMessage(null);
|
|
4719
|
+
setIsReady(false);
|
|
4720
|
+
logCameraDebug("video engine stream request");
|
|
4721
|
+
if (!navigator.mediaDevices?.getUserMedia) {
|
|
4722
|
+
throw new Error("mediaDevices.getUserMedia is not supported");
|
|
4723
|
+
}
|
|
4724
|
+
const stream = await navigator.mediaDevices.getUserMedia(createVideoCaptureConstraints());
|
|
4725
|
+
if (canceled) {
|
|
4726
|
+
stopVideoStream(stream);
|
|
4727
|
+
return;
|
|
4728
|
+
}
|
|
4729
|
+
streamRef.current = stream;
|
|
4730
|
+
if (!videoRef.current) {
|
|
4731
|
+
throw new Error("Video element is not mounted");
|
|
4732
|
+
}
|
|
4733
|
+
videoRef.current.srcObject = stream;
|
|
4734
|
+
await videoRef.current.play();
|
|
4735
|
+
if (canceled) {
|
|
4736
|
+
stopVideoStream(stream);
|
|
4737
|
+
return;
|
|
4738
|
+
}
|
|
4739
|
+
if (isVideoFrameReady(videoRef.current)) {
|
|
4740
|
+
setIsReady(true);
|
|
4741
|
+
}
|
|
4742
|
+
logCameraDebug("video engine stream ready");
|
|
4743
|
+
} catch (error) {
|
|
4744
|
+
if (canceled) {
|
|
4745
|
+
return;
|
|
4746
|
+
}
|
|
4747
|
+
logCameraError("video engine stream failed", error);
|
|
4748
|
+
setErrorMessage("\uCE74\uBA54\uB77C\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.");
|
|
4749
|
+
}
|
|
4750
|
+
};
|
|
4751
|
+
void startVideoStream();
|
|
4752
|
+
return () => {
|
|
4753
|
+
canceled = true;
|
|
4754
|
+
stopVideoStream(streamRef.current);
|
|
4755
|
+
streamRef.current = null;
|
|
4756
|
+
logCameraDebug("video engine stream stopped");
|
|
4757
|
+
};
|
|
4758
|
+
}, [open]);
|
|
4759
|
+
const handleLoadedMetadata = () => {
|
|
4760
|
+
if (!videoRef.current) {
|
|
4761
|
+
return;
|
|
4602
4762
|
}
|
|
4763
|
+
setIsReady(isVideoFrameReady(videoRef.current));
|
|
4603
4764
|
};
|
|
4604
|
-
const
|
|
4605
|
-
if (
|
|
4606
|
-
|
|
4607
|
-
await imageHandler(file);
|
|
4608
|
-
} else {
|
|
4609
|
-
const file = await base64ToFile(uri, "image.jpg");
|
|
4610
|
-
await imageHandler(file);
|
|
4765
|
+
const handleCapture = async () => {
|
|
4766
|
+
if (!videoRef.current || isCapturing || !canCaptureMore) {
|
|
4767
|
+
return;
|
|
4611
4768
|
}
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
} else {
|
|
4620
|
-
Bridge.native.documentCapture({ responseFileType: responseFileType || "base64" }).then(async ({ uri }) => {
|
|
4621
|
-
processImage(uri);
|
|
4622
|
-
});
|
|
4623
|
-
}
|
|
4624
|
-
} else {
|
|
4625
|
-
const input = document.createElement("input");
|
|
4626
|
-
input.type = "file";
|
|
4627
|
-
input.accept = "image/*";
|
|
4628
|
-
if (cameraOnly) {
|
|
4629
|
-
input.capture = "camera";
|
|
4769
|
+
try {
|
|
4770
|
+
setIsCapturing(true);
|
|
4771
|
+
const file = await createVideoCaptureFile(videoRef.current);
|
|
4772
|
+
logCameraDebug("video engine capture completed", { size: file.size, type: file.type });
|
|
4773
|
+
if (isMultiShot) {
|
|
4774
|
+
setCapturedShots((prev) => [...prev, { file, previewUrl: URL.createObjectURL(file) }]);
|
|
4775
|
+
return;
|
|
4630
4776
|
}
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
}
|
|
4639
|
-
}
|
|
4640
|
-
document.body.removeChild(input);
|
|
4641
|
-
});
|
|
4642
|
-
input.style.display = "none";
|
|
4643
|
-
document.body.appendChild(input);
|
|
4644
|
-
input.click();
|
|
4777
|
+
await onCapture([file]);
|
|
4778
|
+
onClose();
|
|
4779
|
+
} catch (error) {
|
|
4780
|
+
logCameraError("video engine capture failed", error);
|
|
4781
|
+
setErrorMessage("\uCD2C\uC601 \uC774\uBBF8\uC9C0\uB97C \uCC98\uB9AC\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");
|
|
4782
|
+
} finally {
|
|
4783
|
+
setIsCapturing(false);
|
|
4645
4784
|
}
|
|
4646
4785
|
};
|
|
4647
|
-
const
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
}
|
|
4786
|
+
const handleComplete = async () => {
|
|
4787
|
+
if (capturedShots.length === 0) {
|
|
4788
|
+
return;
|
|
4789
|
+
}
|
|
4790
|
+
try {
|
|
4791
|
+
await onCapture(capturedShots.map((shot) => shot.file));
|
|
4792
|
+
onClose();
|
|
4793
|
+
} catch (error) {
|
|
4794
|
+
logCameraError("video engine multi-shot complete failed", error);
|
|
4795
|
+
setErrorMessage("\uCD2C\uC601 \uC774\uBBF8\uC9C0\uB97C \uCC98\uB9AC\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.");
|
|
4658
4796
|
}
|
|
4659
4797
|
};
|
|
4660
|
-
const
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
if (
|
|
4664
|
-
|
|
4798
|
+
const handleRemoveCapturedShot = (targetIndex) => {
|
|
4799
|
+
setCapturedShots((prev) => {
|
|
4800
|
+
const target = prev[targetIndex];
|
|
4801
|
+
if (target) {
|
|
4802
|
+
URL.revokeObjectURL(target.previewUrl);
|
|
4665
4803
|
}
|
|
4804
|
+
return prev.filter((_, index) => index !== targetIndex);
|
|
4666
4805
|
});
|
|
4667
|
-
setAttachedPhotos([]);
|
|
4668
4806
|
};
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
let blobUrl = "";
|
|
4699
|
-
if (item.data instanceof Blob) {
|
|
4700
|
-
blobUrl = URL.createObjectURL(item.data);
|
|
4701
|
-
} else if (typeof item.data === "string") {
|
|
4702
|
-
blobUrl = URL.createObjectURL(base64ToBlob(item.data));
|
|
4807
|
+
if (!open) {
|
|
4808
|
+
return null;
|
|
4809
|
+
}
|
|
4810
|
+
return /* @__PURE__ */ jsx("div", { className: cx$b("video-capture-overlay"), role: "dialog", "aria-modal": "true", "aria-label": "\uCE74\uBA54\uB77C \uCD2C\uC601", children: /* @__PURE__ */ jsxs("div", { className: cx$b("video-capture-dialog"), children: [
|
|
4811
|
+
/* @__PURE__ */ jsx(
|
|
4812
|
+
"video",
|
|
4813
|
+
{
|
|
4814
|
+
ref: videoRef,
|
|
4815
|
+
className: cx$b("video-capture-view"),
|
|
4816
|
+
autoPlay: true,
|
|
4817
|
+
muted: true,
|
|
4818
|
+
playsInline: true,
|
|
4819
|
+
onLoadedMetadata: handleLoadedMetadata
|
|
4820
|
+
}
|
|
4821
|
+
),
|
|
4822
|
+
errorMessage ? /* @__PURE__ */ jsx("p", { className: cx$b("video-capture-error"), role: "alert", children: errorMessage }) : null,
|
|
4823
|
+
isMultiShot ? /* @__PURE__ */ jsxs("div", { className: cx$b("video-capture-thumbnails"), "aria-live": "polite", children: [
|
|
4824
|
+
/* @__PURE__ */ jsxs("p", { className: cx$b("video-capture-counter"), children: [
|
|
4825
|
+
capturedShots.length,
|
|
4826
|
+
"/",
|
|
4827
|
+
normalizedMaxShots
|
|
4828
|
+
] }),
|
|
4829
|
+
capturedShots.length > 0 ? /* @__PURE__ */ jsx("ul", { className: cx$b("video-capture-thumbnail-list"), children: capturedShots.map((shot, index) => /* @__PURE__ */ jsxs("li", { className: cx$b("video-capture-thumbnail-item"), children: [
|
|
4830
|
+
/* @__PURE__ */ jsx(
|
|
4831
|
+
"img",
|
|
4832
|
+
{
|
|
4833
|
+
src: shot.previewUrl,
|
|
4834
|
+
alt: `\uCD2C\uC601 ${index + 1}\uBC88 \uC0AC\uC9C4`,
|
|
4835
|
+
className: cx$b("video-capture-thumbnail-image")
|
|
4703
4836
|
}
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4837
|
+
),
|
|
4838
|
+
/* @__PURE__ */ jsx(
|
|
4839
|
+
"button",
|
|
4840
|
+
{
|
|
4841
|
+
type: "button",
|
|
4842
|
+
className: cx$b("video-capture-thumbnail-remove"),
|
|
4843
|
+
onClick: () => handleRemoveCapturedShot(index),
|
|
4844
|
+
"aria-label": `\uCD2C\uC601 ${index + 1}\uBC88 \uC0AC\uC9C4 \uC0AD\uC81C`,
|
|
4845
|
+
children: "\xD7"
|
|
4846
|
+
}
|
|
4847
|
+
)
|
|
4848
|
+
] }, shot.previewUrl)) }) : null
|
|
4849
|
+
] }) : null,
|
|
4850
|
+
/* @__PURE__ */ jsxs("div", { className: cx$b("video-capture-actions"), children: [
|
|
4851
|
+
/* @__PURE__ */ jsx("button", { className: cx$b("video-capture-button", "video-capture-secondary"), type: "button", onClick: onClose, children: "\uB2EB\uAE30" }),
|
|
4852
|
+
/* @__PURE__ */ jsx(
|
|
4853
|
+
"button",
|
|
4854
|
+
{
|
|
4855
|
+
className: cx$b("video-capture-button", "video-capture-primary"),
|
|
4856
|
+
type: "button",
|
|
4857
|
+
disabled: !isReady || isCapturing || !canCaptureMore,
|
|
4858
|
+
onClick: handleCapture,
|
|
4859
|
+
children: "\uCD2C\uC601"
|
|
4860
|
+
}
|
|
4861
|
+
),
|
|
4862
|
+
isMultiShot ? /* @__PURE__ */ jsx(
|
|
4863
|
+
"button",
|
|
4864
|
+
{
|
|
4865
|
+
className: cx$b("video-capture-button", "video-capture-primary"),
|
|
4866
|
+
type: "button",
|
|
4867
|
+
disabled: capturedShots.length === 0,
|
|
4868
|
+
onClick: handleComplete,
|
|
4869
|
+
children: "\uC644\uB8CC"
|
|
4870
|
+
}
|
|
4871
|
+
) : null
|
|
4872
|
+
] })
|
|
4873
|
+
] }) });
|
|
4874
|
+
}
|
|
4875
|
+
function stopVideoStream(stream) {
|
|
4876
|
+
stream?.getTracks().forEach((track) => {
|
|
4877
|
+
track.stop();
|
|
4878
|
+
});
|
|
4879
|
+
}
|
|
4880
|
+
function isVideoFrameReady(video) {
|
|
4881
|
+
return video.videoWidth > 0 && video.videoHeight > 0;
|
|
4882
|
+
}
|
|
4883
|
+
function canvasToBlob(canvas) {
|
|
4884
|
+
if (canvas.toBlob) {
|
|
4885
|
+
return new Promise((resolve, reject) => {
|
|
4886
|
+
canvas.toBlob(
|
|
4887
|
+
(blob) => {
|
|
4888
|
+
if (!blob) {
|
|
4889
|
+
reject(new Error("Canvas blob is empty"));
|
|
4890
|
+
return;
|
|
4891
|
+
}
|
|
4892
|
+
resolve(blob);
|
|
4893
|
+
},
|
|
4894
|
+
VIDEO_CAPTURE_MIME_TYPE,
|
|
4895
|
+
VIDEO_CAPTURE_QUALITY
|
|
4896
|
+
);
|
|
4897
|
+
});
|
|
4898
|
+
}
|
|
4899
|
+
return Promise.resolve(dataUrlToBlob(canvas.toDataURL(VIDEO_CAPTURE_MIME_TYPE, VIDEO_CAPTURE_QUALITY)));
|
|
4900
|
+
}
|
|
4901
|
+
function dataUrlToBlob(dataUrl) {
|
|
4902
|
+
const [header = "", body = ""] = dataUrl.split(",");
|
|
4903
|
+
const mimeType = header.match(/data:(.*);base64/)?.[1] || VIDEO_CAPTURE_MIME_TYPE;
|
|
4904
|
+
const binary = window.atob(body);
|
|
4905
|
+
const bytes = new Uint8Array(binary.length);
|
|
4906
|
+
for (let i = 0; i < binary.length; i++) {
|
|
4907
|
+
bytes[i] = binary.charCodeAt(i);
|
|
4908
|
+
}
|
|
4909
|
+
return new Blob([bytes], { type: mimeType });
|
|
4714
4910
|
}
|
|
4715
4911
|
|
|
4716
4912
|
const genImageId = () => `camera-${Date.now()}-${Math.random()}`;
|
|
4717
|
-
function
|
|
4913
|
+
function useCameraV3({
|
|
4718
4914
|
onChange,
|
|
4719
4915
|
resize: resizeOption = {
|
|
4720
4916
|
processType: "mixed",
|
|
@@ -4730,83 +4926,152 @@ function useCameraV2({
|
|
|
4730
4926
|
type = "multiple",
|
|
4731
4927
|
buttonText,
|
|
4732
4928
|
initData,
|
|
4929
|
+
captureEngineType,
|
|
4930
|
+
resizeTiming = "onCapture",
|
|
4931
|
+
pageLimit,
|
|
4733
4932
|
useNativeCamera = false,
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4933
|
+
convertType = "canvas",
|
|
4934
|
+
maxPhotos,
|
|
4935
|
+
overMaxPhotosBehavior,
|
|
4936
|
+
maxPhotosErrorHandler
|
|
4937
|
+
} = {}) {
|
|
4737
4938
|
const convertedInitData = initData?.map((data, index) => ({ ...data, id: String(index + 1) }));
|
|
4738
4939
|
const [attachedPhotos, setAttachedPhotos] = useState(convertedInitData || []);
|
|
4739
|
-
const
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4940
|
+
const attachedPhotosRef = useRef(convertedInitData || []);
|
|
4941
|
+
const [isVideoCaptureOpen, setIsVideoCaptureOpen] = useState(false);
|
|
4942
|
+
const resolvedCaptureEngineType = resolveCaptureEngineType({ captureEngineType, useNativeCamera });
|
|
4943
|
+
const normalizedPageLimit = pageLimit && pageLimit > 0 ? pageLimit : 1;
|
|
4944
|
+
const resolvedMaxPhotos = maxPhotos ?? (type === "single" ? 1 : Math.max(4, normalizedPageLimit));
|
|
4945
|
+
const resolvedOverflowBehavior = overMaxPhotosBehavior ?? (maxPhotosErrorHandler ? "error" : "truncate");
|
|
4946
|
+
const applyMaxPhotosPolicy = (items, overflow) => {
|
|
4947
|
+
if (items.length === 0) {
|
|
4948
|
+
return items;
|
|
4949
|
+
}
|
|
4950
|
+
const current = attachedPhotosRef.current.length;
|
|
4951
|
+
const remaining = Math.max(0, resolvedMaxPhotos - current);
|
|
4952
|
+
if (items.length <= remaining) {
|
|
4953
|
+
return items;
|
|
4954
|
+
}
|
|
4955
|
+
if (resolvedOverflowBehavior === "error" && maxPhotosErrorHandler) {
|
|
4956
|
+
maxPhotosErrorHandler(
|
|
4957
|
+
overflow.buildInfo({ attempted: items.length, current, max: resolvedMaxPhotos, data: items })
|
|
4958
|
+
);
|
|
4959
|
+
return null;
|
|
4743
4960
|
}
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
};
|
|
4749
|
-
return convertedPhoto;
|
|
4961
|
+
if (remaining === 0) {
|
|
4962
|
+
return null;
|
|
4963
|
+
}
|
|
4964
|
+
return items.slice(0, remaining);
|
|
4750
4965
|
};
|
|
4751
|
-
const
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
}
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4966
|
+
const buildPhoto = async (source, name) => {
|
|
4967
|
+
if (resizeTiming === "onCapture") {
|
|
4968
|
+
const original = await convertSourceToFile(source, convertType);
|
|
4969
|
+
const processed = resizeOption ? await resize(original, resizeOption) : original;
|
|
4970
|
+
return { photo: { id: genImageId(), src: URL.createObjectURL(processed), name }, file: original };
|
|
4971
|
+
}
|
|
4972
|
+
const file = onChange ? await convertSourceToFile(source, convertType) : void 0;
|
|
4973
|
+
return { photo: { id: genImageId(), src: source.uri, name }, file };
|
|
4974
|
+
};
|
|
4975
|
+
const storeCapturedSources = async (sources, source = "native", overflowData) => {
|
|
4976
|
+
if (sources.length === 0) {
|
|
4977
|
+
return;
|
|
4978
|
+
}
|
|
4979
|
+
const accepted = applyMaxPhotosPolicy(sources, {
|
|
4980
|
+
source,
|
|
4981
|
+
buildInfo: ({ attempted, current, max }) => {
|
|
4982
|
+
const data = overflowData ?? sources;
|
|
4983
|
+
if (source === "native") {
|
|
4984
|
+
return { source: "native", attempted, current, max, data };
|
|
4985
|
+
}
|
|
4986
|
+
if (source === "addImage") {
|
|
4987
|
+
return { source: "addImage", attempted, current, max, data };
|
|
4988
|
+
}
|
|
4989
|
+
return { source, attempted, current, max, data };
|
|
4990
|
+
}
|
|
4991
|
+
});
|
|
4992
|
+
if (!accepted || accepted.length === 0) {
|
|
4993
|
+
return;
|
|
4761
4994
|
}
|
|
4995
|
+
const baseCount = attachedPhotosRef.current.length;
|
|
4996
|
+
const built = await Promise.all(
|
|
4997
|
+
accepted.map((item, index) => buildPhoto(item, `\uC11C\uB958\uC0AC\uC9C4_${baseCount + index + 1}`))
|
|
4998
|
+
);
|
|
4999
|
+
const builtPhotos = built.map((item) => item.photo);
|
|
5000
|
+
setAttachedPhotos((prev) => type === "single" ? builtPhotos.slice(-1) : [...prev, ...builtPhotos]);
|
|
4762
5001
|
if (onChange) {
|
|
4763
|
-
|
|
4764
|
-
|
|
5002
|
+
built.forEach((item) => {
|
|
5003
|
+
if (item.file) {
|
|
5004
|
+
onChange(item.file);
|
|
5005
|
+
}
|
|
5006
|
+
});
|
|
4765
5007
|
}
|
|
4766
5008
|
};
|
|
4767
|
-
const
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
5009
|
+
const openFileInput = () => {
|
|
5010
|
+
const input = document.createElement("input");
|
|
5011
|
+
input.type = "file";
|
|
5012
|
+
input.accept = "image/*";
|
|
5013
|
+
input.multiple = normalizedPageLimit > 1;
|
|
5014
|
+
if (cameraOnly) {
|
|
5015
|
+
input.capture = "camera";
|
|
5016
|
+
}
|
|
5017
|
+
input.addEventListener("change", async (event) => {
|
|
5018
|
+
const target = event.target;
|
|
5019
|
+
const fileList = target.files ? Array.from(target.files) : [];
|
|
5020
|
+
if (fileList.length > 0) {
|
|
5021
|
+
const sources = fileList.map((file) => ({
|
|
5022
|
+
kind: "file",
|
|
5023
|
+
file,
|
|
5024
|
+
uri: URL.createObjectURL(file)
|
|
5025
|
+
}));
|
|
5026
|
+
await storeCapturedSources(sources, "input", fileList);
|
|
4778
5027
|
}
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
5028
|
+
document.body.removeChild(input);
|
|
5029
|
+
});
|
|
5030
|
+
input.style.display = "none";
|
|
5031
|
+
document.body.appendChild(input);
|
|
5032
|
+
input.click();
|
|
5033
|
+
};
|
|
5034
|
+
const onClick = () => {
|
|
5035
|
+
logCameraDebug("useCameraV3 capture requested", {
|
|
5036
|
+
captureEngineType: resolvedCaptureEngineType,
|
|
5037
|
+
resizeTiming
|
|
5038
|
+
});
|
|
5039
|
+
if (resolvedCaptureEngineType === "native") {
|
|
5040
|
+
captureNativeDocuments({ pageLimit }).then((sources) => storeCapturedSources(sources, "native"));
|
|
5041
|
+
return;
|
|
5042
|
+
}
|
|
5043
|
+
if (resolvedCaptureEngineType === "video") {
|
|
5044
|
+
setIsVideoCaptureOpen(true);
|
|
5045
|
+
return;
|
|
4793
5046
|
}
|
|
5047
|
+
openFileInput();
|
|
5048
|
+
};
|
|
5049
|
+
const getImage = async (imageId) => {
|
|
5050
|
+
const photo = attachedPhotosRef.current.find((image) => image.id === imageId);
|
|
5051
|
+
if (!photo) {
|
|
5052
|
+
throw new Error("[use-camera-v3] : Image not found");
|
|
5053
|
+
}
|
|
5054
|
+
if (resizeTiming === "onCapture") {
|
|
5055
|
+
return photo;
|
|
5056
|
+
}
|
|
5057
|
+
const file = await convertSourceToFile({ kind: "scheme", uri: photo.src }, convertType);
|
|
5058
|
+
return { ...photo, src: URL.createObjectURL(resizeOption ? await resize(file, resizeOption) : file) };
|
|
4794
5059
|
};
|
|
4795
5060
|
const deleteImage = (imageId) => {
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
URL.revokeObjectURL(item[0].src);
|
|
5061
|
+
setAttachedPhotos((prev) => {
|
|
5062
|
+
const target = prev.find((image) => image.id === imageId);
|
|
5063
|
+
if (!target) {
|
|
5064
|
+
return prev;
|
|
4801
5065
|
}
|
|
4802
|
-
|
|
5066
|
+
URL.revokeObjectURL(target.src);
|
|
4803
5067
|
if (onDelete) {
|
|
4804
5068
|
onDelete(imageId);
|
|
4805
5069
|
}
|
|
4806
|
-
|
|
5070
|
+
return prev.filter((image) => image.id !== imageId);
|
|
5071
|
+
});
|
|
4807
5072
|
};
|
|
4808
5073
|
const deleteAllImages = () => {
|
|
4809
|
-
|
|
5074
|
+
attachedPhotosRef.current.forEach((image) => {
|
|
4810
5075
|
URL.revokeObjectURL(image.src);
|
|
4811
5076
|
if (onDelete) {
|
|
4812
5077
|
onDelete(image.id);
|
|
@@ -4814,51 +5079,94 @@ function useCameraV2({
|
|
|
4814
5079
|
});
|
|
4815
5080
|
setAttachedPhotos([]);
|
|
4816
5081
|
};
|
|
4817
|
-
const
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
5082
|
+
const addImage = (data) => {
|
|
5083
|
+
const accepted = applyMaxPhotosPolicy(data, {
|
|
5084
|
+
source: "addImage",
|
|
5085
|
+
buildInfo: ({ attempted, current, max }) => ({
|
|
5086
|
+
source: "addImage",
|
|
5087
|
+
attempted,
|
|
5088
|
+
current,
|
|
5089
|
+
max,
|
|
5090
|
+
data
|
|
5091
|
+
})
|
|
5092
|
+
});
|
|
5093
|
+
if (!accepted || accepted.length === 0) {
|
|
5094
|
+
return;
|
|
4826
5095
|
}
|
|
4827
|
-
|
|
5096
|
+
setAttachedPhotos((prev) => [
|
|
5097
|
+
...prev,
|
|
5098
|
+
...accepted.map((item, index) => {
|
|
5099
|
+
let blobUrl = "";
|
|
5100
|
+
if (item.data instanceof Blob) {
|
|
5101
|
+
blobUrl = URL.createObjectURL(item.data);
|
|
5102
|
+
} else if (typeof item.data === "string") {
|
|
5103
|
+
blobUrl = URL.createObjectURL(base64ToBlob(item.data));
|
|
5104
|
+
}
|
|
5105
|
+
return { id: genImageId(), src: blobUrl, name: item.name || `\uC11C\uB958\uC0AC\uC9C4_${prev.length + index + 1}` };
|
|
5106
|
+
})
|
|
5107
|
+
]);
|
|
5108
|
+
};
|
|
5109
|
+
const CameraComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5110
|
+
/* @__PURE__ */ jsx(
|
|
5111
|
+
Attachment,
|
|
5112
|
+
{
|
|
5113
|
+
show: !!show,
|
|
5114
|
+
onAddPhoto: onClick,
|
|
5115
|
+
onRemovePhoto: deleteImage,
|
|
5116
|
+
photos: attachedPhotos,
|
|
5117
|
+
type,
|
|
5118
|
+
buttonText,
|
|
5119
|
+
maxPhotos: resolvedMaxPhotos
|
|
5120
|
+
}
|
|
5121
|
+
),
|
|
5122
|
+
/* @__PURE__ */ jsx(
|
|
5123
|
+
VideoCaptureModal,
|
|
5124
|
+
{
|
|
5125
|
+
open: resolvedCaptureEngineType === "video" && isVideoCaptureOpen,
|
|
5126
|
+
maxShots: normalizedPageLimit,
|
|
5127
|
+
onCapture: (files) => {
|
|
5128
|
+
const sources = files.map((file) => ({
|
|
5129
|
+
kind: "file",
|
|
5130
|
+
file,
|
|
5131
|
+
uri: URL.createObjectURL(file)
|
|
5132
|
+
}));
|
|
5133
|
+
return storeCapturedSources(sources, "video", files);
|
|
5134
|
+
},
|
|
5135
|
+
onClose: () => setIsVideoCaptureOpen(false)
|
|
5136
|
+
}
|
|
5137
|
+
)
|
|
5138
|
+
] });
|
|
5139
|
+
useEffect(() => {
|
|
5140
|
+
attachedPhotosRef.current = attachedPhotos;
|
|
5141
|
+
}, [attachedPhotos]);
|
|
4828
5142
|
useEffect(() => {
|
|
4829
5143
|
return () => {
|
|
4830
|
-
|
|
5144
|
+
attachedPhotosRef.current.forEach((image) => {
|
|
4831
5145
|
URL.revokeObjectURL(image.src);
|
|
4832
5146
|
});
|
|
4833
5147
|
};
|
|
4834
5148
|
}, []);
|
|
4835
5149
|
return {
|
|
4836
5150
|
onClick,
|
|
4837
|
-
getImage
|
|
5151
|
+
getImage,
|
|
4838
5152
|
deleteImage,
|
|
4839
5153
|
deleteAllImages,
|
|
4840
5154
|
attachedPhotos,
|
|
4841
5155
|
Attachment: CameraComponent,
|
|
4842
|
-
addImage
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
blobUrl = URL.createObjectURL(base64ToBlob(item.data));
|
|
4851
|
-
}
|
|
4852
|
-
const newPhoto = {
|
|
4853
|
-
id: genImageId(),
|
|
4854
|
-
src: blobUrl,
|
|
4855
|
-
name: item.name || `\uC11C\uB958\uC0AC\uC9C4_${attachedPhotos.length + 1}`
|
|
4856
|
-
};
|
|
4857
|
-
return newPhoto;
|
|
4858
|
-
})
|
|
4859
|
-
]);
|
|
4860
|
-
}
|
|
5156
|
+
addImage
|
|
5157
|
+
};
|
|
5158
|
+
}
|
|
5159
|
+
|
|
5160
|
+
function useCamera(options = {}) {
|
|
5161
|
+
const camera = useCameraV3({ pageLimit: 1, ...options, resizeTiming: "onCapture" });
|
|
5162
|
+
const getImage = (imageId) => {
|
|
5163
|
+
return camera.attachedPhotos.find((image) => image.id === imageId);
|
|
4861
5164
|
};
|
|
5165
|
+
return { ...camera, getImage };
|
|
5166
|
+
}
|
|
5167
|
+
|
|
5168
|
+
function useCameraV2(options) {
|
|
5169
|
+
return useCameraV3({ pageLimit: 1, ...options, resizeTiming: "onRetrieve" });
|
|
4862
5170
|
}
|
|
4863
5171
|
|
|
4864
5172
|
const HISTORY_SIZE = 100;
|
|
@@ -7394,4 +7702,4 @@ function useTerms(initialValue) {
|
|
|
7394
7702
|
};
|
|
7395
7703
|
}
|
|
7396
7704
|
|
|
7397
|
-
export { AUTH_TEMPLATE_CODES, Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, GtmIframe, HookFormCheckbox, HookFormCheckboxButton, HookFormDatePickerRenew, HookFormDateRangePickerRenew, HookFormSearchJobField, HookFormSegmentGroup, HookFormSelect, HookFormTextField, JobVehicleSearchModal, OrganizationSearchModal, RATING_DATA, RIV_SEARCH_PARAM_MAP, RemoteIdentityVerification, RivModalIframe, StepIndicator, TermsCancerCollectQR, TermsCancerMarketing, TermsCancerProvideQR, TermsCancerSystem, TermsCheckboxButton, TermsDesign, TermsExecution, TermsLoan, TermsMarketing, TermsMarketingCollectQR, TermsMarketingProviderQR, TermsMobileCard, TermsRadio, TermsRatingBar, TermsSignature, TermsTransfer, VERIFICATION_CODES, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCameraV2, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification$1 as useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useSearchAddress, useSearchNationality, useSearchVisa, useTerms, useVisaComponent };
|
|
7705
|
+
export { AUTH_TEMPLATE_CODES, Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, GtmIframe, HookFormCheckbox, HookFormCheckboxButton, HookFormDatePickerRenew, HookFormDateRangePickerRenew, HookFormSearchJobField, HookFormSegmentGroup, HookFormSelect, HookFormTextField, JobVehicleSearchModal, OrganizationSearchModal, RATING_DATA, RIV_SEARCH_PARAM_MAP, RemoteIdentityVerification, RivModalIframe, StepIndicator, TermsCancerCollectQR, TermsCancerMarketing, TermsCancerProvideQR, TermsCancerSystem, TermsCheckboxButton, TermsDesign, TermsExecution, TermsLoan, TermsMarketing, TermsMarketingCollectQR, TermsMarketingProviderQR, TermsMobileCard, TermsRadio, TermsRatingBar, TermsSignature, TermsTransfer, VERIFICATION_CODES, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCameraV2, useCameraV3, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification$1 as useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useSearchAddress, useSearchNationality, useSearchVisa, useTerms, useVisaComponent };
|