@applicaster/zapp-react-native-ui-components 13.0.0-alpha.7330390362 → 13.0.0-alpha.7620873141

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 (147) hide show
  1. package/Components/AppContainer/__tests__/AppContainer.test.js +4 -6
  2. package/Components/AudioPlayer/AudioPlayer.tsx +7 -0
  3. package/Components/AudioPlayer/__tests__/Runtime.test.js +5 -8
  4. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayer.test.js.snap +54 -111
  5. package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +36 -20
  6. package/Components/AudioPlayer/__tests__/artWork.test.js +3 -5
  7. package/Components/AudioPlayer/__tests__/audioPlayer.test.js +3 -5
  8. package/Components/AudioPlayer/__tests__/audioPlayerLayout.test.js +7 -8
  9. package/Components/AudioPlayer/__tests__/channel.test.js +3 -5
  10. package/Components/AudioPlayer/__tests__/summary.test.js +3 -5
  11. package/Components/AudioPlayer/__tests__/title.test.js +3 -5
  12. package/Components/AudioPlayer/helpers.tsx +1 -0
  13. package/Components/BaseFocusable/index.tsx +1 -2
  14. package/Components/Cell/Cell.tsx +4 -13
  15. package/Components/Cell/CellWithFocusable.tsx +22 -15
  16. package/Components/Cell/CellWrapper.tsx +18 -0
  17. package/Components/Cell/TvOSCellComponent.tsx +20 -22
  18. package/Components/Cell/index.js +3 -1
  19. package/Components/Cell/styles.ts +17 -0
  20. package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +46 -48
  21. package/Components/CellRendererResolver/index.ts +2 -1
  22. package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +1 -42
  23. package/Components/ComponentResolver/__tests__/componentResolver.test.js +16 -22
  24. package/Components/ContentScreen/__tests__/contentScreen.test.js +3 -3
  25. package/Components/ErrorScreen/index.tsx +14 -6
  26. package/Components/Focusable/Focusable.tsx +1 -0
  27. package/Components/Focusable/FocusableTvOS.tsx +5 -1
  28. package/Components/Focusable/index.android.tsx +10 -3
  29. package/Components/FocusableCell/index.tsx +1 -1
  30. package/Components/FocusableGroup/FocusableTvOS.tsx +34 -86
  31. package/Components/FocusableGroup/index.tsx +0 -3
  32. package/Components/FocusableList/index.tsx +26 -9
  33. package/Components/FocusableScrollView/index.tsx +43 -13
  34. package/Components/HandlePlayable/HandlePlayable.tsx +21 -27
  35. package/Components/Layout/TV/LayoutBackground.tsx +28 -0
  36. package/Components/Layout/TV/NavBarContainer.tsx +19 -23
  37. package/Components/Layout/TV/ScreenContainer.tsx +8 -2
  38. package/Components/Layout/TV/ScreenLayoutContextProvider.tsx +5 -0
  39. package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +2 -1
  40. package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -2
  41. package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +3 -2
  42. package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +15 -10
  43. package/Components/Layout/TV/__tests__/index.test.tsx +8 -2
  44. package/Components/Layout/TV/index.tsx +6 -20
  45. package/Components/Layout/TV/index.web.tsx +4 -1
  46. package/Components/MasterCell/DefaultComponents/ActionButton.tsx +2 -3
  47. package/Components/MasterCell/DefaultComponents/Image/Image.android.tsx +0 -6
  48. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +4 -9
  49. package/Components/MasterCell/DefaultComponents/Image/hooks/useImage.ts +11 -7
  50. package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +2 -2
  51. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/const.ts +3 -0
  52. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/index.ts +6 -6
  53. package/Components/MasterCell/SharedUI/ProgressBar/hooks/useFillInPercent.ts +2 -8
  54. package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +4 -12
  55. package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +0 -229
  56. package/Components/MasterCell/__tests__/elementMapper.test.js +18 -5
  57. package/Components/MasterCell/__tests__/masterCell.test.js +26 -26
  58. package/Components/MasterCell/utils/behaviorProvider.ts +136 -0
  59. package/Components/MasterCell/utils/index.ts +8 -134
  60. package/Components/ModalComponent/BottomSheetModalContent.tsx +45 -19
  61. package/Components/ModalComponent/Button/Item.tsx +6 -5
  62. package/Components/ModalComponent/Button/assets.ts +1 -1
  63. package/Components/ModalComponent/Button/index.tsx +30 -43
  64. package/Components/ModalComponent/utils.ts +55 -7
  65. package/Components/OfflineHandler/NotificationView/NotificationView.lg.tsx +2 -2
  66. package/Components/OfflineHandler/NotificationView/NotificationView.samsung.tsx +2 -2
  67. package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +0 -5
  68. package/Components/OfflineHandler/utils/index.ts +1 -1
  69. package/Components/PlayerContainer/PlayerContainer.tsx +40 -14
  70. package/Components/PlayerContainer/ProgramInfo/index.tsx +2 -2
  71. package/Components/PlayerImageBackground/index.tsx +1 -1
  72. package/Components/River/ComponentsMap/ComponentsMap.tsx +3 -0
  73. package/Components/River/ComponentsMap/hooks/useLoadingState.ts +3 -3
  74. package/Components/River/RiverItem.tsx +2 -1
  75. package/Components/River/TV/index.tsx +6 -1
  76. package/Components/River/__tests__/__snapshots__/river.test.js.snap +20 -82
  77. package/Components/River/__tests__/river.test.js +75 -40
  78. package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +11 -4
  79. package/Components/RouteManager/__tests__/routeManager.test.js +29 -14
  80. package/Components/RouteManager/__tests__/testId.test.js +8 -6
  81. package/Components/Screen/TV/index.web.tsx +5 -6
  82. package/Components/Screen/hooks.ts +3 -6
  83. package/Components/Screen/index.tsx +4 -4
  84. package/Components/ScreenResolver/__tests__/screenResolver.test.js +91 -70
  85. package/Components/Tabs/Tab.tsx +5 -3
  86. package/Components/TextInputTv/index.tsx +2 -1
  87. package/Components/TopMarginApplicator/TopMarginApplicator.tsx +2 -3
  88. package/Components/TrackedView/index.tsx +1 -0
  89. package/Components/Transitioner/AnimationManager.js +15 -15
  90. package/Components/Transitioner/Scene.tsx +1 -1
  91. package/Components/Transitioner/Transitioner.tsx +3 -3
  92. package/Components/Transitioner/__tests__/Scene.test.js +25 -14
  93. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +12 -68
  94. package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +2 -2
  95. package/Components/Transitioner/__tests__/transitioner.test.js +13 -4
  96. package/Components/VideoLive/PlayerLiveImageComponent.tsx +7 -3
  97. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +1 -0
  98. package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +1 -1
  99. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +46 -30
  100. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +3 -3
  101. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +45 -20
  102. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +10 -3
  103. package/Components/VideoModal/ModalAnimation/__tests__/getMoveUpValue.test.ts +108 -0
  104. package/Components/VideoModal/ModalAnimation/const.ts +5 -0
  105. package/Components/VideoModal/ModalAnimation/index.ts +2 -0
  106. package/Components/VideoModal/ModalAnimation/utils.ts +36 -0
  107. package/Components/VideoModal/PlayerDetails.tsx +18 -10
  108. package/Components/VideoModal/PlayerWrapper.tsx +28 -5
  109. package/Components/VideoModal/VideoModal.tsx +19 -4
  110. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +2 -40
  111. package/Components/VideoModal/utils.ts +3 -4
  112. package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +24 -36
  113. package/Components/Viewport/ViewportAware/__tests__/viewportAware.test.js +12 -18
  114. package/Components/Viewport/__tests__/utils.test.js +5 -4
  115. package/Components/ZappUIComponent/Placeholder.tsx +3 -1
  116. package/Components/ZappUIComponent/__tests__/{ZappUIComponent.test.js → ZappUIComponent.test.tsx} +26 -10
  117. package/Components/ZappUIComponent/index.tsx +4 -17
  118. package/Components/default-cell-renderer/__tests__/defaultCellRenderer.test.tsx +20 -17
  119. package/Components/default-cell-renderer/viewTrees/tv/DefaultCell/__tests__/DefaultCell.test.tsx +15 -11
  120. package/Contexts/ComponentsMapOffsetContext/index.tsx +49 -0
  121. package/Contexts/FocusableGroupContext/withFocusableContext.tsx +4 -10
  122. package/Contexts/HeaderOffsetContext/index.tsx +4 -6
  123. package/Contexts/ScreenContext/index.tsx +3 -10
  124. package/Contexts/ScreenLayoutContext/index.tsx +5 -3
  125. package/Decorators/Navigator/__tests__/navigator.test.js +16 -16
  126. package/Decorators/Navigator/index.tsx +1 -1
  127. package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +18 -24
  128. package/Decorators/RiverResolver/index.tsx +6 -8
  129. package/Decorators/ZappPipesDataConnector/__tests__/zappPipesDataConnector.test.js +29 -22
  130. package/Decorators/ZappPipesDataConnector/index.tsx +4 -30
  131. package/package.json +7 -11
  132. package/tsconfig.json +2 -3
  133. package/.babelrc +0 -8
  134. package/Components/Cell/CellStyles/FallbackCellStyle/index.js +0 -157
  135. package/Components/Cell/CellStyles/Hero/index.js +0 -111
  136. package/Components/Cell/CellStyles/ScreenSelector/index.js +0 -68
  137. package/Components/Cell/CellStyles/cellStylesResolver.ts +0 -19
  138. package/Components/Cell/CellStyles/colors.js +0 -40
  139. package/Components/Cell/CellStyles/index.js +0 -15
  140. package/Components/Cell/CellWithFocusable.ios.tsx +0 -126
  141. package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +0 -53
  142. package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +0 -17
  143. package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +0 -17
  144. package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +0 -91
  145. package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +0 -338
  146. package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +0 -18
  147. package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +0 -28
