@applicaster/zapp-react-native-ui-components 13.0.0-rc.2 → 13.0.0-rc.4
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
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,7 +121,11 @@ const getTabletWidth = (
|
|
|
124
121
|
return Number(width) - sidebarWidth;
|
|
125
122
|
};
|
|
126
123
|
|
|
127
|
-
const getStyles = (baseStyle, isMobile, isPortrait) => {
|
|
124
|
+
const getStyles = (baseStyle, isMobile, isPortrait, pip) => {
|
|
125
|
+
if (pip) {
|
|
126
|
+
return baseStyle;
|
|
127
|
+
}
|
|
128
|
+
|
|
128
129
|
if (isMobile && isPortrait) {
|
|
129
130
|
return { width: SCREEN_WIDTH, height: SCREEN_HEIGHT };
|
|
130
131
|
}
|
|
@@ -136,7 +137,20 @@ const getStyles = (baseStyle, isMobile, isPortrait) => {
|
|
|
136
137
|
return baseStyle;
|
|
137
138
|
};
|
|
138
139
|
|
|
139
|
-
const showDetails = (
|
|
140
|
+
const showDetails = (
|
|
141
|
+
isMobile: boolean,
|
|
142
|
+
docked: boolean,
|
|
143
|
+
isInlineModal,
|
|
144
|
+
pip
|
|
145
|
+
): boolean => {
|
|
146
|
+
if (pip) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (!isInlineModal) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
|
|
140
154
|
// for mobile we always show details. Mounting of it very heavy operation.
|
|
141
155
|
if (isMobile) {
|
|
142
156
|
return true;
|
|
@@ -169,7 +183,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
169
183
|
|
|
170
184
|
const isInlineModal = inline && isModal;
|
|
171
185
|
|
|
172
|
-
const style = getStyles(baseStyle, !isTablet, isInlineModal);
|
|
186
|
+
const style = getStyles(baseStyle, !isTablet, isInlineModal, pip);
|
|
173
187
|
|
|
174
188
|
const isTabletLandscape = !isTV() && isTablet && !isTabletPortrait;
|
|
175
189
|
|
|
@@ -209,72 +223,62 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
209
223
|
[containerDimensions, playerDimesionsHack]
|
|
210
224
|
);
|
|
211
225
|
|
|
212
|
-
const pathname = `${ROUTE_TYPES.VIDEO_MODAL}/${entry?.id}`;
|
|
213
|
-
|
|
214
226
|
return (
|
|
215
|
-
<
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
227
|
+
<WrapperView
|
|
228
|
+
edges={getEdges(isTablet, isInlineModal) as readonly Edge[]}
|
|
229
|
+
style={[
|
|
230
|
+
safeAreaStyles(configuration, isTablet),
|
|
231
|
+
style,
|
|
232
|
+
playerDimesionsHack,
|
|
233
|
+
]}
|
|
234
|
+
>
|
|
235
|
+
<AnimationComponent
|
|
236
|
+
animationType={ComponentAnimationType.moveUpComponent}
|
|
237
|
+
additionalData={{ saveArea: true }}
|
|
238
|
+
style={[directionStyles(isTabletLandscape), defaultStyles.flex]}
|
|
239
|
+
>
|
|
240
|
+
<View
|
|
241
|
+
testID={`${entry?.id}-player-container`}
|
|
219
242
|
style={[
|
|
220
|
-
|
|
221
|
-
|
|
243
|
+
defaultStyles.playerContainer,
|
|
244
|
+
containerDimensions,
|
|
245
|
+
containerStyle,
|
|
222
246
|
playerDimesionsHack,
|
|
223
247
|
]}
|
|
224
248
|
>
|
|
225
249
|
<AnimationComponent
|
|
226
250
|
animationType={ComponentAnimationType.moveUpComponent}
|
|
227
|
-
|
|
228
|
-
|
|
251
|
+
style={isTabletLandscape ? defaultStyles.flex : undefined}
|
|
252
|
+
additionalData={{
|
|
253
|
+
useLayoutMeasure: isTabletLandscape,
|
|
254
|
+
disableAnimatedComponent: !isTabletLandscape,
|
|
255
|
+
resetAnimationValue: isTabletLandscape && docked,
|
|
256
|
+
}}
|
|
229
257
|
>
|
|
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>
|
|
258
|
+
<AnimatedVideoPlayerComponent>
|
|
259
|
+
{children(childrenStyles)}
|
|
260
|
+
</AnimatedVideoPlayerComponent>
|
|
274
261
|
</AnimationComponent>
|
|
275
|
-
</
|
|
276
|
-
|
|
277
|
-
|
|
262
|
+
</View>
|
|
263
|
+
|
|
264
|
+
<AnimatedScrollModal>
|
|
265
|
+
{showDetails(!isTablet, docked, isInlineModal, pip) && (
|
|
266
|
+
<AnimationComponent
|
|
267
|
+
animationType={ComponentAnimationType.componentFade}
|
|
268
|
+
style={defaultStyles.flex}
|
|
269
|
+
>
|
|
270
|
+
<PlayerDetails
|
|
271
|
+
configuration={configuration}
|
|
272
|
+
style={defaultStyles.playerDetails}
|
|
273
|
+
entry={entry}
|
|
274
|
+
isTabletLandscape={isTabletLandscape}
|
|
275
|
+
isTablet={isTablet}
|
|
276
|
+
/>
|
|
277
|
+
</AnimationComponent>
|
|
278
|
+
)}
|
|
279
|
+
</AnimatedScrollModal>
|
|
280
|
+
</AnimationComponent>
|
|
281
|
+
</WrapperView>
|
|
278
282
|
);
|
|
279
283
|
};
|
|
280
284
|
|
|
@@ -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-rc.
|
|
3
|
+
"version": "13.0.0-rc.4",
|
|
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-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-rc.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-rc.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-rc.
|
|
37
|
+
"@applicaster/applicaster-types": "13.0.0-rc.4",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-rc.4",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-rc.4",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-rc.4",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|