@quintype/native-components 2.19.18 → 2.19.19
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/CHANGELOG.md +8 -0
- package/package.json +5 -5
- package/src/components/Story/index.js +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.19.19](https://github.com/quintype/native-components/compare/v2.19.18...v2.19.19) (2022-08-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **Ads:** Change midcontentAd logic for video-story :hammer: ([#186](https://github.com/quintype/native-components/issues/186)) ([b04a16c](https://github.com/quintype/native-components/commit/b04a16cb74f06c3a3f5639df31b39b2ecd4b6704))
|
|
11
|
+
* **deps:** Fixes dependency-conflict due to incorrect react-native version :hammer: ([b43e8ae](https://github.com/quintype/native-components/commit/b43e8ae0e4cf92d3fce21336c3cdd6c2d73db582))
|
|
12
|
+
|
|
5
13
|
### [2.19.18](https://github.com/quintype/native-components/compare/v2.19.17...v2.19.18) (2022-07-04)
|
|
6
14
|
|
|
7
15
|
### [2.19.17](https://github.com/quintype/native-components/compare/v2.19.14...v2.19.17) (2022-06-29)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/native-components",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-navigation/native": ">=5.7.3",
|
|
31
31
|
"lodash": ">=4.17.20",
|
|
32
|
-
"react": ">=
|
|
33
|
-
"react-native": ">=0.
|
|
32
|
+
"react": ">=17.0.2",
|
|
33
|
+
"react-native": ">=0.67.4",
|
|
34
34
|
"react-native-fast-image": ">=8.3.2",
|
|
35
35
|
"react-native-pdf": ">=6.2.0",
|
|
36
36
|
"react-native-webview": ">=11.0.0",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"husky": "^4.2.5",
|
|
54
54
|
"jest": "^26.4.0",
|
|
55
55
|
"metro-react-native-babel-preset": "^0.62.0",
|
|
56
|
-
"react": "
|
|
57
|
-
"react-native": "
|
|
56
|
+
"react": "17.0.2",
|
|
57
|
+
"react-native": "0.67.4",
|
|
58
58
|
"react-native-device-info": "^5.6.5",
|
|
59
59
|
"react-native-gesture-handler": "^1.9.0",
|
|
60
60
|
"react-native-svg": "^12.3.0",
|
|
@@ -119,9 +119,11 @@ const getStoryCards = (
|
|
|
119
119
|
)}
|
|
120
120
|
{/* Skip first card if it's a listicle */}
|
|
121
121
|
|
|
122
|
-
{source.length >
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
{source.length > (storyType === STORY_TYPES.VIDEO_STORY ? 2 : 1)
|
|
123
|
+
&& isMiddleIndexOfArray(index, source)
|
|
124
|
+
&& getAd(true)}
|
|
125
|
+
{/* ^ Requesting mid-content-ad if there are > 1 card
|
|
126
|
+
(> 2 cards in case of video story since the 1st card gets rendered in header). */}
|
|
125
127
|
|
|
126
128
|
{(card['story-elements'] || []).map((storyElement, index, source) => {
|
|
127
129
|
/* Skip the first video element for video story */
|
|
@@ -130,10 +132,12 @@ const getStoryCards = (
|
|
|
130
132
|
return (
|
|
131
133
|
<>
|
|
132
134
|
{cards.length === 1
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{/* ^
|
|
135
|
+
&& source.length > (storyType === STORY_TYPES.VIDEO_STORY ? 2 : 1)
|
|
136
|
+
&& isMiddleIndexOfArray(index, source)
|
|
137
|
+
&& getAd(true)}
|
|
138
|
+
{/* ^ In the case of a story having just 1 card,
|
|
139
|
+
requesting mid-content-Ad if there are > 1 story-elements in that card
|
|
140
|
+
(> 2 story-elements in case of video story since the 1st story-element gets rendered in header). */}
|
|
137
141
|
|
|
138
142
|
<StoryContent
|
|
139
143
|
testID={contentTestID}
|