@applicaster/zapp-react-native-ui-components 14.0.0-alpha.1661204539 → 14.0.0-alpha.2247415563

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 (64) hide show
  1. package/Components/AnimatedInOut/index.tsx +5 -3
  2. package/Components/AudioPlayer/index.tsx +15 -0
  3. package/Components/AudioPlayer/mobile/Layout.tsx +66 -0
  4. package/Components/AudioPlayer/{__tests__/__snapshots__/audioPlayer.test.js.snap → mobile/__tests__/__snapshots__/audioPlayerMobileLayout.test.js.snap} +2 -2
  5. package/Components/AudioPlayer/mobile/__tests__/audioPlayerMobileLayout.test.js +18 -0
  6. package/Components/AudioPlayer/mobile/index.tsx +18 -0
  7. package/Components/AudioPlayer/tv/Artwork.tsx +40 -0
  8. package/Components/AudioPlayer/{AudioPlayerLayout.tsx → tv/Layout.tsx} +34 -75
  9. package/Components/AudioPlayer/{Runtime.tsx → tv/Runtime.tsx} +2 -1
  10. package/Components/AudioPlayer/{Summary.tsx → tv/Summary.tsx} +12 -9
  11. package/Components/AudioPlayer/{Title.tsx → tv/Title.tsx} +12 -9
  12. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/artWork.test.js.snap +9 -4
  13. package/Components/AudioPlayer/tv/__tests__/__snapshots__/audioPlayer.test.js.snap +170 -0
  14. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/summary.test.js.snap +1 -1
  15. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/title.test.js.snap +1 -1
  16. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/audioPlayer.test.js +7 -3
  17. package/Components/AudioPlayer/{helpers.tsx → tv/helpers.tsx} +3 -4
  18. package/Components/AudioPlayer/{AudioPlayer.tsx → tv/index.tsx} +14 -59
  19. package/Components/AudioPlayer/types.ts +40 -0
  20. package/Components/Focusable/FocusableTvOS.tsx +3 -3
  21. package/Components/FocusableList/index.tsx +4 -0
  22. package/Components/GeneralContentScreen/GeneralContentScreen.tsx +0 -2
  23. package/Components/HandlePlayable/HandlePlayable.tsx +14 -8
  24. package/Components/MasterCell/DefaultComponents/Text/index.tsx +1 -0
  25. package/Components/MasterCell/elementMapper.tsx +1 -2
  26. package/Components/MasterCell/utils/behaviorProvider.ts +12 -67
  27. package/Components/MasterCell/utils/index.ts +3 -13
  28. package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +13 -18
  29. package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +9 -0
  30. package/Components/PlayerContainer/PlayerContainer.tsx +48 -61
  31. package/Components/PlayerImageBackground/index.tsx +1 -1
  32. package/Components/River/ComponentsMap/ComponentsMap.tsx +1 -6
  33. package/Components/River/RiverItem.tsx +8 -8
  34. package/Components/River/TV/River.tsx +0 -3
  35. package/Components/River/TV/withTVEventHandler.tsx +1 -1
  36. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +2 -6
  37. package/Components/Tabs/TV/Tabs.android.tsx +0 -2
  38. package/Components/TopMarginApplicator/TopMarginApplicator.tsx +16 -15
  39. package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +34 -0
  40. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +15 -9
  41. package/Components/VideoLive/animationUtils.ts +3 -3
  42. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +60 -0
  43. package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +17 -55
  44. package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +15 -26
  45. package/Components/Viewport/ViewportAware/__tests__/viewportAware.test.js +12 -16
  46. package/Components/Viewport/ViewportTracker/__tests__/viewportTracker.test.js +84 -24
  47. package/Decorators/ConfigurationWrapper/withConfigurationProvider.tsx +2 -2
  48. package/Decorators/RiverFeedLoader/index.tsx +2 -8
  49. package/Decorators/RiverFeedLoader/utils/index.ts +2 -7
  50. package/Decorators/ZappPipesDataConnector/index.tsx +2 -16
  51. package/index.d.ts +0 -1
  52. package/package.json +5 -6
  53. package/Components/AudioPlayer/Artwork.tsx +0 -35
  54. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +0 -66
  55. package/Components/AudioPlayer/__tests__/audioPlayerLayout.test.js +0 -26
  56. package/Components/AudioPlayer/index.ts +0 -1
  57. package/Components/AudioPlayer/{Channel.tsx → tv/Channel.tsx} +0 -0
  58. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/Runtime.test.js +0 -0
  59. package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/Runtime.test.js.snap +2 -2
  60. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/channel.test.js.snap +0 -0
  61. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/artWork.test.js +0 -0
  62. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/channel.test.js +0 -0
  63. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/summary.test.js +0 -0
  64. /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/title.test.js +0 -0
