@applicaster/zapp-react-native-ui-components 13.0.0-alpha.1244047241 → 13.0.0-alpha.1290120403

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.
@@ -22,6 +22,7 @@ type Props = {
22
22
  audio_player_title_color?: string;
23
23
  audio_player_summary_color?: string;
24
24
  audio_player_rtl?: boolean;
25
+ audio_player_background_image_query?: string;
25
26
  audio_player_background_image_default_color?: string;
26
27
  start_time?: string;
27
28
  end_time?: string;
@@ -32,6 +33,7 @@ type Props = {
32
33
  audio_player_title_color?: string;
33
34
  audio_player_summary_color?: string;
34
35
  audio_player_rtl?: string;
36
+ audio_player_background_image_query?: string;
35
37
  audio_player_background_image_default_color?: string;
36
38
  audio_player_background_image?: string;
37
39
  audio_player_artwork_aspect_ratio?: string;
@@ -73,6 +75,10 @@ export function AudioPlayer(props: Props) {
73
75
  const channelIcon = getProp("audio_player_channel_icon");
74
76
  const rtlFlag = getProp("audio_player_rtl");
75
77
 
78
+ const audioPlayerBackgroundImageQuery = getProp(
79
+ "audio_player_background_image_query"
80
+ );
81
+
76
82
  const audioPlayerBackgroundImageDefaultColor = getProp(
77
83
  "audio_player_background_image_default_color"
78
84
  );
@@ -153,6 +159,7 @@ export function AudioPlayer(props: Props) {
153
159
  runTimeFontSize,
154
160
  artworkAspectRatio,
155
161
  channelIcon,
162
+ audioPlayerBackgroundImageQuery,
156
163
  audioPlayerBackgroundImageDefaultColor,
157
164
  };
158
165
  }, [getProp]);
@@ -4,6 +4,7 @@ const defaults = {
4
4
  audio_player_background_color: "black",
5
5
  audio_player_artwork_aspect_ratio: "1:1",
6
6
  audio_player_rtl: false,
7
+ audio_player_background_image_query: "",
7
8
  audio_player_background_image_default_color: "",
8
9
  };
9
10
 
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useEffect, useMemo, useRef } from "react";
2
- import { View, ScrollView, Platform } from "react-native";
2
+ import { View, ScrollView, StyleSheet, Platform } from "react-native";
3
3
  import { Button } from "./Button";
4
4
  import { ItemIconProps } from "./Button/ItemIcon";
5
5
  import { ItemProps } from "./Button/Item";
@@ -39,6 +39,12 @@ type ModalComponentProps = {
39
39
  iconPlacement?: "left" | "right";
40
40
  };
41
41
 
