@applicaster/zapp-react-native-ui-components 12.0.5 → 13.0.0-alpha.1035032144
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/AppContainer/__tests__/__snapshots__/AppContainer.test.js.snap +1 -1
- package/Components/AudioPlayer/__tests__/__snapshots__/Runtime.test.js.snap +4 -4
- package/Components/AudioPlayer/__tests__/__snapshots__/artWork.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayer.test.js.snap +6 -6
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +7 -7
- package/Components/AudioPlayer/__tests__/__snapshots__/channel.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/summary.test.js.snap +2 -2
- package/Components/AudioPlayer/__tests__/__snapshots__/title.test.js.snap +2 -2
- package/Components/Cell/Cell.tsx +4 -8
- package/Components/Cell/CellWithFocusable.tsx +60 -44
- package/Components/Cell/TvOSCellComponent.tsx +3 -8
- package/Components/Cell/__tests__/CellWIthFocusable.test.js +6 -13
- package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +20 -20
- package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +5 -3
- package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +5 -5
- package/Components/ComponentResolver/__tests__/componentResolver.test.js +11 -9
- package/Components/DisplayState/__tests__/__snapshots__/displayState.test.js.snap +2 -2
- package/Components/Focusable/FocusableTvOS.tsx +1 -1
- package/Components/FocusableList/index.tsx +0 -1
- package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +9 -0
- package/Components/GeneralContentScreen/utils/useCurationAPI.ts +1 -1
- package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +1 -0
- package/Components/Layout/TV/__tests__/__snapshots__/LayoutContainer.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -3
- package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +9 -9
- package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/index.test.tsx +7 -3
- package/Components/MasterCell/DefaultComponents/BorderContainerView/__tests__/index.test.tsx +66 -0
- package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +4 -1
- package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +5 -11
- package/Components/MasterCell/DefaultComponents/ImageBorderContainer/__tests__/index.test.ts +93 -0
- package/Components/MasterCell/DefaultComponents/SecondaryImage/__tests__/__snapshots__/Image.test.tsx.snap +3 -3
- package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +1 -1
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/MasterCell/__tests__/__snapshots__/dataAdapter.test.js.snap +180 -180
- package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +7 -7
- package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +34 -34
- package/Components/MasterCell/hooks/useAsyncRendering/MasterCellAsyncRenderManager.ts +2 -2
- package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
- package/Components/NativeFocusables/{index.js → index.ts} +4 -2
- package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +7 -7
- package/Components/OfflineHandler/__tests__/index.test.tsx +28 -25
- package/Components/PlayerContainer/PlayerContainer.tsx +5 -11
- package/Components/River/ComponentsMap/ComponentsMap.tsx +39 -65
- package/Components/River/ComponentsMap/hooks/useLoadingState.ts +78 -51
- package/Components/River/RefreshControl.tsx +1 -1
- package/Components/River/RiverFooter.tsx +39 -9
- package/Components/River/RiverItem.tsx +37 -2
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +114 -45
- package/Components/River/__tests__/__snapshots__/river.test.js.snap +12 -12
- package/Components/River/__tests__/componentsMap.test.js +64 -17
- package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +1 -1
- package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +1 -1
- package/Components/Screen/__tests__/Screen.test.tsx +41 -27
- package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -4
- package/Components/Screen/hooks.ts +56 -0
- package/Components/Screen/index.tsx +13 -39
- package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +2 -2
- package/Components/ScreenResolver/__tests__/screenResolver.test.js +31 -27
- package/Components/Tabs/Tab.tsx +1 -0
- package/Components/TextInputTv/__tests__/TextInputTv.test.js +42 -42
- package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +7 -0
- package/Components/TextInputTv/index.tsx +2 -2
- package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +2 -2
- package/Components/Transitioner/Scene.tsx +52 -23
- package/Components/Transitioner/__tests__/__snapshots__/AnimationManager.test.js.snap +26 -26
- package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +62 -46
- package/Components/Transitioner/__tests__/__snapshots__/config.test.js.snap +20 -20
- package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +4 -4
- package/Components/Transitioner/index.js +8 -4
- package/Components/VideoLive/PlayerLiveImageComponent.tsx +5 -2
- package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +14 -9
- package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +5 -10
- package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +1 -1
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +4 -10
- package/Components/VideoModal/ModalAnimation/index.ts +2 -1
- package/Components/VideoModal/ModalAnimation/useModalAnimationContext.ts +6 -0
- package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -2
- package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +12 -9
- package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +4 -4
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +66 -66
- package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +89 -0
- package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +1 -1
- package/Components/VideoModal/utils.ts +2 -4
- package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +2 -2
- package/Components/Viewport/ViewportTracker/__tests__/__snapshots__/viewportTracker.test.js.snap +1 -1
- package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +11 -11
- package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +30 -30
- package/Contexts/ConfigutaionContext/__tests__/__snapshots__/ConfigurationProvider.test.tsx.snap +1 -1
- package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +2 -2
- package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +77 -77
- package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +34 -39
- package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -9
- package/Decorators/RiverFeedLoader/index.tsx +1 -1
- package/Decorators/RiverFeedLoader/utils/getDatasourceUrl.ts +39 -0
- package/Decorators/RiverFeedLoader/utils/index.ts +29 -0
- package/Decorators/RiverFeedLoader/utils/usePipesContexts.ts +40 -0
- package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +5 -5
- package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +16 -10
- package/Decorators/ZappPipesDataConnector/index.tsx +32 -2
- package/README.md +1 -13
- package/package.json +12 -6
- package/Components/Cell/CellWithFocusable.ios.tsx +0 -126
- package/Decorators/RiverFeedLoader/utils.ts +0 -100
- /package/Decorators/Analytics/{index.js → index.tsx} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useWindowDimensions } from "react-native";
|
|
3
2
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
4
3
|
import { useDimensions } from "@applicaster/zapp-react-native-utils/reactHooks/layout";
|
|
5
4
|
import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
|
|
@@ -7,10 +6,15 @@ import { TransitionerComponent } from "./Transitioner";
|
|
|
7
6
|
|
|
8
7
|
export const Transitioner = (props) => {
|
|
9
8
|
const navigator = useNavigation();
|
|
10
|
-
const { height, width } = useWindowDimensions();
|
|
11
9
|
|
|
12
|
-
const
|
|
13
|
-
|
|
10
|
+
const {
|
|
11
|
+
width,
|
|
12
|
+
height,
|
|
13
|
+
deviceInfo: { isTablet },
|
|
14
|
+
} = useDimensions("window", {
|
|
15
|
+
updateForInactiveScreens: false,
|
|
16
|
+
deviceInfo: true,
|
|
17
|
+
});
|
|
14
18
|
|
|
15
19
|
const { appData } = usePickFromState(["appData"]);
|
|
16
20
|
const isTabletPortrait = appData?.isTabletPortrait;
|
|
@@ -44,7 +44,10 @@ type Props = {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
const PlayerLiveImageComponent = (props: Props) => {
|
|
47
|
-
const dimensions = useDimensions("screen", {
|
|
47
|
+
const dimensions = useDimensions("screen", {
|
|
48
|
+
fullDimensions: true,
|
|
49
|
+
updateForInactiveScreens: false,
|
|
50
|
+
});
|
|
48
51
|
|
|
49
52
|
const { item, style, playerId } = props;
|
|
50
53
|
|
|
@@ -307,7 +310,7 @@ const PlayerLiveImageComponent = (props: Props) => {
|
|
|
307
310
|
LiveImageManager.instance.checkPlayerPosition(liveImageItem);
|
|
308
311
|
}
|
|
309
312
|
},
|
|
310
|
-
[liveImageItem, dimensions]
|
|
313
|
+
[liveImageItem, dimensions.height, dimensions.width]
|
|
311
314
|
);
|
|
312
315
|
|
|
313
316
|
const platformSpecificProps = isApplePlatform()
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/display-name */
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { render
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
4
|
import * as PlayerFactory from "@applicaster/zapp-react-native-utils/appUtils/playerManager/playerFactory";
|
|
5
|
-
import { Player } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/player";
|
|
6
5
|
import { ThemeContext } from "@applicaster/zapp-react-native-utils/theme";
|
|
7
6
|
import * as navigationHooks from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
8
7
|
import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager";
|
|
@@ -13,13 +12,13 @@ import * as useNavigationHooks from "@applicaster/zapp-react-native-utils/reactH
|
|
|
13
12
|
import { Provider } from "react-redux";
|
|
14
13
|
import configureStore from "redux-mock-store";
|
|
15
14
|
|
|
16
|
-
const
|
|
15
|
+
const mock_seekTo = jest.fn();
|
|
17
16
|
|
|
18
17
|
jest.mock(
|
|
19
18
|
"@applicaster/zapp-react-native-utils/appUtils/playerManager/player",
|
|
20
19
|
() => ({
|
|
21
20
|
Player: {
|
|
22
|
-
seekTo,
|
|
21
|
+
seekTo: mock_seekTo,
|
|
23
22
|
},
|
|
24
23
|
})
|
|
25
24
|
);
|
|
@@ -61,10 +60,16 @@ describe("PlayerLiveImageComponent", () => {
|
|
|
61
60
|
};
|
|
62
61
|
|
|
63
62
|
beforeAll(() => {
|
|
64
|
-
jest.spyOn(PlayerFactory, "playerFactory").mockImplementation(() =>
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
jest.spyOn(PlayerFactory, "playerFactory").mockImplementation(() => {
|
|
64
|
+
const Player = jest.requireActual(
|
|
65
|
+
"@applicaster/zapp-react-native-utils/appUtils/playerManager/player"
|
|
66
|
+
).Player;
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
controller: new Player({}),
|
|
70
|
+
Component: () => null,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
68
73
|
|
|
69
74
|
jest.spyOn(navigationHooks, "useIsScreenActive").mockReturnValue(true);
|
|
70
75
|
});
|
|
@@ -136,7 +141,7 @@ describe("PlayerLiveImageComponent", () => {
|
|
|
136
141
|
</Wrapper>
|
|
137
142
|
);
|
|
138
143
|
|
|
139
|
-
|
|
144
|
+
component.unmount();
|
|
140
145
|
|
|
141
146
|
const isPlayerRegistered = playerManager.isPlayerRegistered(
|
|
142
147
|
defaultProps.playerId
|
|
@@ -9,7 +9,7 @@ exports[`PlayerLiveImageComponent should render correctly with default props 1`]
|
|
|
9
9
|
<View
|
|
10
10
|
collapsable={false}
|
|
11
11
|
style={
|
|
12
|
-
|
|
12
|
+
{
|
|
13
13
|
"opacity": 1,
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -19,10 +19,10 @@ exports[`PlayerLiveImageComponent should render correctly with default props 1`]
|
|
|
19
19
|
audioMutedByDefault={false}
|
|
20
20
|
imageKey="image1"
|
|
21
21
|
item={
|
|
22
|
-
|
|
22
|
+
{
|
|
23
23
|
"id": "1",
|
|
24
24
|
"title": "Test",
|
|
25
|
-
"type":
|
|
25
|
+
"type": {
|
|
26
26
|
"value": "",
|
|
27
27
|
},
|
|
28
28
|
}
|
|
@@ -30,13 +30,8 @@ exports[`PlayerLiveImageComponent should render correctly with default props 1`]
|
|
|
30
30
|
onError={[Function]}
|
|
31
31
|
playerId="player1"
|
|
32
32
|
resizeMode="cover"
|
|
33
|
-
screenConfig={
|
|
34
|
-
|
|
35
|
-
Object {
|
|
36
|
-
"uri": "",
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
style={Object {}}
|
|
33
|
+
screenConfig={{}}
|
|
34
|
+
style={{}}
|
|
40
35
|
/>
|
|
41
36
|
</View>
|
|
42
37
|
</View>
|
|
@@ -77,7 +77,7 @@ export const AnimationView = ({
|
|
|
77
77
|
const measureView = React.useCallback(() => {
|
|
78
78
|
if (isTabletLandscape && tabletLandscapePlayerTopPosition === 0) {
|
|
79
79
|
animationComponentRef.current.measure(
|
|
80
|
-
(
|
|
80
|
+
(_x, _y, _width, _height, _pageX, pageY) => {
|
|
81
81
|
setTabletLandscapePlayerTopPosition(pageY - 20);
|
|
82
82
|
}
|
|
83
83
|
);
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Animated } from "react-native";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
useSafeAreaInsets,
|
|
6
6
|
useSafeAreaFrame,
|
|
7
7
|
} from "react-native-safe-area-context";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
useNavigation,
|
|
11
|
-
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
8
|
+
import { useGetBottomTabBarHeight } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useGetBottomTabBarHeight";
|
|
9
|
+
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useNavigation";
|
|
12
10
|
import { isLive } from "@applicaster/zapp-react-native-utils/playerUtils";
|
|
13
11
|
|
|
14
12
|
import { PROGRESS_BAR_HEIGHT } from "./utils";
|
|
@@ -48,7 +46,7 @@ export type ModalAnimationContextT = {
|
|
|
48
46
|
progressBarHeight: number;
|
|
49
47
|
};
|
|
50
48
|
|
|
51
|
-
const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
49
|
+
export const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
52
50
|
isActiveGesture: false,
|
|
53
51
|
playerAnimationState: null,
|
|
54
52
|
setPlayerAnimationState: () => null,
|
|
@@ -73,10 +71,6 @@ const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
|
73
71
|
progressBarHeight: 0,
|
|
74
72
|
});
|
|
75
73
|
|
|
76
|
-
export function useModalAnimationContext() {
|
|
77
|
-
return useContext<ModalAnimationContextT>(ReactContext);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
74
|
const Provider = ({ children }: { children: React.ReactNode }) => {
|
|
81
75
|
const [playerAnimationState, setPlayerAnimationState] =
|
|
82
76
|
React.useState<PlayerAnimationStateT>(null);
|
|
@@ -6,10 +6,11 @@ export { AnimatedVideoPlayerComponent } from "./AnimatedVideoPlayerComponent";
|
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
withModalAnimationProvider,
|
|
9
|
-
useModalAnimationContext,
|
|
10
9
|
PlayerAnimationStateEnum,
|
|
11
10
|
} from "./ModalAnimationContext";
|
|
12
11
|
|
|
12
|
+
export { useModalAnimationContext } from "./useModalAnimationContext";
|
|
13
|
+
|
|
13
14
|
export { AnimationComponent } from "./AnimationComponent";
|
|
14
15
|
|
|
15
16
|
export { ComponentAnimationType, defaultAspectRatioWidth } from "./utils";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer from "react-test-renderer";
|
|
3
|
-
import { View } from "react-native";
|
|
4
3
|
|
|
5
4
|
const props = {
|
|
6
5
|
entry: {},
|
|
@@ -24,7 +23,11 @@ jest.mock("react-native-safe-area-context", () => ({
|
|
|
24
23
|
|
|
25
24
|
jest.mock(
|
|
26
25
|
"@applicaster/zapp-react-native-ui-components/Components/River/ComponentsMap",
|
|
27
|
-
() =>
|
|
26
|
+
() => {
|
|
27
|
+
const View = jest.requireActual("react-native").View;
|
|
28
|
+
|
|
29
|
+
return { ComponentsMap: View };
|
|
30
|
+
}
|
|
28
31
|
);
|
|
29
32
|
|
|
30
33
|
jest.mock("@applicaster/zapp-react-native-utils/reactHooks/screen", () => ({
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
|
|
5
3
|
import { renderWithProviders } from "@applicaster/zapp-react-native-utils/testUtils";
|
|
6
4
|
|
|
7
5
|
const props = {
|
|
@@ -17,13 +15,17 @@ const props = {
|
|
|
17
15
|
},
|
|
18
16
|
};
|
|
19
17
|
|
|
20
|
-
const
|
|
18
|
+
const mockUseIsDeviceTablet = jest.fn();
|
|
21
19
|
|
|
22
20
|
jest.mock("react-native");
|
|
23
21
|
|
|
24
22
|
jest.mock("react-native-gesture-handler");
|
|
25
23
|
|
|
26
|
-
jest.mock("../PlayerDetails", () =>
|
|
24
|
+
jest.mock("../PlayerDetails", () => {
|
|
25
|
+
const View = jest.requireActual("react-native").View;
|
|
26
|
+
|
|
27
|
+
return { PlayerDetails: View };
|
|
28
|
+
});
|
|
27
29
|
|
|
28
30
|
jest.mock(
|
|
29
31
|
"@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext",
|
|
@@ -33,10 +35,11 @@ jest.mock(
|
|
|
33
35
|
);
|
|
34
36
|
|
|
35
37
|
jest.mock("@applicaster/zapp-react-native-utils/reactHooks/device", () => ({
|
|
36
|
-
useIsTablet,
|
|
38
|
+
useIsTablet: mockUseIsDeviceTablet,
|
|
37
39
|
}));
|
|
38
40
|
|
|
39
41
|
jest.mock("@applicaster/zapp-react-native-utils/theme", () => ({
|
|
42
|
+
...jest.requireActual("@applicaster/zapp-react-native-utils/theme"),
|
|
40
43
|
useTheme: jest.fn(() => ({})),
|
|
41
44
|
}));
|
|
42
45
|
|
|
@@ -68,7 +71,7 @@ const children = jest.fn(() => {});
|
|
|
68
71
|
|
|
69
72
|
describe("PlayerWrapper", () => {
|
|
70
73
|
it("renders properly", () => {
|
|
71
|
-
|
|
74
|
+
mockUseIsDeviceTablet.mockReturnValue(false);
|
|
72
75
|
|
|
73
76
|
const element = renderWithProviders(
|
|
74
77
|
<PlayerWrapper {...props}>{children}</PlayerWrapper>
|
|
@@ -78,7 +81,7 @@ describe("PlayerWrapper", () => {
|
|
|
78
81
|
});
|
|
79
82
|
|
|
80
83
|
it("renders inline", () => {
|
|
81
|
-
|
|
84
|
+
mockUseIsDeviceTablet.mockReturnValue(false);
|
|
82
85
|
|
|
83
86
|
const element = renderWithProviders(
|
|
84
87
|
<PlayerWrapper {...props} inline={true} isModal={true}>
|
|
@@ -90,7 +93,7 @@ describe("PlayerWrapper", () => {
|
|
|
90
93
|
});
|
|
91
94
|
|
|
92
95
|
it("renders inline on tablet in landscape orientation", () => {
|
|
93
|
-
|
|
96
|
+
mockUseIsDeviceTablet.mockReturnValue(true);
|
|
94
97
|
|
|
95
98
|
const element = renderWithProviders(
|
|
96
99
|
<PlayerWrapper {...props} inline={true} isModal={true}>
|
|
@@ -102,7 +105,7 @@ describe("PlayerWrapper", () => {
|
|
|
102
105
|
});
|
|
103
106
|
|
|
104
107
|
it("renders inline and docked", () => {
|
|
105
|
-
|
|
108
|
+
mockUseIsDeviceTablet.mockReturnValue(false);
|
|
106
109
|
|
|
107
110
|
const children = jest.fn(() => {});
|
|
108
111
|
const dimensions = { height: undefined, width: props.style.width };
|
|
@@ -4,7 +4,7 @@ exports[`PlayerDetails renders properly 1`] = `
|
|
|
4
4
|
<View
|
|
5
5
|
collapsable={false}
|
|
6
6
|
style={
|
|
7
|
-
|
|
7
|
+
{
|
|
8
8
|
"backgroundColor": "transparent",
|
|
9
9
|
"flex": 1,
|
|
10
10
|
"marginTop": -8,
|
|
@@ -15,7 +15,7 @@ exports[`PlayerDetails renders properly 1`] = `
|
|
|
15
15
|
>
|
|
16
16
|
<View
|
|
17
17
|
feed="test-source"
|
|
18
|
-
riverComponents={
|
|
18
|
+
riverComponents={[]}
|
|
19
19
|
riverId="test-id"
|
|
20
20
|
/>
|
|
21
21
|
</View>
|
|
@@ -25,7 +25,7 @@ exports[`PlayerDetails renders properly on tablet in landscape orientation 1`] =
|
|
|
25
25
|
<View
|
|
26
26
|
collapsable={false}
|
|
27
27
|
style={
|
|
28
|
-
|
|
28
|
+
{
|
|
29
29
|
"backgroundColor": "transparent",
|
|
30
30
|
"flex": 1,
|
|
31
31
|
"marginTop": -20,
|
|
@@ -36,7 +36,7 @@ exports[`PlayerDetails renders properly on tablet in landscape orientation 1`] =
|
|
|
36
36
|
>
|
|
37
37
|
<View
|
|
38
38
|
feed="test-source"
|
|
39
|
-
riverComponents={
|
|
39
|
+
riverComponents={[]}
|
|
40
40
|
riverId="test-id"
|
|
41
41
|
/>
|
|
42
42
|
</View>
|
|
@@ -4,8 +4,8 @@ exports[`PlayerWrapper renders inline 1`] = `
|
|
|
4
4
|
<RNCSafeAreaProvider
|
|
5
5
|
onInsetsChange={[Function]}
|
|
6
6
|
style={
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
[
|
|
8
|
+
{
|
|
9
9
|
"flex": 1,
|
|
10
10
|
},
|
|
11
11
|
undefined,
|
|
@@ -14,7 +14,7 @@ exports[`PlayerWrapper renders inline 1`] = `
|
|
|
14
14
|
>
|
|
15
15
|
<RNCSafeAreaView
|
|
16
16
|
edges={
|
|
17
|
-
|
|
17
|
+
{
|
|
18
18
|
"bottom": "off",
|
|
19
19
|
"left": "off",
|
|
20
20
|
"right": "off",
|
|
@@ -22,31 +22,31 @@ exports[`PlayerWrapper renders inline 1`] = `
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
style={
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
[
|
|
26
|
+
{
|
|
27
27
|
"backgroundColor": "transparent",
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
{
|
|
30
30
|
"height": 800,
|
|
31
31
|
"width": 300,
|
|
32
32
|
},
|
|
33
|
-
|
|
33
|
+
{},
|
|
34
34
|
]
|
|
35
35
|
}
|
|
36
36
|
>
|
|
37
37
|
<View
|
|
38
38
|
additionalData={
|
|
39
|
-
|
|
39
|
+
{
|
|
40
40
|
"saveArea": true,
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
animationType="moveUpComponent"
|
|
44
44
|
style={
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
[
|
|
46
|
+
{
|
|
47
47
|
"flexDirection": "column",
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
{
|
|
50
50
|
"flex": 1,
|
|
51
51
|
},
|
|
52
52
|
]
|
|
@@ -54,19 +54,19 @@ exports[`PlayerWrapper renders inline 1`] = `
|
|
|
54
54
|
>
|
|
55
55
|
<View
|
|
56
56
|
style={
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
[
|
|
58
|
+
{
|
|
59
59
|
"alignSelf": "center",
|
|
60
60
|
"position": "relative",
|
|
61
61
|
"zIndex": 200,
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
{
|
|
64
64
|
"aspectRatio": 1.7777777777777777,
|
|
65
65
|
"height": undefined,
|
|
66
66
|
"width": "100%",
|
|
67
67
|
},
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
{},
|
|
69
|
+
{},
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
testID="test-player-container"
|
|
@@ -80,8 +80,8 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
|
80
80
|
<RNCSafeAreaProvider
|
|
81
81
|
onInsetsChange={[Function]}
|
|
82
82
|
style={
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
85
|
"flex": 1,
|
|
86
86
|
},
|
|
87
87
|
undefined,
|
|
@@ -90,7 +90,7 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
|
90
90
|
>
|
|
91
91
|
<RNCSafeAreaView
|
|
92
92
|
edges={
|
|
93
|
-
|
|
93
|
+
{
|
|
94
94
|
"bottom": "off",
|
|
95
95
|
"left": "off",
|
|
96
96
|
"right": "off",
|
|
@@ -98,31 +98,31 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
style={
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
[
|
|
102
|
+
{
|
|
103
103
|
"backgroundColor": "transparent",
|
|
104
104
|
},
|
|
105
|
-
|
|
105
|
+
{
|
|
106
106
|
"height": undefined,
|
|
107
107
|
"width": 300,
|
|
108
108
|
},
|
|
109
|
-
|
|
109
|
+
{},
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
>
|
|
113
113
|
<View
|
|
114
114
|
additionalData={
|
|
115
|
-
|
|
115
|
+
{
|
|
116
116
|
"saveArea": true,
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
animationType="moveUpComponent"
|
|
120
120
|
style={
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
[
|
|
122
|
+
{
|
|
123
123
|
"flexDirection": "column",
|
|
124
124
|
},
|
|
125
|
-
|
|
125
|
+
{
|
|
126
126
|
"flex": 1,
|
|
127
127
|
},
|
|
128
128
|
]
|
|
@@ -130,19 +130,19 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
|
130
130
|
>
|
|
131
131
|
<View
|
|
132
132
|
style={
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
[
|
|
134
|
+
{
|
|
135
135
|
"alignSelf": "center",
|
|
136
136
|
"position": "relative",
|
|
137
137
|
"zIndex": 200,
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
{
|
|
140
140
|
"aspectRatio": undefined,
|
|
141
141
|
"height": undefined,
|
|
142
142
|
"width": "100%",
|
|
143
143
|
},
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
{},
|
|
145
|
+
{},
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
testID="test-player-container"
|
|
@@ -156,8 +156,8 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
|
156
156
|
<RNCSafeAreaProvider
|
|
157
157
|
onInsetsChange={[Function]}
|
|
158
158
|
style={
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
[
|
|
160
|
+
{
|
|
161
161
|
"flex": 1,
|
|
162
162
|
},
|
|
163
163
|
undefined,
|
|
@@ -166,7 +166,7 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
|
166
166
|
>
|
|
167
167
|
<RNCSafeAreaView
|
|
168
168
|
edges={
|
|
169
|
-
|
|
169
|
+
{
|
|
170
170
|
"bottom": "off",
|
|
171
171
|
"left": "off",
|
|
172
172
|
"right": "off",
|
|
@@ -174,31 +174,31 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
style={
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
[
|
|
178
|
+
{
|
|
179
179
|
"backgroundColor": "red",
|
|
180
180
|
},
|
|
181
|
-
|
|
181
|
+
{
|
|
182
182
|
"height": 800,
|
|
183
183
|
"width": 300,
|
|
184
184
|
},
|
|
185
|
-
|
|
185
|
+
{},
|
|
186
186
|
]
|
|
187
187
|
}
|
|
188
188
|
>
|
|
189
189
|
<View
|
|
190
190
|
additionalData={
|
|
191
|
-
|
|
191
|
+
{
|
|
192
192
|
"saveArea": true,
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
animationType="moveUpComponent"
|
|
196
196
|
style={
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
[
|
|
198
|
+
{
|
|
199
199
|
"flexDirection": "row",
|
|
200
200
|
},
|
|
201
|
-
|
|
201
|
+
{
|
|
202
202
|
"flex": 1,
|
|
203
203
|
},
|
|
204
204
|
]
|
|
@@ -206,26 +206,26 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
|
206
206
|
>
|
|
207
207
|
<View
|
|
208
208
|
style={
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
[
|
|
210
|
+
{
|
|
211
211
|
"alignSelf": "center",
|
|
212
212
|
"position": "relative",
|
|
213
213
|
"zIndex": 200,
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
{
|
|
216
216
|
"aspectRatio": 1.7777777777777777,
|
|
217
217
|
"height": undefined,
|
|
218
218
|
"width": 195,
|
|
219
219
|
},
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
{},
|
|
221
|
+
{},
|
|
222
222
|
]
|
|
223
223
|
}
|
|
224
224
|
testID="test-player-container"
|
|
225
225
|
>
|
|
226
226
|
<View
|
|
227
227
|
additionalData={
|
|
228
|
-
|
|
228
|
+
{
|
|
229
229
|
"disableAnimatedComponent": false,
|
|
230
230
|
"resetAnimationValue": undefined,
|
|
231
231
|
"useLayoutMeasure": true,
|
|
@@ -233,7 +233,7 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
|
|
|
233
233
|
}
|
|
234
234
|
animationType="moveUpComponent"
|
|
235
235
|
style={
|
|
236
|
-
|
|
236
|
+
{
|
|
237
237
|
"flex": 1,
|
|
238
238
|
}
|
|
239
239
|
}
|
|
@@ -248,8 +248,8 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
248
248
|
<RNCSafeAreaProvider
|
|
249
249
|
onInsetsChange={[Function]}
|
|
250
250
|
style={
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
[
|
|
252
|
+
{
|
|
253
253
|
"flex": 1,
|
|
254
254
|
},
|
|
255
255
|
undefined,
|
|
@@ -258,7 +258,7 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
258
258
|
>
|
|
259
259
|
<RNCSafeAreaView
|
|
260
260
|
edges={
|
|
261
|
-
|
|
261
|
+
{
|
|
262
262
|
"bottom": "off",
|
|
263
263
|
"left": "off",
|
|
264
264
|
"right": "off",
|
|
@@ -266,31 +266,31 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
style={
|
|
269
|
-
|
|
270
|
-
|
|
269
|
+
[
|
|
270
|
+
{
|
|
271
271
|
"backgroundColor": "transparent",
|
|
272
272
|
},
|
|
273
|
-
|
|
273
|
+
{
|
|
274
274
|
"height": 800,
|
|
275
275
|
"width": 300,
|
|
276
276
|
},
|
|
277
|
-
|
|
277
|
+
{},
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
>
|
|
281
281
|
<View
|
|
282
282
|
additionalData={
|
|
283
|
-
|
|
283
|
+
{
|
|
284
284
|
"saveArea": true,
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
animationType="moveUpComponent"
|
|
288
288
|
style={
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
[
|
|
290
|
+
{
|
|
291
291
|
"flexDirection": "column",
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
{
|
|
294
294
|
"flex": 1,
|
|
295
295
|
},
|
|
296
296
|
]
|
|
@@ -298,19 +298,19 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
298
298
|
>
|
|
299
299
|
<View
|
|
300
300
|
style={
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
[
|
|
302
|
+
{
|
|
303
303
|
"alignSelf": "center",
|
|
304
304
|
"position": "relative",
|
|
305
305
|
"zIndex": 200,
|
|
306
306
|
},
|
|
307
|
-
|
|
307
|
+
{
|
|
308
308
|
"aspectRatio": 1.7786666666666666,
|
|
309
309
|
"height": undefined,
|
|
310
310
|
"width": "100%",
|
|
311
311
|
},
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
{},
|
|
313
|
+
{},
|
|
314
314
|
]
|
|
315
315
|
}
|
|
316
316
|
testID="test-player-container"
|