@applicaster/zapp-react-native-utils 16.0.0-alpha.6593152532 → 16.0.0-alpha.7050631823
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 +27 -5
- package/analyticsUtils/AnalyticsEvents/sendMenuClickEvent.ts +2 -2
- package/analyticsUtils/PlayerAnalyticsManager.ts +11 -1
- package/analyticsUtils/__tests__/analyticsMapper.test.ts +35 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testACP_events.json +1 -1
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testBlockUnlistedParams_rules.json +1 -1
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEmptyRenameKeepsName_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEmptyRenameKeepsName_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testEventRegex_events.json +3 -9
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testIgnoreOrdering_events.json +18 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testIgnoreOrdering_rules.json +16 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexEventNoFallback_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexEventNoFallback_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexMultiGroupRename_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexMultiGroupRename_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexNonNamedFullMatch_events.json +4 -0
- package/analyticsUtils/__tests__/fixtures/analytics_mapper_testRegexNonNamedFullMatch_rules.json +6 -0
- package/analyticsUtils/__tests__/fixtures/index.js +20 -0
- package/analyticsUtils/analyticsMapper.ts +4 -1
- package/analyticsUtils/playerAnalyticsTracker.ts +26 -3
- package/appUtils/HooksManager/index.ts +3 -8
- package/appUtils/contextKeysManager/utils/index.ts +38 -25
- package/appUtils/playerManager/__tests__/playerFactory.test.ts +150 -0
- package/appUtils/playerManager/playerFactory.ts +17 -34
- package/cellUtils/index.ts +3 -5
- package/colorUtils/__tests__/isTransparentColor.test.ts +76 -0
- package/colorUtils/__tests__/isValidColor.test.ts +70 -0
- package/colorUtils/index.ts +50 -0
- package/manifestUtils/_internals/index.js +6 -0
- package/manifestUtils/defaultManifestConfigurations/generalContent.js +35 -0
- package/manifestUtils/fieldUtils/__tests__/fieldUtils.test.js +84 -0
- package/manifestUtils/fieldUtils/index.js +125 -0
- package/manifestUtils/keys.js +1 -0
- package/manifestUtils/platformIsTV.js +1 -0
- package/package.json +2 -2
- package/pipesUtils/__tests__/buildUrlWithQuery.test.ts +33 -0
- package/pipesUtils/__tests__/withPipesEndpoint.test.tsx +56 -0
- package/pipesUtils/index.ts +1 -0
- package/pipesUtils/withPipesEndpoint.tsx +54 -0
- package/playerUtils/index.ts +24 -2
- package/reactHooks/cell-click/index.ts +15 -7
- package/reactHooks/feed/__mocks__/useMarkPipesDataStale.ts +4 -0
- package/reactHooks/feed/index.ts +5 -1
- package/reactHooks/feed/useBatchLoading.ts +9 -1
- package/reactHooks/feed/useInflatedUrl.ts +6 -6
- package/reactHooks/feed/{usePipesCacheReset.ts → useMarkPipesDataStale.ts} +12 -4
- package/reactHooks/screen/__tests__/useIsStandaloneFullscreen.test.ts +114 -0
- package/reactHooks/screen/index.ts +2 -0
- package/reactHooks/screen/useIsStandaloneFullscreen.ts +12 -0
- package/reactHooks/utils/index.ts +3 -2
- package/reactHooks/videoModal/hooks/useVideoModalScreenData.tsx +22 -4
- package/riverComponetsMeasurementProvider/index.tsx +12 -8
- package/zappFrameworkUtils/HookCallback/callbackNavigationAction.ts +1 -1
- package/reactHooks/feed/__mocks__/usePipesCacheReset.ts +0 -1
|
@@ -2,6 +2,12 @@ import React from "react";
|
|
|
2
2
|
import { useContentTypes } from "@applicaster/zapp-react-native-redux/hooks";
|
|
3
3
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
4
4
|
import { useRivers } from "../../state";
|
|
5
|
+
import { createLogger } from "../../../logger";
|
|
6
|
+
|
|
7
|
+
const { log_warning } = createLogger({
|
|
8
|
+
subsystem: "zapp-react-native-utils/reactHooks/videoModal",
|
|
9
|
+
category: "useVideoModalScreenData",
|
|
10
|
+
});
|
|
5
11
|
|
|
6
12
|
export const useVideoModalScreenData = ():
|
|
7
13
|
| (ZappEntry & { targetScreen: any }) // TODO: fix ZappEntry type ( was ZappRiver but conflict )
|
|
@@ -14,10 +20,22 @@ export const useVideoModalScreenData = ():
|
|
|
14
20
|
const rivers = useRivers();
|
|
15
21
|
|
|
16
22
|
return React.useMemo(() => {
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
const itemType = item?.type?.value;
|
|
24
|
+
|
|
25
|
+
if (!itemType) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
19
28
|
|
|
20
|
-
|
|
29
|
+
const screenId = contentTypes[itemType]?.screen_id;
|
|
30
|
+
|
|
31
|
+
if (!screenId) {
|
|
32
|
+
log_warning(
|
|
33
|
+
`Type mapping is missing for item type: ${itemType}, title: ${item.title}`
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return;
|
|
21
37
|
}
|
|
22
|
-
|
|
38
|
+
|
|
39
|
+
return { ...item, targetScreen: rivers?.[screenId] };
|
|
40
|
+
}, [contentTypes, item, rivers]);
|
|
23
41
|
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { NativeModules,
|
|
2
|
+
import { NativeModules, View, StyleSheet } from "react-native";
|
|
3
3
|
import { getXray } from "@applicaster/zapp-react-native-utils/logger";
|
|
4
4
|
|
|
5
|
-
import { isApplePlatform, isWeb } from "../reactUtils";
|
|
5
|
+
import { isApplePlatform, isWeb, isTV } from "../reactUtils";
|
|
6
6
|
import { useRivers } from "../reactHooks";
|
|
7
7
|
|
|
8
|
+
const isTVPlatform = isTV();
|
|
9
|
+
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
container: isTVPlatform
|
|
12
|
+
? {
|
|
13
|
+
flex: 1,
|
|
14
|
+
}
|
|
15
|
+
: {},
|
|
16
|
+
});
|
|
17
|
+
|
|
8
18
|
const layoutReducer = (state, { payload }) => {
|
|
9
19
|
return state.map((item, index, _state) => ({
|
|
10
20
|
height: index === payload.index ? payload.height : item.height,
|
|
@@ -30,12 +40,6 @@ type MeasurementContext = {
|
|
|
30
40
|
onLayout: (index: number) => (event) => void;
|
|
31
41
|
};
|
|
32
42
|
|
|
33
|
-
const styles = StyleSheet.create({
|
|
34
|
-
container: {
|
|
35
|
-
flex: 1,
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
43
|
const { Logger } = getXray();
|
|
40
44
|
|
|
41
45
|
const logger = new Logger("general", "ui");
|
|
@@ -197,7 +197,7 @@ export const useCallbackNavigationAction = (
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
hookCallback?.({ ...args, success: false,
|
|
200
|
+
hookCallback?.({ ...args, success: false, abort: true });
|
|
201
201
|
const currentNavigation = navigationRef.current;
|
|
202
202
|
|
|
203
203
|
switch (data.action) {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const usePipesCacheReset = jest.fn();
|