@quintype/native-components 2.29.4 → 2.29.6

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,15 +1,15 @@
1
1
  #!/bin/bash -e
2
2
 
3
- npm install
4
- git diff --quiet
3
+ # npm install
4
+ # git diff --quiet
5
5
 
6
- BRANCH=$(git symbolic-ref --short HEAD)
6
+ # BRANCH=$(git symbolic-ref --short HEAD)
7
7
 
8
- if [ "$BRANCH" == 'master' ]
9
- then
10
- npx standard-version
11
- else
12
- npx standard-version --prerelease "$(git symbolic-ref --short HEAD | sed s:/:-:g )" --skip.changelog=true
13
- fi
8
+ # if [ "$BRANCH" == 'master' ]
9
+ # then
10
+ # npx standard-version
11
+ # else
12
+ # npx standard-version --prerelease "$(git symbolic-ref --short HEAD | sed s:/:-:g )" --skip.changelog=true
13
+ # fi
14
14
 
15
- git push --follow-tags origin "$BRANCH"
15
+ # git push --follow-tags origin "$BRANCH"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.29.4",
3
+ "version": "2.29.6",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,6 +9,7 @@ import Slider from "@react-native-community/slider";
9
9
  import { AppTheme } from "../../utils";
10
10
  import { useContext } from "react";
11
11
  import { Text } from '../index';
12
+ import { COMP_GENERAL_CONSTANTS } from "../../constants/component-constants";
12
13
 
13
14
  const ProgressBar = (props) => {
14
15
  const screenDimensions = useWindowDimensions();
@@ -67,10 +68,11 @@ const PlayerBase = (props) => {
67
68
  onTogglePlayback();
68
69
  }}
69
70
  FONT_SIZE={FONT_SIZE}
71
+ testID={COMP_GENERAL_CONSTANTS.ttsPlayButton}
70
72
  />
71
73
  );
72
74
  default:
73
- return <ControlButton iconName={"playcircleo"} onPress={onTogglePlayback} FONT_SIZE={FONT_SIZE}/>;
75
+ return <ControlButton testID={COMP_GENERAL_CONSTANTS.ttsPauseButton} iconName={"playcircleo"} onPress={onTogglePlayback} FONT_SIZE={FONT_SIZE}/>;
74
76
  }
75
77
  };
76
78
 
