@selfcommunity/react-core 0.1.7 → 0.1.8-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,22 +1,35 @@
1
1
  "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.SCNotificationContext = void 0;
5
- exports.default = SCNotificationProvider;
6
- exports.useSCNotification = useSCNotification;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _useSCWebSocket = _interopRequireDefault(require("../../../hooks/useSCWebSocket"));
11
-
12
- var _useSCWebPushMessaging = _interopRequireDefault(require("../../../hooks/useSCWebPushMessaging"));
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- 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); }
17
-
18
- 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; }
19
-
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.useSCNotification = exports.SCNotificationContext = void 0;
30
+ const react_1 = __importStar(require("react"));
31
+ const useSCWebSocket_1 = __importDefault(require("../../../hooks/useSCWebSocket"));
32
+ const useSCWebPushMessaging_1 = __importDefault(require("../../../hooks/useSCWebPushMessaging"));
20
33
  /**
21
34
  * Creates Global Context
22
35
  *
@@ -33,7 +46,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
33
46
  ````
34
47
  :::
35
48
  */
36
- const SCNotificationContext = /*#__PURE__*/(0, _react.createContext)({});
49
+ exports.SCNotificationContext = (0, react_1.createContext)({});
37
50
  /**
38
51
  * #### Description:
39
52
  * This component makes the notification context available down the React tree.
@@ -43,31 +56,18 @@ const SCNotificationContext = /*#__PURE__*/(0, _react.createContext)({});
43
56
  * <SCNotificationContext.Provider value={{wsInstance}}>{children}</SCNotificationContext.Provider>
44
57
  * ```
45
58
  */
46
-
47
- exports.SCNotificationContext = SCNotificationContext;
48
-
49
- function SCNotificationProvider({
50
- children = null
51
- }) {
52
- const {
53
- wsInstance
54
- } = (0, _useSCWebSocket.default)();
55
- const {
56
- wpSubscription
57
- } = (0, _useSCWebPushMessaging.default)();
58
- return /*#__PURE__*/_react.default.createElement(SCNotificationContext.Provider, {
59
- value: {
60
- wsInstance,
61
- wpSubscription
62
- }
63
- }, children);
59
+ function SCNotificationProvider({ children = null }) {
60
+ const { wsInstance } = (0, useSCWebSocket_1.default)();
61
+ const { wpSubscription } = (0, useSCWebPushMessaging_1.default)();
62
+ return react_1.default.createElement(exports.SCNotificationContext.Provider, { value: { wsInstance, wpSubscription } }, children);
64
63
  }
64
+ exports.default = SCNotificationProvider;
65
65
  /**
66
66
  * Let's only export the `useSCNotification` hook instead of the context.
67
67
  * We only want to use the hook directly and never the context component.
68
68
  */
69
-
70
-
71
69
  function useSCNotification() {
72
- return (0, _react.useContext)(SCNotificationContext);
73
- }
70
+ return (0, react_1.useContext)(exports.SCNotificationContext);
71
+ }
72
+ exports.useSCNotification = useSCNotification;
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/provider/SCNotificationProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuD;AAEvD,mFAA2D;AAC3D,iGAAyE;AAEzE;;;;;;;;;;;;;;;GAeG;AACU,QAAA,qBAAqB,GAAG,IAAA,qBAAa,EAA4B,EAA+B,CAAC,CAAC;AAE/G;;;;;;;;GAQG;AACH,SAAwB,sBAAsB,CAAC,EAAC,QAAQ,GAAG,IAAI,EAA8B;IAC3F,MAAM,EAAC,UAAU,EAAC,GAAG,IAAA,wBAAc,GAAE,CAAC;IACtC,MAAM,EAAC,cAAc,EAAC,GAAG,IAAA,+BAAqB,GAAE,CAAC;IAEjD,OAAO,8BAAC,6BAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,UAAU,EAAE,cAAc,EAAC,IAAG,QAAQ,CAAkC,CAAC;AAC1H,CAAC;AALD,yCAKC;AAED;;;GAGG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,IAAA,kBAAU,EAAC,6BAAqB,CAAC,CAAC;AAC3C,CAAC;AAFD,8CAEC"}
@@ -1,22 +1,33 @@
1
1
  "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.SCPreferencesContext = void 0;
5
- exports.default = SCPreferencesProvider;
6
- exports.useSCPreferences = useSCPreferences;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _apiServices = require("@selfcommunity/api-services");
11
-
12
- var _utils = require("@selfcommunity/utils");
13
-
14
- var _Errors = require("../../../constants/Errors");
15
-
16
- 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); }
17
-
18
- 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; }
19
-
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.useSCPreferences = exports.SCPreferencesContext = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const api_services_1 = require("@selfcommunity/api-services");
29
+ const utils_1 = require("@selfcommunity/utils");
30
+ const Errors_1 = require("../../../constants/Errors");
20
31
  /**
21
32
  * Creates Preferences/Features Context
22
33
  *
@@ -34,7 +45,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
34
45
  ````
35
46
  :::
36
47
  */
37
- const SCPreferencesContext = /*#__PURE__*/(0, _react.createContext)({});
48
+ exports.SCPreferencesContext = (0, react_1.createContext)({});
38
49
  /**
39
50
  * #### Description:
40
51
  * This component imports all preferences and features enabled.
@@ -44,52 +55,40 @@ const SCPreferencesContext = /*#__PURE__*/(0, _react.createContext)({});
44
55
  * <SCPreferencesContext.Provider value={{preferences, features}}>{!loading && children}</SCPreferencesContext.Provider>
45
56
  * ```
