@amityco/react-native-social-uikit 4.0.0-e833198.0 → 4.0.0-ef2f404a.0

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 (429) hide show
  1. package/README.md +14 -14
  2. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  3. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  4. package/lib/commonjs/components/MediaSection/index.js +3 -3
  5. package/lib/commonjs/components/MediaSection/index.js.map +1 -1
  6. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +14 -5
  7. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  8. package/lib/commonjs/components/PostTypeChoiceModal/style.js +1 -2
  9. package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
  10. package/lib/commonjs/components/Social/PostList/index.js +1 -3
  11. package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
  12. package/lib/commonjs/index.js +6 -0
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/screens/CategorytList/index.js.map +1 -1
  15. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
  16. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  17. package/lib/commonjs/screens/LivestreamPlayer/index.js +3 -6
  18. package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
  19. package/lib/commonjs/snippet/AmityCommunitySearchResultComponent.js +3 -3
  20. package/lib/commonjs/snippet/AmityCommunitySearchResultComponent.js.map +1 -1
  21. package/lib/commonjs/snippet/AmityCreatePostMenuComponent.js +3 -3
  22. package/lib/commonjs/snippet/AmityCreatePostMenuComponent.js.map +1 -1
  23. package/lib/commonjs/snippet/AmityDetailedMediaAttachmentComponent.js +4 -4
  24. package/lib/commonjs/snippet/AmityDetailedMediaAttachmentComponent.js.map +1 -1
  25. package/lib/commonjs/snippet/AmityEmptyNewsFeedComponent.js +3 -3
  26. package/lib/commonjs/snippet/AmityEmptyNewsFeedComponent.js.map +1 -1
  27. package/lib/commonjs/snippet/AmityGlobalFeedComponent.js +3 -3
  28. package/lib/commonjs/snippet/AmityGlobalFeedComponent.js.map +1 -1
  29. package/lib/commonjs/snippet/AmityMediaAttachmentComponent.js +4 -4
  30. package/lib/commonjs/snippet/AmityMediaAttachmentComponent.js.map +1 -1
  31. package/lib/commonjs/snippet/AmityMyCommunitiesComponent.js +3 -3
  32. package/lib/commonjs/snippet/AmityMyCommunitiesComponent.js.map +1 -1
  33. package/lib/commonjs/snippet/AmityMyCommunitiesSearchPage.js +3 -3
  34. package/lib/commonjs/snippet/AmityMyCommunitiesSearchPage.js.map +1 -1
  35. package/lib/commonjs/snippet/AmityNewsFeedComponent.js +3 -3
  36. package/lib/commonjs/snippet/AmityNewsFeedComponent.js.map +1 -1
  37. package/lib/commonjs/snippet/AmityPostComposerPage.js +4 -4
  38. package/lib/commonjs/snippet/AmityPostComposerPage.js.map +1 -1
  39. package/lib/commonjs/snippet/AmityPostContentComponent.js +3 -3
  40. package/lib/commonjs/snippet/AmityPostContentComponent.js.map +1 -1
  41. package/lib/commonjs/snippet/AmityPostDetailPage.js +3 -3
  42. package/lib/commonjs/snippet/AmityPostDetailPage.js.map +1 -1
  43. package/lib/commonjs/snippet/AmityPostTargetSelectionPage.js +4 -4
  44. package/lib/commonjs/snippet/AmityPostTargetSelectionPage.js.map +1 -1
  45. package/lib/commonjs/snippet/AmityReactionListComponent.js +3 -3
  46. package/lib/commonjs/snippet/AmityReactionListComponent.js.map +1 -1
  47. package/lib/commonjs/snippet/AmitySocialGlobalSearchPage.js +3 -3
  48. package/lib/commonjs/snippet/AmitySocialGlobalSearchPage.js.map +1 -1
  49. package/lib/commonjs/snippet/AmitySocialHomePage.js +3 -3
  50. package/lib/commonjs/snippet/AmitySocialHomePage.js.map +1 -1
  51. package/lib/commonjs/snippet/AmitySocialHomeTopNavigationComponent.js +3 -3
  52. package/lib/commonjs/snippet/AmitySocialHomeTopNavigationComponent.js.map +1 -1
  53. package/lib/commonjs/snippet/AmityStoryTargetSelectionPage.js +3 -3
  54. package/lib/commonjs/snippet/AmityStoryTargetSelectionPage.js.map +1 -1
  55. package/lib/commonjs/snippet/AmityTopSearchBarComponent.js +3 -3
  56. package/lib/commonjs/snippet/AmityTopSearchBarComponent.js.map +1 -1
  57. package/lib/commonjs/snippet/AmityUserSearchResultComponent.js +3 -3
  58. package/lib/commonjs/snippet/AmityUserSearchResultComponent.js.map +1 -1
  59. package/lib/commonjs/svg/svg-xml-list.js +1 -1
  60. package/lib/commonjs/util/postTypeChecker.js.map +1 -1
  61. package/lib/commonjs/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.js.map +1 -1
  62. package/lib/commonjs/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.js.map +1 -1
  63. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
  64. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  65. package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +4 -3
  66. package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
  67. package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +0 -1
  68. package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
  69. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  70. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  71. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
  72. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  73. package/lib/commonjs/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.js.map +1 -1
  74. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
  75. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  76. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +28 -25
  77. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  78. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  79. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  80. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +217 -68
  81. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  82. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +50 -0
  83. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
  84. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
  85. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  86. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +150 -124
  87. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  88. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
  89. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  90. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js +7 -1
  91. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js.map +1 -1
  92. package/lib/commonjs/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js +7 -1
  93. package/lib/commonjs/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js.map +1 -1
  94. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +9 -2
  95. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  96. package/lib/commonjs/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js +7 -1
  97. package/lib/commonjs/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js.map +1 -1
  98. package/lib/commonjs/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
  99. package/lib/commonjs/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js +7 -1
  100. package/lib/commonjs/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js.map +1 -1
  101. package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
  102. package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
  103. package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  104. package/lib/commonjs/v4/component/PostContent/index.js +4 -4
  105. package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
  106. package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
  107. package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
  108. package/lib/commonjs/v4/component/PreviewLink/LinkPreview.js +3 -3
  109. package/lib/commonjs/v4/component/PreviewLink/LinkPreview.js.map +1 -1
  110. package/lib/commonjs/v4/component/PreviewLink/utils.js +9 -73
  111. package/lib/commonjs/v4/component/PreviewLink/utils.js.map +1 -1
  112. package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js +10 -4
  113. package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
  114. package/lib/commonjs/v4/component/Toast/index.js +4 -4
  115. package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
  116. package/lib/commonjs/v4/component/Toast/styles.js +2 -2
  117. package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
  118. package/lib/commonjs/v4/elements/ActionButton/ActionButton.js.map +1 -1
  119. package/lib/commonjs/v4/elements/ImageViewer/ImageViewer.js.map +1 -1
  120. package/lib/commonjs/v4/elements/VideoViewer/VideoViewer.js.map +1 -1
  121. package/lib/commonjs/v4/enum/roomStatus.js +14 -0
  122. package/lib/commonjs/v4/enum/roomStatus.js.map +1 -0
  123. package/lib/commonjs/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
  124. package/lib/commonjs/v4/features/community/shared/components/Privacy/index.js.map +1 -1
  125. package/lib/commonjs/v4/hook/index.js +22 -0
  126. package/lib/commonjs/v4/hook/index.js.map +1 -1
  127. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +1 -3
  128. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  129. package/lib/commonjs/v4/hook/useImagePicker.js.map +1 -1
  130. package/lib/commonjs/v4/hook/usePostSubscription.js +38 -0
  131. package/lib/commonjs/v4/hook/usePostSubscription.js.map +1 -0
  132. package/lib/commonjs/v4/hook/useRoomSubscription.js +22 -0
  133. package/lib/commonjs/v4/hook/useRoomSubscription.js.map +1 -0
  134. package/lib/commonjs/v4/index.js +7 -0
  135. package/lib/commonjs/v4/index.js.map +1 -1
  136. package/lib/commonjs/v4/providers/BehaviourProvider.js +2 -1
  137. package/lib/commonjs/v4/providers/BehaviourProvider.js.map +1 -1
  138. package/lib/commonjs/v4/stores/slices/toast.js +4 -1
  139. package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
  140. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  141. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  142. package/lib/module/components/MediaSection/index.js +3 -3
  143. package/lib/module/components/MediaSection/index.js.map +1 -1
  144. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +15 -8
  145. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  146. package/lib/module/components/PostTypeChoiceModal/style.js +1 -2
  147. package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
  148. package/lib/module/components/Social/PostList/index.js +1 -3
  149. package/lib/module/components/Social/PostList/index.js.map +1 -1
  150. package/lib/module/index.js +2 -6
  151. package/lib/module/index.js.map +1 -1
  152. package/lib/module/screens/CategorytList/index.js.map +1 -1
  153. package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
  154. package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  155. package/lib/module/screens/LivestreamPlayer/index.js +4 -8
  156. package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
  157. package/lib/module/snippet/AmityCommunitySearchResultComponent.js +1 -1
  158. package/lib/module/snippet/AmityCommunitySearchResultComponent.js.map +1 -1
  159. package/lib/module/snippet/AmityCreatePostMenuComponent.js +1 -1
  160. package/lib/module/snippet/AmityCreatePostMenuComponent.js.map +1 -1
  161. package/lib/module/snippet/AmityDetailedMediaAttachmentComponent.js +1 -1
  162. package/lib/module/snippet/AmityDetailedMediaAttachmentComponent.js.map +1 -1
  163. package/lib/module/snippet/AmityEmptyNewsFeedComponent.js +1 -1
  164. package/lib/module/snippet/AmityEmptyNewsFeedComponent.js.map +1 -1
  165. package/lib/module/snippet/AmityGlobalFeedComponent.js +1 -1
  166. package/lib/module/snippet/AmityGlobalFeedComponent.js.map +1 -1
  167. package/lib/module/snippet/AmityMediaAttachmentComponent.js +1 -1
  168. package/lib/module/snippet/AmityMediaAttachmentComponent.js.map +1 -1
  169. package/lib/module/snippet/AmityMyCommunitiesComponent.js +1 -1
  170. package/lib/module/snippet/AmityMyCommunitiesComponent.js.map +1 -1
  171. package/lib/module/snippet/AmityMyCommunitiesSearchPage.js +1 -1
  172. package/lib/module/snippet/AmityMyCommunitiesSearchPage.js.map +1 -1
  173. package/lib/module/snippet/AmityNewsFeedComponent.js +1 -1
  174. package/lib/module/snippet/AmityNewsFeedComponent.js.map +1 -1
  175. package/lib/module/snippet/AmityPostComposerPage.js +1 -1
  176. package/lib/module/snippet/AmityPostComposerPage.js.map +1 -1
  177. package/lib/module/snippet/AmityPostContentComponent.js +1 -1
  178. package/lib/module/snippet/AmityPostContentComponent.js.map +1 -1
  179. package/lib/module/snippet/AmityPostDetailPage.js +1 -1
  180. package/lib/module/snippet/AmityPostDetailPage.js.map +1 -1
  181. package/lib/module/snippet/AmityPostTargetSelectionPage.js +1 -1
  182. package/lib/module/snippet/AmityPostTargetSelectionPage.js.map +1 -1
  183. package/lib/module/snippet/AmityReactionListComponent.js +1 -1
  184. package/lib/module/snippet/AmityReactionListComponent.js.map +1 -1
  185. package/lib/module/snippet/AmitySocialGlobalSearchPage.js +1 -1
  186. package/lib/module/snippet/AmitySocialGlobalSearchPage.js.map +1 -1
  187. package/lib/module/snippet/AmitySocialHomePage.js +1 -1
  188. package/lib/module/snippet/AmitySocialHomePage.js.map +1 -1
  189. package/lib/module/snippet/AmitySocialHomeTopNavigationComponent.js +1 -1
  190. package/lib/module/snippet/AmitySocialHomeTopNavigationComponent.js.map +1 -1
  191. package/lib/module/snippet/AmityStoryTargetSelectionPage.js +1 -1
  192. package/lib/module/snippet/AmityStoryTargetSelectionPage.js.map +1 -1
  193. package/lib/module/snippet/AmityTopSearchBarComponent.js +1 -1
  194. package/lib/module/snippet/AmityTopSearchBarComponent.js.map +1 -1
  195. package/lib/module/snippet/AmityUserSearchResultComponent.js +1 -1
  196. package/lib/module/snippet/AmityUserSearchResultComponent.js.map +1 -1
  197. package/lib/module/svg/svg-xml-list.js +1 -1
  198. package/lib/module/util/postTypeChecker.js.map +1 -1
  199. package/lib/module/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.js.map +1 -1
  200. package/lib/module/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.js.map +1 -1
  201. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
  202. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  203. package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +5 -4
  204. package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
  205. package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +0 -1
  206. package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
  207. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  208. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  209. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
  210. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  211. package/lib/module/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.js.map +1 -1
  212. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
  213. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  214. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +29 -26
  215. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  216. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  217. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  218. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +222 -72
  219. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  220. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +42 -0
  221. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
  222. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
  223. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  224. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +152 -126
  225. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  226. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
  227. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  228. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js +7 -1
  229. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js.map +1 -1
  230. package/lib/module/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js +7 -1
  231. package/lib/module/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js.map +1 -1
  232. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +9 -2
  233. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  234. package/lib/module/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js +7 -1
  235. package/lib/module/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js.map +1 -1
  236. package/lib/module/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
  237. package/lib/module/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js +7 -1
  238. package/lib/module/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js.map +1 -1
  239. package/lib/module/v4/component/LivestreamContent/index.js +13 -13
  240. package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
  241. package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  242. package/lib/module/v4/component/PostContent/index.js +4 -4
  243. package/lib/module/v4/component/PostContent/index.js.map +1 -1
  244. package/lib/module/v4/component/PostMenu/index.js +2 -2
  245. package/lib/module/v4/component/PostMenu/index.js.map +1 -1
  246. package/lib/module/v4/component/PreviewLink/LinkPreview.js +3 -3
  247. package/lib/module/v4/component/PreviewLink/LinkPreview.js.map +1 -1
  248. package/lib/module/v4/component/PreviewLink/utils.js +9 -73
  249. package/lib/module/v4/component/PreviewLink/utils.js.map +1 -1
  250. package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js +10 -4
  251. package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
  252. package/lib/module/v4/component/Toast/index.js +4 -4
  253. package/lib/module/v4/component/Toast/index.js.map +1 -1
  254. package/lib/module/v4/component/Toast/styles.js +2 -2
  255. package/lib/module/v4/component/Toast/styles.js.map +1 -1
  256. package/lib/module/v4/elements/ActionButton/ActionButton.js.map +1 -1
  257. package/lib/module/v4/elements/ImageViewer/ImageViewer.js.map +1 -1
  258. package/lib/module/v4/elements/VideoViewer/VideoViewer.js.map +1 -1
  259. package/lib/module/v4/enum/roomStatus.js +8 -0
  260. package/lib/module/v4/enum/roomStatus.js.map +1 -0
  261. package/lib/module/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
  262. package/lib/module/v4/features/community/shared/components/Privacy/index.js.map +1 -1
  263. package/lib/module/v4/hook/index.js +2 -0
  264. package/lib/module/v4/hook/index.js.map +1 -1
  265. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +1 -3
  266. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  267. package/lib/module/v4/hook/useImagePicker.js.map +1 -1
  268. package/lib/module/v4/hook/usePostSubscription.js +31 -0
  269. package/lib/module/v4/hook/usePostSubscription.js.map +1 -0
  270. package/lib/module/v4/hook/useRoomSubscription.js +15 -0
  271. package/lib/module/v4/hook/useRoomSubscription.js.map +1 -0
  272. package/lib/module/v4/index.js +1 -1
  273. package/lib/module/v4/index.js.map +1 -1
  274. package/lib/module/v4/providers/BehaviourProvider.js +2 -1
  275. package/lib/module/v4/providers/BehaviourProvider.js.map +1 -1
  276. package/lib/module/v4/stores/slices/toast.js +4 -1
  277. package/lib/module/v4/stores/slices/toast.js.map +1 -1
  278. package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
  279. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +1 -2
  280. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
  281. package/lib/typescript/src/components/Social/PostList/index.d.ts +1 -3
  282. package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
  283. package/lib/typescript/src/index.d.ts +2 -2
  284. package/lib/typescript/src/index.d.ts.map +1 -1
  285. package/lib/typescript/src/screens/CategorytList/index.d.ts.map +1 -1
  286. package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
  287. package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
  288. package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
  289. package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts +1 -0
  290. package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts.map +1 -1
  291. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +1 -3
  292. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
  293. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +1 -0
  294. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
  295. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
  296. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
  297. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
  298. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +8 -0
  299. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +1 -0
  300. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +70 -2
  301. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
  302. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
  303. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts +1 -0
  304. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
  305. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.d.ts.map +1 -1
  306. package/lib/typescript/src/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.d.ts.map +1 -1
  307. package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
  308. package/lib/typescript/src/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.d.ts.map +1 -1
  309. package/lib/typescript/src/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.d.ts.map +1 -1
  310. package/lib/typescript/src/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.d.ts.map +1 -1
  311. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
  312. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
  313. package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
  314. package/lib/typescript/src/v4/component/PreviewLink/utils.d.ts +6 -1
  315. package/lib/typescript/src/v4/component/PreviewLink/utils.d.ts.map +1 -1
  316. package/lib/typescript/src/v4/component/TargetSelectionPage/TargetSelectionPage.d.ts +2 -1
  317. package/lib/typescript/src/v4/component/TargetSelectionPage/TargetSelectionPage.d.ts.map +1 -1
  318. package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
  319. package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
  320. package/lib/typescript/src/v4/elements/ActionButton/ActionButton.d.ts.map +1 -1
  321. package/lib/typescript/src/v4/enum/roomStatus.d.ts +8 -0
  322. package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +1 -0
  323. package/lib/typescript/src/v4/features/community/Membership/components/MemberItem/MemberItem.d.ts.map +1 -1
  324. package/lib/typescript/src/v4/features/community/shared/components/Privacy/index.d.ts.map +1 -1
  325. package/lib/typescript/src/v4/hook/index.d.ts +2 -0
  326. package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
  327. package/lib/typescript/src/v4/hook/useImagePicker.d.ts.map +1 -1
  328. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +3 -0
  329. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
  330. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +4 -0
  331. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +1 -0
  332. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +4 -0
  333. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +1 -0
  334. package/lib/typescript/src/v4/index.d.ts +1 -0
  335. package/lib/typescript/src/v4/index.d.ts.map +1 -1
  336. package/lib/typescript/src/v4/providers/BehaviourProvider.d.ts.map +1 -1
  337. package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
  338. package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
  339. package/lib/typescript/src/v4/stores/slices/toast.d.ts +1 -0
  340. package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
  341. package/lib/typescript/src/v4/types/behaviour.interface.d.ts +7 -0
  342. package/lib/typescript/src/v4/types/behaviour.interface.d.ts.map +1 -1
  343. package/package.json +6 -3
  344. package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
  345. package/src/components/MediaSection/index.tsx +4 -6
  346. package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
  347. package/src/components/PostTypeChoiceModal/style.ts +1 -2
  348. package/src/components/Social/PostList/index.tsx +1 -4
  349. package/src/index.tsx +2 -2
  350. package/src/screens/CategorytList/index.tsx +7 -14
  351. package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
  352. package/src/screens/LivestreamPlayer/index.tsx +9 -15
  353. package/src/snippet/AmityCommunitySearchResultComponent.tsx +1 -1
  354. package/src/snippet/AmityCreatePostMenuComponent.tsx +1 -1
  355. package/src/snippet/AmityDetailedMediaAttachmentComponent.tsx +1 -1
  356. package/src/snippet/AmityEmptyNewsFeedComponent.tsx +1 -1
  357. package/src/snippet/AmityGlobalFeedComponent.tsx +1 -1
  358. package/src/snippet/AmityMediaAttachmentComponent.tsx +1 -1
  359. package/src/snippet/AmityMyCommunitiesComponent.tsx +1 -1
  360. package/src/snippet/AmityMyCommunitiesSearchPage.tsx +1 -1
  361. package/src/snippet/AmityNewsFeedComponent.tsx +1 -1
  362. package/src/snippet/AmityPostComposerPage.tsx +1 -1
  363. package/src/snippet/AmityPostContentComponent.tsx +1 -1
  364. package/src/snippet/AmityPostDetailPage.tsx +1 -1
  365. package/src/snippet/AmityPostTargetSelectionPage.tsx +1 -1
  366. package/src/snippet/AmityReactionListComponent.tsx +1 -1
  367. package/src/snippet/AmitySocialGlobalSearchPage.tsx +1 -1
  368. package/src/snippet/AmitySocialHomePage.tsx +1 -1
  369. package/src/snippet/AmitySocialHomeTopNavigationComponent.tsx +1 -1
  370. package/src/snippet/AmityStoryTargetSelectionPage.tsx +1 -1
  371. package/src/snippet/AmityTopSearchBarComponent.tsx +1 -1
  372. package/src/snippet/AmityUserSearchResultComponent.tsx +1 -1
  373. package/src/svg/svg-xml-list.ts +1 -1
  374. package/src/util/postTypeChecker.ts +1 -1
  375. package/src/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.tsx +2 -2
  376. package/src/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.tsx +97 -97
  377. package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
  378. package/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.tsx +12 -7
  379. package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -3
  380. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +1 -1
  381. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
  382. package/src/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.tsx +9 -9
  383. package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +3 -2
  384. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +24 -25
  385. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
  386. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +255 -89
  387. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +48 -0
  388. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +72 -3
  389. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +205 -154
  390. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +2 -0
  391. package/src/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.tsx +6 -0
  392. package/src/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.tsx +6 -1
  393. package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +7 -2
  394. package/src/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.tsx +7 -0
  395. package/src/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.tsx +5 -1
  396. package/src/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.tsx +7 -0
  397. package/src/v4/component/LivestreamContent/index.tsx +21 -22
  398. package/src/v4/component/MyStories/StoryCircleItem.tsx +8 -8
  399. package/src/v4/component/PostContent/index.tsx +6 -8
  400. package/src/v4/component/PostMenu/index.tsx +2 -2
  401. package/src/v4/component/PreviewLink/LinkPreview.tsx +3 -3
  402. package/src/v4/component/PreviewLink/utils.ts +9 -108
  403. package/src/v4/component/TargetSelectionPage/TargetSelectionPage.tsx +12 -4
  404. package/src/v4/component/Toast/index.tsx +1 -1
  405. package/src/v4/component/Toast/styles.ts +2 -2
  406. package/src/v4/elements/ActionButton/ActionButton.tsx +4 -1
  407. package/src/v4/elements/ImageViewer/ImageViewer.tsx +1 -1
  408. package/src/v4/elements/VideoViewer/VideoViewer.tsx +1 -1
  409. package/src/v4/enum/roomStatus.ts +7 -0
  410. package/src/v4/features/community/Membership/components/MemberItem/MemberItem.tsx +11 -2
  411. package/src/v4/features/community/shared/components/Privacy/index.tsx +4 -1
  412. package/src/v4/hook/index.ts +2 -0
  413. package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
  414. package/src/v4/hook/useImagePicker.ts +4 -1
  415. package/src/v4/hook/usePostSubscription.ts +34 -0
  416. package/src/v4/hook/useRoomSubscription.ts +19 -0
  417. package/src/v4/index.tsx +1 -1
  418. package/src/v4/providers/BehaviourProvider.tsx +1 -0
  419. package/src/v4/routes/RouteParamList.tsx +1 -1
  420. package/src/v4/stores/slices/toast.ts +5 -0
  421. package/src/v4/types/behaviour.interface.ts +7 -0
  422. package/uikit.config.json +1 -1
  423. package/lib/commonjs/v4/enum/livestreamStatus.js +0 -13
  424. package/lib/commonjs/v4/enum/livestreamStatus.js.map +0 -1
  425. package/lib/module/v4/enum/livestreamStatus.js +0 -7
  426. package/lib/module/v4/enum/livestreamStatus.js.map +0 -1
  427. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +0 -7
  428. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +0 -1
  429. package/src/v4/enum/livestreamStatus.ts +0 -6
