@applicaster/zapp-react-dom-app 12.0.0-alpha.5061452310 → 12.0.0-alpha.5085420612

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.
@@ -35,15 +35,6 @@ import { Platform } from "react-native";
35
35
  import { LONG_KEY_PRESS_TIMEOUT } from "@applicaster/quick-brick-core/const";
36
36
  import { getXray } from "@applicaster/zapp-react-native-utils/logger";
37
37
  import { confirmationDialogStore } from "@applicaster/zapp-react-native-ui-components/Contexts/ConfirmDialogState";
38
- import { hasVizioAPIs, isVizioPlatform } from "../Loader/utils/platform";
39
-
40
- declare global {
41
- interface Window {
42
- VIZIO: {
43
- exitApplication: () => void;
44
- };
45
- }
46
- }
47
38
 
48
39
  const { withXray } = getXray();
49
40
  const globalAny: any = global;
@@ -186,10 +177,6 @@ export function withInteractionManager(Component: React.FC) {
186
177
  // webOS recommend to use this method when implemention a custom exit
187
178
  globalAny.close();
188
179
  }
189
-
190
- if (hasVizioAPIs()) {
191
- window.VIZIO.exitApplication();
192
- }
193
180
  }
194
181
 
195
182
  handleWebOsBack() {
@@ -218,10 +205,7 @@ export function withInteractionManager(Component: React.FC) {
218
205
  platformBack() {
219
206
  try {
220
207
  // TODO: temporary hack until this code is refactored
221
- if (
222
- Platform.OS === ("samsung_tv" as QuickBrickPlatforms) ||
223
- hasVizioAPIs()
224
- ) {
208
+ if (Platform.OS === ("samsung_tv" as QuickBrickPlatforms)) {
225
209
  const { isDialogVisible } = confirmationDialogStore.getState();
226
210
 
227
211
  if (isDialogVisible) {
@@ -583,10 +567,7 @@ export function withInteractionManager(Component: React.FC) {
583
567
  }
584
568
 
585
569
  if (keyCode(event).matches(KEYS.Exit)) {
586
- if (
587
- Platform.OS === ("samsung_tv" as QuickBrickPlatforms) ||
588
- isVizioPlatform()
589
- ) {
570
+ if (Platform.OS === ("samsung_tv" as QuickBrickPlatforms)) {
590
571
  this.performExit();
591
572
 
592
573
  return;
@@ -62,9 +62,6 @@ export const PLATFORMS = {
62
62
  iphone: "iPhone",
63
63
  android: "Android",
64
64
  mobile: "Mobile",
65
- vizio: "VIZIO",
66
- smartcast: "SmartCast",
67
- conjure: "Conjure",
68
65
  };
69
66
 
70
67
  /**
@@ -42,36 +42,6 @@ export const isSamsungPlatform = () => {
42
42
  );
43
43
  };
44
44
 
45
- /**
46
- * Checks if we are on the Vizio platform by using the userAgent string
47
- *
48
- * Use this method when you need to identify the platform on runtime
49
- * before the VIZIO Companion Library has loaded
50
- */
51
- export const isVizioPlatform = () => {
52
- const userAgent = getUserAgent();
53
-
54
- const isVizioAgent =
55
- userAgent.includes(PLATFORMS.vizio) ||
56
- userAgent.includes(PLATFORMS.smartcast) ||
57
- userAgent.includes(PLATFORMS.conjure);
58
-
59
- return isVizioAgent;
60
- };
61
-
62
- /**
63
- * Checks if we are on the Vizio platform by checking for the global VIZIO object
64
- * and the VIZIO Companion Library. This method does not use the userAgent string,
65
- * because it mainly checks whether we have access to apis, which may not be available yet
66
- */
67
- export const hasVizioAPIs = () => {
68
- const hasAPIs =
69
- typeof window.VIZIO !== "undefined" &&
70
- window?.applicaster?.vizioLibraryDidLoad;
71
-
72
- return hasAPIs;
73
- };
74
-
75
45
  /**
76
46
  * platformSelect can't be used, because Platform.OS is overriden
77
47
  * by overloadReactNativePlatform and don't support 'web' value
@@ -283,21 +253,6 @@ export const getDeviceData = async () => {
283
253
  ...tizenConnectionInfo,
284
254
  device_type: getDeviceType(),
285
255
  };
286
- } else if (hasVizioAPIs()) {
287
- window.VIZIO.getFirmwareVersion(function (firmwareVersion) {
288
- deviceData.osVersion = firmwareVersion;
289
- });
290
-
291
- deviceData = {
292
- ...deviceData,
293
- platform: "vizio",
294
- deviceMake: "Vizio",
295
- deviceModel: window.VIZIO.deviceModel,
296
- deviceType: "tv",
297
- userAgent: getUserAgent(),
298
- deviceWidth: window.innerWidth,
299
- deviceHeight: window.innerHeight,
300
- };
301
256
  }
302
257
 
303
258
  return deviceData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-dom-app",
3
- "version": "12.0.0-alpha.5061452310",
3
+ "version": "12.0.0-alpha.5085420612",
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": "12.0.0-alpha.5061452310",
26
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5061452310",
27
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5061452310",
28
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5061452310",
29
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5061452310",
25
+ "@applicaster/zapp-react-dom-ui-components": "12.0.0-alpha.5085420612",
26
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5085420612",
27
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5085420612",
28
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5085420612",
29
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5085420612",
30
30
  "abortcontroller-polyfill": "^1.7.5",
31
31
  "history": "^4.7.2",
32
32
  "react-router-dom": "^5.1.2",