@selfcommunity/react-core 0.1.7 → 0.1.8-alpha.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 (395) hide show
  1. package/lib/{types → cjs}/components/provider/SCAlertMessagesProvider/index.d.ts +0 -0
  2. package/lib/{types → cjs}/components/provider/SCAlertMessagesProvider/index.d.ts.map +0 -0
  3. package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +37 -35
  4. package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js.map +1 -0
  5. package/lib/{types → cjs}/components/provider/SCContextProvider/index.d.ts +0 -0
  6. package/lib/{types → cjs}/components/provider/SCContextProvider/index.d.ts.map +0 -0
  7. package/lib/cjs/components/provider/SCContextProvider/index.js +74 -81
  8. package/lib/cjs/components/provider/SCContextProvider/index.js.map +1 -0
  9. package/lib/{types → cjs}/components/provider/SCLocaleProvider/index.d.ts +0 -0
  10. package/lib/{types → cjs}/components/provider/SCLocaleProvider/index.d.ts.map +0 -0
  11. package/lib/cjs/components/provider/SCLocaleProvider/index.js +86 -121
  12. package/lib/cjs/components/provider/SCLocaleProvider/index.js.map +1 -0
  13. package/lib/{types → cjs}/components/provider/SCNotificationProvider/index.d.ts +0 -0
  14. package/lib/{types → cjs}/components/provider/SCNotificationProvider/index.d.ts.map +0 -0
  15. package/lib/cjs/components/provider/SCNotificationProvider/index.js +41 -41
  16. package/lib/cjs/components/provider/SCNotificationProvider/index.js.map +1 -0
  17. package/lib/{types → cjs}/components/provider/SCPreferencesProvider/index.d.ts +0 -0
  18. package/lib/{types → cjs}/components/provider/SCPreferencesProvider/index.d.ts.map +0 -0
  19. package/lib/cjs/components/provider/SCPreferencesProvider/index.js +61 -62
  20. package/lib/cjs/components/provider/SCPreferencesProvider/index.js.map +1 -0
  21. package/lib/{types → cjs}/components/provider/SCRoutingProvider/index.d.ts +0 -0
  22. package/lib/{types → cjs}/components/provider/SCRoutingProvider/index.d.ts.map +1 -1
  23. package/lib/cjs/components/provider/SCRoutingProvider/index.js +104 -111
  24. package/lib/cjs/components/provider/SCRoutingProvider/index.js.map +1 -0
  25. package/lib/{types → cjs}/components/provider/SCThemeProvider/index.d.ts +0 -0
  26. package/lib/{types → cjs}/components/provider/SCThemeProvider/index.d.ts.map +0 -0
  27. package/lib/cjs/components/provider/SCThemeProvider/index.js +66 -79
  28. package/lib/cjs/components/provider/SCThemeProvider/index.js.map +1 -0
  29. package/lib/{types → cjs}/components/provider/SCUserProvider/index.d.ts +0 -0
  30. package/lib/{types → cjs}/components/provider/SCUserProvider/index.d.ts.map +0 -0
  31. package/lib/cjs/components/provider/SCUserProvider/index.js +215 -270
  32. package/lib/cjs/components/provider/SCUserProvider/index.js.map +1 -0
  33. package/lib/{types → cjs}/components/router/index.d.ts +0 -0
  34. package/lib/{types → cjs}/components/router/index.d.ts.map +0 -0
  35. package/lib/cjs/components/router/index.js +48 -49
  36. package/lib/cjs/components/router/index.js.map +1 -0
  37. package/lib/{types → cjs}/constants/Actions.d.ts +0 -0
  38. package/lib/{types → cjs}/constants/Actions.d.ts.map +0 -0
  39. package/lib/cjs/constants/Actions.js +3 -4
  40. package/lib/cjs/constants/Actions.js.map +1 -0
  41. package/lib/{types → cjs}/constants/ContextProviders.d.ts +0 -0
  42. package/lib/{types → cjs}/constants/ContextProviders.d.ts.map +0 -0
  43. package/lib/cjs/constants/ContextProviders.js +22 -24
  44. package/lib/cjs/constants/ContextProviders.js.map +1 -0
  45. package/lib/{types → cjs}/constants/Device.d.ts +0 -0
  46. package/lib/{types → cjs}/constants/Device.d.ts.map +0 -0
  47. package/lib/cjs/constants/Device.js +3 -5
  48. package/lib/cjs/constants/Device.js.map +1 -0
  49. package/lib/{types → cjs}/constants/Errors.d.ts +0 -0
  50. package/lib/{types → cjs}/constants/Errors.d.ts.map +0 -0
  51. package/lib/cjs/constants/Errors.js +3 -5
  52. package/lib/cjs/constants/Errors.js.map +1 -0
  53. package/lib/{types → cjs}/constants/Features.d.ts +0 -0
  54. package/lib/{types → cjs}/constants/Features.d.ts.map +0 -0
  55. package/lib/cjs/constants/Features.js +43 -83
  56. package/lib/cjs/constants/Features.js.map +1 -0
  57. package/lib/{types → cjs}/constants/Locale.d.ts +0 -0
  58. package/lib/{types → cjs}/constants/Locale.d.ts.map +0 -0
  59. package/lib/cjs/constants/Locale.js +10 -17
  60. package/lib/cjs/constants/Locale.js.map +1 -0
  61. package/lib/{types → cjs}/constants/Notification.d.ts +0 -0
  62. package/lib/{types → cjs}/constants/Notification.d.ts.map +0 -0
  63. package/lib/cjs/constants/Notification.js +44 -53
  64. package/lib/cjs/constants/Notification.js.map +1 -0
  65. package/lib/{types → cjs}/constants/Notifications.d.ts +0 -0
  66. package/lib/{types → cjs}/constants/Notifications.d.ts.map +0 -0
  67. package/lib/cjs/constants/Notifications.js +11 -25
  68. package/lib/cjs/constants/Notifications.js.map +1 -0
  69. package/lib/cjs/constants/Preferences.d.ts +201 -0
  70. package/lib/cjs/constants/Preferences.d.ts.map +1 -0
  71. package/lib/cjs/constants/Preferences.js +184 -292
  72. package/lib/cjs/constants/Preferences.js.map +1 -0
  73. package/lib/{types → cjs}/constants/Routes.d.ts +0 -0
  74. package/lib/{types → cjs}/constants/Routes.d.ts.map +0 -0
  75. package/lib/cjs/constants/Routes.js +38 -59
  76. package/lib/cjs/constants/Routes.js.map +1 -0
  77. package/lib/{types → cjs}/constants/Session.d.ts +0 -0
  78. package/lib/{types → cjs}/constants/Session.d.ts.map +0 -0
  79. package/lib/cjs/constants/Session.js +12 -21
  80. package/lib/cjs/constants/Session.js.map +1 -0
  81. package/lib/{types → cjs}/constants/Theme.d.ts +0 -0
  82. package/lib/{types → cjs}/constants/Theme.d.ts.map +0 -0
  83. package/lib/cjs/constants/Theme.js +3 -4
  84. package/lib/cjs/constants/Theme.js.map +1 -0
  85. package/lib/cjs/constants/WebSocket.d.ts +4 -0
  86. package/lib/cjs/constants/WebSocket.d.ts.map +1 -0
  87. package/lib/cjs/constants/WebSocket.js +6 -9
  88. package/lib/cjs/constants/WebSocket.js.map +1 -0
  89. package/lib/{types → cjs}/hooks/useSCAuth.d.ts +0 -0
  90. package/lib/{types → cjs}/hooks/useSCAuth.d.ts.map +0 -0
  91. package/lib/cjs/hooks/useSCAuth.js +212 -282
  92. package/lib/cjs/hooks/useSCAuth.js.map +1 -0
  93. package/lib/{types → cjs}/hooks/useSCCachingManager.d.ts +0 -0
  94. package/lib/{types → cjs}/hooks/useSCCachingManager.d.ts.map +0 -0
  95. package/lib/cjs/hooks/useSCCachingManager.js +37 -51
  96. package/lib/cjs/hooks/useSCCachingManager.js.map +1 -0
  97. package/lib/{types → cjs}/hooks/useSCConnectionsManager.d.ts +0 -0
  98. package/lib/{types → cjs}/hooks/useSCConnectionsManager.d.ts.map +0 -0
  99. package/lib/cjs/hooks/useSCConnectionsManager.js +190 -254
  100. package/lib/cjs/hooks/useSCConnectionsManager.js.map +1 -0
  101. package/lib/{types → cjs}/hooks/useSCFetchAddressingTagList.d.ts +0 -0
  102. package/lib/{types → cjs}/hooks/useSCFetchAddressingTagList.d.ts.map +0 -0
  103. package/lib/cjs/hooks/useSCFetchAddressingTagList.js +64 -55
  104. package/lib/cjs/hooks/useSCFetchAddressingTagList.js.map +1 -0
  105. package/lib/{types → cjs}/hooks/useSCFetchCategories.d.ts +0 -0
  106. package/lib/{types → cjs}/hooks/useSCFetchCategories.d.ts.map +0 -0
  107. package/lib/cjs/hooks/useSCFetchCategories.js +46 -56
  108. package/lib/cjs/hooks/useSCFetchCategories.js.map +1 -0
  109. package/lib/{types → cjs}/hooks/useSCFetchCategory.d.ts +0 -0
  110. package/lib/{types → cjs}/hooks/useSCFetchCategory.d.ts.map +0 -0
  111. package/lib/cjs/hooks/useSCFetchCategory.js +44 -59
  112. package/lib/cjs/hooks/useSCFetchCategory.js.map +1 -0
  113. package/lib/{types → cjs}/hooks/useSCFetchCommentObject.d.ts +0 -0
  114. package/lib/{types → cjs}/hooks/useSCFetchCommentObject.d.ts.map +0 -0
  115. package/lib/cjs/hooks/useSCFetchCommentObject.js +44 -59
  116. package/lib/cjs/hooks/useSCFetchCommentObject.js.map +1 -0
  117. package/lib/{types → cjs}/hooks/useSCFetchCommentObjects.d.ts +0 -0
  118. package/lib/{types → cjs}/hooks/useSCFetchCommentObjects.d.ts.map +0 -0
  119. package/lib/cjs/hooks/useSCFetchCommentObjects.js +157 -254
  120. package/lib/cjs/hooks/useSCFetchCommentObjects.js.map +1 -0
  121. package/lib/{types → cjs}/hooks/useSCFetchCustomAdv.d.ts +0 -0
  122. package/lib/{types → cjs}/hooks/useSCFetchCustomAdv.d.ts.map +0 -0
  123. package/lib/cjs/hooks/useSCFetchCustomAdv.js +57 -75
  124. package/lib/cjs/hooks/useSCFetchCustomAdv.js.map +1 -0
  125. package/lib/{types → cjs}/hooks/useSCFetchFeedObject.d.ts +0 -0
  126. package/lib/{types → cjs}/hooks/useSCFetchFeedObject.d.ts.map +0 -0
  127. package/lib/cjs/hooks/useSCFetchFeedObject.js +49 -69
  128. package/lib/cjs/hooks/useSCFetchFeedObject.js.map +1 -0
  129. package/lib/{types → cjs}/hooks/useSCFetchIncubator.d.ts +0 -0
  130. package/lib/{types → cjs}/hooks/useSCFetchIncubator.d.ts.map +0 -0
  131. package/lib/cjs/hooks/useSCFetchIncubator.js +44 -59
  132. package/lib/cjs/hooks/useSCFetchIncubator.js.map +1 -0
  133. package/lib/{types → cjs}/hooks/useSCFetchTag.d.ts +0 -0
  134. package/lib/{types → cjs}/hooks/useSCFetchTag.d.ts.map +0 -0
  135. package/lib/cjs/hooks/useSCFetchTag.js +44 -59
  136. package/lib/cjs/hooks/useSCFetchTag.js.map +1 -0
  137. package/lib/{types → cjs}/hooks/useSCFetchUser.d.ts +0 -0
  138. package/lib/{types → cjs}/hooks/useSCFetchUser.d.ts.map +1 -1
  139. package/lib/cjs/hooks/useSCFetchUser.js +47 -59
  140. package/lib/cjs/hooks/useSCFetchUser.js.map +1 -0
  141. package/lib/{types → cjs}/hooks/useSCFollowedCategoriesManager.d.ts +0 -0
  142. package/lib/{types → cjs}/hooks/useSCFollowedCategoriesManager.d.ts.map +0 -0
  143. package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +105 -147
  144. package/lib/cjs/hooks/useSCFollowedCategoriesManager.js.map +1 -0
  145. package/lib/{types → cjs}/hooks/useSCFollowersManager.d.ts +0 -0
  146. package/lib/{types → cjs}/hooks/useSCFollowersManager.d.ts.map +0 -0
  147. package/lib/cjs/hooks/useSCFollowersManager.js +154 -204
  148. package/lib/cjs/hooks/useSCFollowersManager.js.map +1 -0
  149. package/lib/{types → cjs}/hooks/useSCMediaClick.d.ts +0 -0
  150. package/lib/{types → cjs}/hooks/useSCMediaClick.d.ts.map +0 -0
  151. package/lib/cjs/hooks/useSCMediaClick.js +18 -25
  152. package/lib/cjs/hooks/useSCMediaClick.js.map +1 -0
  153. package/lib/{types → cjs}/hooks/useSCSubscribedIncubatorsManager.d.ts +0 -0
  154. package/lib/{types → cjs}/hooks/useSCSubscribedIncubatorsManager.d.ts.map +0 -0
  155. package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +118 -148
  156. package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js.map +1 -0
  157. package/lib/{types → cjs}/hooks/useSCWebPushMessaging.d.ts +0 -0
  158. package/lib/{types → cjs}/hooks/useSCWebPushMessaging.d.ts.map +0 -0
  159. package/lib/cjs/hooks/useSCWebPushMessaging.js +268 -268
  160. package/lib/cjs/hooks/useSCWebPushMessaging.js.map +1 -0
  161. package/lib/{types → cjs}/hooks/useSCWebSocket.d.ts +0 -0
  162. package/lib/{types → cjs}/hooks/useSCWebSocket.d.ts.map +0 -0
  163. package/lib/cjs/hooks/useSCWebSocket.js +103 -125
  164. package/lib/cjs/hooks/useSCWebSocket.js.map +1 -0
  165. package/lib/{types → cjs}/index.d.ts +0 -0
  166. package/lib/{types → cjs}/index.d.ts.map +0 -0
  167. package/lib/cjs/index.js +131 -144
  168. package/lib/cjs/index.js.map +1 -0
  169. package/lib/cjs/themes/theme.d.ts +9 -0
  170. package/lib/cjs/themes/theme.d.ts.map +1 -0
  171. package/lib/cjs/themes/theme.js +132 -143
  172. package/lib/cjs/themes/theme.js.map +1 -0
  173. package/lib/{types → cjs}/types/context.d.ts +0 -0
  174. package/lib/{types → cjs}/types/context.d.ts.map +0 -0
  175. package/lib/cjs/types/context.js +2 -2
  176. package/lib/cjs/types/context.js.map +1 -0
  177. package/lib/{types → cjs}/types/index.d.ts +0 -0
  178. package/lib/{types → cjs}/types/index.d.ts.map +0 -0
  179. package/lib/cjs/types/index.js +2 -21
  180. package/lib/cjs/types/index.js.map +1 -0
  181. package/lib/{types → cjs}/utils/errors.d.ts +0 -0
  182. package/lib/{types → cjs}/utils/errors.d.ts.map +0 -0
  183. package/lib/cjs/utils/errors.js +138 -149
  184. package/lib/cjs/utils/errors.js.map +1 -0
  185. package/lib/{types → cjs}/utils/locale.d.ts +0 -0
  186. package/lib/{types → cjs}/utils/locale.d.ts.map +0 -0
  187. package/lib/cjs/utils/locale.js +32 -48
  188. package/lib/cjs/utils/locale.js.map +1 -0
  189. package/lib/{types → cjs}/utils/user.d.ts +0 -0
  190. package/lib/{types → cjs}/utils/user.d.ts.map +0 -0
  191. package/lib/cjs/utils/user.js +25 -40
  192. package/lib/cjs/utils/user.js.map +1 -0
  193. package/lib/{types → cjs}/utils/validator.d.ts +0 -0
  194. package/lib/{types → cjs}/utils/validator.d.ts.map +0 -0
  195. package/lib/cjs/utils/validator.js +386 -576
  196. package/lib/cjs/utils/validator.js.map +1 -0
  197. package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts +37 -0
  198. package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts.map +1 -0
  199. package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +11 -37
  200. package/lib/esm/components/provider/SCAlertMessagesProvider/index.js.map +1 -0
  201. package/lib/esm/components/provider/SCContextProvider/index.d.ts +35 -0
  202. package/lib/esm/components/provider/SCContextProvider/index.d.ts.map +1 -0
  203. package/lib/esm/components/provider/SCContextProvider/index.js +48 -83
  204. package/lib/esm/components/provider/SCContextProvider/index.js.map +1 -0
  205. package/lib/esm/components/provider/SCLocaleProvider/index.d.ts +42 -0
  206. package/lib/esm/components/provider/SCLocaleProvider/index.d.ts.map +1 -0
  207. package/lib/esm/components/provider/SCLocaleProvider/index.js +59 -123
  208. package/lib/esm/components/provider/SCLocaleProvider/index.js.map +1 -0
  209. package/lib/esm/components/provider/SCNotificationProvider/index.d.ts +37 -0
  210. package/lib/esm/components/provider/SCNotificationProvider/index.d.ts.map +1 -0
  211. package/lib/esm/components/provider/SCNotificationProvider/index.js +12 -43
  212. package/lib/esm/components/provider/SCNotificationProvider/index.js.map +1 -0
  213. package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts +38 -0
  214. package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts.map +1 -0
  215. package/lib/esm/components/provider/SCPreferencesProvider/index.js +35 -64
  216. package/lib/esm/components/provider/SCPreferencesProvider/index.js.map +1 -0
  217. package/lib/esm/components/provider/SCRoutingProvider/index.d.ts +39 -0
  218. package/lib/esm/components/provider/SCRoutingProvider/index.d.ts.map +1 -0
  219. package/lib/esm/components/provider/SCRoutingProvider/index.js +78 -113
  220. package/lib/esm/components/provider/SCRoutingProvider/index.js.map +1 -0
  221. package/lib/esm/components/provider/SCThemeProvider/index.d.ts +49 -0
  222. package/lib/esm/components/provider/SCThemeProvider/index.d.ts.map +1 -0
  223. package/lib/esm/components/provider/SCThemeProvider/index.js +36 -81
  224. package/lib/esm/components/provider/SCThemeProvider/index.js.map +1 -0
  225. package/lib/esm/components/provider/SCUserProvider/index.d.ts +38 -0
  226. package/lib/esm/components/provider/SCUserProvider/index.d.ts.map +1 -0
  227. package/lib/esm/components/provider/SCUserProvider/index.js +186 -272
  228. package/lib/esm/components/provider/SCUserProvider/index.js.map +1 -0
  229. package/lib/esm/components/router/index.d.ts +34 -0
  230. package/lib/esm/components/router/index.d.ts.map +1 -0
  231. package/lib/esm/components/router/index.js +24 -50
  232. package/lib/esm/components/router/index.js.map +1 -0
  233. package/lib/esm/constants/Actions.d.ts +2 -0
  234. package/lib/esm/constants/Actions.d.ts.map +1 -0
  235. package/lib/esm/constants/Actions.js +2 -6
  236. package/lib/esm/constants/Actions.js.map +1 -0
  237. package/lib/esm/constants/ContextProviders.d.ts +6 -0
  238. package/lib/esm/constants/ContextProviders.d.ts.map +1 -0
  239. package/lib/esm/constants/ContextProviders.js +18 -26
  240. package/lib/esm/constants/ContextProviders.js.map +1 -0
  241. package/lib/esm/constants/Device.d.ts +6 -0
  242. package/lib/esm/constants/Device.d.ts.map +1 -0
  243. package/lib/esm/constants/Device.js +2 -7
  244. package/lib/esm/constants/Device.js.map +1 -0
  245. package/lib/esm/constants/Errors.d.ts +5 -0
  246. package/lib/esm/constants/Errors.d.ts.map +1 -0
  247. package/lib/esm/constants/Errors.js +2 -7
  248. package/lib/esm/constants/Errors.js.map +1 -0
  249. package/lib/esm/constants/Features.d.ts +41 -0
  250. package/lib/esm/constants/Features.d.ts.map +1 -0
  251. package/lib/esm/constants/Features.js +41 -84
  252. package/lib/esm/constants/Features.js.map +1 -0
  253. package/lib/esm/constants/Locale.d.ts +8 -0
  254. package/lib/esm/constants/Locale.d.ts.map +1 -0
  255. package/lib/esm/constants/Locale.js +8 -18
  256. package/lib/esm/constants/Locale.js.map +1 -0
  257. package/lib/esm/constants/Notification.d.ts +55 -0
  258. package/lib/esm/constants/Notification.d.ts.map +1 -0
  259. package/lib/esm/constants/Notification.js +42 -54
  260. package/lib/esm/constants/Notification.js.map +1 -0
  261. package/lib/esm/constants/Notifications.d.ts +11 -0
  262. package/lib/esm/constants/Notifications.d.ts.map +1 -0
  263. package/lib/esm/constants/Notifications.js +9 -26
  264. package/lib/esm/constants/Notifications.js.map +1 -0
  265. package/lib/esm/constants/Preferences.d.ts +201 -0
  266. package/lib/esm/constants/Preferences.d.ts.map +1 -0
  267. package/lib/esm/constants/Preferences.js +181 -296
  268. package/lib/esm/constants/Preferences.js.map +1 -0
  269. package/lib/esm/constants/Routes.d.ts +29 -0
  270. package/lib/esm/constants/Routes.d.ts.map +1 -0
  271. package/lib/esm/constants/Routes.js +36 -60
  272. package/lib/esm/constants/Routes.js.map +1 -0
  273. package/lib/esm/constants/Session.d.ts +10 -0
  274. package/lib/esm/constants/Session.d.ts.map +1 -0
  275. package/lib/esm/constants/Session.js +10 -22
  276. package/lib/esm/constants/Session.js.map +1 -0
  277. package/lib/esm/constants/Theme.d.ts +2 -0
  278. package/lib/esm/constants/Theme.d.ts.map +1 -0
  279. package/lib/esm/constants/Theme.js +2 -6
  280. package/lib/esm/constants/Theme.js.map +1 -0
  281. package/lib/esm/constants/WebSocket.d.ts +4 -0
  282. package/lib/esm/constants/WebSocket.d.ts.map +1 -0
  283. package/lib/esm/constants/WebSocket.js +4 -10
  284. package/lib/esm/constants/WebSocket.js.map +1 -0
  285. package/lib/esm/hooks/useSCAuth.d.ts +56 -0
  286. package/lib/esm/hooks/useSCAuth.d.ts.map +1 -0
  287. package/lib/esm/hooks/useSCAuth.js +185 -285
  288. package/lib/esm/hooks/useSCAuth.js.map +1 -0
  289. package/lib/esm/hooks/useSCCachingManager.d.ts +19 -0
  290. package/lib/esm/hooks/useSCCachingManager.d.ts.map +1 -0
  291. package/lib/esm/hooks/useSCCachingManager.js +36 -53
  292. package/lib/esm/hooks/useSCCachingManager.js.map +1 -0
  293. package/lib/esm/hooks/useSCConnectionsManager.d.ts +40 -0
  294. package/lib/esm/hooks/useSCConnectionsManager.d.ts.map +1 -0
  295. package/lib/esm/hooks/useSCConnectionsManager.js +186 -256
  296. package/lib/esm/hooks/useSCConnectionsManager.js.map +1 -0
  297. package/lib/esm/hooks/useSCFetchAddressingTagList.d.ts +14 -0
  298. package/lib/esm/hooks/useSCFetchAddressingTagList.d.ts.map +1 -0
  299. package/lib/esm/hooks/useSCFetchAddressingTagList.js +39 -56
  300. package/lib/esm/hooks/useSCFetchAddressingTagList.js.map +1 -0
  301. package/lib/esm/hooks/useSCFetchCategories.d.ts +17 -0
  302. package/lib/esm/hooks/useSCFetchCategories.d.ts.map +1 -0
  303. package/lib/esm/hooks/useSCFetchCategories.js +45 -57
  304. package/lib/esm/hooks/useSCFetchCategories.js.map +1 -0
  305. package/lib/esm/hooks/useSCFetchCategory.d.ts +19 -0
  306. package/lib/esm/hooks/useSCFetchCategory.d.ts.map +1 -0
  307. package/lib/esm/hooks/useSCFetchCategory.js +42 -60
  308. package/lib/esm/hooks/useSCFetchCategory.js.map +1 -0
  309. package/lib/esm/hooks/useSCFetchCommentObject.d.ts +19 -0
  310. package/lib/esm/hooks/useSCFetchCommentObject.d.ts.map +1 -0
  311. package/lib/esm/hooks/useSCFetchCommentObject.js +42 -60
  312. package/lib/esm/hooks/useSCFetchCommentObject.js.map +1 -0
  313. package/lib/esm/hooks/useSCFetchCommentObjects.d.ts +53 -0
  314. package/lib/esm/hooks/useSCFetchCommentObjects.d.ts.map +1 -0
  315. package/lib/esm/hooks/useSCFetchCommentObjects.js +153 -257
  316. package/lib/esm/hooks/useSCFetchCommentObjects.js.map +1 -0
  317. package/lib/esm/hooks/useSCFetchCustomAdv.d.ts +19 -0
  318. package/lib/esm/hooks/useSCFetchCustomAdv.d.ts.map +1 -0
  319. package/lib/esm/hooks/useSCFetchCustomAdv.js +55 -76
  320. package/lib/esm/hooks/useSCFetchCustomAdv.js.map +1 -0
  321. package/lib/esm/hooks/useSCFetchFeedObject.d.ts +21 -0
  322. package/lib/esm/hooks/useSCFetchFeedObject.d.ts.map +1 -0
  323. package/lib/esm/hooks/useSCFetchFeedObject.js +47 -70
  324. package/lib/esm/hooks/useSCFetchFeedObject.js.map +1 -0
  325. package/lib/esm/hooks/useSCFetchIncubator.d.ts +19 -0
  326. package/lib/esm/hooks/useSCFetchIncubator.d.ts.map +1 -0
  327. package/lib/esm/hooks/useSCFetchIncubator.js +42 -60
  328. package/lib/esm/hooks/useSCFetchIncubator.js.map +1 -0
  329. package/lib/esm/hooks/useSCFetchTag.d.ts +19 -0
  330. package/lib/esm/hooks/useSCFetchTag.d.ts.map +1 -0
  331. package/lib/esm/hooks/useSCFetchTag.js +42 -60
  332. package/lib/esm/hooks/useSCFetchTag.js.map +1 -0
  333. package/lib/esm/hooks/useSCFetchUser.d.ts +19 -0
  334. package/lib/esm/hooks/useSCFetchUser.d.ts.map +1 -0
  335. package/lib/esm/hooks/useSCFetchUser.js +45 -60
  336. package/lib/esm/hooks/useSCFetchUser.js.map +1 -0
  337. package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts +37 -0
  338. package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts.map +1 -0
  339. package/lib/esm/hooks/useSCFollowedCategoriesManager.js +101 -149
  340. package/lib/esm/hooks/useSCFollowedCategoriesManager.js.map +1 -0
  341. package/lib/esm/hooks/useSCFollowersManager.d.ts +37 -0
  342. package/lib/esm/hooks/useSCFollowersManager.d.ts.map +1 -0
  343. package/lib/esm/hooks/useSCFollowersManager.js +150 -206
  344. package/lib/esm/hooks/useSCFollowersManager.js.map +1 -0
  345. package/lib/esm/hooks/useSCMediaClick.d.ts +4 -0
  346. package/lib/esm/hooks/useSCMediaClick.d.ts.map +1 -0
  347. package/lib/esm/hooks/useSCMediaClick.js +17 -27
  348. package/lib/esm/hooks/useSCMediaClick.js.map +1 -0
  349. package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts +27 -0
  350. package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts.map +1 -0
  351. package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +114 -150
  352. package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js.map +1 -0
  353. package/lib/esm/hooks/useSCWebPushMessaging.d.ts +9 -0
  354. package/lib/esm/hooks/useSCWebPushMessaging.d.ts.map +1 -0
  355. package/lib/esm/hooks/useSCWebPushMessaging.js +244 -270
  356. package/lib/esm/hooks/useSCWebPushMessaging.js.map +1 -0
  357. package/lib/esm/hooks/useSCWebSocket.d.ts +12 -0
  358. package/lib/esm/hooks/useSCWebSocket.d.ts.map +1 -0
  359. package/lib/esm/hooks/useSCWebSocket.js +99 -127
  360. package/lib/esm/hooks/useSCWebSocket.js.map +1 -0
  361. package/lib/esm/index.d.ts +73 -0
  362. package/lib/esm/index.d.ts.map +1 -0
  363. package/lib/esm/index.js +69 -151
  364. package/lib/esm/index.js.map +1 -0
  365. package/lib/esm/themes/theme.d.ts +9 -0
  366. package/lib/esm/themes/theme.d.ts.map +1 -0
  367. package/lib/esm/themes/theme.js +128 -144
  368. package/lib/esm/themes/theme.js.map +1 -0
  369. package/lib/esm/types/context.d.ts +428 -0
  370. package/lib/esm/types/context.d.ts.map +1 -0
  371. package/lib/esm/types/context.js +2 -3
  372. package/lib/esm/types/context.js.map +1 -0
  373. package/lib/esm/types/index.d.ts +3 -0
  374. package/lib/esm/types/index.d.ts.map +1 -0
  375. package/lib/esm/types/index.js +2 -22
  376. package/lib/esm/types/index.js.map +1 -0
  377. package/lib/esm/utils/errors.d.ts +98 -0
  378. package/lib/esm/utils/errors.d.ts.map +1 -0
  379. package/lib/esm/utils/errors.js +114 -155
  380. package/lib/esm/utils/errors.js.map +1 -0
  381. package/lib/esm/utils/locale.d.ts +10 -0
  382. package/lib/esm/utils/locale.d.ts.map +1 -0
  383. package/lib/esm/utils/locale.js +27 -50
  384. package/lib/esm/utils/locale.js.map +1 -0
  385. package/lib/esm/utils/user.d.ts +41 -0
  386. package/lib/esm/utils/user.d.ts.map +1 -0
  387. package/lib/esm/utils/user.js +23 -46
  388. package/lib/esm/utils/user.js.map +1 -0
  389. package/lib/esm/utils/validator.d.ts +239 -0
  390. package/lib/esm/utils/validator.d.ts.map +1 -0
  391. package/lib/esm/utils/validator.js +352 -588
  392. package/lib/esm/utils/validator.js.map +1 -0
  393. package/lib/umd/react-core.js +1 -1
  394. package/package.json +9 -11
  395. package/lib/types/tsconfig.build.tsbuildinfo +0 -1
