blue-react 8.0.0-next.4 → 8.0.0-next.5

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/dist/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue React v8.0.0-next.4 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v8.0.0-next.5 (https://bruegmann.github.io/blue-react)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -70,16 +70,23 @@ export interface LayoutState {
70
70
  }
71
71
  /**
72
72
  * The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
73
- * Also you can append your own event listeners with `blueLayoutRef.addEventListener(eventName, (prevProps, prevState) => { })`.
73
+ * You can also append your own event listeners.
74
74
  *
75
- * Allowed event listeners:
75
+ * Allowed events:
76
76
  *
77
77
  * * **componentDidUpdate** - Component was updated.
78
- * Example: `blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
78
+ * Example: `window.blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
79
79
  * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
80
- * Example: `blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
80
+ * Example: `window.blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
81
81
  * * **pageDidHide** - This page disappeared and another page appears instead.
82
- * Example: `blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
82
+ * Example: `window.blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
83
+ *
84
+ * Method to add event listeners:
85
+ * * `window.blueLayoutRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
86
+ *
87
+ * Methods to remove event listeners:
88
+ * * `window.blueLayoutRef.`**removeEventListener**`(eventName: string, listenerId: string)`
89
+ * * `window.blueLayoutRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
83
90
  */
84
91
  export default class Layout extends Component<LayoutProps, LayoutState> {
85
92
  defaultMatch: string[];
@@ -105,7 +112,8 @@ export default class Layout extends Component<LayoutProps, LayoutState> {
105
112
  toggleSidebar(event: any): void;
106
113
  hideSidebar(e: any): void;
107
114
  initMatch(): void;
108
- addEventListener(param1: any, param2: any, param3: any): void;
109
- removeEventListener(type: string, listener: any): void;
115
+ addEventListener(param1: any, param2: any, param3: any, listenerId?: string): void;
116
+ removeEventListener(type: string, listenerId: string): void;
117
+ removeDuplicatedEventListeners(): void;
110
118
  render(): JSX.Element;
111
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "8.0.0-next.4",
3
+ "version": "8.0.0-next.5",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "main": "index.js",