@selfcommunity/react-core 0.1.2-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 (285) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +13 -0
  3. package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +67 -0
  4. package/lib/cjs/components/provider/SCContextProvider/index.js +117 -0
  5. package/lib/cjs/components/provider/SCLocaleProvider/index.js +158 -0
  6. package/lib/cjs/components/provider/SCNotificationProvider/index.js +73 -0
  7. package/lib/cjs/components/provider/SCPreferencesProvider/index.js +93 -0
  8. package/lib/cjs/components/provider/SCRoutingProvider/index.js +146 -0
  9. package/lib/cjs/components/provider/SCThemeProvider/index.js +123 -0
  10. package/lib/cjs/components/provider/SCUserProvider/index.js +310 -0
  11. package/lib/cjs/components/router/index.js +91 -0
  12. package/lib/cjs/constants/Actions.js +6 -0
  13. package/lib/cjs/constants/ContextProviders.js +29 -0
  14. package/lib/cjs/constants/Device.js +11 -0
  15. package/lib/cjs/constants/Errors.js +10 -0
  16. package/lib/cjs/constants/Features.js +84 -0
  17. package/lib/cjs/constants/Locale.js +19 -0
  18. package/lib/cjs/constants/Notification.js +67 -0
  19. package/lib/cjs/constants/Notifications.js +27 -0
  20. package/lib/cjs/constants/Preferences.js +344 -0
  21. package/lib/cjs/constants/Routes.js +68 -0
  22. package/lib/cjs/constants/Session.js +22 -0
  23. package/lib/cjs/constants/Theme.js +6 -0
  24. package/lib/cjs/constants/WebSocket.js +10 -0
  25. package/lib/cjs/hooks/useSCAuth.js +340 -0
  26. package/lib/cjs/hooks/useSCCachingManager.js +58 -0
  27. package/lib/cjs/hooks/useSCConnectionsManager.js +285 -0
  28. package/lib/cjs/hooks/useSCFetchCategories.js +71 -0
  29. package/lib/cjs/hooks/useSCFetchCategory.js +68 -0
  30. package/lib/cjs/hooks/useSCFetchCommentObject.js +68 -0
  31. package/lib/cjs/hooks/useSCFetchCommentObjects.js +296 -0
  32. package/lib/cjs/hooks/useSCFetchCustomAdv.js +84 -0
  33. package/lib/cjs/hooks/useSCFetchFeedObject.js +79 -0
  34. package/lib/cjs/hooks/useSCFetchIncubator.js +68 -0
  35. package/lib/cjs/hooks/useSCFetchTag.js +68 -0
  36. package/lib/cjs/hooks/useSCFetchUser.js +68 -0
  37. package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +162 -0
  38. package/lib/cjs/hooks/useSCFollowersManager.js +232 -0
  39. package/lib/cjs/hooks/useSCMediaClick.js +27 -0
  40. package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +165 -0
  41. package/lib/cjs/hooks/useSCWebPushMessaging.js +286 -0
  42. package/lib/cjs/hooks/useSCWebSocket.js +120 -0
  43. package/lib/cjs/index.js +169 -0
  44. package/lib/cjs/scss/styles.scss +1 -0
  45. package/lib/cjs/themes/theme.js +165 -0
  46. package/lib/cjs/types/context.js +3 -0
  47. package/lib/cjs/types/index.js +22 -0
  48. package/lib/cjs/utils/errors.js +196 -0
  49. package/lib/cjs/utils/locale.js +56 -0
  50. package/lib/cjs/utils/logger.js +32 -0
  51. package/lib/cjs/utils/object.js +44 -0
  52. package/lib/cjs/utils/session.js +17 -0
  53. package/lib/cjs/utils/string.js +57 -0
  54. package/lib/cjs/utils/url.js +70 -0
  55. package/lib/cjs/utils/user.js +83 -0
  56. package/lib/cjs/utils/validator.js +771 -0
  57. package/lib/cjs/utils/webPushMessaging.js +110 -0
  58. package/lib/cjs/utils/websocket.js +307 -0
  59. package/lib/esm/api-services/src/client/index.d.ts +115 -0
  60. package/lib/esm/api-services/src/client/index.d.ts.map +1 -0
  61. package/lib/esm/api-services/src/constants/Endpoints.d.ts +10 -0
  62. package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -0
  63. package/lib/esm/api-services/src/index.d.ts +24 -0
  64. package/lib/esm/api-services/src/index.d.ts.map +1 -0
  65. package/lib/esm/api-services/src/services/category/index.d.ts +13 -0
  66. package/lib/esm/api-services/src/services/category/index.d.ts.map +1 -0
  67. package/lib/esm/api-services/src/services/feature/index.d.ts +10 -0
  68. package/lib/esm/api-services/src/services/feature/index.d.ts.map +1 -0
  69. package/lib/esm/api-services/src/services/preference/index.d.ts +16 -0
  70. package/lib/esm/api-services/src/services/preference/index.d.ts.map +1 -0
  71. package/lib/esm/api-services/src/services/user/index.d.ts +16 -0
  72. package/lib/esm/api-services/src/services/user/index.d.ts.map +1 -0
  73. package/lib/esm/api-services/src/utils/http.d.ts +6 -0
  74. package/lib/esm/api-services/src/utils/http.d.ts.map +1 -0
  75. package/lib/esm/api-services/src/utils/token.d.ts +16 -0
  76. package/lib/esm/api-services/src/utils/token.d.ts.map +1 -0
  77. package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +67 -0
  78. package/lib/esm/components/provider/SCContextProvider/index.js +117 -0
  79. package/lib/esm/components/provider/SCLocaleProvider/index.js +158 -0
  80. package/lib/esm/components/provider/SCNotificationProvider/index.js +73 -0
  81. package/lib/esm/components/provider/SCPreferencesProvider/index.js +93 -0
  82. package/lib/esm/components/provider/SCRoutingProvider/index.js +146 -0
  83. package/lib/esm/components/provider/SCThemeProvider/index.js +123 -0
  84. package/lib/esm/components/provider/SCUserProvider/index.js +310 -0
  85. package/lib/esm/components/router/index.js +91 -0
  86. package/lib/esm/constants/Actions.js +6 -0
  87. package/lib/esm/constants/ContextProviders.js +29 -0
  88. package/lib/esm/constants/Device.js +11 -0
  89. package/lib/esm/constants/Errors.js +10 -0
  90. package/lib/esm/constants/Features.js +84 -0
  91. package/lib/esm/constants/Locale.js +19 -0
  92. package/lib/esm/constants/Notification.js +67 -0
  93. package/lib/esm/constants/Notifications.js +27 -0
  94. package/lib/esm/constants/Preferences.js +344 -0
  95. package/lib/esm/constants/Routes.js +68 -0
  96. package/lib/esm/constants/Session.js +22 -0
  97. package/lib/esm/constants/Theme.js +6 -0
  98. package/lib/esm/constants/WebSocket.js +10 -0
  99. package/lib/esm/hooks/useSCAuth.js +340 -0
  100. package/lib/esm/hooks/useSCCachingManager.js +58 -0
  101. package/lib/esm/hooks/useSCConnectionsManager.js +285 -0
  102. package/lib/esm/hooks/useSCFetchCategories.js +71 -0
  103. package/lib/esm/hooks/useSCFetchCategory.js +68 -0
  104. package/lib/esm/hooks/useSCFetchCommentObject.js +68 -0
  105. package/lib/esm/hooks/useSCFetchCommentObjects.js +296 -0
  106. package/lib/esm/hooks/useSCFetchCustomAdv.js +84 -0
  107. package/lib/esm/hooks/useSCFetchFeedObject.js +79 -0
  108. package/lib/esm/hooks/useSCFetchIncubator.js +68 -0
  109. package/lib/esm/hooks/useSCFetchTag.js +68 -0
  110. package/lib/esm/hooks/useSCFetchUser.js +68 -0
  111. package/lib/esm/hooks/useSCFollowedCategoriesManager.js +162 -0
  112. package/lib/esm/hooks/useSCFollowersManager.js +232 -0
  113. package/lib/esm/hooks/useSCMediaClick.js +27 -0
  114. package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +165 -0
  115. package/lib/esm/hooks/useSCWebPushMessaging.js +286 -0
  116. package/lib/esm/hooks/useSCWebSocket.js +120 -0
  117. package/lib/esm/index.js +169 -0
  118. package/lib/esm/react-core/src/components/provider/SCAlertMessagesProvider/index.d.ts +37 -0
  119. package/lib/esm/react-core/src/components/provider/SCAlertMessagesProvider/index.d.ts.map +1 -0
  120. package/lib/esm/react-core/src/components/provider/SCContextProvider/index.d.ts +35 -0
  121. package/lib/esm/react-core/src/components/provider/SCContextProvider/index.d.ts.map +1 -0
  122. package/lib/esm/react-core/src/components/provider/SCLocaleProvider/index.d.ts +42 -0
  123. package/lib/esm/react-core/src/components/provider/SCLocaleProvider/index.d.ts.map +1 -0
  124. package/lib/esm/react-core/src/components/provider/SCNotificationProvider/index.d.ts +37 -0
  125. package/lib/esm/react-core/src/components/provider/SCNotificationProvider/index.d.ts.map +1 -0
  126. package/lib/esm/react-core/src/components/provider/SCPreferencesProvider/index.d.ts +38 -0
  127. package/lib/esm/react-core/src/components/provider/SCPreferencesProvider/index.d.ts.map +1 -0
  128. package/lib/esm/react-core/src/components/provider/SCRoutingProvider/index.d.ts +39 -0
  129. package/lib/esm/react-core/src/components/provider/SCRoutingProvider/index.d.ts.map +1 -0
  130. package/lib/esm/react-core/src/components/provider/SCThemeProvider/index.d.ts +49 -0
  131. package/lib/esm/react-core/src/components/provider/SCThemeProvider/index.d.ts.map +1 -0
  132. package/lib/esm/react-core/src/components/provider/SCUserProvider/index.d.ts +38 -0
  133. package/lib/esm/react-core/src/components/provider/SCUserProvider/index.d.ts.map +1 -0
  134. package/lib/esm/react-core/src/components/router/index.d.ts +34 -0
  135. package/lib/esm/react-core/src/components/router/index.d.ts.map +1 -0
  136. package/lib/esm/react-core/src/constants/Actions.d.ts +2 -0
  137. package/lib/esm/react-core/src/constants/Actions.d.ts.map +1 -0
  138. package/lib/esm/react-core/src/constants/ContextProviders.d.ts +6 -0
  139. package/lib/esm/react-core/src/constants/ContextProviders.d.ts.map +1 -0
  140. package/lib/esm/react-core/src/constants/Device.d.ts +6 -0
  141. package/lib/esm/react-core/src/constants/Device.d.ts.map +1 -0
  142. package/lib/esm/react-core/src/constants/Errors.d.ts +5 -0
  143. package/lib/esm/react-core/src/constants/Errors.d.ts.map +1 -0
  144. package/lib/esm/react-core/src/constants/Features.d.ts +41 -0
  145. package/lib/esm/react-core/src/constants/Features.d.ts.map +1 -0
  146. package/lib/esm/react-core/src/constants/Locale.d.ts +8 -0
  147. package/lib/esm/react-core/src/constants/Locale.d.ts.map +1 -0
  148. package/lib/esm/react-core/src/constants/Notification.d.ts +55 -0
  149. package/lib/esm/react-core/src/constants/Notification.d.ts.map +1 -0
  150. package/lib/esm/react-core/src/constants/Notifications.d.ts +11 -0
  151. package/lib/esm/react-core/src/constants/Notifications.d.ts.map +1 -0
  152. package/lib/esm/react-core/src/constants/Routes.d.ts +29 -0
  153. package/lib/esm/react-core/src/constants/Routes.d.ts.map +1 -0
  154. package/lib/esm/react-core/src/constants/Session.d.ts +10 -0
  155. package/lib/esm/react-core/src/constants/Session.d.ts.map +1 -0
  156. package/lib/esm/react-core/src/constants/Theme.d.ts +2 -0
  157. package/lib/esm/react-core/src/constants/Theme.d.ts.map +1 -0
  158. package/lib/esm/react-core/src/hooks/useSCAuth.d.ts +56 -0
  159. package/lib/esm/react-core/src/hooks/useSCAuth.d.ts.map +1 -0
  160. package/lib/esm/react-core/src/hooks/useSCCachingManager.d.ts +19 -0
  161. package/lib/esm/react-core/src/hooks/useSCCachingManager.d.ts.map +1 -0
  162. package/lib/esm/react-core/src/hooks/useSCConnectionsManager.d.ts +40 -0
  163. package/lib/esm/react-core/src/hooks/useSCConnectionsManager.d.ts.map +1 -0
  164. package/lib/esm/react-core/src/hooks/useSCFetchCategories.d.ts +17 -0
  165. package/lib/esm/react-core/src/hooks/useSCFetchCategories.d.ts.map +1 -0
  166. package/lib/esm/react-core/src/hooks/useSCFetchCategory.d.ts +19 -0
  167. package/lib/esm/react-core/src/hooks/useSCFetchCategory.d.ts.map +1 -0
  168. package/lib/esm/react-core/src/hooks/useSCFetchCommentObject.d.ts +19 -0
  169. package/lib/esm/react-core/src/hooks/useSCFetchCommentObject.d.ts.map +1 -0
  170. package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts +54 -0
  171. package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts.map +1 -0
  172. package/lib/esm/react-core/src/hooks/useSCFetchCustomAdv.d.ts +19 -0
  173. package/lib/esm/react-core/src/hooks/useSCFetchCustomAdv.d.ts.map +1 -0
  174. package/lib/esm/react-core/src/hooks/useSCFetchFeedObject.d.ts +21 -0
  175. package/lib/esm/react-core/src/hooks/useSCFetchFeedObject.d.ts.map +1 -0
  176. package/lib/esm/react-core/src/hooks/useSCFetchIncubator.d.ts +19 -0
  177. package/lib/esm/react-core/src/hooks/useSCFetchIncubator.d.ts.map +1 -0
  178. package/lib/esm/react-core/src/hooks/useSCFetchTag.d.ts +19 -0
  179. package/lib/esm/react-core/src/hooks/useSCFetchTag.d.ts.map +1 -0
  180. package/lib/esm/react-core/src/hooks/useSCFetchUser.d.ts +19 -0
  181. package/lib/esm/react-core/src/hooks/useSCFetchUser.d.ts.map +1 -0
  182. package/lib/esm/react-core/src/hooks/useSCFollowedCategoriesManager.d.ts +37 -0
  183. package/lib/esm/react-core/src/hooks/useSCFollowedCategoriesManager.d.ts.map +1 -0
  184. package/lib/esm/react-core/src/hooks/useSCFollowersManager.d.ts +37 -0
  185. package/lib/esm/react-core/src/hooks/useSCFollowersManager.d.ts.map +1 -0
  186. package/lib/esm/react-core/src/hooks/useSCMediaClick.d.ts +4 -0
  187. package/lib/esm/react-core/src/hooks/useSCMediaClick.d.ts.map +1 -0
  188. package/lib/esm/react-core/src/hooks/useSCSubscribedIncubatorsManager.d.ts +27 -0
  189. package/lib/esm/react-core/src/hooks/useSCSubscribedIncubatorsManager.d.ts.map +1 -0
  190. package/lib/esm/react-core/src/hooks/useSCWebPushMessaging.d.ts +9 -0
  191. package/lib/esm/react-core/src/hooks/useSCWebPushMessaging.d.ts.map +1 -0
  192. package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts +12 -0
  193. package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts.map +1 -0
  194. package/lib/esm/react-core/src/index.d.ts +77 -0
  195. package/lib/esm/react-core/src/index.d.ts.map +1 -0
  196. package/lib/esm/react-core/src/types/context.d.ts +428 -0
  197. package/lib/esm/react-core/src/types/context.d.ts.map +1 -0
  198. package/lib/esm/react-core/src/types/index.d.ts +3 -0
  199. package/lib/esm/react-core/src/types/index.d.ts.map +1 -0
  200. package/lib/esm/react-core/src/utils/errors.d.ts +98 -0
  201. package/lib/esm/react-core/src/utils/errors.d.ts.map +1 -0
  202. package/lib/esm/react-core/src/utils/locale.d.ts +10 -0
  203. package/lib/esm/react-core/src/utils/locale.d.ts.map +1 -0
  204. package/lib/esm/react-core/src/utils/logger.d.ts +11 -0
  205. package/lib/esm/react-core/src/utils/logger.d.ts.map +1 -0
  206. package/lib/esm/react-core/src/utils/object.d.ts +13 -0
  207. package/lib/esm/react-core/src/utils/object.d.ts.map +1 -0
  208. package/lib/esm/react-core/src/utils/session.d.ts +6 -0
  209. package/lib/esm/react-core/src/utils/session.d.ts.map +1 -0
  210. package/lib/esm/react-core/src/utils/string.d.ts +21 -0
  211. package/lib/esm/react-core/src/utils/string.d.ts.map +1 -0
  212. package/lib/esm/react-core/src/utils/url.d.ts +22 -0
  213. package/lib/esm/react-core/src/utils/url.d.ts.map +1 -0
  214. package/lib/esm/react-core/src/utils/user.d.ts +41 -0
  215. package/lib/esm/react-core/src/utils/user.d.ts.map +1 -0
  216. package/lib/esm/react-core/src/utils/validator.d.ts +239 -0
  217. package/lib/esm/react-core/src/utils/validator.d.ts.map +1 -0
  218. package/lib/esm/react-core/src/utils/webPushMessaging.d.ts +14 -0
  219. package/lib/esm/react-core/src/utils/webPushMessaging.d.ts.map +1 -0
  220. package/lib/esm/react-core/src/utils/websocket.d.ts +177 -0
  221. package/lib/esm/react-core/src/utils/websocket.d.ts.map +1 -0
  222. package/lib/esm/react-i18n/src/index.d.ts +815 -0
  223. package/lib/esm/react-i18n/src/index.d.ts.map +1 -0
  224. package/lib/esm/scss/styles.scss +1 -0
  225. package/lib/esm/themes/theme.js +165 -0
  226. package/lib/esm/types/context.js +3 -0
  227. package/lib/esm/types/index.js +22 -0
  228. package/lib/esm/types/src/index.d.ts +9 -0
  229. package/lib/esm/types/src/index.d.ts.map +1 -0
  230. package/lib/esm/types/src/types/auth.d.ts +26 -0
  231. package/lib/esm/types/src/types/auth.d.ts.map +1 -0
  232. package/lib/esm/types/src/types/broadcastMessage.d.ts +73 -0
  233. package/lib/esm/types/src/types/broadcastMessage.d.ts.map +1 -0
  234. package/lib/esm/types/src/types/category.d.ts +100 -0
  235. package/lib/esm/types/src/types/category.d.ts.map +1 -0
  236. package/lib/esm/types/src/types/comment.d.ts +97 -0
  237. package/lib/esm/types/src/types/comment.d.ts.map +1 -0
  238. package/lib/esm/types/src/types/customAdv.d.ts +53 -0
  239. package/lib/esm/types/src/types/customAdv.d.ts.map +1 -0
  240. package/lib/esm/types/src/types/customNotification.d.ts +28 -0
  241. package/lib/esm/types/src/types/customNotification.d.ts.map +1 -0
  242. package/lib/esm/types/src/types/embed.d.ts +33 -0
  243. package/lib/esm/types/src/types/embed.d.ts.map +1 -0
  244. package/lib/esm/types/src/types/feed.d.ts +208 -0
  245. package/lib/esm/types/src/types/feed.d.ts.map +1 -0
  246. package/lib/esm/types/src/types/incubator.d.ts +53 -0
  247. package/lib/esm/types/src/types/incubator.d.ts.map +1 -0
  248. package/lib/esm/types/src/types/index.d.ts +22 -0
  249. package/lib/esm/types/src/types/index.d.ts.map +1 -0
  250. package/lib/esm/types/src/types/location.d.ts +61 -0
  251. package/lib/esm/types/src/types/location.d.ts.map +1 -0
  252. package/lib/esm/types/src/types/media.d.ts +52 -0
  253. package/lib/esm/types/src/types/media.d.ts.map +1 -0
  254. package/lib/esm/types/src/types/notification.d.ts +416 -0
  255. package/lib/esm/types/src/types/notification.d.ts.map +1 -0
  256. package/lib/esm/types/src/types/poll.d.ts +77 -0
  257. package/lib/esm/types/src/types/poll.d.ts.map +1 -0
  258. package/lib/esm/types/src/types/privateMessage.d.ts +109 -0
  259. package/lib/esm/types/src/types/privateMessage.d.ts.map +1 -0
  260. package/lib/esm/types/src/types/prize.d.ts +48 -0
  261. package/lib/esm/types/src/types/prize.d.ts.map +1 -0
  262. package/lib/esm/types/src/types/tag.d.ts +47 -0
  263. package/lib/esm/types/src/types/tag.d.ts.map +1 -0
  264. package/lib/esm/types/src/types/user.d.ts +227 -0
  265. package/lib/esm/types/src/types/user.d.ts.map +1 -0
  266. package/lib/esm/utils/errors.js +196 -0
  267. package/lib/esm/utils/locale.js +56 -0
  268. package/lib/esm/utils/logger.js +32 -0
  269. package/lib/esm/utils/object.js +44 -0
  270. package/lib/esm/utils/session.js +17 -0
  271. package/lib/esm/utils/src/index.d.ts +7 -0
  272. package/lib/esm/utils/src/index.d.ts.map +1 -0
  273. package/lib/esm/utils/src/utils/string.d.ts +21 -0
  274. package/lib/esm/utils/src/utils/string.d.ts.map +1 -0
  275. package/lib/esm/utils/src/utils/url.d.ts +22 -0
  276. package/lib/esm/utils/src/utils/url.d.ts.map +1 -0
  277. package/lib/esm/utils/string.js +57 -0
  278. package/lib/esm/utils/url.js +70 -0
  279. package/lib/esm/utils/user.js +83 -0
  280. package/lib/esm/utils/validator.js +771 -0
  281. package/lib/esm/utils/webPushMessaging.js +110 -0
  282. package/lib/esm/utils/websocket.js +307 -0
  283. package/lib/umd/react-core.js +2 -0
  284. package/lib/umd/react-core.js.LICENSE.txt +1 -0
  285. package/package.json +128 -0
