@applicaster/zapp-react-native-ui-components 13.0.11-alpha.1221577073 → 13.0.11-alpha.5714428013

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,7 +268,12 @@ 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 style={styles.container} ref={flatListWrapperRef}>
271
+ <View
272
+ style={styles.container}
273
+ ref={(ref) => {
274
+ flatListWrapperRef.current = ref;
275
+ }}
276
+ >
272
277
  <ComponentsMapHeightContext.Provider value={flatListHeight}>
273
278
  <ComponentsMapRefContext.Provider value={flatListWrapperRef}>
274
279
  <ScreenLoadingMeasurements
@@ -43,8 +43,6 @@ type Props = {
43
43
  children: React.ReactNode;
44
44
  };
45
45
 
46
- const activeOffsetY = [-5, 5];
47
-
48
46
  export const AnimatedScrollModalComponent = ({ children }: Props) => {
49
47
  const {
50
48
  isActiveGesture,
@@ -374,17 +372,17 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
374
372
  maxDeltaY={lastSnap - modalSnapPoints[0]}
375
373
  numberOfTaps={1}
376
374
  >
377
- <View pointerEvents="box-none">
375
+ <View pointerEvents="box-none" style={generalStyles.container}>
378
376
  <PanGestureHandler
379
377
  enabled={isEnablePanGesture}
380
378
  ref={panHandlerRef}
381
379
  simultaneousHandlers={[scrollRef, tapHandlerRef]}
382
380
  shouldCancelWhenOutside={isMaximizedModal}
383
- activeOffsetY={activeOffsetY}
384
381
  onGestureEvent={onGestureEvent}
385
382
  onHandlerStateChange={onHandlerStateChange}
383
+ activeOffsetY={[-5, 5]}
386
384
  >
387
- <Animated.View>
385
+ <Animated.View style={generalStyles.container}>
388
386
  <NativeViewGestureHandler
389
387
  ref={scrollRef}
390
388
  waitFor={tapHandlerRef}
@@ -399,6 +397,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
399
397
  onMomentumScrollEnd={onMomentumScrollEnd}
400
398
  scrollEventThrottle={1}
401
399
  showsVerticalScrollIndicator={false}
400
+ contentContainerStyle={generalStyles.container}
402
401
  >
403
402
  {children}
404
403
  </Animated.ScrollView>
@@ -13,6 +13,7 @@ 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 } });
16
17
 
17
18
  type Configuration = {
18
19
  [key: string]: any;
@@ -92,6 +93,7 @@ export const PlayerDetails = ({
92
93
  transform: [{ translateY }],
93
94
  opacity,
94
95
  },
96
+ styles.flex1,
95
97
  {
96
98
  // workaround for avoid wrong text-height after going back to portrait rotation
97
99
  // we don't see this view in landscape mode, so we are able to use fixed width from portrait mode
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- import { useContext } from "react";
3
2
  import {
4
3
  Dimensions,
5
4
  Platform,
@@ -132,11 +131,6 @@ const getTabletWidth = (
132
131
  return widthValue - sidebarWidth;
133
132
  };
134
133
 
135
- const PlayerDetailsWrapperHeightContext = React.createContext(null);
136
-
137
- export const usePlayerDetailsWrapperHeight = () =>
138
- useContext(PlayerDetailsWrapperHeightContext);
139
-
140
134
  const PlayerWrapperComponent = (props: Props) => {
141
135
  const {
142
136
  entry,
@@ -152,20 +146,6 @@ const PlayerWrapperComponent = (props: Props) => {
152
146
  pip,
153
147
  } = props;
154
148
 
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
-
169
149
  const isTablet = useIsTablet();
170
150
 
171
151
  const isInlineModal = inline && isModal;
@@ -258,28 +238,22 @@ const PlayerWrapperComponent = (props: Props) => {
258
238
  </AnimatedVideoPlayerComponent>
259
239
  </AnimationComponent>
260
240
  </View>
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>
241
+ <AnimatedScrollModal>
242
+ {isShowPlayerDetails ? (
243
+ <AnimationComponent
244
+ animationType={ComponentAnimationType.componentFade}
245
+ style={defaultStyles.flex}
246
+ >
247
+ <PlayerDetails
248
+ configuration={configuration}
249
+ style={defaultStyles.playerDetails}
250
+ entry={entry}
251
+ isTabletLandscape={isTabletLandscape}
252
+ isTablet={isTablet}
253
+ />
254
+ </AnimationComponent>
255
+ ) : null}
256
+ </AnimatedScrollModal>
283
257
  </AnimationComponent>
284
258
  </WrapperView>
285
259
  );
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.1221577073",
3
+ "version": "13.0.11-alpha.5714428013",
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.1221577073",
35
- "@applicaster/zapp-react-native-bridge": "13.0.11-alpha.1221577073",
36
- "@applicaster/zapp-react-native-redux": "13.0.11-alpha.1221577073",
37
- "@applicaster/zapp-react-native-utils": "13.0.11-alpha.1221577073",
34
+ "@applicaster/applicaster-types": "13.0.11-alpha.5714428013",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.11-alpha.5714428013",
36
+ "@applicaster/zapp-react-native-redux": "13.0.11-alpha.5714428013",
37
+ "@applicaster/zapp-react-native-utils": "13.0.11-alpha.5714428013",
38
38
  "promise": "^8.3.0",
39
39
  "react-router-native": "^5.1.2",
40
40
  "url": "^0.11.0",