blue-react 7.10.0 → 7.10.1
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/Grid.js +30 -10
- package/dist/style.css +2 -2
- package/dist/style.min.css +2 -2
- package/dist/style.scss +1 -1
- package/dist/types/components/Grid.d.ts +15 -8
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -70,17 +70,23 @@ export interface GridState {
|
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
72
|
* The main component. As soon this component is mounted, it is globally available under `window.blueGridRef`.
|
|
73
|
-
*
|
|
74
|
-
* and remove it with `blueGridRef.removeEventListener(eventName, listener)`.
|
|
73
|
+
* You can also append your own event listeners.
|
|
75
74
|
*
|
|
76
|
-
* Allowed
|
|
75
|
+
* Allowed events:
|
|
77
76
|
*
|
|
78
77
|
* * **componentDidUpdate** - Component was updated.
|
|
79
|
-
* Example: `blueGridRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
|
|
78
|
+
* Example: `window.blueGridRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
|
|
80
79
|
* * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
|
|
81
|
-
* Example: `blueGridRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
|
|
80
|
+
* Example: `window.blueGridRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
|
|
82
81
|
* * **pageDidHide** - This page disappeared and another page appears instead.
|
|
83
|
-
* Example: `blueGridRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
|
|
82
|
+
* Example: `window.blueGridRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
|
|
83
|
+
*
|
|
84
|
+
* Method to add event listeners:
|
|
85
|
+
* * `window.blueGridRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
|
|
86
|
+
*
|
|
87
|
+
* Methods to remove event listeners:
|
|
88
|
+
* * `window.blueGridRef.`**removeEventListener**`(eventName: string, listenerId: string)`
|
|
89
|
+
* * `window.blueGridRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
|
|
84
90
|
*/
|
|
85
91
|
export default class Grid extends Component<GridProps, GridState> {
|
|
86
92
|
defaultMatch: string[];
|
|
@@ -106,7 +112,8 @@ export default class Grid extends Component<GridProps, GridState> {
|
|
|
106
112
|
toggleSidebar(event: any): void;
|
|
107
113
|
hideSidebar(e: any): void;
|
|
108
114
|
initMatch(): void;
|
|
109
|
-
addEventListener(param1: any, param2: any, param3: any): void;
|
|
110
|
-
removeEventListener(type: string,
|
|
115
|
+
addEventListener(param1: any, param2: any, param3: any, listenerId?: string): void;
|
|
116
|
+
removeEventListener(type: string, listenerId: string): void;
|
|
117
|
+
removeDuplicatedEventListeners(): void;
|
|
111
118
|
render(): JSX.Element;
|
|
112
119
|
}
|