@quintype/native-components 2.29.8-beta.0 → 2.29.9
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.
- package/package.json +1 -1
- package/src/components/AudioPlayer/index.js +2 -1
- package/src/components/BackNavigator/index.js +4 -0
- package/src/components/Button/index.js +5 -2
- package/src/components/Header/index.js +3 -1
- package/src/components/IconText/index.js +3 -0
- package/src/components/RadioButton/index.js +4 -1
- package/src/components/Search/index.js +3 -1
- package/src/components/Story/index.js +11 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { memo } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { useProgress, usePlaybackState, State } from "react-native-track-player";
|
|
4
|
-
import { TouchableOpacity, ActivityIndicator, View, useWindowDimensions } from "react-native";
|
|
4
|
+
import { TouchableOpacity, ActivityIndicator, View, ViewPropTypes, useWindowDimensions } from "react-native";
|
|
5
5
|
import Icon from "react-native-vector-icons/AntDesign";
|
|
6
6
|
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
|
7
7
|
import { playerStyles } from "./styles";
|
|
@@ -135,6 +135,7 @@ ControlButton.propTypes = {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
PlayerBase.propTypes = {
|
|
138
|
+
style: ViewPropTypes.style,
|
|
138
139
|
onTogglePlayback: PropTypes.func.isRequired,
|
|
139
140
|
testID: PropTypes.string,
|
|
140
141
|
};
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
StyleSheet,
|
|
6
6
|
TouchableOpacity,
|
|
7
7
|
View,
|
|
8
|
+
ViewPropTypes,
|
|
8
9
|
} from 'react-native';
|
|
9
10
|
import Icon from 'react-native-vector-icons/AntDesign';
|
|
10
11
|
import { COMP_GENERAL_CONSTANTS } from '../../constants/component-constants/general-constants/constants';
|
|
@@ -69,6 +70,9 @@ export const BackNavigator = (props) => {
|
|
|
69
70
|
|
|
70
71
|
BackNavigator.propTypes = {
|
|
71
72
|
title: PropTypes.string,
|
|
73
|
+
style: ViewPropTypes.style,
|
|
74
|
+
container: ViewPropTypes.style,
|
|
75
|
+
titleStyle: ViewPropTypes.style,
|
|
72
76
|
testID: PropTypes.string,
|
|
73
77
|
onPress: PropTypes.func.isRequired,
|
|
74
78
|
};
|
|
@@ -3,7 +3,8 @@ import React, { useContext } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
StyleSheet,
|
|
5
5
|
TouchableOpacity,
|
|
6
|
-
View
|
|
6
|
+
View,
|
|
7
|
+
ViewPropTypes,
|
|
7
8
|
} from "react-native";
|
|
8
9
|
import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants/general-constants/constants";
|
|
9
10
|
import { AppTheme } from "../../utils";
|
|
@@ -36,5 +37,7 @@ export const Button = (props) => {
|
|
|
36
37
|
Button.propTypes = {
|
|
37
38
|
icon: PropTypes.element,
|
|
38
39
|
text: PropTypes.string,
|
|
39
|
-
onPress: PropTypes.func
|
|
40
|
+
onPress: PropTypes.func,
|
|
41
|
+
style: ViewPropTypes.style,
|
|
42
|
+
textStyle: ViewPropTypes.style,
|
|
40
43
|
};
|
|
@@ -3,7 +3,8 @@ import React, { useContext } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
StyleSheet,
|
|
5
5
|
TouchableOpacity,
|
|
6
|
-
View
|
|
6
|
+
View,
|
|
7
|
+
ViewPropTypes,
|
|
7
8
|
} from "react-native";
|
|
8
9
|
|
|
9
10
|
import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants";
|
|
@@ -45,6 +46,7 @@ Header.propTypes = {
|
|
|
45
46
|
rightComponent: PropTypes.element,
|
|
46
47
|
leftComponent: PropTypes.element,
|
|
47
48
|
logoComponent: PropTypes.element,
|
|
49
|
+
style: ViewPropTypes.style,
|
|
48
50
|
logoComponentStyle: PropTypes.object,
|
|
49
51
|
onPress: PropTypes.func,
|
|
50
52
|
noBorder: PropTypes.bool,
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
StyleSheet,
|
|
5
5
|
TouchableOpacity,
|
|
6
6
|
View,
|
|
7
|
+
ViewPropTypes,
|
|
7
8
|
} from "react-native";
|
|
8
9
|
import Icon from "react-native-vector-icons/FontAwesome";
|
|
9
10
|
import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants/general-constants/constants";
|
|
@@ -79,6 +80,8 @@ IconText.propTypes = {
|
|
|
79
80
|
iconSize: PropTypes.number,
|
|
80
81
|
onPress: PropTypes.func,
|
|
81
82
|
disabled: PropTypes.bool,
|
|
83
|
+
iconStyle: ViewPropTypes.style,
|
|
84
|
+
labelStyle: ViewPropTypes.style,
|
|
82
85
|
};
|
|
83
86
|
|
|
84
87
|
export { IconText };
|
|
@@ -3,7 +3,8 @@ import React, { useContext } from "react";
|
|
|
3
3
|
import {
|
|
4
4
|
StyleSheet,
|
|
5
5
|
TouchableOpacity,
|
|
6
|
-
View
|
|
6
|
+
View,
|
|
7
|
+
ViewPropTypes,
|
|
7
8
|
} from "react-native";
|
|
8
9
|
import { AppTheme } from "../../utils";
|
|
9
10
|
import { radioButtonStyles } from "./styles";
|
|
@@ -40,4 +41,6 @@ export const RadioButton = ({
|
|
|
40
41
|
RadioButton.propTypes = {
|
|
41
42
|
onPress: PropTypes.func.isRequired,
|
|
42
43
|
isChecked: PropTypes.bool,
|
|
44
|
+
circleStyle: ViewPropTypes.style,
|
|
45
|
+
checkedCircleStyle: ViewPropTypes.style,
|
|
43
46
|
};
|
|
@@ -2,7 +2,7 @@ import React, {
|
|
|
2
2
|
useEffect, useRef, useContext, useState,
|
|
3
3
|
} from 'react';
|
|
4
4
|
import {
|
|
5
|
-
View, TextInput, StyleSheet, TouchableOpacity,
|
|
5
|
+
View, TextInput, StyleSheet, ViewPropTypes, TouchableOpacity,
|
|
6
6
|
} from 'react-native';
|
|
7
7
|
import { useNavigation } from '@react-navigation/native';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -78,6 +78,8 @@ Search.propTypes = {
|
|
|
78
78
|
addListener: PropTypes.func,
|
|
79
79
|
}),
|
|
80
80
|
icon: PropTypes.element,
|
|
81
|
+
style: ViewPropTypes.style,
|
|
82
|
+
inputStyle: ViewPropTypes.style,
|
|
81
83
|
onEnter: PropTypes.func,
|
|
82
84
|
testID: PropTypes.string,
|
|
83
85
|
};
|
|
@@ -18,7 +18,7 @@ import { Player } from '../AudioPlayer';
|
|
|
18
18
|
import TrackPlayer, { usePlaybackState, Capability, State, useProgress } from "react-native-track-player";
|
|
19
19
|
import MaterialIcon from "react-native-vector-icons/MaterialCommunityIcons";
|
|
20
20
|
import {Comments} from '../Comments'
|
|
21
|
-
|
|
21
|
+
import { isDetox } from 'react-native-is-detox';
|
|
22
22
|
import Modal from 'react-native-modal';
|
|
23
23
|
import { SCREEN_LIST } from '../../../../../../src/constants/screen-mapping';
|
|
24
24
|
import { COMP_GENERAL_CONSTANTS } from '../../constants/component-constants';
|
|
@@ -160,8 +160,9 @@ export const Story = ({
|
|
|
160
160
|
const cards = story?.cards ?? [];
|
|
161
161
|
const [showModal, setShowModal] = useState(false);
|
|
162
162
|
const [audioRate, setAudioRate] = useState(1);
|
|
163
|
+
const [progressInterval, setProgressInterval] = useState(undefined);
|
|
163
164
|
const playbackState = usePlaybackState();
|
|
164
|
-
const progress = useProgress();
|
|
165
|
+
const progress = useProgress(progressInterval);
|
|
165
166
|
const [isFinishedPlaying, setFinishedPlaying] = useState(false);
|
|
166
167
|
|
|
167
168
|
|
|
@@ -240,6 +241,14 @@ export const Story = ({
|
|
|
240
241
|
return async() => await TrackPlayer.pause();
|
|
241
242
|
}, []);
|
|
242
243
|
|
|
244
|
+
useEffect(() => {
|
|
245
|
+
const checkDetox = async () => {
|
|
246
|
+
const isRunningInDetox = await isDetox();
|
|
247
|
+
setProgressInterval(isRunningInDetox ? 2000 : undefined);
|
|
248
|
+
};
|
|
249
|
+
checkDetox();
|
|
250
|
+
}, []);
|
|
251
|
+
|
|
243
252
|
useEffect(()=>{
|
|
244
253
|
if(progress?.duration < progress.position + 1 && progress.position !== 0){
|
|
245
254
|
setFinishedPlaying(true);
|