@quintype/native-components 2.20.26-beta.0 → 2.20.26-beta.1

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/README.md CHANGED
@@ -4,7 +4,26 @@
4
4
 
5
5
  `$ npm install @quintype/native-components --save`
6
6
 
7
- ### Linking
7
+ ## Creating and installing a beta version
8
+
9
+ ### Publishing a version with beta tag:
10
+ 1. Add, commit and push beta changes on a new branch.
11
+ 2. Run `npm i --legacy-peer-deps` (Using **node@16.19.0**, **npm@8.19.3**)
12
+ 3. Run `npm cache clean --force` in case the above command fails.
13
+ 4. Create a tag by running `npm version 2.21.0-beta.0` (add **\`-beta.*iteration*\`** (where ***iteration*** can just be incremented (+1) for subsequent beta-versions on the same development branch)
14
+ 5. Publish the tag by running `npm publish --tag beta`
15
+ 6. Make sure to commit and push the new beta versioning changes.
16
+
17
+ ### Installing a version with beta tag on host app:
18
+ npm install @quintype/native-components@beta
19
+
20
+ ### Note:
21
+ - `prePublishOnly` script that was in use before is incompatible with recent node/npm versions. Hence `standard-version-release.sh` is not used.
22
+ - Revert `"version"` changes from `package.json` before creating PR (for merging to `master`).
23
+ - Access all versions [here](https://www.npmjs.com/package/@quintype/native-components?activeTab=versions).
24
+
25
+
26
+ ## Linking
8
27
 
9
28
  This library has both js only as well as native components. Please check the instructions for the respective components for more details.
10
29
 
package/jest-setup.js CHANGED
@@ -2,11 +2,6 @@ jest.mock('@react-navigation/native', () => ({
2
2
  useNavigation: () => jest.fn(),
3
3
  }));
4
4
 
5
- jest.mock('rn-fetch-blob', () => ({
6
- DocumentDir: () => { },
7
- polyfill: () => { },
8
- }));
9
-
10
5
  jest.mock('react-native-device-info', () => ({
11
6
  DocumentDir: () => { },
12
7
  polyfill: () => { },
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.20.26-beta.0",
3
+ "version": "2.20.26-beta.1",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "test": "jest --detectOpenHandles",
8
8
  "lint": "npx eslint './src/**/*.{js,jsx}'",
9
- "lint:ci": "npx eslint $(git diff --pretty='' --diff-filter=d --name-only origin/master..HEAD -- '*.js' '*.jsx') ./start.js",
10
- "prepublishOnly": "./bin-dev-scripts/standard-version-release.sh"
9
+ "lint:ci": "npx eslint $(git diff --pretty='' --diff-filter=d --name-only origin/master..HEAD -- '*.js' '*.jsx') ./start.js"
11
10
  },
12
11
  "dependencies": {
13
12
  "atob": "^2.1.2",
@@ -20,18 +19,17 @@
20
19
  "react-native-fast-image": "8.3.2",
21
20
  "react-native-image-pan-zoom": "^2.1.12",
22
21
  "react-native-lightbox": "0.8.1",
23
- "react-native-pdf": "^5.1.4",
24
22
  "react-native-render-html": "^4.2.3",
25
- "react-native-share": "^8.1.0",
26
- "rn-fetch-blob": "^0.10.16"
23
+ "react-native-share": "^8.1.0"
27
24
  },
28
25
  "peerDependencies": {
29
- "@react-navigation/native": ">=5.7.3",
26
+ "@react-navigation/native": ">=6.1.17",
30
27
  "lodash": ">=4.17.20",
31
28
  "react": ">=17.0.2",
32
29
  "react-native": ">=0.67.5",
33
30
  "react-native-fast-image": ">=8.3.2",
34
- "react-native-pdf": ">=6.2.0",
31
+ "react-native-pdf": ">=6.7.4",
32
+ "react-native-blob-util": ">=6.7.4",
35
33
  "react-native-webview": ">=11.0.0",
36
34
  "rn-fetch-blob": ">=0.12.0",
37
35
  "react-native-vector-icons": "^10.0.0",
@@ -41,7 +39,6 @@
41
39
  "@babel/core": "^7.11.1",
42
40
  "@babel/runtime": "^7.11.2",
43
41
  "@react-native-community/eslint-config": "^2.0.0",
44
- "@react-navigation/native": "^5.7.1",
45
42
  "@testing-library/jest-native": "^3.4.3",
46
43
  "@testing-library/react-native": "^7.1.0",
47
44
  "babel-jest": "^26.3.0",
@@ -54,10 +51,9 @@
54
51
  "husky": "^4.2.5",
55
52
  "jest": "^26.4.0",
56
53
  "metro-react-native-babel-preset": "^0.62.0",
57
- "react": "17.0.2",
58
- "react-native": "0.67.4",
54
+ "react": "18.2.0",
55
+ "react-native": "0.71.17",
59
56
  "react-native-device-info": "^5.6.5",
60
- "react-native-gesture-handler": "^1.9.0",
61
57
  "react-native-svg": "^12.3.0",
62
58
  "react-navigation-hooks": "^1.1.0",
63
59
  "react-test-renderer": "16.13.1"
@@ -66,7 +62,6 @@
66
62
  "preset": "react-native",
67
63
  "setupFilesAfterEnv": [
68
64
  "./jest-setup.js",
69
- "./node_modules/react-native-gesture-handler/jestSetup.js",
70
65
  "@testing-library/jest-native/extend-expect"
71
66
  ],
72
67
  "moduleNameMapper": {
@@ -1,8 +1,7 @@
1
1
  import { get } from 'lodash';
2
2
  import PropTypes from 'prop-types';
3
3
  import React, { useContext } from 'react';
4
- import { Linking, View } from 'react-native';
5
- import { TouchableOpacity } from 'react-native-gesture-handler';
4
+ import { Linking, View, TouchableOpacity } from 'react-native';
6
5
  import { AppTheme } from '../../utils';
7
6
  import { Text } from '../Text';
8
7
  import { styles } from './styles';
@@ -147,16 +147,13 @@ export const Story = ({
147
147
  getAd,
148
148
  showWall,
149
149
  userObjectLength,
150
- numberOfVisibleStoryCard
150
+ numberOfVisibleStoryCard,
151
+ linkedStories
151
152
  }) => {
152
153
  const { theme } = useContext(AppTheme);
153
154
  const { COLORS, FONT_SIZE, locale, DARK_MODE } = theme;
154
155
  const styles = storyStyles(COLORS, FONT_SIZE);
155
-
156
- const {
157
- cards = [],
158
- 'linked-stories': linkedStories,
159
- } = mutateDataBeforeAccess(story, storyHasAccess, numberOfVisibleStoryCard);
156
+ const cards = story?.cards ?? [];
160
157
 
161
158
  const firstVideoElement = story['story-template'] === STORY_TYPES.VIDEO_STORY
162
159
  ? getFirstVideoElement(cards)
@@ -185,17 +182,6 @@ export const Story = ({
185
182
  return null;
186
183
  };
187
184
 
188
- useEffect(() => {
189
- checkStoryAccess(story);
190
- }, []);
191
-
192
- useEffect(()=>{
193
- if(userObjectLength){
194
- checkStoryAccess(story);
195
- }
196
- },[userObjectLength])
197
-
198
-
199
185
  const GradientView = () => {
200
186
  return (
201
187
  <LinearGradient
@@ -38,9 +38,6 @@ export const storyStyles = (COLORS, FONT_SIZE) => StyleSheet.create({
38
38
  fontSize: FONT_SIZE.title,
39
39
  },
40
40
  overlay:{
41
- // backgroundColor:'red',
42
- // position:'absolute',
43
- // bottom:100,
44
41
  marginTop:-220
45
42
  }
46
43
  });
@@ -1,7 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { useContext } from 'react';
3
- import { View } from 'react-native';
4
- import { TouchableOpacity } from 'react-native-gesture-handler';
3
+ import { View, TouchableOpacity } from 'react-native';
5
4
  import { ShareIcon } from '../../Icons/ShareIcon';
6
5
  import { AppTheme, getScreenPercentageWidth, stripHTML } from '../../utils';
7
6
  import { Text } from '../index';
@@ -1,7 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React, { useContext, useRef, useState } from 'react';
3
- import { TouchableOpacity, View } from 'react-native';
4
- import { FlatList } from 'react-native-gesture-handler';
3
+ import { TouchableOpacity, View, FlatList } from 'react-native';
5
4
  import Icon from 'react-native-vector-icons/AntDesign';
6
5
  import { AppTheme } from '../../utils';
7
6
  import { SlideshowStoryCard } from '../SlideshowStoryCard';
@@ -1,7 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
- import { View } from 'react-native';
2
+ import { View , ScrollView } from 'react-native';
3
3
  import get from 'lodash/get';
4
- import { ScrollView } from 'react-native-gesture-handler';
5
4
  import { formatData } from '../../utils/tableUtils';
6
5
  import { tableStyles } from './styles';
7
6
  import { Text } from '../index';
@@ -43,7 +43,6 @@ export const getFirstVideoElement = (cards) => cards
43
43
  ) || {};
44
44
 
45
45
  export const mutateDataBeforeAccess = (item, storyHasAccess, visibleCardCountForBlockedStories) => {
46
- console.log('risi - visibleCardCountForBlockedStories', visibleCardCountForBlockedStories)
47
46
  if (isStoryFree(item) === 0 || storyHasAccess === 'granted') {
48
47
  return item;
49
48
  }