@@ -1,42 +1,16 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.SCUserContext = void 0;
5
- exports.default = SCUserProvider;
6
- exports.useSCUser = useSCUser;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _apiServices = require("@selfcommunity/api-services");
11
-
12
- var _SCContextProvider = require("../SCContextProvider");
13
-
14
- var _useSCAuth = _interopRequireWildcard(require("../../../hooks/useSCAuth"));
15
-
16
- var _utils = require("@selfcommunity/utils");
17
-
18
- var _pubsubJs = _interopRequireDefault(require("pubsub-js"));
19
-
20
- var _Errors = require("../../../constants/Errors");
21
-
22
- var _useDeepCompareEffect = _interopRequireDefault(require("use-deep-compare-effect"));
23
-
24
- var _useSCFollowedCategoriesManager = _interopRequireDefault(require("../../../hooks/useSCFollowedCategoriesManager"));
25
-
26
- var _useSCFollowersManager = _interopRequireDefault(require("../../../hooks/useSCFollowersManager"));
27
-
28
- var _useSCConnectionsManager = _interopRequireDefault(require("../../../hooks/useSCConnectionsManager"));
29
-
30
- var _types = require("@selfcommunity/types");
31
-
32
- var _useSCSubscribedIncubatorsManager = _interopRequireDefault(require("../../../hooks/useSCSubscribedIncubatorsManager"));
33
-
34
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
-
36
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
1
+ import React, { createContext, useContext, useEffect, useMemo, useRef } from 'react';
2
+ import { UserService } from '@selfcommunity/api-services';
3
+ import { SCContext } from '../SCContextProvider';
4
+ import useSCAuth, { userActionTypes } from '../../../hooks/useSCAuth';
5
+ import { isClientSideRendering, Logger } from '@selfcommunity/utils';
6
+ import PubSub from 'pubsub-js';
7
+ import { SCOPE_SC_CORE } from '../../../constants/Errors';
8
+ import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect';
9
+ import useSCFollowedCategoriesManager from '../../../hooks/useSCFollowedCategoriesManager';
10
+ import useSCFollowedManager from '../../../hooks/useSCFollowersManager';
11
+ import useSCConnectionsManager from '../../../hooks/useSCConnectionsManager';
12
+ import { SCNotificationTopicType, SCNotificationTypologyType, SCUserStatus } from '@selfcommunity/types';
13
+ import useSCSubscribedIncubatorsManager from '../../../hooks/useSCSubscribedIncubatorsManager';
40
14
  /**
41
15
  * SCUserContext (Authentication Context)
42
16
  *
@@ -54,7 +28,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
54
28
  ````
55
29
  :::
56
30
  */