46
57
  */
47
-
48
- exports.SCPreferencesContext = SCPreferencesContext;
49
-
50
- function SCPreferencesProvider({
51
- children = null
52
- }) {
53
- const [preferences, setPreferences] = (0, _react.useState)({});
54
- const [features, setFeatures] = (0, _react.useState)([]);
55
- const [, setError] = (0, _react.useState)();
56
- const [loading, setLoading] = (0, _react.useState)(true);
57
- /**
58
- * Load all dynamic preferences and features enabled
59
- * to manages configurations of the project
60
- */
61
-
62
- (0, _react.useEffect)(() => {
63
- Promise.all([_apiServices.PreferenceService.getAllPreferences(), _apiServices.FeatureService.getAllFeatures()]).then(function ([preferences, features]) {
64
- setPreferences(preferences['results'].reduce((obj, p) => Object.assign({}, obj, {
65
- [`${p.section}.${p.name}`]: p
66
- }), {}));
67
- setFeatures(features['results'].map(f => f.name));
68
- setLoading(false);
69
- }).catch(_error => {
70
- _utils.Logger.error(_Errors.SCOPE_SC_CORE, _error);
71
-
72
- setError(_error);
73
- });
74
- }, []);
75
- /**
76
- * Nesting all necessary providers
77
- * All child components will use help contexts to works
78
- */
79
-
80
- return /*#__PURE__*/_react.default.createElement(SCPreferencesContext.Provider, {
81
- value: {
82
- preferences,
83
- features
84
- }
85
- }, !loading && children);
58
+ function SCPreferencesProvider({ children = null }) {
59
+ const [preferences, setPreferences] = (0, react_1.useState)({});
60
+ const [features, setFeatures] = (0, react_1.useState)([]);
61
+ const [, setError] = (0, react_1.useState)();
62
+ const [loading, setLoading] = (0, react_1.useState)(true);
63
+ /**
64
+ * Load all dynamic preferences and features enabled
65
+ * to manages configurations of the project
66
+ */
67
+ (0, react_1.useEffect)(() => {
68
+ Promise.all([api_services_1.PreferenceService.getAllPreferences(), api_services_1.FeatureService.getAllFeatures()])
69
+ .then(function ([preferences, features]) {
70
+ setPreferences(preferences['results'].reduce((obj, p) => (Object.assign(Object.assign({}, obj), { [`${p.section}.${p.name}`]: p })), {}));
71
+ setFeatures(features['results'].map((f) => f.name));
72
+ setLoading(false);
73
+ })
74
+ .catch((_error) => {
75
+ utils_1.Logger.error(Errors_1.SCOPE_SC_CORE, _error);
76
+ setError(_error);
77
+ });
78
+ }, []);
79
+ /**
80
+ * Nesting all necessary providers
81
+ * All child components will use help contexts to works
82
+ */
83
+ return react_1.default.createElement(exports.SCPreferencesContext.Provider, { value: { preferences, features } }, !loading && children);
86
84
  }
85
+ exports.default = SCPreferencesProvider;
87
86
  /**
88
87
  * Let's only export the `useSCPreferences` hook instead of the context.
89
88
  * We only want to use the hook directly and never the context component.
90
89
  */
91
-
92
-
93
90
  function useSCPreferences() {
94
- return (0, _react.useContext)(SCPreferencesContext);
95
- }
91
+ return (0, react_1.useContext)(exports.SCPreferencesContext);
92
+ }
93
+ exports.useSCPreferences = useSCPreferences;
94
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/provider/SCPreferencesProvider/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4E;AAC5E,8DAA8E;AAE9E,gDAA4C;AAC5C,sDAAwD;AAExD;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,oBAAoB,GAAG,IAAA,qBAAa,EAA2B,EAA8B,CAAC,CAAC;AAE5G;;;;;;;;GAQG;AACH,SAAwB,qBAAqB,CAAC,EAAC,QAAQ,GAAG,IAAI,EAA8B;IAC1F,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAsB,EAAE,CAAC,CAAC;IACxE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAW,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,GAAO,CAAC;IACrC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAU,IAAI,CAAC,CAAC;IAEtD;;;OAGG;IACH,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,CAAC,GAAG,CAAC,CAAC,gCAAiB,CAAC,iBAAiB,EAAE,EAAE,6BAAc,CAAC,cAAc,EAAE,CAAC,CAAC;aAClF,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC;YACrC,cAAc,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iCAAK,GAAG,KAAE,CAAC,GAAG,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,IAAE,EAAE,EAAE,CAAC,CAAC,CAAC;YACzG,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACpD,UAAU,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE;YAChB,cAAM,CAAC,KAAK,CAAC,sBAAa,EAAE,MAAM,CAAC,CAAC;YACpC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP;;;OAGG;IACH,OAAO,8BAAC,4BAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAC,WAAW,EAAE,QAAQ,EAAC,IAAG,CAAC,OAAO,IAAI,QAAQ,CAAiC,CAAC;AAC/H,CAAC;AA5BD,wCA4BC;AAED;;;GAGG;AACH,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,kBAAU,EAAC,4BAAoB,CAAC,CAAC;AAC1C,CAAC;AAFD,4CAEC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/provider/SCRoutingProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAA0C,oBAAoB,EAAoB,MAAM,gBAAgB,CAAC;AAoBhH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,qCAAkE,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAgFrG;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,oBAAoB,CAEnD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/provider/SCRoutingProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAA0C,oBAAoB,EAAoB,MAAM,gBAAgB,CAAC;AAoBhH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,qCAAkE,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAmFrG;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,oBAAoB,CAEnD"}
@@ -1,24 +1,34 @@
1
1
  "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.SCRoutingContext = void 0;