@@ -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
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react";
4
4
 
5
- import { act, create as render } from "react-test-renderer";
5
+ import { act, render } from "@testing-library/react-native";
6
6
 
7
7
  import { ViewportAware } from "../";
8
8
  import { ViewportTracker } from "../../ViewportTracker";
@@ -12,21 +12,17 @@ import ReactNative from "react-native";
12
12
 
13
13
  jest.useFakeTimers();
14
14
 
15
- jest.mock("react-native/Libraries/ReactNative/UIManager", () => {
16
- return {
17
- ...jest.requireActual("react-native/Libraries/ReactNative/NativeUIManager"),
18
- measureLayout: (handle, parent, error, success) => {
19
- success(100, 100, 400, 400);
20
- },
21
- };
22
- });
15
+ const { ScrollView } = ReactNative;
23
16
 
24
- jest.mock("react-native/Libraries/Renderer/shims/ReactNative", () => ({
25
- ...jest.requireActual("react-native/Libraries/Renderer/shims/ReactNative"),
26
- findNodeHandle: () => 1234,
27
- }));
17
+ jest.spyOn(ReactNative, "findNodeHandle").mockImplementation(() => 1234);
28
18
 
29
- const { ScrollView } = ReactNative;
19
+ ReactNative.UIManager.measureLayout = jest.fn(
20
+ (handle, parent, error, success) => {
21
+ success(100, 100, 400, 400);
22
+ }
23
+ );
24
+
25
+ ReactNative.findNodeHandle = () => 1234;
30
26
 
31
27
  const viewportEventsManager = new ViewportEvents(true);
32
28
 
