@applicaster/zapp-react-native-ui-components 13.0.0-alpha.5371423120 → 13.0.0-alpha.7210171818
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Components/Cell/Cell.tsx +0 -4
- package/Components/Screen/index.tsx +1 -1
- package/Components/VideoModal/PlayerWrapper.tsx +59 -71
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +6 -36
- package/Components/ZappFrameworkComponents/BarView/BarView.tsx +1 -0
- package/package.json +5 -5
package/Components/Cell/Cell.tsx
CHANGED
|
@@ -148,10 +148,6 @@ export class CellComponent extends React.Component<Props, State> {
|
|
|
148
148
|
shouldScrollVertically?.(mouse, focusable, id, title)
|
|
149
149
|
) {
|
|
150
150
|
this.scrollVertically(focusable);
|
|
151
|
-
|
|
152
|
-
const accessibilityManager = AccessibilityManager.getInstance();
|
|
153
|
-
// Text from DSP should be localized already
|
|
154
|
-
accessibilityManager.readText({ text: title });
|
|
155
151
|
}
|
|
156
152
|
}
|
|
157
153
|
}
|
|
@@ -128,7 +128,7 @@ export function Screen(_props: Props) {
|
|
|
128
128
|
<View style={style}>
|
|
129
129
|
{navBarProps && <NavBar {...navBarProps} hasMenu={hasMenu} />}
|
|
130
130
|
|
|
131
|
-
<OfflineFallbackScreen
|
|
131
|
+
<OfflineFallbackScreen>
|
|
132
132
|
{/* @TODO RouteManager doesn't use props, can they be removed ? */}
|
|
133
133
|
<RouteManager pathname={pathname} screenData={screenData} />
|
|
134
134
|
</OfflineFallbackScreen>
|
|
@@ -11,9 +11,6 @@ import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
|
11
11
|
import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
12
12
|
import { PlayerDetails } from "./PlayerDetails";
|
|
13
13
|
import { playerDimesionsHack } from "./utils";
|
|
14
|
-
import { PathnameContext } from "../../Contexts/PathnameContext";
|
|
15
|
-
import { ScreenContextProvider } from "../../Contexts/ScreenContext";
|
|
16
|
-
import { ROUTE_TYPES } from "@applicaster/zapp-react-native-utils/navigationUtils/routeTypes";
|
|
17
14
|
|
|
18
15
|
import {
|
|
19
16
|
AnimatedScrollModal,
|
|
@@ -124,19 +121,20 @@ const getTabletWidth = (
|
|
|
124
121
|
return Number(width) - sidebarWidth;
|
|
125
122
|
};
|
|
126
123
|
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
const showDetails = (
|
|
125
|
+
isMobile: boolean,
|
|
126
|
+
docked: boolean,
|
|
127
|
+
isInlineModal,
|
|
128
|
+
pip
|
|
129
|
+
): boolean => {
|
|
130
|
+
if (pip) {
|
|
131
|
+
return false;
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
if (
|
|
133
|
-
return
|
|
134
|
+
if (!isInlineModal) {
|
|
135
|
+
return false;
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
return baseStyle;
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
const showDetails = (isMobile: boolean, docked: boolean): boolean => {
|
|
140
138
|
// for mobile we always show details. Mounting of it very heavy operation.
|
|
141
139
|
if (isMobile) {
|
|
142
140
|
return true;
|
|
@@ -154,7 +152,7 @@ const showDetails = (isMobile: boolean, docked: boolean): boolean => {
|
|
|
154
152
|
const PlayerWrapperComponent = (props: Props) => {
|
|
155
153
|
const {
|
|
156
154
|
entry,
|
|
157
|
-
style
|
|
155
|
+
style,
|
|
158
156
|
containerStyle,
|
|
159
157
|
inline,
|
|
160
158
|
docked,
|
|
@@ -169,7 +167,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
169
167
|
|
|
170
168
|
const isInlineModal = inline && isModal;
|
|
171
169
|
|
|
172
|
-
const style = getStyles(baseStyle, !isTablet, isInlineModal);
|
|
170
|
+
// const style = getStyles(baseStyle, !isTablet, isInlineModal, pip);
|
|
173
171
|
|
|
174
172
|
const isTabletLandscape = !isTV() && isTablet && !isTabletPortrait;
|
|
175
173
|
|
|
@@ -209,72 +207,62 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
209
207
|
[containerDimensions, playerDimesionsHack]
|
|
210
208
|
);
|
|
211
209
|
|
|
212
|
-
const pathname = `${ROUTE_TYPES.VIDEO_MODAL}/${entry?.id}`;
|
|
213
|
-
|
|
214
210
|
return (
|
|
215
|
-
<
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
<WrapperView
|
|
212
|
+
edges={getEdges(isTablet, isInlineModal) as readonly Edge[]}
|
|
213
|
+
style={[
|
|
214
|
+
safeAreaStyles(configuration, isTablet),
|
|
215
|
+
style,
|
|
216
|
+
playerDimesionsHack,
|
|
217
|
+
]}
|
|
218
|
+
>
|
|
219
|
+
<AnimationComponent
|
|
220
|
+
animationType={ComponentAnimationType.moveUpComponent}
|
|
221
|
+
additionalData={{ saveArea: true }}
|
|
222
|
+
style={[directionStyles(isTabletLandscape), defaultStyles.flex]}
|
|
223
|
+
>
|
|
224
|
+
<View
|
|
225
|
+
testID={`${entry?.id}-player-container`}
|
|
219
226
|
style={[
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
defaultStyles.playerContainer,
|
|
228
|
+
containerDimensions,
|
|
229
|
+
containerStyle,
|
|
222
230
|
playerDimesionsHack,
|
|
223
231
|
]}
|
|
224
232
|
>
|
|
225
233
|
<AnimationComponent
|
|
226
234
|
animationType={ComponentAnimationType.moveUpComponent}
|
|
227
|
-
|
|
228
|
-
|
|
235
|
+
style={isTabletLandscape ? defaultStyles.flex : undefined}
|
|
236
|
+
additionalData={{
|
|
237
|
+
useLayoutMeasure: isTabletLandscape,
|
|
238
|
+
disableAnimatedComponent: !isTabletLandscape,
|
|
239
|
+
resetAnimationValue: isTabletLandscape && docked,
|
|
240
|
+
}}
|
|
229
241
|
>
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
testID={`${entry?.id}-player-container`}
|
|
234
|
-
style={[
|
|
235
|
-
defaultStyles.playerContainer,
|
|
236
|
-
containerDimensions,
|
|
237
|
-
containerStyle,
|
|
238
|
-
playerDimesionsHack,
|
|
239
|
-
]}
|
|
240
|
-
>
|
|
241
|
-
<AnimationComponent
|
|
242
|
-
animationType={ComponentAnimationType.moveUpComponent}
|
|
243
|
-
style={isTabletLandscape ? defaultStyles.flex : undefined}
|
|
244
|
-
additionalData={{
|
|
245
|
-
useLayoutMeasure: isTabletLandscape,
|
|
246
|
-
disableAnimatedComponent: !isTabletLandscape,
|
|
247
|
-
resetAnimationValue: isTabletLandscape && docked,
|
|
248
|
-
}}
|
|
249
|
-
>
|
|
250
|
-
<AnimatedVideoPlayerComponent>
|
|
251
|
-
{children(childrenStyles)}
|
|
252
|
-
</AnimatedVideoPlayerComponent>
|
|
253
|
-
</AnimationComponent>
|
|
254
|
-
</View>
|
|
255
|
-
|
|
256
|
-
<AnimatedScrollModal>
|
|
257
|
-
{showDetails(!isTablet, docked) && (
|
|
258
|
-
<AnimationComponent
|
|
259
|
-
animationType={ComponentAnimationType.componentFade}
|
|
260
|
-
style={defaultStyles.flex}
|
|
261
|
-
>
|
|
262
|
-
<PlayerDetails
|
|
263
|
-
configuration={configuration}
|
|
264
|
-
style={defaultStyles.playerDetails}
|
|
265
|
-
entry={entry}
|
|
266
|
-
isTabletLandscape={isTabletLandscape}
|
|
267
|
-
isTablet={isTablet}
|
|
268
|
-
/>
|
|
269
|
-
</AnimationComponent>
|
|
270
|
-
)}
|
|
271
|
-
</AnimatedScrollModal>
|
|
272
|
-
</ScreenContextProvider>
|
|
273
|
-
</PathnameContext.Provider>
|
|
242
|
+
<AnimatedVideoPlayerComponent>
|
|
243
|
+
{children(childrenStyles)}
|
|
244
|
+
</AnimatedVideoPlayerComponent>
|
|
274
245
|
</AnimationComponent>
|
|
275
|
-
</
|
|
276
|
-
|
|
277
|
-
|
|
246
|
+
</View>
|
|
247
|
+
|
|
248
|
+
<AnimatedScrollModal>
|
|
249
|
+
{showDetails(!isTablet, docked, isInlineModal, pip) && (
|
|
250
|
+
<AnimationComponent
|
|
251
|
+
animationType={ComponentAnimationType.componentFade}
|
|
252
|
+
style={defaultStyles.flex}
|
|
253
|
+
>
|
|
254
|
+
<PlayerDetails
|
|
255
|
+
configuration={configuration}
|
|
256
|
+
style={defaultStyles.playerDetails}
|
|
257
|
+
entry={entry}
|
|
258
|
+
isTabletLandscape={isTabletLandscape}
|
|
259
|
+
isTablet={isTablet}
|
|
260
|
+
/>
|
|
261
|
+
</AnimationComponent>
|
|
262
|
+
)}
|
|
263
|
+
</AnimatedScrollModal>
|
|
264
|
+
</AnimationComponent>
|
|
265
|
+
</WrapperView>
|
|
278
266
|
);
|
|
279
267
|
};
|
|
280
268
|
|
|
@@ -27,8 +27,8 @@ exports[`PlayerWrapper renders inline 1`] = `
|
|
|
27
27
|
"backgroundColor": "transparent",
|
|
28
28
|
},
|
|
29
29
|
Object {
|
|
30
|
-
"height":
|
|
31
|
-
"width":
|
|
30
|
+
"height": 800,
|
|
31
|
+
"width": 300,
|
|
32
32
|
},
|
|
33
33
|
Object {},
|
|
34
34
|
]
|
|
@@ -133,8 +133,8 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
|
|
|
133
133
|
"backgroundColor": "transparent",
|
|
134
134
|
},
|
|
135
135
|
Object {
|
|
136
|
-
"height":
|
|
137
|
-
"width":
|
|
136
|
+
"height": undefined,
|
|
137
|
+
"width": 300,
|
|
138
138
|
},
|
|
139
139
|
Object {},
|
|
140
140
|
]
|
|
@@ -361,8 +361,8 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
361
361
|
"backgroundColor": "transparent",
|
|
362
362
|
},
|
|
363
363
|
Object {
|
|
364
|
-
"height":
|
|
365
|
-
"width":
|
|
364
|
+
"height": 800,
|
|
365
|
+
"width": 300,
|
|
366
366
|
},
|
|
367
367
|
Object {},
|
|
368
368
|
]
|
|
@@ -405,36 +405,6 @@ exports[`PlayerWrapper renders properly 1`] = `
|
|
|
405
405
|
}
|
|
406
406
|
testID="test-player-container"
|
|
407
407
|
/>
|
|
408
|
-
<View
|
|
409
|
-
animationType="componentFade"
|
|
410
|
-
style={
|
|
411
|
-
Object {
|
|
412
|
-
"flex": 1,
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
>
|
|
416
|
-
<View
|
|
417
|
-
configuration={
|
|
418
|
-
Object {
|
|
419
|
-
"tablet_landscape_player_container_background_color": "red",
|
|
420
|
-
"tablet_landscape_sidebar_width": "35%",
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
entry={
|
|
424
|
-
Object {
|
|
425
|
-
"id": "test",
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
isTablet={false}
|
|
429
|
-
isTabletLandscape={false}
|
|
430
|
-
style={
|
|
431
|
-
Object {
|
|
432
|
-
"flex": 1,
|
|
433
|
-
"paddingTop": 20,
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
/>
|
|
437
|
-
</View>
|
|
438
408
|
</View>
|
|
439
409
|
</RNCSafeAreaView>
|
|
440
410
|
</RNCSafeAreaProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.7210171818",
|
|
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",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "13.0.0-alpha.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.
|
|
37
|
+
"@applicaster/applicaster-types": "13.0.0-alpha.7210171818",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.7210171818",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.7210171818",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.7210171818",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|