5
- exports.default = SCRoutingProvider;
6
- exports.useSCRouting = useSCRouting;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _SCContextProvider = require("../SCContextProvider");
11
-
12
- var _SCPreferencesProvider = require("../SCPreferencesProvider");
13
-
14
- var SCPreferences = _interopRequireWildcard(require("../../../constants/Preferences"));
15
-
16
- var _Routes = require("../../../constants/Routes");
17
-
18
- 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); }
19
-
20
- 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; }
21
-
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.useSCRouting = exports.SCRoutingContext = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const SCContextProvider_1 = require("../SCContextProvider");
29
+ const SCPreferencesProvider_1 = require("../SCPreferencesProvider");
30
+ const SCPreferences = __importStar(require("../../../constants/Preferences"));
31
+ const Routes_1 = require("../../../constants/Routes");
22
32
  /**
23
33
  * Creates Global Context
24
34
  *
@@ -37,7 +47,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
37
47
 
38
48
  :::
39
49
  */
40
- const SCRoutingContext = /*#__PURE__*/(0, _react.createContext)({});
50
+ exports.SCRoutingContext = (0, react_1.createContext)({});
41
51
  /**
42
52
  * #### Description:
43
53
  * This component provides routing context.
@@ -47,100 +57,83 @@ const SCRoutingContext = /*#__PURE__*/(0, _react.createContext)({});
47
57
  * <SCRoutingContext.Provider value={contextValue}>{children}</SCRoutingContext.Provider>
