@uptick-ads/react-native-web-sdk 0.3.0 → 0.3.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/package.json +17 -3
- package/src/UptickFlow.js +2 -1
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uptick-ads/react-native-web-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "React Native component that runs the Uptick web SDK inside a WebView, inline or as a popup, with the web integration's parameters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uptick",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"types": "index.d.ts",
|
|
24
24
|
"files": [
|
|
25
25
|
"src",
|
|
26
|
+
"!src/**/*.test.js",
|
|
26
27
|
"index.d.ts",
|
|
27
28
|
"README.md",
|
|
28
29
|
"LICENSE"
|
|
@@ -41,7 +42,20 @@
|
|
|
41
42
|
},
|
|
42
43
|
"scripts": {
|
|
43
44
|
"check": "node --check src/index.js && node --check src/UptickFlow.js && node --check src/embedUrl.js && node --check src/version.js && node -e \"const p=require('./package.json');const v=require('fs').readFileSync('src/version.js','utf8');if(!v.includes('\\\"'+p.version+'\\\"'))throw new Error('src/version.js is out of step with package.json')\" && npm pack --dry-run",
|
|
44
|
-
"prepublishOnly": "npm run check"
|
|
45
|
+
"prepublishOnly": "npm run check && npm test",
|
|
46
|
+
"test": "jest --selectProjects unit",
|
|
47
|
+
"test:e2e": "jest --selectProjects e2e"
|
|
45
48
|
},
|
|
46
|
-
"private": false
|
|
49
|
+
"private": false,
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@react-native/babel-preset": "^0.88.0",
|
|
52
|
+
"@react-native/jest-preset": "^0.88.0",
|
|
53
|
+
"@testing-library/react-native": "^14.1.0",
|
|
54
|
+
"jest": "^29.7.0",
|
|
55
|
+
"playwright": "^1.64.1",
|
|
56
|
+
"react": "^19.3.1",
|
|
57
|
+
"react-native": "^0.88.0",
|
|
58
|
+
"react-native-webview": "^13.17.0",
|
|
59
|
+
"test-renderer": "^1.3.1"
|
|
60
|
+
}
|
|
47
61
|
}
|
package/src/UptickFlow.js
CHANGED
|
@@ -7,7 +7,7 @@ import { version as SDK_VERSION } from "./version";
|
|
|
7
7
|
const DEFAULT_HOST = "api.uptick.com";
|
|
8
8
|
const MAX_HEIGHT = 1400;
|
|
9
9
|
|
|
10
|
-
// Messages from the host page that the component acts on itself; every message is also forwarded to `callback`.
|
|
10
|
+
// Messages from the host page that the component acts on itself; every message except `height` is also forwarded to `callback`.
|
|
11
11
|
const SHOW_EVENTS = ["offer_viewed"];
|
|
12
12
|
const HIDE_EVENTS = ["flow_complete", "flow_closed"];
|
|
13
13
|
|
|
@@ -65,6 +65,7 @@ export function UptickFlow({
|
|
|
65
65
|
} catch (error) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
+
if (!message || typeof message !== "object") return;
|
|
68
69
|
const { name, data } = message;
|
|
69
70
|
if (name === "height") {
|
|
70
71
|
setHeight(Math.min(Math.max(Number(data && data.height) || 0, 0), MAX_HEIGHT));
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Kept in step with package.json by the release pipeline; the API records it on every event as integration_version.
|
|
2
|
-
export const version = "0.3.
|
|
2
|
+
export const version = "0.3.1";
|