@plusscommunities/pluss-core-app 1.4.8 → 1.5.2

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.
Files changed (186) hide show
  1. package/dist/module/actions/FollowerActions.js +34 -0
  2. package/dist/module/actions/FollowerActions.js.map +1 -0
  3. package/dist/module/actions/MediaActions.js +20 -0
  4. package/dist/module/actions/MediaActions.js.map +1 -0
  5. package/dist/module/actions/ResidentActions.js +26 -0
  6. package/dist/module/actions/ResidentActions.js.map +1 -0
  7. package/dist/module/actions/UserActions.js +214 -0
  8. package/dist/module/actions/UserActions.js.map +1 -0
  9. package/dist/module/actions/index.js +5 -0
  10. package/dist/module/actions/index.js.map +1 -0
  11. package/dist/module/actions/types.js +14 -0
  12. package/dist/module/actions/types.js.map +1 -0
  13. package/dist/module/apis/analyticsActions.js +20 -0
  14. package/dist/module/apis/analyticsActions.js.map +1 -0
  15. package/dist/module/apis/contactActions.js +27 -0
  16. package/dist/module/apis/contactActions.js.map +1 -0
  17. package/dist/module/apis/eventActions.js +163 -0
  18. package/dist/module/apis/eventActions.js.map +1 -0
  19. package/dist/module/apis/fileActions.js +96 -0
  20. package/dist/module/apis/fileActions.js.map +1 -0
  21. package/dist/module/apis/followerActions.js +38 -0
  22. package/dist/module/apis/followerActions.js.map +1 -0
  23. package/dist/module/apis/index.js +11 -0
  24. package/dist/module/apis/index.js.map +1 -0
  25. package/dist/module/apis/notificationActions.js +60 -0
  26. package/dist/module/apis/notificationActions.js.map +1 -0
  27. package/dist/module/apis/profileActions.js +14 -0
  28. package/dist/module/apis/profileActions.js.map +1 -0
  29. package/dist/module/apis/reactionActions.js +78 -0
  30. package/dist/module/apis/reactionActions.js.map +1 -0
  31. package/dist/module/apis/typeActions.js +15 -0
  32. package/dist/module/apis/typeActions.js.map +1 -0
  33. package/dist/module/apis/userActions.js +104 -0
  34. package/dist/module/apis/userActions.js.map +1 -0
  35. package/{assets → dist/module/assets}/icons/reactions/heart.png +0 -0
  36. package/{assets → dist/module/assets}/icons/reactions/party.png +0 -0
  37. package/{assets → dist/module/assets}/icons/reactions/sad.png +0 -0
  38. package/{assets → dist/module/assets}/icons/reactions/smile.png +0 -0
  39. package/dist/module/colours.js +149 -0
  40. package/dist/module/colours.js.map +1 -0
  41. package/dist/module/components/AddButton.js +45 -0
  42. package/dist/module/components/AddButton.js.map +1 -0
  43. package/dist/module/components/Attachment.js +59 -0
  44. package/dist/module/components/Attachment.js.map +1 -0
  45. package/dist/module/components/AudienceSelectorLauncher.js +70 -0
  46. package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
  47. package/dist/module/components/AudienceSelectorPage.js +376 -0
  48. package/dist/module/components/AudienceSelectorPage.js.map +1 -0
  49. package/dist/module/components/BackButton.js +62 -0
  50. package/dist/module/components/BackButton.js.map +1 -0
  51. package/dist/module/components/CategoryTabs.js +171 -0
  52. package/dist/module/components/CategoryTabs.js.map +1 -0
  53. package/dist/module/components/CommentReply.js +363 -0
  54. package/dist/module/components/CommentReply.js.map +1 -0
  55. package/dist/module/components/CommentSection.js +785 -0
  56. package/dist/module/components/CommentSection.js.map +1 -0
  57. package/dist/module/components/ConfirmPopup.js +85 -0
  58. package/dist/module/components/ConfirmPopup.js.map +1 -0
  59. package/dist/module/components/ConfirmationPopup.js +77 -0
  60. package/dist/module/components/ConfirmationPopup.js.map +1 -0
  61. package/dist/module/components/DropDownItem.js +82 -0
  62. package/dist/module/components/DropDownItem.js.map +1 -0
  63. package/dist/module/components/DropDownMenu.js +46 -0
  64. package/dist/module/components/DropDownMenu.js.map +1 -0
  65. package/dist/module/components/EmptyStateMain.js +50 -0
  66. package/dist/module/components/EmptyStateMain.js.map +1 -0
  67. package/dist/module/components/EmptyStateWidget.js +52 -0
  68. package/dist/module/components/EmptyStateWidget.js.map +1 -0
  69. package/dist/module/components/FontScaleButton.js +37 -0
  70. package/dist/module/components/FontScaleButton.js.map +1 -0
  71. package/dist/module/components/FontScalePopup.js +77 -0
  72. package/dist/module/components/FontScalePopup.js.map +1 -0
  73. package/dist/module/components/FormCard.js +28 -0
  74. package/dist/module/components/FormCard.js.map +1 -0
  75. package/dist/module/components/FormCardSection.js +240 -0
  76. package/dist/module/components/FormCardSection.js.map +1 -0
  77. package/dist/module/components/FormCardSectionOptionLauncher.js +77 -0
  78. package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
  79. package/dist/module/components/FormattedText.js +145 -0
  80. package/dist/module/components/FormattedText.js.map +1 -0
  81. package/dist/module/components/GenericInput.js +161 -0
  82. package/dist/module/components/GenericInput.js.map +1 -0
  83. package/dist/module/components/GenericInputSection.js +174 -0
  84. package/dist/module/components/GenericInputSection.js.map +1 -0
  85. package/dist/module/components/Header.js +491 -0
  86. package/dist/module/components/Header.js.map +1 -0
  87. package/dist/module/components/ImagePopup.js +257 -0
  88. package/dist/module/components/ImagePopup.js.map +1 -0
  89. package/dist/module/components/ImageUploadProgress.js +72 -0
  90. package/dist/module/components/ImageUploadProgress.js.map +1 -0
  91. package/dist/module/components/ImageUploader.js +850 -0
  92. package/dist/module/components/ImageUploader.js.map +1 -0
  93. package/dist/module/components/InlineButton.js +72 -0
  94. package/dist/module/components/InlineButton.js.map +1 -0
  95. package/dist/module/components/Input.js +164 -0
  96. package/dist/module/components/Input.js.map +1 -0
  97. package/dist/module/components/LoadingCircles.js +224 -0
  98. package/dist/module/components/LoadingCircles.js.map +1 -0
  99. package/dist/module/components/LoadingIndicator.js +95 -0
  100. package/dist/module/components/LoadingIndicator.js.map +1 -0
  101. package/dist/module/components/LoadingStateWidget.js +51 -0
  102. package/dist/module/components/LoadingStateWidget.js.map +1 -0
  103. package/dist/module/components/MediaPlayer.js +453 -0
  104. package/dist/module/components/MediaPlayer.js.map +1 -0
  105. package/dist/module/components/MiddlePopup.js +46 -0
  106. package/dist/module/components/MiddlePopup.js.map +1 -0
  107. package/dist/module/components/PDFPopup.js +188 -0
  108. package/dist/module/components/PDFPopup.js.map +1 -0
  109. package/dist/module/components/PlussChat.js +997 -0
  110. package/dist/module/components/PlussChat.js.map +1 -0
  111. package/dist/module/components/PlussChatMessage.js +204 -0
  112. package/dist/module/components/PlussChatMessage.js.map +1 -0
  113. package/dist/module/components/PlussChatTime.js +66 -0
  114. package/dist/module/components/PlussChatTime.js.map +1 -0
  115. package/dist/module/components/Popup.js +138 -0
  116. package/dist/module/components/Popup.js.map +1 -0
  117. package/dist/module/components/PopupMenu.js +128 -0
  118. package/dist/module/components/PopupMenu.js.map +1 -0
  119. package/dist/module/components/PositionedImage.js +333 -0
  120. package/dist/module/components/PositionedImage.js.map +1 -0
  121. package/dist/module/components/ProfilePic.js +119 -0
  122. package/dist/module/components/ProfilePic.js.map +1 -0
  123. package/dist/module/components/RadioButton.js +84 -0
  124. package/dist/module/components/RadioButton.js.map +1 -0
  125. package/dist/module/components/Reaction.js +129 -0
  126. package/dist/module/components/Reaction.js.map +1 -0
  127. package/dist/module/components/Reactions.js +84 -0
  128. package/dist/module/components/Reactions.js.map +1 -0
  129. package/dist/module/components/SharingTools.js +162 -0
  130. package/dist/module/components/SharingTools.js.map +1 -0
  131. package/dist/module/components/Spinner.js +25 -0
  132. package/dist/module/components/Spinner.js.map +1 -0
  133. package/dist/module/components/StickyFooter.js +37 -0
  134. package/dist/module/components/StickyFooter.js.map +1 -0
  135. package/dist/module/components/TextStyle.js +34 -0
  136. package/dist/module/components/TextStyle.js.map +1 -0
  137. package/dist/module/components/Toggle.js +70 -0
  138. package/dist/module/components/Toggle.js.map +1 -0
  139. package/dist/module/components/TouchableSearchBar.js +73 -0
  140. package/dist/module/components/TouchableSearchBar.js.map +1 -0
  141. package/dist/module/components/UserListPopup.js +146 -0
  142. package/dist/module/components/UserListPopup.js.map +1 -0
  143. package/dist/module/components/UserListing.js +291 -0
  144. package/dist/module/components/UserListing.js.map +1 -0
  145. package/dist/module/components/VideoPopup.js +123 -0
  146. package/dist/module/components/VideoPopup.js.map +1 -0
  147. package/dist/module/components/WarningPopup.js +87 -0
  148. package/dist/module/components/WarningPopup.js.map +1 -0
  149. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +325 -0
  150. package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
  151. package/dist/module/components/expo-image-picker-multiple/ImageTile.js +123 -0
  152. package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
  153. package/dist/module/components/index.js +53 -0
  154. package/dist/module/components/index.js.map +1 -0
  155. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +416 -0
  156. package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
  157. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +405 -0
  158. package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
  159. package/dist/module/config.js +27 -0
  160. package/dist/module/config.js.map +1 -0
  161. package/dist/module/constants.js +16 -0
  162. package/dist/module/constants.js.map +1 -0
  163. package/dist/module/fonts/index.js +2 -0
  164. package/dist/module/fonts/index.js.map +1 -0
  165. package/dist/module/fonts/pluss60-icons.js +5 -0
  166. package/dist/module/fonts/pluss60-icons.js.map +1 -0
  167. package/dist/module/fonts/pluss60-icons.json +1097 -0
  168. package/dist/module/helper.js +436 -0
  169. package/dist/module/helper.js.map +1 -0
  170. package/dist/module/index.js +13 -0
  171. package/dist/module/index.js.map +1 -0
  172. package/dist/module/session.js +54 -0
  173. package/dist/module/session.js.map +1 -0
  174. package/dist/module/styles.js +67 -0
  175. package/dist/module/styles.js.map +1 -0
  176. package/package.json +24 -7
  177. package/src/assets/icons/reactions/heart.png +0 -0
  178. package/src/assets/icons/reactions/party.png +0 -0
  179. package/src/assets/icons/reactions/sad.png +0 -0
  180. package/src/assets/icons/reactions/smile.png +0 -0
  181. package/src/components/CommentReply.js +3 -5
  182. package/src/components/CommentSection.js +4 -4
  183. package/src/components/MediaPlayer.js +14 -4
  184. package/src/components/VideoPopup.js +1 -1
  185. package/src/constants.js +4 -4
  186. package/src/helper.js +4 -4