@@ -7,14 +7,14 @@ import {
7
7
  ImageStyle,
8
8
  } from 'react-native';
9
9
  import React, { useEffect, useState, useCallback, Fragment } from 'react';
10
- import { FileRepository, StreamRepository } from '@amityco/ts-sdk-react-native';
10
+ import { FileRepository, RoomRepository } from '@amityco/ts-sdk-react-native';
11
11
  import { useStyles } from './styles';
12
12
  import { useNavigation } from '@react-navigation/native';
13
13
  import { SvgXml } from 'react-native-svg';
14
14
  import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
15
15
  import { play } from '../../assets/icons';
16
16
  import { Typography } from '../Typography/Typography';
17
- import { LivestreamStatus } from '../../enum/livestreamStatus';
17
+ import { RoomStatus } from '../../enum/roomStatus';
18
18
  import LiveStreamEndThumbnail from './LivestreamEndedThumbnail';
19
19
  import LiveStreamIdleThumbnail from './LivestreamIdleThumbnail';
20
20
  import RenderTextWithMention from '../RenderTextWithMention/RenderTextWithMention';
@@ -22,14 +22,14 @@ import { RootStackParamList } from '../../routes/RouteParamList';
22
22
  import LiveStreamTerminatedThumbnail from './LivestreamTerminatedThumbnail';
