@applicaster/zapp-react-native-ui-components 15.0.0-rc.98 → 15.1.0-alpha.1852552014
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/Components/BackgroundImage/BackgroundImage.tv.android.tsx +28 -0
- package/Components/BackgroundImage/BackgroundImage.tv.ios.tsx +24 -0
- package/Components/BackgroundImage/BackgroundImage.tv.web.tsx +42 -0
- package/Components/BackgroundImage/index.ts +8 -0
- package/Components/BaseFocusable/index.ios.ts +2 -12
- package/Components/Cell/FocusableWrapper.tsx +0 -3
- package/Components/Cell/TvOSCellComponent.tsx +0 -5
- package/Components/CellRendererResolver/index.ts +1 -1
- package/Components/ComponentResolver/__tests__/componentResolver.test.js +1 -1
- package/Components/Focusable/Focusable.tsx +2 -4
- package/Components/Focusable/FocusableTvOS.tsx +1 -18
- package/Components/Focusable/__tests__/__snapshots__/FocusableTvOS.test.tsx.snap +0 -1
- package/Components/FocusableGroup/FocusableTvOS.tsx +12 -37
- package/Components/GeneralContentScreen/GeneralContentScreen.tsx +39 -28
- package/Components/GeneralContentScreen/__tests__/GeneralContentScreen.test.tsx +104 -0
- package/Components/GeneralContentScreen/utils/__tests__/getScreenDataSource.test.ts +19 -0
- package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +1 -1
- package/Components/GeneralContentScreen/utils/getScreenDataSource.ts +9 -0
- package/Components/HandlePlayable/HandlePlayable.tsx +24 -42
- package/Components/HandlePlayable/utils.ts +31 -0
- package/Components/HookRenderer/HookRenderer.tsx +40 -10
- package/Components/HookRenderer/__tests__/HookRenderer.test.tsx +60 -0
- package/Components/Layout/FullWidthRow.tsx +38 -0
- package/Components/Layout/TV/ScreenContainer.tsx +11 -2
- package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +5 -1
- package/Components/Layout/TV/index.tsx +6 -6
- package/Components/Layout/TV/index.web.tsx +6 -6
- package/Components/LinkHandler/LinkHandler.tsx +2 -2
- package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +10 -4
- package/Components/MasterCell/DefaultComponents/Image/Image.android.tsx +1 -5
- package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +3 -11
- package/Components/MasterCell/DefaultComponents/Image/Image.web.tsx +1 -9
- package/Components/MasterCell/DefaultComponents/Image/hooks/useImage.ts +14 -15
- package/Components/MasterCell/DefaultComponents/LiveImage/__tests__/prepareEntry.test.ts +352 -0
- package/Components/MasterCell/DefaultComponents/LiveImage/executePreloadHooks.ts +136 -0
- package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +34 -16
- package/Components/MasterCell/DefaultComponents/SecondaryImage/hooks/__tests__/useGetImageDimensions.test.ts +6 -7
- package/Components/MasterCell/DefaultComponents/Text/index.tsx +2 -6
- package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/index.ts +2 -6
- package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/utils/__tests__/getPluginIdentifier.test.ts +11 -233
- package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/utils/index.ts +15 -19
- package/Components/MasterCell/dataAdapter.ts +15 -5
- package/Components/MasterCell/index.tsx +10 -1
- package/Components/MasterCell/utils/__tests__/resolveColor.test.js +169 -132
- package/Components/MasterCell/utils/__tests__/resolveColorForProp.test.js +92 -0
- package/Components/MasterCell/utils/index.ts +89 -46
- package/Components/Navigator/StackNavigator.tsx +6 -0
- package/Components/OfflineHandler/NotificationView/NotificationView.tsx +2 -2
- package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +18 -17
- package/Components/OfflineHandler/__tests__/index.test.tsx +18 -27
- package/Components/PlayerContainer/PlayerContainer.tsx +20 -34
- package/Components/PlayerContainer/__tests__/PlayerContainer.test.tsx +286 -0
- package/Components/PreloaderWrapper/__tests__/index.test.tsx +26 -0
- package/Components/PreloaderWrapper/index.tsx +15 -0
- package/Components/River/ComponentsMap/ComponentsMap.tsx +15 -0
- package/Components/River/ComponentsMap/hooks/__tests__/useLoadingState.test.ts +1 -1
- package/Components/River/RefreshControl.tsx +9 -3
- package/Components/River/RiverItem.tsx +26 -20
- package/Components/River/TV/River.tsx +14 -31
- package/Components/River/TV/index.tsx +4 -8
- package/Components/River/TV/withTVEventHandler.tsx +36 -0
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +1 -15
- package/Components/Screen/TV/hooks/__tests__/useAfterPaint.test.ts +60 -0
- package/Components/Screen/TV/hooks/index.ts +2 -0
- package/Components/Screen/TV/hooks/useAfterPaint.ts +23 -0
- package/Components/Screen/TV/index.web.tsx +18 -11
- package/Components/Screen/__tests__/Screen.test.tsx +43 -65
- package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +44 -68
- package/Components/Screen/hooks.ts +76 -5
- package/Components/Screen/index.tsx +18 -7
- package/Components/Screen/orientationHandler.ts +3 -3
- package/Components/ScreenFeedLoader/ScreenFeedLoader.tsx +46 -0
- package/Components/ScreenFeedLoader/__tests__/ScreenFeedLoader.test.tsx +94 -0
- package/Components/ScreenFeedLoader/index.ts +1 -0
- package/Components/ScreenResolver/__tests__/screenResolver.test.js +24 -0
- package/Components/ScreenResolver/hooks/index.ts +3 -0
- package/Components/ScreenResolver/hooks/useGetComponent.ts +15 -0
- package/Components/ScreenResolver/hooks/useScreenComponentResolver.tsx +90 -0
- package/Components/ScreenResolver/index.tsx +9 -115
- package/Components/ScreenResolver/utils/__tests__/getScreenTypeProps.test.ts +45 -0
- package/Components/ScreenResolver/utils/getScreenTypeProps.ts +43 -0
- package/Components/ScreenResolver/utils/index.ts +1 -0
- package/Components/ScreenResolver/withDefaultScreenContext.tsx +16 -0
- package/Components/ScreenResolverFeedProvider/ScreenResolverFeedProvider.tsx +25 -0
- package/Components/ScreenResolverFeedProvider/__tests__/ScreenResolverFeedProvider.test.tsx +44 -0
- package/Components/ScreenResolverFeedProvider/index.ts +1 -0
- package/Components/ScreenRevealManager/Overlay.tsx +34 -0
- package/Components/ScreenRevealManager/ScreenRevealManager.ts +8 -40
- package/Components/ScreenRevealManager/__tests__/Overlay.test.tsx +88 -0
- package/Components/ScreenRevealManager/__tests__/ScreenRevealManager.test.ts +69 -86
- package/Components/ScreenRevealManager/withScreenRevealManager.tsx +10 -18
- package/Components/Tabs/TabContent.tsx +4 -7
- package/Components/Transitioner/Scene.tsx +9 -15
- package/Components/Transitioner/index.js +3 -3
- package/Components/VideoLive/LiveImageManager.ts +209 -53
- package/Components/VideoLive/PlayerLiveImageComponent.tsx +32 -32
- package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +2 -17
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +5 -5
- package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +7 -15
- package/Components/VideoModal/utils.ts +16 -13
- package/Components/Viewport/ViewportEvents/__tests__/viewportEvents.test.js +1 -1
- package/Components/ZappFrameworkComponents/BarView/BarView.tsx +12 -5
- package/Components/ZappFrameworkComponents/BarView/__tests__/BarView.test.tsx +2 -2
- package/Components/ZappUIComponent/index.tsx +12 -6
- package/Components/index.js +1 -1
- package/Contexts/CachedDimensionsContext/index.ts +17 -2
- package/Contexts/ScreenContext/__tests__/index.test.tsx +57 -0
- package/Contexts/ScreenContext/index.tsx +64 -26
- package/Contexts/ScreenTrackedViewPositionsContext/__tests__/index.test.tsx +1 -1
- package/Contexts/ZappPipesContext/ZappPipesContextFactory.tsx +18 -7
- package/Decorators/Analytics/index.tsx +5 -6
- package/Decorators/ConfigurationWrapper/__tests__/__snapshots__/withConfigurationProvider.test.tsx.snap +0 -1
- package/Decorators/ConfigurationWrapper/const.ts +0 -1
- package/Decorators/ZappPipesDataConnector/ResolverSelector.tsx +25 -7
- package/Decorators/ZappPipesDataConnector/__tests__/ResolverSelector.test.tsx +212 -5
- package/Decorators/ZappPipesDataConnector/__tests__/zappPipesDataConnector.test.js +1 -1
- package/Decorators/ZappPipesDataConnector/index.tsx +2 -2
- package/Decorators/ZappPipesDataConnector/resolvers/StaticFeedResolver.tsx +1 -1
- package/Helpers/ComponentCellSelectionHelper/index.js +0 -6
- package/Helpers/DataSourceHelper/index.js +19 -0
- package/Helpers/index.js +7 -40
- package/events/index.ts +2 -0
- package/events/scrollEndReached.ts +15 -0
- package/package.json +5 -5
- package/Components/Layout/TV/LayoutBackground.tsx +0 -31
- package/Components/MasterCell/DefaultComponents/Text/utils/__tests__/withAdjustedLineHeight.test.ts +0 -46
- package/Components/MasterCell/DefaultComponents/Text/utils/index.ts +0 -21
- package/Components/PlayerContainer/ErrorDisplay/ErrorDisplay.tsx +0 -57
- package/Components/PlayerContainer/ErrorDisplay/index.ts +0 -9
- package/Components/PlayerContainer/useRestrictMobilePlayback.tsx +0 -101
- package/Components/River/TV/utils/__tests__/toStringOrEmpty.test.ts +0 -30
- package/Components/River/TV/utils/index.ts +0 -4
- package/Components/River/TV/withFocusableGroupForContent.tsx +0 -71
- package/Components/Screen/utils.ts +0 -16
- package/Helpers/Analytics/index.js +0 -95
- package/Helpers/DataSourceHelper/__tests__/itemLimitForData.test.ts +0 -80
- package/Helpers/DataSourceHelper/index.ts +0 -19
- /package/Components/HookRenderer/{index.tsx → index.ts} +0 -0
|
@@ -2,123 +2,106 @@ import {
|
|
|
2
2
|
ScreenRevealManager,
|
|
3
3
|
COMPONENT_LOADING_STATE,
|
|
4
4
|
} from "../ScreenRevealManager";
|
|
5
|
-
import { Subject } from "rxjs";
|
|
6
|
-
|
|
7
|
-
jest.mock("@applicaster/zapp-react-native-utils/arrayUtils", () => ({
|
|
8
|
-
makeListOf: jest.fn((value: any, length: number) =>
|
|
9
|
-
Array(length).fill(value)
|
|
10
|
-
),
|
|
11
|
-
}));
|
|
12
|
-
|
|
13
|
-
jest.mock("@applicaster/zapp-react-native-utils/componentsUtils", () => ({
|
|
14
|
-
isFirstComponentGallery: jest.fn(),
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
|
-
jest.mock("@applicaster/zapp-react-native-utils/idleUtils", () => ({
|
|
18
|
-
withTimeout$: jest.fn(),
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
import { makeListOf } from "@applicaster/zapp-react-native-utils/arrayUtils";
|
|
22
|
-
import { isFirstComponentGallery } from "@applicaster/zapp-react-native-utils/componentsUtils";
|
|
23
|
-
import { withTimeout$ } from "@applicaster/zapp-react-native-utils/idleUtils";
|
|
24
5
|
|
|
25
6
|
describe("ScreenRevealManager", () => {
|
|
26
|
-
|
|
27
|
-
let timeout$: Subject<void>;
|
|
7
|
+
const mockCallback = jest.fn();
|
|
28
8
|
|
|
29
9
|
beforeEach(() => {
|
|
30
|
-
jest.
|
|
31
|
-
mockCallback = jest.fn();
|
|
32
|
-
timeout$ = new Subject();
|
|
33
|
-
|
|
34
|
-
(withTimeout$ as jest.Mock).mockReturnValue(timeout$);
|
|
35
|
-
(isFirstComponentGallery as jest.Mock).mockReturnValue(false);
|
|
36
|
-
|
|
37
|
-
(makeListOf as jest.Mock).mockImplementation((value, length) =>
|
|
38
|
-
Array(length).fill(value)
|
|
39
|
-
);
|
|
10
|
+
jest.clearAllMocks();
|
|
40
11
|
});
|
|
41
12
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// ────────────────────────────────────────────────
|
|
49
|
-
it("should initialize with correct number of components and UNKNOWN state", () => {
|
|
50
|
-
const components = new Array(5).fill({});
|
|
51
|
-
const mgr = new ScreenRevealManager(components, mockCallback);
|
|
13
|
+
it("should initialize with the correct number of components to wait for", () => {
|
|
14
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
15
|
+
{ component_type: "component1" },
|
|
16
|
+
{ component_type: "component2" },
|
|
17
|
+
{ component_type: "component3" },
|
|
18
|
+
];
|
|
52
19
|
|
|
53
|
-
|
|
54
|
-
expect(makeListOf).toHaveBeenCalledWith(COMPONENT_LOADING_STATE.UNKNOWN, 3);
|
|
55
|
-
});
|
|
20
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
56
21
|
|
|
57
|
-
|
|
58
|
-
it("should set numberOfComponentsWaitToLoadBeforePresent to 1 if first component is gallery", () => {
|
|
59
|
-
(isFirstComponentGallery as jest.Mock).mockReturnValue(true);
|
|
22
|
+
expect(manager.numberOfComponentsWaitToLoadBeforePresent).toBe(3);
|
|
60
23
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
24
|
+
expect(manager.renderingState).toEqual([
|
|
25
|
+
COMPONENT_LOADING_STATE.UNKNOWN,
|
|
26
|
+
COMPONENT_LOADING_STATE.UNKNOWN,
|
|
27
|
+
COMPONENT_LOADING_STATE.UNKNOWN,
|
|
28
|
+
]);
|
|
65
29
|
});
|
|
66
30
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
31
|
+
it("should call the callback when the required number of components are loaded successfully", () => {
|
|
32
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
33
|
+
{ component_type: "component1" },
|
|
34
|
+
{ component_type: "component2" },
|
|
35
|
+
{ component_type: "component3" },
|
|
36
|
+
];
|
|
71
37
|
|
|
72
|
-
|
|
73
|
-
expect(mockCallback).not.toHaveBeenCalled();
|
|
38
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
74
39
|
|
|
75
|
-
|
|
76
|
-
|
|
40
|
+
manager.onLoadFinished(0);
|
|
41
|
+
manager.onLoadFinished(1);
|
|
42
|
+
manager.onLoadFinished(2);
|
|
77
43
|
|
|
78
|
-
mgr.onLoadFinished(2);
|
|
79
44
|
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
80
45
|
});
|
|
81
46
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
47
|
+
it("should call the callback when the required number of components fail to load", () => {
|
|
48
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
49
|
+
{ component_type: "component1" },
|
|
50
|
+
{ component_type: "component2" },
|
|
51
|
+
{ component_type: "component3" },
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
86
55
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
manager.onLoadFailed(0);
|
|
57
|
+
manager.onLoadFailed(1);
|
|
58
|
+
manager.onLoadFailed(2);
|
|
90
59
|
|
|
91
60
|
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
92
61
|
});
|
|
93
62
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
63
|
+
it("should call the callback when a mix of successful and failed loads meet the required number", () => {
|
|
64
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
65
|
+
{ component_type: "component1" },
|
|
66
|
+
{ component_type: "component2" },
|
|
67
|
+
{ component_type: "component3" },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
98
71
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
mgr.onLoadFinished(2);
|
|
72
|
+
manager.onLoadFinished(0);
|
|
73
|
+
manager.onLoadFailed(1);
|
|
74
|
+
manager.onLoadFinished(2);
|
|
103
75
|
|
|
104
76
|
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
105
77
|
});
|
|
106
78
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
79
|
+
it("should not call the callback if the required number of components are not loaded", () => {
|
|
80
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
81
|
+
{ component_type: "component1" },
|
|
82
|
+
{ component_type: "component2" },
|
|
83
|
+
{ component_type: "component3" },
|
|
84
|
+
];
|
|
111
85
|
|
|
112
|
-
|
|
86
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
113
87
|
|
|
114
|
-
|
|
88
|
+
manager.onLoadFinished(0);
|
|
89
|
+
manager.onLoadFailed(1);
|
|
90
|
+
|
|
91
|
+
expect(mockCallback).not.toHaveBeenCalled();
|
|
115
92
|
});
|
|
116
93
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
94
|
+
it("should call the callback when the when first component is gallery and it was loaded successfully", () => {
|
|
95
|
+
const componentsToRender: ZappUIComponent[] = [
|
|
96
|
+
{ component_type: "gallery-qb" },
|
|
97
|
+
{ component_type: "component2" },
|
|
98
|
+
{ component_type: "component3" },
|
|
99
|
+
];
|
|
121
100
|
|
|
122
|
-
|
|
101
|
+
const manager = new ScreenRevealManager(componentsToRender, mockCallback);
|
|
102
|
+
|
|
103
|
+
manager.onLoadFinished(0);
|
|
104
|
+
|
|
105
|
+
expect(mockCallback).toHaveBeenCalledTimes(1);
|
|
123
106
|
});
|
|
124
107
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { Animated
|
|
2
|
+
import { Animated } from "react-native";
|
|
3
|
+
|
|
3
4
|
import { isFirstComponentScreenPicker } from "@applicaster/zapp-react-native-utils/componentsUtils";
|
|
4
5
|
import { useRefWithInitialValue } from "@applicaster/zapp-react-native-utils/reactHooks/state/useRefWithInitialValue";
|
|
5
6
|
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
7
|
+
import { Overlay } from "./Overlay";
|
|
6
8
|
|
|
7
9
|
import { ScreenRevealManager } from "./ScreenRevealManager";
|
|
8
10
|
import {
|
|
@@ -10,13 +12,6 @@ import {
|
|
|
10
12
|
emitScreenRevealManagerIsNotReadyToShow,
|
|
11
13
|
} from "./utils";
|
|
12
14
|
|
|
13
|
-
const styles = StyleSheet.create({
|
|
14
|
-
container: {
|
|
15
|
-
...StyleSheet.absoluteFillObject,
|
|
16
|
-
position: "absolute",
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
15
|
export const TIMEOUT = 300; // 300 ms
|
|
21
16
|
|
|
22
17
|
const HIDDEN = 0; // opacity = 0
|
|
@@ -25,6 +20,7 @@ export const SHOWN = 1; // opacity = 1
|
|
|
25
20
|
|
|
26
21
|
type Props = {
|
|
27
22
|
componentsToRender: ZappUIComponent[];
|
|
23
|
+
backgroundColor?: string;
|
|
28
24
|
};
|
|
29
25
|
|
|
30
26
|
export const withScreenRevealManager = (Component) => {
|
|
@@ -76,7 +72,7 @@ export const withScreenRevealManager = (Component) => {
|
|
|
76
72
|
|
|
77
73
|
if (isFirstComponentScreenPicker(componentsToRender)) {
|
|
78
74
|
// for screen-picker with have additional internal ComponentsMap, no need to add this wrapper
|
|
79
|
-
return <Component {...props} />;
|
|
75
|
+
return <Component {...props} initialNumberToLoad={1} />;
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
return (
|
|
@@ -92,15 +88,11 @@ export const withScreenRevealManager = (Component) => {
|
|
|
92
88
|
onLoadFailedFromScreenRevealManager={managerRef.current.onLoadFailed}
|
|
93
89
|
/>
|
|
94
90
|
{isShowOverlay ? (
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
backgroundColor: theme.app_background_color,
|
|
101
|
-
},
|
|
102
|
-
]}
|
|
103
|
-
testID="animated-component"
|
|
91
|
+
<Overlay
|
|
92
|
+
opacity={opacityRef.current}
|
|
93
|
+
backgroundColor={
|
|
94
|
+
props.backgroundColor ?? theme.app_background_color
|
|
95
|
+
}
|
|
104
96
|
/>
|
|
105
97
|
) : null}
|
|
106
98
|
</>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { View,
|
|
2
|
+
import { View, ViewStyle } from "react-native";
|
|
3
3
|
|
|
4
4
|
import { River } from "@applicaster/zapp-react-native-ui-components/Components";
|
|
5
5
|
import { withNestedNavigationContextProvider } from "@applicaster/zapp-react-native-ui-components/Contexts/NestedNavigationContext";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
+
styles: Record<string, ViewStyle>;
|
|
8
9
|
minHeight: number;
|
|
9
10
|
changingTab: boolean;
|
|
10
11
|
feedUrl: string;
|
|
@@ -13,14 +14,9 @@ type Props = {
|
|
|
13
14
|
backgroundColor: string;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
const styles = StyleSheet.create({
|
|
17
|
-
riverWrapper: {
|
|
18
|
-
flex: 1,
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
17
|
function TabContentComponent(props: Props) {
|
|
23
18
|
const {
|
|
19
|
+
styles,
|
|
24
20
|
minHeight,
|
|
25
21
|
backgroundColor,
|
|
26
22
|
changingTab,
|
|
@@ -33,6 +29,7 @@ function TabContentComponent(props: Props) {
|
|
|
33
29
|
<View
|
|
34
30
|
style={[
|
|
35
31
|
styles.riverWrapper,
|
|
32
|
+
|
|
36
33
|
{
|
|
37
34
|
backgroundColor,
|
|
38
35
|
minHeight,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { equals } from "ramda";
|
|
3
3
|
import { Animated, ViewProps, ViewStyle } from "react-native";
|
|
4
|
-
import { useSafeAreaFrame } from "react-native-safe-area-context";
|
|
5
4
|
|
|
6
5
|
import { useScreenOrientationHandler } from "@applicaster/zapp-react-native-ui-components/Components/Screen/orientationHandler";
|
|
6
|
+
import { useMemoizedSafeAreaFrameWithActiveState } from "@applicaster/zapp-react-native-ui-components/Components/Screen/hooks";
|
|
7
7
|
|
|
8
8
|
import { PathnameContext } from "../../Contexts/PathnameContext";
|
|
9
9
|
import { ScreenDataContext } from "../../Contexts/ScreenDataContext";
|
|
@@ -94,19 +94,13 @@ function SceneComponent({
|
|
|
94
94
|
isActive,
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
oldFrame.width === frame.width && oldFrame.height === frame.height
|
|
105
|
-
? oldFrame
|
|
106
|
-
: frame
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
}, [isActive, frame.width, frame.height]);
|
|
97
|
+
// Use shared memoized frame hook - synchronized with useWaitForValidOrientation
|
|
98
|
+
// to prevent race conditions during orientation changes
|
|
99
|
+
// Pass isActive from props since Scene knows its active state from Transitioner
|
|
100
|
+
const memoFrame = useMemoizedSafeAreaFrameWithActiveState({
|
|
101
|
+
updateForInactiveScreens: false,
|
|
102
|
+
isActive,
|
|
103
|
+
});
|
|
110
104
|
|
|
111
105
|
const isAnimating = animating && overlayStyle;
|
|
112
106
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
3
3
|
import { useDimensions } from "@applicaster/zapp-react-native-utils/reactHooks/layout";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
|
|
6
5
|
import { TransitionerComponent } from "./Transitioner";
|
|
7
6
|
|
|
8
7
|
export const Transitioner = (props) => {
|
|
@@ -17,7 +16,8 @@ export const Transitioner = (props) => {
|
|
|
17
16
|
deviceInfo: true,
|
|
18
17
|
});
|
|
19
18
|
|
|
20
|
-
const {
|
|
19
|
+
const { appData } = usePickFromState(["appData"]);
|
|
20
|
+
const isTabletPortrait = appData?.isTabletPortrait;
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<TransitionerComponent
|