package/package.json CHANGED
@@ -1,14 +1,21 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-app",
3
- "version": "1.4.8",
3
+ "version": "1.5.2",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
- "main": "src/index.js",
5
+ "main": "dist/module/index.js",
6
+ "module": "dist/module/index.js",
7
+ "react-native": "src/index.js",
8
+ "files": [
9
+ "dist/",
10
+ "src/"
11
+ ],
6
12
  "scripts": {
7
- "prepatch": "npm version prepatch --preid=beta",
13
+ "build": "bob build",
14
+ "betapatch": "npm version prepatch --preid=beta",
8
15
  "patch": "npm version patch",
9
- "preupload": "npm publish --access public --tag beta && rm -rf node_modules",
10
- "preupload:p": "npm run prepatch && npm run preupload",
11
- "upload": "npm publish --access public && rm -rf node_modules",
16
+ "betaupload": "npm run build && npm publish --access public --tag beta",
17
+ "betaupload:p": "npm run betapatch && npm run betaupload",
18
+ "upload": "npm run build && npm publish --access public",
12
19
  "upload:p": "npm run patch && npm run upload"
13
20
  },
14
21
  "author": "Phillip Suh",
@@ -43,10 +50,20 @@
43
50
  "react-native-vimeo-iframe": "^1.0.4",
