@pdg/react-form 1.0.81 → 1.0.83
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/@types/types.d.ts +1 -1
- package/dist/@util/date_time.d.ts +27 -0
- package/dist/FormContext/FormContext.types.d.ts +2 -0
- package/dist/FormItemCustom/FormSwitch/FormSwitch.d.ts +4 -0
- package/dist/FormItemCustom/FormSwitch/FormSwitch.types.d.ts +12 -0
- package/dist/FormItemCustom/FormSwitch/index.d.ts +4 -0
- package/dist/FormItemCustom/index.d.ts +1 -0
- package/dist/FormItemTextFieldBase/FormPersonalNo/FormPersonalNo.d.ts +1 -0
- package/dist/FormItemTextFieldBase/FormPersonalNo/FormPersonalNo.types.d.ts +1 -0
- package/dist/index.esm.js +1609 -482
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1608 -481
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/@types/types.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface FormValueMap {
|
|
|
22
22
|
}
|
|
23
23
|
export type FormValueItemData = Record<string, any>;
|
|
24
24
|
export interface FormValueItemBaseCommands<T, AllowUndefinedValue extends boolean, V = AllowUndefinedValue extends true ? T | undefined : T> {
|
|
25
|
-
getType(): 'default' | 'FormCheckbox' | 'FormToggleButtonGroup' | 'FormRadioGroup' | 'FormRating' | 'FormTextEditor' | 'FormAutocomplete' | 'FormDatePicker' | 'FormDateTimePicker' | 'FormTimePicker' | 'FormDateRangePicker' | 'FormMonthPicker' | 'FormMonthRangePicker' | 'FormYearPicker' | 'FormYearRangePicker' | 'FormFile';
|
|
25
|
+
getType(): 'default' | 'FormCheckbox' | 'FormToggleButtonGroup' | 'FormRadioGroup' | 'FormRating' | 'FormTextEditor' | 'FormAutocomplete' | 'FormDatePicker' | 'FormDateTimePicker' | 'FormTimePicker' | 'FormDateRangePicker' | 'FormMonthPicker' | 'FormMonthRangePicker' | 'FormYearPicker' | 'FormYearRangePicker' | 'FormFile' | 'FormSwitch';
|
|
26
26
|
getName(): string;
|
|
27
27
|
getReset(): V;
|
|
28
28
|
reset(): void;
|
|
@@ -5,18 +5,45 @@ import { Dayjs } from 'dayjs';
|
|
|
5
5
|
export declare function getDateValidationErrorText(error: DateValidationError | DateTimeValidationError): "형식이 일치하지 않습니다." | "선택할 수 없는 날짜입니다." | undefined;
|
|
6
6
|
export declare function getDateTimeFormat(type: FormDateType, time?: FormTimeType): string;
|
|
7
7
|
export declare function getDateTimeFormValueFormat(type: FormDateType, time?: FormTimeType): string;
|
|
8
|
+
/********************************************************************************************************************
|
|
9
|
+
* getAvailableDateValFormat
|
|
10
|
+
* ******************************************************************************************************************/
|
|
8
11
|
export declare function getAvailableDateValFormat(type: FormAvailableDateType): string;
|
|
9
12
|
export declare function getAvailableDateValFormat(type: FormDateType, time?: FormTimeType): string;
|
|
13
|
+
/********************************************************************************************************************
|
|
14
|
+
* getDateValFormat
|
|
15
|
+
* ******************************************************************************************************************/
|
|
10
16
|
export declare function getDateValFormat(type: FormDateType, time?: FormTimeType): string;
|
|
17
|
+
/********************************************************************************************************************
|
|
18
|
+
* getAvailableDateType
|
|
19
|
+
* ******************************************************************************************************************/
|
|
11
20
|
export declare function getAvailableDateType(type: FormDateType, time?: FormTimeType): FormAvailableDateType;
|
|
21
|
+
/********************************************************************************************************************
|
|
22
|
+
* makeAvailableDate
|
|
23
|
+
* ******************************************************************************************************************/
|
|
12
24
|
export declare function makeAvailableDate(minDate: Dayjs | undefined, maxDate: Dayjs | undefined, disablePast: boolean, disableFuture: boolean): FormAvailableDate;
|
|
25
|
+
/********************************************************************************************************************
|
|
26
|
+
* getAvailableDate
|
|
27
|
+
* ******************************************************************************************************************/
|
|
13
28
|
export declare function getAvailableDate(availableDate: FormAvailableDate, type: FormAvailableDateType): [Dayjs | null, Dayjs | null];
|
|
14
29
|
export declare function getAvailableDate(availableDate: FormAvailableDate, type: FormDateType, time?: FormTimeType): [Dayjs | null, Dayjs | null];
|
|
30
|
+
/********************************************************************************************************************
|
|
31
|
+
* getAvailableDateVal
|
|
32
|
+
* ******************************************************************************************************************/
|
|
15
33
|
export declare function getAvailableDateVal(availableDate: FormAvailableDate, type: FormAvailableDateType): [number | null, number | null];
|
|
16
34
|
export declare function getAvailableDateVal(availableDate: FormAvailableDate, type: FormDateType, time?: FormTimeType): [number | null, number | null];
|
|
35
|
+
/********************************************************************************************************************
|
|
36
|
+
* getDateVal
|
|
37
|
+
* ******************************************************************************************************************/
|
|
17
38
|
export declare function getDateValForAvailableDate(date: Dayjs, type: FormDateType, time?: FormTimeType): number;
|
|
39
|
+
/********************************************************************************************************************
|
|
40
|
+
* isDateAvailable
|
|
41
|
+
* ******************************************************************************************************************/
|
|
18
42
|
export declare function isDateAvailable(date: Dayjs, availableDate: FormAvailableDate, type: FormAvailableDateType): boolean;
|
|
19
43
|
export declare function isDateAvailable(date: Dayjs, availableDate: FormAvailableDate, type: FormDateType, time?: FormTimeType): boolean;
|
|
44
|
+
/********************************************************************************************************************
|
|
45
|
+
* checkDateAvailable
|
|
46
|
+
* ******************************************************************************************************************/
|
|
20
47
|
export type checkDateAvailableResult = 'available' | 'min' | 'max';
|
|
21
48
|
export declare function checkDateAvailable(date: Dayjs, availableDate: FormAvailableDate, type: FormAvailableDateType): checkDateAvailableResult;
|
|
22
49
|
export declare function checkDateAvailable(date: Dayjs, availableDate: FormAvailableDate, type: FormDateType, time?: FormTimeType): checkDateAvailableResult;
|
|
@@ -9,10 +9,12 @@ export interface FormContextValue<T = any, AllowUndefinedValue extends boolean =
|
|
|
9
9
|
onValueChange(name: string, value: T): void;
|
|
10
10
|
onValueChangeByUser(name: string, value: T): void;
|
|
11
11
|
onRequestSearchSubmit(name: string, value: T): void;
|
|
12
|
+
/** FormRow */
|
|
12
13
|
formColAutoXs?: number;
|
|
13
14
|
formColWidth?: number;
|
|
14
15
|
onAddFormCol?(id: string, xs: number | undefined): void;
|
|
15
16
|
onRemoveFormCol?(id: string): void;
|
|
17
|
+
/** FormCol */
|
|
16
18
|
formColXs?: number;
|
|
17
19
|
formColWithLabel?: boolean;
|
|
18
20
|
formColWithHelperText?: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FormValueItemProps, FormValueItemBaseCommands } from '../../@types';
|
|
2
|
+
import { CommonSxProps } from '../../@types';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { FormControlLabelProps } from '@mui/material';
|
|
5
|
+
export interface FormSwitchProps extends CommonSxProps, Omit<FormValueItemProps<boolean, false>, 'fullWidth'> {
|
|
6
|
+
switchLabel?: ReactNode;
|
|
7
|
+
switchLabelProps?: Omit<FormControlLabelProps, 'children' | 'control' | 'label' | 'required' | 'disabled'>;
|
|
8
|
+
onValue?(value: boolean): boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const FormSwitchDefaultProps: {};
|
|
11
|
+
export interface FormSwitchCommands extends FormValueItemBaseCommands<boolean, false> {
|
|
12
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const FormPersonalNo: React.ForwardRefExoticComponent<Omit<import("../FormText").FormTextProps, "value" | "type" | "maxLength"> & {
|
|
3
3
|
value?: string | undefined;
|
|
4
|
+
skipPersonalNumberValidateCheck?: boolean | undefined;
|
|
4
5
|
} & React.RefAttributes<import("../FormText").FormTextCommands>>;
|
|
5
6
|
export default FormPersonalNo;
|
|
@@ -3,5 +3,6 @@ export type FormPersonalNoValue = string;
|
|
|
3
3
|
export type FormPersonalNoCommands = FormTextCommands;
|
|
4
4
|
export type FormPersonalNoProps = Omit<FormTextProps, 'type' | 'value' | 'maxLength'> & {
|
|
5
5
|
value?: string;
|
|
6
|
+
skipPersonalNumberValidateCheck?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const FormPersonalNoDefaultProps: Pick<FormPersonalNoProps, 'validPattern'>;
|