@applicaster/zapp-react-dom-app 12.0.0-alpha.4840257570 → 12.0.0-alpha.4885205607
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.
|
@@ -31,25 +31,17 @@ import {
|
|
|
31
31
|
import { PlayerContentContext } from "@applicaster/zapp-react-dom-ui-components/Contexts";
|
|
32
32
|
|
|
33
33
|
import { withNavigator } from "@applicaster/zapp-react-native-ui-components/Decorators/Navigator";
|
|
34
|
-
import { Platform } from "react-native";
|
|
35
34
|
import { LONG_KEY_PRESS_TIMEOUT } from "@applicaster/quick-brick-core/const";
|
|
36
35
|
import { getXray } from "@applicaster/zapp-react-native-utils/logger";
|
|
37
36
|
import { confirmationDialogStore } from "@applicaster/zapp-react-native-ui-components/Contexts/ConfirmDialogState";
|
|
38
|
-
import {
|
|
37
|
+
import {
|
|
38
|
+
isVizioPlatform,
|
|
39
|
+
isSamsungPlatform,
|
|
40
|
+
isLgPlatform,
|
|
41
|
+
} from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
39
42
|
|
|
40
43
|
import { OnScreenKeyboard } from "@applicaster/zapp-react-dom-ui-components/Components/OnScreenKeyboard";
|
|
41
44
|
|
|
42
|
-
declare global {
|
|
43
|
-
interface Window {
|
|
44
|
-
applicaster: {
|
|
45
|
-
useOnScreenKeyboard: boolean;
|
|
46
|
-
};
|
|
47
|
-
VIZIO: {
|
|
48
|
-
exitApplication: () => void;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
45
|
const { withXray } = getXray();
|
|
54
46
|
const globalAny: any = global;
|
|
55
47
|
|
|
@@ -162,7 +154,6 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
162
154
|
);
|
|
163
155
|
|
|
164
156
|
document.addEventListener("focusin", this.handleInputFocus);
|
|
165
|
-
// document.addEventListener("focusout", this.handleInputBlur);
|
|
166
157
|
|
|
167
158
|
document.addEventListener(
|
|
168
159
|
"cursorStateChange",
|
|
@@ -193,18 +184,18 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
193
184
|
}
|
|
194
185
|
|
|
195
186
|
performExit() {
|
|
196
|
-
if (
|
|
187
|
+
if (isSamsungPlatform()) {
|
|
197
188
|
this.onConfirmDialogClose();
|
|
198
189
|
sendQuickBrickEvent(QUICK_BRICK_EVENTS.MOVE_APP_TO_BACKGROUND);
|
|
199
190
|
}
|
|
200
191
|
|
|
201
|
-
if (
|
|
192
|
+
if (isLgPlatform()) {
|
|
202
193
|
// webOS recommend to use this method when implemention a custom exit
|
|
203
194
|
globalAny.close();
|
|
204
195
|
}
|
|
205
196
|
|
|
206
|
-
if (
|
|
207
|
-
window
|
|
197
|
+
if (isVizioPlatform()) {
|
|
198
|
+
window?.VIZIO?.exitApplication();
|
|
208
199
|
}
|
|
209
200
|
}
|
|
210
201
|
|
|
@@ -234,10 +225,7 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
234
225
|
platformBack() {
|
|
235
226
|
try {
|
|
236
227
|
// TODO: temporary hack until this code is refactored
|
|
237
|
-
if (
|
|
238
|
-
Platform.OS === ("samsung_tv" as QuickBrickPlatforms) ||
|
|
239
|
-
hasVizioAPIs()
|
|
240
|
-
) {
|
|
228
|
+
if (isSamsungPlatform() || isVizioPlatform()) {
|
|
241
229
|
const { isDialogVisible } = confirmationDialogStore.getState();
|
|
242
230
|
|
|
243
231
|
if (isDialogVisible) {
|
|
@@ -250,7 +238,7 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
250
238
|
cancelCompletion: this.onConfirmDialogClose,
|
|
251
239
|
});
|
|
252
240
|
}
|
|
253
|
-
} else if (
|
|
241
|
+
} else if (isLgPlatform()) {
|
|
254
242
|
this.handleWebOsBack();
|
|
255
243
|
}
|
|
256
244
|
} catch (e) {
|
|
@@ -610,10 +598,7 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
610
598
|
}
|
|
611
599
|
|
|
612
600
|
if (keyCode(event).matches(KEYS.Exit)) {
|
|
613
|
-
if (
|
|
614
|
-
Platform.OS === ("samsung_tv" as QuickBrickPlatforms) ||
|
|
615
|
-
shouldUseOnScreenKeyboard()
|
|
616
|
-
) {
|
|
601
|
+
if (isSamsungPlatform() || shouldUseOnScreenKeyboard()) {
|
|
617
602
|
this.performExit();
|
|
618
603
|
|
|
619
604
|
return;
|
|
@@ -638,6 +623,12 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
638
623
|
focusManager.moveFocus(direction);
|
|
639
624
|
}
|
|
640
625
|
|
|
626
|
+
if (!isDialogVisible) {
|
|
627
|
+
// run focus recovery on user interaction attempt
|
|
628
|
+
// probably we failed to set initial focus for some reason
|
|
629
|
+
focusManager.recoverFocus();
|
|
630
|
+
}
|
|
631
|
+
|
|
641
632
|
if (
|
|
642
633
|
displayState === DISPLAY_STATES.PLAYER ||
|
|
643
634
|
displayState === DISPLAY_STATES.HUD
|
|
@@ -662,11 +653,9 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
662
653
|
};
|
|
663
654
|
|
|
664
655
|
if (deltaY > 0) {
|
|
665
|
-
DIRECTION.value =
|
|
666
|
-
Platform.OS === ("lg_tv" as QuickBrickPlatforms) ? "down" : "up";
|
|
656
|
+
DIRECTION.value = isLgPlatform() ? "down" : "up";
|
|
667
657
|
} else if (deltaY < 0) {
|
|
668
|
-
DIRECTION.value =
|
|
669
|
-
Platform.OS === ("lg_tv" as QuickBrickPlatforms) ? "up" : "down";
|
|
658
|
+
DIRECTION.value = isLgPlatform() ? "up" : "down";
|
|
670
659
|
}
|
|
671
660
|
|
|
672
661
|
if (
|
|
@@ -702,6 +691,9 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
702
691
|
|
|
703
692
|
onConfirmDialogClose() {
|
|
704
693
|
this.confirmDialog.hideDialog();
|
|
694
|
+
|
|
695
|
+
// restore initial focus after closing dialog
|
|
696
|
+
focusManager.setInitialFocus();
|
|
705
697
|
}
|
|
706
698
|
|
|
707
699
|
handleInputFocus = (event: FocusEvent) => {
|
|
@@ -747,9 +739,7 @@ export function withInteractionManager(Component: React.FC) {
|
|
|
747
739
|
keyboardInput: "",
|
|
748
740
|
},
|
|
749
741
|
() => {
|
|
750
|
-
|
|
751
|
-
this.isDismissing = false;
|
|
752
|
-
}, 100);
|
|
742
|
+
this.isDismissing = false;
|
|
753
743
|
}
|
|
754
744
|
);
|
|
755
745
|
};
|
|
@@ -283,21 +283,24 @@ export const getDeviceData = async () => {
|
|
|
283
283
|
...tizenConnectionInfo,
|
|
284
284
|
device_type: getDeviceType(),
|
|
285
285
|
};
|
|
286
|
-
} else if (
|
|
287
|
-
window.VIZIO.getFirmwareVersion(function (firmwareVersion) {
|
|
288
|
-
deviceData.osVersion = firmwareVersion;
|
|
289
|
-
});
|
|
290
|
-
|
|
286
|
+
} else if (isVizioPlatform()) {
|
|
291
287
|
deviceData = {
|
|
292
288
|
...deviceData,
|
|
293
289
|
platform: "vizio",
|
|
294
290
|
deviceMake: "Vizio",
|
|
295
|
-
deviceModel: window.VIZIO.deviceModel,
|
|
296
291
|
deviceType: "tv",
|
|
297
292
|
userAgent: getUserAgent(),
|
|
298
293
|
deviceWidth: window.innerWidth,
|
|
299
294
|
deviceHeight: window.innerHeight,
|
|
300
295
|
};
|
|
296
|
+
|
|
297
|
+
if (hasVizioAPIs()) {
|
|
298
|
+
window.VIZIO.getFirmwareVersion(function (firmwareVersion) {
|
|
299
|
+
deviceData.osVersion = firmwareVersion;
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
deviceData.deviceModel = window.VIZIO.deviceModel;
|
|
303
|
+
}
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
return deviceData;
|
|
@@ -105,7 +105,11 @@ function isInvalidAnalyticsData(eventName, payload = null) {
|
|
|
105
105
|
|
|
106
106
|
export const AnalyticsBridge = (function () {
|
|
107
107
|
let registeredAnalyticPlugins: {
|
|
108
|
-
module: {
|
|
108
|
+
module: {
|
|
109
|
+
sendEvent: Function;
|
|
110
|
+
initialize?: Function;
|
|
111
|
+
getPlayerConfiguration?: Function;
|
|
112
|
+
};
|
|
109
113
|
configuration?: any;
|
|
110
114
|
}[] = [];
|
|
111
115
|
|
package/main.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-dom-app",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.4885205607",
|
|
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.
|
|
26
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.
|
|
27
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.
|
|
28
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
29
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
25
|
+
"@applicaster/zapp-react-dom-ui-components": "12.0.0-alpha.4885205607",
|
|
26
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.4885205607",
|
|
27
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.4885205607",
|
|
28
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4885205607",
|
|
29
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.4885205607",
|
|
30
30
|
"abortcontroller-polyfill": "^1.7.5",
|
|
31
31
|
"history": "^4.7.2",
|
|
32
32
|
"react-router-dom": "^5.1.2",
|