23
23
 
24
24
  interface ILivestreamContent {
25
- streamId: Amity.Stream['streamId'];
25
+ roomId: Amity.Room['roomId'];
26
26
  onPressPost: () => void;
27
27
  post: Amity.Post;
28
28
  }
29
29
 
30
30
  const LivestreamContent: React.FC<ILivestreamContent> = ({
31
31
  post,
32
- streamId,
32
+ roomId,
33
33
  onPressPost,
34
34
  }) => {
35
35
  const { styles, theme } = useStyles();
@@ -39,18 +39,18 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
39
39
  >();
40
40
 
41
41
  const [error, setError] = useState<boolean>(false);
42
- const [livestream, setLivestream] = useState<Amity.Stream>();
42
+ const [livestream, setLivestream] = useState<Amity.Room>();
43
43
  const [thumbnailUrl, setThumbnailUrl] = useState<ImageSourcePropType>();
44
44
  const [isUpcoming, setIsUpcoming] = useState<boolean>(false);
45
45
 
46
46
  const onPlayLivestream = useCallback(() => {
47
47
  navigation.navigate('LivestreamPlayer', {
48
48
  post,
49
- streamId: livestream.streamId,
49
+ roomId: livestream.roomId,
50
50
  });
51
51
  }, [livestream, navigation, post]);
52
52
 
53
- const getLivestreamThumbnail = async (currentStream: Amity.Stream) => {
53
+ const getLivestreamThumbnail = async (currentStream: Amity.Room) => {
54
54
  const defaultThumbnail = require('../../assets/images/livestream.png');
55
55
 
56
56
  if (currentStream.thumbnailFileId) {
@@ -71,8 +71,8 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
71
71
 
72
72
  useEffect(() => {
73
73
  setIsUpcoming(true);
74
- const unsubscribe = StreamRepository.getStreamById(
75
- streamId,
74
+ const unsubscribe = RoomRepository.getRoom(
75
+ roomId,
76
76
  ({ data, loading, error: streamError }) => {
77
77
  if (streamError) setError(!!streamError);
78
78
  if (!loading && data) {
@@ -86,13 +86,13 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
86
86
  return () => {
87
87
  unsubscribe();
88
88
  };
89
- }, [streamId]);
89
+ }, [roomId]);
90
90
 
91
91
  if (!livestream) return null;
92
92
 
93
93
  if (error || livestream?.isDeleted) {
94
94
  return (
95
- <View key={livestream.streamId} style={styles.container}>
95
+ <View key={livestream.roomId} style={styles.container}>
96
96
  <LiveStreamIdleThumbnail />
97
97
  </View>
98
98
  );
@@ -102,12 +102,12 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
102
102
  livestream?.moderation?.terminateLabels &&
103
103
  livestream?.moderation?.terminateLabels?.length > 0;
104
104
  const isLiveOrEnded =
105
- livestream?.status === LivestreamStatus.live ||
106
- livestream?.status === LivestreamStatus.ended;
105
+ livestream?.status === RoomStatus.live ||
106
+ livestream?.status === RoomStatus.ended;
107
107
 
108
108
  if (isTerminated && isLiveOrEnded) {
109
109
  return (
110
- <View key={livestream.streamId} style={styles.container}>
110
+ <View key={livestream.roomId} style={styles.container}>
111
111
  <LiveStreamTerminatedThumbnail />
112
112
  </View>
113
113
  );
@@ -129,7 +129,7 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
129
129
  )}
130
130
  </Pressable>
131
131
  <View style={styles.container}>
132
- {(livestream.status === LivestreamStatus.idle || isUpcoming) &&
132
+ {(livestream.status === RoomStatus.idle || isUpcoming) &&
133
133
  thumbnailUrl && (
134
134
  <View style={styles.content}>
135
135
  <Image
@@ -144,12 +144,10 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
144
144
  </View>
145
145
  )}
146
146
 
147
- {livestream.status === LivestreamStatus.ended && (
148
- <LiveStreamEndThumbnail />
149
- )}
147
+ {livestream.status === RoomStatus.ended && <LiveStreamEndThumbnail />}
150
148
 
151
- {(livestream.status === LivestreamStatus.live ||
152
- livestream.status === LivestreamStatus.recorded) &&
149
+ {(livestream.status === RoomStatus.live ||
150
+ livestream.status === RoomStatus.recorded) &&
153
151
  thumbnailUrl &&
154
152
  !isUpcoming && (
155
153
  <View style={styles.content}>
@@ -157,14 +155,15 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
157
155
  source={thumbnailUrl}
158
156
  style={styles.streamImageCover as ImageStyle}
159
157
  />
160
- {livestream.status === LivestreamStatus.live && (
158
+ {(livestream.status === RoomStatus.live ||
159
+ livestream.status === RoomStatus.waiting_reconnect) && (
161
160
  <View style={styles.streamStatusLive}>
162
161
  <Typography.CaptionBold style={styles.streamStatusText}>
163
162
  LIVE
164
163
  </Typography.CaptionBold>
165
164
  </View>
166
165
  )}
167
- {livestream.status === LivestreamStatus.recorded && (
166
+ {livestream.status === RoomStatus.recorded && (
168
167
  <View style={styles.streamStatusRecorded}>
169
168
  <Typography.CaptionBold style={styles.streamStatusText}>
170
169
  RECORDED
@@ -31,13 +31,13 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
31
31
  const styles = useStyles();
32
32
  const storyRingColor: string[] = storyTarget?.hasUnseen
33
33
  ? (getUiKitConfig({
34
- page: PageID.StoryPage,
35
- component: ComponentID.StoryTab,
36
- element: ElementID.StoryRing,
37
- })?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
34
+ page: PageID.StoryPage,
35
+ component: ComponentID.StoryTab,
36
+ element: ElementID.StoryRing,
37
+ })?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
38
38
  : storyTarget?.failedStoriesCount > 0
39
- ? ['#DE1029', '#DE1029']
40
- : ['#e2e2e2', '#e2e2e2'];
39
+ ? ['#DE1029', '#DE1029']
40
+ : ['#e2e2e2', '#e2e2e2'];
41
41
 
42
42
  useEffect(() => {
43
43
  if (storyTarget.targetType !== 'community') return;
@@ -68,8 +68,8 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
68
68
  source={
69
69
  avatarUrl
70
70
  ? {
71
- uri: avatarUrl,
72
- }
71
+ uri: avatarUrl,
72
+ }
73
73
  : require('../../assets/images/userAvatar.png')
74
74
  }
75
75
  style={styles.communityAvatar}
@@ -43,9 +43,7 @@ const PostContent: React.FC<IPostContent> = ({
43
43
  const [imagePosts, setImagePosts] = useState<string[]>([]);
44
44
  const [videoPosts, setVideoPosts] = useState<IVideoPost[]>([]);
45
45
  const [pollIds, setPollIds] = useState<{ pollId: string }[]>([]);
46
- const [livestreamId, setLivestreamId] = useState<Amity.Stream['streamId'][]>(
47
- []
48
- );
46
+ const [livestreamId, setLivestreamId] = useState<Amity.Room['roomId'][]>([]);
49
47
 
50
48
  const [imagePostsFullSize, setImagePostsFullSize] = useState<MediaUri[]>([]);
51
49
  const [videoPostsFullSize, setVideoPostsFullSize] = useState<MediaUri[]>([]);
@@ -96,7 +94,7 @@ const PostContent: React.FC<IPostContent> = ({
96
94
  const images: string[] = [];
97
95
  const videos: IVideoPost[] = [];
98
96
  const polls: { pollId: string }[] = [];
99
- const livestreams: Amity.Stream['streamId'][] = [];
97
+ const livestreams: Amity.Room['roomId'][] = [];
100
98
 
101
99
  response.forEach((item) => {
102
100
  if (item?.dataType === 'image' && item?.data?.fileId) {
@@ -119,9 +117,9 @@ const PostContent: React.FC<IPostContent> = ({
119
117
  if (!polls.some((poll) => poll.pollId === item.data.pollId)) {
120
118
  polls.push(item.data);
121
119
  }
122
- } else if (item?.dataType === 'liveStream') {
123
- if (!livestreams.includes(item.data.streamId)) {
124
- livestreams.push(item.data.streamId);
120
+ } else if (item?.dataType === 'room') {
121
+ if (!livestreams.includes(item.data.roomId)) {
122
+ livestreams.push(item.data.roomId);
125
123
  }
126
124
  }
127
125
  });
@@ -344,7 +342,7 @@ const PostContent: React.FC<IPostContent> = ({
344
342
  <LivestreamContent
345
343
  post={post}
346
344
  onPressPost={onPressPost}
347
- streamId={livestreamId[0]}
345
+ roomId={livestreamId[0]}
348
346
  />
349
347
  ) : (
350
348
  renderMediaPosts()
@@ -255,7 +255,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
255
255
  ],
256
256
  },
257
257
  (post?.creator?.userId === myId || isIAmModerator) &&
258
- ((childrenPost?.dataType !== 'liveStream' &&
258
+ ((childrenPost?.dataType !== 'room' &&
259
259
  childrenPost?.dataType !== 'poll') ||
260
260
  (childrenPost?.dataType === 'poll' &&
261
261
  pollData?.status === 'open')) &&
@@ -280,7 +280,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
280
280
  </TouchableOpacity>
281
281
  )}
282
282
  {post?.creator?.userId === myId &&
283
- childrenPost?.dataType !== 'liveStream' &&
283
+ childrenPost?.dataType !== 'room' &&
284
284
  childrenPost?.dataType !== 'poll' && (
285
285
  <TouchableOpacity
286
286
  onPress={goToEditPost}
@@ -21,7 +21,7 @@ export const LinkPreview = React.memo(
21
21
 
22
22
  const fetchData = async () => {
23
23
  setData(undefined);
24
- const newData = await getPreviewData(text, 5000);
24
+ const newData = await getPreviewData(text);
25
25
  if (!isCancelled) {
26
26
  setData(newData);
27
27
  }
@@ -37,8 +37,8 @@ export const LinkPreview = React.memo(
37
37
 
38
38
  const renderImageNode = React.useCallback(
39
39
  (image: PreviewDataImage) => {
40
- const imageUrl = image?.url
41
- ? { uri: image.url }
40
+ const imageUrl = image
41
+ ? { uri: image }
42
42
  : require('../../assets/images/previewLinkDefaultBackground.png');
43
43
 
44
44
  return (
@@ -2,6 +2,7 @@ import { decode } from 'html-entities';
2
2
  import { Image } from 'react-native';
3
3
 
4
4
  import { PreviewData, PreviewDataImage, Size } from './types';
5
+ import { Client } from '@amityco/ts-sdk-react-native';
5
6
 
6
7
  export const getActualImageUrl = (baseUrl: string, imageUrl?: string) => {
7
8
  let actualImageUrl = imageUrl?.trim();
@@ -54,7 +55,7 @@ export const getImageSize = (url: string) => {
54
55
 
55
56
  // Functions below use functions from the same file and mocks are not working
56
57
  /* istanbul ignore next */
57
- export const getPreviewData = async (text: string, requestTimeout = 5000) => {
58
+ export const getPreviewData = async (text: string) => {
58
59
  const previewData: PreviewData = {
59
60
  description: undefined,
60
61
  image: undefined,
@@ -77,114 +78,14 @@ export const getPreviewData = async (text: string, requestTimeout = 5000) => {
77
78
  url = 'https://' + url;
78
79
  }
79
80
 
80
- let abortControllerTimeout: number;
81
- const abortController = new AbortController();
81
+ const request = await Client.fetchLinkPreview(url);
82
82
 
83
- const request = fetch(url, {
84
- headers: {
85
- 'User-Agent':
86
- 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
87
- },
88
- signal: abortController.signal,
89
- });
90
-
91
- abortControllerTimeout = setTimeout(() => {
92
- abortController.abort();
93
- }, requestTimeout);
94
-
95
- const response = await request;
96
-
97
- clearTimeout(abortControllerTimeout);
98
-
99
- previewData.link = url;
100
-
101
- const contentType = response.headers.get('content-type') ?? '';
102
-
103
- if (REGEX_IMAGE_CONTENT_TYPE.test(contentType)) {
104
- const image = await getPreviewDataImage(url);
105
- previewData.image = image;
106
- return previewData;
107
- }
108
-
109
- const html = await response.text();
110
-
111
- // Some pages return undefined
112
- if (!html) return previewData;
113
-
114
- const head = html.substring(0, html.indexOf('<body'));
115
-
116
- // Get page title
117
- const title = REGEX_TITLE.exec(head);
118
- previewData.title = getHtmlEntitiesDecodedText(title?.[1]);
119
-
120
- let matches: RegExpMatchArray | null;
121
- const meta: RegExpMatchArray[] = [];
122
- while ((matches = REGEX_META.exec(head)) !== null) {
123
- // @ts-ignore
124
- meta.push([...matches]);
125
- }
126
-
127
- const metaPreviewData = meta.reduce<{
128
- description?: string;
129
- imageUrl?: string;
130
- title?: string;
131
- }>(
132
- (acc, curr) => {
133
- // Verify that we have property/name and content
134
- // Note that if a page will specify property, name and content in the same meta, regex will fail
135
- if (!curr[2] || !curr[3]) return acc;
136
-
137
- // Only take the first occurrence
138
- // For description take the meta description tag into consideration
139
- const description =
140
- !acc.description &&
141
- (getContent(curr[2], curr[3], 'og:description') ||
142
- getContent(curr[2], curr[3], 'description'));
143
- const ogImage =
144
- !acc.imageUrl && getContent(curr[2], curr[3], 'og:image');
145
- const ogTitle = !acc.title && getContent(curr[2], curr[3], 'og:title');
146
-
147
- return {
148
- description: description
149
- ? getHtmlEntitiesDecodedText(description)
150
- : acc.description,
151
- imageUrl: ogImage ? getActualImageUrl(url, ogImage) : acc.imageUrl,
152
- title: ogTitle ? getHtmlEntitiesDecodedText(ogTitle) : acc.title,
153
- };
154
- },
155
- { title: previewData.title }
156
- );
157
-
158
- previewData.description = metaPreviewData.description;
159
- previewData.image = await getPreviewDataImage(metaPreviewData.imageUrl);
160
- previewData.title = metaPreviewData.title;
161
-
162
- if (!previewData.image) {
163
- let imageMatches: RegExpMatchArray | null;
164
- const tags: RegExpMatchArray[] = [];
165
- while ((imageMatches = REGEX_IMAGE_TAG.exec(html)) !== null) {
166
- // @ts-ignore
167
- tags.push([...imageMatches]);
168
- }
169
-
170
- let images: PreviewDataImage[] = [];
171
-
172
- for (const tag of tags
173
- .filter((t) => !t[1].startsWith('data'))
174
- .slice(0, 5)) {
175
- const image = await getPreviewDataImage(getActualImageUrl(url, tag[1]));
176
-
177
- if (!image) continue;
178
-
179
- images = [...images, image];
180
- }
181
-
182
- previewData.image = images.sort(
183
- (a, b) => b.height * b.width - a.height * a.width
184
- )[0];
185
- }
186
-
187
- return previewData;
83
+ return {
84
+ description: request.description || undefined,
85
+ image: request.image || undefined,
86
+ link: url,
87
+ title: request.title || undefined,
88
+ };
188
89
  } catch {
189
90
  return previewData;
190
91
  }
@@ -13,11 +13,12 @@ import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
13
13
  import CloseButtonIconElement from '../../PublicApi/Elements/CloseButtonIconElement/CloseButtonIconElement';
14
14
  import { PageID, ComponentID, ElementID } from '../../enum';
15
15
  import { SafeAreaView } from 'react-native-safe-area-context';
16
- import { useNavigation } from '@react-navigation/native';
17
16
  import TextKeyElement from '../../PublicApi/Elements/TextKeyElement/TextKeyElement';
18
17
  import { Typography } from '../Typography/Typography';
19
18
  import { useStyles } from './styles';
20
19
  import { Illustration } from '../../../v4/PublicApi/Components/AmityEmptyNewsFeedComponent/Elements';
20
+ import { useNavigation } from '@react-navigation/native';
21
+ import { NativeStackNavigationProp } from '@react-navigation/native-stack';
21
22
 
22
23
  export type FeedParams = {
23
24
  targetId: string;
@@ -48,21 +49,23 @@ interface ITargetSelectionPage {
48
49
  postSetting,
49
50
  needApprovalOnPostCreation,
50
51
  }: FeedParams) => void;
52
+ onClickClose?: () => void;
51
53
  }
52
54
 
53
55
  const TargetSelectionPage = ({
54
56
  pageId,
55
57
  hideMyTimelineTarget = false,
56
58
  onSelectFeed,
59
+ onClickClose,
57
60
  }: ITargetSelectionPage) => {
58
61
  const { client } = useAuth();
59
- const navigation = useNavigation();
62
+
60
63
  const defaultTheme = useTheme() as MyMD3Theme;
61
64
 
62
65
  const user = useUser((client as Amity.Client).userId);
63
66
  const { communities, onNextCommunityPage, loading } = useCommunities();
64
67
  const { themeStyles, accessibilityId } = useAmityPage({ pageId });
65
-
68
+ const navigation = useNavigation<NativeStackNavigationProp<any>>();
66
69
  const theme = themeStyles || defaultTheme;
67
70
  const styles = useStyles(theme);
68
71
 
@@ -102,7 +105,12 @@ const TargetSelectionPage = ({
102
105
  <View style={styles.header}>
103
106
  <TouchableOpacity
104
107
  style={styles.closeButton}
105
- onPress={() => navigation.goBack()}
108
+ onPress={() => {
109
+ onClickClose?.();
110
+ if (navigation.canGoBack()) {
111
+ navigation.goBack();
112
+ }
113
+ }}
106
114
  >
107
115
  <CloseButtonIconElement style={styles.closeIcon} pageID={pageId} />
108
116
  </TouchableOpacity>
@@ -8,8 +8,8 @@ import { informative, failed, success } from '../../assets/icons';
8
8
  import { CircularProgressIndicator } from '../CircularProgressIndicator';
9
9
 
10
10
  const Toast = () => {
11
- const { styles, theme } = useStyles();
12
11
  const { hideToast, toast } = useToast();
12
+ const { styles, theme } = useStyles(toast.bottomPosition);
13
13
  const timeoutRef = useRef<number | null>(null);
14
14
  const fadeIn = useRef(new Animated.Value(0)).current;
15
15
 
@@ -3,7 +3,7 @@ import { useTheme } from 'react-native-paper';
3
3
  import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
4
4
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
5
 
6
- export const useStyles = () => {
6
+ export const useStyles = (bottomPosition: number = 16) => {
7
7
  const theme = useTheme<MyMD3Theme>();
8
8
  const { bottom } = useSafeAreaInsets();
9
9
 
@@ -13,7 +13,7 @@ export const useStyles = () => {
13
13
  zIndex: 999,
14
14
  width: '90%',
15
15
  borderRadius: 8,
16
- bottom: bottom + 16,
16
+ bottom: bottom + bottomPosition,
17
17
  paddingVertical: 16,
18
18
  alignSelf: 'center',
19
19
  flexDirection: 'row',
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import { useAmityElement } from '../../../v4/hook';
3
3
  import { ComponentID, ElementID, PageID } from '../../../v4/enum';
4
- import Button, { BUTTON_SIZE, ButtonProps } from '../../../v4/component/Button/Button';
4
+ import Button, {
5
+ BUTTON_SIZE,
6
+ ButtonProps,
7
+ } from '../../../v4/component/Button/Button';
5
8
  import { useStyles } from './styles';
6
9
 
7
10
  type ActionButtonProps = ButtonProps & {
@@ -27,7 +27,7 @@ const ImageViewer: FC<ImageViewerProps> = ({
27
27
  images,
28
28
  onNextImage,
29
29
  onPreviousImage,
30
- onClose = () => { },
30
+ onClose = () => {},
31
31
  }) => {
32
32
  const [active, setActive] = useState(currentImageIndex);
33
33
  const scrollViewRef = useRef<ScrollView>(null);
@@ -27,7 +27,7 @@ const VideoViewer: FC<VideoViewerProps> = ({
27
27
  images,
28
28
  onNextImage,
29
29
  onPreviousImage,
30
- onClose = () => { },
30
+ onClose = () => {},
31
31
  }) => {
32
32
  const [active, setActive] = useState(currentImageIndex);
33
33
  const scrollViewRef = useRef<ScrollView>(null);
@@ -0,0 +1,7 @@
1
+ export const RoomStatus = {
2
+ idle: 'idle' as Amity.RoomStatus,
3
+ live: 'live' as Amity.RoomStatus,
4
+ recorded: 'recorded' as Amity.RoomStatus,
5
+ ended: 'ended' as Amity.RoomStatus,
6
+ waiting_reconnect: 'waitingReconnect' as Amity.RoomStatus,
7
+ };
@@ -9,8 +9,17 @@ import { useBottomSheet } from '../../../../../../redux/slices/bottomSheetSlice'
9
9
  import MenuAction from '../../../../../../v4/elements/MenuAction';
10
10
  import { MemberRoles } from '../../../../../../v4/constants';
11
11
  import { useToast } from '../../../../../../v4/stores/slices/toast';
12
- import { demote, promote, report, trash, unreport } from '../../../../../../v4/assets/icons';
13
- import { checkEditRolePermission, isModerator } from '../../../../../../v4/utils/permissions';
12
+ import {
13
+ demote,
14
+ promote,
15
+ report,
16
+ trash,
17
+ unreport,
18
+ } from '../../../../../../v4/assets/icons';
19
+ import {
20
+ checkEditRolePermission,
21
+ isModerator,
22
+ } from '../../../../../../v4/utils/permissions';
14
23
  import {
15
24
  useRolesQuery,
16
25
  useMembersQuery,
@@ -5,7 +5,10 @@ import { Radio } from '../../../../../../v4/component/core/Radio';
5
5
  import { ElementID, PageID } from '../../../../../../v4/enum';
6
6
  import FormLabel from '../../../../../../v4/elements/FormLabel';
7
7
  import { AmityCommunityPrivacyEnum } from '../../types';
8
- import { public as $public, private as $private } from '../../../../../../v4/assets/icons';
8
+ import {
9
+ public as $public,
10
+ private as $private,
11
+ } from '../../../../../../v4/assets/icons';
9
12
  import { Title } from '../../../../../../v4/elements';
10
13
  import FormDescription from '../../../../../../v4/elements/FormDescription';
11
14
  import CommunityPrivacyIcon from '../../../../../../v4/elements/CommunityPrivacyIcon';
@@ -30,3 +30,5 @@ export * from './usePendingPostQuery';
30
30
  export * from './useMembersQuery';
31
31
  export * from './useRolesQuery';
32
32
  export * from './useFlagUserQuery';
33
+ export * from './usePostSubscription';
34
+ export * from './useRoomSubscription';
@@ -51,7 +51,7 @@ export const useCustomRankingGlobalFeed = () => {
51
51
  if (
52
52
  data?.dataType === 'image' ||
53
53
  data?.dataType === 'video' ||
54
- // data?.dataType === 'liveStream' ||
54
+ data?.dataType === 'room' ||
55
55
  data?.dataType === 'poll'
56
56
  ) {
57
57
  resolve(post);
@@ -9,7 +9,10 @@ import {
9
9
 
10
10
  import { isValidImageType } from '../utils';
11
11
  import { useCameraPermission } from './usePermissions';
12
- import { deleteAmityFile, uploadImageFile } from '../../providers/file-provider';
12
+ import {
13
+ deleteAmityFile,
14
+ uploadImageFile,
15
+ } from '../../providers/file-provider';
13
16
 
14
17
  export type UseImagePickerResponse = {
15
18
  progress: number;
@@ -0,0 +1,34 @@
1
+ import { useEffect, useState } from 'react';
2
+ import {
3
+ getPostTopic,
4
+ PostRepository,
5
+ subscribeTopic,
6
+ } from '@amityco/ts-sdk-react-native';
7
+
8
+ export const usePostSubscription = (postId: string) => {
9
+ const [subscribedPost, setSubscribedPost] = useState<Amity.Post>(null);
10
+
11
+ useEffect(() => {
12
+ let unsubscribe: () => void;
13
+ if (postId) {
14
+ unsubscribe = PostRepository.getPost(postId, ({ data }) => {
15
+ setSubscribedPost(data);
16
+ });
17
+ }
18
+ return () => {
19
+ unsubscribe && unsubscribe();
20
+ };
21
+ }, [postId]);
22
+
23
+ useEffect(() => {
24
+ let unsubscribe: () => void;
25
+ if (subscribedPost) {
26
+ unsubscribe = subscribeTopic(getPostTopic(subscribedPost));
27
+ }
28
+ return () => {
29
+ unsubscribe && unsubscribe();
30
+ };
31
+ }, [subscribedPost]);
32
+
33
+ return { subscribedPost };
34
+ };
@@ -0,0 +1,19 @@
1
+ import {
2
+ getRoomWatcherTopic,
3
+ subscribeTopic,
4
+ } from '@amityco/ts-sdk-react-native';
5
+ import { useEffect } from 'react';
6
+
7
+ export const useRoomSubscription = ({ room }: { room?: Amity.Room | null }) => {
8
+ useEffect(() => {
9
+ const unsubscriber: Amity.Unsubscriber[] = [];
10
+
11
+ if (room?.roomId && room?.status !== 'recorded') {
12
+ unsubscriber.push(subscribeTopic(getRoomWatcherTopic(room)));
13
+ }
14
+
15
+ return () => unsubscriber.forEach((fn) => fn());
16
+ }, [room, room?.roomId]);
17
+
18
+ return null;
19
+ };
package/src/v4/index.tsx CHANGED
@@ -11,7 +11,7 @@ export { default as AmityMyCommunitiesSearchPage } from './PublicApi/Pages/Amity
11
11
  export { default as AmityAllCategoriesPage } from './PublicApi/Pages/AmityAllCategoriesPage/AmityAllCategoriesPage';
12
12
  export { default as AmityCommunitiesByCategoryPage } from './PublicApi/Pages/AmityCommunitiesByCategoryPage/AmityCommunitiesByCategoryPage';
13
13
  export { default as AmityCommunityProfilePage } from './PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage';
14
- // export { default as AmityCreateLivestreamPage } from './PublicApi/Pages/AmityCreateLivestreamPage';
14
+ export { default as AmityCreateLivestreamPage } from './PublicApi/Pages/AmityCreateLivestreamPage';
15
15
  export { default as AmityLivestreamPostTargetSelectionPage } from './PublicApi/Pages/AmityLivestreamPostTargetSelectionPage';
16
16
  export { default as AmityLivestreamTerminatedPage } from './PublicApi/Pages/AmityLivestreamTerminatedPage';
17
17
  export { default as AmityLivestreamPlayerPage } from './PublicApi/Pages/AmityLivestreamPlayerPage';
@@ -31,6 +31,7 @@ export const BehaviourProvider = ({
31
31
  AmityCommunitySettingPageBehavior: {},
32
32
  AmityCommunityMembershipPageBehavior: {},
33
33
  AmityCommunityNotificationSettingPageBehavior: {},
34
+ AmityPostComposerPageBehavior: {},
34
35
  }),
35
36
  []
36
37
  );