@applicaster/zapp-react-native-utils 13.0.0-rc.65 → 13.0.0-rc.67
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,7 +1,8 @@
|
|
|
1
1
|
import * as ReactNative from "react-native";
|
|
2
|
-
import { isTV, platformSelect } from "../reactUtils";
|
|
3
2
|
import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
|
|
4
|
-
|
|
3
|
+
|
|
4
|
+
import { isTV, platformSelect } from "../reactUtils";
|
|
5
|
+
import { useIsTablet } from "../reactHooks";
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
8
|
QUICK_BRICK_EVENTS,
|
|
@@ -120,8 +121,15 @@ export const removeOrientationChangeListener = (listener: any): void => {
|
|
|
120
121
|
*/
|
|
121
122
|
export const isOrientationCompatible = ({
|
|
122
123
|
orientation,
|
|
123
|
-
layoutData: { width, height },
|
|
124
|
+
layoutData: { width, height, isTablet, isTabletPortrait },
|
|
124
125
|
}) => {
|
|
126
|
+
// We count portrait as compatible, because if default in zapp for mobile layout
|
|
127
|
+
// We count landscape as compatible, because if isTabletPortrait is false,
|
|
128
|
+
// it defaults for device
|
|
129
|
+
if (isTablet && !isTabletPortrait) {
|
|
130
|
+
return true;
|
|
131
|
+
}
|
|
132
|
+
|
|
125
133
|
const isLandscape = width > height;
|
|
126
134
|
|
|
127
135
|
if (
|
|
@@ -145,15 +153,6 @@ export const isOrientationCompatible = ({
|
|
|
145
153
|
return true;
|
|
146
154
|
};
|
|
147
155
|
|
|
148
|
-
export const useIsOrientationCompatible = (orientation) => {
|
|
149
|
-
const { height, width } = ReactNative.useWindowDimensions();
|
|
150
|
-
|
|
151
|
-
return isOrientationCompatible({
|
|
152
|
-
orientation,
|
|
153
|
-
layoutData: { width, height },
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
156
|
/**
|
|
158
157
|
* Determine final screen orientation based on device type,
|
|
159
158
|
* settings and orientation value provided by screen data settings
|
|
@@ -50,6 +50,14 @@ function getPlayerConfiguration({ platform }) {
|
|
|
50
50
|
label_tooltip:
|
|
51
51
|
"Set the query params which control the size of the image e.g width, height. This will help to optimize the loading time, when magic background is enabled.",
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
key: "audio_player_background_image_default_color",
|
|
55
|
+
label: "Audio Player Background Image Default Color",
|
|
56
|
+
initial_value: "",
|
|
57
|
+
type: "text_input",
|
|
58
|
+
label_tooltip:
|
|
59
|
+
"Set the default color for the audio player background image if not image or set of gradient colors are not provided.",
|
|
60
|
+
},
|
|
53
61
|
],
|
|
54
62
|
};
|
|
55
63
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.67",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "13.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "13.0.0-rc.67",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"dayjs": "^1.11.10",
|
|
@@ -55,6 +55,14 @@ function getPlayerConfiguration({ platform }) {
|
|
|
55
55
|
label_tooltip:
|
|
56
56
|
"Set the query params which control the size of the image e.g width, height. This will help to optimize the loading time, when magic background is enabled.",
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
key: "audio_player_background_image_default_color",
|
|
60
|
+
label: "Audio Player Background Image Default Color",
|
|
61
|
+
initial_value: "",
|
|
62
|
+
type: "text_input",
|
|
63
|
+
label_tooltip:
|
|
64
|
+
"Set the default color for the audio player background image if not image or set of gradient colors are not provided.",
|
|
65
|
+
},
|
|
58
66
|
],
|
|
59
67
|
};
|
|
60
68
|
|