48
58
  * ```
49
59
  */
50
-
51
- exports.SCRoutingContext = SCRoutingContext;
52
-
53
- function SCRoutingProvider({
54
- children = null
55
- }) {
56
- const scPreferencesContext = (0, _react.useContext)(_SCPreferencesProvider.SCPreferencesContext);
57
- const scContext = (0, _SCContextProvider.useSCContext)();
58
- const router = scContext.settings.router ? scContext.settings.router : {};
59
- const routerLink = router.routerLink ? router.routerLink : null;
60
-
61
- const _routes = Object.assign(getPreferencesRoutes(), _Routes.defaultRoutes);
62
-
63
- const routes = router.routes ? Object.assign({}, _routes, router.routes) : _Routes.defaultRoutes;
64
- /**
65
- * Normalize template url (preferences)
66
- */
67
-
68
- function normalizeUrl(url) {
69
- let tpl = url;
70
- const re = /\{([^/]+)?\}/g;
71
- let match = re.exec(url);
72
-
73
- while (match) {
74
- tpl = tpl.replace(match[0], `:${match[1]}`);
75
- re.lastIndex = 0;
76
- match = re.exec(tpl);
60
+ function SCRoutingProvider({ children = null }) {
61
+ const scPreferencesContext = (0, react_1.useContext)(SCPreferencesProvider_1.SCPreferencesContext);
62
+ const scContext = (0, SCContextProvider_1.useSCContext)();
63
+ const router = scContext.settings.router ? scContext.settings.router : {};
64
+ const routerLink = router.routerLink ? router.routerLink : null;
65
+ const _routes = Object.assign(getPreferencesRoutes(), Routes_1.defaultRoutes);
66
+ const routes = router.routes ? Object.assign(Object.assign({}, _routes), router.routes) : Routes_1.defaultRoutes;
67
+ /**
68
+ * Normalize template url (preferences)
69
+ */
70
+ function normalizeUrl(url) {
71
+ let tpl = url;
72
+ const re = /\{([^/]+)?\}/g;
73
+ let match = re.exec(url);
74
+ while (match) {
75
+ tpl = tpl.replace(match[0], `:${match[1]}`);
76
+ re.lastIndex = 0;
77
+ match = re.exec(tpl);
78
+ }
79
+ return tpl;
77
80
  }
78
-
79
- return tpl;
80
- }
81
- /**
82
- * Get override routes from community preferences
83
- */
84
-
85
-
86
- function getPreferencesRoutes() {
87
- return {
88
- [_Routes.POST_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_POST].value),
89
- [_Routes.DISCUSSION_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_DISCUSSION].value),
90
- [_Routes.STATUS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_STATUS].value),
91
- [_Routes.COMMENT_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_COMMENT].value),
92
- [_Routes.CATEGORY_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_CATEGORY].value),
93
- [_Routes.CATEGORIES_LIST_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_CATEGORIES_LIST].value),
94
- [_Routes.USER_PROFILE_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE].value),
95
- [_Routes.USER_PROFILE_SETTINGS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE_SETTINGS].value),
96
- [_Routes.USER_NOTIFICATIONS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_NOTIFICATIONS].value),
97
- [_Routes.USER_PRIVATE_MESSAGES_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PRIVATE_MESSAGES].value),
98
- [_Routes.INCUBATOR_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_INCUBATOR].value)
99
- };
100
- }
101
- /**
102
- * Generate path
103
- */
104
-
105
-
106
- function url(name = '', params = {}) {
107
- const replacer = (tpl, data) => {
108
- const re = /:([^/|^?|^#]+)?/g;
109
- let _tpl = tpl;
110
- let match = re.exec(tpl);
111
-
112
- while (match) {
113
- _tpl = _tpl.replace(match[0], data[match[1]]);
114
- re.lastIndex = 0;
115
- match = re.exec(_tpl);
116
- }
117
-
118
- if (router.handleRoute) {
119
- // Handle override url
120
- return router.handleRoute(name, _tpl, params, tpl);
121
- }
122
-
123
- return _tpl;
124
- };
125
-
126
- return replacer(routes[name], params);
127
- }
128
-
129
- const contextValue = (0, _react.useMemo)(() => ({
130
- routerLink,
131
- routes,
132
- url
133
- }), [routerLink, routes]);
134
- return /*#__PURE__*/_react.default.createElement(SCRoutingContext.Provider, {
135
- value: contextValue
136
- }, children);
81
+ /**
82
+ * Get override routes from community preferences
83
+ */
84
+ function getPreferencesRoutes() {
85
+ if (Object.keys(scPreferencesContext.preferences).length) {
86
+ return {
87
+ [Routes_1.POST_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_POST].value),
88
+ [Routes_1.DISCUSSION_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_DISCUSSION].value),
89
+ [Routes_1.STATUS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_STATUS].value),
90
+ [Routes_1.COMMENT_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_COMMENT].value),
91
+ [Routes_1.CATEGORY_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_CATEGORY].value),
92
+ [Routes_1.CATEGORIES_LIST_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_CATEGORIES_LIST].value),
93
+ [Routes_1.USER_PROFILE_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE].value),
94
+ [Routes_1.USER_PROFILE_SETTINGS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE_SETTINGS].value),
95
+ [Routes_1.USER_NOTIFICATIONS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_NOTIFICATIONS].value),
96
+ [Routes_1.USER_PRIVATE_MESSAGES_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PRIVATE_MESSAGES].value),
97
+ [Routes_1.INCUBATOR_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_INCUBATOR].value),
98
+ };
99
+ }
100
+ return {};
101
+ }
102
+ /**
103
+ * Generate path
104
+ */
105
+ function url(name = '', params = {}) {
106
+ const replacer = (tpl, data) => {
107
+ const re = /:([^/|^?|^#]+)?/g;
108
+ let _tpl = tpl;
109
+ let match = re.exec(tpl);
110
+ while (match) {
111
+ _tpl = _tpl.replace(match[0], data[match[1]]);
112
+ re.lastIndex = 0;
113
+ match = re.exec(_tpl);
114
+ }
115
+ if (router.handleRoute) {
116
+ // Handle override url
117
+ return router.handleRoute(name, _tpl, params, tpl);
118
+ }
119
+ return _tpl;
120
+ };
121
+ return replacer(routes[name], params);
122
+ }
123
+ const contextValue = (0, react_1.useMemo)(() => ({
124
+ routerLink,
125
+ routes,
126
+ url,
127
+ }), [routerLink, routes]);
128
+ return react_1.default.createElement(exports.SCRoutingContext.Provider, { value: contextValue }, children);
137
129
  }
130
+ exports.default = SCRoutingProvider;
138
131
  /**
139
132
  * Let's only export the `useSCTheme` hook instead of the context.
140
133
  * We only want to use the hook directly and never the context component.
141
134
  */
142
-
143
-
144
135
  function useSCRouting() {
145
- return (0, _react.useContext)(SCRoutingContext);
146
- }
136
+ return (0, react_1.useContext)(exports.SCRoutingContext);
137
+ }
138
+ exports.useSCRouting = useSCRouting;
139
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/provider/SCRoutingProvider/index.tsx"],"names":[],"mappings":"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"}