1 |
|
2 |
|
3 |
|
4 | export const registry: CustomElementRegistry;
|
5 | export function define(name: string, constr: any, opts?: ElementDefinitionOptions | undefined): void;
|
6 | export function whenDefined(name: string): Promise<CustomElementConstructor>;
|
7 |
|
8 |
|
9 |
|
10 | export class Lib0Component<S> extends HTMLElement {
|
11 | |
12 |
|
13 |
|
14 | constructor(state?: S | undefined);
|
15 | /**
|
16 | * @type {S|null}
|
17 | */
|
18 | state: S | null;
|
19 | |
20 |
|
21 |
|
22 | _internal: any;
|
23 | |
24 |
|
25 |
|
26 |
|
27 | setState(_state: S, _forceStateUpdate?: boolean | undefined): void;
|
28 | |
29 |
|
30 |
|
31 | updateState(_stateUpdate: any): void;
|
32 | }
|
33 | export function createComponent<T>(name: string, { template, style, state: defaultState, onStateChange, childStates, attrs, listeners, slots }: CONF<T>): typeof Lib0Component;
|
34 | export function createComponentDefiner(definer: Function): () => any;
|
35 | export function defineListComponent(): any;
|
36 | export function defineLazyLoadingComponent(): any;
|
37 | export type CONF<S> = {
|
38 | |
39 |
|
40 |
|
41 | template?: string | null | undefined;
|
42 | |
43 |
|
44 |
|
45 |
|
46 | style?: string | undefined;
|
47 | |
48 |
|
49 |
|
50 | state?: S | undefined;
|
51 | |
52 |
|
53 |
|
54 |
|
55 | onStateChange?: ((arg0: S, arg1: S | null, arg2: Lib0Component<S>) => void) | undefined;
|
56 | /**
|
57 | * maps from
|
58 | * CSS-selector to transformer function. The first element that matches the
|
59 | * CSS-selector receives state updates via the transformer function.
|
60 | */
|
61 | childStates?: {
|
62 | [x: string]: (arg0: any, arg1: any) => Object;
|
63 | } | undefined;
|
64 | |
65 |
|
66 |
|
67 |
|
68 | attrs?: {
|
69 | [x: string]: "string" | "number" | "json" | "bool";
|
70 | } | undefined;
|
71 | |
72 |
|
73 |
|
74 |
|
75 | listeners?: {
|
76 | [x: string]: (arg0: CustomEvent, arg1: Lib0Component<any>) => boolean | void;
|
77 | } | undefined;
|
78 | |
79 |
|
80 |
|
81 |
|
82 | slots?: ((arg0: S, arg1: S, arg2: Lib0Component<S>) => {
|
83 | [x: string]: string;
|
84 | }) | undefined;
|
85 | };
|
86 | //# sourceMappingURL=component.d.ts.map |
\ | No newline at end of file |