sti-antd-package 0.0.46 → 0.0.48
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/components/Checkbox/Group/Component.d.ts +1 -1
- package/dist/components/Checkbox/Group/types.d.ts +2 -2
- package/dist/components/Checkbox/types.d.ts +2 -2
- package/dist/components/DatePicker/types.d.ts +5 -19
- package/dist/components/DateRangePicker/types.d.ts +5 -18
- package/dist/components/Form/Item/types.d.ts +17 -7
- package/dist/components/Input/OTP/types.d.ts +4 -17
- package/dist/components/Input/types.d.ts +4 -17
- package/dist/components/NumberFormat/types.d.ts +4 -17
- package/dist/components/Radio/Component.d.ts +1 -1
- package/dist/components/Radio/types.d.ts +4 -17
- package/dist/components/Select/types.d.ts +6 -20
- package/dist/components/Switch/types.d.ts +4 -18
- package/dist/components/TextArea/types.d.ts +4 -19
- package/dist/components/Upload/Dragger/types.d.ts +2 -2
- package/dist/index.d.ts +44 -143
- package/dist/index.esm.js +1283 -1531
- package/dist/index.js +1283 -1531
- package/package.json +5 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CheckboxGroupComponentProps } from "./types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, options, value, defaultValue,
|
|
3
|
+
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, options, value, defaultValue, removeError, onChange, formColLayout, name, label, formClassNames, required, rules, ruleType, ruleMessage, validateStatus, help, shouldUpdate, ref, }: CheckboxGroupComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
4
4
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CheckboxOptionType } from "antd";
|
|
2
2
|
import React, { Ref } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { FormItemCheckbox } from "../../Form/Item";
|
|
4
4
|
export interface CheckboxGroupComponentRef<T> {
|
|
5
5
|
value: () => T[];
|
|
6
6
|
setValue: React.Dispatch<React.SetStateAction<T[]>>;
|
|
@@ -12,5 +12,5 @@ interface CheckboxGroup<T> {
|
|
|
12
12
|
onChange?: (checkedValue: T[]) => void;
|
|
13
13
|
ref?: Ref<CheckboxGroupComponentRef<T>>;
|
|
14
14
|
}
|
|
15
|
-
export type CheckboxGroupComponentProps<T> =
|
|
15
|
+
export type CheckboxGroupComponentProps<T> = FormItemCheckbox & CheckboxGroup<T>;
|
|
16
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemCheckbox } from "../Form/Item";
|
|
2
2
|
import { CheckboxChangeEvent } from "antd";
|
|
3
3
|
import { Ref } from "react";
|
|
4
4
|
export interface CheckboxComponentRef {
|
|
@@ -12,5 +12,5 @@ interface Checkbox {
|
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
ref?: Ref<CheckboxComponentRef>;
|
|
14
14
|
}
|
|
15
|
-
export type CheckboxComponentProps =
|
|
15
|
+
export type CheckboxComponentProps = FormItemCheckbox & Checkbox;
|
|
16
16
|
export {};
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import { DatePickerFormatType
|
|
1
|
+
import { DatePickerFormatType } from "../../constants";
|
|
2
|
+
import { FormItemDatePicker } from "../Form/Item";
|
|
2
3
|
import { Variant } from "antd/es/config-provider";
|
|
3
4
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
4
5
|
import { DatePickerProps } from "antd/es/date-picker";
|
|
5
6
|
import { PickerClassNames } from "antd/es/date-picker/generatePicker/interface";
|
|
6
|
-
import { Rule } from "antd/es/form";
|
|
7
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
8
7
|
import { Dayjs } from "dayjs";
|
|
9
|
-
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
10
|
-
import { NamePath } from "rc-field-form/lib/interface";
|
|
11
8
|
import { Ref } from "react";
|
|
12
9
|
export interface DatePickerComponentRef {
|
|
13
10
|
value: () => Dayjs | null;
|
|
14
11
|
setValue: React.Dispatch<React.SetStateAction<Dayjs | null>>;
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
noItem?: boolean;
|
|
13
|
+
interface DatePicker {
|
|
18
14
|
size?: SizeType;
|
|
19
15
|
variant?: Variant;
|
|
20
16
|
placeholder?: string;
|
|
@@ -23,26 +19,16 @@ export interface DatePickerComponentProps {
|
|
|
23
19
|
suffixIcon?: React.ReactNode;
|
|
24
20
|
picker?: DatePickerProps['picker'];
|
|
25
21
|
format?: DatePickerFormatType;
|
|
26
|
-
loading?: boolean;
|
|
27
22
|
readOnly?: boolean;
|
|
28
|
-
disabled?: boolean;
|
|
29
23
|
disabledDate?: DatePickerProps['disabledDate'];
|
|
30
24
|
disabledTime?: DatePickerProps['disabledTime'];
|
|
31
25
|
value?: DatePickerProps['value'];
|
|
32
26
|
defaultValue?: DatePickerProps['value'];
|
|
33
|
-
removeError?: (name?: NamePath) => void;
|
|
34
27
|
onChange?: (date: Dayjs, dateStrings: string | string[]) => void;
|
|
35
28
|
style?: React.CSSProperties;
|
|
36
|
-
formColLayout?: typeof formColLayout;
|
|
37
|
-
name?: NamePath;
|
|
38
|
-
label?: React.ReactNode;
|
|
39
29
|
classNames?: string[];
|
|
40
30
|
className?: PickerClassNames;
|
|
41
|
-
required?: boolean;
|
|
42
|
-
rules?: Rule[];
|
|
43
|
-
ruleMessage?: string;
|
|
44
|
-
validateStatus?: ValidateStatus;
|
|
45
|
-
help?: React.ReactNode;
|
|
46
|
-
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
47
31
|
ref?: Ref<DatePickerComponentRef>;
|
|
48
32
|
}
|
|
33
|
+
export type DatePickerComponentProps = FormItemDatePicker & DatePicker;
|
|
34
|
+
export {};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { DatePickerFormatType
|
|
1
|
+
import { DatePickerFormatType } from "../../constants";
|
|
2
|
+
import { FormItemDatePicker } from "../Form/Item";
|
|
2
3
|
import { DatePicker, DatePickerProps } from "antd";
|
|
3
4
|
import { Variant } from "antd/es/config-provider";
|
|
4
5
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
5
6
|
import { RangePickerProps } from "antd/es/date-picker";
|
|
6
7
|
import { PickerClassNames } from "antd/es/date-picker/generatePicker/interface";
|
|
7
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
8
8
|
import dayjs from "dayjs";
|
|
9
|
-
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
10
|
-
import { NamePath, Rule } from "rc-field-form/lib/interface";
|
|
11
9
|
import { RangeValueType } from "rc-picker/lib/PickerInput/RangePicker";
|
|
12
10
|
import { Ref } from "react";
|
|
13
11
|
export interface DateRangePickerComponentRef {
|
|
14
12
|
value: () => RangeValueType<dayjs.Dayjs> | null;
|
|
15
13
|
setValue: React.Dispatch<React.SetStateAction<RangeValueType<dayjs.Dayjs> | null>>;
|
|
16
14
|
}
|
|
17
|
-
|
|
18
|
-
noItem?: boolean;
|
|
15
|
+
interface DateRangePicker {
|
|
19
16
|
size?: SizeType;
|
|
20
17
|
variant?: Variant;
|
|
21
18
|
placeholder?: [string, string];
|
|
@@ -24,26 +21,16 @@ export interface DateRangePickerComponentProps {
|
|
|
24
21
|
suffixIcon?: React.ReactNode;
|
|
25
22
|
picker?: DatePickerProps['picker'];
|
|
26
23
|
format?: DatePickerFormatType;
|
|
27
|
-
loading?: boolean;
|
|
28
24
|
readOnly?: boolean;
|
|
29
|
-
disabled?: boolean;
|
|
30
25
|
disabledDate?: RangePickerProps['disabledDate'];
|
|
31
26
|
disabledTime?: RangePickerProps['disabledTime'];
|
|
32
27
|
value?: RangePickerProps['value'];
|
|
33
28
|
defaultValue?: RangePickerProps['value'];
|
|
34
|
-
removeError?: (name?: NamePath) => void;
|
|
35
29
|
onChange?: (date: Parameters<NonNullable<React.ComponentProps<typeof DatePicker.RangePicker>['onChange']>>[0], dateStrings: Parameters<NonNullable<React.ComponentProps<typeof DatePicker.RangePicker>['onChange']>>[1]) => void;
|
|
36
30
|
style?: React.CSSProperties;
|
|
37
|
-
formColLayout?: typeof formColLayout;
|
|
38
|
-
name?: NamePath;
|
|
39
|
-
label?: React.ReactNode;
|
|
40
31
|
classNames?: string[];
|
|
41
32
|
className?: PickerClassNames;
|
|
42
|
-
required?: boolean;
|
|
43
|
-
rules?: Rule[];
|
|
44
|
-
ruleMessage?: string;
|
|
45
|
-
validateStatus?: ValidateStatus;
|
|
46
|
-
help?: React.ReactNode;
|
|
47
|
-
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
48
33
|
ref?: Ref<DateRangePickerComponentRef>;
|
|
49
34
|
}
|
|
35
|
+
export type DateRangePickerComponentProps = FormItemDatePicker & DateRangePicker;
|
|
36
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { ValidateStatus } from "antd/es/form/FormItem";
|
|
|
3
3
|
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
4
4
|
import { EventArgs, NamePath, Rule, RuleObject, Store, StoreValue } from "rc-field-form/lib/interface";
|
|
5
5
|
import React from "react";
|
|
6
|
-
interface
|
|
6
|
+
interface FormItemDefault {
|
|
7
7
|
noItem?: boolean;
|
|
8
8
|
loading?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
@@ -14,19 +14,29 @@ interface FormItemDefaultProps {
|
|
|
14
14
|
formClassNames?: string[];
|
|
15
15
|
required?: boolean;
|
|
16
16
|
}
|
|
17
|
-
interface
|
|
17
|
+
interface FormItemRulesAndMessage {
|
|
18
18
|
rules?: Rule[];
|
|
19
|
-
ruleType?: RuleObject['type'];
|
|
20
19
|
ruleMessage?: string;
|
|
21
20
|
}
|
|
22
|
-
|
|
21
|
+
type FormItemRulesDefault = FormItemRulesAndMessage & {
|
|
22
|
+
ruleType?: RuleObject['type'];
|
|
23
|
+
};
|
|
24
|
+
interface FormItemValidateHelp {
|
|
23
25
|
validateStatus?: ValidateStatus;
|
|
24
26
|
help?: React.ReactNode;
|
|
25
27
|
}
|
|
26
|
-
|
|
28
|
+
interface FormItemShouldUpdate {
|
|
27
29
|
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
28
|
-
}
|
|
29
|
-
export type
|
|
30
|
+
}
|
|
31
|
+
export type FormItemInput = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp;
|
|
32
|
+
export type FormItemTextArea = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp & FormItemShouldUpdate;
|
|
33
|
+
export type FormItemNumberFormat = FormItemDefault & FormItemRulesAndMessage & FormItemValidateHelp & FormItemShouldUpdate;
|
|
34
|
+
export type FormItemSelect = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp;
|
|
35
|
+
export type FormItemRadio = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp;
|
|
36
|
+
export type FormItemCheckbox = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp & FormItemShouldUpdate;
|
|
37
|
+
export type FormItemSwitch = FormItemDefault & FormItemRulesAndMessage & FormItemValidateHelp & FormItemShouldUpdate;
|
|
38
|
+
export type FormItemDatePicker = FormItemDefault & FormItemRulesAndMessage & FormItemValidateHelp & FormItemShouldUpdate;
|
|
39
|
+
export type FormItemUploadDragger = FormItemDefault & FormItemRulesDefault & FormItemValidateHelp;
|
|
30
40
|
export interface FormItemComponentProps {
|
|
31
41
|
noItem?: boolean;
|
|
32
42
|
formColLayout?: typeof formColLayout;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
+
import { FormItemInput } from "../../Form/Item";
|
|
1
2
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
2
|
-
|
|
3
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
4
|
-
import { NamePath, Rule, RuleObject } from "rc-field-form/lib/interface";
|
|
5
|
-
export interface OTPProps {
|
|
6
|
-
noItem?: boolean;
|
|
7
|
-
loading?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
3
|
+
interface OTP {
|
|
9
4
|
size?: SizeType;
|
|
10
5
|
classNames?: string[];
|
|
11
6
|
variant?: "outlined" | "borderless" | "filled" | "underlined";
|
|
@@ -14,7 +9,6 @@ export interface OTPProps {
|
|
|
14
9
|
length?: number;
|
|
15
10
|
value?: string;
|
|
16
11
|
defaultValue?: string;
|
|
17
|
-
removeError?: (name?: NamePath) => void;
|
|
18
12
|
onChange?: (value: string) => void;
|
|
19
13
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
20
14
|
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
|
@@ -22,13 +16,6 @@ export interface OTPProps {
|
|
|
22
16
|
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
23
17
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
24
18
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
25
|
-
formColLayout?: typeof formColLayout;
|
|
26
|
-
name?: NamePath;
|
|
27
|
-
label?: React.ReactNode;
|
|
28
|
-
required?: boolean;
|
|
29
|
-
rules?: Rule[];
|
|
30
|
-
ruleType?: RuleObject['type'];
|
|
31
|
-
ruleMessage?: string;
|
|
32
|
-
validateStatus?: ValidateStatus;
|
|
33
|
-
help?: React.ReactNode;
|
|
34
19
|
}
|
|
20
|
+
export type OTPProps = FormItemInput & OTP;
|
|
21
|
+
export {};
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemInput } from "../Form/Item";
|
|
2
2
|
import { Variant } from "antd/es/config-provider";
|
|
3
3
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
4
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
5
4
|
import { valueType } from "antd/es/statistic/utils";
|
|
6
5
|
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
7
|
-
import { NamePath, Rule, RuleObject } from "rc-field-form/lib/interface";
|
|
8
6
|
import { Ref } from "react";
|
|
9
7
|
export interface InputComponentRef {
|
|
10
8
|
value: () => valueType;
|
|
11
9
|
setValue: React.Dispatch<React.SetStateAction<valueType>>;
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
noItem?: boolean;
|
|
11
|
+
interface Input {
|
|
15
12
|
password?: boolean;
|
|
16
13
|
autoFocus?: boolean;
|
|
17
14
|
allowClear?: boolean | {
|
|
@@ -21,8 +18,6 @@ export interface InputComponentProps {
|
|
|
21
18
|
classNames?: string[];
|
|
22
19
|
variant?: Variant;
|
|
23
20
|
autoCompleteOff?: boolean;
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
disabled?: boolean;
|
|
26
21
|
readOnly?: boolean;
|
|
27
22
|
maxLength?: number;
|
|
28
23
|
addonBefore?: React.ReactNode;
|
|
@@ -32,7 +27,6 @@ export interface InputComponentProps {
|
|
|
32
27
|
placeholder?: string;
|
|
33
28
|
value?: valueType;
|
|
34
29
|
defaultValue?: valueType;
|
|
35
|
-
removeError?: (name?: NamePath) => void;
|
|
36
30
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
37
31
|
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
38
32
|
onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
@@ -41,19 +35,12 @@ export interface InputComponentProps {
|
|
|
41
35
|
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
42
36
|
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
43
37
|
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
44
|
-
formColLayout?: typeof formColLayout;
|
|
45
|
-
name?: NamePath;
|
|
46
|
-
label?: React.ReactNode;
|
|
47
38
|
uppercase?: boolean;
|
|
48
39
|
number?: boolean;
|
|
49
|
-
required?: boolean;
|
|
50
|
-
rules?: Rule[];
|
|
51
|
-
ruleType?: RuleObject['type'];
|
|
52
|
-
ruleMessage?: string;
|
|
53
40
|
ruleMin?: number;
|
|
54
41
|
ruleMax?: number;
|
|
55
|
-
validateStatus?: ValidateStatus;
|
|
56
|
-
help?: React.ReactNode;
|
|
57
42
|
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
58
43
|
ref?: Ref<InputComponentRef>;
|
|
59
44
|
}
|
|
45
|
+
export type InputComponentProps = FormItemInput & Input;
|
|
46
|
+
export {};
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemNumberFormat } from "../Form/Item";
|
|
2
2
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
3
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
4
3
|
import { valueType } from "antd/es/statistic/utils";
|
|
5
|
-
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
6
|
-
import { NamePath, Rule } from "rc-field-form/lib/interface";
|
|
7
4
|
import { Ref } from "react";
|
|
8
5
|
import { OnValueChange } from "react-number-format";
|
|
9
6
|
export interface NumberFormatComponentRef {
|
|
10
7
|
value: () => valueType;
|
|
11
8
|
setValue: React.Dispatch<React.SetStateAction<valueType>>;
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
noItem?: boolean;
|
|
10
|
+
interface NumberFormat {
|
|
15
11
|
text?: boolean;
|
|
16
12
|
size?: SizeType;
|
|
17
13
|
align?: 'right';
|
|
@@ -21,12 +17,10 @@ export interface NumberFormatComponentProps {
|
|
|
21
17
|
prefix?: string;
|
|
22
18
|
suffix?: string;
|
|
23
19
|
placeholder?: string;
|
|
24
|
-
disabled?: boolean;
|
|
25
20
|
readOnly?: boolean;
|
|
26
21
|
allowNegative?: boolean;
|
|
27
22
|
value?: valueType;
|
|
28
23
|
defaultValue?: valueType;
|
|
29
|
-
removeError?: (name?: NamePath) => void;
|
|
30
24
|
onValueChange?: OnValueChange;
|
|
31
25
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
26
|
style?: React.CSSProperties;
|
|
@@ -36,16 +30,9 @@ export interface NumberFormatComponentProps {
|
|
|
36
30
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
37
31
|
onFocus?: React.FocusEventHandler<HTMLDivElement>;
|
|
38
32
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
39
|
-
formColLayout?: typeof formColLayout;
|
|
40
|
-
name?: NamePath;
|
|
41
|
-
label?: React.ReactNode;
|
|
42
|
-
required?: boolean;
|
|
43
|
-
rules?: Rule[];
|
|
44
|
-
ruleMessage?: string;
|
|
45
33
|
ruleMin?: number;
|
|
46
34
|
ruleMax?: number;
|
|
47
|
-
validateStatus?: ValidateStatus;
|
|
48
|
-
help?: React.ReactNode;
|
|
49
|
-
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
50
35
|
ref?: Ref<NumberFormatComponentRef>;
|
|
51
36
|
}
|
|
37
|
+
export type NumberFormatComponentProps = FormItemNumberFormat & NumberFormat;
|
|
38
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RadioComponentProps } from "./types";
|
|
2
2
|
import React from "react";
|
|
3
|
-
declare const _default: React.MemoExoticComponent<(<T>({
|
|
3
|
+
declare const _default: React.MemoExoticComponent<(<T>({ noItem, loading, disabled, buttonStyle, formClassNames, options, optionType, removeError, onChange, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }: RadioComponentProps<T>) => import("react/jsx-runtime").JSX.Element)>;
|
|
4
4
|
export default _default;
|
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemRadio } from "../Form/Item";
|
|
2
2
|
import { CheckboxOptionType, RadioChangeEvent } from "antd";
|
|
3
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
4
3
|
import { RadioGroupButtonStyle, RadioGroupOptionType } from "antd/lib/radio";
|
|
5
|
-
|
|
6
|
-
export interface RadioComponentProps<T> {
|
|
4
|
+
interface Radio<T> {
|
|
7
5
|
buttonStyle?: RadioGroupButtonStyle;
|
|
8
6
|
options?: (CheckboxOptionType<T> | string | number)[];
|
|
9
7
|
optionType?: RadioGroupOptionType;
|
|
10
8
|
onChange?: (event: RadioChangeEvent) => void;
|
|
11
|
-
noItem?: boolean;
|
|
12
|
-
loading?: boolean;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
removeError?: (name?: NamePath) => void;
|
|
15
|
-
formColLayout?: typeof formColLayout;
|
|
16
|
-
name?: NamePath;
|
|
17
|
-
label?: React.ReactNode;
|
|
18
|
-
required?: boolean;
|
|
19
|
-
rules?: Rule[];
|
|
20
|
-
ruleType?: RuleObject['type'];
|
|
21
|
-
ruleMessage?: string;
|
|
22
|
-
validateStatus?: ValidateStatus;
|
|
23
|
-
help?: React.ReactNode;
|
|
24
9
|
}
|
|
10
|
+
export type RadioComponentProps<T> = FormItemRadio & Radio<T>;
|
|
11
|
+
export {};
|
|
@@ -1,32 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemSelect } from "../Form/Item";
|
|
2
2
|
import { SelectProps } from "antd";
|
|
3
3
|
import { Variant } from "antd/es/config-provider";
|
|
4
4
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
5
|
-
import { Rule, RuleObject } from "antd/es/form";
|
|
6
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
7
5
|
import { DefaultOptionType } from "antd/es/select";
|
|
8
|
-
|
|
9
|
-
export type SelectOption = (DefaultOptionType & {
|
|
6
|
+
export type SelectOption = DefaultOptionType & {
|
|
10
7
|
text?: React.ReactNode;
|
|
11
8
|
encryption_id?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
noItem?: boolean;
|
|
9
|
+
};
|
|
10
|
+
interface Select {
|
|
15
11
|
showSearch?: boolean;
|
|
16
12
|
mode?: SelectProps['mode'];
|
|
17
13
|
variant?: Variant;
|
|
18
14
|
size?: SizeType;
|
|
19
15
|
suffixIcon?: React.ReactNode;
|
|
20
16
|
classNames?: string[];
|
|
21
|
-
loading?: boolean;
|
|
22
17
|
readOnly?: boolean;
|
|
23
|
-
disabled?: boolean;
|
|
24
18
|
open?: boolean;
|
|
25
19
|
filterOption?: SelectProps['filterOption'];
|
|
26
20
|
placeholder?: React.ReactNode;
|
|
27
21
|
value?: any;
|
|
28
22
|
defaultValue?: any;
|
|
29
|
-
removeError?: (name?: NamePath) => void;
|
|
30
23
|
onChange?: (value: any, option?: SelectOption | SelectOption[]) => void;
|
|
31
24
|
onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
|
|
32
25
|
onSearch?: (value: string) => void;
|
|
@@ -38,13 +31,6 @@ export interface SelectComponentProps {
|
|
|
38
31
|
addItem?: {
|
|
39
32
|
onClick?: (value: string) => void;
|
|
40
33
|
};
|
|
41
|
-
formColLayout?: typeof formColLayout;
|
|
42
|
-
name?: string | string[];
|
|
43
|
-
label?: React.ReactNode;
|
|
44
|
-
required?: boolean;
|
|
45
|
-
rules?: Rule[];
|
|
46
|
-
ruleType?: RuleObject['type'];
|
|
47
|
-
ruleMessage?: string;
|
|
48
|
-
validateStatus?: ValidateStatus;
|
|
49
|
-
help?: React.ReactNode;
|
|
50
34
|
}
|
|
35
|
+
export type SelectComponentProps = FormItemSelect & Select;
|
|
36
|
+
export {};
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
3
|
-
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
4
|
-
import { NamePath, Rule } from "rc-field-form/lib/interface";
|
|
1
|
+
import { FormItemSwitch } from "../Form/Item";
|
|
5
2
|
import React from "react";
|
|
6
|
-
|
|
7
|
-
noItem?: boolean;
|
|
3
|
+
interface Switch {
|
|
8
4
|
icon?: boolean;
|
|
9
5
|
checkedChildren?: React.ReactNode;
|
|
10
6
|
unCheckedChildren?: React.ReactNode;
|
|
11
|
-
loading?: boolean;
|
|
12
|
-
disabled?: boolean;
|
|
13
7
|
value?: boolean;
|
|
14
8
|
checked?: boolean;
|
|
15
9
|
defaultChecked?: boolean;
|
|
16
|
-
removeError?: (name?: NamePath) => void;
|
|
17
10
|
onChange?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
18
|
-
formColLayout?: typeof formColLayout;
|
|
19
|
-
name?: NamePath;
|
|
20
|
-
label?: React.ReactNode;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
rules?: Rule[];
|
|
23
|
-
ruleMessage?: string;
|
|
24
|
-
validateStatus?: ValidateStatus;
|
|
25
|
-
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
26
|
-
help?: React.ReactNode;
|
|
27
11
|
}
|
|
12
|
+
export type SwitchComponentProps = FormItemSwitch & Switch;
|
|
13
|
+
export {};
|
|
@@ -1,39 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemTextArea } from "../Form/Item";
|
|
2
2
|
import { Variant } from "antd/es/config-provider";
|
|
3
3
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
4
|
-
import { ValidateStatus } from "antd/es/form/FormItem";
|
|
5
4
|
import { valueType } from "antd/es/statistic/utils";
|
|
6
|
-
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
7
|
-
import { NamePath, Rule, RuleObject } from "rc-field-form/lib/interface";
|
|
8
5
|
import { Ref } from "react";
|
|
9
6
|
export interface TextAreaComponentRef {
|
|
10
7
|
value: () => valueType;
|
|
11
8
|
setValue: React.Dispatch<React.SetStateAction<valueType>>;
|
|
12
9
|
}
|
|
13
|
-
|
|
14
|
-
noItem?: boolean;
|
|
10
|
+
interface TextArea {
|
|
15
11
|
noResize?: boolean;
|
|
16
12
|
size?: SizeType;
|
|
17
13
|
className?: string[];
|
|
18
14
|
rows?: number;
|
|
19
15
|
variant?: Variant;
|
|
20
|
-
loading?: boolean;
|
|
21
|
-
disabled?: boolean;
|
|
22
16
|
readOnly?: boolean;
|
|
23
17
|
placeholder?: string;
|
|
24
18
|
value?: valueType;
|
|
25
19
|
defaultValue?: valueType;
|
|
26
|
-
removeError?: (name?: NamePath) => void;
|
|
27
20
|
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
28
|
-
formColLayout?: typeof formColLayout;
|
|
29
|
-
name?: NamePath;
|
|
30
|
-
label?: React.ReactNode;
|
|
31
|
-
required?: boolean;
|
|
32
|
-
rules?: Rule[];
|
|
33
|
-
ruleType?: RuleObject['type'];
|
|
34
|
-
ruleMessage?: string;
|
|
35
|
-
validateStatus?: ValidateStatus;
|
|
36
|
-
help?: React.ReactNode;
|
|
37
|
-
shouldUpdate?: ShouldUpdate<string | string[]>;
|
|
38
21
|
ref?: Ref<TextAreaComponentRef>;
|
|
39
22
|
}
|
|
23
|
+
export type TextAreaComponentProps = FormItemTextArea & TextArea;
|
|
24
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormItemUploadDragger } from "../../Form/Item";
|
|
2
2
|
import { RcFile } from "antd/es/upload";
|
|
3
3
|
import { UploadChangeParam, UploadFile, UploadListType } from "antd/es/upload/interface";
|
|
4
4
|
import { UploadRequestOption } from "rc-upload/lib/interface";
|
|
@@ -17,5 +17,5 @@ interface UploadDragger {
|
|
|
17
17
|
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
18
18
|
defaultFileList?: UploadFile<any>[];
|
|
19
19
|
}
|
|
20
|
-
export type UploadDraggerComponentProps =
|
|
20
|
+
export type UploadDraggerComponentProps = FormItemUploadDragger & UploadDragger;
|
|
21
21
|
export {};
|