57
- const SCUserContext = /*#__PURE__*/(0, _react.createContext)({});
31
+ export const SCUserContext = createContext({});
58
32
  /**
59
33
  * #### Description:
60
34
  * This component keeps current user logged and session; it is exported as we need to wrap the entire app with it
@@ -64,247 +38,187 @@ const SCUserContext = /*#__PURE__*/(0, _react.createContext)({});
64
38
  * <SCUserContext.Provider value={contextValue}>{!state.loading && children}</SCUserContext.Provider>
65
39
  * ```
66
40
  */
67
-
68
- exports.SCUserContext = SCUserContext;
69
-
70
- function SCUserProvider({
71
- children
72
- }) {
73
- const scContext = (0, _react.useContext)(_SCContextProvider.SCContext);
74
- /**
75
- * Manage user session
76
- * Refresh token if necessary
77
- */
78
-
79
- const initialSession = scContext.settings.session;
80
- const {
81
- state,
82
- dispatch,
83
- helpers
84
- } = (0, _useSCAuth.default)(initialSession);
85
- /**
86
- * Helper handle change user
87
- */
88
-
89
- function updateUser(info) {
90
- dispatch({
91
- type: _useSCAuth.userActionTypes.UPDATE_USER,
92
- payload: info
93
- });
94
- }
95
- /**
96
- * Managers followed, categories
97
- */
98
-
99
-
100
- const followedManager = (0, _useSCFollowersManager.default)(state.user);
101
- const subscribedIncubatorsManager = (0, _useSCSubscribedIncubatorsManager.default)(state.user);
102
- const connectionsManager = (0, _useSCConnectionsManager.default)(state.user);
103
- const categoriesManager = (0, _useSCFollowedCategoriesManager.default)(state.user, updateUser);
104
- /**
105
- * Ref notifications subscribers: BLOCKED_USER, UNBLOCKED_USER
106
- */
107
-
108
- const notificationUserBlockedSubscription = (0, _react.useRef)(null);
109
- const notificationUserUnBlockedSubscription = (0, _react.useRef)(null);
110
- /**
111
- * Check if there is a currently active session
112
- * when the provider is mounted for the first time.
113
- * If there is an error, it means there is no session.
114
- */
115
-
116
- (0, _useDeepCompareEffect.default)(() => {
117
- if (state.session.authToken && state.session.authToken.accessToken) {
118
- dispatch({
119
- type: _useSCAuth.userActionTypes.LOGIN_LOADING
120
- });
121
-
122
- _apiServices.UserService.getCurrentUser().then(user => {
123
- dispatch({
124
- type: _useSCAuth.userActionTypes.LOGIN_SUCCESS,
125
- payload: {
126
- user
127
- }
128
- });
129
- }).catch(error => {
130
- _utils.Logger.error(_Errors.SCOPE_SC_CORE, 'Unable to retrieve the authenticated user.');
131
-
132
- dispatch({
133
- type: _useSCAuth.userActionTypes.LOGIN_FAILURE,
134
- payload: {
135
- error
136
- }
137
- });
138
- });
41
+ export default function SCUserProvider({ children }) {
42
+ const scContext = useContext(SCContext);
43
+ /**
44
+ * Manage user session
45
+ * Refresh token if necessary
46
+ */
47
+ const initialSession = scContext.settings.session;
48
+ const { state, dispatch, helpers } = useSCAuth(initialSession);
49
+ /**
50
+ * Helper handle change user
51
+ */
52
+ function updateUser(info) {
53
+ dispatch({ type: userActionTypes.UPDATE_USER, payload: info });
139
54
  }
140
- }, [state.session]);
141
- /**
142
- * Controls caching of follow categories, users, etc...
143
- * To avoid multi-tab problems (only for client side), on visibility change
144
- * and document is in foreground refresh the cache
145
- */
146
-
147
- (0, _react.useEffect)(() => {
148
- typeof window !== 'undefined' && document.addEventListener('visibilitychange', handleVisibilityChange);
149
- return () => {
150
- typeof window !== 'undefined' && document.removeEventListener('visibilitychange', handleVisibilityChange);
151
- };
152
- });
153
- /**
154
- * handler handleVisibilityChange for this provider
155
- * Refresh followed categories, users, etc..
156
- */
157
-
158
- function handleVisibilityChange() {
159
- if (typeof window !== 'undefined' && !window.document.hidden && state.user) {
160
- categoriesManager.refresh && categoriesManager.refresh();
161
- followedManager.refresh && followedManager.refresh();
162
- connectionsManager.refresh && connectionsManager.refresh();
163
- subscribedIncubatorsManager.refresh && subscribedIncubatorsManager.refresh();
164
- }
165
- }
166
- /**
167
- * Subscribes to handle notifications of type BLOCKED_USER, UNBLOCKED_USER.
168
- * When receive this type of notifications, the user.status must be update.
169
- */
170
-
171
-
172
- (0, _react.useEffect)(() => {
173
- notificationUserBlockedSubscription.current = _pubsubJs.default.subscribe(`${_types.SCNotificationTopicType.INTERACTION}.${_types.SCNotificationTypologyType.BLOCKED_USER}`, () => {
174
- dispatch({
175
- type: _useSCAuth.userActionTypes.UPDATE_USER,
176
- payload: {
177
- status: _types.SCUserStatus.BLOCKED
55
+ /**
56
+ * Managers followed, categories
57
+ */
58
+ const followedManager = useSCFollowedManager(state.user);
59
+ const subscribedIncubatorsManager = useSCSubscribedIncubatorsManager(state.user);
60
+ const connectionsManager = useSCConnectionsManager(state.user);
61
+ const categoriesManager = useSCFollowedCategoriesManager(state.user, updateUser);
62
+ /**
63
+ * Ref notifications subscribers: BLOCKED_USER, UNBLOCKED_USER
64
+ */
65
+ const notificationUserBlockedSubscription = useRef(null);
66
+ const notificationUserUnBlockedSubscription = useRef(null);
67
+ /**
68
+ * Check if there is a currently active session
69
+ * when the provider is mounted for the first time.
70
+ * If there is an error, it means there is no session.
71
+ */
72
+ useDeepCompareEffectNoCheck(() => {
73
+ if (state.session.authToken && state.session.authToken.accessToken) {
74
+ dispatch({ type: userActionTypes.LOGIN_LOADING });
75
+ UserService.getCurrentUser()
76
+ .then((user) => {
77
+ dispatch({ type: userActionTypes.LOGIN_SUCCESS, payload: { user } });
78
+ })
79
+ .catch((error) => {
80
+ Logger.error(SCOPE_SC_CORE, 'Unable to retrieve the authenticated user.');
81
+ dispatch({ type: userActionTypes.LOGIN_FAILURE, payload: { error } });
82
+ });
178
83
  }
179
- });
84
+ }, [state.session]);
85
+ /**
86
+ * Controls caching of follow categories, users, etc...
87
+ * To avoid multi-tab problems (only for client side), on visibility change
88
+ * and document is in foreground refresh the cache
89
+ */
90
+ useEffect(() => {
91
+ typeof window !== 'undefined' && document.addEventListener('visibilitychange', handleVisibilityChange);
92
+ return () => {
93
+ typeof window !== 'undefined' && document.removeEventListener('visibilitychange', handleVisibilityChange);
94
+ };
180
95
  });
181
- notificationUserUnBlockedSubscription.current = _pubsubJs.default.subscribe(`${_types.SCNotificationTopicType.INTERACTION}.${_types.SCNotificationTypologyType.UNBLOCKED_USER}`, () => {
182
- dispatch({
183
- type: _useSCAuth.userActionTypes.UPDATE_USER,
184
- payload: {
185
- status: _types.SCUserStatus.APPROVED
96
+ /**
97
+ * handler handleVisibilityChange for this provider
98
+ * Refresh followed categories, users, etc..
99
+ */
100
+ function handleVisibilityChange() {
101
+ if (isClientSideRendering() && !window.document.hidden && state.user) {
102
+ categoriesManager.refresh && categoriesManager.refresh();
103
+ followedManager.refresh && followedManager.refresh();
104
+ connectionsManager.refresh && connectionsManager.refresh();
105
+ subscribedIncubatorsManager.refresh && subscribedIncubatorsManager.refresh();
186
106
  }
187
- });
188
- });
189
- return () => {
190
- _pubsubJs.default.unsubscribe(notificationUserBlockedSubscription.current);
191
-
192
- _pubsubJs.default.unsubscribe(notificationUserUnBlockedSubscription.current);
193
- };
194
- }, []);
195
- /**
196
- * Handle change unseen interactions counter
197
- */
198
-
199
- function setUnseenInteractionsCounter(counter) {
200
- dispatch({
201
- type: _useSCAuth.userActionTypes.UPDATE_USER,
202
- payload: {
203
- unseen_interactions_counter: counter
204
- }
205
- });
206
- }
207
- /**
208
- * Handle change unseen notification banners counter
209
- */
210
-
211
-
212
- function setUnseenNotificationBannersCounter(counter) {
213
- dispatch({
214
- type: _useSCAuth.userActionTypes.UPDATE_USER,
215
- payload: {
216
- unseen_notification_banners_counter: counter
217
- }
218
- });
219
- }
220
- /**
221
- * Helper to refresh the session
222
- */
223
-
224
-
225
- function refreshSession() {
226
- return helpers.refreshSession();
227
- }
228
- /**
229
- * Helper to refresh the notification counter
230
- * Use getCurrentUser service since the notification counters
231
- * have been inserted into the serialized user object
232
- */
233
-
234
-
235
- const refreshNotificationCounters = (0, _react.useMemo)(() => () => {
236
- if (state.user) {
237
- return _apiServices.UserService.getCurrentUser().then(user => {
238
- dispatch({
239
- type: _useSCAuth.userActionTypes.UPDATE_USER,
240
- payload: {
241
- unseen_interactions_counter: user.unseen_interactions_counter,
242
- unseen_notification_banners_counter: user.unseen_notification_banners_counter
243
- }
107
+ }
108
+ /**
109
+ * Subscribes to handle notifications of type BLOCKED_USER, UNBLOCKED_USER.
110
+ * When receive this type of notifications, the user.status must be update.
111
+ */
112
+ useEffect(() => {
113
+ notificationUserBlockedSubscription.current = PubSub.subscribe(`${SCNotificationTopicType.INTERACTION}.${SCNotificationTypologyType.BLOCKED_USER}`, () => {
114
+ dispatch({ type: userActionTypes.UPDATE_USER, payload: { status: SCUserStatus.BLOCKED } });
244
115
  });
245
- }).catch(error => {
246
- _utils.Logger.error(_Errors.SCOPE_SC_CORE, `Unable to refresh notification counters. Error: ${error.response.toString()}`);
247
- });
116
+ notificationUserUnBlockedSubscription.current = PubSub.subscribe(`${SCNotificationTopicType.INTERACTION}.${SCNotificationTypologyType.UNBLOCKED_USER}`, () => {
117
+ dispatch({ type: userActionTypes.UPDATE_USER, payload: { status: SCUserStatus.APPROVED } });
118
+ });
119
+ return () => {
120
+ PubSub.unsubscribe(notificationUserBlockedSubscription.current);
121
+ PubSub.unsubscribe(notificationUserUnBlockedSubscription.current);
122
+ };
123
+ }, []);
124
+ /**
125
+ * Handle change unseen interactions counter
126
+ */
127
+ function setUnseenInteractionsCounter(counter) {
128
+ dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_interactions_counter: counter } });
248
129
  }
249
-
250
- return Promise.reject();
251
- }, [state.user]);
252
- /**
253
- * Call the logout endpoint and then remove the user
254
- * from the state.
255
- */
256
-
257
- function logout() {
258
- dispatch({
259
- type: _useSCAuth.userActionTypes.LOGOUT
260
- });
261
- }
262
- /**
263
- * Make the provider update only when it should.
264
- * We only want to force re-renders if the user, session,
265
- * loading or error states change.
266
- *
267
- * Whenever the `value` passed into a provider changes,
268
- * the whole tree under the provider re-renders, and
269
- * that can be very costly! Even in this case, where
270
- * you only get re-renders when logging in and out
271
- * we want to keep things very performant.
272
- */
273
-
274
-
275
- const contextValue = (0, _react.useMemo)(() => ({
276
- user: state.user,
277
- session: state.session,
278
- loading: state.loading,
279
- error: state.error,
280
- updateUser,
281
- setUnseenInteractionsCounter,
282
- setUnseenNotificationBannersCounter,
283
- refreshNotificationCounters,
284
- logout,
285
- refreshSession,
286
- managers: {
287
- categories: categoriesManager,
288
- followed: followedManager,
289
- connections: connectionsManager,
290
- incubators: subscribedIncubatorsManager
130
+ /**
131
+ * Handle change unseen notification banners counter
132
+ */
133
+ function setUnseenNotificationBannersCounter(counter) {
134
+ dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_notification_banners_counter: counter } });
291
135
  }
292
- }), [state, categoriesManager.loading, categoriesManager.categories, followedManager.loading, followedManager.followed, connectionsManager.loading, connectionsManager.connections, subscribedIncubatorsManager.loading, subscribedIncubatorsManager.incubators]);
293
- /**
294
- * We only want to render the underlying app after we
295
- * assert for the presence of a current user.
296
- */
297
-
298
- return /*#__PURE__*/_react.default.createElement(SCUserContext.Provider, {
299
- value: contextValue
300
- }, children);
136
+ /**
137
+ * Helper to refresh the session
138
+ */
139
+ function refreshSession() {
140
+ return helpers.refreshSession();
141
+ }
142
+ /**
143
+ * Helper to refresh the notification counter
144
+ * Use getCurrentUser service since the notification counters
145
+ * have been inserted into the serialized user object
146
+ */
147
+ const refreshNotificationCounters = useMemo(() => () => {
148
+ if (state.user) {
149
+ return UserService.getCurrentUser()
150
+ .then((user) => {
151
+ dispatch({
152
+ type: userActionTypes.UPDATE_USER,
153
+ payload: {
154
+ unseen_interactions_counter: user.unseen_interactions_counter,
155
+ unseen_notification_banners_counter: user.unseen_notification_banners_counter,
156
+ },
157
+ });
158
+ })
159
+ .catch((error) => {
160
+ Logger.error(SCOPE_SC_CORE, `Unable to refresh notification counters. Error: ${error.response.toString()}`);
161
+ });
162
+ }
163
+ return Promise.reject();
164
+ }, [state.user]);
165
+ /**
166
+ * Call the logout endpoint and then remove the user
167
+ * from the state.
168
+ */
169
+ function logout() {
170
+ dispatch({ type: userActionTypes.LOGOUT });
171
+ }
172
+ /**
173
+ * Make the provider update only when it should.
174
+ * We only want to force re-renders if the user, session,
175
+ * loading or error states change.
176
+ *
177
+ * Whenever the `value` passed into a provider changes,
178
+ * the whole tree under the provider re-renders, and
179
+ * that can be very costly! Even in this case, where
180
+ * you only get re-renders when logging in and out
181
+ * we want to keep things very performant.
182
+ */
183
+ const contextValue = useMemo(() => ({
184
+ user: state.user,
185
+ session: state.session,
186
+ loading: state.loading,
187
+ error: state.error,
188
+ updateUser,
189
+ setUnseenInteractionsCounter,
190
+ setUnseenNotificationBannersCounter,
191
+ refreshNotificationCounters,
192
+ logout,
193
+ refreshSession,
194
+ managers: {
195
+ categories: categoriesManager,
196
+ followed: followedManager,
197
+ connections: connectionsManager,
198
+ incubators: subscribedIncubatorsManager,
199
+ },
200
+ }), [
201
+ state,
202
+ categoriesManager.loading,
203
+ categoriesManager.categories,
204
+ followedManager.loading,
205
+ followedManager.followed,
206
+ connectionsManager.loading,
207
+ connectionsManager.connections,
208
+ subscribedIncubatorsManager.loading,
209
+ subscribedIncubatorsManager.incubators,
210
+ ]);
211
+ /**
212
+ * We only want to render the underlying app after we
213
+ * assert for the presence of a current user.
214
+ */
215
+ return React.createElement(SCUserContext.Provider, { value: contextValue }, children);
301
216
  }
302
217
  /**
303
218
  * Let's only export the `useSCUser` hook instead of the context.
304
219
  * We only want to use the hook directly and never the context component.
305
220
  */
306
-
307
-
308
- function useSCUser() {
309
- return (0, _react.useContext)(SCUserContext);
310
- }
221
+ export function useSCUser() {
222
+ return useContext(SCUserContext);
223
+ }
224
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/provider/SCUserProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAC,MAAM,OAAO,CAAC;AACnF,OAAO,EAAC,WAAW,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAC/C,OAAO,SAAS,EAAE,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAC,qBAAqB,EAAE,MAAM,EAAC,MAAM,sBAAsB,CAAC;AACnE,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,2BAA2B,EAAC,MAAM,yBAAyB,CAAC;AACpE,OAAO,8BAA8B,MAAM,+CAA+C,CAAC;AAC3F,OAAO,oBAAoB,MAAM,sCAAsC,CAAC;AACxE,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAU7E,OAAO,EAAa,uBAAuB,EAAE,0BAA0B,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAC;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,EAAE,kBAAkB;YAC/B,UAAU,EAAE,2BAA2B;SACxC;KACF,CAAC,EACF;QACE,KAAK;QACL,iBAAiB,CAAC,OAAO;QACzB,iBAAiB,CAAC,UAAU;QAC5B,eAAe,CAAC,OAAO;QACvB,eAAe,CAAC,QAAQ;QACxB,kBAAkB,CAAC,OAAO;QAC1B,kBAAkB,CAAC,WAAW;QAC9B,2BAA2B,CAAC,OAAO;QACnC,2BAA2B,CAAC,UAAU;KACvC,CACF,CAAC;IAEF;;;OAGG;IACH,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAA0B,CAAC;AAC1F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ declare const _default: React.ForwardRefExoticComponent<Pick<{
3
+ [x: string]: any;
4
+ children: any;
5
+ }, string | number> & React.RefAttributes<unknown>>;
6
+ /**
7
+ :::info
8
+ This component is used to navigate through the application.
9
+ :::
10
+
11
+ ## Usage
12
+
13
+ In order to use router you need to import this components first:
14
+
15
+ ```jsx
16
+ import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
17
+ ````
18
+ :::tipUsage Example:
19
+
20
+ ```jsx
21
+ const scRoutingContext: SCRoutingContextType = useSCRouting();
22
+ <Button component={Link} to={scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, {id: user.id})>Go to profile</Button>
23
+ ````
24
+ **or**
25
+
26
+ ```jsx
27
+ const scRoutingContext: SCRoutingContextType = useSCRouting();
28
+ <Link to={scRoutingContext.url('profile', {id: user.id})}>Go to profile</Link>
29
+ ````
30
+
31
+ :::
32
+ */
33
+ export default _default;
34
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/router/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;;;;;AAmCxC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsC"}
@@ -1,23 +1,16 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.default = void 0;
5
-
6
- var _react = _interopRequireWildcard(require("react"));
7
-
8
- var _SCRoutingProvider = require("../provider/SCRoutingProvider");
9
-
10
- const _excluded = ["children"],
11
- _excluded2 = ["to"];
12
-
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
-
15
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
-
17
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
18
-
19
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
-
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import React, { useContext } from 'react';
13
+ import { SCRoutingContext } from '../provider/SCRoutingProvider';
21
14
  /**
22
15
  *
23
16
  * Import this components:
@@ -31,31 +24,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
31
24
  * `<Link to={scRoutingContext.url('profile', {id: user.id})}>Go to profile</Link>`
32
25
  *
33
26
  */
