x-next 0.0.0-alpha.30 → 0.0.0-alpha.32
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/_utils/is.d.ts +1 -0
- package/dist/components/form/constants.d.ts +4 -0
- package/dist/components/form/form-item.d.ts +31 -0
- package/dist/components/form/form.d.ts +39 -0
- package/dist/components/form/hooks.d.ts +4 -0
- package/dist/components/form/types.d.ts +31 -0
- package/dist/components/input/Input.d.ts +220 -0
- package/dist/components/input/index.d.ts +394 -0
- package/dist/components/input/props.d.ts +95 -0
- package/dist/components/input/utils.d.ts +6 -0
- package/dist/components/trend-chart/index.d.ts +61 -62
- package/dist/style.css +1 -1
- package/package.json +2 -1
- /package/dist/components/trend-chart/components/{trend-chart.d.ts → TrendChart.d.ts} +0 -0
package/dist/_utils/is.d.ts
CHANGED
@@ -22,3 +22,4 @@ export declare const isArrayChildren: (children: VNodeNormalizedChildren) => chi
|
|
22
22
|
export declare const isQuarter: (fromat: string) => boolean;
|
23
23
|
export declare function isDayjs(time: any): time is Dayjs;
|
24
24
|
export declare function isClient(): boolean;
|
25
|
+
export declare const isFirefox: () => boolean;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { ExtractPropTypes } from 'vue';
|
2
|
+
import { Arrayable, FormItemRule } from './types';
|
3
|
+
export declare const formItemValidateStates: readonly ["", "error", "validating", "success"];
|
4
|
+
export type FormItemValidateState = (typeof formItemValidateStates)[number];
|
5
|
+
export type FormItemProp = Arrayable<string>;
|
6
|
+
export declare const formItemProps: {
|
7
|
+
label: StringConstructor;
|
8
|
+
labelWidth: {
|
9
|
+
type: (NumberConstructor | StringConstructor)[];
|
10
|
+
default: string;
|
11
|
+
};
|
12
|
+
prop: {
|
13
|
+
type: import('vue').PropType<FormItemProp>;
|
14
|
+
};
|
15
|
+
required: {
|
16
|
+
type: BooleanConstructor;
|
17
|
+
default: undefined;
|
18
|
+
};
|
19
|
+
rules: {
|
20
|
+
type: import('vue').PropType<Arrayable<FormItemRule>>;
|
21
|
+
};
|
22
|
+
validateStatus: {
|
23
|
+
type: StringConstructor;
|
24
|
+
values: readonly ["", "error", "validating", "success"];
|
25
|
+
};
|
26
|
+
showMessage: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
export type FormItemProps = ExtractPropTypes<typeof formItemProps>;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
import { FormItemProp } from './form-item';
|
3
|
+
export declare const formProps: {
|
4
|
+
model: {
|
5
|
+
type: ObjectConstructor;
|
6
|
+
};
|
7
|
+
rules: {
|
8
|
+
type: PropType<Partial<Record<string, import('./types').Arrayable<import('./types').FormItemRule>>>>;
|
9
|
+
};
|
10
|
+
labelPosition: {
|
11
|
+
type: PropType<"left" | "right" | "top">;
|
12
|
+
default: string;
|
13
|
+
};
|
14
|
+
requireAsteriskPosition: {
|
15
|
+
type: StringConstructor;
|
16
|
+
default: string;
|
17
|
+
};
|
18
|
+
labelWidth: {
|
19
|
+
type: (NumberConstructor | StringConstructor)[];
|
20
|
+
default: string;
|
21
|
+
};
|
22
|
+
showMessage: {
|
23
|
+
type: BooleanConstructor;
|
24
|
+
default: boolean;
|
25
|
+
};
|
26
|
+
validateOnRuleChange: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
inline: {
|
31
|
+
type: BooleanConstructor;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
};
|
35
|
+
export type FormProps = ExtractPropTypes<typeof formProps>;
|
36
|
+
export declare const formEmits: {
|
37
|
+
validate: (prop: FormItemProp, isValid: boolean, message: string) => boolean;
|
38
|
+
};
|
39
|
+
export type FormEmits = typeof formEmits;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { SetupContext } from 'vue';
|
2
|
+
import { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
|
3
|
+
import { FormProps, FormEmits } from './form';
|
4
|
+
import { FormItemProp, FormItemProps, FormItemValidateState } from './form-item';
|
5
|
+
export type Arrayable<T> = T | T[];
|
6
|
+
export interface FormItemRule extends Omit<RuleItem, 'validator'> {
|
7
|
+
trigger?: Arrayable<string>;
|
8
|
+
validator?: RuleItem['validator'] | string;
|
9
|
+
}
|
10
|
+
export type FormRules = Partial<Record<string, Arrayable<FormItemRule>>>;
|
11
|
+
export type FormValidationResult = Promise<any>;
|
12
|
+
export type FormValidateCallback = (isValid: boolean, invalidFields?: any) => void;
|
13
|
+
export type FormContext = FormProps & {
|
14
|
+
emit: SetupContext<FormEmits>['emit'];
|
15
|
+
addField: (field: FormItemContext) => void;
|
16
|
+
removeField: (field: FormItemContext) => void;
|
17
|
+
resetFields: (props?: Arrayable<FormItemProp>) => void;
|
18
|
+
clearValidate: (props?: Arrayable<FormItemProp>) => void;
|
19
|
+
validateField: (props?: Arrayable<FormItemProp>, callback?: FormValidateCallback) => FormValidationResult;
|
20
|
+
};
|
21
|
+
export interface FormItemContext extends FormItemProps {
|
22
|
+
$el: HTMLDivElement | undefined;
|
23
|
+
validateState: FormItemValidateState;
|
24
|
+
validate: (trigger: string, callback?: FormValidateCallback) => FormValidationResult;
|
25
|
+
resetField(): void;
|
26
|
+
clearValidate(): void;
|
27
|
+
}
|
28
|
+
export interface FormValidateFailure {
|
29
|
+
errors: ValidateError[] | null;
|
30
|
+
fields: ValidateFieldsError;
|
31
|
+
}
|
@@ -0,0 +1,220 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
2
|
+
autocomplete: {
|
3
|
+
type: import('vue').PropType<"on" | "off">;
|
4
|
+
default: string;
|
5
|
+
};
|
6
|
+
name: {
|
7
|
+
type: StringConstructor;
|
8
|
+
default: string;
|
9
|
+
};
|
10
|
+
readonly: {
|
11
|
+
type: BooleanConstructor;
|
12
|
+
default: boolean;
|
13
|
+
};
|
14
|
+
autofocus: {
|
15
|
+
type: BooleanConstructor;
|
16
|
+
default: boolean;
|
17
|
+
};
|
18
|
+
form: {
|
19
|
+
type: StringConstructor;
|
20
|
+
default: undefined;
|
21
|
+
};
|
22
|
+
modelValue: {
|
23
|
+
type: (NumberConstructor | StringConstructor)[];
|
24
|
+
default: undefined;
|
25
|
+
};
|
26
|
+
type: {
|
27
|
+
type: import('vue').PropType<"text" | "textarea">;
|
28
|
+
default: string;
|
29
|
+
};
|
30
|
+
placeholder: {
|
31
|
+
type: StringConstructor;
|
32
|
+
default: string;
|
33
|
+
};
|
34
|
+
disabled: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
size: {
|
39
|
+
type: import('vue').PropType<"default" | "small" | "large">;
|
40
|
+
default: string;
|
41
|
+
};
|
42
|
+
showPassword: {
|
43
|
+
type: BooleanConstructor;
|
44
|
+
default: boolean;
|
45
|
+
};
|
46
|
+
resize: {
|
47
|
+
type: BooleanConstructor;
|
48
|
+
default: boolean;
|
49
|
+
};
|
50
|
+
prefixIcon: {
|
51
|
+
type: StringConstructor;
|
52
|
+
default: string;
|
53
|
+
};
|
54
|
+
suffixIcon: {
|
55
|
+
type: StringConstructor;
|
56
|
+
default: string;
|
57
|
+
};
|
58
|
+
autosize: {
|
59
|
+
type: import('vue').PropType<boolean | {
|
60
|
+
minRows: number;
|
61
|
+
maxRows: number;
|
62
|
+
}>;
|
63
|
+
default: boolean;
|
64
|
+
};
|
65
|
+
formatter: {
|
66
|
+
type: FunctionConstructor;
|
67
|
+
default: undefined;
|
68
|
+
};
|
69
|
+
validateEvent: {
|
70
|
+
type: BooleanConstructor;
|
71
|
+
default: boolean;
|
72
|
+
};
|
73
|
+
clearable: {
|
74
|
+
type: BooleanConstructor;
|
75
|
+
default: boolean;
|
76
|
+
};
|
77
|
+
card: {
|
78
|
+
type: BooleanConstructor;
|
79
|
+
default: boolean;
|
80
|
+
};
|
81
|
+
maxlength: {
|
82
|
+
type: (NumberConstructor | StringConstructor)[];
|
83
|
+
default: undefined;
|
84
|
+
};
|
85
|
+
showWordLimit: {
|
86
|
+
type: BooleanConstructor;
|
87
|
+
default: boolean;
|
88
|
+
};
|
89
|
+
valueType: {
|
90
|
+
type: import('vue').PropType<"string" | "number">;
|
91
|
+
default: string;
|
92
|
+
};
|
93
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("clear" | "input" | "blur" | "change" | "focus" | "update:modelValue" | "pressEnter")[], "clear" | "input" | "blur" | "change" | "focus" | "update:modelValue" | "pressEnter", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
94
|
+
autocomplete: {
|
95
|
+
type: import('vue').PropType<"on" | "off">;
|
96
|
+
default: string;
|
97
|
+
};
|
98
|
+
name: {
|
99
|
+
type: StringConstructor;
|
100
|
+
default: string;
|
101
|
+
};
|
102
|
+
readonly: {
|
103
|
+
type: BooleanConstructor;
|
104
|
+
default: boolean;
|
105
|
+
};
|
106
|
+
autofocus: {
|
107
|
+
type: BooleanConstructor;
|
108
|
+
default: boolean;
|
109
|
+
};
|
110
|
+
form: {
|
111
|
+
type: StringConstructor;
|
112
|
+
default: undefined;
|
113
|
+
};
|
114
|
+
modelValue: {
|
115
|
+
type: (NumberConstructor | StringConstructor)[];
|
116
|
+
default: undefined;
|
117
|
+
};
|
118
|
+
type: {
|
119
|
+
type: import('vue').PropType<"text" | "textarea">;
|
120
|
+
default: string;
|
121
|
+
};
|
122
|
+
placeholder: {
|
123
|
+
type: StringConstructor;
|
124
|
+
default: string;
|
125
|
+
};
|
126
|
+
disabled: {
|
127
|
+
type: BooleanConstructor;
|
128
|
+
default: boolean;
|
129
|
+
};
|
130
|
+
size: {
|
131
|
+
type: import('vue').PropType<"default" | "small" | "large">;
|
132
|
+
default: string;
|
133
|
+
};
|
134
|
+
showPassword: {
|
135
|
+
type: BooleanConstructor;
|
136
|
+
default: boolean;
|
137
|
+
};
|
138
|
+
resize: {
|
139
|
+
type: BooleanConstructor;
|
140
|
+
default: boolean;
|
141
|
+
};
|
142
|
+
prefixIcon: {
|
143
|
+
type: StringConstructor;
|
144
|
+
default: string;
|
145
|
+
};
|
146
|
+
suffixIcon: {
|
147
|
+
type: StringConstructor;
|
148
|
+
default: string;
|
149
|
+
};
|
150
|
+
autosize: {
|
151
|
+
type: import('vue').PropType<boolean | {
|
152
|
+
minRows: number;
|
153
|
+
maxRows: number;
|
154
|
+
}>;
|
155
|
+
default: boolean;
|
156
|
+
};
|
157
|
+
formatter: {
|
158
|
+
type: FunctionConstructor;
|
159
|
+
default: undefined;
|
160
|
+
};
|
161
|
+
validateEvent: {
|
162
|
+
type: BooleanConstructor;
|
163
|
+
default: boolean;
|
164
|
+
};
|
165
|
+
clearable: {
|
166
|
+
type: BooleanConstructor;
|
167
|
+
default: boolean;
|
168
|
+
};
|
169
|
+
card: {
|
170
|
+
type: BooleanConstructor;
|
171
|
+
default: boolean;
|
172
|
+
};
|
173
|
+
maxlength: {
|
174
|
+
type: (NumberConstructor | StringConstructor)[];
|
175
|
+
default: undefined;
|
176
|
+
};
|
177
|
+
showWordLimit: {
|
178
|
+
type: BooleanConstructor;
|
179
|
+
default: boolean;
|
180
|
+
};
|
181
|
+
valueType: {
|
182
|
+
type: import('vue').PropType<"string" | "number">;
|
183
|
+
default: string;
|
184
|
+
};
|
185
|
+
}>> & Readonly<{
|
186
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
187
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
188
|
+
onBlur?: ((...args: any[]) => any) | undefined;
|
189
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
190
|
+
onFocus?: ((...args: any[]) => any) | undefined;
|
191
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
192
|
+
onPressEnter?: ((...args: any[]) => any) | undefined;
|
193
|
+
}>, {
|
194
|
+
size: "default" | "small" | "large";
|
195
|
+
name: string;
|
196
|
+
type: "text" | "textarea";
|
197
|
+
form: string;
|
198
|
+
disabled: boolean;
|
199
|
+
resize: boolean;
|
200
|
+
modelValue: string | number;
|
201
|
+
prefixIcon: string;
|
202
|
+
suffixIcon: string;
|
203
|
+
placeholder: string;
|
204
|
+
readonly: boolean;
|
205
|
+
maxlength: string | number;
|
206
|
+
clearable: boolean;
|
207
|
+
autofocus: boolean;
|
208
|
+
showPassword: boolean;
|
209
|
+
autocomplete: "on" | "off";
|
210
|
+
autosize: boolean | {
|
211
|
+
minRows: number;
|
212
|
+
maxRows: number;
|
213
|
+
};
|
214
|
+
formatter: Function;
|
215
|
+
validateEvent: boolean;
|
216
|
+
card: boolean;
|
217
|
+
showWordLimit: boolean;
|
218
|
+
valueType: "string" | "number";
|
219
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
220
|
+
export default _default;
|