@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.
- package/LICENSE.md +21 -0
- package/README.md +13 -0
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +67 -0
- package/lib/cjs/components/provider/SCContextProvider/index.js +117 -0
- package/lib/cjs/components/provider/SCLocaleProvider/index.js +158 -0
- package/lib/cjs/components/provider/SCNotificationProvider/index.js +73 -0
- package/lib/cjs/components/provider/SCPreferencesProvider/index.js +93 -0
- package/lib/cjs/components/provider/SCRoutingProvider/index.js +146 -0
- package/lib/cjs/components/provider/SCThemeProvider/index.js +123 -0
- package/lib/cjs/components/provider/SCUserProvider/index.js +310 -0
- package/lib/cjs/components/router/index.js +91 -0
- package/lib/cjs/constants/Actions.js +6 -0
- package/lib/cjs/constants/ContextProviders.js +29 -0
- package/lib/cjs/constants/Device.js +11 -0
- package/lib/cjs/constants/Errors.js +10 -0
- package/lib/cjs/constants/Features.js +84 -0
- package/lib/cjs/constants/Locale.js +19 -0
- package/lib/cjs/constants/Notification.js +67 -0
- package/lib/cjs/constants/Notifications.js +27 -0
- package/lib/cjs/constants/Preferences.js +344 -0
- package/lib/cjs/constants/Routes.js +68 -0
- package/lib/cjs/constants/Session.js +22 -0
- package/lib/cjs/constants/Theme.js +6 -0
- package/lib/cjs/constants/WebSocket.js +10 -0
- package/lib/cjs/hooks/useSCAuth.js +340 -0
- package/lib/cjs/hooks/useSCCachingManager.js +58 -0
- package/lib/cjs/hooks/useSCConnectionsManager.js +285 -0
- package/lib/cjs/hooks/useSCFetchCategories.js +71 -0
- package/lib/cjs/hooks/useSCFetchCategory.js +68 -0
- package/lib/cjs/hooks/useSCFetchCommentObject.js +68 -0
- package/lib/cjs/hooks/useSCFetchCommentObjects.js +296 -0
- package/lib/cjs/hooks/useSCFetchCustomAdv.js +84 -0
- package/lib/cjs/hooks/useSCFetchFeedObject.js +79 -0
- package/lib/cjs/hooks/useSCFetchIncubator.js +68 -0
- package/lib/cjs/hooks/useSCFetchTag.js +68 -0
- package/lib/cjs/hooks/useSCFetchUser.js +68 -0
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +162 -0
- package/lib/cjs/hooks/useSCFollowersManager.js +232 -0
- package/lib/cjs/hooks/useSCMediaClick.js +27 -0
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +165 -0
- package/lib/cjs/hooks/useSCWebPushMessaging.js +286 -0
- package/lib/cjs/hooks/useSCWebSocket.js +120 -0
- package/lib/cjs/index.js +169 -0
- package/lib/cjs/scss/styles.scss +1 -0
- package/lib/cjs/themes/theme.js +165 -0
- package/lib/cjs/types/context.js +3 -0
- package/lib/cjs/types/index.js +22 -0
- package/lib/cjs/utils/errors.js +196 -0
- package/lib/cjs/utils/locale.js +56 -0
- package/lib/cjs/utils/logger.js +32 -0
- package/lib/cjs/utils/object.js +44 -0
- package/lib/cjs/utils/session.js +17 -0
- package/lib/cjs/utils/string.js +57 -0
- package/lib/cjs/utils/url.js +70 -0
- package/lib/cjs/utils/user.js +83 -0
- package/lib/cjs/utils/validator.js +771 -0
- package/lib/cjs/utils/webPushMessaging.js +110 -0
- package/lib/cjs/utils/websocket.js +307 -0
- package/lib/esm/api-services/src/client/index.d.ts +115 -0
- package/lib/esm/api-services/src/client/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/constants/Endpoints.d.ts +10 -0
- package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -0
- package/lib/esm/api-services/src/index.d.ts +24 -0
- package/lib/esm/api-services/src/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/category/index.d.ts +13 -0
- package/lib/esm/api-services/src/services/category/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/feature/index.d.ts +10 -0
- package/lib/esm/api-services/src/services/feature/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/preference/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/preference/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/user/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/user/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/http.d.ts +6 -0
- package/lib/esm/api-services/src/utils/http.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/token.d.ts +16 -0
- package/lib/esm/api-services/src/utils/token.d.ts.map +1 -0
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +67 -0
- package/lib/esm/components/provider/SCContextProvider/index.js +117 -0
- package/lib/esm/components/provider/SCLocaleProvider/index.js +158 -0
- package/lib/esm/components/provider/SCNotificationProvider/index.js +73 -0
- package/lib/esm/components/provider/SCPreferencesProvider/index.js +93 -0
- package/lib/esm/components/provider/SCRoutingProvider/index.js +146 -0
- package/lib/esm/components/provider/SCThemeProvider/index.js +123 -0
- package/lib/esm/components/provider/SCUserProvider/index.js +310 -0
- package/lib/esm/components/router/index.js +91 -0
- package/lib/esm/constants/Actions.js +6 -0
- package/lib/esm/constants/ContextProviders.js +29 -0
- package/lib/esm/constants/Device.js +11 -0
- package/lib/esm/constants/Errors.js +10 -0
- package/lib/esm/constants/Features.js +84 -0
- package/lib/esm/constants/Locale.js +19 -0
- package/lib/esm/constants/Notification.js +67 -0
- package/lib/esm/constants/Notifications.js +27 -0
- package/lib/esm/constants/Preferences.js +344 -0
- package/lib/esm/constants/Routes.js +68 -0
- package/lib/esm/constants/Session.js +22 -0
- package/lib/esm/constants/Theme.js +6 -0
- package/lib/esm/constants/WebSocket.js +10 -0
- package/lib/esm/hooks/useSCAuth.js +340 -0
- package/lib/esm/hooks/useSCCachingManager.js +58 -0
- package/lib/esm/hooks/useSCConnectionsManager.js +285 -0
- package/lib/esm/hooks/useSCFetchCategories.js +71 -0
- package/lib/esm/hooks/useSCFetchCategory.js +68 -0
- package/lib/esm/hooks/useSCFetchCommentObject.js +68 -0
- package/lib/esm/hooks/useSCFetchCommentObjects.js +296 -0
- package/lib/esm/hooks/useSCFetchCustomAdv.js +84 -0
- package/lib/esm/hooks/useSCFetchFeedObject.js +79 -0
- package/lib/esm/hooks/useSCFetchIncubator.js +68 -0
- package/lib/esm/hooks/useSCFetchTag.js +68 -0
- package/lib/esm/hooks/useSCFetchUser.js +68 -0
- package/lib/esm/hooks/useSCFollowedCategoriesManager.js +162 -0
- package/lib/esm/hooks/useSCFollowersManager.js +232 -0
- package/lib/esm/hooks/useSCMediaClick.js +27 -0
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +165 -0
- package/lib/esm/hooks/useSCWebPushMessaging.js +286 -0
- package/lib/esm/hooks/useSCWebSocket.js +120 -0
- package/lib/esm/index.js +169 -0
- package/lib/esm/react-core/src/components/provider/SCAlertMessagesProvider/index.d.ts +37 -0
- package/lib/esm/react-core/src/components/provider/SCAlertMessagesProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCContextProvider/index.d.ts +35 -0
- package/lib/esm/react-core/src/components/provider/SCContextProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCLocaleProvider/index.d.ts +42 -0
- package/lib/esm/react-core/src/components/provider/SCLocaleProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCNotificationProvider/index.d.ts +37 -0
- package/lib/esm/react-core/src/components/provider/SCNotificationProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCPreferencesProvider/index.d.ts +38 -0
- package/lib/esm/react-core/src/components/provider/SCPreferencesProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCRoutingProvider/index.d.ts +39 -0
- package/lib/esm/react-core/src/components/provider/SCRoutingProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCThemeProvider/index.d.ts +49 -0
- package/lib/esm/react-core/src/components/provider/SCThemeProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/provider/SCUserProvider/index.d.ts +38 -0
- package/lib/esm/react-core/src/components/provider/SCUserProvider/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/components/router/index.d.ts +34 -0
- package/lib/esm/react-core/src/components/router/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Actions.d.ts +2 -0
- package/lib/esm/react-core/src/constants/Actions.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/ContextProviders.d.ts +6 -0
- package/lib/esm/react-core/src/constants/ContextProviders.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Device.d.ts +6 -0
- package/lib/esm/react-core/src/constants/Device.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Errors.d.ts +5 -0
- package/lib/esm/react-core/src/constants/Errors.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Features.d.ts +41 -0
- package/lib/esm/react-core/src/constants/Features.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Locale.d.ts +8 -0
- package/lib/esm/react-core/src/constants/Locale.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Notification.d.ts +55 -0
- package/lib/esm/react-core/src/constants/Notification.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Notifications.d.ts +11 -0
- package/lib/esm/react-core/src/constants/Notifications.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Routes.d.ts +29 -0
- package/lib/esm/react-core/src/constants/Routes.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Session.d.ts +10 -0
- package/lib/esm/react-core/src/constants/Session.d.ts.map +1 -0
- package/lib/esm/react-core/src/constants/Theme.d.ts +2 -0
- package/lib/esm/react-core/src/constants/Theme.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCAuth.d.ts +56 -0
- package/lib/esm/react-core/src/hooks/useSCAuth.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCCachingManager.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCCachingManager.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCConnectionsManager.d.ts +40 -0
- package/lib/esm/react-core/src/hooks/useSCConnectionsManager.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCategories.d.ts +17 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCategories.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCategory.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCategory.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObject.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObject.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts +54 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCustomAdv.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchCustomAdv.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchFeedObject.d.ts +21 -0
- package/lib/esm/react-core/src/hooks/useSCFetchFeedObject.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchIncubator.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchIncubator.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchTag.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchTag.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFetchUser.d.ts +19 -0
- package/lib/esm/react-core/src/hooks/useSCFetchUser.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFollowedCategoriesManager.d.ts +37 -0
- package/lib/esm/react-core/src/hooks/useSCFollowedCategoriesManager.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCFollowersManager.d.ts +37 -0
- package/lib/esm/react-core/src/hooks/useSCFollowersManager.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCMediaClick.d.ts +4 -0
- package/lib/esm/react-core/src/hooks/useSCMediaClick.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCSubscribedIncubatorsManager.d.ts +27 -0
- package/lib/esm/react-core/src/hooks/useSCSubscribedIncubatorsManager.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCWebPushMessaging.d.ts +9 -0
- package/lib/esm/react-core/src/hooks/useSCWebPushMessaging.d.ts.map +1 -0
- package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts +12 -0
- package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts.map +1 -0
- package/lib/esm/react-core/src/index.d.ts +77 -0
- package/lib/esm/react-core/src/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/types/context.d.ts +428 -0
- package/lib/esm/react-core/src/types/context.d.ts.map +1 -0
- package/lib/esm/react-core/src/types/index.d.ts +3 -0
- package/lib/esm/react-core/src/types/index.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/errors.d.ts +98 -0
- package/lib/esm/react-core/src/utils/errors.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/locale.d.ts +10 -0
- package/lib/esm/react-core/src/utils/locale.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/logger.d.ts +11 -0
- package/lib/esm/react-core/src/utils/logger.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/object.d.ts +13 -0
- package/lib/esm/react-core/src/utils/object.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/session.d.ts +6 -0
- package/lib/esm/react-core/src/utils/session.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/string.d.ts +21 -0
- package/lib/esm/react-core/src/utils/string.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/url.d.ts +22 -0
- package/lib/esm/react-core/src/utils/url.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/user.d.ts +41 -0
- package/lib/esm/react-core/src/utils/user.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/validator.d.ts +239 -0
- package/lib/esm/react-core/src/utils/validator.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/webPushMessaging.d.ts +14 -0
- package/lib/esm/react-core/src/utils/webPushMessaging.d.ts.map +1 -0
- package/lib/esm/react-core/src/utils/websocket.d.ts +177 -0
- package/lib/esm/react-core/src/utils/websocket.d.ts.map +1 -0
- package/lib/esm/react-i18n/src/index.d.ts +815 -0
- package/lib/esm/react-i18n/src/index.d.ts.map +1 -0
- package/lib/esm/scss/styles.scss +1 -0
- package/lib/esm/themes/theme.js +165 -0
- package/lib/esm/types/context.js +3 -0
- package/lib/esm/types/index.js +22 -0
- package/lib/esm/types/src/index.d.ts +9 -0
- package/lib/esm/types/src/index.d.ts.map +1 -0
- package/lib/esm/types/src/types/auth.d.ts +26 -0
- package/lib/esm/types/src/types/auth.d.ts.map +1 -0
- package/lib/esm/types/src/types/broadcastMessage.d.ts +73 -0
- package/lib/esm/types/src/types/broadcastMessage.d.ts.map +1 -0
- package/lib/esm/types/src/types/category.d.ts +100 -0
- package/lib/esm/types/src/types/category.d.ts.map +1 -0
- package/lib/esm/types/src/types/comment.d.ts +97 -0
- package/lib/esm/types/src/types/comment.d.ts.map +1 -0
- package/lib/esm/types/src/types/customAdv.d.ts +53 -0
- package/lib/esm/types/src/types/customAdv.d.ts.map +1 -0
- package/lib/esm/types/src/types/customNotification.d.ts +28 -0
- package/lib/esm/types/src/types/customNotification.d.ts.map +1 -0
- package/lib/esm/types/src/types/embed.d.ts +33 -0
- package/lib/esm/types/src/types/embed.d.ts.map +1 -0
- package/lib/esm/types/src/types/feed.d.ts +208 -0
- package/lib/esm/types/src/types/feed.d.ts.map +1 -0
- package/lib/esm/types/src/types/incubator.d.ts +53 -0
- package/lib/esm/types/src/types/incubator.d.ts.map +1 -0
- package/lib/esm/types/src/types/index.d.ts +22 -0
- package/lib/esm/types/src/types/index.d.ts.map +1 -0
- package/lib/esm/types/src/types/location.d.ts +61 -0
- package/lib/esm/types/src/types/location.d.ts.map +1 -0
- package/lib/esm/types/src/types/media.d.ts +52 -0
- package/lib/esm/types/src/types/media.d.ts.map +1 -0
- package/lib/esm/types/src/types/notification.d.ts +416 -0
- package/lib/esm/types/src/types/notification.d.ts.map +1 -0
- package/lib/esm/types/src/types/poll.d.ts +77 -0
- package/lib/esm/types/src/types/poll.d.ts.map +1 -0
- package/lib/esm/types/src/types/privateMessage.d.ts +109 -0
- package/lib/esm/types/src/types/privateMessage.d.ts.map +1 -0
- package/lib/esm/types/src/types/prize.d.ts +48 -0
- package/lib/esm/types/src/types/prize.d.ts.map +1 -0
- package/lib/esm/types/src/types/tag.d.ts +47 -0
- package/lib/esm/types/src/types/tag.d.ts.map +1 -0
- package/lib/esm/types/src/types/user.d.ts +227 -0
- package/lib/esm/types/src/types/user.d.ts.map +1 -0
- package/lib/esm/utils/errors.js +196 -0
- package/lib/esm/utils/locale.js +56 -0
- package/lib/esm/utils/logger.js +32 -0
- package/lib/esm/utils/object.js +44 -0
- package/lib/esm/utils/session.js +17 -0
- package/lib/esm/utils/src/index.d.ts +7 -0
- package/lib/esm/utils/src/index.d.ts.map +1 -0
- package/lib/esm/utils/src/utils/string.d.ts +21 -0
- package/lib/esm/utils/src/utils/string.d.ts.map +1 -0
- package/lib/esm/utils/src/utils/url.d.ts +22 -0
- package/lib/esm/utils/src/utils/url.d.ts.map +1 -0
- package/lib/esm/utils/string.js +57 -0
- package/lib/esm/utils/url.js +70 -0
- package/lib/esm/utils/user.js +83 -0
- package/lib/esm/utils/validator.js +771 -0
- package/lib/esm/utils/webPushMessaging.js +110 -0
- package/lib/esm/utils/websocket.js +307 -0
- package/lib/umd/react-core.js +2 -0
- package/lib/umd/react-core.js.LICENSE.txt +1 -0
- package/package.json +128 -0
package/lib/esm/index.js
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.UserUtils = exports.UrlUtils = exports.StringUtils = exports.SCRoutes = exports.SCPreferences = exports.SCNotification = exports.SCFeatures = exports.ObjectUtils = exports.Locale = void 0;
|
|
5
|
+
|
|
6
|
+
var _types = require("./types");
|
|
7
|
+
|
|
8
|
+
exports.SCUserContextType = _types.SCUserContextType;
|
|
9
|
+
exports.SCFollowedCategoriesManagerType = _types.SCFollowedCategoriesManagerType;
|
|
10
|
+
exports.SCContextProviderType = _types.SCContextProviderType;
|
|
11
|
+
exports.SCContextType = _types.SCContextType;
|
|
12
|
+
exports.SCSettingsType = _types.SCSettingsType;
|
|
13
|
+
exports.SCSessionType = _types.SCSessionType;
|
|
14
|
+
exports.SCFollowedManagerType = _types.SCFollowedManagerType;
|
|
15
|
+
exports.SCConnectionsManagerType = _types.SCConnectionsManagerType;
|
|
16
|
+
exports.SCSubscribedIncubatorsManagerType = _types.SCSubscribedIncubatorsManagerType;
|
|
17
|
+
exports.SCLocaleType = _types.SCLocaleType;
|
|
18
|
+
exports.SCNotificationContextType = _types.SCNotificationContextType;
|
|
19
|
+
exports.SCPreferencesContextType = _types.SCPreferencesContextType;
|
|
20
|
+
exports.SCThemeContextType = _types.SCThemeContextType;
|
|
21
|
+
exports.SCRoutingContextType = _types.SCRoutingContextType;
|
|
22
|
+
exports.SCLocaleContextType = _types.SCLocaleContextType;
|
|
23
|
+
exports.SCAlertMessagesContextType = _types.SCAlertMessagesContextType;
|
|
24
|
+
|
|
25
|
+
var _SCContextProvider = _interopRequireWildcard(require("./components/provider/SCContextProvider"));
|
|
26
|
+
|
|
27
|
+
exports.SCContextProvider = _SCContextProvider.default;
|
|
28
|
+
exports.SCContext = _SCContextProvider.SCContext;
|
|
29
|
+
exports.useSCContext = _SCContextProvider.useSCContext;
|
|
30
|
+
|
|
31
|
+
var _SCUserProvider = _interopRequireWildcard(require("./components/provider/SCUserProvider"));
|
|
32
|
+
|
|
33
|
+
exports.SCUserProvider = _SCUserProvider.default;
|
|
34
|
+
exports.SCUserContext = _SCUserProvider.SCUserContext;
|
|
35
|
+
exports.useSCUser = _SCUserProvider.useSCUser;
|
|
36
|
+
|
|
37
|
+
var _SCThemeProvider = _interopRequireWildcard(require("./components/provider/SCThemeProvider"));
|
|
38
|
+
|
|
39
|
+
exports.SCThemeProvider = _SCThemeProvider.default;
|
|
40
|
+
exports.SCThemeContext = _SCThemeProvider.SCThemeContext;
|
|
41
|
+
exports.useSCTheme = _SCThemeProvider.useSCTheme;
|
|
42
|
+
exports.withSCTheme = _SCThemeProvider.withSCTheme;
|
|
43
|
+
|
|
44
|
+
var _SCRoutingProvider = _interopRequireWildcard(require("./components/provider/SCRoutingProvider"));
|
|
45
|
+
|
|
46
|
+
exports.SCRoutingProvider = _SCRoutingProvider.default;
|
|
47
|
+
exports.SCRoutingContext = _SCRoutingProvider.SCRoutingContext;
|
|
48
|
+
exports.useSCRouting = _SCRoutingProvider.useSCRouting;
|
|
49
|
+
|
|
50
|
+
var _SCLocaleProvider = _interopRequireWildcard(require("./components/provider/SCLocaleProvider"));
|
|
51
|
+
|
|
52
|
+
exports.SCLocaleProvider = _SCLocaleProvider.default;
|
|
53
|
+
exports.SCLocaleContext = _SCLocaleProvider.SCLocaleContext;
|
|
54
|
+
exports.useSCLocale = _SCLocaleProvider.useSCLocale;
|
|
55
|
+
exports.withSCLocale = _SCLocaleProvider.withSCLocale;
|
|
56
|
+
|
|
57
|
+
var _SCNotificationProvider = _interopRequireWildcard(require("./components/provider/SCNotificationProvider"));
|
|
58
|
+
|
|
59
|
+
exports.SCNotificationProvider = _SCNotificationProvider.default;
|
|
60
|
+
exports.SCNotificationContext = _SCNotificationProvider.SCNotificationContext;
|
|
61
|
+
exports.useSCNotification = _SCNotificationProvider.useSCNotification;
|
|
62
|
+
|
|
63
|
+
var _SCAlertMessagesProvider = _interopRequireWildcard(require("./components/provider/SCAlertMessagesProvider"));
|
|
64
|
+
|
|
65
|
+
exports.SCAlertMessagesProvider = _SCAlertMessagesProvider.default;
|
|
66
|
+
exports.SCAlertMessagesContext = _SCAlertMessagesProvider.SCAlertMessagesContext;
|
|
67
|
+
exports.useSCAlertMessages = _SCAlertMessagesProvider.useSCAlertMessages;
|
|
68
|
+
|
|
69
|
+
var _SCPreferencesProvider = _interopRequireWildcard(require("./components/provider/SCPreferencesProvider"));
|
|
70
|
+
|
|
71
|
+
exports.SCPreferencesProvider = _SCPreferencesProvider.default;
|
|
72
|
+
exports.SCPreferencesContext = _SCPreferencesProvider.SCPreferencesContext;
|
|
73
|
+
exports.useSCPreferences = _SCPreferencesProvider.useSCPreferences;
|
|
74
|
+
|
|
75
|
+
var SCPreferences = _interopRequireWildcard(require("./constants/Preferences"));
|
|
76
|
+
|
|
77
|
+
exports.SCPreferences = SCPreferences;
|
|
78
|
+
|
|
79
|
+
var SCFeatures = _interopRequireWildcard(require("./constants/Features"));
|
|
80
|
+
|
|
81
|
+
exports.SCFeatures = SCFeatures;
|
|
82
|
+
|
|
83
|
+
var SCNotification = _interopRequireWildcard(require("./constants/Notification"));
|
|
84
|
+
|
|
85
|
+
exports.SCNotification = SCNotification;
|
|
86
|
+
|
|
87
|
+
var _useSCFetchUser = _interopRequireDefault(require("./hooks/useSCFetchUser"));
|
|
88
|
+
|
|
89
|
+
exports.useSCFetchUser = _useSCFetchUser.default;
|
|
90
|
+
|
|
91
|
+
var _useSCFetchFeedObject = _interopRequireDefault(require("./hooks/useSCFetchFeedObject"));
|
|
92
|
+
|
|
93
|
+
exports.useSCFetchFeedObject = _useSCFetchFeedObject.default;
|
|
94
|
+
|
|
95
|
+
var _useSCFetchCommentObject = _interopRequireDefault(require("./hooks/useSCFetchCommentObject"));
|
|
96
|
+
|
|
97
|
+
exports.useSCFetchCommentObject = _useSCFetchCommentObject.default;
|
|
98
|
+
|
|
99
|
+
var _useSCFetchCommentObjects = _interopRequireDefault(require("./hooks/useSCFetchCommentObjects"));
|
|
100
|
+
|
|
101
|
+
exports.useSCFetchCommentObjects = _useSCFetchCommentObjects.default;
|
|
102
|
+
|
|
103
|
+
var _useSCFetchCustomAdv = _interopRequireDefault(require("./hooks/useSCFetchCustomAdv"));
|
|
104
|
+
|
|
105
|
+
exports.useSCFetchCustomAdv = _useSCFetchCustomAdv.default;
|
|
106
|
+
|
|
107
|
+
var _useSCFetchTag = _interopRequireDefault(require("./hooks/useSCFetchTag"));
|
|
108
|
+
|
|
109
|
+
exports.useSCFetchTag = _useSCFetchTag.default;
|
|
110
|
+
|
|
111
|
+
var _useSCFetchCategory = _interopRequireDefault(require("./hooks/useSCFetchCategory"));
|
|
112
|
+
|
|
113
|
+
exports.useSCFetchCategory = _useSCFetchCategory.default;
|
|
114
|
+
|
|
115
|
+
var _useSCFetchCategories = _interopRequireDefault(require("./hooks/useSCFetchCategories"));
|
|
116
|
+
|
|
117
|
+
exports.useSCFetchCategories = _useSCFetchCategories.default;
|
|
118
|
+
|
|
119
|
+
var _useSCFetchIncubator = _interopRequireDefault(require("./hooks/useSCFetchIncubator"));
|
|
120
|
+
|
|
121
|
+
exports.useSCFetchIncubator = _useSCFetchIncubator.default;
|
|
122
|
+
|
|
123
|
+
var _useSCMediaClick = _interopRequireDefault(require("./hooks/useSCMediaClick"));
|
|
124
|
+
|
|
125
|
+
exports.useSCMediaClick = _useSCMediaClick.default;
|
|
126
|
+
|
|
127
|
+
var _router = _interopRequireDefault(require("./components/router"));
|
|
128
|
+
|
|
129
|
+
exports.Link = _router.default;
|
|
130
|
+
|
|
131
|
+
var SCRoutes = _interopRequireWildcard(require("./constants/Routes"));
|
|
132
|
+
|
|
133
|
+
exports.SCRoutes = SCRoutes;
|
|
134
|
+
|
|
135
|
+
var _logger = require("./utils/logger");
|
|
136
|
+
|
|
137
|
+
exports.Logger = _logger.Logger;
|
|
138
|
+
|
|
139
|
+
var StringUtils = _interopRequireWildcard(require("./utils/string"));
|
|
140
|
+
|
|
141
|
+
exports.StringUtils = StringUtils;
|
|
142
|
+
|
|
143
|
+
var ObjectUtils = _interopRequireWildcard(require("./utils/object"));
|
|
144
|
+
|
|
145
|
+
exports.ObjectUtils = ObjectUtils;
|
|
146
|
+
|
|
147
|
+
var UrlUtils = _interopRequireWildcard(require("./utils/url"));
|
|
148
|
+
|
|
149
|
+
exports.UrlUtils = UrlUtils;
|
|
150
|
+
|
|
151
|
+
var UserUtils = _interopRequireWildcard(require("./utils/user"));
|
|
152
|
+
|
|
153
|
+
exports.UserUtils = UserUtils;
|
|
154
|
+
|
|
155
|
+
var _websocket = _interopRequireWildcard(require("./utils/websocket"));
|
|
156
|
+
|
|
157
|
+
exports.WSClient = _websocket.default;
|
|
158
|
+
exports.WSClientType = _websocket.WSClientType;
|
|
159
|
+
exports.WSClientPropTypes = _websocket.WSClientPropTypes;
|
|
160
|
+
|
|
161
|
+
var Locale = _interopRequireWildcard(require("./constants/Locale"));
|
|
162
|
+
|
|
163
|
+
exports.Locale = Locale;
|
|
164
|
+
|
|
165
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
166
|
+
|
|
167
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
168
|
+
|
|
169
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCAlertMessagesContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
```jsx
|
|
8
|
+
1. <SCAlertMessagesContext.Consumer>{(options,) => (...)}</SCAlertMessagesContext.Consumer>
|
|
9
|
+
```
|
|
10
|
+
```jsx
|
|
11
|
+
2. const scAlertMessagesContext: SCAlertMessagesContextType = useContext(SCAlertMessagesContext)
|
|
12
|
+
```
|
|
13
|
+
```jsx
|
|
14
|
+
3. const scAlertMessagesContext: SCAlertMessagesContextType = useSCAlertMessages();
|
|
15
|
+
````
|
|
16
|
+
:::
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
export declare const SCAlertMessagesContext: React.Context<SCAlertMessagesContextType>;
|
|
20
|
+
/**
|
|
21
|
+
* #### Description:
|
|
22
|
+
* This component makes the `intl` available down the React tree.
|
|
23
|
+
* @param children
|
|
24
|
+
* @return
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SCAlertMessagesContext.Provider value={{options}}>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function SCAlertMessagesProvider({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Let's only export the `useSCAlertMessages` hook instead of the context.
|
|
34
|
+
* We only want to use the hook directly and never the context component.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useSCAlertMessages(): SCAlertMessagesContextType;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCAlertMessagesProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AACjE,OAAO,EAAC,0BAA0B,EAAC,MAAM,gBAAgB,CAAC;AAG1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,2CAA8E,CAAC;AAElH;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAQ3G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,0BAA0B,CAE/D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCContextProviderType, SCContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
```jsx
|
|
8
|
+
1. <SCContext.Consumer>{settings => (...)}</SCContext.Consumer>
|
|
9
|
+
```
|
|
10
|
+
```jsx
|
|
11
|
+
2. const scContext: SCContextType = useContext(SCContext);
|
|
12
|
+
```
|
|
13
|
+
```jsx
|
|
14
|
+
3. const scContext: SCContextType = useSCContext();
|
|
15
|
+
````
|
|
16
|
+
:::
|
|
17
|
+
*/
|
|
18
|
+
export declare const SCContext: React.Context<SCContextType>;
|
|
19
|
+
/**
|
|
20
|
+
* This component imports all providers
|
|
21
|
+
* @param object
|
|
22
|
+
* @param object.conf
|
|
23
|
+
* @param object.children
|
|
24
|
+
* @return
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SCContext.Provider value={{settings}}>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function SCContextProvider({ conf, children }: SCContextProviderType): JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* Let's only export the `useSCContext` hook instead of the context.
|
|
32
|
+
* We only want to use the hook directly and never the context component.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useSCContext(): SCContextType;
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCContextProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,EAAC,qBAAqB,EAAE,aAAa,EAAiB,MAAM,gBAAgB,CAAC;AAEpF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,8BAAoD,CAAC;AAE3E;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAmD9F;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAE5C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCLocaleContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
```jsx
|
|
9
|
+
1. <SCLocaleContext.Consumer>{(locale,) => (...)}</SCLocaleContext.Consumer>
|
|
10
|
+
```
|
|
11
|
+
```jsx
|
|
12
|
+
2. const scLocaleContext: SCLocaleContextType = useContext(SCLocaleContext);
|
|
13
|
+
```
|
|
14
|
+
```jsx
|
|
15
|
+
3. const scLocaleContext: SCLocaleContextType = useSCLocale();
|
|
16
|
+
````
|
|
17
|
+
:::
|
|
18
|
+
*/
|
|
19
|
+
export declare const SCLocaleContext: React.Context<SCLocaleContextType>;
|
|
20
|
+
/**
|
|
21
|
+
* #### Description:
|
|
22
|
+
* This component makes the `intl` available down the React tree.
|
|
23
|
+
* @param children
|
|
24
|
+
* @return
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SCLocaleContext.Provider value={{locale, messages, selectLocale}}>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function SCLocaleProvider({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Export hoc to inject the base theme to components
|
|
34
|
+
* @param Component
|
|
35
|
+
*/
|
|
36
|
+
export declare const withSCLocale: (Component: any) => (props: any) => JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Let's only export the `useSCLocale` hook instead of the context.
|
|
39
|
+
* We only want to use the hook directly and never the context component.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useSCLocale(): SCLocaleContextType;
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCLocaleProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAgB,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;AASlE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,oCAAgE,CAAC;AAE7F;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAqDpG;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,iDAOxB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,WAAW,IAAI,mBAAmB,CAEjD"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCNotificationContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
```jsx
|
|
9
|
+
1. <SCNotificationContext.Consumer>{(wsInstance, subscribe,) => (...)}</SCNotificationContext.Consumer>
|
|
10
|
+
```
|
|
11
|
+
```jsx
|
|
12
|
+
2. const scNotificationContext: SCNotificationContextType = useContext(SCNotificationContext);
|
|
13
|
+
```
|
|
14
|
+
```jsx
|
|
15
|
+
3. const scNotificationContext: SCNotificationContextType = useSCNotification();
|
|
16
|
+
````
|
|
17
|
+
:::
|
|
18
|
+
*/
|
|
19
|
+
export declare const SCNotificationContext: React.Context<SCNotificationContextType>;
|
|
20
|
+
/**
|
|
21
|
+
* #### Description:
|
|
22
|
+
* This component makes the notification context available down the React tree.
|
|
23
|
+
* @param children
|
|
24
|
+
* @return
|
|
25
|
+
* ```jsx
|
|
26
|
+
* <SCNotificationContext.Provider value={{wsInstance}}>{children}</SCNotificationContext.Provider>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export default function SCNotificationProvider({ children }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
}): JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Let's only export the `useSCNotification` hook instead of the context.
|
|
34
|
+
* We only want to use the hook directly and never the context component.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useSCNotification(): SCNotificationContextType;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCNotificationProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,gBAAgB,CAAC;AAIzD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,0CAA4E,CAAC;AAE/G;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAK1G;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,yBAAyB,CAE7D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCPreferencesContextType } from '../../../types/context';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Preferences/Features Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
1. <SCPreferencesContext.Consumer>{(preferences) => (...)}</SCPreferencesContext.Consumer>
|
|
11
|
+
```
|
|
12
|
+
```jsx
|
|
13
|
+
2. const scPreferences: SCPreferencesType = usePreferencesContext(SCPreferencesContext);
|
|
14
|
+
```
|
|
15
|
+
```jsx
|
|
16
|
+
3. const scPreferences: SCPreferencesType = useSCPreferences();
|
|
17
|
+
````
|
|
18
|
+
:::
|
|
19
|
+
*/
|
|
20
|
+
export declare const SCPreferencesContext: React.Context<SCPreferencesContextType>;
|
|
21
|
+
/**
|
|
22
|
+
* #### Description:
|
|
23
|
+
* This component imports all preferences and features enabled.
|
|
24
|
+
* @param children
|
|
25
|
+
* @return
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <SCPreferencesContext.Provider value={{preferences, features}}>{!loading && children}</SCPreferencesContext.Provider>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default function SCPreferencesProvider({ 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 useSCPreferences(): SCPreferencesContextType;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCPreferencesProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAC,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAIhE;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,oBAAoB,yCAA0E,CAAC;AAE5G;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CA4BzG;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,wBAAwB,CAE3D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCRoutingContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
1. <SCRoutingContext.Consumer>{(routerLink, routes, url) => (...)}</SCRoutingContext.Consumer>
|
|
11
|
+
```
|
|
12
|
+
```jsx
|
|
13
|
+
2. const scRoutingContext: SCRoutingContextType = useContext(SCRoutingContext);
|
|
14
|
+
```
|
|
15
|
+
```jsx
|
|
16
|
+
3. const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
17
|
+
````
|
|
18
|
+
|
|
19
|
+
:::
|
|
20
|
+
*/
|
|
21
|
+
export declare const SCRoutingContext: React.Context<SCRoutingContextType>;
|
|
22
|
+
/**
|
|
23
|
+
* #### Description:
|
|
24
|
+
* This component provides routing context.
|
|
25
|
+
* @param children
|
|
26
|
+
* @return
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <SCRoutingContext.Provider value={contextValue}>{children}</SCRoutingContext.Provider>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export default function SCRoutingProvider({ children }: {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}): JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Let's only export the `useSCTheme` hook instead of the context.
|
|
36
|
+
* We only want to use the hook directly and never the context component.
|
|
37
|
+
*/
|
|
38
|
+
export declare function useSCRouting(): SCRoutingContextType;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCRoutingProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EAA0C,oBAAoB,EAAoB,MAAM,gBAAgB,CAAC;AAoBhH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,qCAAkE,CAAC;AAEhG;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CAgFrG;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,oBAAoB,CAEnD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCThemeContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Creates Global Context
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
```jsx
|
|
9
|
+
1. <SCThemeContext.Consumer>{(theme,) => (...)}</SCThemeContext.Consumer>
|
|
10
|
+
```
|
|
11
|
+
```jsx
|
|
12
|
+
2. const scThemeContext: SCThemeContextType = useContext(SCThemeContext);
|
|
13
|
+
```
|
|
14
|
+
```jsx
|
|
15
|
+
3. const scThemeContext: SCThemeContextType = useSCTheme();
|
|
16
|
+
````
|
|
17
|
+
|
|
18
|
+
:::
|
|
19
|
+
|
|
20
|
+
*/
|
|
21
|
+
export declare const SCThemeContext: React.Context<SCThemeContextType>;
|
|
22
|
+
/**
|
|
23
|
+
* #### Description:
|
|
24
|
+
* This component makes the `theme` available down the React tree.
|
|
25
|
+
* It should preferably be used at **the root of your component tree**.
|
|
26
|
+
* See: https://mui.com/system/styled/
|
|
27
|
+
*
|
|
28
|
+
* @param children
|
|
29
|
+
* @return
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <SCThemeContext.Provider value={{theme, setTheme: setCustomTheme}}>
|
|
32
|
+
* <ThemeProvider theme={theme}>{children}</ThemeProvider>
|
|
33
|
+
* </SCThemeContext.Provider>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export default function SCThemeProvider({ children }: {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
}): JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Export hoc to inject the base theme to components
|
|
41
|
+
* @param Component
|
|
42
|
+
*/
|
|
43
|
+
export declare const withSCTheme: (Component: any) => (props: any) => JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Let's only export the `useSCTheme` hook instead of the context.
|
|
46
|
+
* We only want to use the hook directly and never the context component.
|
|
47
|
+
*/
|
|
48
|
+
export declare function useSCTheme(): SCThemeContextType;
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCThemeProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAKjE,OAAO,EAAC,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAKlD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,cAAc,mCAA8D,CAAC;AAE1F;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAC,QAAe,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CA4BnG;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,iDAOvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,UAAU,IAAI,kBAAkB,CAE/C"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SCUserContextType } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* SCUserContext (Authentication Context)
|
|
5
|
+
*
|
|
6
|
+
:::tipContext can be consumed in one of the following ways:
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
1. <SCUserContext.Consumer>{(user, session, error, loading, logout) => (...)}</SCUserContext.Consumer>
|
|
11
|
+
```
|
|
12
|
+
```jsx
|
|
13
|
+
2. const scUserContext: SCUserContextType = useContext(SCUserContext);
|
|
14
|
+
```
|
|
15
|
+
```jsx
|
|
16
|
+
3. const scUserContext: SCUserContextType = useSCUser();
|
|
17
|
+
````
|
|
18
|
+
:::
|
|
19
|
+
*/
|
|
20
|
+
export declare const SCUserContext: React.Context<SCUserContextType>;
|
|
21
|
+
/**
|
|
22
|
+
* #### Description:
|
|
23
|
+
* This component keeps current user logged and session; it is exported as we need to wrap the entire app with it
|
|
24
|
+
* @param children
|
|
25
|
+
* @return
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <SCUserContext.Provider value={contextValue}>{!state.loading && children}</SCUserContext.Provider>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export default function SCUserProvider({ children }: {
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}): JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Let's only export the `useSCUser` hook instead of the context.
|
|
35
|
+
* We only want to use the hook directly and never the context component.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useSCUser(): SCUserContextType;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/provider/SCUserProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAWnF,OAAO,EACL,iBAAiB,EAOlB,MAAM,gBAAgB,CAAC;AAIxB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,kCAA4D,CAAC;AAEvF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAC,GAAG,GAAG,CAAC,OAAO,CA4M3F;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,iBAAiB,CAE7C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<{
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
children: any;
|
|
5
|
+
}, string | number> & React.RefAttributes<unknown>>;
|
|
6
|
+
/**
|
|
7
|
+
:::info
|
|
8
|
+
This component is used to navigate through the application.
|
|
9
|
+
:::
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
In order to use router you need to import this components first:
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
17
|
+
````
|
|
18
|
+
:::tipUsage Example:
|
|
19
|
+
|
|
20
|
+
```jsx
|
|
21
|
+
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
22
|
+
<Button component={Link} to={scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, {id: user.id})>Go to profile</Button>
|
|
23
|
+
````
|
|
24
|
+
**or**
|
|
25
|
+
|
|
26
|
+
```jsx
|
|
27
|
+
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
28
|
+
<Link to={scRoutingContext.url('profile', {id: user.id})}>Go to profile</Link>
|
|
29
|
+
````
|
|
30
|
+
|
|
31
|
+
:::
|
|
32
|
+
*/
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/router/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;;;;;AAmCxC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const CONTEXT_PROVIDERS_OPTION = "contextProviders";
|
|
2
|
+
/**
|
|
3
|
+
* List of all nested providers that are required to run
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_CONTEXT_PROVIDERS: ((children: any) => JSX.Element)[];
|
|
6
|
+
//# sourceMappingURL=ContextProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContextProviders.d.ts","sourceRoot":"","sources":["../../../../../src/constants/ContextProviders.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,QAAQ,KAAA,KAAK,GAAG,CAAC,OAAO,CAAC,EAQlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Device.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iCAAiC,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const INTERESTS = "interests";
|
|
2
|
+
export declare const CUSTOMIZE = "customize";
|
|
3
|
+
export declare const ADDONS = "addons";
|
|
4
|
+
export declare const DOMAIN = "domain";
|
|
5
|
+
export declare const SOCIAL_PROVIDERS = "social_providers";
|
|
6
|
+
export declare const COMMUNITY_SUBSCRIPTION = "community_subscription";
|
|
7
|
+
export declare const SEO = "seo";
|
|
8
|
+
export declare const ADVERTISING = "advertising";
|
|
9
|
+
export declare const GOOGLE_CLOUD_API = "google_cloud_api";
|
|
10
|
+
export declare const HOTJAR = "hotjar";
|
|
11
|
+
export declare const SQREEN = "sqreen";
|
|
12
|
+
export declare const INCUBATORS = "incubators";
|
|
13
|
+
export declare const CMS = "cms";
|
|
14
|
+
export declare const LEGAL_PAGES = "legal_pages";
|
|
15
|
+
export declare const SCORING = "scoring";
|
|
16
|
+
export declare const USER_ROLES = "user_roles";
|
|
17
|
+
export declare const EMAIL_MANAGER = "email_manager";
|
|
18
|
+
export declare const LOYALTY = "loyalty";
|
|
19
|
+
export declare const BROADCAST = "broadcast";
|
|
20
|
+
export declare const INVITATION = "invitation";
|
|
21
|
+
export declare const APP_SETTINGS = "app_settings";
|
|
22
|
+
export declare const MODERATION_FLAGS = "moderation_flags";
|
|
23
|
+
export declare const MODERATION_CONTENTS = "moderation_contents";
|
|
24
|
+
export declare const MODERATION_USERS_BLOCKED = "moderation_users_blocked";
|
|
25
|
+
export declare const MODERATION_USERS = "moderation_users";
|
|
26
|
+
export declare const DATA_PROVISIONING_DASHBOARD = "data_provisioning_dashboard";
|
|
27
|
+
export declare const DATA_PROVISIONING_USERS = "data_provisioning_users";
|
|
28
|
+
export declare const DATA_PROVISIONING_CONTENTS = "data_provisioning_contents";
|
|
29
|
+
export declare const DATA_PROVISIONING_INTERESTS = "data_provisioning_interests";
|
|
30
|
+
export declare const DATA_PROVISIONING_POLLS = "data_provisioning_polls";
|
|
31
|
+
export declare const DATA_PROVISIONING_REPORTS = "data_provisioning_reports";
|
|
32
|
+
export declare const REGISTRATION_ALERTS = "registration_alerts";
|
|
33
|
+
export declare const SOCIAL_SHARE = "social_share";
|
|
34
|
+
export declare const FEED_SETTINGS = "stream_settings";
|
|
35
|
+
export declare const USER_TAGGING = "user_tagging";
|
|
36
|
+
export declare const API_V2 = "api_v2";
|
|
37
|
+
export declare const WEBHOOK = "webhook";
|
|
38
|
+
export declare const HEADLESS = "headless";
|
|
39
|
+
export declare const CUSTOMIZE_HEADLESS = "customize_headless";
|
|
40
|
+
export declare const SYSTEM_PAGES = "system_pages";
|
|
41
|
+
//# sourceMappingURL=Features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Features.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Features.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AACrE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AACzD,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,YAAY,iBAAiB,CAAC"}
|