42
+ const styles = StyleSheet.create({
43
+ container: {
44
+ maxHeight: "100%",
45
+ },
46
+ });
47
+
42
48
  export function BottomSheetModalContent(props: ModalComponentProps) {
43
49
  const {
44
50
  items,
@@ -90,10 +96,12 @@ export function BottomSheetModalContent(props: ModalComponentProps) {
90
96
 
91
97
  return (
92
98
  <View
93
- style={{
94
- maxHeight: props.maxHeight,
95
- paddingTop: paddingTop,
96
- }}
99
+ style={[
100
+ styles.container,
101
+ {
102
+ paddingTop: paddingTop,
103
+ },
104
+ ]}
97
105
  >
98
106
  <ModalHeader
99
107
  dismiss={dismiss}
@@ -104,7 +112,7 @@ export function BottomSheetModalContent(props: ModalComponentProps) {
104
112
  <ScrollView
105
113
  contentContainerStyle={{
106
114
  paddingBottom:
107
- paddingBottom + (Platform.OS === "ios" ? bottomInset : 0),
115
+ Platform.OS === "ios" ? paddingBottom + bottomInset : paddingBottom,
108
116
  }}
109
117
  >
110
118
  {items.map((item, index) => (
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as R from "ramda";
3
- import { View, StyleSheet, FlatList } from "react-native";
3
+ import { View, StyleSheet, Platform, FlatList } from "react-native";
4
4
  import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
5
5
  import { RiverItem } from "../RiverItem";
6
6
  import { RiverFooter } from "../RiverFooter";
@@ -24,10 +24,6 @@ import { withComponentsMapProvider } from "@applicaster/zapp-react-native-ui-com
24
24
  import { useScreenContextV2 } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
25
25
  import { useShallow } from "zustand/react/shallow";
26
26
 
27
- import { isAndroidPlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
28
-
29
- const isAndroid = isAndroidPlatform();
30
-
31
27
  type Props = {
32
28
  feed: ZappFeed;
33
29
  groupId?: string;
@@ -277,12 +273,12 @@ function ComponentsMapComponent(props: Props) {
277
273
  }}
278
274
  // Fix for WebView rerender crashes on Android API 28+
279
275
  // https://github.com/react-native-webview/react-native-webview/issues/1915#issuecomment-964035468
280
- overScrollMode={isAndroid ? "never" : "auto"}
276
+ overScrollMode={Platform.OS === "android" ? "never" : "auto"}
281
277
  scrollIndicatorInsets={scrollIndicatorInsets}
282
278
  extraData={feed}
283
279
  stickyHeaderIndices={stickyHeaderIndices}
284
280
  onLayout={handleOnLayout}
285
- removeClippedSubviews={isAndroid}
281
+ removeClippedSubviews
286
282
  initialNumToRender={3}
287
283
  maxToRenderPerBatch={10}
288
284
  windowSize={12}
@@ -303,10 +299,6 @@ function ComponentsMapComponent(props: Props) {
303
299
  onMomentumScrollEnd={_onMomentumScrollEnd}
304
300
  onScrollEndDrag={_onScrollEndDrag}
305
301
  scrollEventThrottle={16}
306
- maintainVisibleContentPosition={{
307
- minIndexForVisible: 0,
308
- autoscrollToTopThreshold: 10,
309
- }}
310
302
  {...scrollViewExtraProps}
311
303
  />
312
304
  </ViewportTracker>
@@ -48,20 +48,16 @@ const useLoadingState = (
48
48
  loadingState: RiverItemType["loadingState"]
49
49
  ) => {
50
50
  const [readyToBeDisplayed, setReadyToBeDisplayed] = React.useState(
51
- loadingState.getValue().index + 1 >= currentIndex
51
+ loadingState.getValue().index + 1 === currentIndex
52
52
  );
53
53
 
54
54
  useEffect(() => {
55
55
  const subscription = loadingState.subscribe(({ index }) => {
56
- if (index + 1 >= currentIndex) {
56
+ if (index + 1 === currentIndex) {
57
57
  setReadyToBeDisplayed(true);
58
58
  }
59
59
  });
60
60
 
61
- if (loadingState.getValue().index + 1 >= currentIndex) {
62
- setReadyToBeDisplayed(true);
63
- }
64
-
65
61
  return () => {
66
62
  subscription.unsubscribe();
67
63
  };
@@ -135,12 +135,6 @@ exports[`componentsMap renders renders components map correctly 1`] = `
135
135
  getItemCount={[Function]}
136
136
  initialNumToRender={3}
137
137
  keyExtractor={[Function]}
138
- maintainVisibleContentPosition={
139
- {
140
- "autoscrollToTopThreshold": 10,
141
- "minIndexForVisible": 0,
142
- }
143
- }
144
138
  maxToRenderPerBatch={10}
145
139
  onContentSizeChange={[Function]}
146
140
  onLayout={[Function]}
@@ -151,7 +145,7 @@ exports[`componentsMap renders renders components map correctly 1`] = `
151
145
  onScrollEndDrag={[Function]}
152
146
  overScrollMode="auto"
153
147
  refreshControl={null}
154
- removeClippedSubviews={false}
148
+ removeClippedSubviews={true}
155
149
  renderItem={[Function]}
156
150
  scrollEventThrottle={16}
157
151
  scrollIndicatorInsets={
@@ -329,14 +329,6 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
329
329
  }
330
330
  }, [playerAnimationState]);
331
331
 
332
- React.useEffect(() => {
333
- setScrollModalAnimatedValue(
334
- translateYOffset,
335
- modalSnapPoints[1],
336
- setLastSnap
337
- );
338
- }, [modalSnapPoints[1]]);
339
-
340
332
  React.useEffect(() => {
341
333
  const lastScrollYListenerId = lastScrollY.addListener(({ value }) => {
342
334
  lastScrollYValue.current = value;
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.1244047241",
3
+ "version": "13.0.0-alpha.1290120403",
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.0-alpha.1244047241",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.1244047241",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-alpha.1244047241",
37
- "@applicaster/zapp-react-native-utils": "13.0.0-alpha.1244047241",
34
+ "@applicaster/applicaster-types": "13.0.0-alpha.1290120403",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.1290120403",
36
+ "@applicaster/zapp-react-native-redux": "13.0.0-alpha.1290120403",
37
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.1290120403",
38
38
  "promise": "^8.3.0",
39
39
  "react-router-native": "^5.1.2",
40
40
  "url": "^0.11.0",