@applicaster/zapp-react-native-utils 14.0.23 → 14.0.24-alpha.2716433026
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.24-alpha.2716433026",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "14.0.
|
|
30
|
+
"@applicaster/applicaster-types": "14.0.24-alpha.2716433026",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -46,7 +46,7 @@ const legacyMappingKeys = {
|
|
|
46
46
|
actionType: "login_completion_action",
|
|
47
47
|
targetScreen: "navigate_to_login_screen",
|
|
48
48
|
},
|
|
49
|
-
"quick-brick-user-account-ui-component": {
|
|
49
|
+
"quick-brick-user-account-ui-component.login": {
|
|
50
50
|
actionType: "callbackAction",
|
|
51
51
|
},
|
|
52
52
|
"quick-brick-login-multi-login-providers.login": {
|
|
@@ -82,10 +82,10 @@ export const getNavigationKeys = (
|
|
|
82
82
|
item?: ZappUIComponent | ZappRiver,
|
|
83
83
|
resultType: ResultType | null = null
|
|
84
84
|
): NavKeys => {
|
|
85
|
-
const general = (
|
|
85
|
+
const general = (item?.general ?? {}) as General;
|
|
86
86
|
|
|
87
87
|
const pluginIdentifier =
|
|
88
|
-
(item as any)
|
|
88
|
+
(item as any)?.identifier ?? item?.type ?? item?.component_type ?? "";
|
|
89
89
|
|
|
90
90
|
const legacy =
|
|
91
91
|
legacyMappingKeys[`${pluginIdentifier}.${resultType}`] ??
|
|
@@ -176,12 +176,25 @@ export const useCallbackNavigationAction = (
|
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
let data = getNavigationKeys(item, args.options?.resultType ?? null);
|
|
180
180
|
|
|
181
181
|
if (!data) {
|
|
182
|
-
hookCallback
|
|
182
|
+
const isScreen = !hookCallback;
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
if (isScreen && args.options?.resultType === ResultType.login) {
|
|
185
|
+
log_debug(
|
|
186
|
+
`${LogPrefix} no navigation data found, applying GO BACK for login screen`
|
|
187
|
+
);
|
|
188
|
+
|
|
189
|
+
data = {
|
|
190
|
+
action: NavigationCallbackOptions.GO_BACK,
|
|
191
|
+
targetScreenId: null,
|
|
192
|
+
};
|
|
193
|
+
} else {
|
|
194
|
+
hookCallback?.(args);
|
|
195
|
+
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
185
198
|
}
|
|
186
199
|
|
|
187
200
|
hookCallback?.({ ...args, success: false, cancelled: true });
|
|
@@ -20,7 +20,7 @@ const callbackKeyPrefix = (key, prefix, keySeparator = "_") =>
|
|
|
20
20
|
|
|
21
21
|
const extendManifestWithHookCallback = (prefix = null) => ({
|
|
22
22
|
group: true,
|
|
23
|
-
label: "
|
|
23
|
+
label: prefix ? `Callback Navigation: ${prefix}` : "Callback Navigation",
|
|
24
24
|
folded: true,
|
|
25
25
|
fields: [
|
|
26
26
|
{
|
|
@@ -20,7 +20,7 @@ const isAuthenticationRequired = ({ payload, logs }) => {
|
|
|
20
20
|
|
|
21
21
|
if (!payload) {
|
|
22
22
|
log_info(
|
|
23
|
-
"isAuthenticationRequired: No payload
|
|
23
|
+
"isAuthenticationRequired: No payload exists, authentication required"
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
return true;
|