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/components/Layout.js +30 -9
- package/dist/style.css +2 -2
- package/dist/style.min.css +2 -2
- package/dist/style.scss +1 -1
- package/dist/types/components/Layout.d.ts +15 -7
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -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
|
-
*
|
|
73
|
+
* You can also append your own event listeners.
|
|
74
74
|
*
|
|
75
|
-
* Allowed
|
|
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,
|
|
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
|
}
|