44
51
  "react-native-webview": "11.15.0",
45
52
  "react-native-youtube-iframe": "^2.2.1",
46
- "react-redux": "^5.0.5"
53
+ "react-redux": "^7.2.6"
47
54
  },
48
55
  "peerDependencies": {
49
56
  "react-native-gifted-chat": "^0.16.3",
50
57
  "axios": "^0.16.2"
58
+ },
59
+ "devDependencies": {
60
+ "react-native-builder-bob": "^0.18.2"
61
+ },
62
+ "react-native-builder-bob": {
63
+ "source": "src",
64
+ "output": "dist",
65
+ "targets": [
66
+ "module"
67
+ ]
51
68
  }
52
69
  }
@@ -29,7 +29,7 @@ class CommentReply extends Component {
29
29
  componentDidMount() {
30
30
  if (this.props.commentSection && this.props.commentSection.current) {
31
31
  this.setState({
32
- commentsLoading: this.props.commentSection.current.getWrappedInstance().isLoading(),
32
+ commentsLoading: this.props.commentSection.current.isLoading(),
33
33
  });
34
34
  }
35
35
  }
@@ -94,13 +94,13 @@ class CommentReply extends Component {
94
94
  });
95
95
  Keyboard.dismiss();
96
96
  if (this.props.commentSection) {
97
- this.props.commentSection?.current?.getWrappedInstance().startedAddingComment();
97
+ this.props.commentSection?.current?.startedAddingComment();
98
98
  }