@@ -138,7 +134,7 @@ describe("<ViewportAware />", () => {
138
134
  expect(wrapper.toJSON()).toMatchSnapshot();
139
135
  expect(onViewportEnter).toHaveBeenCalled();
140
136
 
141
- const scrollviews = wrapper.root.findAllByType(ScrollView);
137
+ const scrollviews = wrapper.UNSAFE_getAllByType(ScrollView);
142
138
  expect(scrollviews).toBeArray();
143
139
  expect(scrollviews).toHaveProperty("length", 2);
144
140
 
@@ -179,7 +175,7 @@ describe("<ViewportAware />", () => {
179
175
 
180
176
  expect(wrapper.toJSON()).toMatchSnapshot();
181
177
 
182
- const scrollviews = wrapper.root.findAllByType(ScrollView);
178
+ const scrollviews = wrapper.UNSAFE_getAllByType(ScrollView);
183
179
  expect(scrollviews).toBeArray();
184
180
  expect(scrollviews).toHaveProperty("length", 2);
185
181
 
@@ -1,14 +1,19 @@
1
1
  import * as React from "react";
2
- import { ScrollView } from "react-native";
3
- import TestRenderer, { act } from "react-test-renderer";
2
+ import { act, render } from "@testing-library/react-native";
4
3
  import { ViewportEvents } from "../../ViewportEvents";
4
+ import ReactNative from "react-native";
5
+
6
+ const { ScrollView } = ReactNative;
5
7
 
6
8
  const TestComponent = () => <ScrollView />;
7
9
 
8
- jest.mock("react-native/Libraries/Renderer/shims/ReactNative", () => ({
9
- ...jest.requireActual("react-native/Libraries/Renderer/shims/ReactNative"),
10
- findNodeHandle: () => 1234,
11
- }));
10
+ jest.spyOn(ReactNative, "findNodeHandle").mockImplementation(() => 1234);
11
+
12
+ ReactNative.UIManager.measureLayout = jest.fn(
13
+ (handle, parent, error, success) => {
14
+ success(100, 100, 400, 400);
15
+ }
16
+ );
12
17
 
13
18
  const viewportEventsManager = new ViewportEvents(true);
14
19
 
@@ -23,32 +28,49 @@ const event = {
23
28
  };
24
29
 
25
30
  describe("<ViewportTracker />", () => {
26
- // eslint-disable-next-line react/prop-types
27
- const ReactWrapper = ({ children }) => (
28
- <ViewportTracker viewportEventsManager={viewportEventsManager}>
29
- <ScrollView>{children}</ScrollView>
30
- </ViewportTracker>
31
- );
32
-
33
- const wrapper = TestRenderer.create(
34
- <ReactWrapper>
35
- <TestComponent />
36
- </ReactWrapper>
37
- );
38
-
39
- const scrollView = wrapper.root.findByType(ScrollView);
40
-
41
31
  beforeEach(() => {
42
32
  viewportEventSpy.mockClear();
43
33
  });
44
34
 
45
35
  it("renders correctly", () => {
36
+ // eslint-disable-next-line react/prop-types
37
+ const ReactWrapper = ({ children }) => (
38
+ <ViewportTracker viewportEventsManager={viewportEventsManager}>
39
+ <ScrollView>{children}</ScrollView>
40
+ </ViewportTracker>
41
+ );
42
+
43
+ const wrapper = render(
44
+ <ReactWrapper>
45
+ <TestComponent />
46
+ </ReactWrapper>
47
+ );
48
+
49
+ const scrollView = wrapper.UNSAFE_getByType(ScrollView);
50
+
46
51
  expect(wrapper.toJSON()).toMatchSnapshot();
47
52
  expect(scrollView.props).toMatchSnapshot();
48
53
  });
49
54
 
50
55
  it("notifies viewport listeners when layout changes", () => {
51
- act(() => scrollView.props.onLayout(event));
56
+ // eslint-disable-next-line react/prop-types
57
+ const ReactWrapper = ({ children }) => (
58
+ <ViewportTracker viewportEventsManager={viewportEventsManager}>
59
+ <ScrollView>{children}</ScrollView>
60
+ </ViewportTracker>
61
+ );
62
+
63
+ const wrapper = render(
64
+ <ReactWrapper>
65
+ <TestComponent />
66
+ </ReactWrapper>
67
+ );
68
+
69
+ const scrollView = wrapper.UNSAFE_getByType(ScrollView);
70
+
71
+ act(() => {
72
+ scrollView.props.onLayout(event);
73
+ });
52
74
 
53
75
  expect(viewportEventSpy).toHaveBeenCalledWith(
54
76
  expect.objectContaining({
@@ -63,12 +85,50 @@ describe("<ViewportTracker />", () => {
63
85
  });
64
86
 
65
87
  it("notifies viewport listeners when content scrolls", () => {
66
- act(() => scrollView.props.onScroll(event));
88
+ // eslint-disable-next-line react/prop-types
89
+ const ReactWrapper = ({ children }) => (
90
+ <ViewportTracker viewportEventsManager={viewportEventsManager}>
91
+ <ScrollView>{children}</ScrollView>
92
+ </ViewportTracker>
93
+ );
94
+
95
+ const wrapper = render(
96
+ <ReactWrapper>
97
+ <TestComponent />
98
+ </ReactWrapper>
99
+ );
100
+
101
+ const scrollView = wrapper.UNSAFE_getByType(ScrollView);
102
+
103
+ act(() => {
104
+ scrollView.props.onLayout(event);
105
+ scrollView.props.onScroll(event);
106
+ });
107
+
67
108
  expect(viewportEventSpy).toHaveBeenCalled();
68
109
  });
69
110
 
70
111
  it("notifies viewport listeners when content size changes", () => {
71
- act(() => scrollView.props.onContentSizeChange(100, 100));
112
+ // eslint-disable-next-line react/prop-types
113
+ const ReactWrapper = ({ children }) => (
114
+ <ViewportTracker viewportEventsManager={viewportEventsManager}>
115
+ <ScrollView>{children}</ScrollView>
116
+ </ViewportTracker>
117
+ );
118
+
119
+ const wrapper = render(
120
+ <ReactWrapper>
121
+ <TestComponent />
122
+ </ReactWrapper>
123
+ );
124
+
125
+ const scrollView = wrapper.UNSAFE_getByType(ScrollView);
126
+
127
+ act(() => {
128
+ scrollView.props.onLayout(event);
129
+ scrollView.props.onContentSizeChange(100, 100);
130
+ });
131
+
72
132
  expect(viewportEventSpy).toHaveBeenCalled();
73
133
  });
74
134
  });
@@ -21,13 +21,13 @@ const prepareConfiguration = (
21
21
  keys: [string]
22
22
  ) => R.compose(R.evolve(keysMap), R.pickAll(keys))(configuration);
23
23
 
24
+ const configurationKeys = R.keys(keysMap);
25
+
24
26
  export function withConfigurationProvider(Component: React.ComponentType<any>) {
25
27
  return function WithConfigurationProvider(props: Props) {
26
28
  const styles = props?.screenData?.styles;
27
29
  const general = props?.screenData?.general;
28
30
 
29
- const configurationKeys = React.useMemo(() => R.keys(keysMap), []);
30
-
31
31
  const configuration = React.useMemo(
32
32
  () => prepareConfiguration({ ...general, ...styles }, configurationKeys),
33
33
  []
@@ -13,7 +13,6 @@ import {
13
13
  loadDatasources,
14
14
  usePipesContexts,
15
15
  } from "./utils";
16
- import { useScreenResolvers } from "@applicaster/zapp-react-native-utils/actionsExecutor/screenResolver";
17
16
 
18
17
  type RiverProps = {
19
18
  dispatch: DispatchProp;
@@ -26,7 +25,7 @@ export function WithRiverFeedLoader(Component: ZappComponent) {
26
25
  return function WrappedWithRiverFeedLoader(props: RiverProps) {
27
26
  const { river } = props;
28
27
  const { screenData, pathname } = useRoute();
29
- const resolvers = useScreenResolvers(pathname);
28
+
30
29
  const pipesContexts = usePipesContexts(river.id, pathname);
31
30
 
32
31
  const componentsToLoad = ignoreComponentsWithClearCacheFlag(
@@ -50,12 +49,7 @@ export function WithRiverFeedLoader(Component: ZappComponent) {
50
49
  item?.filter((item2) => item2 !== undefined)
51
50
  );
52
51
 
53
- loadDatasources(
54
- nonEmptyDataSources,
55
- river?.id,
56
- props.dispatch,
57
- resolvers
58
- );
52
+ loadDatasources(nonEmptyDataSources, river?.id, props.dispatch);
59
53
  }, []);
60
54
 
61
55
  return <Component {...props} />;
@@ -12,16 +12,11 @@ export { getDatasourceUrl } from "./getDatasourceUrl";
12
12
 
13
13
  export const DATASOURCE_CHUNKS = 10;
14
14
 
15
- export async function loadDatasources(
16
- urls: string[][],
17
- riverId,
18
- dispatch,
19
- resolvers
20
- ) {
15
+ export async function loadDatasources(urls: string[][], riverId, dispatch) {
21
16
  return reducePromises<string, void>(
22
17
  mapPromises<string, void>((url) => {
23
18
  if (url) {
24
- return dispatch(loadPipesData(url, { riverId, resolvers }));
19
+ return dispatch(loadPipesData(url, { riverId }));
25
20
  }
26
21
  }),
27
22
  undefined,
@@ -19,10 +19,7 @@ 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 {
23
- subscribeForUrlContextKeyChanges,
24
- subscribeForUrlScreenKeyChanges,
25
- } from "@applicaster/zapp-pipes-v2-client";
22
+ import { subscribeForUrlContextKeyChanges } from "@applicaster/zapp-pipes-v2-client";
26
23
 
27
24
  type Props = {
28
25
  component: ZappUIComponent;
@@ -207,7 +204,7 @@ export function zappPipesDataConnector(
207
204
  Component: React.FC<any> | React.ComponentClass<any>
208
205
  ) {
209
206
  return function WrappedWithZappPipesData(props: Props) {
210
- const { screenData, pathname } = useRoute();
207
+ const { screenData } = useRoute();
211
208
  const { plugins } = usePickFromState(["plugins"]);
212
209
 
213
210
  const screenContextData = useScreenContext();
@@ -289,17 +286,6 @@ export function zappPipesDataConnector(
289
286
  componentIndex
290
287
  );
291
288
 
292
- useEffect(() => {
293
- if (!(dataSourceUrl?.includes("pipesv2://") && reloadData)) {
294
- return subscribeForUrlScreenKeyChanges(
295
- dataSourceUrl,
296
- pathname,
297
- {},
298
- reloadData
299
- );
300
- }
301
- }, [dataSourceUrl, reloadData]);
302
-
303
289
  useEffect(() => {
304
290
  if (dataSourceUrl?.includes("pipesv2://") && reloadData) {
305
291
  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": "14.0.0-alpha.1661204539",
3
+ "version": "14.0.0-alpha.2247415563",
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,10 +31,10 @@
31
31
  "redux-mock-store": "^1.5.3"
32
32
  },
33
33
  "dependencies": {
34
- "@applicaster/applicaster-types": "14.0.0-alpha.1661204539",
35
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.1661204539",
36
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.1661204539",
37
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1661204539",
34
+ "@applicaster/applicaster-types": "14.0.0-alpha.2247415563",
35
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.2247415563",
36
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.2247415563",
37
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.2247415563",
38
38
  "promise": "^8.3.0",
39
39
  "url": "^0.11.0",
40
40
  "uuid": "^3.3.2"
@@ -45,7 +45,6 @@
45
45
  "immer": "*",
46
46
  "react": "*",
47
47
  "react-native": "*",
48
- "react-native-safe-area-context": "*",
49
48
  "react-native-svg": "*",
50
49
  "uglify-js": "*",
51
50
  "validate-color": "*",
@@ -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";
@@ -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
  >