@applicaster/zapp-react-dom-app 14.0.0-rc.4 → 14.0.0-rc.40
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/App/InteractionManager/index.tsx +1 -6
- package/App/Loader/SplashLoader.js +1 -1
- package/App/Loader/loadSessionStorageData.js +2 -1
- package/App/Loader/utils/const.js +1 -0
- package/App/Splash/index.js +1 -1
- package/Polyfills/Storage/__tests__/storage.test.js +8 -17
- package/Polyfills/index.js +5 -6
- package/package.json +6 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as R from "ramda";
|
|
3
3
|
|
|
4
|
-
import { connectToStore } from "@applicaster/zapp-react-native-redux";
|
|
4
|
+
import { connectToStore } from "@applicaster/zapp-react-native-redux/utils/connectToStore";
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
QUICK_BRICK_EVENTS,
|
|
@@ -139,14 +139,9 @@ class InteractionManagerClass extends React.Component<Props, State> {
|
|
|
139
139
|
this.handleInputBlur = this.handleInputBlur.bind(this);
|
|
140
140
|
this.handleKeyboardInput = this.handleKeyboardInput.bind(this);
|
|
141
141
|
this.handleKeyboardDismiss = this.handleKeyboardDismiss.bind(this);
|
|
142
|
-
this.onKeyDownListener = this.onKeyDown.bind(this);
|
|
143
|
-
this.onKeyUp = this.onKeyUp.bind(this);
|
|
144
142
|
this.onMouseMoveListener = this.onMouseMove.bind(this);
|
|
145
143
|
this.onScrollListener = this.onScroll.bind(this);
|
|
146
144
|
this.onMouseDownListener = this.onMouseDown.bind(this);
|
|
147
|
-
this.onKeyboardStateChange = this.onKeyboardStateChange.bind(this);
|
|
148
|
-
this.onConfirmDialogOpen = this.onConfirmDialogOpen.bind(this);
|
|
149
|
-
this.onConfirmDialogClose = this.onConfirmDialogClose.bind(this);
|
|
150
145
|
|
|
151
146
|
this.handlePhysicalKeyboardDismiss =
|
|
152
147
|
this.handlePhysicalKeyboardDismiss.bind(this);
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import * as R from "ramda";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
|
|
6
|
-
import { connectToStore } from "@applicaster/zapp-react-native-redux";
|
|
6
|
+
import { connectToStore } from "@applicaster/zapp-react-native-redux/utils/connectToStore";
|
|
7
7
|
import { QUICK_BRICK_EVENTS } from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
8
8
|
|
|
9
9
|
import { QuickBrickEvents } from "../../Polyfills/QuickBrickCommunicationModule";
|
|
@@ -63,7 +63,8 @@ async function gatherData(uuid) {
|
|
|
63
63
|
...NativeModules?.QuickBrickCommunicationModule,
|
|
64
64
|
// Device data retrieved from native device apis
|
|
65
65
|
...deviceData,
|
|
66
|
-
uuid: uuid || uuidv4(),
|
|
66
|
+
uuid: uuid || uuidv4(), // Created on first session, persisted in local thereafter
|
|
67
|
+
sessionId: uuidv4(), // Created on every session
|
|
67
68
|
locale: `{language=${languageLocale}, country=${countryLocale}}`,
|
|
68
69
|
};
|
|
69
70
|
|
package/App/Splash/index.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import * as R from "ramda";
|
|
2
|
-
import {
|
|
3
|
-
getStorageModule,
|
|
4
|
-
applyNamespaceToKeyName,
|
|
5
|
-
STORAGE_TYPES,
|
|
6
|
-
DEFAULT_NAMESPACE,
|
|
7
|
-
} from "../";
|
|
2
|
+
import { getStorageModule, STORAGE_TYPES } from "../";
|
|
8
3
|
|
|
9
4
|
import { StorageMock } from "./StorageMocks";
|
|
10
5
|
|
|
@@ -37,7 +32,6 @@ describe("storageObject", () => {
|
|
|
37
32
|
const value = "bar";
|
|
38
33
|
const namespaceValue = "baz";
|
|
39
34
|
const namespace = "baz";
|
|
40
|
-
const keyName = applyNamespaceToKeyName(key, namespace);
|
|
41
35
|
const failKey = "fail_key";
|
|
42
36
|
|
|
43
37
|
beforeEach(clearStorage);
|
|
@@ -54,16 +48,11 @@ describe("storageObject", () => {
|
|
|
54
48
|
it.each(storages)("sets a property in the storage", async (storage) => {
|
|
55
49
|
const result = await storage.setItem(key, value, null);
|
|
56
50
|
|
|
57
|
-
const keyWithDefaultNameSpace = applyNamespaceToKeyName(
|
|
58
|
-
key,
|
|
59
|
-
DEFAULT_NAMESPACE
|
|
60
|
-
);
|
|
61
|
-
|
|
62
51
|
expect(result).toBe(true);
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
53
|
+
const res = await storage.getItem(key, null);
|
|
54
|
+
|
|
55
|
+
expect(res).toEqual(value);
|
|
67
56
|
});
|
|
68
57
|
|
|
69
58
|
it.each(storages)(
|
|
@@ -73,7 +62,9 @@ describe("storageObject", () => {
|
|
|
73
62
|
|
|
74
63
|
expect(result).toBe(true);
|
|
75
64
|
|
|
76
|
-
|
|
65
|
+
const res = await storage.getItem(key, namespace);
|
|
66
|
+
|
|
67
|
+
expect(res).toEqual(namespaceValue);
|
|
77
68
|
}
|
|
78
69
|
);
|
|
79
70
|
|
|
@@ -108,7 +99,7 @@ describe("storageObject", () => {
|
|
|
108
99
|
"gets properties from the storage with a namespace",
|
|
109
100
|
(storage) => {
|
|
110
101
|
expect(storage.getItem(key, namespace)).resolves.toEqual(
|
|
111
|
-
|
|
102
|
+
namespaceValue
|
|
112
103
|
);
|
|
113
104
|
}
|
|
114
105
|
);
|
package/Polyfills/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { QuickBrickCommunicationModule } from "./QuickBrickCommunicationModule";
|
|
2
|
-
import { AnalyticsBridge } from "./AnalyticsBridge";
|
|
3
1
|
import { getStorageModule } from "./Storage";
|
|
4
2
|
import { DeviceEventEmitter } from "./DeviceEventEmitter";
|
|
5
|
-
import { AppLoaderBridge } from "./AppLoaderBridge";
|
|
6
3
|
import { isSamsungPlatform, isLgPlatform } from "../App/Loader/utils/platform";
|
|
7
4
|
|
|
8
5
|
// Polyfill for abort controller required by shaka-player 4.x.x
|
|
@@ -24,11 +21,13 @@ const PLATFORM_KEYS = {
|
|
|
24
21
|
// const DESKTOP_BROWSER = [PLATFORMS.linux, PLATFORMS.mac, PLATFORMS.win];
|
|
25
22
|
|
|
26
23
|
export function registerNativeModulesPolyfills(NativeModules) {
|
|
27
|
-
NativeModules.QuickBrickCommunicationModule = QuickBrickCommunicationModule;
|
|
28
24
|
NativeModules.LocalStorage = getStorageModule("localStorage");
|
|
29
25
|
NativeModules.SessionStorage = getStorageModule("sessionStorage");
|
|
30
|
-
NativeModules.AnalyticsBridge = AnalyticsBridge;
|
|
31
|
-
NativeModules.AppLoaderBridge = AppLoaderBridge;
|
|
26
|
+
NativeModules.AnalyticsBridge = require("./AnalyticsBridge").AnalyticsBridge;
|
|
27
|
+
NativeModules.AppLoaderBridge = require("./AppLoaderBridge").AppLoaderBridge;
|
|
28
|
+
|
|
29
|
+
NativeModules.QuickBrickCommunicationModule =
|
|
30
|
+
require("./QuickBrickCommunicationModule").QuickBrickCommunicationModule;
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
function getWebPlatform(fallbackPlatform) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-dom-app",
|
|
3
|
-
"version": "14.0.0-rc.
|
|
3
|
+
"version": "14.0.0-rc.40",
|
|
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": "14.0.0-rc.
|
|
26
|
-
"@applicaster/zapp-react-native-bridge": "14.0.0-rc.
|
|
27
|
-
"@applicaster/zapp-react-native-redux": "14.0.0-rc.
|
|
28
|
-
"@applicaster/zapp-react-native-ui-components": "14.0.0-rc.
|
|
29
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-rc.
|
|
25
|
+
"@applicaster/zapp-react-dom-ui-components": "14.0.0-rc.40",
|
|
26
|
+
"@applicaster/zapp-react-native-bridge": "14.0.0-rc.40",
|
|
27
|
+
"@applicaster/zapp-react-native-redux": "14.0.0-rc.40",
|
|
28
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-rc.40",
|
|
29
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-rc.40",
|
|
30
30
|
"abortcontroller-polyfill": "^1.7.5",
|
|
31
31
|
"typeface-montserrat": "^0.0.54",
|
|
32
32
|
"video.js": "7.14.3",
|
|
@@ -39,11 +39,8 @@
|
|
|
39
39
|
"core-js": "3.29.1",
|
|
40
40
|
"immer": "*",
|
|
41
41
|
"react": "*",
|
|
42
|
-
"react-dom": "*",
|
|
43
42
|
"react-native": "*",
|
|
44
|
-
"react-native-safe-area-context": "*",
|
|
45
43
|
"react-native-svg": "*",
|
|
46
|
-
"react-native-web": "*",
|
|
47
44
|
"uglify-js": "*",
|
|
48
45
|
"validate-color": "*",
|
|
49
46
|
"zustand": "*"
|