@applicaster/zapp-react-native-ui-components 13.0.0-alpha.9946926334 → 13.0.0-rc.100

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 (172) 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.ios.ts +1 -1
  14. package/Components/BaseFocusable/index.tsx +2 -3
  15. package/Components/Cell/Cell.tsx +11 -16
  16. package/Components/Cell/CellWithFocusable.tsx +50 -59
  17. package/Components/Cell/CellWrapper.tsx +18 -0
  18. package/Components/Cell/TvOSCellComponent.tsx +20 -26
  19. package/Components/Cell/__tests__/CellWIthFocusable.test.js +13 -6
  20. package/Components/Cell/index.js +3 -1
  21. package/Components/Cell/styles.ts +17 -0
  22. package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +46 -48
  23. package/Components/CellRendererResolver/index.ts +2 -1
  24. package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +1 -42
  25. package/Components/ComponentResolver/__tests__/componentResolver.test.js +16 -22
  26. package/Components/ContentScreen/__tests__/contentScreen.test.js +3 -3
  27. package/Components/ErrorScreen/index.tsx +14 -6
  28. package/Components/Focusable/Focusable.tsx +1 -0
  29. package/Components/Focusable/FocusableTvOS.tsx +6 -2
  30. package/Components/Focusable/Touchable.tsx +19 -20
  31. package/Components/Focusable/index.android.tsx +10 -3
  32. package/Components/FocusableCell/index.tsx +1 -1
  33. package/Components/FocusableGroup/FocusableTvOS.tsx +34 -86
  34. package/Components/FocusableGroup/index.tsx +0 -3
  35. package/Components/FocusableList/index.tsx +26 -10
  36. package/Components/FocusableScrollView/index.tsx +43 -13
  37. package/Components/HandlePlayable/HandlePlayable.tsx +21 -27
  38. package/Components/Layout/TV/LayoutBackground.tsx +28 -0
  39. package/Components/Layout/TV/NavBarContainer.tsx +19 -23
  40. package/Components/Layout/TV/ScreenContainer.tsx +8 -2
  41. package/Components/Layout/TV/ScreenLayoutContextProvider.tsx +5 -0
  42. package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +2 -1
  43. package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +3 -2
  44. package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +3 -2
  45. package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +15 -10
  46. package/Components/Layout/TV/__tests__/index.test.tsx +8 -2
  47. package/Components/Layout/TV/index.tsx +6 -20
  48. package/Components/Layout/TV/index.web.tsx +4 -1
  49. package/Components/MasterCell/DefaultComponents/ActionButton.tsx +2 -3
  50. package/Components/MasterCell/DefaultComponents/BorderContainerView/__tests__/index.test.tsx +66 -0
  51. package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +4 -1
  52. package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +10 -15
  53. package/Components/MasterCell/DefaultComponents/Image/hooks/useImage.ts +11 -7
  54. package/Components/MasterCell/DefaultComponents/ImageBorderContainer/__tests__/index.test.ts +93 -0
  55. package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +2 -2
  56. package/Components/MasterCell/DefaultComponents/SecondaryImage/utils.ts +1 -1
  57. package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +1 -1
  58. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/const.ts +3 -0
  59. package/Components/MasterCell/DefaultComponents/tv/TvActionButtons/index.ts +6 -6
  60. package/Components/MasterCell/SharedUI/ProgressBar/hooks/useFillInPercent.ts +2 -8
  61. package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +4 -12
  62. package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +0 -229
  63. package/Components/MasterCell/__tests__/elementMapper.test.js +18 -5
  64. package/Components/MasterCell/__tests__/masterCell.test.js +26 -26
  65. package/Components/MasterCell/hooks/useAsyncRendering/MasterCellAsyncRenderManager.ts +2 -2
  66. package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
  67. package/Components/MasterCell/utils/behaviorProvider.ts +136 -0
  68. package/Components/MasterCell/utils/index.ts +9 -135
  69. package/Components/ModalComponent/BottomSheetModalContent.tsx +45 -19
  70. package/Components/ModalComponent/Button/Item.tsx +6 -5
  71. package/Components/ModalComponent/Button/assets.ts +1 -1
  72. package/Components/ModalComponent/Button/index.tsx +30 -43
  73. package/Components/ModalComponent/Header/index.tsx +3 -3
  74. package/Components/ModalComponent/utils.ts +55 -7
  75. package/Components/OfflineHandler/NotificationView/NotificationView.lg.tsx +2 -2
  76. package/Components/OfflineHandler/NotificationView/NotificationView.samsung.tsx +2 -2
  77. package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +0 -5
  78. package/Components/OfflineHandler/utils/index.ts +1 -1
  79. package/Components/PlayerContainer/PlayerContainer.tsx +43 -21
  80. package/Components/PlayerContainer/PlayerContainerContext.tsx +9 -0
  81. package/Components/PlayerContainer/ProgramInfo/index.tsx +2 -2
  82. package/Components/PlayerImageBackground/index.tsx +1 -1
  83. package/Components/River/ComponentsMap/ComponentsMap.tsx +42 -65
  84. package/Components/River/ComponentsMap/hooks/useLoadingState.ts +78 -51
  85. package/Components/River/RiverFooter.tsx +39 -9
  86. package/Components/River/RiverItem.tsx +39 -3
  87. package/Components/River/TV/index.tsx +6 -1
  88. package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +100 -31
  89. package/Components/River/__tests__/__snapshots__/river.test.js.snap +20 -82
  90. package/Components/River/__tests__/componentsMap.test.js +17 -5
  91. package/Components/River/__tests__/river.test.js +75 -40
  92. package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +11 -4
  93. package/Components/RouteManager/__tests__/routeManager.test.js +29 -14
  94. package/Components/RouteManager/__tests__/testId.test.js +8 -6
  95. package/Components/Screen/TV/index.web.tsx +5 -6
  96. package/Components/Screen/hooks.ts +53 -0
  97. package/Components/Screen/index.tsx +16 -42
  98. package/Components/ScreenResolver/__tests__/screenResolver.test.js +91 -70
  99. package/Components/Tabs/Tab.tsx +11 -9
  100. package/Components/TextInputTv/index.tsx +4 -3
  101. package/Components/TopMarginApplicator/TopMarginApplicator.tsx +2 -3
  102. package/Components/TrackedView/index.tsx +1 -0
  103. package/Components/Transitioner/AnimationManager.js +15 -15
  104. package/Components/Transitioner/Scene.tsx +53 -24
  105. package/Components/Transitioner/Transitioner.tsx +3 -3
  106. package/Components/Transitioner/__tests__/Scene.test.js +25 -14
  107. package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +9 -49
  108. package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +2 -2
  109. package/Components/Transitioner/__tests__/transitioner.test.js +13 -4
  110. package/Components/Transitioner/index.js +8 -4
  111. package/Components/VideoLive/LiveImageManager.ts +27 -1
  112. package/Components/VideoLive/PlayerLiveImageComponent.tsx +36 -24
  113. package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +51 -1
  114. package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +1 -5
  115. package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +1 -1
  116. package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +51 -31
  117. package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +8 -4
  118. package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +48 -22
  119. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +12 -6
  120. package/Components/VideoModal/ModalAnimation/__tests__/getMoveUpValue.test.ts +108 -0
  121. package/Components/VideoModal/ModalAnimation/const.ts +5 -0
  122. package/Components/VideoModal/ModalAnimation/index.ts +2 -0
  123. package/Components/VideoModal/ModalAnimation/utils.ts +38 -2
  124. package/Components/VideoModal/OpaqueLayer.tsx +33 -0
  125. package/Components/VideoModal/PlayerDetails.tsx +18 -10
  126. package/Components/VideoModal/PlayerWrapper.tsx +43 -39
  127. package/Components/VideoModal/VideoModal.tsx +17 -11
  128. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +1 -1
  129. package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +2 -40
  130. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +0 -90
  131. package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +89 -0
  132. package/Components/VideoModal/hooks/index.ts +7 -0
  133. package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +49 -0
  134. package/Components/VideoModal/hooks/utils/__tests__/showDetails.test.ts +91 -0
  135. package/Components/VideoModal/hooks/utils/index.ts +33 -0
  136. package/Components/VideoModal/utils.ts +4 -5
  137. package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +24 -36
  138. package/Components/Viewport/ViewportAware/__tests__/viewportAware.test.js +12 -18
  139. package/Components/Viewport/__tests__/utils.test.js +5 -4
  140. package/Components/ZappUIComponent/Placeholder.tsx +3 -1
  141. package/Components/ZappUIComponent/__tests__/{ZappUIComponent.test.js → ZappUIComponent.test.tsx} +26 -10
  142. package/Components/ZappUIComponent/index.tsx +4 -17
  143. package/Components/default-cell-renderer/__tests__/defaultCellRenderer.test.tsx +20 -17
  144. package/Components/default-cell-renderer/viewTrees/tv/DefaultCell/__tests__/DefaultCell.test.tsx +15 -11
  145. package/Contexts/ComponentsMapOffsetContext/index.tsx +49 -0
  146. package/Contexts/FocusableGroupContext/withFocusableContext.tsx +4 -10
  147. package/Contexts/HeaderOffsetContext/index.tsx +4 -6
  148. package/Contexts/ScreenContext/index.tsx +6 -12
  149. package/Contexts/ScreenLayoutContext/index.tsx +5 -3
  150. package/Decorators/Navigator/__tests__/navigator.test.js +16 -16
  151. package/Decorators/Navigator/index.tsx +1 -1
  152. package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +18 -24
  153. package/Decorators/RiverResolver/index.tsx +6 -8
  154. package/Decorators/ZappPipesDataConnector/__tests__/Hero.js +1 -1
  155. package/Decorators/ZappPipesDataConnector/__tests__/zappPipesDataConnector.test.js +29 -22
  156. package/Decorators/ZappPipesDataConnector/index.tsx +6 -2
  157. package/package.json +7 -11
  158. package/tsconfig.json +2 -3
  159. package/.babelrc +0 -8
  160. package/Components/Cell/CellStyles/FallbackCellStyle/index.js +0 -157
  161. package/Components/Cell/CellStyles/Hero/index.js +0 -111
  162. package/Components/Cell/CellStyles/ScreenSelector/index.js +0 -68
  163. package/Components/Cell/CellStyles/cellStylesResolver.ts +0 -19
  164. package/Components/Cell/CellStyles/colors.js +0 -40
  165. package/Components/Cell/CellStyles/index.js +0 -15
  166. package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +0 -53
  167. package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +0 -17
  168. package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +0 -17
  169. package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +0 -91
  170. package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +0 -338
  171. package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +0 -18
  172. package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +0 -28
