@applicaster/zapp-react-native-ui-components 12.0.0-alpha.5643066061 → 12.0.0-alpha.5882013252

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.
@@ -1,3 +1,31 @@
1
- import FastImage from "@applicaster/react-native-fast-image";
1
+ import React from "react";
2
2
 
3
- export const QBImage = FastImage;
3
+ import FastImage, {
4
+ FastImageProps,
5
+ } from "@applicaster/react-native-fast-image";
6
+
7
+ export const QBImage = (props: FastImageProps) => {
8
+ const source = React.useMemo(() => {
9
+ if (typeof props.source === "number") {
10
+ return props.source;
11
+ }
12
+
13
+ return {
14
+ uri: props.source.uri,
15
+ headers: props.source.headers,
16
+ priority: props.source.priority,
17
+ cache: props.source.cache,
18
+ };
19
+ }, [
20
+ ...(typeof props.source === "object"
21
+ ? [
22
+ props.source?.uri,
23
+ props.source?.priority,
24
+ props.source?.cache,
25
+ props.source?.headers,
26
+ ]
27
+ : []),
28
+ ]);
29
+
30
+ return <FastImage {...props} source={source} />;
31
+ };
@@ -37,6 +37,11 @@ type Props = {
37
37
  const defaultStyles = StyleSheet.create({
38
38
  playerContainer: { position: "relative", alignSelf: "center", zIndex: 200 },
39
39
  playerDetails: { flex: 1, paddingTop: 20 },
40
+ inlinePlayerContainerDimensions: {
41
+ aspectRatio: 16 / 9,
42
+ width: "100%",
43
+ height: undefined,
44
+ },
40
45
  });
41
46
 
42
47
  const orientationStyles = StyleSheet.create({
@@ -190,12 +195,9 @@ export const PlayerWrapper = (props: Props) => {
190
195
  defaultStyles.playerContainer,
191
196
  containerDimensions,
192
197
  containerStyle,
193
- {
194
- height:
195
- isInlineModal && !docked
196
- ? containerDimensions.height + 10
197
- : containerDimensions.height,
198
- },
198
+ isInlineModal && !docked && !isTabletLandscape
199
+ ? defaultStyles.inlinePlayerContainerDimensions
200
+ : {},
199
201
  playerDimesionsHack,
200
202
  ]}
201
203
  >
@@ -40,7 +40,9 @@ exports[`PlayerWrapper renders inline 1`] = `
40
40
  },
41
41
  Object {},
42
42
  Object {
43
- "height": 431.875,
43
+ "aspectRatio": 1.7777777777777777,
44
+ "height": undefined,
45
+ "width": "100%",
44
46
  },
45
47
  Object {},
46
48
  ]
@@ -109,9 +111,7 @@ exports[`PlayerWrapper renders inline and docked 1`] = `
109
111
  "width": 300,
110
112
  },
111
113
  Object {},
112
- Object {
113
- "height": 50,
114
- },
114
+ Object {},
115
115
  Object {},
116
116
  ]
117
117
  }
@@ -167,9 +167,7 @@ exports[`PlayerWrapper renders inline on tablet in landscape orientation 1`] = `
167
167
  "width": 195,
168
168
  },
169
169
  Object {},
170
- Object {
171
- "height": 119.6875,
172
- },
170
+ Object {},
173
171
  Object {},
174
172
  ]
175
173
  }
@@ -237,9 +235,7 @@ exports[`PlayerWrapper renders properly 1`] = `
237
235
  "width": 300,
238
236
  },
239
237
  Object {},
240
- Object {
241
- "height": 800,
242
- },
238
+ Object {},
243
239
  Object {},
244
240
  ]
245
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "12.0.0-alpha.5643066061",
3
+ "version": "12.0.0-alpha.5882013252",
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",
@@ -35,10 +35,10 @@
35
35
  "redux-mock-store": "^1.5.3"
36
36
  },
37
37
  "dependencies": {
38
- "@applicaster/applicaster-types": "12.0.0-alpha.5643066061",
39
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5643066061",
40
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5643066061",
41
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5643066061",
38
+ "@applicaster/applicaster-types": "12.0.0-alpha.5882013252",
39
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5882013252",
40
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5882013252",
41
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5882013252",
42
42
  "promise": "^8.3.0",
43
43
  "react-router-native": "^5.1.2",
44
44
  "url": "^0.11.0",