amis-editor 4.0.1-beta.16 → 4.0.1-beta.18

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,540 @@
1
+ import React from 'react';
2
+ import { SchemaApi } from 'amis';
3
+ import type { FormControlProps } from 'amis/lib/renderers/Form/Item';
4
+ export interface APIControlProps extends FormControlProps {
5
+ name?: string;
6
+ label?: string;
7
+ value?: any;
8
+ /**
9
+ * 接口消息设置描述信息
10
+ */
11
+ messageDesc?: string;
12
+ }
13
+ export interface APIControlState {
14
+ apiStr: string;
15
+ }
16
+ export declare class APIControl extends React.Component<APIControlProps, APIControlState> {
17
+ constructor(props: APIControlProps);
18
+ componentDidUpdate(prevProps: APIControlProps): void;
19
+ transformApi2Str(value: any): string;
20
+ handleSubmit(values: SchemaApi, action: any): void;
21
+ buildActionsSchema(): {
22
+ type: string;
23
+ justify: string;
24
+ alignItems: string;
25
+ className: string;
26
+ items: ({
27
+ label: string;
28
+ type: string;
29
+ acitonType: string;
30
+ level: string;
31
+ size: string;
32
+ disabled: boolean;
33
+ actionType?: undefined;
34
+ dialog?: undefined;
35
+ } | {
36
+ label: string;
37
+ type: string;
38
+ acitonType: string;
39
+ level: string;
40
+ size: string;
41
+ actionType: string;
42
+ dialog: {
43
+ title: string;
44
+ size: string;
45
+ className: string;
46
+ headerClassName: string;
47
+ bodyClassName: string;
48
+ closeOnEsc: boolean;
49
+ closeOnOutside: boolean;
50
+ showCloseButton: boolean;
51
+ body: {
52
+ type: string;
53
+ mode: string;
54
+ onSubmit: (values: SchemaApi, action: any) => void;
55
+ body: {
56
+ type: string;
57
+ tabs: ({
58
+ title: string;
59
+ tab: {
60
+ type: string;
61
+ gap: string;
62
+ align: string;
63
+ valign: string;
64
+ columns: ({
65
+ md: number;
66
+ body: ({
67
+ label: string;
68
+ name: string;
69
+ value: string;
70
+ type: string;
71
+ mode: string;
72
+ options: {
73
+ value: string;
74
+ label: string;
75
+ }[];
76
+ placeholder?: undefined;
77
+ required?: undefined;
78
+ description?: undefined;
79
+ size?: undefined;
80
+ disabled?: undefined;
81
+ } | {
82
+ label: string;
83
+ type: string;
84
+ name: string;
85
+ placeholder: string;
86
+ required: boolean;
87
+ value?: undefined;
88
+ mode?: undefined;
89
+ options?: undefined;
90
+ description?: undefined;
91
+ size?: undefined;
92
+ disabled?: undefined;
93
+ } | {
94
+ label: string;
95
+ type: string;
96
+ name: string;
97
+ placeholder: string;
98
+ description: string;
99
+ value?: undefined;
100
+ mode?: undefined;
101
+ options?: undefined;
102
+ required?: undefined;
103
+ size?: undefined;
104
+ disabled?: undefined;
105
+ } | {
106
+ label: string;
107
+ type: string;
108
+ name: string;
109
+ description: string;
110
+ size: string;
111
+ mode: string;
112
+ options: {
113
+ label: string;
114
+ value: string;
115
+ }[];
116
+ disabled: boolean;
117
+ value?: undefined;
118
+ placeholder?: undefined;
119
+ required?: undefined;
120
+ })[];
121
+ } | {
122
+ md: number;
123
+ body: ({
124
+ label: string;
125
+ type: string;
126
+ name: string;
127
+ mode: string;
128
+ inputClassName: string;
129
+ pipeIn: (value: any) => boolean;
130
+ pipeOut: (value: any) => 3000 | undefined;
131
+ min?: undefined;
132
+ step?: undefined;
133
+ visibleOn?: undefined;
134
+ description?: undefined;
135
+ className?: undefined;
136
+ direction?: undefined;
137
+ labelRemark?: undefined;
138
+ body?: undefined;
139
+ placeholder?: undefined;
140
+ } | {
141
+ label: string;
142
+ type: string;
143
+ name: string;
144
+ mode: string;
145
+ min: number;
146
+ step: number;
147
+ visibleOn: string;
148
+ description: string;
149
+ className: string;
150
+ pipeIn: (value: any) => number;
151
+ inputClassName?: undefined;
152
+ pipeOut?: undefined;
153
+ direction?: undefined;
154
+ labelRemark?: undefined;
155
+ body?: undefined;
156
+ placeholder?: undefined;
157
+ } | {
158
+ label: string;
159
+ type: string;
160
+ name: string;
161
+ mode: string;
162
+ description: string;
163
+ inputClassName: string;
164
+ pipeIn: (value: any) => boolean;
165
+ pipeOut: (value: any) => "blob" | undefined;
166
+ min?: undefined;
167
+ step?: undefined;
168
+ visibleOn?: undefined;
169
+ className?: undefined;
170
+ direction?: undefined;
171
+ labelRemark?: undefined;
172
+ body?: undefined;
173
+ placeholder?: undefined;
174
+ } | {
175
+ type: string;
176
+ label: string;
177
+ name: string;
178
+ mode: string;
179
+ description: string;
180
+ inputClassName: string;
181
+ pipeIn?: undefined;
182
+ pipeOut?: undefined;
183
+ min?: undefined;
184
+ step?: undefined;
185
+ visibleOn?: undefined;
186
+ className?: undefined;
187
+ direction?: undefined;
188
+ labelRemark?: undefined;
189
+ body?: undefined;
190
+ placeholder?: undefined;
191
+ } | {
192
+ label: string;
193
+ type: string;
194
+ visibleOn: string;
195
+ direction: string;
196
+ labelRemark: {
197
+ trigger: string;
198
+ rootClose: boolean;
199
+ content: string;
200
+ placement: string;
201
+ };
202
+ body: ({
203
+ name: string;
204
+ type: string;
205
+ inline: boolean;
206
+ onChange: () => void;
207
+ options: ({
208
+ label: string;
209
+ value: boolean;
210
+ } | {
211
+ label: string;
212
+ value: string;
213
+ })[];
214
+ autoComplete?: undefined;
215
+ visibleOn?: undefined;
216
+ placeholder?: undefined;
217
+ className?: undefined;
218
+ } | {
219
+ name: string;
220
+ autoComplete: boolean;
221
+ visibleOn: string;
222
+ type: string;
223
+ placeholder: string;
224
+ className: string;
225
+ inline?: undefined;
226
+ onChange?: undefined;
227
+ options?: undefined;
228
+ })[];
229
+ name?: undefined;
230
+ mode?: undefined;
231
+ inputClassName?: undefined;
232
+ pipeIn?: undefined;
233
+ pipeOut?: undefined;
234
+ min?: undefined;
235
+ step?: undefined;
236
+ description?: undefined;
237
+ className?: undefined;
238
+ placeholder?: undefined;
239
+ } | {
240
+ label: string;
241
+ type: string;
242
+ name: string;
243
+ mode: string;
244
+ visibleOn: string;
245
+ inputClassName: string;
246
+ pipeIn: (value: any) => boolean;
247
+ pipeOut: (value: any) => 3000 | undefined;
248
+ min?: undefined;
249
+ step?: undefined;
250
+ description?: undefined;
251
+ className?: undefined;
252
+ direction?: undefined;
253
+ labelRemark?: undefined;
254
+ body?: undefined;
255
+ placeholder?: undefined;
256
+ } | {
257
+ label: string;
258
+ name: string;
259
+ type: string;
260
+ mode: string;
261
+ visibleOn: string;
262
+ step: number;
263
+ className: string;
264
+ description: string;
265
+ inputClassName?: undefined;
266
+ pipeIn?: undefined;
267
+ pipeOut?: undefined;
268
+ min?: undefined;
269
+ direction?: undefined;
270
+ labelRemark?: undefined;
271
+ body?: undefined;
272
+ placeholder?: undefined;
273
+ } | {
274
+ label: string;
275
+ name: string;
276
+ type: string;
277
+ mode: string;
278
+ visibleOn: string;
279
+ description: string;
280
+ inputClassName: string;
281
+ pipeIn?: undefined;
282
+ pipeOut?: undefined;
283
+ min?: undefined;
284
+ step?: undefined;
285
+ className?: undefined;
286
+ direction?: undefined;
287
+ labelRemark?: undefined;
288
+ body?: undefined;
289
+ placeholder?: undefined;
290
+ } | {
291
+ label: string;
292
+ name: string;
293
+ type: string;
294
+ mode: string;
295
+ visibleOn: string;
296
+ placeholder: string;
297
+ labelRemark: {
298
+ trigger: string;
299
+ rootClose: boolean;
300
+ content: string;
301
+ placement: string;
302
+ };
303
+ inputClassName?: undefined;
304
+ pipeIn?: undefined;
305
+ pipeOut?: undefined;
306
+ min?: undefined;
307
+ step?: undefined;
308
+ description?: undefined;
309
+ className?: undefined;
310
+ direction?: undefined;
311
+ body?: undefined;
312
+ })[];
313
+ })[];
314
+ }[];
315
+ } | {
316
+ title: string;
317
+ tab: ({
318
+ type: string;
319
+ title: string;
320
+ body: {
321
+ type: string;
322
+ gap: string;
323
+ align: string;
324
+ valign: string;
325
+ columns: ({
326
+ md: number;
327
+ body: ({
328
+ type: string;
329
+ label: string;
330
+ name: string;
331
+ mode: string;
332
+ className: string;
333
+ inputClassName: string;
334
+ labelRemark: {
335
+ trigger: string;
336
+ rootClose: boolean;
337
+ content: string;
338
+ placement: string;
339
+ };
340
+ pipeIn: (value: any) => boolean;
341
+ pipeOut: (value: any) => {
342
+ '&': string;
343
+ } | null;
344
+ syncDefaultValue?: undefined;
345
+ visibleOn?: undefined;
346
+ descriptionClassName?: undefined;
347
+ description?: undefined;
348
+ multiple?: undefined;
349
+ items?: undefined;
350
+ } | {
351
+ type: string;
352
+ syncDefaultValue: boolean;
353
+ name: string;
354
+ visibleOn: string;
355
+ descriptionClassName: string;
356
+ description: string;
357
+ multiple: boolean;
358
+ pipeIn: (value: any) => any;
359
+ pipeOut: (value: any) => any;
360
+ items: ({
361
+ placeholder: string;
362
+ type: string;
363
+ unique: boolean;
364
+ name: string;
365
+ required: boolean;
366
+ columnClassName: string;
367
+ } | {
368
+ placeholder: string;
369
+ type: string;
370
+ name: string;
371
+ unique?: undefined;
372
+ required?: undefined;
373
+ columnClassName?: undefined;
374
+ })[];
375
+ label?: undefined;
376
+ mode?: undefined;
377
+ className?: undefined;
378
+ inputClassName?: undefined;
379
+ labelRemark?: undefined;
380
+ })[];
381
+ } | {
382
+ md: number;
383
+ body: ({
384
+ type: string;
385
+ label: string;
386
+ name: string;
387
+ mode: string;
388
+ className: string;
389
+ inputClassName: string;
390
+ labelRemark: {
391
+ trigger: string;
392
+ rootClose: boolean;
393
+ content: string;
394
+ placement: string;
395
+ };
396
+ pipeIn: (value: any) => boolean;
397
+ pipeOut: (value: any) => {
398
+ '&': string;
399
+ } | null;
400
+ syncDefaultValue?: undefined;
401
+ visibleOn?: undefined;
402
+ descriptionClassName?: undefined;
403
+ multiple?: undefined;
404
+ items?: undefined;
405
+ } | {
406
+ type: string;
407
+ syncDefaultValue: boolean;
408
+ name: string;
409
+ visibleOn: string;
410
+ descriptionClassName: string;
411
+ multiple: boolean;
412
+ pipeIn: (value: any) => any;
413
+ pipeOut: (value: any) => any;
414
+ items: ({
415
+ placeholder: string;
416
+ type: string;
417
+ unique: boolean;
418
+ name: string;
419
+ required: boolean;
420
+ columnClassName: string;
421
+ } | {
422
+ placeholder: string;
423
+ type: string;
424
+ name: string;
425
+ unique?: undefined;
426
+ required?: undefined;
427
+ columnClassName?: undefined;
428
+ })[];
429
+ label?: undefined;
430
+ mode?: undefined;
431
+ className?: undefined;
432
+ inputClassName?: undefined;
433
+ labelRemark?: undefined;
434
+ })[];
435
+ })[];
436
+ }[];
437
+ collapsable?: undefined;
438
+ collapsed?: undefined;
439
+ } | {
440
+ type: string;
441
+ title: string;
442
+ body: ({
443
+ type: string;
444
+ label: string;
445
+ name: string;
446
+ mode: string;
447
+ className: string;
448
+ inputClassName: string;
449
+ labelRemark: {
450
+ trigger: string;
451
+ rootClose: boolean;
452
+ content: string;
453
+ placement: string;
454
+ };
455
+ pipeIn: (value: any) => boolean;
456
+ pipeOut: (value: any) => {} | null;
457
+ syncDefaultValue?: undefined;
458
+ multiple?: undefined;
459
+ visibleOn?: undefined;
460
+ items?: undefined;
461
+ } | {
462
+ type: string;
463
+ name: string;
464
+ mode: string;
465
+ syncDefaultValue: boolean;
466
+ multiple: boolean;
467
+ visibleOn: string;
468
+ items: ({
469
+ type: string;
470
+ name: string;
471
+ placeholder: string;
472
+ unique: boolean;
473
+ required: boolean;
474
+ options: {
475
+ label: string;
476
+ value: string;
477
+ }[];
478
+ disabled?: undefined;
479
+ } | {
480
+ type: string;
481
+ name: string;
482
+ placeholder: string;
483
+ disabled: boolean;
484
+ unique?: undefined;
485
+ required?: undefined;
486
+ options?: undefined;
487
+ })[];
488
+ pipeIn: (value: any) => any;
489
+ pipeOut: (value: any) => any;
490
+ label?: undefined;
491
+ className?: undefined;
492
+ inputClassName?: undefined;
493
+ labelRemark?: undefined;
494
+ })[];
495
+ collapsable?: undefined;
496
+ collapsed?: undefined;
497
+ } | {
498
+ title: string;
499
+ type: string;
500
+ collapsable: boolean;
501
+ collapsed: boolean;
502
+ body: {
503
+ type: string;
504
+ columns: {
505
+ body: {
506
+ label: string;
507
+ name: string;
508
+ type: string;
509
+ allowFullscreen: boolean;
510
+ description: string;
511
+ }[];
512
+ md: number;
513
+ }[];
514
+ }[];
515
+ })[];
516
+ } | {
517
+ title: string;
518
+ tab: {
519
+ label: string;
520
+ type: string;
521
+ name: string;
522
+ multiLine: boolean;
523
+ description: string;
524
+ items: {
525
+ label: string;
526
+ type: string;
527
+ name: string;
528
+ }[];
529
+ }[];
530
+ })[];
531
+ }[];
532
+ }[];
533
+ };
534
+ disabled?: undefined;
535
+ })[];
536
+ };
537
+ render(): JSX.Element;
538
+ }
539
+ export declare class APIControlRenderer extends APIControl {
540
+ }