@tecsinapse/react-native-kit 3.4.1 → 3.4.2
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/cjs/components/atoms/Modal/ModalGroupManager.js +1 -0
- package/dist/cjs/components/atoms/Modal/ModalLifecycleHandler.js +5 -0
- package/dist/esm/components/atoms/Modal/ModalGroupManager.js +1 -0
- package/dist/esm/components/atoms/Modal/ModalLifecycleHandler.js +5 -0
- package/dist/types/components/atoms/Modal/ModalLifecycleHandler.d.ts +1 -0
- package/package.json +2 -2
|
@@ -121,6 +121,11 @@ class ModalLifecycleHandler {
|
|
|
121
121
|
savedNode && this.nodeGroup.set(id, { ...savedNode, visible: false });
|
|
122
122
|
this.update();
|
|
123
123
|
};
|
|
124
|
+
closeLastOpenedModal = () => {
|
|
125
|
+
const [modals] = this.state || [];
|
|
126
|
+
const lastModal = modals?.pop();
|
|
127
|
+
lastModal?.props?.close?.();
|
|
128
|
+
};
|
|
124
129
|
}
|
|
125
130
|
const createModalLifecycleHandler = () => {
|
|
126
131
|
return new ModalLifecycleHandler();
|
|
@@ -119,6 +119,11 @@ class ModalLifecycleHandler {
|
|
|
119
119
|
savedNode && this.nodeGroup.set(id, { ...savedNode, visible: false });
|
|
120
120
|
this.update();
|
|
121
121
|
};
|
|
122
|
+
closeLastOpenedModal = () => {
|
|
123
|
+
const [modals] = this.state || [];
|
|
124
|
+
const lastModal = modals?.pop();
|
|
125
|
+
lastModal?.props?.close?.();
|
|
126
|
+
};
|
|
122
127
|
}
|
|
123
128
|
const createModalLifecycleHandler = () => {
|
|
124
129
|
return new ModalLifecycleHandler();
|
|
@@ -19,6 +19,7 @@ export declare class ModalLifecycleHandler {
|
|
|
19
19
|
private findNode;
|
|
20
20
|
show: (id: string) => void;
|
|
21
21
|
close: (id: string) => void;
|
|
22
|
+
closeLastOpenedModal: () => void;
|
|
22
23
|
}
|
|
23
24
|
export declare const createModalLifecycleHandler: () => ModalLifecycleHandler;
|
|
24
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-native-kit",
|
|
3
3
|
"description": "TecSinapse React Native components",
|
|
4
|
-
"version": "3.4.
|
|
4
|
+
"version": "3.4.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"react-native-safe-area-context": "^4.0.0",
|
|
40
40
|
"react-native-vector-icons": "^9.2.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "73cc1951c6a97b8538232602506ccfdb2623c90b"
|
|
43
43
|
}
|