@@ -1,68 +0,0 @@
1
- const viewTree = (state) => [
2
- {
3
- type: "View",
4
- style: {
5
- flex: 1,
6
- // aspectRatio: 1.0487804878,
7
- paddingTop: 14,
8
- paddingBottom: 14,
9
- paddingRight: 30,
10
- },
11
- elements: [
12
- {
13
- type: "View",
14
-
15
- elements: [
16
- {
17
- type: "Text",
18
-
19
- style: {
20
- // paddingHorizontal: "15%",
21
- paddingTop: "2%",
22
- paddingBottom: "2%",
23
- fontSize: 26,
24
- lineHeight: 32,
25
- color:
26
- state === "focused" || state === "selected"
27
- ? "rgba(239,239,239,1.0)"
28
- : "rgba(239,239,239,0.61)",
29
- fontWeight: "700",
30
- },
31
- data: [
32
- {
33
- func: "path",
34
- args: ["title"],
35
- propName: "label",
36
- },
37
- ],
38
- additionalProps: {
39
- numberOfLines: 2,
40
- },
41
- },
42
- {
43
- type: "View",
44
- style: {
45
- height: 10,
46
- alignItems: "center",
47
- justifyContent: "center",
48
- borderColor: state === "focused" ? "#FC461B" : "transparent",
49
- borderBottomWidth: 6,
50
- },
51
- },
52
- ],
53
- },
54
- ],
55
- },
56
- ];
57
-
58
- export const screenSelector = {
59
- content_types: {
60
- default: {
61
- states: {
62
- default: viewTree("default"),
63
- focused: viewTree("focused"),
64
- selected: viewTree("selected"),
65
- },
66
- },
67
- },
68
- };
@@ -1,19 +0,0 @@
1
- import * as R from "ramda";
2
-
3
- import { cellStyles } from "./index";
4
-
5
- type Props = {
6
- cellStyle: string | null | undefined;
7
- componentType: string | null | undefined;
8
- };
9
-
10
- export function cellStylesResolver({ cellStyle, componentType }: Props) {
11
- const componentCellStyles =
12
- R.prop(componentType, cellStyles) || cellStyles.default;
13
-
14
- const result =
15
- R.prop(cellStyle || "fallbackCellStyle", componentCellStyles) ||
16
- componentCellStyles.fallbackCellStyle;
17
-
18
- return result;
19
- }
@@ -1,40 +0,0 @@
1
- import { transformColorCode as fixColorHexCode } from "@applicaster/zapp-react-native-utils/transform";
2
- import * as R from "ramda";
3
-
4
- export const ACTIVE_COLOR = "ACTIVE_COLOR";
5
-
6
- export const BACKGROUND_COLOR = "BACKGROUND_COLOR";
7
-
8
- export const MAIN_TEXT_COLOR = "MAIN_TEXT_COLOR";
9
-
10
- export const FOCUSED_TEXT_COLOR = "FOCUSED_TEXT_COLOR";
11
-
12
- const colorKeyPath = (keyName) => ["tv", keyName, "color"];
13
-
14
- const COLORS = {
15
- [ACTIVE_COLOR]: {
16
- path: colorKeyPath("active"),
17
- default: "#FC461B",
18
- },
19
- [BACKGROUND_COLOR]: {
20
- path: colorKeyPath("background"),
21
- default: "#2F2F2F",
22
- },
23
- [MAIN_TEXT_COLOR]: {
24
- path: colorKeyPath("main_text"),
25
- default: "#EFEFEF",
26
- },
27
- [FOCUSED_TEXT_COLOR]: {
28
- path: colorKeyPath("focused_text_color"),
29
- default: "#FFFFFF",
30
- },
31
- };
32
-
33
- export const getColor = (name, styles) => {
34
- const colorKeyPath = R.path([name, "path"], COLORS);
35
-
36
- return (
37
- fixColorHexCode(R.path(colorKeyPath, styles)) ||
38
- R.path([name, "default"], COLORS)
39
- );
40
- };
@@ -1,15 +0,0 @@
1
- import { fallbackCellStyle } from "./FallbackCellStyle";
2
- import { hero } from "./Hero";
3
- import { screenSelector } from "./ScreenSelector";
4
-
5
- export const cellStyles = {
6
- default: {
7
- default: fallbackCellStyle,
8
- },
9
- hero: {
10
- default: hero,
11
- },
12
- screenSelector: {
13
- default: screenSelector,
14
- },
15
- };
@@ -1,126 +0,0 @@
1
- /** TODO: Remove this file when tvos FocusableGroup
2
- * behaviour is aligned to the web one
3
- * FocusableGroup should only send onFocus and onBlur events when
4
- * Focus enters and leaves the Focusables inside the branch
5
- */
6
- import * as React from "react";
7
-
8
- import { focusManager } from "@applicaster/zapp-react-native-utils/appUtils/focusManager";
9
- import * as FOCUS_EVENTS from "@applicaster/zapp-react-native-utils/appUtils/focusManager/events";
10
- import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
11
- import { toBooleanWithDefaultFalse } from "@applicaster/zapp-react-native-utils/booleanUtils";
12
-
13
- import { isAppleTV } from "../../Helpers/Platform";
14
- import { useCellState } from "../MasterCell/utils";
15
-
16
- const useCellFocusedState = (
17
- skipFocusManagerRegistration: boolean,
18
- groupId: string,
19
- id: string
20
- ) => {
21
- const [currentCellFocused, setCurrentCellFocused] = React.useState(false);
22
-
23
- React.useEffect(() => {
24
- const isGroupItemFocused = () => {
25
- if (!skipFocusManagerRegistration) {
26
- const isFocused = focusManager.isGroupItemFocused(groupId, id);
27
- setCurrentCellFocused(isFocused);
28
- }
29
- };
30
-
31
- const handler = () => {
32
- // tvOS hack for properly checking focus
33
- if (isAppleTV()) {
34
- setTimeout(() => {
35
- isGroupItemFocused();
36
- }, 0);
37
- } else {
38
- isGroupItemFocused();
39
- }
40
- };
41
-
42
- focusManager.on(FOCUS_EVENTS.FOCUS, handler);
43
-
44
- return () => {
45
- focusManager.removeHandler(FOCUS_EVENTS.FOCUS, handler);
46
- };
47
- }, [groupId, skipFocusManagerRegistration]);
48
-
49
- return currentCellFocused;
50
- };
51
-
52
- type Props = {
53
- item: ZappEntry;
54
- CellRenderer: React.FunctionComponent<any>;
55
- id: string;
56
- groupId: string;
57
- onFocus: Function;
58
- index: number;
59
- scrollTo: Function;
60
- preferredFocus?: boolean;
61
- skipFocusManagerRegistration?: boolean;
62
- isFocusable?: boolean;
63
- behavior: Behavior;
64
- focused?: boolean;
65
- };
66
-
67
- export function CellWithFocusable(props: Props) {
68
- const {
69
- index,
70
- item,
71
- CellRenderer,
72
- id,
73
- groupId,
74
- onFocus,
75
- scrollTo = noop,
76
- preferredFocus,
77
- skipFocusManagerRegistration,
78
- isFocusable,
79
- behavior,
80
- focused,
81
- } = props;
82
-
83
- const isFocused = useCellFocusedState(
84
- skipFocusManagerRegistration,
85
- groupId,
86
- id
87
- );
88
-
89
- const state = useCellState({
90
- id: item.id,
91
- behavior,
92
- focused: isFocused || toBooleanWithDefaultFalse(focused),
93
- });
94
-
95
- const [focusedButtonId, setFocusedButtonId] = React.useState(undefined);
96
-
97
- // for horizontal scrolling
98
- React.useEffect(() => {
99
- if (focusedButtonId) {
100
- scrollTo(index);
101
- }
102
- }, [focusedButtonId]);
103
-
104
- const handleToggleFocus = (value) => {
105
- setFocusedButtonId(value.focusedButtonId);
106
-
107
- if (value.focusable) {
108
- onFocus(value.focusable, value.mouse);
109
- }
110
- };
111
-
112
- return (
113
- <CellRenderer
114
- item={item}
115
- groupId={groupId}
116
- onToggleFocus={handleToggleFocus}
117
- state={state}
118
- prefixId={id}
119
- focusedButtonId={focusedButtonId}
120
- preferredFocus={preferredFocus}
121
- skipFocusManagerRegistration={skipFocusManagerRegistration}
122
- isFocusable={isFocusable}
123
- focused={focused}
124
- />
125
- );
126
- }
@@ -1,53 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`CellRendererResolver renders correctly 1`] = `
4
- <View
5
- someProp={
6
- {
7
- "cellOptions": {},
8
- "cellStyles": {
9
- "ABCDE-123456": {
10
- "configuration": {},
11
- "plugin_identifier": "custom_renderer_plugin",
12
- },
13
- "FGHIJ-123456": {
14
- "configuration": {},
15
- "plugin_identifier": "unknown_plugin",
16
- },
17
- },
18
- "component": {
19
- "styles": {
20
- "cell_plugin_configuration_id": "ABCDE-123456",
21
- },
22
- },
23
- "styles": {},
24
- }
25
- }
26
- />
27
- `;
28
-
29
- exports[`CellRendererResolver with a default renderer plugin renders correctly 1`] = `
30
- <View
31
- someProp={
32
- {
33
- "cellOptions": {},
34
- "cellStyles": {
35
- "ABCDE-123456": {
36
- "configuration": {},
37
- "plugin_identifier": "custom_renderer_plugin",
38
- },
39
- "FGHIJ-123456": {
40
- "configuration": {},
41
- "plugin_identifier": "unknown_plugin",
42
- },
43
- },
44
- "component": {
45
- "styles": {
46
- "cell_plugin_configuration_id": "ABCDE-123456",
47
- },
48
- },
49
- "styles": {},
50
- }
51
- }
52
- />
53
- `;
@@ -1,17 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`TestId renders correctly and assigns the testID to a wrapping view 1`] = `
4
- <View
5
- accessibilityLabel="A1234"
6
- style={
7
- {
8
- "flex": 1,
9
- }
10
- }
11
- testID="A1234"
12
- >
13
- <TestComponent
14
- name="dev test"
15
- />
16
- </View>
17
- `;
@@ -1,17 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<ScreenResolver /> renders correctly 1`] = `
4
- <mockConstructor
5
- screenData={{}}
6
- screenId="1234"
7
- screenType="screen_type_1"
8
- />
9
- `;
10
-
11
- exports[`<ScreenResolver /> wraps the player with the playerController component when the screenType is playable 1`] = `
12
- <HandlePlayable
13
- isModal={false}
14
- item={{}}
15
- mode="FULLSCREEN"
16
- />
17
- `;
@@ -1,91 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ZappUIComponent when zapp pipes data is loading renders correctly otherwise 1`] = `
4
- <ContextProvider
5
- value={
6
- {
7
- "parent": null,
8
- }
9
- }
10
- >
11
- <LoadingComponent
12
- onLoadFinished={[MockFunction]}
13
- parent={null}
14
- zappPipesData={
15
- {
16
- "loading": true,
17
- }
18
- }
19
- />
20
- </ContextProvider>
21
- `;
22
-
23
- exports[`ZappUIComponent when zapp pipes data is loading renders null if no loading component is provided 1`] = `
24
- <ContextProvider
25
- value={
26
- {
27
- "parent": null,
28
- }
29
- }
30
- >
31
- <Placeholder
32
- onLoadFinished={[MockFunction]}
33
- parent={null}
34
- zappPipesData={
35
- {
36
- "loading": true,
37
- }
38
- }
39
- />
40
- </ContextProvider>
41
- `;
42
-
43
- exports[`ZappUIComponent when zapp pipes data returns properly renders correctly 1`] = `
44
- <ContextProvider
45
- value={
46
- {
47
- "parent": null,
48
- }
49
- }
50
- >
51
- <Component
52
- onLoadFinished={[MockFunction]}
53
- parent={null}
54
- zappPipesData={
55
- {
56
- "data": {
57
- "type": {
58
- "value": "feed",
59
- },
60
- },
61
- "loading": false,
62
- }
63
- }
64
- />
65
- </ContextProvider>
66
- `;
67
-
68
- exports[`ZappUIComponent whenn zapp pipes data returns with error renders correctly otherwise 1`] = `
69
- <ContextProvider
70
- value={
71
- {
72
- "parent": null,
73
- }
74
- }
75
- >
76
- <ErrorComponent
77
- onLoadFinished={[MockFunction]}
78
- parent={null}
79
- zappPipesData={
80
- {
81
- "error": {
82
- "message": "oups",
83
- },
84
- "loading": false,
85
- }
86
- }
87
- />
88
- </ContextProvider>
89
- `;
90
-
91
- exports[`ZappUIComponent whenn zapp pipes data returns with error renders null if no error component is provided 1`] = `""`;