99
99
  reactionActions
100
100
  .addComment(this.props.entityId, this.props.entityType, this.props.entityName, this.props.site, text, image, this.props.threadId)
101
101
  .then(res => {
102
102
  if (this.props.commentSection) {
103
- this.props.commentSection?.current?.getWrappedInstance().commentAdded(res.data);
103
+ this.props.commentSection?.current?.commentAdded(res.data);
104
104
  }
105
105
  this.setState({
106
106
  addingComment: false,
@@ -182,11 +182,9 @@ class CommentReply extends Component {
182
182
 
183
183
  render() {
184
184
  if (_.includes(this.props.user.hidden, 'addComment')) {
185
- console.log('no way');
186
185
  return null;
187
186
  }
188
187
  if (this.state.commentsLoading) {
189
- console.log('still loading');
190
188
  return null;
191
189
  }
192
190
  return (
@@ -179,7 +179,7 @@ class CommentSection extends Component {
179
179
  commentsLoadStarted: true,
180
180
  commentsLoading: true,
181
181
  });
182
- this.props.commentReply?.current?.getWrappedInstance().loadingStarted();
182
+ this.props.commentReply?.current?.loadingStarted();
183
183
 
184
184
  this.loadComments();
185
185
  }
@@ -221,7 +221,7 @@ class CommentSection extends Component {
221
221
  },
222
222
  );
223
223
  //if (this.props.commentReply) {
224
- this.props.commentReply?.current?.getWrappedInstance().loadingCompleted();
224
+ this.props.commentReply?.current?.loadingCompleted();
225
225
  //}
226
226
  if (this.props.live) {
227
227
  this.loadTimer = setTimeout(() => {
@@ -231,9 +231,9 @@ class CommentSection extends Component {
231
231
  });
232
232
  }
233
233
 
234
- isLoading() {
234
+ isLoading = () => {
235
235
  return this.state.commentsLoading;
236
- }
236
+ };
237
237
 
238
238
  startedAddingComment() {
239
239
  this.setState({
@@ -4,7 +4,7 @@ import * as ScreenOrientation from 'expo-screen-orientation';
4
4
  import { DeviceMotion } from 'expo-sensors';
5
5
  import YoutubePlayer, { getYoutubeMeta } from 'react-native-youtube-iframe';
6
6
  import { Vimeo } from 'react-native-vimeo-iframe';
7
- import WebView from 'react-native-webview';
7
+ import { WebView } from 'react-native-webview';
8
8
  import { Video } from 'expo-av';
9
9
  import VideoPlayer from 'expo-video-player';
10
10
  import { Spinner } from './Spinner';
@@ -259,14 +259,14 @@ class MediaPlayer extends Component {
259
259
  </View>
260
260
  );
261
261
 
262
- getWebviewPlayer = embedUrl => (
262
+ getWebviewPlayer = (embedUrl, width, height) => (
263
263
  <WebView
264
264
  startInLoadingState
265
265
  javaScriptEnabled
266
266
  scrollEnabled={false}
267
267
  automaticallyAdjustContentInsets={false}
268
268
  mediaPlaybackRequiresUserAction
269
- style={styles.webView}
269
+ style={[styles.webView, { width, height }]}
270
270
  source={{ uri: embedUrl }}
271
271
  />
272
272
  );
@@ -333,23 +333,28 @@ class MediaPlayer extends Component {
333
333
  if (isYoutube) {
334
334
  const youtubeId = this.getYoutubeVideoId(source);
335
335
  embedUrl = youtubeId ? `https://www.youtube.com/embed/${youtubeId}` : source;
336
+ // console.log('getYoutubePlayer', youtubeId, width, height, autoPlay);
336
337
  player = this.getYoutubePlayer(youtubeId, width, height, autoPlay);
337
338
  } else if (isVimeo) {
338
339
  const vimeoId = this.getVimeoId(source);
339
340
  embedUrl = source;
341
+ // console.log('getVimeoPlayer', vimeoId, width, height, autoPlay);
340
342
  player = this.getVimeoPlayer(vimeoId, width, height, autoPlay);
341
343
  } else if (playbackId) {
342
344
  embedUrl = this.getStreamPlaybackUrl();
345
+ // console.log('getStreamPlayer', embedUrl, width, height, autoPlay);
343
346
  player = this.getStreamPlayer(embedUrl, width, height, autoPlay);
344
347
  showLoading = true;
345
348
  } else if (useVideoPlayer) {
346
349
  embedUrl = source;
350
+ // console.log('getVideoPlayer', embedUrl, width, height, autoPlay);
347
351
  player = this.getVideoPlayer(embedUrl, width, height, autoPlay);
348
352
  }
349
353
  }
350
354
  if (!player && isUrlLink) {
351
355
  embedUrl = source;
352
- player = this.getWebviewPlayer(embedUrl);
356
+ console.log('getWebviewPlayer', embedUrl, width, height);
357
+ player = this.getWebviewPlayer(embedUrl, width, height);
353
358
  }
354
359
 
355
360
  // console.log({
@@ -361,6 +366,10 @@ class MediaPlayer extends Component {
361
366
  // Width: width,
362
367
  // Height: height,
363
368
  // HeightFactor: heightFactor,
369
+ // isYoutube,
370
+ // isVimeo,
371
+ // playbackId,
372
+ // useVideoPlayer,
364
373
  // });
365
374
  return (
366
375
  <View style={styles.container}>
@@ -377,6 +386,7 @@ class MediaPlayer extends Component {
377
386
 
378
387
  const styles = StyleSheet.create({
379
388
  container: {
389
+ flex: 1,
380
390
  backgroundColor: '#000',
381
391
  alignItems: 'center',
382
392
  justifyContent: 'center',
@@ -4,7 +4,7 @@ import * as ScreenOrientation from 'expo-screen-orientation';
4
4
  import { StatusBarHeight, getCompressed, imageExists } from '../helper';
5
5
  import { Pl60Icon } from '../fonts';
6
6
  import { SharingTools } from './SharingTools';
7
- import { MediaPlayer } from './MediaPlayer';
7
+ import MediaPlayer from './MediaPlayer';
8
8
 
9
9
  class VideoPopup extends Component {
10
10
  constructor(props) {
package/src/constants.js CHANGED
@@ -5,10 +5,10 @@ const HEADER_HEIGHT = 70;
5
5
 
6
6
  // const getFooterIcons = () => {
7
7
  // return {
8
- // events: require(`../../assets/icons/footer/whats-on.png`),
9
- // foryou: require(`../../assets/icons/footer/hub.png`),
10
- // friends: require(`../../assets/icons/footer/people.png`),
11
- // home: require(`../../assets/icons/footer/home.png`),
8
+ // events: require(`./assets/icons/footer/whats-on.png`),
9
+ // foryou: require(`./assets/icons/footer/hub.png`),
10
+ // friends: require(`./assets/icons/footer/people.png`),
11
+ // home: require(`./assets/icons/footer/home.png`),
12
12
  // };
13
13
  // };
14
14
 
package/src/helper.js CHANGED
@@ -287,19 +287,19 @@ const getReactions = () => {
287
287
  return [
288
288
  {
289
289
  key: 'heart',
290
- icon: require('../assets/icons/reactions/heart.png'),
290
+ icon: require('./assets/icons/reactions/heart.png'),
291
291
  },
292
292
  {
293
293
  key: 'smile',
294
- icon: require('../assets/icons/reactions/smile.png'),
294
+ icon: require('./assets/icons/reactions/smile.png'),
295
295
  },
296
296
  {
297
297
  key: 'sad',
298
- icon: require('../assets/icons/reactions/sad.png'),
298
+ icon: require('./assets/icons/reactions/sad.png'),
299
299
  },
300
300
  {
301
301
  key: 'party',
302
- icon: require('../assets/icons/reactions/party.png'),
302
+ icon: require('./assets/icons/reactions/party.png'),
303
303
  },
304
304
  ];
305
305
  };