@applicaster/quick-brick-core 15.0.0-rc.44 → 15.0.0-rc.46
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.
|
@@ -21,7 +21,8 @@ const warnUndefinedContext = (context) =>
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
type Subscription = {
|
|
24
|
-
[x: string]: () => any;
|
|
24
|
+
[x: string]: (() => any) | string;
|
|
25
|
+
pluginId?: string;
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const getModuleContext = R.path(["module", "context"]);
|
|
@@ -29,7 +30,7 @@ const getModuleContext = R.path(["module", "context"]);
|
|
|
29
30
|
const getContexts = R.compose(
|
|
30
31
|
R.map((action) => {
|
|
31
32
|
const item = getModuleContext(action);
|
|
32
|
-
item
|
|
33
|
+
item.pluginId = action.name;
|
|
33
34
|
|
|
34
35
|
return item;
|
|
35
36
|
}),
|
|
@@ -46,10 +47,10 @@ const useSubscribeToActionProviders = () => {
|
|
|
46
47
|
}, [actionContext]);
|
|
47
48
|
|
|
48
49
|
const subscriptions = getContexts(actionContext.actions).map((context) => {
|
|
49
|
-
const subscription = React.useContext<
|
|
50
|
+
const subscription = React.useContext<Subscription>(context);
|
|
50
51
|
|
|
51
52
|
if (subscription) {
|
|
52
|
-
subscription
|
|
53
|
+
subscription.pluginId = context.pluginId;
|
|
53
54
|
|
|
54
55
|
return subscription;
|
|
55
56
|
} else {
|
|
@@ -74,7 +74,7 @@ export async function getNativeRemoteContextData(
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const apiVersion = layout?.layout?.
|
|
77
|
+
const apiVersion = layout?.layout?.api_version; // Taken from remote configuration
|
|
78
78
|
|
|
79
79
|
dispatch(AppData.actions.merge({ layoutVersion: apiVersion || "v1" }));
|
|
80
80
|
|
|
@@ -113,15 +113,15 @@ export async function prepareRuntimeConfigurationUrls(
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
export async function getPromiseForType(
|
|
116
|
+
export async function getPromiseForType<T = FileResponse>(
|
|
117
117
|
key: string
|
|
118
|
-
): Promise<
|
|
118
|
+
): Promise<T | never> {
|
|
119
119
|
try {
|
|
120
120
|
const response = await AppLoaderBridge?.getFile(key, null);
|
|
121
121
|
|
|
122
122
|
return {
|
|
123
123
|
[key]: JSON.parse(response),
|
|
124
|
-
};
|
|
124
|
+
} as T;
|
|
125
125
|
} catch (e) {
|
|
126
126
|
throw new Error("cannot retrieve configuration data for " + key);
|
|
127
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-core",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.46",
|
|
4
4
|
"description": "Core package for Applicaster's Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "15.0.0-rc.
|
|
32
|
-
"@applicaster/quick-brick-core-plugins": "15.0.0-rc.
|
|
33
|
-
"@applicaster/zapp-pipes-v2-client": "15.0.0-rc.
|
|
34
|
-
"@applicaster/zapp-react-native-bridge": "15.0.0-rc.
|
|
35
|
-
"@applicaster/zapp-react-native-redux": "15.0.0-rc.
|
|
36
|
-
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "15.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "15.0.0-rc.46",
|
|
32
|
+
"@applicaster/quick-brick-core-plugins": "15.0.0-rc.46",
|
|
33
|
+
"@applicaster/zapp-pipes-v2-client": "15.0.0-rc.46",
|
|
34
|
+
"@applicaster/zapp-react-native-bridge": "15.0.0-rc.46",
|
|
35
|
+
"@applicaster/zapp-react-native-redux": "15.0.0-rc.46",
|
|
36
|
+
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.46",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "15.0.0-rc.46",
|
|
38
38
|
"atob": "^2.1.2",
|
|
39
39
|
"axios": "^0.28.0",
|
|
40
40
|
"btoa": "^1.2.1",
|