dothtml-interfaces 0.3.11 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dothtml-interfaces",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -48,14 +48,29 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
48
48
  build(): IDotDocument;
49
49
 
50
50
  /**
51
- * An optional function that gets called before the component is created, scoped to the new component object.
51
+ * An optional function called after the component is built. Is only called once per component instance.
52
+ */
53
+ built?(): void;
54
+
55
+ /**
56
+ * An optional function that gets called before the component is mounted.
52
57
  */
53
- creating?(): void;
58
+ mounting?(): void;
54
59
 
55
60
  /**
56
61
  * An optional function called after the element has been mounted. May be called mulitple times if the component is rerendered.
57
62
  */
58
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.
67
+ */
68
+ unmounting?(): void;
69
+
70
+ /**
71
+ * An optional function called after the element has been unmounted. May be called mulitple times if the component is rerendered.
72
+ */
73
+ unmounted?(): void;
59
74
 
60
75
  /**
61
76
  * An optional function called before the component is deleted.
@@ -66,9 +81,4 @@ export default interface IComponent/*<TProps extends Array<string> = [], TEvents
66
81
  * An optional function called after the component is deleted.
67
82
  */
68
83
  deleted?(): void;
69
-
70
- /**
71
- * An optional function called after the component is built. Is only called once per component instance.
72
- */
73
- built?(): void;
74
84
  }