@@ -89,13 +91,14 @@ const PlayerBase = (props) => {
89
91
  {translate("Listen to this article")}
90
92
  </Text>
91
93
  <View style={playerControlStyle}>
92
- <TouchableOpacity style={{ marginHorizontal: 10 }} onPress={() => rewindOrForward("rewind")}>
93
- <MaterialCommunityIcons color={COLORS.BRAND_BLACK} name={"rewind-10"} size={FONT_SIZE.title} />
94
+ <TouchableOpacity testID={COMP_GENERAL_CONSTANTS.ttsRewindButton} style={{ marginHorizontal: 10 }} onPress={() => rewindOrForward("rewind")}>
95
+ <MaterialCommunityIcons color={COLORS.BRAND_BLACK} name={"rewind-10"} size={FONT_SIZE.title}/>
94
96
  </TouchableOpacity>
95
- <TouchableOpacity style={{ marginHorizontal: 10 }} onPress={() => rewindOrForward("forward")}>
97
+ <TouchableOpacity testID={COMP_GENERAL_CONSTANTS.ttsForwardButton} style={{ marginHorizontal: 10 }} onPress={() => rewindOrForward("forward")} >
96
98
  <MaterialCommunityIcons color={COLORS.BRAND_BLACK} name={"fast-forward-10"} size={FONT_SIZE.title} />
97
99
  </TouchableOpacity>
98
100
  <TouchableOpacity
101
+ testID={COMP_GENERAL_CONSTANTS.ttsPlayBackSpeed}
99
102
  style={playbackSpeedText}
100
103
  onPress={() => props.setShowModal(true)}
101
104
  >
@@ -114,6 +117,7 @@ const PlayerBase = (props) => {
114
117
  </View>
115
118
  <ProgressBar seekTo={seekTo} />
116
119
  <MaterialCommunityIcons
120
+ testID={COMP_GENERAL_CONSTANTS.ttsPlayerCloseButton}
117
121
  color={COLORS.BRAND_BLACK}
118
122
  onPress={()=>closeButtonHandler()}
119
123
  size={FONT_SIZE.title}
@@ -23,6 +23,7 @@ import FontAwesomeIcon from "react-native-vector-icons/FontAwesome";
23
23
  import { isDetox } from 'react-native-is-detox';
24
24
 
25
25
  import Modal from 'react-native-modal';
26
+ import { COMP_GENERAL_CONSTANTS } from '../../constants/component-constants';
26
27
 
27
28
  const getLiveBlogTimeStamp = (card, DATE_FORMAT, story, styles, locale) => {
28
29
  const slug = `?cardId=${card.id}`;
@@ -94,7 +95,7 @@ const getStoryCards = (
94
95
 
95
96
  {source.length > (storyType === STORY_TYPES.VIDEO_STORY ? 2 : 1)
96
97
  && isMiddleIndexOfArray(index, source)
97
- && getAd(true)}
98
+ && getAd(true, "body")}
98
99
  {/* ^ Requesting mid-content-ad if there are > 1 card
99
100
  (> 2 cards in case of video story since the 1st card gets rendered in header). */}
100
101
 
@@ -107,7 +108,7 @@ const getStoryCards = (
107
108
  {cards.length === 1
108
109
  && source.length > (storyType === STORY_TYPES.VIDEO_STORY ? 2 : 1)
109
110
  && isMiddleIndexOfArray(index, source)
110
- && getAd(true)}
111
+ && getAd(true, "body")}
111
112
  {/* ^ In the case of a story having just 1 card,
112
113
  requesting mid-content-Ad if there are > 1 story-elements in that card
113
114
  (> 2 story-elements in case of video story since the 1st story-element gets rendered in header). */}
@@ -394,6 +395,7 @@ export const Story = ({
394
395
  setShowPlayer(true)
395
396
  await togglePlayback()
396
397
  }}
398
+ testID={COMP_GENERAL_CONSTANTS.openTtsPlayer}
397
399
  style={styles.ttsStoryButtonStyle}
398
400
  >
399
401
  <MaterialIcon name='account-voice' size={FONT_SIZE.h2} color={COLORS.BRAND_BLACK}/>
@@ -417,7 +419,7 @@ export const Story = ({
417
419
  </View>))}
418
420
 
419
421
 
420
- {getAd()}
422
+ {getAd(false, "header")}
421
423
 
422
424
  {getStoryCards(
423
425
  cards,
@@ -463,7 +465,7 @@ export const Story = ({
463
465
  <View style={[Modalstyles.modalContent, styles.modalBackgound]}>
464
466
  <View style={Modalstyles.header}>
465
467
  <Text style={[Modalstyles.title, styles.textStyle]}>{translate("Playback Speed")}</Text>
466
- <TouchableOpacity onPress={() => setShowModal(false)}>
468
+ <TouchableOpacity testID={COMP_GENERAL_CONSTANTS.ttsModalCloseButton} onPress={() => setShowModal(false)}>
467
469
  <MaterialIcon name="close" size={25} color={styles?.textStyle?.color} />
468
470
  </TouchableOpacity>
469
471
  </View>
@@ -21,5 +21,13 @@ export const COMP_GENERAL_CONSTANTS = {
21
21
  headerLogoTouch: 'COMP_GENERAL_HEADER_LOGO_TOUCH',
22
22
  radioButtonTouch: 'COMP_GENERAL_RADIO',
23
23
  shareButtonTouch: 'COMP_GENERAL_SHARE',
24
- closeButtonTouch : 'COMP_CLOSE_BTN_TOUCH'
24
+ closeButtonTouch : 'COMP_CLOSE_BTN_TOUCH',
25
+ openTtsPlayer: 'COMP_OPEN_TTS_PLAYER',
26
+ ttsPlayerCloseButton: 'COMP_TTS_PLAYER_CLOSE_BUTTON',
27
+ ttsRewindButton: 'COMP_TTS_REWIND_BUTTON',
28
+ ttsForwardButton: 'COMP_TTS_FORWARD_BUTTON',
29
+ ttsPlayBackSpeed: 'COMP_TTS_PLAYBACK_SPEED',
30
+ ttsModalCloseButton: 'COMP_TTS_MODAL_CLOSE_BUTTON',
31
+ ttsPauseButton: 'COMP_TTS_PAUSE_BUTTON',
32
+ ttsPlayButton: 'COMP_TTS_PLAY_BUTTON'
25
33
  };