@applicaster/zapp-react-native-ui-components 13.0.11-alpha.5714428013 → 13.0.11-alpha.6727579127
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.
|
@@ -268,12 +268,7 @@ function ComponentsMapComponent(props: Props) {
|
|
|
268
268
|
// The Screen Picker in Mobile is completly different than the TV
|
|
269
269
|
// so the various offsets / margins in TV do not apply here.
|
|
270
270
|
return (
|
|
271
|
-
<View
|
|
272
|
-
style={styles.container}
|
|
273
|
-
ref={(ref) => {
|
|
274
|
-
flatListWrapperRef.current = ref;
|
|
275
|
-
}}
|
|
276
|
-
>
|
|
271
|
+
<View style={styles.container} ref={flatListWrapperRef}>
|
|
277
272
|
<ComponentsMapHeightContext.Provider value={flatListHeight}>
|
|
278
273
|
<ComponentsMapRefContext.Provider value={flatListWrapperRef}>
|
|
279
274
|
<ScreenLoadingMeasurements
|
|
@@ -43,6 +43,8 @@ type Props = {
|
|
|
43
43
|
children: React.ReactNode;
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
+
const activeOffsetY = [-5, 5];
|
|
47
|
+
|
|
46
48
|
export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
47
49
|
const {
|
|
48
50
|
isActiveGesture,
|
|
@@ -372,17 +374,17 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
372
374
|
maxDeltaY={lastSnap - modalSnapPoints[0]}
|
|
373
375
|
numberOfTaps={1}
|
|
374
376
|
>
|
|
375
|
-
<View pointerEvents="box-none"
|
|
377
|
+
<View pointerEvents="box-none">
|
|
376
378
|
<PanGestureHandler
|
|
377
379
|
enabled={isEnablePanGesture}
|
|
378
380
|
ref={panHandlerRef}
|
|
379
381
|
simultaneousHandlers={[scrollRef, tapHandlerRef]}
|
|
380
382
|
shouldCancelWhenOutside={isMaximizedModal}
|
|
383
|
+
activeOffsetY={activeOffsetY}
|
|
381
384
|
onGestureEvent={onGestureEvent}
|
|
382
385
|
onHandlerStateChange={onHandlerStateChange}
|
|
383
|
-
activeOffsetY={[-5, 5]}
|
|
384
386
|
>
|
|
385
|
-
<Animated.View
|
|
387
|
+
<Animated.View>
|
|
386
388
|
<NativeViewGestureHandler
|
|
387
389
|
ref={scrollRef}
|
|
388
390
|
waitFor={tapHandlerRef}
|
|
@@ -397,7 +399,6 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
397
399
|
onMomentumScrollEnd={onMomentumScrollEnd}
|
|
398
400
|
scrollEventThrottle={1}
|
|
399
401
|
showsVerticalScrollIndicator={false}
|
|
400
|
-
contentContainerStyle={generalStyles.container}
|
|
401
402
|
>
|
|
402
403
|
{children}
|
|
403
404
|
</Animated.ScrollView>
|
|
@@ -13,7 +13,6 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
|
13
13
|
import { isNilOrEmpty } from "@applicaster/zapp-react-native-utils/reactUtils/helpers";
|
|
14
14
|
|
|
15
15
|
const { width: SCREEN_WIDTH } = Dimensions.get("screen");
|
|
16
|
-
const styles = StyleSheet.create({ flex1: { flex: 1 } });
|
|
17
16
|
|
|
18
17
|
type Configuration = {
|
|
19
18
|
[key: string]: any;
|
|
@@ -93,7 +92,6 @@ export const PlayerDetails = ({
|
|
|
93
92
|
transform: [{ translateY }],
|
|
94
93
|
opacity,
|
|
95
94
|
},
|
|
96
|
-
styles.flex1,
|
|
97
95
|
{
|
|
98
96
|
// workaround for avoid wrong text-height after going back to portrait rotation
|
|
99
97
|
// we don't see this view in landscape mode, so we are able to use fixed width from portrait mode
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { useContext } from "react";
|
|
2
3
|
import {
|
|
3
4
|
Dimensions,
|
|
4
5
|
Platform,
|
|
@@ -131,6 +132,11 @@ const getTabletWidth = (
|
|
|
131
132
|
return widthValue - sidebarWidth;
|
|
132
133
|
};
|
|
133
134
|
|
|
135
|
+
const PlayerDetailsWrapperHeightContext = React.createContext(null);
|
|
136
|
+
|
|
137
|
+
export const usePlayerDetailsWrapperHeight = () =>
|
|
138
|
+
useContext(PlayerDetailsWrapperHeightContext);
|
|
139
|
+
|
|
134
140
|
const PlayerWrapperComponent = (props: Props) => {
|
|
135
141
|
const {
|
|
136
142
|
entry,
|
|
@@ -146,6 +152,20 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
146
152
|
pip,
|
|
147
153
|
} = props;
|
|
148
154
|
|
|
155
|
+
const [playerDetailsWrapperHeight, setPlayerDetailsWrapperHeight] =
|
|
156
|
+
React.useState(0);
|
|
157
|
+
|
|
158
|
+
const onLayout = React.useCallback(
|
|
159
|
+
({
|
|
160
|
+
nativeEvent: {
|
|
161
|
+
layout: { height },
|
|
162
|
+
},
|
|
163
|
+
}) => {
|
|
164
|
+
setPlayerDetailsWrapperHeight(height);
|
|
165
|
+
},
|
|
166
|
+
[]
|
|
167
|
+
);
|
|
168
|
+
|
|
149
169
|
const isTablet = useIsTablet();
|
|
150
170
|
|
|
151
171
|
const isInlineModal = inline && isModal;
|
|
@@ -238,22 +258,28 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
238
258
|
</AnimatedVideoPlayerComponent>
|
|
239
259
|
</AnimationComponent>
|
|
240
260
|
</View>
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
261
|
+
<View style={defaultStyles.flex} onLayout={onLayout}>
|
|
262
|
+
<PlayerDetailsWrapperHeightContext.Provider
|
|
263
|
+
value={playerDetailsWrapperHeight}
|
|
264
|
+
>
|
|
265
|
+
<AnimatedScrollModal>
|
|
266
|
+
{isShowPlayerDetails ? (
|
|
267
|
+
<AnimationComponent
|
|
268
|
+
animationType={ComponentAnimationType.componentFade}
|
|
269
|
+
style={defaultStyles.flex}
|
|
270
|
+
>
|
|
271
|
+
<PlayerDetails
|
|
272
|
+
configuration={configuration}
|
|
273
|
+
style={defaultStyles.playerDetails}
|
|
274
|
+
entry={entry}
|
|
275
|
+
isTabletLandscape={isTabletLandscape}
|
|
276
|
+
isTablet={isTablet}
|
|
277
|
+
/>
|
|
278
|
+
</AnimationComponent>
|
|
279
|
+
) : null}
|
|
280
|
+
</AnimatedScrollModal>
|
|
281
|
+
</PlayerDetailsWrapperHeightContext.Provider>
|
|
282
|
+
</View>
|
|
257
283
|
</AnimationComponent>
|
|
258
284
|
</WrapperView>
|
|
259
285
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "13.0.11-alpha.
|
|
3
|
+
"version": "13.0.11-alpha.6727579127",
|
|
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": "13.0.11-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "13.0.11-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "13.0.11-alpha.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "13.0.11-alpha.
|
|
34
|
+
"@applicaster/applicaster-types": "13.0.11-alpha.6727579127",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "13.0.11-alpha.6727579127",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "13.0.11-alpha.6727579127",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "13.0.11-alpha.6727579127",
|
|
38
38
|
"promise": "^8.3.0",
|
|
39
39
|
"react-router-native": "^5.1.2",
|
|
40
40
|
"url": "^0.11.0",
|