@applicaster/zapp-react-native-utils 14.0.0-alpha.5219335081 → 14.0.0-alpha.5234792518
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/actionsExecutor/ActionExecutorContext.tsx +60 -84
- package/actionsExecutor/ScreenActions.ts +164 -0
- package/actionsExecutor/StorageActions.ts +110 -0
- package/actionsExecutor/feedDecorator.ts +171 -0
- package/actionsExecutor/screenResolver.ts +11 -0
- package/analyticsUtils/AnalyticsEvents/helper.ts +1 -1
- package/analyticsUtils/__tests__/analyticsUtils.test.js +0 -11
- package/analyticsUtils/playerAnalyticsTracker.ts +2 -1
- package/appUtils/HooksManager/index.ts +10 -10
- package/appUtils/contextKeysManager/contextResolver.ts +42 -1
- package/appUtils/focusManager/__tests__/__snapshots__/focusManager.test.js.snap +2 -0
- package/appUtils/focusManager/index.ios.ts +10 -0
- package/appUtils/focusManager/index.ts +25 -16
- package/appUtils/focusManagerAux/utils/index.ts +18 -2
- package/configurationUtils/__tests__/manifestKeyParser.test.ts +0 -1
- package/navigationUtils/index.ts +1 -1
- package/package.json +2 -2
- package/reactHooks/cell-click/__tests__/index.test.js +3 -0
- package/reactHooks/cell-click/index.ts +8 -1
- package/reactHooks/debugging/__tests__/index.test.js +0 -1
- package/reactHooks/feed/__tests__/useBatchLoading.test.tsx +8 -2
- package/reactHooks/feed/__tests__/useFeedLoader.test.tsx +71 -31
- package/reactHooks/feed/index.ts +2 -0
- package/reactHooks/feed/useBatchLoading.ts +14 -9
- package/reactHooks/feed/useFeedLoader.tsx +36 -38
- package/reactHooks/feed/useLoadPipesDataDispatch.ts +63 -0
- package/reactHooks/navigation/useRoute.ts +7 -2
- package/reactHooks/navigation/useScreenStateStore.ts +8 -0
- package/reactHooks/state/index.ts +1 -7
- package/reactHooks/state/useHomeRiver.ts +0 -31
- package/screenPickerUtils/index.ts +3 -6
- package/storage/ScreenSingleValueProvider.ts +204 -0
- package/storage/ScreenStateMultiSelectProvider.ts +293 -0
- package/storage/StorageMultiSelectProvider.ts +192 -0
- package/storage/StorageSingleSelectProvider.ts +108 -0
- package/zappFrameworkUtils/HookCallback/callbackNavigationAction.ts +72 -0
- package/zappFrameworkUtils/HookCallback/hookCallbackManifestExtensions.config.ts +59 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
export enum NavigationCallbackOptions {
|
|
3
|
+
DEFAULT = "default",
|
|
4
|
+
GO_HOME = "go_home",
|
|
5
|
+
GO_BACK = "go_back",
|
|
6
|
+
GO_TO_SCREEN = "go_to_screen",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CALLBACK_NAVIGATION_KEY = "hook_callback_navigation";
|
|
10
|
+
|
|
11
|
+
export const CALLBACK_NAVIGATION_GO_TO_SCREEN_KEY = "hook_callback_navigation";
|
|
12
|
+
|
|
13
|
+
export const extendManifestWithHookCallback = () => (
|
|
14
|
+
{
|
|
15
|
+
group: true,
|
|
16
|
+
label: "CallBack Navigation",
|
|
17
|
+
folded: true,
|
|
18
|
+
fields: [
|
|
19
|
+
{
|
|
20
|
+
type: "select",
|
|
21
|
+
key: CALLBACK_NAVIGATION_KEY,
|
|
22
|
+
label: "Callback Navigation",
|
|
23
|
+
label_tooltip:
|
|
24
|
+
"Defines what navigation action should be performed after the callback is called.",
|
|
25
|
+
options: [
|
|
26
|
+
{
|
|
27
|
+
text: "Use default flow",
|
|
28
|
+
value: NavigationCallbackOptions.DEFAULT,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
text: "Go Back to home screen",
|
|
32
|
+
value: NavigationCallbackOptions.GO_HOME,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
text: "Go Back to previous screen",
|
|
36
|
+
value: NavigationCallbackOptions.GO_BACK,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
text: "Move to specific screen",
|
|
40
|
+
value: NavigationCallbackOptions.GO_TO_SCREEN,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
initial_value: "default",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "screen_selector",
|
|
47
|
+
key: CALLBACK_NAVIGATION_GO_TO_SCREEN_KEY,
|
|
48
|
+
label: "Navigate to screen",
|
|
49
|
+
label_tooltip: "Screen you wish to navigate to after success purchase",
|
|
50
|
+
rules: "conditional",
|
|
51
|
+
conditional_fields: [
|
|
52
|
+
{
|
|
53
|
+
key: `general/${CALLBACK_NAVIGATION_KEY}`,
|
|
54
|
+
condition_value: NavigationCallbackOptions.GO_TO_SCREEN,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
}]
|
|
58
|
+
}
|
|
59
|
+
);
|