@amityco/react-native-social-uikit 4.0.1-fd53cf63.0 → 4.0.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.
Files changed (248) hide show
  1. package/lib/commonjs/core/assets/icons/index.js +0 -8
  2. package/lib/commonjs/core/assets/icons/index.js.map +1 -1
  3. package/lib/commonjs/core/constants/index.js +1 -11
  4. package/lib/commonjs/core/constants/index.js.map +1 -1
  5. package/lib/commonjs/core/hooks/useAuth.js +2 -6
  6. package/lib/commonjs/core/hooks/useAuth.js.map +1 -1
  7. package/lib/commonjs/core/hooks/useUpload.js +6 -7
  8. package/lib/commonjs/core/hooks/useUpload.js.map +1 -1
  9. package/lib/commonjs/core/legacy/file.js +4 -19
  10. package/lib/commonjs/core/legacy/file.js.map +1 -1
  11. package/lib/commonjs/core/providers/AmityUIKitProvider.js.map +1 -1
  12. package/lib/commonjs/core/providers/AuthProvider.js +16 -40
  13. package/lib/commonjs/core/providers/AuthProvider.js.map +1 -1
  14. package/lib/commonjs/core/routes/AmityUIKitNavigator.js +1 -23
  15. package/lib/commonjs/core/routes/AmityUIKitNavigator.js.map +1 -1
  16. package/lib/commonjs/core/utils/fileUpload.js +59 -0
  17. package/lib/commonjs/core/utils/fileUpload.js.map +1 -0
  18. package/lib/commonjs/social/components/Social/CommentList/CommentList.js +1 -6
  19. package/lib/commonjs/social/components/Social/CommentList/CommentList.js.map +1 -1
  20. package/lib/commonjs/social/components/Social/CommentListItem/CommentListItem.js +3 -14
  21. package/lib/commonjs/social/components/Social/CommentListItem/CommentListItem.js.map +1 -1
  22. package/lib/commonjs/social/components/legacy/Social/ReplyCommentList/index.js +2 -10
  23. package/lib/commonjs/social/components/legacy/Social/ReplyCommentList/index.js.map +1 -1
  24. package/lib/commonjs/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +1 -6
  25. package/lib/commonjs/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
  26. package/lib/commonjs/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js +3 -13
  27. package/lib/commonjs/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js.map +1 -1
  28. package/lib/commonjs/social/features/comment/components/PostComment/ReplyCommentList/index.js +2 -10
  29. package/lib/commonjs/social/features/comment/components/PostComment/ReplyCommentList/index.js.map +1 -1
  30. package/lib/commonjs/social/features/feed/components/TopNavigation/TopNavigation.js +1 -5
  31. package/lib/commonjs/social/features/feed/components/TopNavigation/TopNavigation.js.map +1 -1
  32. package/lib/commonjs/social/features/post/Detail/index.js +2 -6
  33. package/lib/commonjs/social/features/post/Detail/index.js.map +1 -1
  34. package/lib/commonjs/social/features/post/components/Content/Content.js +1 -5
  35. package/lib/commonjs/social/features/post/components/Content/Content.js.map +1 -1
  36. package/lib/commonjs/social/features/post/components/EngagementActions/Components/DetailStyle.js +10 -16
  37. package/lib/commonjs/social/features/post/components/EngagementActions/Components/DetailStyle.js.map +1 -1
  38. package/lib/commonjs/social/features/post/components/EngagementActions/Components/FeedStyle.js +9 -17
  39. package/lib/commonjs/social/features/post/components/EngagementActions/Components/FeedStyle.js.map +1 -1
  40. package/lib/commonjs/social/features/story/Draft/Draft.js +2 -5
  41. package/lib/commonjs/social/features/story/Draft/Draft.js.map +1 -1
  42. package/lib/commonjs/social/features/story/View/components/AmityViewStoryItem.js +20 -18
  43. package/lib/commonjs/social/features/story/View/components/AmityViewStoryItem.js.map +1 -1
  44. package/lib/commonjs/social/features/user/Profile/components/Header/hooks/useHeader.js +1 -6
  45. package/lib/commonjs/social/features/user/Profile/components/Header/hooks/useHeader.js.map +1 -1
  46. package/lib/commonjs/social/hooks/index.js +0 -22
  47. package/lib/commonjs/social/hooks/index.js.map +1 -1
  48. package/lib/commonjs/social/hooks/usePostPermission.js +2 -4
  49. package/lib/commonjs/social/hooks/usePostPermission.js.map +1 -1
  50. package/lib/commonjs/social/hooks/useStoryPermission.js +2 -3
  51. package/lib/commonjs/social/hooks/useStoryPermission.js.map +1 -1
  52. package/lib/commonjs/social/providers/BehaviourProvider.js +0 -1
  53. package/lib/commonjs/social/providers/BehaviourProvider.js.map +1 -1
  54. package/lib/commonjs/social/screens/SocialHomePage/index.js +5 -12
  55. package/lib/commonjs/social/screens/SocialHomePage/index.js.map +1 -1
  56. package/lib/module/core/assets/icons/index.js +0 -1
  57. package/lib/module/core/assets/icons/index.js.map +1 -1
  58. package/lib/module/core/constants/index.js +0 -10
  59. package/lib/module/core/constants/index.js.map +1 -1
  60. package/lib/module/core/hooks/useAuth.js +2 -6
  61. package/lib/module/core/hooks/useAuth.js.map +1 -1
  62. package/lib/module/core/hooks/useUpload.js +7 -8
  63. package/lib/module/core/hooks/useUpload.js.map +1 -1
  64. package/lib/module/core/legacy/file.js +4 -19
  65. package/lib/module/core/legacy/file.js.map +1 -1
  66. package/lib/module/core/providers/AmityUIKitProvider.js.map +1 -1
  67. package/lib/module/core/providers/AuthProvider.js +16 -40
  68. package/lib/module/core/providers/AuthProvider.js.map +1 -1
  69. package/lib/module/core/routes/AmityUIKitNavigator.js +1 -23
  70. package/lib/module/core/routes/AmityUIKitNavigator.js.map +1 -1
  71. package/lib/module/core/utils/fileUpload.js +54 -0
  72. package/lib/module/core/utils/fileUpload.js.map +1 -0
  73. package/lib/module/social/components/Social/CommentList/CommentList.js +1 -6
  74. package/lib/module/social/components/Social/CommentList/CommentList.js.map +1 -1
  75. package/lib/module/social/components/Social/CommentListItem/CommentListItem.js +3 -14
  76. package/lib/module/social/components/Social/CommentListItem/CommentListItem.js.map +1 -1
  77. package/lib/module/social/components/legacy/Social/ReplyCommentList/index.js +2 -10
  78. package/lib/module/social/components/legacy/Social/ReplyCommentList/index.js.map +1 -1
  79. package/lib/module/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +2 -7
  80. package/lib/module/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
  81. package/lib/module/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js +4 -14
  82. package/lib/module/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js.map +1 -1
  83. package/lib/module/social/features/comment/components/PostComment/ReplyCommentList/index.js +2 -10
  84. package/lib/module/social/features/comment/components/PostComment/ReplyCommentList/index.js.map +1 -1
  85. package/lib/module/social/features/feed/components/TopNavigation/TopNavigation.js +1 -5
  86. package/lib/module/social/features/feed/components/TopNavigation/TopNavigation.js.map +1 -1
  87. package/lib/module/social/features/post/Detail/index.js +2 -6
  88. package/lib/module/social/features/post/Detail/index.js.map +1 -1
  89. package/lib/module/social/features/post/components/Content/Content.js +1 -5
  90. package/lib/module/social/features/post/components/Content/Content.js.map +1 -1
  91. package/lib/module/social/features/post/components/EngagementActions/Components/DetailStyle.js +11 -17
  92. package/lib/module/social/features/post/components/EngagementActions/Components/DetailStyle.js.map +1 -1
  93. package/lib/module/social/features/post/components/EngagementActions/Components/FeedStyle.js +10 -18
  94. package/lib/module/social/features/post/components/EngagementActions/Components/FeedStyle.js.map +1 -1
  95. package/lib/module/social/features/story/Draft/Draft.js +2 -5
  96. package/lib/module/social/features/story/Draft/Draft.js.map +1 -1
  97. package/lib/module/social/features/story/View/components/AmityViewStoryItem.js +21 -19
  98. package/lib/module/social/features/story/View/components/AmityViewStoryItem.js.map +1 -1
  99. package/lib/module/social/features/user/Profile/components/Header/hooks/useHeader.js +2 -7
  100. package/lib/module/social/features/user/Profile/components/Header/hooks/useHeader.js.map +1 -1
  101. package/lib/module/social/hooks/index.js +0 -2
  102. package/lib/module/social/hooks/index.js.map +1 -1
  103. package/lib/module/social/hooks/usePostPermission.js +2 -4
  104. package/lib/module/social/hooks/usePostPermission.js.map +1 -1
  105. package/lib/module/social/hooks/useStoryPermission.js +2 -3
  106. package/lib/module/social/hooks/useStoryPermission.js.map +1 -1
  107. package/lib/module/social/providers/BehaviourProvider.js +0 -1
  108. package/lib/module/social/providers/BehaviourProvider.js.map +1 -1
  109. package/lib/module/social/screens/SocialHomePage/index.js +6 -13
  110. package/lib/module/social/screens/SocialHomePage/index.js.map +1 -1
  111. package/lib/typescript/core/assets/icons/index.d.ts +0 -1
  112. package/lib/typescript/core/assets/icons/index.d.ts.map +1 -1
  113. package/lib/typescript/core/constants/index.d.ts +0 -10
  114. package/lib/typescript/core/constants/index.d.ts.map +1 -1
  115. package/lib/typescript/core/hooks/useAuth.d.ts.map +1 -1
  116. package/lib/typescript/core/hooks/useUpload.d.ts.map +1 -1
  117. package/lib/typescript/core/legacy/file.d.ts.map +1 -1
  118. package/lib/typescript/core/providers/AmityUIKitProvider.d.ts +1 -2
  119. package/lib/typescript/core/providers/AmityUIKitProvider.d.ts.map +1 -1
  120. package/lib/typescript/core/providers/AuthProvider.d.ts.map +1 -1
  121. package/lib/typescript/core/routes/AmityUIKitNavigator.d.ts.map +1 -1
  122. package/lib/typescript/core/types/auth.d.ts +0 -2
  123. package/lib/typescript/core/types/auth.d.ts.map +1 -1
  124. package/lib/typescript/core/types/behaviour.d.ts +0 -6
  125. package/lib/typescript/core/types/behaviour.d.ts.map +1 -1
  126. package/lib/typescript/core/utils/fileUpload.d.ts +39 -0
  127. package/lib/typescript/core/utils/fileUpload.d.ts.map +1 -0
  128. package/lib/typescript/social/components/Social/CommentList/CommentList.d.ts.map +1 -1
  129. package/lib/typescript/social/components/Social/CommentListItem/CommentListItem.d.ts.map +1 -1
  130. package/lib/typescript/social/components/legacy/Social/ReplyCommentList/index.d.ts.map +1 -1
  131. package/lib/typescript/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.d.ts.map +1 -1
  132. package/lib/typescript/social/features/comment/components/PostComment/CommentListItem/CommentListItem.d.ts.map +1 -1
  133. package/lib/typescript/social/features/comment/components/PostComment/ReplyCommentList/index.d.ts.map +1 -1
  134. package/lib/typescript/social/features/feed/components/TopNavigation/TopNavigation.d.ts.map +1 -1
  135. package/lib/typescript/social/features/post/Detail/index.d.ts.map +1 -1
  136. package/lib/typescript/social/features/post/components/Content/Content.d.ts.map +1 -1
  137. package/lib/typescript/social/features/post/components/EngagementActions/Components/DetailStyle.d.ts.map +1 -1
  138. package/lib/typescript/social/features/post/components/EngagementActions/Components/FeedStyle.d.ts.map +1 -1
  139. package/lib/typescript/social/features/story/Draft/Draft.d.ts.map +1 -1
  140. package/lib/typescript/social/features/story/View/components/AmityViewStoryItem.d.ts.map +1 -1
  141. package/lib/typescript/social/features/user/Profile/components/Header/hooks/useHeader.d.ts.map +1 -1
  142. package/lib/typescript/social/hooks/index.d.ts +0 -2
  143. package/lib/typescript/social/hooks/index.d.ts.map +1 -1
  144. package/lib/typescript/social/hooks/usePostPermission.d.ts.map +1 -1
  145. package/lib/typescript/social/hooks/useStoryPermission.d.ts.map +1 -1
  146. package/lib/typescript/social/providers/BehaviourProvider.d.ts.map +1 -1
  147. package/lib/typescript/social/screens/SocialHomePage/index.d.ts.map +1 -1
  148. package/package.json +3 -3
  149. package/src/core/assets/icons/index.ts +0 -1
  150. package/src/core/constants/index.ts +0 -15
  151. package/src/core/hooks/useAuth.ts +0 -4
  152. package/src/core/hooks/useUpload.ts +6 -8
  153. package/src/core/legacy/file.tsx +16 -22
  154. package/src/core/providers/AmityUIKitProvider.tsx +1 -2
  155. package/src/core/providers/AuthProvider.tsx +11 -35
  156. package/src/core/routes/AmityUIKitNavigator.tsx +1 -26
  157. package/src/core/types/auth.ts +0 -2
  158. package/src/core/types/behaviour.ts +0 -6
  159. package/src/core/utils/fileUpload.ts +60 -0
  160. package/src/social/components/Social/CommentList/CommentList.tsx +1 -4
  161. package/src/social/components/Social/CommentListItem/CommentListItem.tsx +12 -20
  162. package/src/social/components/legacy/Social/ReplyCommentList/index.tsx +11 -18
  163. package/src/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.tsx +2 -10
  164. package/src/social/features/comment/components/PostComment/CommentListItem/CommentListItem.tsx +16 -23
  165. package/src/social/features/comment/components/PostComment/ReplyCommentList/index.tsx +11 -17
  166. package/src/social/features/feed/components/TopNavigation/TopNavigation.tsx +1 -3
  167. package/src/social/features/post/Detail/index.tsx +2 -5
  168. package/src/social/features/post/components/Content/Content.tsx +4 -7
  169. package/src/social/features/post/components/EngagementActions/Components/DetailStyle.tsx +14 -19
  170. package/src/social/features/post/components/EngagementActions/Components/FeedStyle.tsx +12 -20
  171. package/src/social/features/story/Draft/Draft.tsx +9 -5
  172. package/src/social/features/story/View/components/AmityViewStoryItem.tsx +22 -20
  173. package/src/social/features/user/Profile/components/Header/hooks/useHeader.ts +2 -5
  174. package/src/social/hooks/index.ts +0 -2
  175. package/src/social/hooks/usePostPermission.ts +1 -3
  176. package/src/social/hooks/useStoryPermission.ts +6 -8
  177. package/src/social/providers/BehaviourProvider.tsx +0 -1
  178. package/src/social/screens/SocialHomePage/index.tsx +11 -24
  179. package/lib/commonjs/core/assets/icons/visitorLimit.js +0 -26
  180. package/lib/commonjs/core/assets/icons/visitorLimit.js.map +0 -1
  181. package/lib/commonjs/social/features/visitor/UsageLimit/UsageLimit.js +0 -46
  182. package/lib/commonjs/social/features/visitor/UsageLimit/UsageLimit.js.map +0 -1
  183. package/lib/commonjs/social/features/visitor/UsageLimit/hooks/index.js +0 -13
  184. package/lib/commonjs/social/features/visitor/UsageLimit/hooks/index.js.map +0 -1
  185. package/lib/commonjs/social/features/visitor/UsageLimit/hooks/useUsageLimit.js +0 -54
  186. package/lib/commonjs/social/features/visitor/UsageLimit/hooks/useUsageLimit.js.map +0 -1
  187. package/lib/commonjs/social/features/visitor/UsageLimit/index.js +0 -13
  188. package/lib/commonjs/social/features/visitor/UsageLimit/index.js.map +0 -1
  189. package/lib/commonjs/social/features/visitor/UsageLimit/styles.js +0 -52
  190. package/lib/commonjs/social/features/visitor/UsageLimit/styles.js.map +0 -1
  191. package/lib/commonjs/social/hooks/useGlobalBehavior.js +0 -44
  192. package/lib/commonjs/social/hooks/useGlobalBehavior.js.map +0 -1
  193. package/lib/commonjs/social/hooks/useInteractionBehavior.js +0 -50
  194. package/lib/commonjs/social/hooks/useInteractionBehavior.js.map +0 -1
  195. package/lib/commonjs/social/screens/VisitorUsageLimit/VisitorUsageLimit.js +0 -11
  196. package/lib/commonjs/social/screens/VisitorUsageLimit/VisitorUsageLimit.js.map +0 -1
  197. package/lib/commonjs/social/screens/VisitorUsageLimit/index.js +0 -13
  198. package/lib/commonjs/social/screens/VisitorUsageLimit/index.js.map +0 -1
  199. package/lib/module/core/assets/icons/visitorLimit.js +0 -19
  200. package/lib/module/core/assets/icons/visitorLimit.js.map +0 -1
  201. package/lib/module/social/features/visitor/UsageLimit/UsageLimit.js +0 -40
  202. package/lib/module/social/features/visitor/UsageLimit/UsageLimit.js.map +0 -1
  203. package/lib/module/social/features/visitor/UsageLimit/hooks/index.js +0 -2
  204. package/lib/module/social/features/visitor/UsageLimit/hooks/index.js.map +0 -1
  205. package/lib/module/social/features/visitor/UsageLimit/hooks/useUsageLimit.js +0 -47
  206. package/lib/module/social/features/visitor/UsageLimit/hooks/useUsageLimit.js.map +0 -1
  207. package/lib/module/social/features/visitor/UsageLimit/index.js +0 -2
  208. package/lib/module/social/features/visitor/UsageLimit/index.js.map +0 -1
  209. package/lib/module/social/features/visitor/UsageLimit/styles.js +0 -45
  210. package/lib/module/social/features/visitor/UsageLimit/styles.js.map +0 -1
  211. package/lib/module/social/hooks/useGlobalBehavior.js +0 -36
  212. package/lib/module/social/hooks/useGlobalBehavior.js.map +0 -1
  213. package/lib/module/social/hooks/useInteractionBehavior.js +0 -43
  214. package/lib/module/social/hooks/useInteractionBehavior.js.map +0 -1
  215. package/lib/module/social/screens/VisitorUsageLimit/VisitorUsageLimit.js +0 -5
  216. package/lib/module/social/screens/VisitorUsageLimit/VisitorUsageLimit.js.map +0 -1
  217. package/lib/module/social/screens/VisitorUsageLimit/index.js +0 -2
  218. package/lib/module/social/screens/VisitorUsageLimit/index.js.map +0 -1
  219. package/lib/typescript/core/assets/icons/visitorLimit.d.ts +0 -3
  220. package/lib/typescript/core/assets/icons/visitorLimit.d.ts.map +0 -1
  221. package/lib/typescript/social/features/visitor/UsageLimit/UsageLimit.d.ts +0 -2
  222. package/lib/typescript/social/features/visitor/UsageLimit/UsageLimit.d.ts.map +0 -1
  223. package/lib/typescript/social/features/visitor/UsageLimit/hooks/index.d.ts +0 -2
  224. package/lib/typescript/social/features/visitor/UsageLimit/hooks/index.d.ts.map +0 -1
  225. package/lib/typescript/social/features/visitor/UsageLimit/hooks/useUsageLimit.d.ts +0 -40
  226. package/lib/typescript/social/features/visitor/UsageLimit/hooks/useUsageLimit.d.ts.map +0 -1
  227. package/lib/typescript/social/features/visitor/UsageLimit/index.d.ts +0 -2
  228. package/lib/typescript/social/features/visitor/UsageLimit/index.d.ts.map +0 -1
  229. package/lib/typescript/social/features/visitor/UsageLimit/styles.d.ts +0 -40
  230. package/lib/typescript/social/features/visitor/UsageLimit/styles.d.ts.map +0 -1
  231. package/lib/typescript/social/hooks/useGlobalBehavior.d.ts +0 -16
  232. package/lib/typescript/social/hooks/useGlobalBehavior.d.ts.map +0 -1
  233. package/lib/typescript/social/hooks/useInteractionBehavior.d.ts +0 -11
  234. package/lib/typescript/social/hooks/useInteractionBehavior.d.ts.map +0 -1
  235. package/lib/typescript/social/screens/VisitorUsageLimit/VisitorUsageLimit.d.ts +0 -2
  236. package/lib/typescript/social/screens/VisitorUsageLimit/VisitorUsageLimit.d.ts.map +0 -1
  237. package/lib/typescript/social/screens/VisitorUsageLimit/index.d.ts +0 -2
  238. package/lib/typescript/social/screens/VisitorUsageLimit/index.d.ts.map +0 -1
  239. package/src/core/assets/icons/visitorLimit.tsx +0 -19
  240. package/src/social/features/visitor/UsageLimit/UsageLimit.tsx +0 -43
  241. package/src/social/features/visitor/UsageLimit/hooks/index.ts +0 -1
  242. package/src/social/features/visitor/UsageLimit/hooks/useUsageLimit.ts +0 -46
  243. package/src/social/features/visitor/UsageLimit/index.ts +0 -1
  244. package/src/social/features/visitor/UsageLimit/styles.ts +0 -45
  245. package/src/social/hooks/useGlobalBehavior.ts +0 -33
  246. package/src/social/hooks/useInteractionBehavior.ts +0 -47
  247. package/src/social/screens/VisitorUsageLimit/VisitorUsageLimit.tsx +0 -5
  248. package/src/social/screens/VisitorUsageLimit/index.ts +0 -1
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "VisitorUsageLimit", {
7
- enumerable: true,
8
- get: function () {
9
- return _VisitorUsageLimit.VisitorUsageLimit;
10
- }
11
- });
12
- var _VisitorUsageLimit = require("./VisitorUsageLimit");
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_VisitorUsageLimit","require"],"sourceRoot":"../../../../../src","sources":["social/screens/VisitorUsageLimit/index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- export const icon = () => `<svg
2
- width="100%"
3
- height="100%"
4
- viewBox="0 0 60 40"
5
- fill="none"
6
- xmlns="http://www.w3.org/2000/svg"
7
- >
8
- <path
9
- d="M57.5 0C58.8542 0 60 1.14583 60 2.5V37.5C60 38.9583 58.8542 40 57.5 40H5C2.1875 40 0 37.8125 0 35V5.83333C0 4.47917 1.04167 3.33333 2.5 3.33333H6.66667V2.5C6.66667 1.14583 7.70833 0 9.16667 0H57.5ZM3.33333 35C3.33333 35.9375 4.0625 36.6667 5 36.6667C5.83333 36.6667 6.66667 35.9375 6.66667 35V6.66667H3.33333V35ZM56.6667 36.6667V3.33333H10V35V35.1042C10 35.5208 9.79167 36.25 9.6875 36.6667H56.6667Z"
10
- fill="currentColor"
11
- />
12
- <path
13
- d="M36.0494 25.4322C36.0494 26.8211 34.9383 27.9013 33.5803 27.9013C32.1914 27.9013 31.1111 26.8211 31.1111 25.4322C31.1111 24.0742 32.1914 22.9631 33.5803 22.9631C34.9383 22.9631 36.0494 24.0742 36.0494 25.4322ZM31.3889 12.9013C31.358 12.4692 31.6975 12.0989 32.1296 12.0989H35C35.4321 12.0989 35.7716 12.4692 35.7407 12.9013L35.3395 21.2964C35.3086 21.6668 34.9691 21.9754 34.5988 21.9754H32.5309C32.1605 21.9754 31.821 21.6668 31.7901 21.2964L31.3889 12.9013Z"
14
- fill="currentColor"
15
- />
16
- </svg>
17
- `;
18
- export default icon;
19
- //# sourceMappingURL=visitorLimit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icon"],"sourceRoot":"../../../../../src","sources":["core/assets/icons/visitorLimit.tsx"],"mappings":"AAAA,OAAO,MAAMA,IAAI,GAAGA,CAAA,KAAM;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,eAAeA,IAAI","ignoreList":[]}
@@ -1,40 +0,0 @@
1
- import { TouchableOpacity, View } from 'react-native';
2
- import { SafeAreaView } from 'react-native-safe-area-context';
3
- import { SvgXml } from 'react-native-svg';
4
- import { Typography } from '../../../../core/components/Typography/Typography';
5
- import { visitorLimit } from '../../../../core/assets/icons';
6
- import { VISITOR_USAGE_LIMIT_MESSAGE } from '../../../../core/constants';
7
- import { useUsageLimit } from './hooks';
8
- export function UsageLimit() {
9
- const {
10
- styles,
11
- theme,
12
- onPressSignIn
13
- } = useUsageLimit();
14
- return /*#__PURE__*/React.createElement(SafeAreaView, {
15
- style: styles.container,
16
- edges: ['top', 'left']
17
- }, /*#__PURE__*/React.createElement(View, {
18
- style: styles.contentContainer
19
- }, /*#__PURE__*/React.createElement(SvgXml, {
20
- accessible: true,
21
- accessibilityLabel: "Usage limit reached",
22
- width: 60,
23
- height: 40,
24
- style: styles.icon,
25
- xml: visitorLimit(),
26
- color: theme.colors.secondaryShade4
27
- }), /*#__PURE__*/React.createElement(Typography.TitleBold, {
28
- style: styles.title
29
- }, VISITOR_USAGE_LIMIT_MESSAGE.TITLE), /*#__PURE__*/React.createElement(Typography.Caption, {
30
- style: styles.subtitle
31
- }, VISITOR_USAGE_LIMIT_MESSAGE.SUBTITLE), /*#__PURE__*/React.createElement(TouchableOpacity, {
32
- style: styles.signInButton,
33
- onPress: onPressSignIn,
34
- accessibilityRole: "button",
35
- accessibilityLabel: VISITOR_USAGE_LIMIT_MESSAGE.SIGN_IN
36
- }, /*#__PURE__*/React.createElement(Typography.BodyBold, {
37
- style: styles.signInText
38
- }, VISITOR_USAGE_LIMIT_MESSAGE.SIGN_IN))));
39
- }
40
- //# sourceMappingURL=UsageLimit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TouchableOpacity","View","SafeAreaView","SvgXml","Typography","visitorLimit","VISITOR_USAGE_LIMIT_MESSAGE","useUsageLimit","UsageLimit","styles","theme","onPressSignIn","React","createElement","style","container","edges","contentContainer","accessible","accessibilityLabel","width","height","icon","xml","color","colors","secondaryShade4","TitleBold","title","TITLE","Caption","subtitle","SUBTITLE","signInButton","onPress","accessibilityRole","SIGN_IN","BodyBold","signInText"],"sourceRoot":"../../../../../../src","sources":["social/features/visitor/UsageLimit/UsageLimit.tsx"],"mappings":"AAAA,SAASA,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACrD,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,UAAU,QAAQ,mDAAmD;AAC9E,SAASC,YAAY,QAAQ,+BAA+B;AAC5D,SAASC,2BAA2B,QAAQ,4BAA4B;AACxE,SAASC,aAAa,QAAQ,SAAS;AAEvC,OAAO,SAASC,UAAUA,CAAA,EAAG;EAC3B,MAAM;IAAEC,MAAM;IAAEC,KAAK;IAAEC;EAAc,CAAC,GAAGJ,aAAa,CAAC,CAAC;EAExD,oBACEK,KAAA,CAAAC,aAAA,CAACX,YAAY;IAACY,KAAK,EAAEL,MAAM,CAACM,SAAU;IAACC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM;EAAE,gBAC5DJ,KAAA,CAAAC,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAEL,MAAM,CAACQ;EAAiB,gBACnCL,KAAA,CAAAC,aAAA,CAACV,MAAM;IACLe,UAAU;IACVC,kBAAkB,EAAC,qBAAqB;IACxCC,KAAK,EAAE,EAAG;IACVC,MAAM,EAAE,EAAG;IACXP,KAAK,EAAEL,MAAM,CAACa,IAAK;IACnBC,GAAG,EAAElB,YAAY,CAAC,CAAE;IACpBmB,KAAK,EAAEd,KAAK,CAACe,MAAM,CAACC;EAAgB,CACrC,CAAC,eACFd,KAAA,CAAAC,aAAA,CAACT,UAAU,CAACuB,SAAS;IAACb,KAAK,EAAEL,MAAM,CAACmB;EAAM,GACvCtB,2BAA2B,CAACuB,KACT,CAAC,eACvBjB,KAAA,CAAAC,aAAA,CAACT,UAAU,CAAC0B,OAAO;IAAChB,KAAK,EAAEL,MAAM,CAACsB;EAAS,GACxCzB,2BAA2B,CAAC0B,QACX,CAAC,eACrBpB,KAAA,CAAAC,aAAA,CAACb,gBAAgB;IACfc,KAAK,EAAEL,MAAM,CAACwB,YAAa;IAC3BC,OAAO,EAAEvB,aAAc;IACvBwB,iBAAiB,EAAC,QAAQ;IAC1BhB,kBAAkB,EAAEb,2BAA2B,CAAC8B;EAAQ,gBAExDxB,KAAA,CAAAC,aAAA,CAACT,UAAU,CAACiC,QAAQ;IAACvB,KAAK,EAAEL,MAAM,CAAC6B;EAAW,GAC3ChC,2BAA2B,CAAC8B,OACV,CACL,CACd,CACM,CAAC;AAEnB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export { useUsageLimit } from './useUsageLimit';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useUsageLimit"],"sourceRoot":"../../../../../../../src","sources":["social/features/visitor/UsageLimit/hooks/index.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,iBAAiB","ignoreList":[]}
@@ -1,47 +0,0 @@
1
- import { useCallback, useEffect } from 'react';
2
- import { BackHandler } from 'react-native';
3
- import { useStyles } from '../styles';
4
- import { useToast } from '../../../../../core/stores/slices/toastSlice';
5
- import { useBehaviour } from '../../../../providers/BehaviourProvider';
6
- import { VISITOR_USAGE_LIMIT_MESSAGE, VISITOR_TOAST_DURATION } from '../../../../../core/constants';
7
- export const useUsageLimit = () => {
8
- const {
9
- styles,
10
- theme
11
- } = useStyles();
12
- const {
13
- showToast
14
- } = useToast();
15
- const {
16
- AmityGlobalBehaviour
17
- } = useBehaviour();
18
- const showSignInToast = useCallback(() => {
19
- showToast({
20
- message: VISITOR_USAGE_LIMIT_MESSAGE.TOAST,
21
- type: 'informative',
22
- duration: VISITOR_TOAST_DURATION
23
- });
24
- }, []);
25
- useEffect(() => {
26
- showSignInToast();
27
- }, [showSignInToast]);
28
-
29
- // Dead-end page: swallow the Android hardware back press so the user
30
- // cannot navigate away from the error state.
31
- useEffect(() => {
32
- const subscription = BackHandler.addEventListener('hardwareBackPress', () => true);
33
- return () => subscription.remove();
34
- }, []);
35
- const onPressSignIn = useCallback(() => {
36
- if (AmityGlobalBehaviour !== null && AmityGlobalBehaviour !== void 0 && AmityGlobalBehaviour.handleVisitorUsageLimitSignIn) {
37
- return AmityGlobalBehaviour.handleVisitorUsageLimitSignIn();
38
- }
39
- showSignInToast();
40
- }, [AmityGlobalBehaviour, showSignInToast]);
41
- return {
42
- styles,
43
- theme,
44
- onPressSignIn
45
- };
46
- };
47
- //# sourceMappingURL=useUsageLimit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useEffect","BackHandler","useStyles","useToast","useBehaviour","VISITOR_USAGE_LIMIT_MESSAGE","VISITOR_TOAST_DURATION","useUsageLimit","styles","theme","showToast","AmityGlobalBehaviour","showSignInToast","message","TOAST","type","duration","subscription","addEventListener","remove","onPressSignIn","handleVisitorUsageLimitSignIn"],"sourceRoot":"../../../../../../../src","sources":["social/features/visitor/UsageLimit/hooks/useUsageLimit.ts"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC9C,SAASC,WAAW,QAAQ,cAAc;AAC1C,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,QAAQ,QAAQ,8CAA8C;AACvE,SAASC,YAAY,QAAQ,yCAAyC;AACtE,SACEC,2BAA2B,EAC3BC,sBAAsB,QACjB,+BAA+B;AAEtC,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGP,SAAS,CAAC,CAAC;EACrC,MAAM;IAAEQ;EAAU,CAAC,GAAGP,QAAQ,CAAC,CAAC;EAChC,MAAM;IAAEQ;EAAqB,CAAC,GAAGP,YAAY,CAAC,CAAC;EAE/C,MAAMQ,eAAe,GAAGb,WAAW,CAAC,MAAM;IACxCW,SAAS,CAAC;MACRG,OAAO,EAAER,2BAA2B,CAACS,KAAK;MAC1CC,IAAI,EAAE,aAAa;MACnBC,QAAQ,EAAEV;IACZ,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAENN,SAAS,CAAC,MAAM;IACdY,eAAe,CAAC,CAAC;EACnB,CAAC,EAAE,CAACA,eAAe,CAAC,CAAC;;EAErB;EACA;EACAZ,SAAS,CAAC,MAAM;IACd,MAAMiB,YAAY,GAAGhB,WAAW,CAACiB,gBAAgB,CAC/C,mBAAmB,EACnB,MAAM,IACR,CAAC;IACD,OAAO,MAAMD,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMC,aAAa,GAAGrB,WAAW,CAAC,MAAM;IACtC,IAAIY,oBAAoB,aAApBA,oBAAoB,eAApBA,oBAAoB,CAAEU,6BAA6B,EAAE;MACvD,OAAOV,oBAAoB,CAACU,6BAA6B,CAAC,CAAC;IAC7D;IACAT,eAAe,CAAC,CAAC;EACnB,CAAC,EAAE,CAACD,oBAAoB,EAAEC,eAAe,CAAC,CAAC;EAE3C,OAAO;IAAEJ,MAAM;IAAEC,KAAK;IAAEW;EAAc,CAAC;AACzC,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export { UsageLimit } from './UsageLimit';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["UsageLimit"],"sourceRoot":"../../../../../../src","sources":["social/features/visitor/UsageLimit/index.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc","ignoreList":[]}
@@ -1,45 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import { useTheme } from 'react-native-paper';
3
- export const useStyles = () => {
4
- const theme = useTheme();
5
- const styles = StyleSheet.create({
6
- container: {
7
- flex: 1,
8
- backgroundColor: theme.colors.background
9
- },
10
- contentContainer: {
11
- flex: 1,
12
- alignItems: 'center',
13
- paddingHorizontal: 32,
14
- flexDirection: 'column',
15
- justifyContent: 'center'
16
- },
17
- icon: {
18
- marginBottom: 16
19
- },
20
- title: {
21
- maxWidth: 252,
22
- textAlign: 'center',
23
- color: theme.colors.baseShade3
24
- },
25
- subtitle: {
26
- maxWidth: 252,
27
- textAlign: 'center',
28
- color: theme.colors.baseShade3
29
- },
30
- signInButton: {
31
- marginTop: 16,
32
- borderRadius: 8,
33
- paddingVertical: 10,
34
- paddingHorizontal: 16
35
- },
36
- signInText: {
37
- color: theme.colors.primary
38
- }
39
- });
40
- return {
41
- styles,
42
- theme
43
- };
44
- };
45
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StyleSheet","useTheme","useStyles","theme","styles","create","container","flex","backgroundColor","colors","background","contentContainer","alignItems","paddingHorizontal","flexDirection","justifyContent","icon","marginBottom","title","maxWidth","textAlign","color","baseShade3","subtitle","signInButton","marginTop","borderRadius","paddingVertical","signInText","primary"],"sourceRoot":"../../../../../../src","sources":["social/features/visitor/UsageLimit/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAG7C,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAMC,KAAK,GAAGF,QAAQ,CAAa,CAAC;EAEpC,MAAMG,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,IAAI,EAAE,CAAC;MACPC,eAAe,EAAEL,KAAK,CAACM,MAAM,CAACC;IAChC,CAAC;IACDC,gBAAgB,EAAE;MAChBJ,IAAI,EAAE,CAAC;MACPK,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,aAAa,EAAE,QAAQ;MACvBC,cAAc,EAAE;IAClB,CAAC;IACDC,IAAI,EAAE;MACJC,YAAY,EAAE;IAChB,CAAC;IACDC,KAAK,EAAE;MACLC,QAAQ,EAAE,GAAG;MACbC,SAAS,EAAE,QAAQ;MACnBC,KAAK,EAAElB,KAAK,CAACM,MAAM,CAACa;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRJ,QAAQ,EAAE,GAAG;MACbC,SAAS,EAAE,QAAQ;MACnBC,KAAK,EAAElB,KAAK,CAACM,MAAM,CAACa;IACtB,CAAC;IACDE,YAAY,EAAE;MACZC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE,CAAC;MACfC,eAAe,EAAE,EAAE;MACnBd,iBAAiB,EAAE;IACrB,CAAC;IACDe,UAAU,EAAE;MACVP,KAAK,EAAElB,KAAK,CAACM,MAAM,CAACoB;IACtB;EACF,CAAC,CAAC;EAEF,OAAO;IAAEzB,MAAM;IAAED;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
@@ -1,36 +0,0 @@
1
- import { useCallback } from 'react';
2
- import useAuth from '../../core/hooks/useAuth';
3
- import { useBehaviour } from '../providers/BehaviourProvider';
4
- import { useToast } from '../../core/stores/slices/toastSlice';
5
- import { VISITOR_USER_ACTION_TOAST, VISITOR_TOAST_DURATION } from '../../core/constants';
6
- export const useGlobalBehavior = () => {
7
- const {
8
- showToast
9
- } = useToast();
10
- const {
11
- isVisitorOrBot
12
- } = useAuth();
13
- const {
14
- AmityGlobalBehaviour
15
- } = useBehaviour();
16
- const handleGlobalBehavior = useCallback(({
17
- defaultBehavior
18
- }) => {
19
- if (isVisitorOrBot) {
20
- if (AmityGlobalBehaviour !== null && AmityGlobalBehaviour !== void 0 && AmityGlobalBehaviour.handleVisitorUserAction) {
21
- return AmityGlobalBehaviour.handleVisitorUserAction();
22
- }
23
- return showToast({
24
- message: VISITOR_USER_ACTION_TOAST,
25
- type: 'informative',
26
- duration: VISITOR_TOAST_DURATION
27
- });
28
- }
29
- return defaultBehavior === null || defaultBehavior === void 0 ? void 0 : defaultBehavior();
30
- }, [isVisitorOrBot, AmityGlobalBehaviour, showToast]);
31
- return {
32
- handleGlobalBehavior,
33
- isVisitorOrBot
34
- };
35
- };
36
- //# sourceMappingURL=useGlobalBehavior.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useAuth","useBehaviour","useToast","VISITOR_USER_ACTION_TOAST","VISITOR_TOAST_DURATION","useGlobalBehavior","showToast","isVisitorOrBot","AmityGlobalBehaviour","handleGlobalBehavior","defaultBehavior","handleVisitorUserAction","message","type","duration"],"sourceRoot":"../../../../src","sources":["social/hooks/useGlobalBehavior.ts"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,OAAOC,OAAO,MAAM,0BAA0B;AAC9C,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,QAAQ,QAAQ,qCAAqC;AAC9D,SACEC,yBAAyB,EACzBC,sBAAsB,QACjB,sBAAsB;AAE7B,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAM;IAAEC;EAAU,CAAC,GAAGJ,QAAQ,CAAC,CAAC;EAChC,MAAM;IAAEK;EAAe,CAAC,GAAGP,OAAO,CAAC,CAAC;EACpC,MAAM;IAAEQ;EAAqB,CAAC,GAAGP,YAAY,CAAC,CAAC;EAE/C,MAAMQ,oBAAoB,GAAGV,WAAW,CACtC,CAAC;IAAEW;EAAkD,CAAC,KAAK;IACzD,IAAIH,cAAc,EAAE;MAClB,IAAIC,oBAAoB,aAApBA,oBAAoB,eAApBA,oBAAoB,CAAEG,uBAAuB,EAAE;QACjD,OAAOH,oBAAoB,CAACG,uBAAuB,CAAC,CAAC;MACvD;MACA,OAAOL,SAAS,CAAC;QACfM,OAAO,EAAET,yBAAyB;QAClCU,IAAI,EAAE,aAAa;QACnBC,QAAQ,EAAEV;MACZ,CAAC,CAAC;IACJ;IACA,OAAOM,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAG,CAAC;EAC5B,CAAC,EACD,CAACH,cAAc,EAAEC,oBAAoB,EAAEF,SAAS,CAClD,CAAC;EAED,OAAO;IAAEG,oBAAoB;IAAEF;EAAe,CAAC;AACjD,CAAC","ignoreList":[]}
@@ -1,43 +0,0 @@
1
- import { useCallback } from 'react';
2
- import { useBehaviour } from '../providers/BehaviourProvider';
3
- import { useToast } from '../../core/stores/slices/toastSlice';
4
- import { useGlobalBehavior } from './useGlobalBehavior';
5
- import { NON_MEMBER_ACTION_TOAST, VISITOR_TOAST_DURATION } from '../../core/constants';
6
- export const useInteractionBehavior = () => {
7
- const {
8
- showToast
9
- } = useToast();
10
- const {
11
- AmityGlobalBehaviour
12
- } = useBehaviour();
13
- const {
14
- handleGlobalBehavior,
15
- isVisitorOrBot
16
- } = useGlobalBehavior();
17
- const handleInteraction = useCallback(({
18
- defaultBehavior,
19
- allowNonMember,
20
- isJoined
21
- }) => {
22
- handleGlobalBehavior({
23
- defaultBehavior: () => {
24
- if (allowNonMember || isJoined) {
25
- return defaultBehavior === null || defaultBehavior === void 0 ? void 0 : defaultBehavior();
26
- }
27
- if (AmityGlobalBehaviour !== null && AmityGlobalBehaviour !== void 0 && AmityGlobalBehaviour.handleNonMemberAction) {
28
- return AmityGlobalBehaviour.handleNonMemberAction();
29
- }
30
- return showToast({
31
- message: NON_MEMBER_ACTION_TOAST,
32
- type: 'informative',
33
- duration: VISITOR_TOAST_DURATION
34
- });
35
- }
36
- });
37
- }, [handleGlobalBehavior, AmityGlobalBehaviour, showToast]);
38
- return {
39
- handleInteraction,
40
- isVisitorOrBot
41
- };
42
- };
43
- //# sourceMappingURL=useInteractionBehavior.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","useBehaviour","useToast","useGlobalBehavior","NON_MEMBER_ACTION_TOAST","VISITOR_TOAST_DURATION","useInteractionBehavior","showToast","AmityGlobalBehaviour","handleGlobalBehavior","isVisitorOrBot","handleInteraction","defaultBehavior","allowNonMember","isJoined","handleNonMemberAction","message","type","duration"],"sourceRoot":"../../../../src","sources":["social/hooks/useInteractionBehavior.ts"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,QAAQ,QAAQ,qCAAqC;AAC9D,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SACEC,uBAAuB,EACvBC,sBAAsB,QACjB,sBAAsB;AAQ7B,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EAC1C,MAAM;IAAEC;EAAU,CAAC,GAAGL,QAAQ,CAAC,CAAC;EAChC,MAAM;IAAEM;EAAqB,CAAC,GAAGP,YAAY,CAAC,CAAC;EAC/C,MAAM;IAAEQ,oBAAoB;IAAEC;EAAe,CAAC,GAAGP,iBAAiB,CAAC,CAAC;EAEpE,MAAMQ,iBAAiB,GAAGX,WAAW,CACnC,CAAC;IACCY,eAAe;IACfC,cAAc;IACdC;EACuB,CAAC,KAAK;IAC7BL,oBAAoB,CAAC;MACnBG,eAAe,EAAEA,CAAA,KAAM;QACrB,IAAIC,cAAc,IAAIC,QAAQ,EAAE;UAC9B,OAAOF,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAG,CAAC;QAC5B;QACA,IAAIJ,oBAAoB,aAApBA,oBAAoB,eAApBA,oBAAoB,CAAEO,qBAAqB,EAAE;UAC/C,OAAOP,oBAAoB,CAACO,qBAAqB,CAAC,CAAC;QACrD;QACA,OAAOR,SAAS,CAAC;UACfS,OAAO,EAAEZ,uBAAuB;UAChCa,IAAI,EAAE,aAAa;UACnBC,QAAQ,EAAEb;QACZ,CAAC,CAAC;MACJ;IACF,CAAC,CAAC;EACJ,CAAC,EACD,CAACI,oBAAoB,EAAED,oBAAoB,EAAED,SAAS,CACxD,CAAC;EAED,OAAO;IAAEI,iBAAiB;IAAED;EAAe,CAAC;AAC9C,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- import { UsageLimit } from '../../features/visitor/UsageLimit';
2
- export function VisitorUsageLimit() {
3
- return /*#__PURE__*/React.createElement(UsageLimit, null);
4
- }
5
- //# sourceMappingURL=VisitorUsageLimit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["UsageLimit","VisitorUsageLimit","React","createElement"],"sourceRoot":"../../../../../src","sources":["social/screens/VisitorUsageLimit/VisitorUsageLimit.tsx"],"mappings":"AAAA,SAASA,UAAU,QAAQ,mCAAmC;AAE9D,OAAO,SAASC,iBAAiBA,CAAA,EAAG;EAClC,oBAAOC,KAAA,CAAAC,aAAA,CAACH,UAAU,MAAE,CAAC;AACvB","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export { VisitorUsageLimit } from './VisitorUsageLimit';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["VisitorUsageLimit"],"sourceRoot":"../../../../../src","sources":["social/screens/VisitorUsageLimit/index.ts"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export declare const icon: () => string;
2
- export default icon;
3
- //# sourceMappingURL=visitorLimit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visitorLimit.d.ts","sourceRoot":"","sources":["../../../../../src/core/assets/icons/visitorLimit.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,cAgBhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function UsageLimit(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=UsageLimit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UsageLimit.d.ts","sourceRoot":"","sources":["../../../../../../src/social/features/visitor/UsageLimit/UsageLimit.tsx"],"names":[],"mappings":"AAQA,wBAAgB,UAAU,4CAkCzB"}
@@ -1,2 +0,0 @@
1
- export { useUsageLimit } from './useUsageLimit';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/social/features/visitor/UsageLimit/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,40 +0,0 @@
1
- export declare const useUsageLimit: () => {
2
- styles: {
3
- container: {
4
- flex: number;
5
- backgroundColor: string;
6
- };
7
- contentContainer: {
8
- flex: number;
9
- alignItems: "center";
10
- paddingHorizontal: number;
11
- flexDirection: "column";
12
- justifyContent: "center";
13
- };
14
- icon: {
15
- marginBottom: number;
16
- };
17
- title: {
18
- maxWidth: number;
19
- textAlign: "center";
20
- color: string;
21
- };
22
- subtitle: {
23
- maxWidth: number;
24
- textAlign: "center";
25
- color: string;
26
- };
27
- signInButton: {
28
- marginTop: number;
29
- borderRadius: number;
30
- paddingVertical: number;
31
- paddingHorizontal: number;
32
- };
33
- signInText: {
34
- color: string;
35
- };
36
- };
37
- theme: import("../../../../../core/providers/AmityUIKitProvider").MyMD3Theme;
38
- onPressSignIn: () => void;
39
- };
40
- //# sourceMappingURL=useUsageLimit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUsageLimit.d.ts","sourceRoot":"","sources":["../../../../../../../src/social/features/visitor/UsageLimit/hooks/useUsageLimit.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCzB,CAAC"}
@@ -1,2 +0,0 @@
1
- export { UsageLimit } from './UsageLimit';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/social/features/visitor/UsageLimit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,40 +0,0 @@
1
- import type { MyMD3Theme } from '../../../../core/providers/AmityUIKitProvider';
2
- export declare const useStyles: () => {
3
- styles: {
4
- container: {
5
- flex: number;
6
- backgroundColor: string;
7
- };
8
- contentContainer: {
9
- flex: number;
10
- alignItems: "center";
11
- paddingHorizontal: number;
12
- flexDirection: "column";
13
- justifyContent: "center";
14
- };
15
- icon: {
16
- marginBottom: number;
17
- };
18
- title: {
19
- maxWidth: number;
20
- textAlign: "center";
21
- color: string;
22
- };
23
- subtitle: {
24
- maxWidth: number;
25
- textAlign: "center";
26
- color: string;
27
- };
28
- signInButton: {
29
- marginTop: number;
30
- borderRadius: number;
31
- paddingVertical: number;
32
- paddingHorizontal: number;
33
- };
34
- signInText: {
35
- color: string;
36
- };
37
- };
38
- theme: MyMD3Theme;
39
- };
40
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/social/features/visitor/UsageLimit/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAEhF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCrB,CAAC"}
@@ -1,16 +0,0 @@
1
- export declare const useGlobalBehavior: () => {
2
- handleGlobalBehavior: ({ defaultBehavior }: {
3
- defaultBehavior?: () => void;
4
- }) => void | {
5
- payload: {
6
- visible?: boolean;
7
- message: string;
8
- type: "failed" | "success" | "informative" | "loading";
9
- duration?: number;
10
- bottomPosition?: number;
11
- };
12
- type: "toast/showToast";
13
- };
14
- isVisitorOrBot: boolean;
15
- };
16
- //# sourceMappingURL=useGlobalBehavior.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useGlobalBehavior.d.ts","sourceRoot":"","sources":["../../../../src/social/hooks/useGlobalBehavior.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB;gDAMJ;QAAE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE;;;;;;;;;;;CAiBzD,CAAC"}
@@ -1,11 +0,0 @@
1
- type HandleInteractionParams = {
2
- defaultBehavior?: () => void;
3
- allowNonMember?: boolean;
4
- isJoined?: boolean;
5
- };
6
- export declare const useInteractionBehavior: () => {
7
- handleInteraction: ({ defaultBehavior, allowNonMember, isJoined, }: HandleInteractionParams) => void;
8
- isVisitorOrBot: boolean;
9
- };
10
- export {};
11
- //# sourceMappingURL=useInteractionBehavior.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useInteractionBehavior.d.ts","sourceRoot":"","sources":["../../../../src/social/hooks/useInteractionBehavior.ts"],"names":[],"mappings":"AASA,KAAK,uBAAuB,GAAG;IAC7B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,sBAAsB;wEAU5B,uBAAuB;;CAqB7B,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function VisitorUsageLimit(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=VisitorUsageLimit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VisitorUsageLimit.d.ts","sourceRoot":"","sources":["../../../../../src/social/screens/VisitorUsageLimit/VisitorUsageLimit.tsx"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,4CAEhC"}
@@ -1,2 +0,0 @@
1
- export { VisitorUsageLimit } from './VisitorUsageLimit';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/social/screens/VisitorUsageLimit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,19 +0,0 @@
1
- export const icon = () => `<svg
2
- width="100%"
3
- height="100%"
4
- viewBox="0 0 60 40"
5
- fill="none"
6
- xmlns="http://www.w3.org/2000/svg"
7
- >
8
- <path
9
- d="M57.5 0C58.8542 0 60 1.14583 60 2.5V37.5C60 38.9583 58.8542 40 57.5 40H5C2.1875 40 0 37.8125 0 35V5.83333C0 4.47917 1.04167 3.33333 2.5 3.33333H6.66667V2.5C6.66667 1.14583 7.70833 0 9.16667 0H57.5ZM3.33333 35C3.33333 35.9375 4.0625 36.6667 5 36.6667C5.83333 36.6667 6.66667 35.9375 6.66667 35V6.66667H3.33333V35ZM56.6667 36.6667V3.33333H10V35V35.1042C10 35.5208 9.79167 36.25 9.6875 36.6667H56.6667Z"
10
- fill="currentColor"
11
- />
12
- <path
13
- d="M36.0494 25.4322C36.0494 26.8211 34.9383 27.9013 33.5803 27.9013C32.1914 27.9013 31.1111 26.8211 31.1111 25.4322C31.1111 24.0742 32.1914 22.9631 33.5803 22.9631C34.9383 22.9631 36.0494 24.0742 36.0494 25.4322ZM31.3889 12.9013C31.358 12.4692 31.6975 12.0989 32.1296 12.0989H35C35.4321 12.0989 35.7716 12.4692 35.7407 12.9013L35.3395 21.2964C35.3086 21.6668 34.9691 21.9754 34.5988 21.9754H32.5309C32.1605 21.9754 31.821 21.6668 31.7901 21.2964L31.3889 12.9013Z"
14
- fill="currentColor"
15
- />
16
- </svg>
17
- `;
18
-
19
- export default icon;
@@ -1,43 +0,0 @@
1
- import { TouchableOpacity, View } from 'react-native';
2
- import { SafeAreaView } from 'react-native-safe-area-context';
3
- import { SvgXml } from 'react-native-svg';
4
- import { Typography } from '../../../../core/components/Typography/Typography';
5
- import { visitorLimit } from '../../../../core/assets/icons';
6
- import { VISITOR_USAGE_LIMIT_MESSAGE } from '../../../../core/constants';
7
- import { useUsageLimit } from './hooks';
8
-
9
- export function UsageLimit() {
10
- const { styles, theme, onPressSignIn } = useUsageLimit();
11
-
12
- return (
13
- <SafeAreaView style={styles.container} edges={['top', 'left']}>
14
- <View style={styles.contentContainer}>
15
- <SvgXml
16
- accessible
17
- accessibilityLabel="Usage limit reached"
18
- width={60}
19
- height={40}
20
- style={styles.icon}
21
- xml={visitorLimit()}
22
- color={theme.colors.secondaryShade4}
23
- />
24
- <Typography.TitleBold style={styles.title}>
25
- {VISITOR_USAGE_LIMIT_MESSAGE.TITLE}
26
- </Typography.TitleBold>
27
- <Typography.Caption style={styles.subtitle}>
28
- {VISITOR_USAGE_LIMIT_MESSAGE.SUBTITLE}
29
- </Typography.Caption>
30
- <TouchableOpacity
31
- style={styles.signInButton}
32
- onPress={onPressSignIn}
33
- accessibilityRole="button"
34
- accessibilityLabel={VISITOR_USAGE_LIMIT_MESSAGE.SIGN_IN}
35
- >
36
- <Typography.BodyBold style={styles.signInText}>
37
- {VISITOR_USAGE_LIMIT_MESSAGE.SIGN_IN}
38
- </Typography.BodyBold>
39
- </TouchableOpacity>
40
- </View>
41
- </SafeAreaView>
42
- );
43
- }
@@ -1 +0,0 @@
1
- export { useUsageLimit } from './useUsageLimit';
@@ -1,46 +0,0 @@
1
- import { useCallback, useEffect } from 'react';
2
- import { BackHandler } from 'react-native';
3
- import { useStyles } from '../styles';
4
- import { useToast } from '../../../../../core/stores/slices/toastSlice';
5
- import { useBehaviour } from '../../../../providers/BehaviourProvider';
6
- import {
7
- VISITOR_USAGE_LIMIT_MESSAGE,
8
- VISITOR_TOAST_DURATION,
9
- } from '../../../../../core/constants';
10
-
11
- export const useUsageLimit = () => {
12
- const { styles, theme } = useStyles();
13
- const { showToast } = useToast();
14
- const { AmityGlobalBehaviour } = useBehaviour();
15
-
16
- const showSignInToast = useCallback(() => {
17
- showToast({
18
- message: VISITOR_USAGE_LIMIT_MESSAGE.TOAST,
19
- type: 'informative',
20
- duration: VISITOR_TOAST_DURATION,
21
- });
22
- }, []);
23
-
24
- useEffect(() => {
25
- showSignInToast();
26
- }, [showSignInToast]);
27
-
28
- // Dead-end page: swallow the Android hardware back press so the user
29
- // cannot navigate away from the error state.
30
- useEffect(() => {
31
- const subscription = BackHandler.addEventListener(
32
- 'hardwareBackPress',
33
- () => true
34
- );
35
- return () => subscription.remove();
36
- }, []);
37
-
38
- const onPressSignIn = useCallback(() => {
39
- if (AmityGlobalBehaviour?.handleVisitorUsageLimitSignIn) {
40
- return AmityGlobalBehaviour.handleVisitorUsageLimitSignIn();
41
- }
42
- showSignInToast();
43
- }, [AmityGlobalBehaviour, showSignInToast]);
44
-
45
- return { styles, theme, onPressSignIn };
46
- };
@@ -1 +0,0 @@
1
- export { UsageLimit } from './UsageLimit';