sales-frontend-components 0.0.182 → 0.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +43 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.esm.js +44 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { FieldValues, UseControllerProps } from 'react-hook-form';
|
|
3
|
-
import { CheckboxButtonProps, CheckboxProps, DatePickerSingleHtmlProps, FormField, SegmentItems, SegmentGroupHtmlProps, SelectProps, OptionProps, useDropDown } from 'sales-frontend-design-system';
|
|
3
|
+
import { CheckboxButtonProps, CheckboxProps, DatePickerSingleHtmlProps, DatePickerRangeHtmlProps, FormField, SegmentItems, SegmentGroupHtmlProps, SelectProps, OptionProps, useDropDown } from 'sales-frontend-design-system';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import React__default, { JSX } from 'react';
|
|
6
6
|
import * as sales_frontend_api_method from 'sales-frontend-api/method';
|
|
@@ -13,6 +13,8 @@ declare const FormCheckbox: <TFormValues extends FieldValues>({ name, control, d
|
|
|
13
13
|
|
|
14
14
|
declare const FormDatePicker: <TFormValues extends FieldValues>({ name, control, disabled, defaultValue, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled" | "defaultValue"> & DatePickerSingleHtmlProps) => react_jsx_runtime.JSX.Element;
|
|
15
15
|
|
|
16
|
+
declare const FormDateRangePicker: <TFormValues extends FieldValues>({ name, control, disabled, defaultValue, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled" | "defaultValue"> & DatePickerRangeHtmlProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
16
18
|
declare const FormSearchJobField: <TFormValues extends FieldValues>({ name, control, disabled, error, size, placeholder, onValueChange, defaultValue, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled"> & Omit<FormField.TextFieldProps, "defaultValue"> & {
|
|
17
19
|
onValueChange?: (value?: SegmentItems) => void;
|
|
18
20
|
defaultValue?: SegmentItems;
|
|
@@ -687,5 +689,5 @@ declare const useDownloader: () => {
|
|
|
687
689
|
|
|
688
690
|
declare function GaIframe(): react_jsx_runtime.JSX.Element;
|
|
689
691
|
|
|
690
|
-
export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, GaIframe, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
|
|
692
|
+
export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, GaIframe, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
|
|
691
693
|
export type { AttachedPhoto, AttachmentProps, BankStockSearchModalProps, CodeSet, DownloadProps, DownloadTargetInfo, DownloaderProps, FormSegmentGroupProps, PaintProps, Pen, RemoteIdentityVerificationSuccess, RivUrlParams, Step, StepIndicatorProps, StepItem, UseRemoteIdentityVerificationProps, Vehicle, VerificationResponse, cameraItemType, cameraOptions };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useController } from 'react-hook-form';
|
|
3
|
-
import { CheckboxButton, Checkbox, DatePicker, FormCore, Modal, Button, RadioGroup, Radio, FormField, useModalState, ModalUtils, useDropDown, List, ListItem, Table, Select, Accordion, Tab, SegmentGroup, Loading } from 'sales-frontend-design-system';
|
|
3
|
+
import { CheckboxButton, Checkbox, DatePicker, DateRangePicker, FormCore, Modal, Button, RadioGroup, Radio, FormField, useModalState, ModalUtils, useDropDown, List, ListItem, Table, Select, Accordion, Tab, SegmentGroup, Loading } from 'sales-frontend-design-system';
|
|
4
4
|
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
|
5
5
|
import { useSearchAddressQuery, useSearchPostalCodeQuery, useSearchAddressStandardizationQuery, useSearchCommonCodeQuery, useSearchCustomerListQuery, useSearchNationalityQuery, useSearchVisaQuery, getDspCustomerListMethod, useSearchEmployeeProfileQuery, useSearchOccupationDetailQuery, useSearchOccupationQuery, useSearchVehicleQuery, useSearchRiskGradeQuery, useSearchOrganizationQuery, getRemoteIdentityVerificationSystemToken, useDudExternalFileUploadMutation, useDudExternalFileDownloadQuery } from 'sales-frontend-api/method';
|
|
6
6
|
import { IconMainUiSearch, IconGraphicsBankSaneop, IconGraphicsBankKiup, IconGraphicsBankKukmin, IconGraphicsBankSuhyeop, IconGraphicsBankJangGiSinYong, IconGraphicsBankNhNonghyeop, IconGraphicsBankJiyeokNonghyeop, IconGraphicsBankWoori, IconGraphicsBankScJeil, IconGraphicsBankSinhan, IconGraphicsBankHankookCity, IconGraphicsBankDaegu, IconGraphicsBankBusan, IconGraphicsBankGwangju, IconGraphicsBankJeju, IconGraphicsBankJeonbuk, IconGraphicsBankGyeongnam, IconGraphicsBankSaemaulGeumgo, IconGraphicsBankSinhyeop, IconGraphicsBankJeochuk, IconGraphicsBankHsbc, IconGraphicsBankABNAMRO, IconGraphicsBankSanlim, IconGraphicsBankPost, IconGraphicsBankKebHana, IconGraphicsBankKBank, IconGraphicsBankKakaoBank, IconGraphicsBankTossBank, IconGraphicsStockYuantaJeungkwon, IconGraphicsStockKbJeungkwon, IconGraphicsStockMiraeAssetJeungkwon, IconGraphicsStockSamsungJeungkwon, IconGraphicsStockHankookTujajeungkwon, IconGraphicsStockNhWooriTujajeungkwon, IconGraphicsStockGyoboJeungkwon, IconGraphicsStockHiTujajeungkwon, IconGraphicsStockHyundaiChaJeungkwon, IconGraphicsStockKiwoomJeungkwon, IconGraphicsStockSkJeungkwon, IconGraphicsStockDaesinJeungkwon, IconGraphicsStockHanwhaTujajeungkwon, IconGraphicsStockHanaGeumyungTujajeungkwon, IconGraphicsStockSinhanTujajeungkwon, IconGraphicsStockDbGeumyungTujajeungkwon, IconGraphicsStockYujinTujajeungkwon, IconGraphicsStockMeritzJeungkwon, IconGraphicsStockKakaoPayJeungkwon, IconGraphicsStockNhTujajeungkwon, IconGraphicsStockBugukJeungkwon, IconGraphicsStockSinyeongJeungkwon, IconGraphicsStockHochulEopsum, IconGraphicsFeedbackEmpty, IconIllustGrade, IconIllustJob, IconSubUiArrowRight, IconIllustVehicle, IconIllustCamera } from 'sales-frontend-assets';
|
|
@@ -450,6 +450,48 @@ const FormDatePicker = ({
|
|
|
450
450
|
);
|
|
451
451
|
};
|
|
452
452
|
|
|
453
|
+
const FormDateRangePicker = ({
|
|
454
|
+
name,
|
|
455
|
+
control,
|
|
456
|
+
disabled,
|
|
457
|
+
defaultValue,
|
|
458
|
+
...props
|
|
459
|
+
}) => {
|
|
460
|
+
const { field, fieldState } = useController({
|
|
461
|
+
name,
|
|
462
|
+
control,
|
|
463
|
+
disabled,
|
|
464
|
+
defaultValue
|
|
465
|
+
});
|
|
466
|
+
const [selected, setSelected] = React.useState();
|
|
467
|
+
React.useEffect(() => {
|
|
468
|
+
const fieldValue = field.value;
|
|
469
|
+
if (!fieldValue) {
|
|
470
|
+
setSelected(void 0);
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const isStartDateDifferent = fieldValue.startDate?.getTime() !== selected?.startDate?.getTime();
|
|
474
|
+
const isEndDateDifferent = fieldValue.endDate?.getTime() !== selected?.endDate?.getTime();
|
|
475
|
+
if (!selected || isStartDateDifferent || isEndDateDifferent) {
|
|
476
|
+
setSelected(fieldValue);
|
|
477
|
+
}
|
|
478
|
+
}, [field.value]);
|
|
479
|
+
return /* @__PURE__ */ jsx(
|
|
480
|
+
DateRangePicker,
|
|
481
|
+
{
|
|
482
|
+
tabIndex: 0,
|
|
483
|
+
...{
|
|
484
|
+
...props,
|
|
485
|
+
...field,
|
|
486
|
+
id: field.name,
|
|
487
|
+
defaultValue: selected,
|
|
488
|
+
error: fieldState.invalid,
|
|
489
|
+
onValueChange: field.onChange
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
};
|
|
494
|
+
|
|
453
495
|
var bind = {exports: {}};
|
|
454
496
|
|
|
455
497
|
/*!
|
|
@@ -4599,5 +4641,5 @@ function GaIframe() {
|
|
|
4599
4641
|
return /* @__PURE__ */ jsx("noscript", { children: /* @__PURE__ */ jsx("iframe", { src: "https://www.googletagmanager.com/ns.html?id=GTM-PPT3LJ56", height: "0", width: "0", style: { display: "none", visibility: "hidden" } }) });
|
|
4600
4642
|
}
|
|
4601
4643
|
|
|
4602
|
-
export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, GaIframe, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
|
|
4644
|
+
export { Attachment, BANK_STOCK_ICON_LIST, BANK_STOCK_SEARCH_MODAL_TABS, BankStockSearchModal, CODES, CustomerSearch, CustomerSearchModal, DeaCustomerSearchModal, DudDownload, DudUpload, EmployeeSearchModal, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, GaIframe, JobVehicleSearchModal, OrganizationSearchModal, RIV_SEARCH_PARAM_MAP, StepIndicator, getGenderName, highlightOnSearchKeyword, resize, testSignatureBase64Data, useAddressComponent, useBankStockSearch, useCamera, useCanvasPaint, useCustomerSearch, useDownloader, useJobSearchModal, useJobVehicleSearch, useJobVehicleSearchModal, useNationalityComponent, useNxlOneModal, useRemoteIdentityVerification, useRemoteIdentityVerificationIframe, useRemoteIdentityVerificationPopup, useSearchAddress, useSearchNationality, useSearchVisa, useVisaComponent };
|
|
4603
4645
|
//# sourceMappingURL=index.esm.js.map
|