@signalplus/params-about 1.0.2 → 1.0.3
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/index.d.ts +227 -308
- package/lib/es/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2,390 +2,309 @@ import React, { PureComponent, ComponentProps } from 'react';
|
|
|
2
2
|
import ReactGlobalComp from 'react-global-comp';
|
|
3
3
|
|
|
4
4
|
declare enum ParamType {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
ParamGroup = -1,
|
|
6
|
+
Number = 1,
|
|
7
|
+
Percentage = 2,
|
|
8
|
+
Bool = 3,
|
|
9
|
+
NumberRange = 4,
|
|
10
|
+
PercentageRange = 5,
|
|
11
|
+
ExpiryLimit = 6,
|
|
12
|
+
Expiry = 7,
|
|
13
|
+
Phone = 8,
|
|
14
|
+
Text = 9
|
|
15
15
|
}
|
|
16
16
|
interface BaseInputProps {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
value?: any;
|
|
18
|
+
onChange?(val: any): void;
|
|
19
|
+
onBlur?(): void;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: any;
|
|
23
|
+
[key: string]: any | undefined | null;
|
|
24
24
|
}
|
|
25
25
|
interface ValidateInfo {
|
|
26
|
-
|
|
26
|
+
[key: string]: undefined | string | ValidateInfo;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
declare type ParamValueStruct = Record<string, any>;
|
|
30
30
|
interface ParamRendererProps extends BaseInputProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
valueType?: ParamType;
|
|
32
|
+
value?: ParamValueStruct;
|
|
33
|
+
expiriesOptions?: string[];
|
|
34
|
+
onChange?(val: ParamValueStruct): void;
|
|
35
35
|
}
|
|
36
36
|
declare class ParamRenderer extends PureComponent<ParamRendererProps> {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
get typeConfig(): {
|
|
38
|
+
name: string;
|
|
39
|
+
key?: string | undefined;
|
|
40
|
+
defaultValue?: any;
|
|
41
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
42
|
+
validator?(value: any): string;
|
|
43
|
+
required?: boolean | undefined;
|
|
44
|
+
};
|
|
45
|
+
get value(): any;
|
|
46
|
+
onChange: (val: any) => void;
|
|
47
|
+
render(): JSX.Element;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
interface ParentSelectorOption {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
parentId?: string | number;
|
|
52
|
+
$paramId: string | number;
|
|
53
|
+
name?: string;
|
|
54
|
+
disabled?: boolean;
|
|
55
|
+
valueType: ParamType;
|
|
56
|
+
children?: ParentSelectorOption[];
|
|
57
|
+
[key: string]: any;
|
|
58
58
|
}
|
|
59
59
|
interface ParentSelectorProps extends BaseInputProps {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
parentOptions?: ParentSelectorOption[];
|
|
61
|
+
value?: string;
|
|
62
|
+
onChange?(val: string): void;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
interface ParamFormData {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
parentId?: string;
|
|
67
|
+
$paramId?: string;
|
|
68
|
+
key: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
valueType: ParamType;
|
|
71
|
+
defaultValue?: Record<string, any>;
|
|
72
|
+
description?: string;
|
|
73
73
|
}
|
|
74
74
|
interface ParamFormProps {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
parentOptions: ParentSelectorProps['parentOptions'];
|
|
76
|
+
allKeys: string[];
|
|
77
|
+
expiriesOptions: string[];
|
|
78
|
+
initialValues?: Partial<ParamFormData>;
|
|
79
|
+
groupEditable?: boolean;
|
|
80
|
+
onChange?(data: ParamFormData): void;
|
|
81
|
+
onSubmit?(data: ParamFormData): any;
|
|
82
82
|
}
|
|
83
83
|
declare class ParamForm extends PureComponent<ParamFormProps> {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
ref: React.RefObject<any>;
|
|
85
|
+
get formItems(): {
|
|
86
|
+
label: string;
|
|
87
|
+
name: string;
|
|
88
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
89
|
+
required?: boolean;
|
|
90
|
+
validator?(_: any, val: any): Promise<any>;
|
|
91
|
+
}[];
|
|
92
|
+
onChange: (changed: any, data: any) => void;
|
|
93
|
+
render(): JSX.Element;
|
|
94
94
|
}
|
|
95
|
-
declare class ParamFormModalEl extends PureComponent<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
onSubmit: () => any;
|
|
107
|
-
render(): JSX.Element;
|
|
95
|
+
declare class ParamFormModalEl extends PureComponent<ParamFormProps & Required<Pick<ParamFormProps, 'onSubmit'>>> {
|
|
96
|
+
ref: React.RefObject<ParamForm>;
|
|
97
|
+
state: {
|
|
98
|
+
visible: boolean;
|
|
99
|
+
pending: boolean;
|
|
100
|
+
};
|
|
101
|
+
get isEdit(): boolean;
|
|
102
|
+
onShow: () => void;
|
|
103
|
+
onHide: () => void;
|
|
104
|
+
onSubmit: () => any;
|
|
105
|
+
render(): JSX.Element;
|
|
108
106
|
}
|
|
109
107
|
declare class ParamFormModal {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
static el: ReactGlobalComp<ParamFormProps & Required<Pick<ParamFormProps, "onSubmit">>>;
|
|
109
|
+
static show(props: Omit<ComponentProps<typeof ParamFormModalEl>, 'visible'>): Promise<void>;
|
|
110
|
+
static hide(): Promise<void>;
|
|
113
111
|
}
|
|
114
112
|
|
|
115
113
|
interface ParamValueEditorData {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
paramId: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
valueBefore: Record<string, any>;
|
|
117
|
+
value?: Record<string, any>;
|
|
118
|
+
defaultValue?: Record<string, any>;
|
|
121
119
|
}
|
|
122
120
|
interface ParamValueEditorProps {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
allParams: ParentSelectorProps['parentOptions'];
|
|
122
|
+
expiriesOptions: string[];
|
|
123
|
+
valueType: ParamType;
|
|
124
|
+
initialValues: ParamValueEditorData;
|
|
125
|
+
onChange?(data: ParamValueEditorData): void;
|
|
126
|
+
onSubmit?(data: ParamValueEditorData): any;
|
|
129
127
|
}
|
|
130
128
|
declare class ParamValueEditor extends PureComponent<ParamValueEditorProps> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
ref: React.RefObject<any>;
|
|
130
|
+
get formItems(): {
|
|
131
|
+
label: string;
|
|
132
|
+
name: string;
|
|
133
|
+
className?: string;
|
|
134
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
135
|
+
required?: boolean;
|
|
136
|
+
validator?(_: any, val: any): Promise<any>;
|
|
137
|
+
}[];
|
|
138
|
+
onChange: (changed: any, data: any) => void;
|
|
139
|
+
render(): JSX.Element;
|
|
142
140
|
}
|
|
143
|
-
declare class ParamValueEditorModalEl extends PureComponent<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
onSubmit: () => any;
|
|
154
|
-
render(): JSX.Element;
|
|
141
|
+
declare class ParamValueEditorModalEl extends PureComponent<ParamValueEditorProps & Required<Pick<ParamValueEditorProps, 'onSubmit'>>> {
|
|
142
|
+
ref: React.RefObject<ParamValueEditor>;
|
|
143
|
+
state: {
|
|
144
|
+
visible: boolean;
|
|
145
|
+
pending: boolean;
|
|
146
|
+
};
|
|
147
|
+
onShow: () => void;
|
|
148
|
+
onHide: () => void;
|
|
149
|
+
onSubmit: () => any;
|
|
150
|
+
render(): JSX.Element;
|
|
155
151
|
}
|
|
156
152
|
declare class ParamValueEditorModal {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
static show(
|
|
161
|
-
props: Omit<ComponentProps<typeof ParamValueEditorModalEl>, 'visible'>,
|
|
162
|
-
): Promise<void>;
|
|
163
|
-
static hide(): Promise<void>;
|
|
153
|
+
static el: ReactGlobalComp<ParamValueEditorProps & Required<Pick<ParamValueEditorProps, "onSubmit">>>;
|
|
154
|
+
static show(props: Omit<ComponentProps<typeof ParamValueEditorModalEl>, 'visible'>): Promise<void>;
|
|
155
|
+
static hide(): Promise<void>;
|
|
164
156
|
}
|
|
165
157
|
|
|
166
158
|
interface ImageUploadProps extends BaseInputProps {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
159
|
+
value?: string;
|
|
160
|
+
onChange?(val?: string): void;
|
|
161
|
+
getSignedUrl(key: string): Promise<string>;
|
|
162
|
+
/**
|
|
163
|
+
* 返回图片的 key
|
|
164
|
+
* */
|
|
165
|
+
handleUpload(file: Blob): Promise<string>;
|
|
174
166
|
}
|
|
175
167
|
|
|
176
168
|
interface ParamGroupEditorData {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
parentId: string;
|
|
170
|
+
$paramId?: string;
|
|
171
|
+
name: string;
|
|
172
|
+
valueType?: ParamType;
|
|
173
|
+
descriptionUrl?: string;
|
|
182
174
|
}
|
|
183
|
-
interface ParamGroupEditorProps
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
onSubmit?(data: ParamGroupEditorData): any;
|
|
175
|
+
interface ParamGroupEditorProps extends Required<Pick<ImageUploadProps, 'getSignedUrl' | 'handleUpload'>> {
|
|
176
|
+
/**
|
|
177
|
+
* 传了表示为有父级
|
|
178
|
+
* */
|
|
179
|
+
parentOptions?: ParentSelectorProps['parentOptions'];
|
|
180
|
+
initialValues?: Partial<ParamGroupEditorData>;
|
|
181
|
+
onChange?(data: ParamGroupEditorData): void;
|
|
182
|
+
onSubmit?(data: ParamGroupEditorData): any;
|
|
192
183
|
}
|
|
193
184
|
declare class ParamGroupEditor extends PureComponent<ParamGroupEditorProps> {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
185
|
+
ref: React.RefObject<any>;
|
|
186
|
+
get formItems(): {
|
|
187
|
+
label: string;
|
|
188
|
+
name: string;
|
|
189
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
190
|
+
required?: boolean | undefined;
|
|
191
|
+
validator?(_: any, val: any): Promise<any>;
|
|
192
|
+
}[];
|
|
193
|
+
onChange: (changed: any, data: any) => void;
|
|
194
|
+
render(): JSX.Element;
|
|
204
195
|
}
|
|
205
|
-
declare class ParamGroupEditorModalEl extends PureComponent<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
onSubmit: () => any;
|
|
217
|
-
render(): JSX.Element;
|
|
196
|
+
declare class ParamGroupEditorModalEl extends PureComponent<ParamGroupEditorProps & Required<Pick<ParamGroupEditorProps, 'onSubmit'>>> {
|
|
197
|
+
ref: React.RefObject<ParamGroupEditor>;
|
|
198
|
+
state: {
|
|
199
|
+
visible: boolean;
|
|
200
|
+
pending: boolean;
|
|
201
|
+
};
|
|
202
|
+
get isEdit(): boolean;
|
|
203
|
+
onShow: () => void;
|
|
204
|
+
onHide: () => void;
|
|
205
|
+
onSubmit: () => any;
|
|
206
|
+
render(): JSX.Element;
|
|
218
207
|
}
|
|
219
208
|
declare class ParamGroupEditorModal {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
static show(
|
|
224
|
-
props: Omit<ComponentProps<typeof ParamGroupEditorModalEl>, 'visible'>,
|
|
225
|
-
): Promise<void>;
|
|
226
|
-
static hide(): Promise<void>;
|
|
209
|
+
static el: ReactGlobalComp<ParamGroupEditorProps & Required<Pick<ParamGroupEditorProps, "onSubmit">>>;
|
|
210
|
+
static show(props: Omit<ComponentProps<typeof ParamGroupEditorModalEl>, 'visible'>): Promise<void>;
|
|
211
|
+
static hide(): Promise<void>;
|
|
227
212
|
}
|
|
228
213
|
|
|
229
214
|
interface ParamMoverData {
|
|
230
|
-
|
|
215
|
+
parentId: string | number;
|
|
231
216
|
}
|
|
232
217
|
interface ParamMoverProps {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
218
|
+
/**
|
|
219
|
+
* 需要确保 targetParams 的元素之间无父子或者祖先子孙关系
|
|
220
|
+
* */
|
|
221
|
+
targetParams: (string | number)[];
|
|
222
|
+
allParams: NonNullable<ParentSelectorProps['parentOptions']>;
|
|
223
|
+
/**
|
|
224
|
+
* 最大层级(包括参数)
|
|
225
|
+
* @default 3
|
|
226
|
+
* */
|
|
227
|
+
maxLevel?: number;
|
|
228
|
+
onSubmit?(params: NonNullable<ParentSelectorProps['parentOptions']>): any;
|
|
244
229
|
}
|
|
245
230
|
declare function initState(props: ParamMoverProps): {
|
|
246
|
-
preProps: ParamMoverProps;
|
|
247
|
-
options: any[];
|
|
248
|
-
paramsMap: Record<string, ParentSelectorOption>;
|
|
249
|
-
};
|
|
250
|
-
declare type ParamMoverState = ReturnType<typeof initState>;
|
|
251
|
-
declare class ParamMover extends PureComponent<ParamMoverProps, ParamMoverState> {
|
|
252
|
-
static getDerivedStateFromProps(
|
|
253
|
-
props: ParamMoverProps,
|
|
254
|
-
state: ParamMoverState,
|
|
255
|
-
): {
|
|
256
231
|
preProps: ParamMoverProps;
|
|
257
232
|
options: any[];
|
|
258
233
|
paramsMap: Record<string, ParentSelectorOption>;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
234
|
+
};
|
|
235
|
+
declare type ParamMoverState = ReturnType<typeof initState>;
|
|
236
|
+
declare class ParamMover extends PureComponent<ParamMoverProps, ParamMoverState> {
|
|
237
|
+
static getDerivedStateFromProps(props: ParamMoverProps, state: ParamMoverState): {
|
|
238
|
+
preProps: ParamMoverProps;
|
|
239
|
+
options: any[];
|
|
240
|
+
paramsMap: Record<string, ParentSelectorOption>;
|
|
241
|
+
};
|
|
242
|
+
get newParams(): ParentSelectorOption[];
|
|
243
|
+
state: {
|
|
244
|
+
preProps: ParamMoverProps;
|
|
245
|
+
options: any[];
|
|
246
|
+
paramsMap: Record<string, ParentSelectorOption>;
|
|
247
|
+
};
|
|
248
|
+
ref: React.RefObject<any>;
|
|
249
|
+
get formItems(): {
|
|
250
|
+
label: string;
|
|
251
|
+
name: string;
|
|
252
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
253
|
+
required?: boolean | undefined;
|
|
254
|
+
validator?(_: any, val: any): Promise<any>;
|
|
255
|
+
}[];
|
|
256
|
+
render(): JSX.Element;
|
|
275
257
|
}
|
|
276
|
-
declare class ParamMoverModalEl extends PureComponent<
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
onSubmit: () => any;
|
|
287
|
-
render(): JSX.Element;
|
|
258
|
+
declare class ParamMoverModalEl extends PureComponent<ParamMoverProps & Required<Pick<ParamMoverProps, 'onSubmit'>>> {
|
|
259
|
+
ref: React.RefObject<ParamMover>;
|
|
260
|
+
state: {
|
|
261
|
+
visible: boolean;
|
|
262
|
+
pending: boolean;
|
|
263
|
+
};
|
|
264
|
+
onShow: () => void;
|
|
265
|
+
onHide: () => void;
|
|
266
|
+
onSubmit: () => any;
|
|
267
|
+
render(): JSX.Element;
|
|
288
268
|
}
|
|
289
269
|
declare class ParamMoverModal {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
270
|
+
static el: ReactGlobalComp<ParamMoverProps & Required<Pick<ParamMoverProps, "onSubmit">>>;
|
|
271
|
+
static show(props: Omit<ComponentProps<typeof ParamMoverModalEl>, 'visible'>): Promise<void>;
|
|
272
|
+
static hide(): Promise<void>;
|
|
293
273
|
}
|
|
294
274
|
|
|
295
|
-
declare const ParamTypeConfig: Record<
|
|
296
|
-
ParamType,
|
|
297
|
-
{
|
|
275
|
+
declare const ParamTypeConfig: Record<ParamType, {
|
|
298
276
|
name: string;
|
|
299
277
|
key?: string;
|
|
300
278
|
defaultValue?: any;
|
|
301
279
|
Comp: React.ComponentType<BaseInputProps>;
|
|
302
280
|
validator?(value: any): string;
|
|
303
281
|
required?: boolean;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
declare function paramValidator(
|
|
307
|
-
val: any,
|
|
308
|
-
values: {
|
|
282
|
+
}>;
|
|
283
|
+
declare function paramValidator(val: any, values: {
|
|
309
284
|
valueType: ParamType;
|
|
310
|
-
|
|
311
|
-
): string;
|
|
285
|
+
}): string;
|
|
312
286
|
declare const ParamTypeOptions: {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
287
|
+
value: number;
|
|
288
|
+
label: string;
|
|
289
|
+
name: string;
|
|
290
|
+
key?: string | undefined;
|
|
291
|
+
defaultValue?: any;
|
|
292
|
+
Comp: React.ComponentType<BaseInputProps>;
|
|
293
|
+
validator?(value: any): string;
|
|
294
|
+
required?: boolean | undefined;
|
|
321
295
|
}[];
|
|
322
296
|
|
|
323
297
|
declare function formatNum(val: string): number | undefined;
|
|
324
298
|
declare function isNullLike(val: any): val is undefined | null;
|
|
325
|
-
declare function emptyValidator(val: any, enableEmpty?: boolean):
|
|
326
|
-
declare function numRangeValidator(
|
|
327
|
-
val: {
|
|
299
|
+
declare function emptyValidator(val: any, enableEmpty?: boolean): "Should not be empty" | "";
|
|
300
|
+
declare function numRangeValidator(val: {
|
|
328
301
|
min?: string;
|
|
329
302
|
max?: string;
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
): string;
|
|
333
|
-
declare function expiryValidator(
|
|
334
|
-
val: string,
|
|
335
|
-
enableEmpty?: boolean,
|
|
336
|
-
): 'Should not be empty' | '' | 'Out of format';
|
|
303
|
+
}, enableEmpty?: boolean): string;
|
|
304
|
+
declare function expiryValidator(val: string, enableEmpty?: boolean): "Should not be empty" | "" | "Out of format";
|
|
337
305
|
declare function expiriesValidator(val: string[]): string;
|
|
338
|
-
declare function keyValidator(
|
|
339
|
-
val: string,
|
|
340
|
-
allKeys: string[],
|
|
341
|
-
):
|
|
342
|
-
| 'Should not be empty'
|
|
343
|
-
| ''
|
|
344
|
-
| 'Out of format: should be a combination of the following chars `_.0-9a-zA-Z`'
|
|
345
|
-
| 'This key has been used';
|
|
306
|
+
declare function keyValidator(val: string, allKeys: string[]): "Should not be empty" | "" | "Out of format: should be a combination of the following chars `_.0-9a-zA-Z`" | "This key has been used";
|
|
346
307
|
declare function isExpired(val?: string): boolean;
|
|
347
|
-
declare function validatorCvt(
|
|
348
|
-
validator: (val: any, values: any) => ValidateInfo['string'],
|
|
349
|
-
form?: () => any,
|
|
350
|
-
): (_: any, val: any) => Promise<any>;
|
|
308
|
+
declare function validatorCvt(validator: (val: any, values: any) => ValidateInfo['string'], form?: () => any): (_: any, val: any) => Promise<any>;
|
|
351
309
|
|
|
352
|
-
export {
|
|
353
|
-
BaseInputProps,
|
|
354
|
-
ParamForm,
|
|
355
|
-
ParamFormData,
|
|
356
|
-
ParamFormModal,
|
|
357
|
-
ParamFormProps,
|
|
358
|
-
ParamGroupEditor,
|
|
359
|
-
ParamGroupEditorData,
|
|
360
|
-
ParamGroupEditorModal,
|
|
361
|
-
ParamGroupEditorModalEl,
|
|
362
|
-
ParamGroupEditorProps,
|
|
363
|
-
ParamMover,
|
|
364
|
-
ParamMoverData,
|
|
365
|
-
ParamMoverModal,
|
|
366
|
-
ParamMoverModalEl,
|
|
367
|
-
ParamMoverProps,
|
|
368
|
-
ParamMoverState,
|
|
369
|
-
ParamRenderer,
|
|
370
|
-
ParamRendererProps,
|
|
371
|
-
ParamType,
|
|
372
|
-
ParamTypeConfig,
|
|
373
|
-
ParamTypeOptions,
|
|
374
|
-
ParamValueEditor,
|
|
375
|
-
ParamValueEditorData,
|
|
376
|
-
ParamValueEditorModal,
|
|
377
|
-
ParamValueEditorModalEl,
|
|
378
|
-
ParamValueEditorProps,
|
|
379
|
-
ParamValueStruct,
|
|
380
|
-
ValidateInfo,
|
|
381
|
-
emptyValidator,
|
|
382
|
-
expiriesValidator,
|
|
383
|
-
expiryValidator,
|
|
384
|
-
formatNum,
|
|
385
|
-
isExpired,
|
|
386
|
-
isNullLike,
|
|
387
|
-
keyValidator,
|
|
388
|
-
numRangeValidator,
|
|
389
|
-
paramValidator,
|
|
390
|
-
validatorCvt,
|
|
391
|
-
};
|
|
310
|
+
export { BaseInputProps, ParamForm, ParamFormData, ParamFormModal, ParamFormProps, ParamGroupEditor, ParamGroupEditorData, ParamGroupEditorModal, ParamGroupEditorModalEl, ParamGroupEditorProps, ParamMover, ParamMoverData, ParamMoverModal, ParamMoverModalEl, ParamMoverProps, ParamMoverState, ParamRenderer, ParamRendererProps, ParamType, ParamTypeConfig, ParamTypeOptions, ParamValueEditor, ParamValueEditorData, ParamValueEditorModal, ParamValueEditorModalEl, ParamValueEditorProps, ParamValueStruct, ValidateInfo, emptyValidator, expiriesValidator, expiryValidator, formatNum, isExpired, isNullLike, keyValidator, numRangeValidator, paramValidator, validatorCvt };
|
package/lib/es/index.js
CHANGED