@@ -1,157 +0,0 @@
1
- import {
2
- getColor,
3
- ACTIVE_COLOR,
4
- BACKGROUND_COLOR,
5
- MAIN_TEXT_COLOR,
6
- FOCUSED_TEXT_COLOR,
7
- } from "../colors";
8
-
9
- const Image = "Image";
10
- const View = "View";
11
- const Text = "Text";
12
-
13
- const containerStyles = (styles) => ({
14
- flex: 1,
15
- flexDirection: "column",
16
- width: 384,
17
- height: 436,
18
- borderRadius: 4,
19
- backgroundColor: getColor(BACKGROUND_COLOR, styles),
20
- marginRight: 48,
21
- marginBottom: 48,
22
- });
23
-
24
- const focusedContainerStyles = (styles) => ({
25
- ...containerStyles(styles),
26
- backgroundColor: getColor(ACTIVE_COLOR, styles),
27
- });
28
-
29
- const imageStyle = {
30
- width: 384,
31
- height: 216,
32
- borderTopRightRadius: 4,
33
- borderTopLeftRadius: 4,
34
- };
35
-
36
- const titleContainerStyles = {
37
- width: 336,
38
- height: 60,
39
- marginHorizontal: 24,
40
- marginTop: 24,
41
- overflow: "hidden",
42
- };
43
-
44
- const titleStyles = (styles) => ({
45
- fontSize: 26,
46
- color: getColor(MAIN_TEXT_COLOR, styles),
47
- fontWeight: "bold",
48
- fontStyle: "normal",
49
- });
50
-
51
- const focusedTitleStyles = (styles) => ({
52
- ...titleStyles(styles),
53
- color: getColor(FOCUSED_TEXT_COLOR, styles),
54
- });
55
-
56
- const subtitleContainerStyles = {
57
- width: 336,
58
- height: 88,
59
- marginHorizontal: 24,
60
- marginTop: 24,
61
- overflow: "hidden",
62
- };
63
-
64
- const subtitleStyles = (styles) => ({
65
- fontSize: 24,
66
- fontWeight: "normal",
67
- opacity: 0.8,
68
- color: getColor(MAIN_TEXT_COLOR, styles),
69
- fontStyle: "normal",
70
- });
71
-
72
- const focusedSubtitleStyles = (styles) => ({
73
- ...subtitleStyles(styles),
74
- color: getColor(FOCUSED_TEXT_COLOR, styles),
75
- });
76
-
77
- const viewTree = (state, styles) => [
78
- {
79
- type: View,
80
- style:
81
- state === "focused"
82
- ? focusedContainerStyles(styles)
83
- : containerStyles(styles),
84
- elements: [
85
- {
86
- type: Image,
87
- style: imageStyle,
88
- data: [
89
- {
90
- func: "image_src_from_media_item",
91
- args: ["thumbnail-small"],
92
- propName: "uri",
93
- },
94
- ],
95
- },
96
- {
97
- type: View,
98
- style: titleContainerStyles,
99
- elements: [
100
- {
101
- type: Text,
102
- style:
103
- state === "focused"
104
- ? focusedTitleStyles(styles)
105
- : titleStyles(styles),
106
- data: [
107
- {
108
- func: "path",
109
- args: ["title"],
110
- propName: "label",
111
- },
112
- ],
113
- additionalProps: {
114
- numberOfLines: 2,
115
- },
116
- },
117
- ],
118
- },
119
- {
120
- type: View,
121
- style: subtitleContainerStyles,
122
- elements: [
123
- {
124
- type: Text,
125
- style:
126
- state === "focused"
127
- ? focusedSubtitleStyles(styles)
128
- : subtitleStyles(styles),
129
- data: [
130
- {
131
- func: "path",
132
- args: ["summary"],
133
- propName: "label",
134
- },
135
- ],
136
- additionalProps: {
137
- numberOfLines: 3,
138
- },
139
- },
140
- ],
141
- },
142
- ],
143
- },
144
- ];
145
-
146
- export const fallbackCellStyle = (styles) => ({
147
- content_types: {
148
- default: {
149
- states: {
150
- default: viewTree("default", styles),
151
- focused: viewTree("focused", styles),
152
- selected: viewTree("selected", styles),
153
- focused_selected: viewTree("focused_selected", styles),
154
- },
155
- },
156
- },
157
- });
@@ -1,111 +0,0 @@
1
- import {
2
- getColor,
3
- ACTIVE_COLOR,
4
- BACKGROUND_COLOR,
5
- MAIN_TEXT_COLOR,
6
- FOCUSED_TEXT_COLOR,
7
- } from "../colors";
8
-
9
- const Image = "Image";
10
- const View = "View";
11
- const Text = "Text";
12
-
13
- const containerStyles = (styles) => ({
14
- flex: 1,
15
- flexDirection: "column",
16
- width: 1280,
17
- height: 436,
18
- borderRadius: 4,
19
- backgroundColor: getColor(BACKGROUND_COLOR, styles),
20
- marginRight: 48,
21
- marginBottom: 48,
22
- });
23
-
24
- const focusedContainerStyles = (styles) => ({
25
- ...containerStyles(styles),
26
- backgroundColor: getColor(ACTIVE_COLOR, styles),
27
- });
28
-
29
- const imageStyle = {
30
- width: 1280,
31
- height: 352,
32
- borderTopRightRadius: 4,
33
- borderTopLeftRadius: 4,
34
- };
35
-
36
- const titleContainerStyles = {
37
- width: 1184,
38
- height: 60,
39
- marginHorizontal: 24,
40
- marginTop: 24,
41
- overflow: "hidden",
42
- };
43
-
44
- const titleStyles = (styles) => ({
45
- fontSize: 26,
46
- color: getColor(MAIN_TEXT_COLOR, styles),
47
- fontWeight: "bold",
48
- fontStyle: "normal",
49
- });
50
-
51
- const focusedTitleStyles = (styles) => ({
52
- ...titleStyles(styles),
53
- color: getColor(FOCUSED_TEXT_COLOR, styles),
54
- });
55
-
56
- const viewTree = (state, styles) => [
57
- {
58
- type: View,
59
- style:
60
- state === "focused"
61
- ? focusedContainerStyles(styles)
62
- : containerStyles(styles),
63
- elements: [
64
- {
65
- type: Image,
66
- style: imageStyle,
67
- data: [
68
- {
69
- func: "image_src_from_media_item",
70
- args: ["thumbnail-small"],
71
- propName: "uri",
72
- },
73
- ],
74
- },
75
- {
76
- type: View,
77
- style: titleContainerStyles,
78
- elements: [
79
- {
80
- type: Text,
81
- style:
82
- state === "focused"
83
- ? focusedTitleStyles(styles)
84
- : titleStyles(styles),
85
- data: [
86
- {
87
- func: "path",
88
- args: ["title"],
89
- propName: "label",
90
- },
91
- ],
92
- additionalProps: {
93
- numberOfLines: 2,
94
- },
95
- },
96
- ],
97
- },
98
- ],
99
- },
100
- ];
101
-
102
- export const hero = (styles) => ({
103
- content_types: {
104
- default: {
105
- states: {
106
- default: viewTree("default", styles),
107
- focused: viewTree("focused", styles),
108
- },
109
- },
110
- },
111
- });
@@ -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,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`] = `""`;