@icanbwell/native-components 3.16.0 → 3.16.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/index.js +9 -1
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -2016,6 +2016,13 @@ const ComponentView = ({
|
|
|
2016
2016
|
setSecondaryWebviewUri(undefined); // removes the web view overlay
|
|
2017
2017
|
(_a = webviewRef.current) === null || _a === void 0 ? void 0 : _a.injectJavaScript(`window.dispatchEvent(new CustomEvent('closewebview', { detail: ${JSON.stringify(data)} }))`);
|
|
2018
2018
|
}, []);
|
|
2019
|
+
const handleWebviewTermination = useCallback(() => {
|
|
2020
|
+
var _a;
|
|
2021
|
+
if (secondaryWebviewUri) {
|
|
2022
|
+
handleCloseWebview();
|
|
2023
|
+
}
|
|
2024
|
+
(_a = webviewRef.current) === null || _a === void 0 ? void 0 : _a.reload();
|
|
2025
|
+
}, [secondaryWebviewUri, handleCloseWebview]);
|
|
2019
2026
|
const mutateLoaderAttribute = (mutation, attribute) => {
|
|
2020
2027
|
var _a;
|
|
2021
2028
|
return (_a = webviewRef.current) === null || _a === void 0 ? void 0 : _a.injectJavaScript(`
|
|
@@ -2148,7 +2155,8 @@ const ComponentView = ({
|
|
|
2148
2155
|
ref: webviewRef,
|
|
2149
2156
|
onMessage: invoke.listener,
|
|
2150
2157
|
injectedJavaScriptBeforeContentLoaded: injectedJs,
|
|
2151
|
-
onLoadEnd: handleWebviewLoaded
|
|
2158
|
+
onLoadEnd: handleWebviewLoaded,
|
|
2159
|
+
onContentProcessDidTerminate: handleWebviewTermination
|
|
2152
2160
|
}, reloadKey), secondaryWebviewUri && /*#__PURE__*/jsxs(View, {
|
|
2153
2161
|
style: styles.overlay,
|
|
2154
2162
|
children: [/*#__PURE__*/jsx(Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icanbwell/native-components",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.2",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"tsconfig": "./tsconfig.lib.json"
|
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
12
12
|
"react-native-webview": "11.x"
|
|
13
13
|
},
|
|
14
|
-
"repoVersion": "12.8.
|
|
15
|
-
"description": "@icanbwell/native-components. repo version: 12.8.
|
|
14
|
+
"repoVersion": "12.8.2",
|
|
15
|
+
"description": "@icanbwell/native-components. repo version: 12.8.2",
|
|
16
16
|
"module": "./index.js",
|
|
17
17
|
"main": "./index.js",
|
|
18
18
|
"type": "module",
|
|
19
19
|
"types": "./src/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@icanbwell/native-plugins": "4.16.
|
|
21
|
+
"@icanbwell/native-plugins": "4.16.1",
|
|
22
22
|
"@icanbwell/react-native-webview-invoke": "0.6.2",
|
|
23
|
-
"@icanbwell/types": "4.15.
|
|
23
|
+
"@icanbwell/types": "4.15.1",
|
|
24
24
|
"lodash.noop": "3.0.1"
|
|
25
25
|
}
|
|
26
26
|
}
|