34
- const Link = (_ref, ref) => {
35
- let {
36
- children
37
- } = _ref,
38
- other = _objectWithoutPropertiesLoose(_ref, _excluded);
39
-
40
- const scRoutingContext = (0, _react.useContext)(_SCRoutingProvider.SCRoutingContext);
41
-
42
- if (scRoutingContext.routerLink) {
43
- const ComponentLink = scRoutingContext.routerLink;
44
- return /*#__PURE__*/_react.default.createElement(ComponentLink, _extends({}, other, {
45
- ref: ref
46
- }), children);
47
- }
48
-
49
- const {
50
- to
51
- } = other,
52
- rest = _objectWithoutPropertiesLoose(other, _excluded2);
53
-
54
- return /*#__PURE__*/_react.default.createElement("a", _extends({
55
- href: to
56
- }, rest, {
57
- ref: ref
58
- }), children);
27
+ const Link = (_a, ref) => {
28
+ var { children } = _a, other = __rest(_a, ["children"]);
29
+ const scRoutingContext = useContext(SCRoutingContext);
30
+ if (scRoutingContext.routerLink) {
31
+ const ComponentLink = scRoutingContext.routerLink;
32
+ return (React.createElement(ComponentLink, Object.assign({}, other, { ref: ref }), children));
33
+ }
34
+ const { to } = other, rest = __rest(other, ["to"]);
35
+ return (React.createElement("a", Object.assign({ href: to }, rest, { ref: ref }), children));
59
36
  };
60
37
  /**
61
38
  :::info
@@ -84,8 +61,5 @@ const scRoutingContext: SCRoutingContextType = useSCRouting();
84
61
 
85
62
  :::
86
63
  */
87
-
88
-
89
- var _default = /*#__PURE__*/_react.default.forwardRef(Link);
90
-
91
- exports.default = _default;
64
+ export default React.forwardRef(Link);
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/router/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAG/D;;;;;;;;;;;;GAYG;AACH,MAAM,IAAI,GAAG,CAAC,EAAoB,EAAE,GAAG,EAAE,EAAE;QAA7B,EAAC,QAAQ,OAAW,EAAN,KAAK,cAAnB,YAAoB,CAAD;IAC/B,MAAM,gBAAgB,GAAyB,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC5E,IAAI,gBAAgB,CAAC,UAAU,EAAE;QAC/B,MAAM,aAAa,GAA8B,gBAAgB,CAAC,UAAU,CAAC;QAC7E,OAAO,CACL,oBAAC,aAAa,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,KAC/B,QAAQ,CACK,CACjB,CAAC;KACH;IACD,MAAM,EAAC,EAAE,KAAa,KAAK,EAAb,IAAI,UAAI,KAAK,EAArB,MAAa,CAAQ,CAAC;IAC5B,OAAO,CACL,yCAAG,IAAI,EAAE,EAAE,IAAM,IAAI,IAAE,GAAG,EAAE,GAAG,KAC5B,QAAQ,CACP,CACL,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAe,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const HANDLE_ANONYMOUS_ACTION_OPTION = "handleAnonymousAction";
2
+ //# sourceMappingURL=Actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/constants/Actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,0BAA0B,CAAC"}
@@ -1,6 +1,2 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.HANDLE_ANONYMOUS_ACTION_OPTION = void 0;
5
- const HANDLE_ANONYMOUS_ACTION_OPTION = 'handleAnonymousAction';
6
- exports.HANDLE_ANONYMOUS_ACTION_OPTION = HANDLE_ANONYMOUS_ACTION_OPTION;
1
+ export const HANDLE_ANONYMOUS_ACTION_OPTION = 'handleAnonymousAction';
2
+ //# sourceMappingURL=Actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Actions.js","sourceRoot":"","sources":["../../../src/constants/Actions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const CONTEXT_PROVIDERS_OPTION = "contextProviders";
2
+ /**
3
+ * List of all nested providers that are required to run
4
+ */
5
+ export declare const DEFAULT_CONTEXT_PROVIDERS: ((children: any) => JSX.Element)[];
6
+ //# sourceMappingURL=ContextProviders.d.ts.map