@applicaster/zapp-react-dom-app 16.0.0-alpha.8901714553 → 16.0.0-alpha.9225550512

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.
@@ -64,6 +64,7 @@ export const PLATFORMS = {
64
64
  android: "Android",
65
65
  mobile: "Mobile",
66
66
  vizio: "VIZIO",
67
+ vidaa: "VIDAA",
67
68
  smartcast: "SmartCast",
68
69
  conjure: "Conjure",
69
70
  };
@@ -13,7 +13,7 @@ import {
13
13
 
14
14
  /**
15
15
  * @typedef {"tv" | "web" | "other"} DeviceType
16
- * @typedef {"samsung_tv" | "lg_tv" | unknown} CustomPlatformTypes
16
+ * @typedef {"samsung_tv" | "lg_tv" | "vidaa" | unknown} CustomPlatformTypes
17
17
  */
18
18
 
19
19
  /**
@@ -75,6 +75,16 @@ export const isVizioPlatform = () => {
75
75
  );
76
76
  };
77
77
 
78
+ /**
79
+ * Checks if the platform is Vida.
80
+ * @returns {boolean} True if the platform is Vida, false otherwise.
81
+ */
82
+ export const isVidaaPlatform = () => {
83
+ const userAgent = getUserAgent();
84
+
85
+ return userAgent.includes(PLATFORMS.vidaa);
86
+ };
87
+
78
88
  /**
79
89
  * Checks if the Vizio APIs are available.
80
90
  * @returns {boolean} True if the Vizio APIs are available, false otherwise.
@@ -99,6 +109,10 @@ export const getDeviceType = () => {
99
109
  return isSamsungPlatform() ? "tv" : "web";
100
110
  case "lg_tv":
101
111
  return isLgPlatform() ? "tv" : "web";
112
+ case "vizio":
113
+ return isVizioPlatform() ? "tv" : "web";
114
+ case "vidaa":
115
+ return isVidaaPlatform() ? "tv" : "web";
102
116
  default:
103
117
  return "other";
104
118
  }
@@ -9,4 +9,5 @@ export enum STORE_PLATFORM {
9
9
  lg = "lg_content_store",
10
10
  samsung = "samsung_app_store",
11
11
  vizio = "vizio_app_store",
12
+ vidaa = "vidaa_app_store",
12
13
  }
@@ -26,7 +26,7 @@ export function StorageMock() {
26
26
 
27
27
  delete this[key];
28
28
 
29
- return true;
29
+ // Return undefined like the real API; a truthy return would re-mask the bug.
30
30
  };
31
31
 
32
32
  storage.getItem = (key) => {
@@ -155,7 +155,11 @@ export function getStorageModule(type) {
155
155
  function removeItem(key, namespace = DEFAULT_NAMESPACE) {
156
156
  const keyName = applyNamespaceToKeyName(key, namespace);
157
157
 
158
- return tryAndResolve(() => Storage.callMethod("removeItem", keyName));
158
+ return tryAndResolve(() => {
159
+ Storage.callMethod("removeItem", keyName);
160
+
161
+ return true;
162
+ });
159
163
  }
160
164
 
161
165
  /**
@@ -15,6 +15,7 @@ import "@webcomponents/webcomponentsjs";
15
15
  const PLATFORM_KEYS = {
16
16
  samsung: "samsung_tv",
17
17
  lg: "lg_tv",
18
+ vidaa: "vidaa",
18
19
  web: "web",
19
20
  };
20
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-dom-app",
3
- "version": "16.0.0-alpha.8901714553",
3
+ "version": "16.0.0-alpha.9225550512",
4
4
  "description": "Zapp App Component for Applicaster's Quick Brick React Native App",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "homepage": "https://github.com/applicaster/zapp-react-dom-app#readme",
24
24
  "dependencies": {
25
- "@applicaster/zapp-react-dom-ui-components": "16.0.0-alpha.8901714553",
26
- "@applicaster/zapp-react-native-bridge": "16.0.0-alpha.8901714553",
27
- "@applicaster/zapp-react-native-redux": "16.0.0-alpha.8901714553",
28
- "@applicaster/zapp-react-native-ui-components": "16.0.0-alpha.8901714553",
29
- "@applicaster/zapp-react-native-utils": "16.0.0-alpha.8901714553",
25
+ "@applicaster/zapp-react-dom-ui-components": "16.0.0-alpha.9225550512",
26
+ "@applicaster/zapp-react-native-bridge": "16.0.0-alpha.9225550512",
27
+ "@applicaster/zapp-react-native-redux": "16.0.0-alpha.9225550512",
28
+ "@applicaster/zapp-react-native-ui-components": "16.0.0-alpha.9225550512",
29
+ "@applicaster/zapp-react-native-utils": "16.0.0-alpha.9225550512",
30
30
  "abortcontroller-polyfill": "^1.7.5",
31
31
  "typeface-montserrat": "^0.0.54",
32
32
  "video.js": "7.14.3",