@selfcommunity/react-core 0.4.0-alpha.11 → 0.4.0-alpha.110
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.
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +2 -25
- package/lib/cjs/components/provider/SCContextProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCContextProvider/index.js +3 -29
- package/lib/cjs/components/provider/SCLocaleProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.js +2 -25
- package/lib/cjs/components/provider/SCNotificationProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.js +7 -31
- package/lib/cjs/components/provider/SCPreferencesProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.js +2 -25
- package/lib/cjs/components/provider/SCRoutingProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.js +4 -27
- package/lib/cjs/components/provider/SCThemeProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.js +6 -32
- package/lib/cjs/components/provider/SCUserProvider/index.d.ts +0 -1
- package/lib/cjs/components/provider/SCUserProvider/index.js +32 -49
- package/lib/cjs/components/provider/SCVoteProvider/index.d.ts +37 -0
- package/lib/cjs/components/provider/SCVoteProvider/index.js +112 -0
- package/lib/cjs/components/router/index.d.ts +0 -1
- package/lib/cjs/components/router/index.js +5 -39
- package/lib/cjs/constants/Actions.d.ts +0 -1
- package/lib/cjs/constants/Actions.js +0 -1
- package/lib/cjs/constants/Cache.d.ts +23 -15
- package/lib/cjs/constants/Cache.js +28 -17
- package/lib/cjs/constants/ContextProviders.d.ts +0 -1
- package/lib/cjs/constants/ContextProviders.js +12 -13
- package/lib/cjs/constants/Device.d.ts +22 -1
- package/lib/cjs/constants/Device.js +27 -2
- package/lib/cjs/constants/Errors.d.ts +0 -1
- package/lib/cjs/constants/Errors.js +0 -1
- package/lib/cjs/constants/Features.d.ts +0 -43
- package/lib/cjs/constants/Features.js +1 -44
- package/lib/cjs/constants/Locale.d.ts +0 -1
- package/lib/cjs/constants/Locale.js +0 -1
- package/lib/cjs/constants/Notification.d.ts +0 -1
- package/lib/cjs/constants/Notification.js +0 -1
- package/lib/cjs/constants/Notifications.d.ts +3 -1
- package/lib/cjs/constants/Notifications.js +7 -2
- package/lib/cjs/constants/Preferences.d.ts +13 -2
- package/lib/cjs/constants/Preferences.js +21 -5
- package/lib/cjs/constants/Routes.d.ts +3 -1
- package/lib/cjs/constants/Routes.js +8 -3
- package/lib/cjs/constants/Session.d.ts +0 -1
- package/lib/cjs/constants/Session.js +0 -1
- package/lib/cjs/constants/Theme.d.ts +0 -1
- package/lib/cjs/constants/Theme.js +0 -1
- package/lib/cjs/constants/Vote.d.ts +6 -0
- package/lib/cjs/constants/Vote.js +9 -0
- package/lib/cjs/constants/WebSocket.d.ts +0 -1
- package/lib/cjs/constants/WebSocket.js +0 -1
- package/lib/cjs/hooks/useSCAuth.d.ts +0 -1
- package/lib/cjs/hooks/useSCAuth.js +34 -51
- package/lib/cjs/hooks/useSCBlockedUsersManager.d.ts +30 -0
- package/lib/cjs/hooks/useSCBlockedUsersManager.js +108 -0
- package/lib/cjs/hooks/useSCCachingManager.d.ts +5 -5
- package/lib/cjs/hooks/useSCCachingManager.js +21 -6
- package/lib/cjs/hooks/useSCConnectionsManager.d.ts +8 -5
- package/lib/cjs/hooks/useSCConnectionsManager.js +141 -91
- package/lib/cjs/hooks/useSCFetchAddressingTagList.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchAddressingTagList.js +2 -26
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.d.ts +30 -0
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.js +91 -0
- package/lib/cjs/hooks/useSCFetchCategories.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCategories.js +2 -11
- package/lib/cjs/hooks/useSCFetchCategory.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCategory.js +13 -12
- package/lib/cjs/hooks/useSCFetchCommentObject.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObject.js +1 -2
- package/lib/cjs/hooks/useSCFetchCommentObjects.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObjects.js +2 -5
- package/lib/cjs/hooks/useSCFetchContributors.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchContributors.js +2 -5
- package/lib/cjs/hooks/useSCFetchCustomAdv.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCustomAdv.js +2 -5
- package/lib/cjs/hooks/useSCFetchFeed.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchFeed.js +3 -6
- package/lib/cjs/hooks/useSCFetchFeedObject.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchFeedObject.js +0 -1
- package/lib/cjs/hooks/useSCFetchIncubator.d.ts +4 -2
- package/lib/cjs/hooks/useSCFetchIncubator.js +28 -8
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.js +16 -26
- package/lib/cjs/hooks/useSCFetchReactions.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchReactions.js +3 -50
- package/lib/cjs/hooks/useSCFetchTag.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchTag.js +0 -1
- package/lib/cjs/hooks/useSCFetchUser.d.ts +2 -1
- package/lib/cjs/hooks/useSCFetchUser.js +33 -8
- package/lib/cjs/hooks/useSCFetchUserBlockedBy.d.ts +17 -0
- package/lib/cjs/hooks/useSCFetchUserBlockedBy.js +83 -0
- package/lib/cjs/hooks/useSCFetchUserProviders.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchUserProviders.js +0 -1
- package/lib/cjs/hooks/useSCFetchVote.d.ts +2 -3
- package/lib/cjs/hooks/useSCFetchVote.js +58 -73
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.d.ts +4 -5
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +26 -17
- package/lib/cjs/hooks/useSCFollowedManager.d.ts +4 -5
- package/lib/cjs/hooks/useSCFollowedManager.js +38 -24
- package/lib/cjs/hooks/useSCFollowersManager.d.ts +4 -5
- package/lib/cjs/hooks/useSCFollowersManager.js +7 -10
- package/lib/cjs/hooks/useSCMediaClick.d.ts +0 -1
- package/lib/cjs/hooks/useSCMediaClick.js +0 -1
- package/lib/cjs/hooks/useSCMobileNativePushMessaging.d.ts +19 -0
- package/lib/cjs/hooks/useSCMobileNativePushMessaging.js +143 -0
- package/lib/cjs/hooks/useSCSettingsManager.d.ts +0 -1
- package/lib/cjs/hooks/useSCSettingsManager.js +0 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.d.ts +12 -3
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +39 -32
- package/lib/cjs/hooks/useSCUserIsBlocked.d.ts +18 -0
- package/lib/cjs/hooks/useSCUserIsBlocked.js +33 -0
- package/lib/cjs/hooks/useSCWebPushMessaging.d.ts +12 -2
- package/lib/cjs/hooks/useSCWebPushMessaging.js +188 -106
- package/lib/cjs/hooks/useSCWebSocket.d.ts +1 -2
- package/lib/cjs/hooks/useSCWebSocket.js +3 -6
- package/lib/cjs/index.d.ts +4 -2
- package/lib/cjs/index.js +41 -61
- package/lib/cjs/themes/theme.d.ts +0 -1
- package/lib/cjs/themes/theme.js +4 -80
- package/lib/cjs/types/context.d.ts +96 -6
- package/lib/cjs/types/context.js +0 -1
- package/lib/cjs/types/index.d.ts +2 -3
- package/lib/cjs/types/index.js +0 -1
- package/lib/cjs/types/theme.d.ts +1 -2
- package/lib/cjs/types/theme.js +0 -1
- package/lib/cjs/utils/errors.d.ts +5 -6
- package/lib/cjs/utils/errors.js +13 -34
- package/lib/cjs/utils/hooks/index.d.ts +0 -1
- package/lib/cjs/utils/hooks/index.js +6 -9
- package/lib/cjs/utils/hooks/useEffectOnce.d.ts +0 -1
- package/lib/cjs/utils/hooks/useEffectOnce.js +0 -1
- package/lib/cjs/utils/hooks/useIsComponentMountedRef.d.ts +0 -1
- package/lib/cjs/utils/hooks/useIsComponentMountedRef.js +0 -1
- package/lib/cjs/utils/hooks/useIsomorphicLayoutEffect.d.ts +0 -1
- package/lib/cjs/utils/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/lib/cjs/utils/hooks/useNoInitialEffect.d.ts +0 -1
- package/lib/cjs/utils/hooks/useNoInitialEffect.js +0 -1
- package/lib/cjs/utils/hooks/usePreviousValue.d.ts +0 -1
- package/lib/cjs/utils/hooks/usePreviousValue.js +0 -1
- package/lib/cjs/utils/locale.d.ts +0 -1
- package/lib/cjs/utils/locale.js +2 -5
- package/lib/cjs/utils/notification.d.ts +8 -0
- package/lib/cjs/utils/notification.js +20 -0
- package/lib/cjs/utils/pagination.d.ts +0 -1
- package/lib/cjs/utils/pagination.js +0 -1
- package/lib/cjs/utils/user.d.ts +0 -1
- package/lib/cjs/utils/user.js +0 -1
- package/lib/cjs/utils/validator.d.ts +49 -3
- package/lib/cjs/utils/validator.js +144 -41
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +0 -1
- package/lib/esm/components/provider/SCContextProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCContextProvider/index.js +0 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.js +0 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.js +3 -2
- package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.js +0 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.js +1 -2
- package/lib/esm/components/provider/SCThemeProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCThemeProvider/index.js +1 -2
- package/lib/esm/components/provider/SCUserProvider/index.d.ts +0 -1
- package/lib/esm/components/provider/SCUserProvider/index.js +22 -14
- package/lib/esm/components/provider/SCVoteProvider/index.d.ts +37 -0
- package/lib/esm/components/provider/SCVoteProvider/index.js +106 -0
- package/lib/esm/components/router/index.d.ts +0 -1
- package/lib/esm/components/router/index.js +2 -13
- package/lib/esm/constants/Actions.d.ts +0 -1
- package/lib/esm/constants/Actions.js +0 -1
- package/lib/esm/constants/Cache.d.ts +23 -15
- package/lib/esm/constants/Cache.js +23 -15
- package/lib/esm/constants/ContextProviders.d.ts +0 -1
- package/lib/esm/constants/ContextProviders.js +4 -3
- package/lib/esm/constants/Device.d.ts +22 -1
- package/lib/esm/constants/Device.js +26 -1
- package/lib/esm/constants/Errors.d.ts +0 -1
- package/lib/esm/constants/Errors.js +0 -1
- package/lib/esm/constants/Features.d.ts +0 -43
- package/lib/esm/constants/Features.js +0 -43
- package/lib/esm/constants/Locale.d.ts +0 -1
- package/lib/esm/constants/Locale.js +0 -1
- package/lib/esm/constants/Notification.d.ts +0 -1
- package/lib/esm/constants/Notification.js +0 -1
- package/lib/esm/constants/Notifications.d.ts +3 -1
- package/lib/esm/constants/Notifications.js +6 -1
- package/lib/esm/constants/Preferences.d.ts +13 -2
- package/lib/esm/constants/Preferences.js +18 -3
- package/lib/esm/constants/Routes.d.ts +3 -1
- package/lib/esm/constants/Routes.js +7 -2
- package/lib/esm/constants/Session.d.ts +0 -1
- package/lib/esm/constants/Session.js +0 -1
- package/lib/esm/constants/Theme.d.ts +0 -1
- package/lib/esm/constants/Theme.js +0 -1
- package/lib/esm/constants/Vote.d.ts +6 -0
- package/lib/esm/constants/Vote.js +6 -0
- package/lib/esm/constants/WebSocket.d.ts +0 -1
- package/lib/esm/constants/WebSocket.js +0 -1
- package/lib/esm/hooks/useSCAuth.d.ts +0 -1
- package/lib/esm/hooks/useSCAuth.js +31 -22
- package/lib/esm/hooks/useSCBlockedUsersManager.d.ts +30 -0
- package/lib/esm/hooks/useSCBlockedUsersManager.js +105 -0
- package/lib/esm/hooks/useSCCachingManager.d.ts +5 -5
- package/lib/esm/hooks/useSCCachingManager.js +21 -6
- package/lib/esm/hooks/useSCConnectionsManager.d.ts +8 -5
- package/lib/esm/hooks/useSCConnectionsManager.js +138 -86
- package/lib/esm/hooks/useSCFetchAddressingTagList.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchAddressingTagList.js +3 -4
- package/lib/esm/hooks/useSCFetchBroadcastMessages.d.ts +30 -0
- package/lib/esm/hooks/useSCFetchBroadcastMessages.js +89 -0
- package/lib/esm/hooks/useSCFetchCategories.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCategories.js +1 -10
- package/lib/esm/hooks/useSCFetchCategory.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCategory.js +15 -14
- package/lib/esm/hooks/useSCFetchCommentObject.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCommentObject.js +1 -2
- package/lib/esm/hooks/useSCFetchCommentObjects.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCommentObjects.js +0 -1
- package/lib/esm/hooks/useSCFetchContributors.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchContributors.js +0 -1
- package/lib/esm/hooks/useSCFetchCustomAdv.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCustomAdv.js +0 -1
- package/lib/esm/hooks/useSCFetchFeed.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchFeed.js +1 -2
- package/lib/esm/hooks/useSCFetchFeedObject.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchFeedObject.js +0 -1
- package/lib/esm/hooks/useSCFetchIncubator.d.ts +4 -2
- package/lib/esm/hooks/useSCFetchIncubator.js +29 -9
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.js +15 -25
- package/lib/esm/hooks/useSCFetchReactions.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchReactions.js +5 -29
- package/lib/esm/hooks/useSCFetchTag.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchTag.js +0 -1
- package/lib/esm/hooks/useSCFetchUser.d.ts +2 -1
- package/lib/esm/hooks/useSCFetchUser.js +34 -9
- package/lib/esm/hooks/useSCFetchUserBlockedBy.d.ts +17 -0
- package/lib/esm/hooks/useSCFetchUserBlockedBy.js +80 -0
- package/lib/esm/hooks/useSCFetchUserProviders.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchUserProviders.js +0 -1
- package/lib/esm/hooks/useSCFetchVote.d.ts +2 -3
- package/lib/esm/hooks/useSCFetchVote.js +56 -69
- package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts +4 -5
- package/lib/esm/hooks/useSCFollowedCategoriesManager.js +25 -14
- package/lib/esm/hooks/useSCFollowedManager.d.ts +4 -5
- package/lib/esm/hooks/useSCFollowedManager.js +37 -21
- package/lib/esm/hooks/useSCFollowersManager.d.ts +4 -5
- package/lib/esm/hooks/useSCFollowersManager.js +4 -5
- package/lib/esm/hooks/useSCMediaClick.d.ts +0 -1
- package/lib/esm/hooks/useSCMediaClick.js +0 -1
- package/lib/esm/hooks/useSCMobileNativePushMessaging.d.ts +19 -0
- package/lib/esm/hooks/useSCMobileNativePushMessaging.js +140 -0
- package/lib/esm/hooks/useSCSettingsManager.d.ts +0 -1
- package/lib/esm/hooks/useSCSettingsManager.js +0 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts +12 -3
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +38 -29
- package/lib/esm/hooks/useSCUserIsBlocked.d.ts +18 -0
- package/lib/esm/hooks/useSCUserIsBlocked.js +29 -0
- package/lib/esm/hooks/useSCWebPushMessaging.d.ts +12 -2
- package/lib/esm/hooks/useSCWebPushMessaging.js +185 -82
- package/lib/esm/hooks/useSCWebSocket.d.ts +1 -2
- package/lib/esm/hooks/useSCWebSocket.js +1 -2
- package/lib/esm/index.d.ts +4 -2
- package/lib/esm/index.js +4 -2
- package/lib/esm/themes/theme.d.ts +0 -1
- package/lib/esm/themes/theme.js +1 -75
- package/lib/esm/types/context.d.ts +96 -6
- package/lib/esm/types/context.js +0 -1
- package/lib/esm/types/index.d.ts +2 -3
- package/lib/esm/types/index.js +0 -1
- package/lib/esm/types/theme.d.ts +1 -2
- package/lib/esm/types/theme.js +0 -1
- package/lib/esm/utils/errors.d.ts +5 -6
- package/lib/esm/utils/errors.js +10 -8
- package/lib/esm/utils/hooks/index.d.ts +0 -1
- package/lib/esm/utils/hooks/index.js +0 -1
- package/lib/esm/utils/hooks/useEffectOnce.d.ts +0 -1
- package/lib/esm/utils/hooks/useEffectOnce.js +0 -1
- package/lib/esm/utils/hooks/useIsComponentMountedRef.d.ts +0 -1
- package/lib/esm/utils/hooks/useIsComponentMountedRef.js +0 -1
- package/lib/esm/utils/hooks/useIsomorphicLayoutEffect.d.ts +0 -1
- package/lib/esm/utils/hooks/useIsomorphicLayoutEffect.js +0 -1
- package/lib/esm/utils/hooks/useNoInitialEffect.d.ts +0 -1
- package/lib/esm/utils/hooks/useNoInitialEffect.js +0 -1
- package/lib/esm/utils/hooks/usePreviousValue.d.ts +0 -1
- package/lib/esm/utils/hooks/usePreviousValue.js +0 -1
- package/lib/esm/utils/locale.d.ts +0 -1
- package/lib/esm/utils/locale.js +0 -1
- package/lib/esm/utils/notification.d.ts +8 -0
- package/lib/esm/utils/notification.js +15 -0
- package/lib/esm/utils/pagination.d.ts +0 -1
- package/lib/esm/utils/pagination.js +0 -1
- package/lib/esm/utils/user.d.ts +0 -1
- package/lib/esm/utils/user.js +0 -1
- package/lib/esm/utils/validator.d.ts +49 -3
- package/lib/esm/utils/validator.js +129 -8
- package/lib/umd/251.js +2 -0
- package/lib/umd/251.js.LICENSE.txt +1 -0
- package/lib/umd/react-core.js +1 -1
- package/lib/umd/react-core.js.LICENSE.txt +1 -1
- package/package.json +25 -24
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCContextProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCContextProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.js.map +0 -1
- package/lib/cjs/components/provider/SCUserProvider/index.d.ts.map +0 -1
- package/lib/cjs/components/provider/SCUserProvider/index.js.map +0 -1
- package/lib/cjs/components/router/index.d.ts.map +0 -1
- package/lib/cjs/components/router/index.js.map +0 -1
- package/lib/cjs/constants/Actions.d.ts.map +0 -1
- package/lib/cjs/constants/Actions.js.map +0 -1
- package/lib/cjs/constants/Cache.d.ts.map +0 -1
- package/lib/cjs/constants/Cache.js.map +0 -1
- package/lib/cjs/constants/ContextProviders.d.ts.map +0 -1
- package/lib/cjs/constants/ContextProviders.js.map +0 -1
- package/lib/cjs/constants/Device.d.ts.map +0 -1
- package/lib/cjs/constants/Device.js.map +0 -1
- package/lib/cjs/constants/Errors.d.ts.map +0 -1
- package/lib/cjs/constants/Errors.js.map +0 -1
- package/lib/cjs/constants/Features.d.ts.map +0 -1
- package/lib/cjs/constants/Features.js.map +0 -1
- package/lib/cjs/constants/Locale.d.ts.map +0 -1
- package/lib/cjs/constants/Locale.js.map +0 -1
- package/lib/cjs/constants/Notification.d.ts.map +0 -1
- package/lib/cjs/constants/Notification.js.map +0 -1
- package/lib/cjs/constants/Notifications.d.ts.map +0 -1
- package/lib/cjs/constants/Notifications.js.map +0 -1
- package/lib/cjs/constants/Preferences.d.ts.map +0 -1
- package/lib/cjs/constants/Preferences.js.map +0 -1
- package/lib/cjs/constants/Routes.d.ts.map +0 -1
- package/lib/cjs/constants/Routes.js.map +0 -1
- package/lib/cjs/constants/Session.d.ts.map +0 -1
- package/lib/cjs/constants/Session.js.map +0 -1
- package/lib/cjs/constants/Theme.d.ts.map +0 -1
- package/lib/cjs/constants/Theme.js.map +0 -1
- package/lib/cjs/constants/WebSocket.d.ts.map +0 -1
- package/lib/cjs/constants/WebSocket.js.map +0 -1
- package/lib/cjs/hooks/useSCAuth.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCAuth.js.map +0 -1
- package/lib/cjs/hooks/useSCCachingManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCCachingManager.js.map +0 -1
- package/lib/cjs/hooks/useSCConnectionsManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCConnectionsManager.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchAddressingTagList.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchAddressingTagList.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchCategories.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchCategories.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchCategory.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchCategory.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObject.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObject.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObjects.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchCommentObjects.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchContributors.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchContributors.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchCustomAdv.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchCustomAdv.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchFeed.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchFeed.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchFeedObject.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchFeedObject.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchIncubator.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchIncubator.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchReactions.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchReactions.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchTag.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchTag.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchUser.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchUser.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchUserProviders.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchUserProviders.js.map +0 -1
- package/lib/cjs/hooks/useSCFetchVote.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFetchVote.js.map +0 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.js.map +0 -1
- package/lib/cjs/hooks/useSCFollowedManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFollowedManager.js.map +0 -1
- package/lib/cjs/hooks/useSCFollowersManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCFollowersManager.js.map +0 -1
- package/lib/cjs/hooks/useSCMediaClick.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCMediaClick.js.map +0 -1
- package/lib/cjs/hooks/useSCSettingsManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCSettingsManager.js.map +0 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js.map +0 -1
- package/lib/cjs/hooks/useSCWebPushMessaging.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCWebPushMessaging.js.map +0 -1
- package/lib/cjs/hooks/useSCWebSocket.d.ts.map +0 -1
- package/lib/cjs/hooks/useSCWebSocket.js.map +0 -1
- package/lib/cjs/index.d.ts.map +0 -1
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/themes/theme.d.ts.map +0 -1
- package/lib/cjs/themes/theme.js.map +0 -1
- package/lib/cjs/types/context.d.ts.map +0 -1
- package/lib/cjs/types/context.js.map +0 -1
- package/lib/cjs/types/index.d.ts.map +0 -1
- package/lib/cjs/types/index.js.map +0 -1
- package/lib/cjs/types/theme.d.ts.map +0 -1
- package/lib/cjs/types/theme.js.map +0 -1
- package/lib/cjs/utils/errors.d.ts.map +0 -1
- package/lib/cjs/utils/errors.js.map +0 -1
- package/lib/cjs/utils/hooks/index.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/index.js.map +0 -1
- package/lib/cjs/utils/hooks/useEffectOnce.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/useEffectOnce.js.map +0 -1
- package/lib/cjs/utils/hooks/useIsComponentMountedRef.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/useIsComponentMountedRef.js.map +0 -1
- package/lib/cjs/utils/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/lib/cjs/utils/hooks/useNoInitialEffect.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/useNoInitialEffect.js.map +0 -1
- package/lib/cjs/utils/hooks/usePreviousValue.d.ts.map +0 -1
- package/lib/cjs/utils/hooks/usePreviousValue.js.map +0 -1
- package/lib/cjs/utils/locale.d.ts.map +0 -1
- package/lib/cjs/utils/locale.js.map +0 -1
- package/lib/cjs/utils/pagination.d.ts.map +0 -1
- package/lib/cjs/utils/pagination.js.map +0 -1
- package/lib/cjs/utils/user.d.ts.map +0 -1
- package/lib/cjs/utils/user.js.map +0 -1
- package/lib/cjs/utils/validator.d.ts.map +0 -1
- package/lib/cjs/utils/validator.js.map +0 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCContextProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCContextProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCThemeProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCThemeProvider/index.js.map +0 -1
- package/lib/esm/components/provider/SCUserProvider/index.d.ts.map +0 -1
- package/lib/esm/components/provider/SCUserProvider/index.js.map +0 -1
- package/lib/esm/components/router/index.d.ts.map +0 -1
- package/lib/esm/components/router/index.js.map +0 -1
- package/lib/esm/constants/Actions.d.ts.map +0 -1
- package/lib/esm/constants/Actions.js.map +0 -1
- package/lib/esm/constants/Cache.d.ts.map +0 -1
- package/lib/esm/constants/Cache.js.map +0 -1
- package/lib/esm/constants/ContextProviders.d.ts.map +0 -1
- package/lib/esm/constants/ContextProviders.js.map +0 -1
- package/lib/esm/constants/Device.d.ts.map +0 -1
- package/lib/esm/constants/Device.js.map +0 -1
- package/lib/esm/constants/Errors.d.ts.map +0 -1
- package/lib/esm/constants/Errors.js.map +0 -1
- package/lib/esm/constants/Features.d.ts.map +0 -1
- package/lib/esm/constants/Features.js.map +0 -1
- package/lib/esm/constants/Locale.d.ts.map +0 -1
- package/lib/esm/constants/Locale.js.map +0 -1
- package/lib/esm/constants/Notification.d.ts.map +0 -1
- package/lib/esm/constants/Notification.js.map +0 -1
- package/lib/esm/constants/Notifications.d.ts.map +0 -1
- package/lib/esm/constants/Notifications.js.map +0 -1
- package/lib/esm/constants/Preferences.d.ts.map +0 -1
- package/lib/esm/constants/Preferences.js.map +0 -1
- package/lib/esm/constants/Routes.d.ts.map +0 -1
- package/lib/esm/constants/Routes.js.map +0 -1
- package/lib/esm/constants/Session.d.ts.map +0 -1
- package/lib/esm/constants/Session.js.map +0 -1
- package/lib/esm/constants/Theme.d.ts.map +0 -1
- package/lib/esm/constants/Theme.js.map +0 -1
- package/lib/esm/constants/WebSocket.d.ts.map +0 -1
- package/lib/esm/constants/WebSocket.js.map +0 -1
- package/lib/esm/hooks/useSCAuth.d.ts.map +0 -1
- package/lib/esm/hooks/useSCAuth.js.map +0 -1
- package/lib/esm/hooks/useSCCachingManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCCachingManager.js.map +0 -1
- package/lib/esm/hooks/useSCConnectionsManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCConnectionsManager.js.map +0 -1
- package/lib/esm/hooks/useSCFetchAddressingTagList.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchAddressingTagList.js.map +0 -1
- package/lib/esm/hooks/useSCFetchCategories.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchCategories.js.map +0 -1
- package/lib/esm/hooks/useSCFetchCategory.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchCategory.js.map +0 -1
- package/lib/esm/hooks/useSCFetchCommentObject.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchCommentObject.js.map +0 -1
- package/lib/esm/hooks/useSCFetchCommentObjects.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchCommentObjects.js.map +0 -1
- package/lib/esm/hooks/useSCFetchContributors.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchContributors.js.map +0 -1
- package/lib/esm/hooks/useSCFetchCustomAdv.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchCustomAdv.js.map +0 -1
- package/lib/esm/hooks/useSCFetchFeed.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchFeed.js.map +0 -1
- package/lib/esm/hooks/useSCFetchFeedObject.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchFeedObject.js.map +0 -1
- package/lib/esm/hooks/useSCFetchIncubator.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchIncubator.js.map +0 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.js.map +0 -1
- package/lib/esm/hooks/useSCFetchReactions.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchReactions.js.map +0 -1
- package/lib/esm/hooks/useSCFetchTag.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchTag.js.map +0 -1
- package/lib/esm/hooks/useSCFetchUser.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchUser.js.map +0 -1
- package/lib/esm/hooks/useSCFetchUserProviders.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchUserProviders.js.map +0 -1
- package/lib/esm/hooks/useSCFetchVote.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFetchVote.js.map +0 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.js.map +0 -1
- package/lib/esm/hooks/useSCFollowedManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFollowedManager.js.map +0 -1
- package/lib/esm/hooks/useSCFollowersManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCFollowersManager.js.map +0 -1
- package/lib/esm/hooks/useSCMediaClick.d.ts.map +0 -1
- package/lib/esm/hooks/useSCMediaClick.js.map +0 -1
- package/lib/esm/hooks/useSCSettingsManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCSettingsManager.js.map +0 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts.map +0 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js.map +0 -1
- package/lib/esm/hooks/useSCWebPushMessaging.d.ts.map +0 -1
- package/lib/esm/hooks/useSCWebPushMessaging.js.map +0 -1
- package/lib/esm/hooks/useSCWebSocket.d.ts.map +0 -1
- package/lib/esm/hooks/useSCWebSocket.js.map +0 -1
- package/lib/esm/index.d.ts.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/themes/theme.d.ts.map +0 -1
- package/lib/esm/themes/theme.js.map +0 -1
- package/lib/esm/types/context.d.ts.map +0 -1
- package/lib/esm/types/context.js.map +0 -1
- package/lib/esm/types/index.d.ts.map +0 -1
- package/lib/esm/types/index.js.map +0 -1
- package/lib/esm/types/theme.d.ts.map +0 -1
- package/lib/esm/types/theme.js.map +0 -1
- package/lib/esm/utils/errors.d.ts.map +0 -1
- package/lib/esm/utils/errors.js.map +0 -1
- package/lib/esm/utils/hooks/index.d.ts.map +0 -1
- package/lib/esm/utils/hooks/index.js.map +0 -1
- package/lib/esm/utils/hooks/useEffectOnce.d.ts.map +0 -1
- package/lib/esm/utils/hooks/useEffectOnce.js.map +0 -1
- package/lib/esm/utils/hooks/useIsComponentMountedRef.d.ts.map +0 -1
- package/lib/esm/utils/hooks/useIsComponentMountedRef.js.map +0 -1
- package/lib/esm/utils/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
- package/lib/esm/utils/hooks/useIsomorphicLayoutEffect.js.map +0 -1
- package/lib/esm/utils/hooks/useNoInitialEffect.d.ts.map +0 -1
- package/lib/esm/utils/hooks/useNoInitialEffect.js.map +0 -1
- package/lib/esm/utils/hooks/usePreviousValue.d.ts.map +0 -1
- package/lib/esm/utils/hooks/usePreviousValue.js.map +0 -1
- package/lib/esm/utils/locale.d.ts.map +0 -1
- package/lib/esm/utils/locale.js.map +0 -1
- package/lib/esm/utils/pagination.d.ts.map +0 -1
- package/lib/esm/utils/pagination.js.map +0 -1
- package/lib/esm/utils/user.d.ts.map +0 -1
- package/lib/esm/utils/user.js.map +0 -1
- package/lib/esm/utils/validator.d.ts.map +0 -1
- package/lib/esm/utils/validator.js.map +0 -1
|
@@ -66,7 +66,7 @@ export default function SCRoutingProvider({ children = null }) {
|
|
|
66
66
|
[CATEGORIES_LIST_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_CATEGORIES_LIST].value),
|
|
67
67
|
[USER_PROFILE_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE].value),
|
|
68
68
|
[USER_PROFILE_SETTINGS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PROFILE_SETTINGS].value),
|
|
69
|
-
[USER_NOTIFICATIONS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.
|
|
69
|
+
[USER_NOTIFICATIONS_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_NOTIFICATIONS].value),
|
|
70
70
|
[USER_PRIVATE_MESSAGES_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_USER_PRIVATE_MESSAGES].value),
|
|
71
71
|
[INCUBATOR_ROUTE_NAME]: normalizeUrl(scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_URL_TEMPLATE_INCUBATOR].value),
|
|
72
72
|
};
|
|
@@ -109,4 +109,3 @@ export default function SCRoutingProvider({ children = null }) {
|
|
|
109
109
|
export function useSCRouting() {
|
|
110
110
|
return useContext(SCRoutingContext);
|
|
111
111
|
}
|
|
112
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { createContext, useContext, useState } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ThemeProvider from '@mui/material/styles/ThemeProvider';
|
|
3
3
|
import getTheme from '../../../themes/theme';
|
|
4
4
|
import { useSCContext } from '../SCContextProvider';
|
|
5
5
|
import { useSCPreferences } from '../SCPreferencesProvider';
|
|
@@ -74,4 +74,3 @@ export const withSCTheme = (Component) => (props) => {
|
|
|
74
74
|
export function useSCTheme() {
|
|
75
75
|
return useContext(SCThemeContext);
|
|
76
76
|
}
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -13,6 +13,8 @@ import useSCFollowersManager from '../../../hooks/useSCFollowersManager';
|
|
|
13
13
|
import useSCConnectionsManager from '../../../hooks/useSCConnectionsManager';
|
|
14
14
|
import { SCNotificationTopicType, SCNotificationTypologyType, SCUserStatus } from '@selfcommunity/types';
|
|
15
15
|
import useSCSubscribedIncubatorsManager from '../../../hooks/useSCSubscribedIncubatorsManager';
|
|
16
|
+
import useSCBlockedUsersManager from '../../../hooks/useSCBlockedUsersManager';
|
|
17
|
+
import * as Session from '../../../constants/Session';
|
|
16
18
|
/**
|
|
17
19
|
* SCUserContext (Authentication Context)
|
|
18
20
|
*
|
|
@@ -55,7 +57,7 @@ export default function SCUserProvider({ children }) {
|
|
|
55
57
|
dispatch({ type: userActionTypes.UPDATE_USER, payload: info });
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
|
-
* Managers followed, categories
|
|
60
|
+
* Managers followed, connections, blocked users, categories, incubators, settings
|
|
59
61
|
*/
|
|
60
62
|
const settingsManager = useSCSettingsManager(state.user);
|
|
61
63
|
const followedManager = useSCFollowedManager(state.user);
|
|
@@ -63,6 +65,7 @@ export default function SCUserProvider({ children }) {
|
|
|
63
65
|
const subscribedIncubatorsManager = useSCSubscribedIncubatorsManager(state.user);
|
|
64
66
|
const connectionsManager = useSCConnectionsManager(state.user);
|
|
65
67
|
const categoriesManager = useSCFollowedCategoriesManager(state.user, updateUser);
|
|
68
|
+
const blockedUsersManager = useSCBlockedUsersManager(state.user);
|
|
66
69
|
/**
|
|
67
70
|
* Ref notifications subscribers: BLOCKED_USER, UNBLOCKED_USER
|
|
68
71
|
*/
|
|
@@ -74,7 +77,7 @@ export default function SCUserProvider({ children }) {
|
|
|
74
77
|
* If there is an error, it means there is no session.
|
|
75
78
|
*/
|
|
76
79
|
useDeepCompareEffectNoCheck(() => {
|
|
77
|
-
if (state.session.authToken && state.session.authToken.accessToken) {
|
|
80
|
+
if ((state.session.authToken && state.session.authToken.accessToken) || state.session.type === Session.COOKIE_SESSION) {
|
|
78
81
|
dispatch({ type: userActionTypes.LOGIN_LOADING });
|
|
79
82
|
UserService.getCurrentUser()
|
|
80
83
|
.then((user) => {
|
|
@@ -85,6 +88,9 @@ export default function SCUserProvider({ children }) {
|
|
|
85
88
|
dispatch({ type: userActionTypes.LOGIN_FAILURE, payload: { error } });
|
|
86
89
|
});
|
|
87
90
|
}
|
|
91
|
+
else {
|
|
92
|
+
dispatch({ type: userActionTypes.LOGIN_FAILURE });
|
|
93
|
+
}
|
|
88
94
|
}, [state.session]);
|
|
89
95
|
/**
|
|
90
96
|
* Controls caching of follow categories, users, etc...
|
|
@@ -104,10 +110,12 @@ export default function SCUserProvider({ children }) {
|
|
|
104
110
|
function handleVisibilityChange() {
|
|
105
111
|
if (isClientSideRendering() && !window.document.hidden && state.user) {
|
|
106
112
|
settingsManager.refresh && settingsManager.refresh();
|
|
113
|
+
refreshCounters();
|
|
107
114
|
categoriesManager.refresh && categoriesManager.refresh();
|
|
108
115
|
followedManager.refresh && followedManager.refresh();
|
|
109
116
|
connectionsManager.refresh && connectionsManager.refresh();
|
|
110
117
|
subscribedIncubatorsManager.refresh && subscribedIncubatorsManager.refresh();
|
|
118
|
+
blockedUsersManager.refresh && blockedUsersManager.refresh();
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
/**
|
|
@@ -130,13 +138,13 @@ export default function SCUserProvider({ children }) {
|
|
|
130
138
|
* Handle change unseen interactions counter
|
|
131
139
|
*/
|
|
132
140
|
function setUnseenInteractionsCounter(counter) {
|
|
133
|
-
dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_interactions_counter: counter } });
|
|
141
|
+
dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_interactions_counter: Math.max(counter, 0) } });
|
|
134
142
|
}
|
|
135
143
|
/**
|
|
136
144
|
* Handle change unseen notification banners counter
|
|
137
145
|
*/
|
|
138
146
|
function setUnseenNotificationBannersCounter(counter) {
|
|
139
|
-
dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_notification_banners_counter: counter } });
|
|
147
|
+
dispatch({ type: userActionTypes.UPDATE_USER, payload: { unseen_notification_banners_counter: Math.max(counter, 0) } });
|
|
140
148
|
}
|
|
141
149
|
/**
|
|
142
150
|
* Helper to refresh the session
|
|
@@ -145,24 +153,23 @@ export default function SCUserProvider({ children }) {
|
|
|
145
153
|
return helpers.refreshSession();
|
|
146
154
|
}
|
|
147
155
|
/**
|
|
148
|
-
* Helper to refresh
|
|
149
|
-
* Use getCurrentUser service since the
|
|
156
|
+
* Helper to refresh counters
|
|
157
|
+
* Use getCurrentUser service since the counters
|
|
150
158
|
* have been inserted into the serialized user object
|
|
151
159
|
*/
|
|
152
|
-
const
|
|
160
|
+
const refreshCounters = useMemo(() => () => {
|
|
153
161
|
if (state.user) {
|
|
154
162
|
return UserService.getCurrentUser()
|
|
155
163
|
.then((user) => {
|
|
156
164
|
dispatch({
|
|
157
165
|
type: userActionTypes.UPDATE_USER,
|
|
158
|
-
payload: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
},
|
|
166
|
+
payload: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ unseen_interactions_counter: user.unseen_interactions_counter, unseen_notification_banners_counter: user.unseen_notification_banners_counter }, (user.followers_counter ? { followers_counter: user.followers_counter } : {})), (user.followings_counter ? { followings_counter: user.followings_counter } : {})), (user.categories_counter ? { categories_counter: user.categories_counter } : {})), (user.discussions_counter ? { discussions_counter: user.discussions_counter } : {})), (user.posts_counter ? { posts_counter: user.posts_counter } : {})), (user.statuses_counter ? { status_counter: user.statuses_counter } : {})), (user.polls_counter ? { polls_counter: user.polls_counter } : {})), (user.connections_counter ? { connections_counter: user.connections_counter } : {})), (user.connection_requests_sent_counter ? { connection_requests_sent_counter: user.connection_requests_sent_counter } : {})), (user.connection_requests_received_counter
|
|
167
|
+
? { connection_requests_received_counter: user.connection_requests_received_counter }
|
|
168
|
+
: {})),
|
|
162
169
|
});
|
|
163
170
|
})
|
|
164
171
|
.catch((error) => {
|
|
165
|
-
Logger.error(SCOPE_SC_CORE, `Unable to refresh
|
|
172
|
+
Logger.error(SCOPE_SC_CORE, `Unable to refresh counters. Error: ${error.response.toString()}`);
|
|
166
173
|
});
|
|
167
174
|
}
|
|
168
175
|
return Promise.reject();
|
|
@@ -193,7 +200,7 @@ export default function SCUserProvider({ children }) {
|
|
|
193
200
|
updateUser,
|
|
194
201
|
setUnseenInteractionsCounter,
|
|
195
202
|
setUnseenNotificationBannersCounter,
|
|
196
|
-
|
|
203
|
+
refreshCounters,
|
|
197
204
|
logout,
|
|
198
205
|
refreshSession,
|
|
199
206
|
managers: {
|
|
@@ -203,6 +210,7 @@ export default function SCUserProvider({ children }) {
|
|
|
203
210
|
followers: followersManager,
|
|
204
211
|
connections: connectionsManager,
|
|
205
212
|
incubators: subscribedIncubatorsManager,
|
|
213
|
+
blockedUsers: blockedUsersManager,
|
|
206
214
|
},
|
|
207
215
|
}), [
|
|
208
216
|
state,
|
|
@@ -216,6 +224,7 @@ export default function SCUserProvider({ children }) {
|
|
|
216
224
|
followersManager.followers,
|
|
217
225
|
connectionsManager.loading,
|
|
218
226
|
connectionsManager.connections,
|
|
227
|
+
blockedUsersManager.blocked,
|
|
219
228
|
subscribedIncubatorsManager.loading,
|
|
220
229
|
subscribedIncubatorsManager.incubators,
|
|
221
230
|
]);
|
|
@@ -232,4 +241,3 @@ export default function SCUserProvider({ children }) {
|
|
|
232
241
|
export function useSCUser() {
|
|
233
242
|
return useContext(SCUserContext);
|
|
234
243
|
}
|
|
235
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCVoteContextType } from '../../../types/context';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Vote Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
1. <SCVoteContext.Consumer>{(reactions) => (...)}</SCVoteContext.Consumer>
|
|
11
|
+
```
|
|
12
|
+
```jsx
|
|
13
|
+
2. const scVoteContext: SCVoteContextType = useContext(SCVoteContext);
|
|
14
|
+
```
|
|
15
|
+
```jsx
|
|
16
|
+
3. const scVoteContext: SCVoteContextType = useSCVote();
|
|
17
|
+
````
|
|
18
|
+
:::
|
|
19
|
+
*/
|
|
20
|
+
export declare const SCVoteContext: React.Context<SCVoteContextType>;
|
|
21
|
+
/**
|
|
22
|
+
* #### Description:
|
|
23
|
+
* This component imports all reactions if the feature 'reaction' is enabled.
|
|
24
|
+
* @param children
|
|
25
|
+
* @return
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <SCVoteContext.Provider value={{reactions}}>{!loading && children}</SCVoteContext.Provider>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default function SCVoteProvider({ children }: {
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}): JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Let's only export the `useSCPreferences` hook instead of the context.
|
|
35
|
+
* We only want to use the hook directly and never the context component.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useSCVote(): SCVoteContextType;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { ReactionService } from '@selfcommunity/api-services';
|
|
3
|
+
import { Logger, LRUCache } from '@selfcommunity/utils';
|
|
4
|
+
import { SCOPE_SC_CORE } from '../../../constants/Errors';
|
|
5
|
+
import { useSCContext } from '../SCContextProvider';
|
|
6
|
+
import { SCFeatureName } from '@selfcommunity/types';
|
|
7
|
+
import { getReactionObjectCacheKey, getReactionsObjectCacheKey } from '../../../constants/Cache';
|
|
8
|
+
import { SCPreferencesContext } from '../SCPreferencesProvider';
|
|
9
|
+
/**
|
|
10
|
+
* Creates Vote Context
|
|
11
|
+
*
|
|
12
|
+
:::tipContext can be consumed in one of the following ways:
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
1. <SCVoteContext.Consumer>{(reactions) => (...)}</SCVoteContext.Consumer>
|
|
17
|
+
```
|
|
18
|
+
```jsx
|
|
19
|
+
2. const scVoteContext: SCVoteContextType = useContext(SCVoteContext);
|
|
20
|
+
```
|
|
21
|
+
```jsx
|
|
22
|
+
3. const scVoteContext: SCVoteContextType = useSCVote();
|
|
23
|
+
````
|
|
24
|
+
:::
|
|
25
|
+
*/
|
|
26
|
+
export const SCVoteContext = createContext({});
|
|
27
|
+
/**
|
|
28
|
+
* #### Description:
|
|
29
|
+
* This component imports all reactions if the feature 'reaction' is enabled.
|
|
30
|
+
* @param children
|
|
31
|
+
* @return
|
|
32
|
+
* ```jsx
|
|
33
|
+
* <SCVoteContext.Provider value={{reactions}}>{!loading && children}</SCVoteContext.Provider>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export default function SCVoteProvider({ children = null }) {
|
|
37
|
+
const scContext = useSCContext();
|
|
38
|
+
const scPreferencesContext = useContext(SCPreferencesContext);
|
|
39
|
+
const [reactions] = useState(scContext.settings.vote.reactions);
|
|
40
|
+
const [, setError] = useState();
|
|
41
|
+
const [initialized, setInitialized] = useState(scContext.settings.vote.reactions !== null);
|
|
42
|
+
const [loading, setLoading] = useState(scContext.settings.vote.reactions === null);
|
|
43
|
+
/**
|
|
44
|
+
* Hydrate reactions cache
|
|
45
|
+
* @param data
|
|
46
|
+
*/
|
|
47
|
+
const hydrateCache = (data) => {
|
|
48
|
+
if (data && Array.isArray(data) && data.length) {
|
|
49
|
+
LRUCache.set(getReactionsObjectCacheKey(), data.map((r) => {
|
|
50
|
+
const __reactionCacheKey = getReactionObjectCacheKey(r.id);
|
|
51
|
+
LRUCache.set(__reactionCacheKey, r, { noSsr: false });
|
|
52
|
+
return r.id;
|
|
53
|
+
}), { noSsr: false });
|
|
54
|
+
}
|
|
55
|
+
return data;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Helper to refresh reactions list
|
|
59
|
+
*/
|
|
60
|
+
const refreshReactions = useMemo(() => () => ReactionService.getAllReactionsList().then((data) => {
|
|
61
|
+
return hydrateCache(data);
|
|
62
|
+
}), []);
|
|
63
|
+
/**
|
|
64
|
+
* Initialize component
|
|
65
|
+
* Load all reactions if the feature 'reaction' is enabled
|
|
66
|
+
*/
|
|
67
|
+
const _initComponent = useMemo(() => () => {
|
|
68
|
+
if (!initialized) {
|
|
69
|
+
setInitialized(true);
|
|
70
|
+
setLoading(true);
|
|
71
|
+
refreshReactions()
|
|
72
|
+
.then(() => {
|
|
73
|
+
setLoading(false);
|
|
74
|
+
})
|
|
75
|
+
.catch((_error) => {
|
|
76
|
+
Logger.error(SCOPE_SC_CORE, _error);
|
|
77
|
+
setError(_error);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
hydrateCache(reactions);
|
|
82
|
+
}
|
|
83
|
+
}, [loading, reactions, initialized]);
|
|
84
|
+
// EFFECTS
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
let _t;
|
|
87
|
+
if (scPreferencesContext.features && scPreferencesContext.features.includes(SCFeatureName.REACTION)) {
|
|
88
|
+
_t = setTimeout(_initComponent);
|
|
89
|
+
return () => {
|
|
90
|
+
_t && clearTimeout(_t);
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}, [scPreferencesContext.features]);
|
|
94
|
+
/**
|
|
95
|
+
* Nesting all necessary providers
|
|
96
|
+
* All child components will use help contexts to works
|
|
97
|
+
*/
|
|
98
|
+
return React.createElement(SCVoteContext.Provider, { value: { reactions, refreshReactions } }, initialized && children);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Let's only export the `useSCPreferences` hook instead of the context.
|
|
102
|
+
* We only want to use the hook directly and never the context component.
|
|
103
|
+
*/
|
|
104
|
+
export function useSCVote() {
|
|
105
|
+
return useContext(SCVoteContext);
|
|
106
|
+
}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
1
|
+
import { __rest } from "tslib";
|
|
12
2
|
import React, { useContext } from 'react';
|
|
13
3
|
import { SCRoutingContext } from '../provider/SCRoutingProvider';
|
|
14
4
|
/**
|
|
15
5
|
*
|
|
16
|
-
* Import
|
|
6
|
+
* Import these components:
|
|
17
7
|
* import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
18
8
|
*
|
|
19
9
|
* Example:
|
|
@@ -62,4 +52,3 @@ const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
|
62
52
|
:::
|
|
63
53
|
*/
|
|
64
54
|
export default React.forwardRef(Link);
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -17,10 +17,16 @@ export declare const getCategoriesObjectCacheKey: () => string;
|
|
|
17
17
|
/** CATEGORY OBJECT **/
|
|
18
18
|
export declare const CATEGORY_OBJECT_CACHE_PREFIX_KEY = "_ca_";
|
|
19
19
|
export declare const getCategoryObjectCacheKey: (id: any) => string;
|
|
20
|
+
/** INCUBATOR OBJECT **/
|
|
21
|
+
export declare const INCUBATOR_OBJECT_CACHE_PREFIX_KEY = "_inc_";
|
|
22
|
+
export declare const getIncubatorObjectCacheKey: (id: any) => string;
|
|
20
23
|
/** CONTRIBUTORS **/
|
|
21
24
|
export declare const CONTRIBUTORS_CACHE_PREFIX_KEY = "_contr_";
|
|
22
25
|
export declare const getContributorsCacheKey: (id: any, type: any, next: any) => string;
|
|
23
26
|
export declare const getContributorsCachePrefixKeys: (id: any, type: any) => string;
|
|
27
|
+
/** BROADCAST MESSAGES OBJECT **/
|
|
28
|
+
export declare const BROADCAST_MESSAGES_OBJECT_CACHE_PREFIX_KEY = "_bcms_";
|
|
29
|
+
export declare const getBroadcastMessagesObjectCacheKey: () => string;
|
|
24
30
|
/** FEED **/
|
|
25
31
|
export declare const FEED_CACHE_PREFIX_KEY = "_feed_";
|
|
26
32
|
export declare const getFeedCacheKey: (id: any, next: any) => string;
|
|
@@ -45,18 +51,20 @@ export declare const getPmSnippetsObjectCacheKey: () => string;
|
|
|
45
51
|
export declare const PM_SNIPPET_OBJECT_CACHE_PREFIX_KEY = "_pms_";
|
|
46
52
|
export declare const getPmSnippetObjectCacheKey: (id: any) => string;
|
|
47
53
|
/** TOOLS */
|
|
48
|
-
export declare const CATEGORIES_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = "
|
|
49
|
-
export declare const CATEGORIES_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = "
|
|
50
|
-
export declare const CATEGORIES_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = "
|
|
51
|
-
export declare const CATEGORIES_POPULAR_TOOLS_STATE_CACHE_PREFIX_KEY = "
|
|
52
|
-
export declare const USER_FOLLOWERS_TOOLS_STATE_CACHE_PREFIX_KEY = "
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
55
|
-
export declare const
|
|
56
|
-
export declare const
|
|
57
|
-
export declare const
|
|
58
|
-
export declare const
|
|
59
|
-
export declare const
|
|
60
|
-
export declare const
|
|
61
|
-
export declare const
|
|
62
|
-
|
|
54
|
+
export declare const CATEGORIES_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = "_cListWidget_";
|
|
55
|
+
export declare const CATEGORIES_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = "_cFolWidget_";
|
|
56
|
+
export declare const CATEGORIES_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = "_cSugWidget_";
|
|
57
|
+
export declare const CATEGORIES_POPULAR_TOOLS_STATE_CACHE_PREFIX_KEY = "_cPopWidget_";
|
|
58
|
+
export declare const USER_FOLLOWERS_TOOLS_STATE_CACHE_PREFIX_KEY = "_uFolWidget_";
|
|
59
|
+
export declare const USER_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = "_uFoldWidget_";
|
|
60
|
+
export declare const USER_CONNECTIONS_TOOLS_STATE_CACHE_PREFIX_KEY = "_uConWidget_";
|
|
61
|
+
export declare const USER_CONNECTIONS_REQUESTS_TOOLS_STATE_CACHE_PREFIX_KEY = "_uConReqWidget_";
|
|
62
|
+
export declare const USER_CONNECTIONS_REQUESTS_SENT_TOOLS_STATE_CACHE_PREFIX_KEY = "_uConReqSentWidget_";
|
|
63
|
+
export declare const TRENDING_FEED_TOOLS_STATE_CACHE_PREFIX_KEY = "_fTrendWidget_";
|
|
64
|
+
export declare const RELATED_FEED_TOOLS_STATE_CACHE_PREFIX_KEY = "_rFeedWidget_";
|
|
65
|
+
export declare const TRENDING_PEOPLE_TOOLS_STATE_CACHE_PREFIX_KEY = "_pTrendWidget_";
|
|
66
|
+
export declare const PEOPLE_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = "_pSugWidget_";
|
|
67
|
+
export declare const INCUBATOR_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = "_iListWidget_";
|
|
68
|
+
export declare const INCUBATOR_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = "_iSugWidget_";
|
|
69
|
+
export declare const POLL_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = "_pSugWidget_";
|
|
70
|
+
export declare const getWidgetStateCacheKey: (p: any, id?: any) => string;
|
|
@@ -17,10 +17,16 @@ export const getCategoriesObjectCacheKey = () => `${CATEGORIES_OBJECT_CACHE_PREF
|
|
|
17
17
|
/** CATEGORY OBJECT **/
|
|
18
18
|
export const CATEGORY_OBJECT_CACHE_PREFIX_KEY = '_ca_';
|
|
19
19
|
export const getCategoryObjectCacheKey = (id) => `${CATEGORY_OBJECT_CACHE_PREFIX_KEY}${id}`;
|
|
20
|
+
/** INCUBATOR OBJECT **/
|
|
21
|
+
export const INCUBATOR_OBJECT_CACHE_PREFIX_KEY = '_inc_';
|
|
22
|
+
export const getIncubatorObjectCacheKey = (id) => `${INCUBATOR_OBJECT_CACHE_PREFIX_KEY}${id}`;
|
|
20
23
|
/** CONTRIBUTORS **/
|
|
21
24
|
export const CONTRIBUTORS_CACHE_PREFIX_KEY = '_contr_';
|
|
22
25
|
export const getContributorsCacheKey = (id, type, next) => `${CONTRIBUTORS_CACHE_PREFIX_KEY}${type}_${id}_${next}`;
|
|
23
26
|
export const getContributorsCachePrefixKeys = (id, type) => `${CONTRIBUTORS_CACHE_PREFIX_KEY}${type}_${id}`;
|
|
27
|
+
/** BROADCAST MESSAGES OBJECT **/
|
|
28
|
+
export const BROADCAST_MESSAGES_OBJECT_CACHE_PREFIX_KEY = '_bcms_';
|
|
29
|
+
export const getBroadcastMessagesObjectCacheKey = () => `${BROADCAST_MESSAGES_OBJECT_CACHE_PREFIX_KEY}`;
|
|
24
30
|
/** FEED **/
|
|
25
31
|
// Cache single response body
|
|
26
32
|
export const FEED_CACHE_PREFIX_KEY = '_feed_';
|
|
@@ -51,18 +57,20 @@ export const getPmSnippetsObjectCacheKey = () => `${PM_SNIPPETS_OBJECT_CACHE_PRE
|
|
|
51
57
|
export const PM_SNIPPET_OBJECT_CACHE_PREFIX_KEY = '_pms_';
|
|
52
58
|
export const getPmSnippetObjectCacheKey = (id) => `${PM_SNIPPET_OBJECT_CACHE_PREFIX_KEY}${id}`;
|
|
53
59
|
/** TOOLS */
|
|
54
|
-
export const CATEGORIES_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = '
|
|
55
|
-
export const CATEGORIES_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = '
|
|
56
|
-
export const CATEGORIES_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = '
|
|
57
|
-
export const CATEGORIES_POPULAR_TOOLS_STATE_CACHE_PREFIX_KEY = '
|
|
58
|
-
export const USER_FOLLOWERS_TOOLS_STATE_CACHE_PREFIX_KEY = '
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
|
|
60
|
+
export const CATEGORIES_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = '_cListWidget_';
|
|
61
|
+
export const CATEGORIES_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = '_cFolWidget_';
|
|
62
|
+
export const CATEGORIES_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = '_cSugWidget_';
|
|
63
|
+
export const CATEGORIES_POPULAR_TOOLS_STATE_CACHE_PREFIX_KEY = '_cPopWidget_';
|
|
64
|
+
export const USER_FOLLOWERS_TOOLS_STATE_CACHE_PREFIX_KEY = '_uFolWidget_';
|
|
65
|
+
export const USER_FOLLOWED_TOOLS_STATE_CACHE_PREFIX_KEY = '_uFoldWidget_';
|
|
66
|
+
export const USER_CONNECTIONS_TOOLS_STATE_CACHE_PREFIX_KEY = '_uConWidget_';
|
|
67
|
+
export const USER_CONNECTIONS_REQUESTS_TOOLS_STATE_CACHE_PREFIX_KEY = '_uConReqWidget_';
|
|
68
|
+
export const USER_CONNECTIONS_REQUESTS_SENT_TOOLS_STATE_CACHE_PREFIX_KEY = '_uConReqSentWidget_';
|
|
69
|
+
export const TRENDING_FEED_TOOLS_STATE_CACHE_PREFIX_KEY = '_fTrendWidget_';
|
|
70
|
+
export const RELATED_FEED_TOOLS_STATE_CACHE_PREFIX_KEY = '_rFeedWidget_';
|
|
71
|
+
export const TRENDING_PEOPLE_TOOLS_STATE_CACHE_PREFIX_KEY = '_pTrendWidget_';
|
|
72
|
+
export const PEOPLE_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = '_pSugWidget_';
|
|
73
|
+
export const INCUBATOR_LIST_TOOLS_STATE_CACHE_PREFIX_KEY = '_iListWidget_';
|
|
74
|
+
export const INCUBATOR_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = '_iSugWidget_';
|
|
75
|
+
export const POLL_SUGGESTION_TOOLS_STATE_CACHE_PREFIX_KEY = '_pSugWidget_';
|
|
76
|
+
export const getWidgetStateCacheKey = (p, id = undefined) => `${p}${id !== undefined ? id : ''}`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import SCPreferencesProvider from '../components/provider/SCPreferencesProvider';
|
|
2
|
+
import SCVoteProvider from '../components/provider/SCVoteProvider';
|
|
2
3
|
import SCRoutingProvider from '../components/provider/SCRoutingProvider';
|
|
3
4
|
import SCUserProvider from '../components/provider/SCUserProvider';
|
|
4
5
|
import SCNotificationProvider from '../components/provider/SCNotificationProvider';
|
|
@@ -11,11 +12,11 @@ export const CONTEXT_PROVIDERS_OPTION = 'contextProviders';
|
|
|
11
12
|
*/
|
|
12
13
|
export const DEFAULT_CONTEXT_PROVIDERS = [
|
|
13
14
|
SCPreferencesProvider,
|
|
15
|
+
SCVoteProvider,
|
|
14
16
|
SCRoutingProvider,
|
|
15
17
|
SCUserProvider,
|
|
16
|
-
SCNotificationProvider,
|
|
17
|
-
SCThemeProvider,
|
|
18
18
|
SCLocaleProvider,
|
|
19
|
+
SCThemeProvider,
|
|
19
20
|
SCAlertMessagesProvider,
|
|
21
|
+
SCNotificationProvider,
|
|
20
22
|
];
|
|
21
|
-
//# sourceMappingURL=ContextProviders.js.map
|
|
@@ -3,4 +3,25 @@
|
|
|
3
3
|
* Used in Endpoint (Device)
|
|
4
4
|
*/
|
|
5
5
|
export declare const WEB_PUSH_NOTIFICATION_DEVICE_TYPE = "wp";
|
|
6
|
-
|
|
6
|
+
export declare const ANDROID_PUSH_NOTIFICATION_GCM_DEVICE_TYPE = "gcm";
|
|
7
|
+
export declare const ANDROID_PUSH_NOTIFICATION_FCM_DEVICE_TYPE = "fcm";
|
|
8
|
+
export declare const IOS_PUSH_NOTIFICATION_IOS_DEVICE_TYPE = "apns";
|
|
9
|
+
/**
|
|
10
|
+
* Platform
|
|
11
|
+
*/
|
|
12
|
+
export declare const PLATFORM: {
|
|
13
|
+
ANDROID: string;
|
|
14
|
+
IOS: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const PLATFORMS: any[];
|
|
17
|
+
/**
|
|
18
|
+
* Notifications service
|
|
19
|
+
*/
|
|
20
|
+
export declare const NOTIFICATIONS_SERVICES: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Const to enable native push notification
|
|
23
|
+
*/
|
|
24
|
+
export declare const PLATFORM_KEY = "app-platform";
|
|
25
|
+
export declare const REGISTRATION_ID_KEY = "app-registrationId";
|
|
26
|
+
export declare const NOTIFICATION_SERVICE_KEY = "app-notificationService";
|
|
27
|
+
export declare const DEVICE_ID_KEY = "app-deviceId";
|
|
@@ -3,4 +3,29 @@
|
|
|
3
3
|
* Used in Endpoint (Device)
|
|
4
4
|
*/
|
|
5
5
|
export const WEB_PUSH_NOTIFICATION_DEVICE_TYPE = 'wp';
|
|
6
|
-
|
|
6
|
+
export const ANDROID_PUSH_NOTIFICATION_GCM_DEVICE_TYPE = 'gcm';
|
|
7
|
+
export const ANDROID_PUSH_NOTIFICATION_FCM_DEVICE_TYPE = 'fcm';
|
|
8
|
+
export const IOS_PUSH_NOTIFICATION_IOS_DEVICE_TYPE = 'apns';
|
|
9
|
+
/**
|
|
10
|
+
* Platform
|
|
11
|
+
*/
|
|
12
|
+
export const PLATFORM = {
|
|
13
|
+
ANDROID: 'Android',
|
|
14
|
+
IOS: 'iOS',
|
|
15
|
+
};
|
|
16
|
+
export const PLATFORMS = Object.keys(PLATFORM).map((k) => PLATFORM[k]);
|
|
17
|
+
/**
|
|
18
|
+
* Notifications service
|
|
19
|
+
*/
|
|
20
|
+
export const NOTIFICATIONS_SERVICES = [
|
|
21
|
+
ANDROID_PUSH_NOTIFICATION_GCM_DEVICE_TYPE,
|
|
22
|
+
ANDROID_PUSH_NOTIFICATION_FCM_DEVICE_TYPE,
|
|
23
|
+
IOS_PUSH_NOTIFICATION_IOS_DEVICE_TYPE,
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Const to enable native push notification
|
|
27
|
+
*/
|
|
28
|
+
export const PLATFORM_KEY = 'app-platform';
|
|
29
|
+
export const REGISTRATION_ID_KEY = 'app-registrationId';
|
|
30
|
+
export const NOTIFICATION_SERVICE_KEY = 'app-notificationService';
|
|
31
|
+
export const DEVICE_ID_KEY = 'app-deviceId';
|
|
@@ -3,46 +3,3 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const FEATURES_OPTION = "features";
|
|
5
5
|
export declare const DEFAULT_FEATURES_OPTION: any[];
|
|
6
|
-
/** FEATURES */
|
|
7
|
-
export declare const INTERESTS = "interests";
|
|
8
|
-
export declare const CUSTOMIZE = "customize";
|
|
9
|
-
export declare const ADDONS = "addons";
|
|
10
|
-
export declare const DOMAIN = "domain";
|
|
11
|
-
export declare const SOCIAL_PROVIDERS = "social_providers";
|
|
12
|
-
export declare const COMMUNITY_SUBSCRIPTION = "community_subscription";
|
|
13
|
-
export declare const SEO = "seo";
|
|
14
|
-
export declare const ADVERTISING = "advertising";
|
|
15
|
-
export declare const GOOGLE_CLOUD_API = "google_cloud_api";
|
|
16
|
-
export declare const HOTJAR = "hotjar";
|
|
17
|
-
export declare const SQREEN = "sqreen";
|
|
18
|
-
export declare const INCUBATORS = "incubators";
|
|
19
|
-
export declare const CMS = "cms";
|
|
20
|
-
export declare const LEGAL_PAGES = "legal_pages";
|
|
21
|
-
export declare const SCORING = "scoring";
|
|
22
|
-
export declare const USER_ROLES = "user_roles";
|
|
23
|
-
export declare const EMAIL_MANAGER = "email_manager";
|
|
24
|
-
export declare const LOYALTY = "loyalty";
|
|
25
|
-
export declare const BROADCAST = "broadcast";
|
|
26
|
-
export declare const INVITATION = "invitation";
|
|
27
|
-
export declare const APP_SETTINGS = "app_settings";
|
|
28
|
-
export declare const MODERATION_FLAGS = "moderation_flags";
|
|
29
|
-
export declare const MODERATION_CONTENTS = "moderation_contents";
|
|
30
|
-
export declare const MODERATION_USERS_BLOCKED = "moderation_users_blocked";
|
|
31
|
-
export declare const MODERATION_USERS = "moderation_users";
|
|
32
|
-
export declare const DATA_PROVISIONING_DASHBOARD = "data_provisioning_dashboard";
|
|
33
|
-
export declare const DATA_PROVISIONING_USERS = "data_provisioning_users";
|
|
34
|
-
export declare const DATA_PROVISIONING_CONTENTS = "data_provisioning_contents";
|
|
35
|
-
export declare const DATA_PROVISIONING_INTERESTS = "data_provisioning_interests";
|
|
36
|
-
export declare const DATA_PROVISIONING_POLLS = "data_provisioning_polls";
|
|
37
|
-
export declare const DATA_PROVISIONING_REPORTS = "data_provisioning_reports";
|
|
38
|
-
export declare const REGISTRATION_ALERTS = "registration_alerts";
|
|
39
|
-
export declare const SOCIAL_SHARE = "social_share";
|
|
40
|
-
export declare const FEED_SETTINGS = "stream_settings";
|
|
41
|
-
export declare const TAGGING = "tagging";
|
|
42
|
-
export declare const API_V2 = "api_v2";
|
|
43
|
-
export declare const WEBHOOK = "webhook";
|
|
44
|
-
export declare const HEADLESS = "headless";
|
|
45
|
-
export declare const CUSTOMIZE_HEADLESS = "customize_headless";
|
|
46
|
-
export declare const SYSTEM_PAGES = "system_pages";
|
|
47
|
-
export declare const REACTION = "reaction";
|
|
48
|
-
//# sourceMappingURL=Features.d.ts.map
|