@applicaster/zapp-react-native-ui-components 13.0.0-rc.99 → 14.0.0-alpha.1216545755

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.
Files changed (67) hide show
  1. package/Components/AudioPlayer/index.tsx +15 -0
  2. package/Components/AudioPlayer/mobile/Layout.tsx +66 -0
  3. package/Components/AudioPlayer/{__tests__/__snapshots__/audioPlayer.test.js.snap → mobile/__tests__/__snapshots__/audioPlayerMobileLayout.test.js.snap} +2 -2
  4. package/Components/AudioPlayer/mobile/__tests__/audioPlayerMobileLayout.test.js +18 -0
  5. package/Components/AudioPlayer/mobile/index.tsx +18 -0
  6. package/Components/AudioPlayer/tv/Artwork.tsx +40 -0
  7. package/Components/AudioPlayer/{AudioPlayerLayout.tsx → tv/Layout.tsx} +37 -79
  8. package/Components/AudioPlayer/{Runtime.tsx → tv/Runtime.tsx} +2 -1
  9. package/Components/AudioPlayer/{Summary.tsx → tv/Summary.tsx} +12 -9
  10. package/Components/AudioPlayer/{Title.tsx → tv/Title.tsx} +12 -9
  11. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/artWork.test.js.snap +9 -4
  12. package/Components/AudioPlayer/tv/__tests__/__snapshots__/audioPlayer.test.js.snap +170 -0
  13. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/summary.test.js.snap +1 -1
  14. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/title.test.js.snap +1 -1
  15. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/audioPlayer.test.js +7 -3
  16. package/Components/AudioPlayer/{helpers.tsx → tv/helpers.tsx} +3 -6
  17. package/Components/AudioPlayer/{AudioPlayer.tsx → tv/index.tsx} +14 -70
  18. package/Components/AudioPlayer/types.ts +40 -0
  19. package/Components/GeneralContentScreen/GeneralContentScreen.tsx +3 -2
  20. package/Components/GeneralContentScreen/utils/useCurationAPI.ts +4 -2
  21. package/Components/GeneralContentScreen/utils/useEventAlerts.ts +30 -0
  22. package/Components/MasterCell/DefaultComponents/Text/index.tsx +1 -0
  23. package/Components/MasterCell/utils/behaviorProvider.ts +82 -14
  24. package/Components/MasterCell/utils/index.ts +23 -3
  25. package/Components/ModalComponent/BottomSheetModalContent.tsx +32 -46
  26. package/Components/ModalComponent/Button/index.tsx +25 -29
  27. package/Components/ModalComponent/Header/index.tsx +9 -8
  28. package/Components/PlayerContainer/PlayerContainer.tsx +25 -42
  29. package/Components/PlayerImageBackground/index.tsx +1 -1
  30. package/Components/River/ComponentsMap/ComponentsMap.tsx +7 -3
  31. package/Components/River/RiverItem.tsx +8 -4
  32. package/Components/River/TV/River.tsx +0 -3
  33. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +1 -1
  34. package/Components/RouteManager/TestId.tsx +1 -5
  35. package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +0 -1
  36. package/Components/RouteManager/__tests__/testId.test.js +0 -4
  37. package/Components/Screen/TV/__tests__/index.web.test.tsx +26 -0
  38. package/Components/Screen/__tests__/Screen.test.tsx +22 -14
  39. package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +2 -2
  40. package/Components/TopMarginApplicator/TopMarginApplicator.tsx +16 -15
  41. package/Components/Transitioner/Scene.tsx +1 -0
  42. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +1 -2
  43. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +1 -0
  44. package/Components/VideoModal/ModalAnimation/utils.ts +3 -9
  45. package/Components/VideoModal/PlayerWrapper.tsx +9 -19
  46. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +60 -0
  47. package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +17 -55
  48. package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +15 -26
  49. package/Contexts/ScreenDataContext/index.tsx +2 -0
  50. package/Decorators/RiverFeedLoader/index.tsx +8 -2
  51. package/Decorators/RiverFeedLoader/utils/index.ts +7 -2
  52. package/Decorators/ZappPipesDataConnector/index.tsx +20 -2
  53. package/index.d.ts +0 -1
  54. package/package.json +5 -6
  55. package/Components/AudioPlayer/Artwork.tsx +0 -35
  56. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +0 -66
  57. package/Components/AudioPlayer/__tests__/audioPlayerLayout.test.js +0 -26
  58. package/Components/AudioPlayer/index.ts +0 -1
  59. package/Decorators/Navigator/__tests__/react-router-native-mock.js +0 -11
  60. package/Components/AudioPlayer/{Channel.tsx → tv/Channel.tsx} +0 -0
  61. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/Runtime.test.js +0 -0
  62. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/Runtime.test.js.snap +2 -2
  63. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/channel.test.js.snap +0 -0
  64. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/artWork.test.js +0 -0
  65. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/channel.test.js +0 -0
  66. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/summary.test.js +0 -0
  67. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/title.test.js +0 -0