@@ -0,0 +1,27 @@
1
+ import { SCIncubatorType, SCUserType } from '@selfcommunity/types';
2
+ /**
3
+ :::info
4
+ This custom hook is used to manage to manage subscribed incubators.
5
+ :::
6
+ :::tipHow to use it:
7
+
8
+ Follow these steps:
9
+ ```jsx
10
+ 1. const scUserContext: SCUserContextType = useSCUser();
11
+ 2. const scSubscribedIncubatorsManager: SCSubscribedIncubatorsManagerType = scUserContext.managers.incubators;
12
+ 3. scSubscribedIncubatorsManager.isSubscribed(incubator)
13
+ ```
14
+ :::
15
+ */
16
+ export default function useSCSubscribedIncubatorsManager(user?: SCUserType): {
17
+ incubators: any[];
18
+ loading: number[];
19
+ isLoading: (obj: {
20
+ id: number;
21
+ }) => boolean;
22
+ subscribe: (incubator: SCIncubatorType) => Promise<any>;
23
+ isSubscribed: (incubator: SCIncubatorType) => boolean;
24
+ refresh: () => void;
25
+ emptyCache: () => void;
26
+ };
27
+ //# sourceMappingURL=useSCSubscribedIncubatorsManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSCSubscribedIncubatorsManager.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useSCSubscribedIncubatorsManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAKjE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,gCAAgC,CAAC,IAAI,CAAC,EAAE,UAAU;;;;;;2BA8CxD,eAAe,KAAG,QAAQ,GAAG,CAAC;8BAiE9B,eAAe,KAAG,OAAO;mBArG7B,IAAI;;EAqHjB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ :::info
3
+ This custom hook is used to to init web push messaging.
4
+ :::
5
+ */
6
+ export default function useSCWebPushMessaging(): {
7
+ wpSubscription: any;
8
+ };
9
+ //# sourceMappingURL=useSCWebPushMessaging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSCWebPushMessaging.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useSCWebPushMessaging.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB;;EA4P5C"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { WSClientType } from '../utils/websocket';
3
+ /**
4
+ :::info
5
+ This custom hook is used to to init web socket.
6
+ :::
7
+ */
8
+ export default function useSCWebSocket(): {
9
+ wsInstance: WSClientType;
10
+ setWsInstance: import("react").Dispatch<import("react").SetStateAction<WSClientType>>;
11
+ };
12
+ //# sourceMappingURL=useSCWebSocket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSCWebSocket.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useSCWebSocket.ts"],"names":[],"mappings":";AAKA,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAMhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc;;;EAuFrC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Types
3
+ */
4
+ import { SCUserContextType, SCFollowedCategoriesManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCFollowedManagerType, SCConnectionsManagerType, SCSubscribedIncubatorsManagerType, SCLocaleType, SCNotificationContextType, SCPreferencesContextType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType } from './types';
5
+ /**
6
+ * ContextProvider component
7
+ */
8
+ import SCContextProvider, { SCContext, useSCContext } from './components/provider/SCContextProvider';
9
+ /**
10
+ * AuthProvider component
11
+ */
12
+ import SCUserProvider, { SCUserContext, useSCUser } from './components/provider/SCUserProvider';
13
+ /**
14
+ * ThemeProvider component
15
+ */
16
+ import SCThemeProvider, { SCThemeContext, useSCTheme, withSCTheme } from './components/provider/SCThemeProvider';
17
+ /**
18
+ * RoutingProvider component
19
+ */
20
+ import SCRoutingProvider, { SCRoutingContext, useSCRouting } from './components/provider/SCRoutingProvider';
21
+ /**
22
+ * LocaleProvider component
23
+ */
24
+ import SCLocaleProvider, { SCLocaleContext, useSCLocale, withSCLocale } from './components/provider/SCLocaleProvider';
25
+ /**
26
+ * NotificationProvider component
27
+ */
28
+ import SCNotificationProvider, { SCNotificationContext, useSCNotification } from './components/provider/SCNotificationProvider';
29
+ /**
30
+ * AlertMessagesProvider component
31
+ */
32
+ import SCAlertMessagesProvider, { SCAlertMessagesContext, useSCAlertMessages } from './components/provider/SCAlertMessagesProvider';
33
+ /**
34
+ * PreferencesProvider component
35
+ */
36
+ import SCPreferencesProvider, { SCPreferencesContext, useSCPreferences } from './components/provider/SCPreferencesProvider';
37
+ import * as SCPreferences from './constants/Preferences';
38
+ import * as SCFeatures from './constants/Features';
39
+ import * as SCNotification from './constants/Notification';
40
+ /**
41
+ * Custom Hooks
42
+ */
43
+ import useSCFetchUser from './hooks/useSCFetchUser';
44
+ import useSCFetchFeedObject from './hooks/useSCFetchFeedObject';
45
+ import useSCFetchCommentObject from './hooks/useSCFetchCommentObject';
46
+ import useSCFetchCommentObjects from './hooks/useSCFetchCommentObjects';
47
+ import useSCFetchCustomAdv from './hooks/useSCFetchCustomAdv';
48
+ import useSCFetchTag from './hooks/useSCFetchTag';
49
+ import useSCFetchCategory from './hooks/useSCFetchCategory';
50
+ import useSCFetchCategories from './hooks/useSCFetchCategories';
51
+ import useSCFetchIncubator from './hooks/useSCFetchIncubator';
52
+ import useSCMediaClick from './hooks/useSCMediaClick';
53
+ /**
54
+ * Routing component
55
+ */
56
+ import Link from './components/router';
57
+ import * as SCRoutes from './constants/Routes';
58
+ /**
59
+ * Utilities:
60
+ * logger, string, url, object
61
+ */
62
+ import { Logger } from './utils/logger';
63
+ import * as StringUtils from './utils/string';
64
+ import * as ObjectUtils from './utils/object';
65
+ import * as UrlUtils from './utils/url';
66
+ import * as UserUtils from './utils/user';
67
+ import WSClient, { WSClientType, WSClientPropTypes } from './utils/websocket';
68
+ /**
69
+ * Constants:
70
+ * Locale
71
+ */
72
+ import * as Locale from './constants/Locale';
73
+ /**
74
+ * List all exports
75
+ */
76
+ export { SCUserContextType, SCFollowedCategoriesManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCFollowedManagerType, SCConnectionsManagerType, SCSubscribedIncubatorsManagerType, SCLocaleType, SCNotificationContextType, SCPreferencesContextType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType, SCContext, SCUserContext, SCThemeContext, SCRoutingContext, SCLocaleContext, SCPreferencesContext, useSCContext, SCContextProvider, SCUserProvider, useSCUser, useSCPreferences, SCThemeProvider, useSCTheme, withSCTheme, SCRoutingProvider, useSCRouting, SCLocaleProvider, useSCLocale, withSCLocale, SCPreferencesProvider, SCPreferences, SCFeatures, SCNotification, SCNotificationProvider, SCNotificationContext, useSCNotification, SCAlertMessagesProvider, SCAlertMessagesContext, useSCAlertMessages, Link, SCRoutes, Logger, StringUtils, ObjectUtils, WSClient, WSClientType, WSClientPropTypes, UrlUtils, UserUtils, Locale, useSCFetchUser, useSCFetchFeedObject, useSCFetchCommentObject, useSCFetchCommentObjects, useSCFetchCustomAdv, useSCFetchTag, useSCFetchCategory, useSCFetchCategories, useSCFetchIncubator, useSCMediaClick, };
77
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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,eAAe,EACf,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,CAAC"}
@@ -0,0 +1,428 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { SCAuthTokenType, SCIncubatorType, SCCategoryType, SCUserType } from '@selfcommunity/types';
3
+ /**
4
+ * Interface SCSettingsType
5
+ */
6
+ export interface SCSettingsType {
7
+ /**
8
+ * Portal.
9
+ */
10
+ portal: string;
11
+ /**
12
+ * i18n. Locale: it, en, etc...
13
+ */
14
+ locale?: SCLocaleType;
15
+ /**
16
+ * Object conf of session.
17
+ */
18
+ session: SCSessionType;
19
+ /**
20
+ * Object conf of session.
21
+ */
22
+ theme?: Record<string, any>;
23
+ /**
24
+ * Object conf of router.
25
+ */
26
+ router?: SCRoutingType;
27
+ /**
28
+ * Object conf of notification.
29
+ */
30
+ notifications?: SCNotificationsType;
31
+ /**
32
+ * Callback to handle anonymous action
33
+ * Ex. an anonymous user attempt to post a comment
34
+ */
35
+ handleAnonymousAction?: () => void;
36
+ /**
37
+ * List of SC context providers to override the default value
38
+ * Default context providers:
39
+ * SCPreferencesProvider, SCRoutingProvider, SCUserProvider,
40
+ * SCNotificationProvider, SCThemeProvider, SCLocaleProvider,
41
+ * SCPreferencesProvider,
42
+ */
43
+ contextProviders?: ((children: any) => JSX.Element)[];
44
+ }
45
+ /**
46
+ * Interface SCLocaleType
47
+ */
48
+ export interface SCLocaleType {
49
+ /**
50
+ * Default locale.
51
+ */
52
+ default?: string;
53
+ /**
54
+ * Overrides default messages.
55
+ */
56
+ messages?: Record<string, any>;
57
+ }
58
+ /**
59
+ * Interface SCUserContextType
60
+ */
61
+ export interface SCUserContextType {
62
+ /**
63
+ * Authenticated User.
64
+ */
65
+ user?: SCUserType;
66
+ /**
67
+ * Current Session.
68
+ */
69
+ session?: SCSessionType;
70
+ /**
71
+ * Authentication is loading.
72
+ */
73
+ loading: boolean;
74
+ /**
75
+ * Error that occurred during authentication.
76
+ */
77
+ error?: any;
78
+ /**
79
+ * Triggered when logout is performed.
80
+ */
81
+ logout: () => void;
82
+ /**
83
+ * Triggered when call a refresh session.
84
+ */
85
+ refreshSession: () => Promise<any>;
86
+ /**
87
+ * Handle change user info
88
+ */
89
+ updateUser: (info: Record<string, any>) => void;
90
+ /**
91
+ * Handle change unseen interactions counter
92
+ */
93
+ setUnseenInteractionsCounter: (counter: number) => void;
94
+ /**
95
+ * Handle change unseen notification banner counter
96
+ */
97
+ setUnseenNotificationBannersCounter: (counter: number) => void;
98
+ /**
99
+ * Handle refresh user notification counters
100
+ * Interactions, BroadcastMessages
101
+ */
102
+ refreshNotificationCounters: () => Promise<any>;
103
+ /**
104
+ * Managers: followed, connections, categories, incubators, etc...
105
+ */
106
+ managers: {
107
+ followed?: SCFollowedManagerType;
108
+ connections?: SCConnectionsManagerType;
109
+ categories: SCFollowedCategoriesManagerType;
110
+ incubators?: SCSubscribedIncubatorsManagerType;
111
+ };
112
+ }
113
+ export interface SCFollowedManagerType {
114
+ /**
115
+ * List of all user ids followed by the authenticated user
116
+ */
117
+ followed: number[];
118
+ /**
119
+ * List of all users in loading state
120
+ */
121
+ loading: number[];
122
+ /**
123
+ * List of current users in loading state
124
+ */
125
+ isLoading: (user: SCUserType) => boolean;
126
+ /**
127
+ * Handle user follow/unfollow user
128
+ */
129
+ follow?: (user: SCUserType) => Promise<any>;
130
+ /**
131
+ * Handle check if a user follow a user, caching data
132
+ */
133
+ isFollowed?: (user: SCUserType) => boolean;
134
+ /**
135
+ * Refresh followed
136
+ */
137
+ refresh?: () => void;
138
+ /**
139
+ * Empty cache to revalidate all followed
140
+ */
141
+ emptyCache?: () => void;
142
+ }
143
+ export interface SCFollowedCategoriesManagerType {
144
+ /**
145
+ * List of all categories ids followed by the authenticated user
146
+ */
147
+ categories: number[];
148
+ /**
149
+ * List of all categories in loading state
150
+ */
151
+ loading: number[];
152
+ /**
153
+ * List of current categories in loading state
154
+ */
155
+ isLoading: (category: SCCategoryType) => boolean;
156
+ /**
157
+ * Handle user follow/unfollow category
158
+ */
159
+ follow?: (category: SCCategoryType) => Promise<any>;
160
+ /**
161
+ * Handle check if a user follow a category, caching data
162
+ */
163
+ isFollowed?: (category: SCCategoryType) => boolean;
164
+ /**
165
+ * Refresh categories
166
+ */
167
+ refresh?: () => void;
168
+ /**
169
+ * Empty cache to revalidate all categories
170
+ */
171
+ emptyCache?: () => void;
172
+ }
173
+ export interface SCConnectionsManagerType {
174
+ /**
175
+ * List of all users in relations(social graph) with authenticated user
176
+ */
177
+ connections: number[];
178
+ /**
179
+ * List of all users in loading state
180
+ */
181
+ loading: number[];
182
+ /**
183
+ * List of current users in loading state
184
+ */
185
+ isLoading: (user: SCUserType) => boolean;
186
+ /**
187
+ * Handle request connection
188
+ */
189
+ requestConnection?: (user: SCUserType) => Promise<any>;
190
+ /**
191
+ * Handle accept connection
192
+ */
193
+ acceptConnection?: (user: SCUserType) => Promise<any>;
194
+ /**
195
+ * Check user status
196
+ */
197
+ status?: (user: SCUserType) => string;
198
+ /**
199
+ * Refresh connections status
200
+ */
201
+ refresh?: () => void;
202
+ /**
203
+ * Empty cache to revalidate all categories
204
+ */
205
+ emptyCache?: () => void;
206
+ }
207
+ export interface SCSubscribedIncubatorsManagerType {
208
+ /**
209
+ * List of all incubators ids subscribed by the authenticated user
210
+ */
211
+ incubators: number[];
212
+ /**
213
+ * List of all incubators in loading state
214
+ */
215
+ loading: number[];
216
+ /**
217
+ * List of current incubators in loading state
218
+ */
219
+ isLoading: (incubator: SCIncubatorType) => boolean;
220
+ /**
221
+ * Handle incubator subscribe/unsubscribe
222
+ */
223
+ subscribe?: (incubator: SCIncubatorType) => Promise<any>;
224
+ /**
225
+ * Handle check if a user has subscribed to an incubator, caching data
226
+ */
227
+ isSubscribed?: (incubator: SCIncubatorType) => boolean;
228
+ /**
229
+ * Refresh subscribed
230
+ */
231
+ refresh?: () => void;
232
+ /**
233
+ * Empty cache to revalidate all subscribed
234
+ */
235
+ emptyCache?: () => void;
236
+ }
237
+ /**
238
+ * Interface SCSessionType
239
+ */
240
+ export interface SCSessionType {
241
+ /**
242
+ * Session types: OAuth, JWT, Cookies.
243
+ */
244
+ type: string;
245
+ /**
246
+ * ClientID: only for OAuth.
247
+ */
248
+ clientId?: string;
249
+ /**
250
+ * Access Token.
251
+ */
252
+ authToken?: SCAuthTokenType;
253
+ /**
254
+ * Callback to refresh the token.
255
+ */
256
+ handleRefreshToken?: (currentSession: any) => Promise<SCAuthTokenType>;
257
+ }
258
+ /**
259
+ * Interface SCContextType
260
+ */
261
+ export interface SCContextType {
262
+ /**
263
+ * Settings
264
+ */
265
+ settings: SCSettingsType;
266
+ }
267
+ /**
268
+ * Interface SCContextProviderType
269
+ */
270
+ export interface SCContextProviderType {
271
+ /**
272
+ * Settings
273
+ */
274
+ conf: SCSettingsType;
275
+ /**
276
+ * Providers
277
+ */
278
+ contextProviders?: ((children: any) => JSX.Element)[];
279
+ /**
280
+ * Nested children
281
+ */
282
+ children: ReactNode;
283
+ }
284
+ /**
285
+ * Interface SCPreferencesType
286
+ */
287
+ export interface SCPreferencesContextType {
288
+ /**
289
+ * List of all community preferences
290
+ */
291
+ preferences: Record<string, any>;
292
+ /**
293
+ * List of all community enabled features
294
+ */
295
+ features: string[];
296
+ }
297
+ /**
298
+ * Interface SCThemeContextType
299
+ */
300
+ export interface SCThemeContextType {
301
+ /**
302
+ * Theme
303
+ */
304
+ theme: Record<string, any>;
305
+ /**
306
+ * Change theme
307
+ * @param theme
308
+ */
309
+ setTheme: (theme: any) => void;
310
+ }
311
+ /**
312
+ * Interface SCRoutingType
313
+ */
314
+ export interface SCRoutingType {
315
+ /**
316
+ * Component
317
+ */
318
+ routerLink?: React.ComponentClass<any>;
319
+ /**
320
+ * Routes
321
+ */
322
+ routes?: Record<string, string>;
323
+ /**
324
+ * Handle override routes path
325
+ * @param name
326
+ * @param defaultUrl
327
+ * @param data
328
+ * @param templateUrl
329
+ * @return string
330
+ */
331
+ handleRoute?: (name: any, defaultUrl: any, data: any, templateUrl: any) => string;
332
+ }
333
+ /**
334
+ * Interface SCNotificationsType
335
+ */
336
+ export interface SCNotificationsType {
337
+ /**
338
+ * Web socket notification
339
+ */
340
+ webSocket?: SCNotificationsWebSocketType;
341
+ /**
342
+ * Web push messaging notification
343
+ */
344
+ webPushMessaging?: SCNotificationsWebPushMessagingType;
345
+ }
346
+ /**
347
+ * Interface SCNotificationsWebSocketType
348
+ */
349
+ export interface SCNotificationsWebSocketType {
350
+ /**
351
+ * Disable toast message
352
+ */
353
+ disableToastMessage?: boolean;
354
+ }
355
+ /**
356
+ * Interface SCNotificationsWebPushMessagingType
357
+ */
358
+ export interface SCNotificationsWebPushMessagingType {
359
+ /**
360
+ * Disable toast message
361
+ */
362
+ disableToastMessage?: boolean;
363
+ /**
364
+ * applicationServerKey - Public key
365
+ */
366
+ applicationServerKey?: boolean;
367
+ }
368
+ /**
369
+ * Interface SCRoutingContextType
370
+ */
371
+ export interface SCRoutingContextType {
372
+ /**
373
+ * Component
374
+ */
375
+ routerLink?: React.ComponentClass<any>;
376
+ /**
377
+ * Routes
378
+ */
379
+ routes?: Record<string, string>;
380
+ /**
381
+ * Generate default path
382
+ */
383
+ url?: (string: any, object: any) => string;
384
+ }
385
+ /**
386
+ * Interface SCNotificationContextType
387
+ */
388
+ export interface SCNotificationContextType {
389
+ /**
390
+ * ws instance
391
+ */
392
+ wsInstance: any;
393
+ /**
394
+ * wp subscription
395
+ */
396
+ wpSubscription: any;
397
+ }
398
+ /**
399
+ * Interface SCLocaleContextType
400
+ */
401
+ export interface SCLocaleContextType {
402
+ /**
403
+ * Locale: en, it, etc.
404
+ */
405
+ locale: string;
406
+ /**
407
+ * Locale messages
408
+ */
409
+ messages: Record<any, any>;
410
+ /**
411
+ * Change locale
412
+ */
413
+ selectLocale: (l: string) => void;
414
+ }
415
+ /**
416
+ * Interface SCAlertMessagesContextType
417
+ */
418
+ export interface SCAlertMessagesContextType {
419
+ /**
420
+ * Options
421
+ */
422
+ options: Record<string, any>;
423
+ /**
424
+ * Set options
425
+ */
426
+ setOptions: (options: any) => void;
427
+ }
428
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AACvC,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAElG;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAEpC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEnC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,CAAC,CAAC,QAAQ,KAAA,KAAK,G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;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,MAAM,KAAA,EAAE,MAAM,KAAA,KAAK,MAAM,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,GAAG,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE,GAAG,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAE3B;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;CAC/B"}
@@ -0,0 +1,3 @@
1
+ import { SCUserContextType, SCFollowedManagerType, SCFollowedCategoriesManagerType, SCSubscribedIncubatorsManagerType, SCConnectionsManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCPreferencesContextType, SCNotificationContextType, SCLocaleType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType } from './context';
2
+ export { SCUserContextType, SCFollowedCategoriesManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCFollowedManagerType, SCConnectionsManagerType, SCSubscribedIncubatorsManagerType, SCLocaleType, SCNotificationContextType, SCPreferencesContextType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType, };
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,+BAA+B,EAC/B,iCAAiC,EACjC,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,aAAa,EACb,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,iCAAiC,EACjC,YAAY,EACZ,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,GAC3B,CAAC"}