dothtml-interfaces 0.3.10 → 0.3.12
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/package.json +1 -1
- package/src/i-component.d.ts +18 -12
package/package.json
CHANGED
package/src/i-component.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface FrameworkItems {
|
|
|
18
18
|
readonly shadowRoot: ShadowRoot;
|
|
19
19
|
readonly isRendered: boolean;
|
|
20
20
|
readonly tagName: string;
|
|
21
|
+
readonly styles: Array<string>;
|
|
21
22
|
readonly args: Array<any>;
|
|
22
23
|
// readonly styleElement: HTMLStyleElement;
|
|
23
24
|
readonly sharedStyles: CSSStyleSheet[];
|
|
@@ -42,24 +43,34 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
|
|
|
42
43
|
// Lifecycle hooks
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* A function returning DOThtml (required).
|
|
46
|
+
* A function returning DOThtml (required). The `build` hook is called once per component instance, and constructs the component's virtual DOM.
|
|
46
47
|
*/
|
|
47
48
|
build(): IDotDocument;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
* An optional function
|
|
51
|
+
* An optional function called after the component is built. Is only called once per component instance.
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
|
+
built?(): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* An optional function that gets called before the component is mounted.
|
|
57
|
+
*/
|
|
58
|
+
mounting?(): void;
|
|
53
59
|
|
|
54
60
|
/**
|
|
55
|
-
* An optional function
|
|
61
|
+
* An optional function called after the element has been mounted. May be called mulitple times if the component is rerendered.
|
|
62
|
+
*/
|
|
63
|
+
mounted?(): void;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* An optional function that gets called before the component is unmounted. Use it to do custom cleanup or data saving.
|
|
56
67
|
*/
|
|
57
|
-
|
|
68
|
+
unmounting?(): void;
|
|
58
69
|
|
|
59
70
|
/**
|
|
60
|
-
* An optional function called after the element has been
|
|
71
|
+
* An optional function called after the element has been unmounted. May be called mulitple times if the component is rerendered.
|
|
61
72
|
*/
|
|
62
|
-
|
|
73
|
+
unmounted?(): void;
|
|
63
74
|
|
|
64
75
|
/**
|
|
65
76
|
* An optional function called before the component is deleted.
|
|
@@ -70,9 +81,4 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
|
|
|
70
81
|
* An optional function called after the component is deleted.
|
|
71
82
|
*/
|
|
72
83
|
deleted?(): void;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* An optional function called after the component is built.
|
|
76
|
-
*/
|
|
77
|
-
built?(): void;
|
|
78
84
|
}
|