sales-frontend-components 0.0.66 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1199 -123
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +86 -9
- package/dist/index.esm.js +1196 -126
- package/dist/index.esm.js.map +1 -1
- package/dist/modal/pre-standard/job-search-modal/job-search-modal.module.scss +61 -0
- package/dist/modal/pre-standard/job-vehicle-search-modal/job-vehicle-search-modal.module.scss +116 -0
- package/dist/modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss +20 -0
- package/dist/step-indicator/step-indicator.module.scss +20 -4
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
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, DatePickerRangeHtmlProps, SegmentGroupHtmlProps,
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
3
|
+
import { CheckboxButtonProps, CheckboxProps, DatePickerSingleHtmlProps, DatePickerRangeHtmlProps, FormField, SegmentGroupHtmlProps, SelectProps, OptionProps } from 'sales-frontend-design-system';
|
|
4
|
+
import * as sales_frontend_api_method from 'sales-frontend-api/method';
|
|
5
|
+
import { OccupationResponseDto, Address } from 'sales-frontend-api/method';
|
|
6
|
+
import * as React$1 from 'react';
|
|
7
|
+
import React__default from 'react';
|
|
6
8
|
import { getEnvironmentFromHostname } from 'sales-frontend-utils';
|
|
7
9
|
|
|
8
10
|
declare const FormCheckboxButton: <TFormValues extends FieldValues>({ name, control, disabled, children, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled"> & Omit<CheckboxButtonProps, "id">) => react_jsx_runtime.JSX.Element;
|
|
@@ -13,7 +15,33 @@ declare const FormDatePicker: <TFormValues extends FieldValues>({ name, control,
|
|
|
13
15
|
|
|
14
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;
|
|
15
17
|
|
|
16
|
-
declare const
|
|
18
|
+
declare const FormSearchJobField: <TFormValues extends FieldValues>({ name, control, disabled, rootProps, error, size, placeholder, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled"> & FormField.TextFieldProps & {
|
|
19
|
+
onValueChange?: (value?: OccupationResponseDto) => void;
|
|
20
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
interface FormSegmentGroupProps<TFormValues extends FieldValues> extends Pick<UseControllerProps<TFormValues>, 'name' | 'control' | 'disabled'>, Omit<SegmentGroupHtmlProps, 'defaultValue'> {
|
|
23
|
+
disabledItems?: string[];
|
|
24
|
+
}
|
|
25
|
+
declare const FormSegmentGroup: <TFormValues extends FieldValues>({ name, control, disabled, disabledItems, items, ...props }: FormSegmentGroupProps<TFormValues>) => react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 영업지원 시스템 셀렉트필드
|
|
29
|
+
* @param param0
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
type FormSelectProps<TFormValues extends FieldValues> = Pick<UseControllerProps<TFormValues>, 'name' | 'control' | 'disabled'> & Omit<SelectProps, 'defaultValue'>;
|
|
33
|
+
declare const FormSelect: {
|
|
34
|
+
<TFormValues extends FieldValues>({ name, control, disabled, error, children, ...props }: FormSelectProps<TFormValues>): react_jsx_runtime.JSX.Element;
|
|
35
|
+
Option: ({ children, value, ...rest }: OptionProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
Group: <TFormValues extends FieldValues>({ options, optionsProps, ...props }: Omit<IFormSelectGroupProps<TFormValues>, "children">) => react_jsx_runtime.JSX.Element;
|
|
37
|
+
};
|
|
38
|
+
interface IFormSelectGroupProps<TFormValues extends FieldValues> extends FormSelectProps<TFormValues> {
|
|
39
|
+
options: {
|
|
40
|
+
label: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
optionsProps?: Omit<OptionProps, 'children' | 'value'>;
|
|
44
|
+
}
|
|
17
45
|
|
|
18
46
|
declare const FormTextField: <TFormValues extends FieldValues>({ name, control, size, disabled, error, onBlur, onChange, rootProps, ...props }: Pick<UseControllerProps<TFormValues>, "name" | "control" | "disabled"> & FormField.TextFieldProps) => react_jsx_runtime.JSX.Element;
|
|
19
47
|
|
|
@@ -37,9 +65,10 @@ interface StepIndicatorProps {
|
|
|
37
65
|
/** 표시할 dot의 총 개수 (items 배열과 별개로 시각적 표시만 조절할 때 사용) */
|
|
38
66
|
dotCount?: number;
|
|
39
67
|
onClickItem?: (item: StepItem) => void;
|
|
68
|
+
isLoading?: boolean;
|
|
40
69
|
}
|
|
41
70
|
|
|
42
|
-
declare const StepIndicator: ({ items, onClickItem, currentIndex, defaultValue, dotCount }: StepIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare const StepIndicator: ({ items, onClickItem, currentIndex, defaultValue, dotCount, isLoading }: StepIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
43
72
|
|
|
44
73
|
interface AttachedPhoto {
|
|
45
74
|
id: string;
|
|
@@ -139,7 +168,7 @@ declare function useCanvasPaint(paintProps?: PaintProps): {
|
|
|
139
168
|
download: (downloadProps: DownloadProps) => void;
|
|
140
169
|
getBase64String: (imageProps: DownloadProps) => string | undefined;
|
|
141
170
|
isCanvasBlank: () => boolean;
|
|
142
|
-
setCanvasRefState:
|
|
171
|
+
setCanvasRefState: React$1.Dispatch<React$1.SetStateAction<HTMLCanvasElement | null>>;
|
|
143
172
|
canvasRefState: HTMLCanvasElement | null;
|
|
144
173
|
};
|
|
145
174
|
|
|
@@ -181,12 +210,60 @@ interface DebugToolProps {
|
|
|
181
210
|
envOverride?: Environment;
|
|
182
211
|
/** 기본 메뉴 설정을 재정의합니다. 동적으로 메뉴를 추가하거나 변경할 때 사용합니다. */
|
|
183
212
|
menuItemsOverride?: (Omit<MenuItem, 'component'> & {
|
|
184
|
-
component:
|
|
213
|
+
component: React__default.ComponentType<any>;
|
|
185
214
|
})[];
|
|
186
215
|
/** @deprecated Storybook 전용 prop으로, 실제 사용되지 않습니다. */
|
|
187
216
|
menuConfig?: Record<string, boolean>;
|
|
188
217
|
}
|
|
189
|
-
declare const DebugTool:
|
|
218
|
+
declare const DebugTool: React__default.FC<DebugToolProps>;
|
|
219
|
+
|
|
220
|
+
interface FullAddress extends Address {
|
|
221
|
+
detail: string;
|
|
222
|
+
}
|
|
223
|
+
type Step = 'initial' | 'search-result' | 'detail-input';
|
|
224
|
+
|
|
225
|
+
interface Props {
|
|
226
|
+
setValue: (address: FullAddress) => void;
|
|
227
|
+
onClose: () => void;
|
|
228
|
+
isOpen: boolean;
|
|
229
|
+
}
|
|
230
|
+
declare function useSearchAddress({ setValue, onClose, isOpen }: Props): {
|
|
231
|
+
onAddressSearchClear: () => void;
|
|
232
|
+
onAddressSearchNext: () => void;
|
|
233
|
+
addressSearchKeyword: string;
|
|
234
|
+
addressSearchList: QueryObserverResult<TData, TError>;
|
|
235
|
+
addressSearchStep: Step;
|
|
236
|
+
selectedAddress: Address | null;
|
|
237
|
+
addressSearchOnValueChange: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
238
|
+
nextButtonDisabled: boolean;
|
|
239
|
+
detailAddressInput: string;
|
|
240
|
+
onSearch: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
241
|
+
onKeyUp: (e: React__default.KeyboardEvent<HTMLInputElement>) => void;
|
|
242
|
+
onSelectChange: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
243
|
+
setDetail: (e: React__default.ChangeEvent<HTMLInputElement>) => void;
|
|
244
|
+
search: () => void;
|
|
245
|
+
searchInput: string;
|
|
246
|
+
};
|
|
247
|
+
declare const useAddressComponent: () => {
|
|
248
|
+
fullAddress: FullAddress | null;
|
|
249
|
+
openModal: () => void;
|
|
250
|
+
AddressSearchComponent: () => react_jsx_runtime.JSX.Element;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
declare function useJobVehicleSearchModal(): {
|
|
254
|
+
selectedJob: sales_frontend_api_method.OccupationResponseDto | null;
|
|
255
|
+
selectedVehicle: sales_frontend_api_method.VehicleTypeResponseDto | undefined;
|
|
256
|
+
riskGrade: string;
|
|
257
|
+
hospitalizationGrade: string;
|
|
258
|
+
openJobVehicleModal: () => void;
|
|
259
|
+
JobVehicleSearchModalComponent: react_jsx_runtime.JSX.Element;
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
interface JobSearchModalProps {
|
|
263
|
+
isOpen: boolean;
|
|
264
|
+
onClose: () => void;
|
|
265
|
+
}
|
|
266
|
+
declare const JobSearchModal: React__default.FC<JobSearchModalProps>;
|
|
190
267
|
|
|
191
|
-
export { Attachment, DebugTool, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSegmentGroup, FormTextField, StepIndicator, resize, testSignatureBase64Data, useCamera, useCanvasPaint };
|
|
268
|
+
export { Attachment, DebugTool, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobSearchModal, StepIndicator, resize, testSignatureBase64Data, useAddressComponent, useCamera, useCanvasPaint, useJobVehicleSearchModal, useSearchAddress };
|
|
192
269
|
export type { AttachedPhoto, AttachmentProps, DownloadProps, PaintProps, Pen, StepIndicatorProps, StepItem, cameraItemType, cameraOptions };
|