@icanbwell/native-components 3.16.0 → 3.16.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.
Files changed (2) hide show
  1. package/index.js +9 -1
  2. package/package.json +3 -3
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.0",
3
+ "version": "3.16.1",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "tsconfig": "./tsconfig.lib.json"
@@ -11,8 +11,8 @@
11
11
  "react-dom": "^17.0.0 || ^18.0.0",
12
12
  "react-native-webview": "11.x"
13
13
  },
14
- "repoVersion": "12.8.0",
15
- "description": "@icanbwell/native-components. repo version: 12.8.0",
14
+ "repoVersion": "12.8.1",
15
+ "description": "@icanbwell/native-components. repo version: 12.8.1",
16
16
  "module": "./index.js",
17
17
  "main": "./index.js",
18
18
  "type": "module",