1 | import { RefObject, Emitter } from '@mantou/gem/lib/decorators';
|
2 | import { GemElement, TemplateResult } from '@mantou/gem/lib/element';
|
3 | import type { DataList } from './input';
|
4 | import type { Option } from './picker';
|
5 | import type { Option as SelectOption } from './select';
|
6 | import type { Adder } from './options';
|
7 | import './input';
|
8 | import './picker';
|
9 | import './button';
|
10 | import './checkbox';
|
11 | import './radio';
|
12 | import './select';
|
13 | import './help-text';
|
14 | import './date-picker';
|
15 | import './date-range-picker';
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class DuoyunFormElement<Data = Record<string, any>> extends GemElement {
|
21 | inline: boolean;
|
22 | change: Emitter<Data>;
|
23 | get items(): DuoyunFormItemElement[];
|
24 | get elements(): Record<string, DuoyunFormItemElement | undefined>;
|
25 | get data(): Data;
|
26 | constructor();
|
27 | valid(): Promise<boolean>;
|
28 | clearInvalidMessage(): void;
|
29 | }
|
30 | /**
|
31 | * @customElement dy-form-item-inline-group
|
32 | */
|
33 | export declare class DuoyunFormItemInlineGroupElement extends GemElement {
|
34 | constructor();
|
35 | }
|
36 | declare type FormItemState = {
|
37 | invalidMessage?: string;
|
38 | };
|
39 | declare type FormItemRule = {
|
40 | message?: string;
|
41 | pattern?: string | RegExp;
|
42 | required?: boolean;
|
43 | validator?: (value: any) => void | Promise<void>;
|
44 | };
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | export declare class DuoyunFormItemElement extends GemElement<FormItemState> {
|
60 | #private;
|
61 | static label: string;
|
62 | static tip: string;
|
63 | static input: string;
|
64 | static add: string;
|
65 | type: 'text' | 'password' | 'date' | 'date-range' | 'number' | 'checkbox' | 'checkbox-group' | 'picker' | 'radio-group' | 'select' | 'textarea' | 'slot';
|
66 | multiple: boolean;
|
67 | name: string;
|
68 | label: string;
|
69 | placeholder: string;
|
70 | required: boolean;
|
71 | checked: boolean;
|
72 | autofocus: boolean;
|
73 | disabled: boolean;
|
74 | searchable: boolean;
|
75 | clearable: boolean;
|
76 | time: boolean;
|
77 | invalid: boolean;
|
78 | value?: number | string | any[] | any;
|
79 | renderLabel?: (e: SelectOption) => string | TemplateResult;
|
80 | rules?: FormItemRule[];
|
81 | dataList?: DataList | Option[] | SelectOption[];
|
82 | adder?: Adder;
|
83 | itemchange: Emitter<{
|
84 | name: string;
|
85 | value: number | string | any[] | any;
|
86 | }>;
|
87 | slotRef: RefObject<HTMLSlotElement>;
|
88 | state: FormItemState;
|
89 | get data(): any;
|
90 | constructor();
|
91 | mounted: () => void;
|
92 | render: () => TemplateResult;
|
93 | focus(): void;
|
94 | clearInvalidMessage(): void;
|
95 | valid(): Promise<boolean>;
|
96 | }
|
97 | export {};
|
98 |
|
\ | No newline at end of file |