@@ -309,7 +309,6 @@ export const getMoveUpValue = ({
309
309
  progressBarHeight,
310
310
  isTablet,
311
311
  isTabletLandscape,
312
- inlineAudioPlayer,
313
312
  tabletLandscapePlayerTopPosition,
314
313
  }) => {
315
314
  if (additionalData.saveArea) {
@@ -322,17 +321,12 @@ export const getMoveUpValue = ({
322
321
  }
323
322
 
324
323
  if (isTablet) {
325
- if (
326
- isTabletLandscape &&
327
- (!isAudioItem || (isAudioItem && inlineAudioPlayer))
328
- ) {
324
+ if (isTabletLandscape) {
329
325
  return -tabletLandscapePlayerTopPosition + progressBarHeight;
326
+ } else {
327
+ return -130;
330
328
  }
331
-
332
- // for audioPlayer(tablet/isTabletPortrait) in docked mode
333
- return -130;
334
329
  }
335
330
 
336
- // for audioPlayer(mobile) in docked mode
337
331
  return -50 + progressBarHeight;
338
332
  };
@@ -74,20 +74,6 @@ const getScreenAspectRatio = () => {
74
74
  return longEdge / shortEdge;
75
75
  };
76
76
 
77
- const safeAreaStyles = (
78
- configuration: Configuration,
79
- isTablet: boolean
80
- ): ViewStyle => {
81
- const tablet_landscape_player_container_background_color =
82
- configuration?.tablet_landscape_player_container_background_color;
83
-
84
- return {
85
- backgroundColor: isTablet
86
- ? tablet_landscape_player_container_background_color
87
- : "transparent",
88
- };
89
- };
90
-
91
77
  const getEdges = (isTablet: boolean, isInlineModal: boolean) => {
92
78
  if (isTablet) {
93
79
  return ["top"];
@@ -156,6 +142,7 @@ const PlayerWrapperComponent = (props: Props) => {
156
142
  children,
157
143
  isTabletPortrait,
158
144
  configuration,
145
+ fullscreen,
159
146
  pip,
160
147
  } = props;
161
148
 
@@ -211,14 +198,17 @@ const PlayerWrapperComponent = (props: Props) => {
211
198
  [containerDimensions, playerDimensionsHack]
212
199
  );
213
200
 
201
+ const wrapperViewStyle: ViewStyle = {
202
+ backgroundColor:
203
+ isTablet && !fullscreen
204
+ ? configuration?.tablet_landscape_player_container_background_color
205
+ : "transparent",
206
+ };
207
+
214
208
  return (
215
209
  <WrapperView
216
210
  edges={getEdges(isTablet, isInlineModal) as readonly Edge[]}
217
- style={[
218
- safeAreaStyles(configuration, isTablet),
219
- style,
220
- playerDimensionsHack,
221
- ]}
211
+ style={[wrapperViewStyle, style, playerDimensionsHack]}
222
212
  >
223
213
  <AnimationComponent
224
214
  animationType={ComponentAnimationType.moveUpComponent}
@@ -71,6 +71,36 @@ exports[`PlayerWrapper renders inline 1`] = `
71
71
  }
72
72
  testID="test-player-container"
73
73
  />
74
+ <View
75
+ animationType="componentFade"
76
+ style={
77
+ {
78
+ "flex": 1,
79
+ }
80
+ }
81
+ >
82
+ <View
83
+ configuration={
84
+ {
85
+ "tablet_landscape_player_container_background_color": "red",
86
+ "tablet_landscape_sidebar_width": "35%",
87
+ }
88
+ }
89
+ entry={
90
+ {
91
+ "id": "test",
92
+ }
93
+ }
94
+ isTablet={false}
95
+ isTabletLandscape={false}
96
+ style={
97
+ {
98
+ "flex": 1,
99
+ "paddingTop": 20,
100
+ }
101
+ }
102
+ />
103
+ </View>
74
104
  </View>
75
105
  </RNCSafeAreaView>
76
106
  </RNCSafeAreaProvider>
@@ -239,6 +269,36 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
239
269
  }
240
270
  />
241
271
  </View>
272
+ <View
273
+ animationType="componentFade"
274
+ style={
275
+ {
276
+ "flex": 1,
277
+ }
278
+ }
279
+ >
280
+ <View
281
+ configuration={
282
+ {
283
+ "tablet_landscape_player_container_background_color": "red",
284
+ "tablet_landscape_sidebar_width": "35%",
285
+ }
286
+ }
287
+ entry={
288
+ {
289
+ "id": "test",
290
+ }
291
+ }
292
+ isTablet={true}
293
+ isTabletLandscape={true}
294
+ style={
295
+ {
296
+ "flex": 1,
297
+ "paddingTop": 20,
298
+ }
299
+ }
300
+ />
301
+ </View>
242
302
  </View>
243
303
  </RNCSafeAreaView>
244
304
  </RNCSafeAreaProvider>
@@ -1,19 +1,9 @@
1
1
  import { renderHook } from "@testing-library/react-hooks";
2
2
  import { useDelayedPlayerDetails } from "../useDelayedPlayerDetails";
3
- import { withTimeout$ } from "@applicaster/zapp-react-native-utils/idleUtils";
4
- import { showDetails } from "../utils";
5
3
  import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
6
4
 
7
- jest.mock("@applicaster/zapp-react-native-utils/idleUtils", () => ({
8
- withTimeout$: jest.fn(),
9
- }));
10
-
11
- jest.mock("../utils", () => ({
12
- showDetails: jest.fn(),
13
- }));
14
-
15
5
  jest.mock("@applicaster/zapp-react-native-utils/reactHooks", () => ({
16
- useIsTablet: jest.fn(),
6
+ useIsTablet: jest.fn().mockReturnValue(false),
17
7
  }));
18
8
 
19
9
  describe("useDelayedPlayerDetails", () => {
@@ -21,69 +11,41 @@ describe("useDelayedPlayerDetails", () => {
21
11
  jest.clearAllMocks();
22
12
  });
23
13
 
24
- it("should return false initially", () => {
25
- (withTimeout$ as jest.Mock).mockReturnValue({
26
- subscribe: jest.fn().mockReturnValue({ unsubscribe: jest.fn() }),
27
- });
28
-
14
+ it("should return true initially", () => {
29
15
  const { result } = renderHook(() =>
30
16
  useDelayedPlayerDetails({ isInline: true, isDocked: false, isPip: false })
31
17
  );
32
18
 
33
- expect(result.current).toBe(false);
19
+ expect(result.current).toBe(true);
34
20
  });
35
21
 
36
- it("should return true if showDetails returns true", () => {
37
- (withTimeout$ as jest.Mock).mockReturnValue({
38
- subscribe: (callback) => {
39
- callback.next();
40
-
41
- return { unsubscribe: jest.fn() };
42
- },
43
- });
44
-
45
- (showDetails as jest.Mock).mockReturnValue(true);
46
- (useIsTablet as jest.Mock).mockReturnValue(false);
47
-
22
+ it("should return false when isPip is true", () => {
48
23
  const { result } = renderHook(() =>
49
- useDelayedPlayerDetails({ isInline: true, isDocked: false, isPip: false })
24
+ useDelayedPlayerDetails({ isInline: true, isDocked: true, isPip: true })
50
25
  );
51
26
 
52
- expect(result.current).toBe(true);
27
+ expect(result.current).toBe(false);
53
28
  });
54
29
 
55
- it("should return false if showDetails returns false", () => {
56
- (withTimeout$ as jest.Mock).mockReturnValue({
57
- subscribe: (callback) => {
58
- callback.next();
59
-
60
- return { unsubscribe: jest.fn() };
61
- },
62
- });
63
-
64
- (showDetails as jest.Mock).mockReturnValue(false);
65
- (useIsTablet as jest.Mock).mockReturnValue(false);
66
-
30
+ it("should return false when isDocked is true", () => {
67
31
  const { result } = renderHook(() =>
68
- useDelayedPlayerDetails({ isInline: true, isDocked: false, isPip: false })
32
+ useDelayedPlayerDetails({ isInline: true, isDocked: true, isPip: false })
69
33
  );
70
34
 
71
35
  expect(result.current).toBe(false);
72
36
  });
73
37
 
74
- it("should unsubscribe on unmount", () => {
75
- const unsubscribeMock = jest.fn();
38
+ it("should return true for tablet regardless of other flags", () => {
39
+ (useIsTablet as jest.Mock).mockReturnValue(true);
76
40
 
77
- (withTimeout$ as jest.Mock).mockReturnValue({
78
- subscribe: jest.fn().mockReturnValue({ unsubscribe: unsubscribeMock }),
79
- });
80
-
81
- const { unmount } = renderHook(() =>
82
- useDelayedPlayerDetails({ isInline: true, isDocked: false, isPip: false })
41
+ const { result } = renderHook(() =>
42
+ useDelayedPlayerDetails({
43
+ isInline: false,
44
+ isDocked: false,
45
+ isPip: false,
46
+ })
83
47
  );
84
48
 
85
- unmount();
86
-
87
- expect(unsubscribeMock).toHaveBeenCalled();
49
+ expect(result.current).toBe(true);
88
50
  });
89
51
  });
@@ -1,13 +1,23 @@
1
- import * as React from "react";
2
1
  import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
3
- import { withTimeout$ } from "@applicaster/zapp-react-native-utils/idleUtils";
4
2
 
5
3
  import { showDetails } from "./utils";
6
4
 
7
- const TIMEOUT = 100; // ms
8
-
9
5
  type Props = { isInline: boolean; isDocked: boolean; isPip: boolean };
10
6
 
7
+ const showPlayerDetails = (
8
+ isInline: boolean,
9
+ isDocked: boolean,
10
+ isPip: boolean,
11
+ isTablet: boolean
12
+ ) => {
13
+ return showDetails({
14
+ isMobile: !isTablet,
15
+ isInline,
16
+ isDocked,
17
+ isPip,
18
+ });
19
+ };
20
+
11
21
  /**
12
22
  * Custom hook to determine whether to show player details with a delay.
13
23
  *
@@ -22,28 +32,7 @@ export const useDelayedPlayerDetails = ({
22
32
  isDocked,
23
33
  isPip,
24
34
  }: Props): boolean => {
25
- const [shouldShowDetails, setShouldShowDetails] = React.useState(false);
26
-
27
35
  const isTablet = useIsTablet();
28
36
 
29
- React.useEffect(() => {
30
- const subscription = withTimeout$(TIMEOUT).subscribe({
31
- next: () => {
32
- setShouldShowDetails(() => {
33
- return showDetails({
34
- isMobile: !isTablet,
35
- isInline,
36
- isDocked,
37
- isPip,
38
- });
39
- });
40
- },
41
- });
42
-
43
- return () => {
44
- subscription.unsubscribe();
45
- };
46
- }, [isDocked, isTablet, isInline, isPip]);
47
-
48
- return shouldShowDetails;
37
+ return showPlayerDetails(isInline, isDocked, isPip, isTablet);
49
38
  };
@@ -11,6 +11,8 @@ export const withScreenDataContextProvider = (Component: any) => {
11
11
  // use only initial activeRiver as this context should only be used for "Home", initial route
12
12
  const screenData = React.useMemo(() => ({ screen: activeRiver }), []);
13
13
 
14
+ console.log("withScreenDataContextProvider", { screenData, activeRiver });
15
+
14
16
  return (
15
17
  <ScreenDataContext.Provider value={screenData}>
16
18
  <Component {...props} />
@@ -13,6 +13,7 @@ import {
13
13
  loadDatasources,
14
14
  usePipesContexts,
15
15
  } from "./utils";
16
+ import { useScreenResolvers } from "@applicaster/zapp-react-native-utils/actionsExecutor/screenResolver";
16
17
 
17
18
  type RiverProps = {
18
19
  dispatch: DispatchProp;
@@ -25,7 +26,7 @@ export function WithRiverFeedLoader(Component: ZappComponent) {
25
26
  return function WrappedWithRiverFeedLoader(props: RiverProps) {
26
27
  const { river } = props;
27
28
  const { screenData, pathname } = useRoute();
28
-
29
+ const resolvers = useScreenResolvers();
29
30
  const pipesContexts = usePipesContexts(river.id, pathname);
30
31
 
31
32
  const componentsToLoad = ignoreComponentsWithClearCacheFlag(
@@ -49,7 +50,12 @@ export function WithRiverFeedLoader(Component: ZappComponent) {
49
50
  item?.filter((item2) => item2 !== undefined)
50
51
  );
51
52
 
52
- loadDatasources(nonEmptyDataSources, river?.id, props.dispatch);
53
+ loadDatasources(
54
+ nonEmptyDataSources,
55
+ river?.id,
56
+ props.dispatch,
57
+ resolvers
58
+ );
53
59
  }, []);
54
60
 
55
61
  return <Component {...props} />;
@@ -12,11 +12,16 @@ export { getDatasourceUrl } from "./getDatasourceUrl";
12
12
 
13
13
  export const DATASOURCE_CHUNKS = 10;
14
14
 
15
- export async function loadDatasources(urls: string[][], riverId, dispatch) {
15
+ export async function loadDatasources(
16
+ urls: string[][],
17
+ riverId,
18
+ dispatch,
19
+ resolvers
20
+ ) {
16
21
  return reducePromises<string, void>(
17
22
  mapPromises<string, void>((url) => {
18
23
  if (url) {
19
- return dispatch(loadPipesData(url, { riverId }));
24
+ return dispatch(loadPipesData(url, { riverId, resolvers }));
20
25
  }
21
26
  }),
22
27
  undefined,
@@ -19,7 +19,11 @@ import { ZappPipesSearchContext } from "@applicaster/zapp-react-native-ui-compon
19
19
  import { useScreenContext } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
20
20
 
21
21
  import { isVerticalListOrGrid } from "./utils";
22
- import { subscribeForUrlContextKeyChanges } from "@applicaster/zapp-pipes-v2-client";
22
+ import {
23
+ subscribeForUrlContextKeyChanges,
24
+ subscribeForUrlScreenKeyChanges,
25
+ } from "@applicaster/zapp-pipes-v2-client";
26
+ import { useScreenStateStore } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useScreenStateStore";
23
27
 
24
28
  type Props = {
25
29
  component: ZappUIComponent;
@@ -204,7 +208,9 @@ export function zappPipesDataConnector(
204
208
  Component: React.FC<any> | React.ComponentClass<any>
205
209
  ) {
206
210
  return function WrappedWithZappPipesData(props: Props) {
207
- const { screenData } = useRoute();
211
+ const { screenData, pathname } = useRoute();
212
+ const screenStateStore = useScreenStateStore();
213
+
208
214
  const { plugins } = usePickFromState(["plugins"]);
209
215
 
210
216
  const screenContextData = useScreenContext();
@@ -286,6 +292,18 @@ export function zappPipesDataConnector(
286
292
  componentIndex
287
293
  );
288
294
 
295
+ useEffect(() => {
296
+ if (!(dataSourceUrl?.includes("pipesv2://") && reloadData)) {
297
+ return subscribeForUrlScreenKeyChanges(
298
+ dataSourceUrl,
299
+ pathname,
300
+ screenStateStore,
301
+ {},
302
+ reloadData
303
+ );
304
+ }
305
+ }, [dataSourceUrl, reloadData]);
306
+
289
307
  useEffect(() => {
290
308
  if (dataSourceUrl?.includes("pipesv2://") && reloadData) {
291
309
  const addListener = getListenerFromPlugin(dataSourceUrl, plugins);
package/index.d.ts CHANGED
@@ -24,7 +24,6 @@ type GeneralContentScreenProps = {
24
24
  } & Record<string, any>;
25
25
  focused?: boolean;
26
26
  parentFocus?: ParentFocus;
27
- extraOffset?: number;
28
27
  containerHeight?: number;
29
28
  };
30
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "13.0.0-rc.99",
3
+ "version": "14.0.0-alpha.1216545755",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -31,12 +31,11 @@
31
31
  "redux-mock-store": "^1.5.3"
32
32
  },
33
33
  "dependencies": {
34
- "@applicaster/applicaster-types": "13.0.0-rc.99",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-rc.99",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-rc.99",
37
- "@applicaster/zapp-react-native-utils": "13.0.0-rc.99",
34
+ "@applicaster/applicaster-types": "14.0.0-alpha.1216545755",
35
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.1216545755",
36
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.1216545755",
37
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1216545755",
38
38
  "promise": "^8.3.0",
39
- "react-router-native": "^5.1.2",
40
39
  "url": "^0.11.0",
41
40
  "uuid": "^3.3.2"
42
41
  },
@@ -1,35 +0,0 @@
1
- import React from "react";
2
- import { View, Image } from "react-native";
3
-
4
- type Props = {
5
- srcImage: string;
6
- config?: {
7
- titleColor: string;
8
- summaryColor: string;
9
- backgroundColor: string;
10
- backgroundImage: string;
11
- isRTL: boolean;
12
- };
13
- };
14
-
15
- const containerStyles = {
16
- marginHorizontal: 24,
17
- };
18
-
19
- const imageStyles = {
20
- width: 400,
21
- height: 400,
22
- };
23
-
24
- export function Artwork({ srcImage }: Props) {
25
- return (
26
- <View style={containerStyles}>
27
- <Image
28
- fadeDuration={0}
29
- source={{ uri: srcImage }}
30
- style={imageStyles}
31
- resizeMode="cover"
32
- />
33
- </View>
34
- );
35
- }
@@ -1,66 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<AudioPlayerLayout /> renders correctly 1`] = `
4
- <View
5
- pointerEvents="none"
6
- style={
7
- {
8
- "backgroundColor": "transparent",
9
- "overflow": "hidden",
10
- }
11
- }
12
- >
13
- <View
14
- collapsable={false}
15
- style={
16
- {
17
- "backgroundColor": "transparent",
18
- "opacity": 0,
19
- "overflow": "hidden",
20
- }
21
- }
22
- >
23
- <View
24
- accessibilityIgnoresInvertColors={true}
25
- style={
26
- {
27
- "flex": 1,
28
- }
29
- }
30
- >
31
- <Image
32
- resizeMode="cover"
33
- source={
34
- {
35
- "uri": "https://example.com",
36
- }
37
- }
38
- style={
39
- [
40
- {
41
- "bottom": 0,
42
- "left": 0,
43
- "position": "absolute",
44
- "right": 0,
45
- "top": 0,
46
- },
47
- {
48
- "height": undefined,
49
- "width": undefined,
50
- },
51
- undefined,
52
- ]
53
- }
54
- />
55
- <View
56
- style={
57
- {
58
- "backgroundColor": "transparent",
59
- "overflow": "hidden",
60
- }
61
- }
62
- />
63
- </View>
64
- </View>
65
- </View>
66
- `;
@@ -1,26 +0,0 @@
1
- import React from "react";
2
- import { render } from "@testing-library/react-native";
3
-
4
- import { AudioPlayerLayout } from "../AudioPlayerLayout";
5
-
6
- const audioPlayerLayoutProps = {
7
- artwork: "string",
8
- config: {
9
- titleColor: "white",
10
- summaryColor: "white",
11
- backgroundColor: "black",
12
- backgroundImage: "https://example.com",
13
- isRTL: true,
14
- },
15
- children: [],
16
- };
17
-
18
- describe("<AudioPlayerLayout />", () => {
19
- it("renders correctly", () => {
20
- const { toJSON } = render(
21
- <AudioPlayerLayout {...audioPlayerLayoutProps} />
22
- );
23
-
24
- expect(toJSON()).toMatchSnapshot();
25
- });
26
- });
@@ -1 +0,0 @@
1
- export { AudioPlayer } from "./AudioPlayer";
@@ -1,11 +0,0 @@
1
- import React from "react";
2
-
3
- const reactRouter = jest.genMockFromModule("react-router-native");
4
-
5
- function withRouter(Component) {
6
- return (props) => <Component {...props} />; // eslint-disable-line react/display-name
7
- }
8
-
9
- reactRouter.withRouter = withRouter;
10
-
11
- module.exports = reactRouter;
@@ -20,7 +20,7 @@ exports[`<Runtime /> LTR renders correctly 1`] = `
20
20
  "fontSize": 20,
21
21
  "justifyContent": "flex-start",
22
22
  "opacity": 0.8,
23
- "textAlign": "right",
23
+ "textAlign": "left",
24
24
  }
25
25
  }
26
26
  >
@@ -49,7 +49,7 @@ exports[`<Runtime /> RTL renders correctly 1`] = `
49
49
  "fontSize": 20,
50
50
  "justifyContent": "flex-end",
51
51
  "opacity": 0.8,
52
- "textAlign": "left",
52
+ "textAlign": "right",
53
53
  }
54
54
  }
55
55
  >