@selfcommunity/react-core 0.6.7-payments.175 → 0.7.0-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/lib/cjs/constants/Cache.d.ts +0 -3
- package/lib/cjs/constants/Cache.js +1 -5
- package/lib/cjs/constants/Preferences.d.ts +0 -3
- package/lib/cjs/constants/Preferences.js +1 -7
- package/lib/cjs/constants/Routes.d.ts +0 -3
- package/lib/cjs/constants/Routes.js +1 -8
- package/lib/cjs/hooks/useSCFetchCategory.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchCategory.js +1 -18
- package/lib/cjs/hooks/useSCFetchCourse.js +15 -15
- package/lib/cjs/hooks/useSCFetchEvent.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchEvent.js +1 -16
- package/lib/cjs/hooks/useSCFetchGroup.d.ts +0 -1
- package/lib/cjs/hooks/useSCFetchGroup.js +1 -16
- package/lib/cjs/hooks/useSCJoinedCoursesManager.js +4 -4
- package/lib/cjs/hooks/useSCSubscribedEventsManager.js +4 -4
- package/lib/cjs/hooks/useSCSubscribedGroupsManager.js +4 -4
- package/lib/cjs/index.d.ts +1 -3
- package/lib/cjs/index.js +1 -5
- package/lib/cjs/themes/theme.js +0 -12
- package/lib/cjs/types/theme.d.ts +0 -52
- package/lib/esm/constants/Cache.d.ts +0 -3
- package/lib/esm/constants/Cache.js +0 -3
- package/lib/esm/constants/Preferences.d.ts +0 -3
- package/lib/esm/constants/Preferences.js +0 -6
- package/lib/esm/constants/Routes.d.ts +0 -3
- package/lib/esm/constants/Routes.js +0 -6
- package/lib/esm/hooks/useSCFetchCategory.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchCategory.js +1 -18
- package/lib/esm/hooks/useSCFetchCourse.js +15 -15
- package/lib/esm/hooks/useSCFetchEvent.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchEvent.js +1 -16
- package/lib/esm/hooks/useSCFetchGroup.d.ts +0 -1
- package/lib/esm/hooks/useSCFetchGroup.js +1 -16
- package/lib/esm/hooks/useSCJoinedCoursesManager.js +4 -4
- package/lib/esm/hooks/useSCSubscribedEventsManager.js +4 -4
- package/lib/esm/hooks/useSCSubscribedGroupsManager.js +4 -4
- package/lib/esm/index.d.ts +1 -3
- package/lib/esm/index.js +1 -3
- package/lib/esm/themes/theme.js +0 -12
- package/lib/esm/types/theme.d.ts +0 -52
- package/lib/umd/258.js +2 -0
- package/lib/umd/react-core.js +1 -1
- package/package.json +6 -6
- package/lib/cjs/hooks/useSCFetchPaymentProduct.d.ts +0 -20
- package/lib/cjs/hooks/useSCFetchPaymentProduct.js +0 -70
- package/lib/cjs/hooks/useSCPaymentsEnabled.d.ts +0 -18
- package/lib/cjs/hooks/useSCPaymentsEnabled.js +0 -35
- package/lib/esm/hooks/useSCFetchPaymentProduct.d.ts +0 -20
- package/lib/esm/hooks/useSCFetchPaymentProduct.js +0 -67
- package/lib/esm/hooks/useSCPaymentsEnabled.d.ts +0 -18
- package/lib/esm/hooks/useSCPaymentsEnabled.js +0 -31
- package/lib/umd/595.js +0 -2
- /package/lib/umd/{595.js.LICENSE.txt → 258.js.LICENSE.txt} +0 -0
|
@@ -24,8 +24,6 @@ export const USER_PROFILE_CONNECTIONS_REQUESTS_SENT_ROUTE_NAME = 'user_connectio
|
|
|
24
24
|
export const USER_PROFILE_CATEGORIES_ROUTE_NAME = 'user_categories';
|
|
25
25
|
export const USER_PROFILE_FOLLOWED_POSTS_ROUTE_NAME = 'user_followed_posts';
|
|
26
26
|
export const USER_PROFILE_FOLLOWED_DISCUSSIONS_ROUTE_NAME = 'user_followed_discussions';
|
|
27
|
-
export const USER_PAYMENTS_HISTORY_ORDERS_ROUTE_NAME = 'user_payments_history_orders';
|
|
28
|
-
export const USER_PAYMENT_METHODS_ROUTE_NAME = 'user_payment_methods';
|
|
29
27
|
export const LOYALTY_ROUTE_NAME = 'loyalty';
|
|
30
28
|
export const INCUBATOR_ROUTE_NAME = 'incubator';
|
|
31
29
|
export const SIGNIN_ROUTE_NAME = 'signin';
|
|
@@ -52,7 +50,6 @@ export const EVENTS_SUGGESTED_ROUTE_NAME = 'events_suggested';
|
|
|
52
50
|
export const EVENTS_SUBSCRIBED_ROUTE_NAME = 'events_subscribed';
|
|
53
51
|
export const EVENTS_HIGHLIGHT_ROUTE_NAME = 'events_highlight';
|
|
54
52
|
export const LIVESTREAM_ROUTE_NAME = 'live';
|
|
55
|
-
export const CHECKOUT_PAYMENT = 'checkout_payment';
|
|
56
53
|
/**
|
|
57
54
|
* Default Routes
|
|
58
55
|
* @type {{[p: string]: string, '[POST_ROUTE_NAME]': string, '[INCUBATOR_ROUTE_NAME]': string, '[LOYALTY_ROUTE_NAME]': string, '[USER_NOTIFICATION_ROUTE_NAME]': string, '[USER_PRIVATE_MESSAGES_ROUTE_NAME]': string, '[COMMENT_ROUTE_NAME]': string, '[DISCUSSION_ROUTE_NAME]': string, '[CATEGORIES_ROUTE_NAME]': string, '[USER_PROFILE_ROUTE_NAME]': string, '[CATEGORY_ROUTE_NAME]': string, '[USER_PROFILE_SETTINGS_ROUTE_NAME]': string, '[STATUS_ROUTE_NAME]': string}}
|
|
@@ -79,8 +76,6 @@ export const defaultRoutes = {
|
|
|
79
76
|
[USER_PROFILE_CATEGORIES_ROUTE_NAME]: '/user/:id/categories/',
|
|
80
77
|
[USER_PROFILE_FOLLOWED_POSTS_ROUTE_NAME]: '/user/:id/posts/followed/',
|
|
81
78
|
[USER_PROFILE_FOLLOWED_DISCUSSIONS_ROUTE_NAME]: '/user/:id/discussions/followed/',
|
|
82
|
-
[USER_PAYMENTS_HISTORY_ORDERS_ROUTE_NAME]: '/user/:id/:username/history_orders/',
|
|
83
|
-
[USER_PAYMENT_METHODS_ROUTE_NAME]: '/user/:id/:username/payment_methods/',
|
|
84
79
|
[LOYALTY_ROUTE_NAME]: '/loyalty/',
|
|
85
80
|
[INCUBATOR_ROUTE_NAME]: '/incubator/:id/',
|
|
86
81
|
[SIGNIN_ROUTE_NAME]: '/signin/',
|
|
@@ -107,5 +102,4 @@ export const defaultRoutes = {
|
|
|
107
102
|
[COURSE_LESSON_COMMENTS_ROUTE_NAME]: '/course/:id/:slug/section/:section_id/lesson/:lesson_id/comments',
|
|
108
103
|
[COURSE_LESSON_EDIT_ROUTE_NAME]: '/course/:id/:slug/section/:section_id/lesson/:lesson_id/edit',
|
|
109
104
|
[LIVESTREAM_ROUTE_NAME]: '/live/:slug/',
|
|
110
|
-
[CHECKOUT_PAYMENT]: '/checkout/:content_type/:content_id/price/:price_id',
|
|
111
105
|
};
|
|
@@ -40,23 +40,6 @@ export default function useSCFetchCategory({ id = null, category = null, cacheSt
|
|
|
40
40
|
return Promise.resolve(res.data);
|
|
41
41
|
});
|
|
42
42
|
}, [__categoryId]);
|
|
43
|
-
/**
|
|
44
|
-
* Refresh category
|
|
45
|
-
*/
|
|
46
|
-
const refreshCategory = useMemo(() => () => {
|
|
47
|
-
fetchCategory()
|
|
48
|
-
.then((obj) => {
|
|
49
|
-
const _c = authUserId ? obj : objectWithoutProperties(obj, ['followed']);
|
|
50
|
-
setSCCategory(_c);
|
|
51
|
-
LRUCache.set(__categoryCacheKey, _c);
|
|
52
|
-
})
|
|
53
|
-
.catch((err) => {
|
|
54
|
-
LRUCache.delete(__categoryCacheKey);
|
|
55
|
-
setError(`Error on refresh category with id ${id}`);
|
|
56
|
-
Logger.error(SCOPE_SC_CORE, `Error on refresh category with id ${id}`);
|
|
57
|
-
Logger.error(SCOPE_SC_CORE, err.message);
|
|
58
|
-
});
|
|
59
|
-
}, [__categoryId, setSCCategory, __categoryCacheKey]);
|
|
60
43
|
/**
|
|
61
44
|
* If id attempt to get the category by id
|
|
62
45
|
*/
|
|
@@ -83,5 +66,5 @@ export default function useSCFetchCategory({ id = null, category = null, cacheSt
|
|
|
83
66
|
LRUCache.set(__categoryCacheKey, _c);
|
|
84
67
|
}
|
|
85
68
|
}, [category]);
|
|
86
|
-
return { scCategory, setSCCategory, error
|
|
69
|
+
return { scCategory, setSCCategory, error };
|
|
87
70
|
}
|
|
@@ -46,21 +46,6 @@ export default function useSCFetchCourse({ id = null, course = null, cacheStrate
|
|
|
46
46
|
return Promise.resolve(res.data);
|
|
47
47
|
});
|
|
48
48
|
}, []);
|
|
49
|
-
/**
|
|
50
|
-
* Refresh course
|
|
51
|
-
*/
|
|
52
|
-
const refreshCourse = useMemo(() => () => {
|
|
53
|
-
fetchCourse(id)
|
|
54
|
-
.then((e) => {
|
|
55
|
-
setSCCourse(e);
|
|
56
|
-
})
|
|
57
|
-
.catch((err) => {
|
|
58
|
-
LRUCache.delete(__courseCacheKey);
|
|
59
|
-
setError(`Error on refresh course with id ${id}`);
|
|
60
|
-
Logger.error(SCOPE_SC_CORE, `Error on refresh course with id ${id}`);
|
|
61
|
-
Logger.error(SCOPE_SC_CORE, err.message);
|
|
62
|
-
});
|
|
63
|
-
}, [id, __courseCacheKey, setSCCourse]);
|
|
64
49
|
/**
|
|
65
50
|
* If id attempt to get the course by id
|
|
66
51
|
*/
|
|
@@ -89,5 +74,20 @@ export default function useSCFetchCourse({ id = null, course = null, cacheStrate
|
|
|
89
74
|
setSCCourse(course);
|
|
90
75
|
}
|
|
91
76
|
}, [course, authUserId]);
|
|
77
|
+
/**
|
|
78
|
+
* Refreshes course data from the network
|
|
79
|
+
*/
|
|
80
|
+
const refreshCourse = useCallback(() => {
|
|
81
|
+
if (id) {
|
|
82
|
+
fetchCourse(id)
|
|
83
|
+
.then((e) => {
|
|
84
|
+
setSCCourse(e);
|
|
85
|
+
})
|
|
86
|
+
.catch((err) => {
|
|
87
|
+
setError(`Failed to refresh course data: ${err.message}`);
|
|
88
|
+
Logger.error(SCOPE_SC_CORE, err.message);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}, [id, fetchCourse]);
|
|
92
92
|
return { scCourse, setSCCourse, error, refreshCourse };
|
|
93
93
|
}
|
|
@@ -66,21 +66,6 @@ export default function useSCFetchEvent({ id = null, event = null, autoSubscribe
|
|
|
66
66
|
return Promise.resolve(res.data);
|
|
67
67
|
});
|
|
68
68
|
}, []);
|
|
69
|
-
/**
|
|
70
|
-
* Refresh event
|
|
71
|
-
*/
|
|
72
|
-
const refreshEvent = useMemo(() => () => () => {
|
|
73
|
-
fetchEvent(id)
|
|
74
|
-
.then((e) => {
|
|
75
|
-
setSCEvent(e);
|
|
76
|
-
})
|
|
77
|
-
.catch((err) => {
|
|
78
|
-
LRUCache.delete(__eventCacheKey);
|
|
79
|
-
setError(`Error on refresh event with id ${id}`);
|
|
80
|
-
Logger.error(SCOPE_SC_CORE, `Error on refresh event with id ${id}`);
|
|
81
|
-
Logger.error(SCOPE_SC_CORE, err.message);
|
|
82
|
-
});
|
|
83
|
-
}, [id, setSCEvent, __eventCacheKey]);
|
|
84
69
|
/**
|
|
85
70
|
* If id attempt to get the event by id
|
|
86
71
|
*/
|
|
@@ -103,5 +88,5 @@ export default function useSCFetchEvent({ id = null, event = null, autoSubscribe
|
|
|
103
88
|
setSCEvent(event);
|
|
104
89
|
}
|
|
105
90
|
}, [event, authUserId]);
|
|
106
|
-
return { scEvent, setSCEvent, error
|
|
91
|
+
return { scEvent, setSCEvent, error };
|
|
107
92
|
}
|
|
@@ -45,21 +45,6 @@ export default function useSCFetchGroup({ id = null, group = null, cacheStrategy
|
|
|
45
45
|
return Promise.resolve(res.data);
|
|
46
46
|
});
|
|
47
47
|
}, [__groupId]);
|
|
48
|
-
/**
|
|
49
|
-
* Refresh group
|
|
50
|
-
*/
|
|
51
|
-
const refreshGroup = useMemo(() => () => {
|
|
52
|
-
fetchGroup()
|
|
53
|
-
.then((obj) => {
|
|
54
|
-
setSCGroup(obj);
|
|
55
|
-
})
|
|
56
|
-
.catch((err) => {
|
|
57
|
-
LRUCache.delete(__groupCacheKey);
|
|
58
|
-
setError(`Error on refresh group with id ${id}`);
|
|
59
|
-
Logger.error(SCOPE_SC_CORE, `Error on refresh group with id ${id}`);
|
|
60
|
-
Logger.error(SCOPE_SC_CORE, err.message);
|
|
61
|
-
});
|
|
62
|
-
}, [__groupCacheKey, setSCGroup]);
|
|
63
48
|
/**
|
|
64
49
|
* If id attempt to get the group by id
|
|
65
50
|
*/
|
|
@@ -82,5 +67,5 @@ export default function useSCFetchGroup({ id = null, group = null, cacheStrategy
|
|
|
82
67
|
setSCGroup(group);
|
|
83
68
|
}
|
|
84
69
|
}, [group, authUserId]);
|
|
85
|
-
return { scGroup, setSCGroup, error
|
|
70
|
+
return { scGroup, setSCGroup, error };
|
|
86
71
|
}
|
|
@@ -74,8 +74,8 @@ export default function useSCJoinedCoursesManager(user) {
|
|
|
74
74
|
_status = SCCourseJoinStatusType.JOINED;
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
|
-
updateCache([dataMsg.data.course
|
|
78
|
-
setData((prev) => getDataUpdated(prev, dataMsg.data.course
|
|
77
|
+
updateCache([dataMsg.data.course]);
|
|
78
|
+
setData((prev) => getDataUpdated(prev, dataMsg.data.course, _status));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
@@ -90,8 +90,8 @@ export default function useSCJoinedCoursesManager(user) {
|
|
|
90
90
|
// Only if user is authenticated
|
|
91
91
|
http
|
|
92
92
|
.request({
|
|
93
|
-
url: Endpoints.
|
|
94
|
-
method: Endpoints.
|
|
93
|
+
url: Endpoints.GetJoinedCourses.url(),
|
|
94
|
+
method: Endpoints.GetJoinedCourses.method,
|
|
95
95
|
})
|
|
96
96
|
.then((res) => {
|
|
97
97
|
if (res.status >= 300) {
|
|
@@ -74,8 +74,8 @@ export default function useSCSubscribedEventsManager(user) {
|
|
|
74
74
|
_status = SCEventSubscriptionStatusType.SUBSCRIBED;
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
|
-
updateCache([dataMsg.data.event
|
|
78
|
-
setData((prev) => getDataUpdated(prev, dataMsg.data.event
|
|
77
|
+
updateCache([dataMsg.data.event]);
|
|
78
|
+
setData((prev) => getDataUpdated(prev, dataMsg.data.event, _status));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
@@ -90,8 +90,8 @@ export default function useSCSubscribedEventsManager(user) {
|
|
|
90
90
|
// Only if user is authenticated
|
|
91
91
|
http
|
|
92
92
|
.request({
|
|
93
|
-
url: Endpoints.
|
|
94
|
-
method: Endpoints.
|
|
93
|
+
url: Endpoints.GetUserEvents.url(),
|
|
94
|
+
method: Endpoints.GetUserEvents.method,
|
|
95
95
|
})
|
|
96
96
|
.then((res) => {
|
|
97
97
|
if (res.status >= 300) {
|
|
@@ -74,8 +74,8 @@ export default function useSCSubscribedGroupsManager(user) {
|
|
|
74
74
|
_status = SCGroupSubscriptionStatusType.SUBSCRIBED;
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
|
-
updateCache([dataMsg.data.group
|
|
78
|
-
setData((prev) => getDataUpdated(prev, dataMsg.data.group
|
|
77
|
+
updateCache([dataMsg.data.group]);
|
|
78
|
+
setData((prev) => getDataUpdated(prev, dataMsg.data.group, _status));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
@@ -90,8 +90,8 @@ export default function useSCSubscribedGroupsManager(user) {
|
|
|
90
90
|
// Only if user is authenticated
|
|
91
91
|
http
|
|
92
92
|
.request({
|
|
93
|
-
url: Endpoints.
|
|
94
|
-
method: Endpoints.
|
|
93
|
+
url: Endpoints.GetUserGroups.url(),
|
|
94
|
+
method: Endpoints.GetUserGroups.method,
|
|
95
95
|
})
|
|
96
96
|
.then((res) => {
|
|
97
97
|
if (res.status >= 300) {
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -71,8 +71,6 @@ import useSCGoogleApiLoader from './hooks/useSCGoogleApiLoader';
|
|
|
71
71
|
import useSCFetchCourse from './hooks/useSCFetchCourse';
|
|
72
72
|
import useSCFetchCourses from './hooks/useSCFetchCourses';
|
|
73
73
|
import useSCFetchLesson from './hooks/useSCFetchLesson';
|
|
74
|
-
import useSCPaymentsEnabled from './hooks/useSCPaymentsEnabled';
|
|
75
|
-
import useSCFetchPaymentProduct from './hooks/useSCFetchPaymentProduct';
|
|
76
74
|
/**
|
|
77
75
|
* Routing component
|
|
78
76
|
*/
|
|
@@ -95,4 +93,4 @@ import * as Preferences from './constants/Preferences';
|
|
|
95
93
|
/**
|
|
96
94
|
* List all exports
|
|
97
95
|
*/
|
|
98
|
-
export { SCUserContextType, SCFollowedCategoriesManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCSettingsManagerType, SCFollowedManagerType, SCFollowersManagerType, SCConnectionsManagerType, SCSubscribedIncubatorsManagerType, SCLocaleType, SCNotificationContextType, SCPreferencesContextType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType, SCThemeAvatarVariableType, SCThemeCategoryIconVariableType, SCThemeCategoryVariableType, SCThemeVariablesType, SCThemeType, SCSubscribedGroupsManagerType, SCSubscribedEventsManagerType, SCJoinedCoursesManagerType, SCContext, SCUserContext, SCThemeContext, SCRoutingContext, SCLocaleContext, SCPreferencesContext, useSCContext, SCContextProvider, SCUserProvider, useSCUser, useSCPreferences, SCThemeProvider, useSCTheme, withSCTheme, getTheme, SCRoutingProvider, useSCRouting, SCLocaleProvider, useSCLocale, withSCLocale, SCPreferencesProvider, SCPreferences, SCFeatures, SCNotification, SCNotificationProvider, SCNotificationContext, useSCNotification, SCAlertMessagesProvider, SCAlertMessagesContext, useSCAlertMessages, Link, SCRoutes, SCCache, UserUtils, getEventStatus, Locale, Preferences, useSCFetchUser, useSCFetchUserProviders, useSCFetchVote, useSCFetchFeedObject, useSCFetchCommentObject, useSCFetchCommentObjects, useSCFetchLessonCommentObject, useSCFetchLessonCommentObjects, useSCFetchCustomAdv, useSCFetchTag, useSCFetchAddressingTagList, useSCFetchCategory, useSCFetchCategories, useSCFetchIncubator, useSCMediaClick, useSCFetchContributors, useSCFetchFeed, useIsComponentMountedRef, usePreviousValue, useIsomorphicLayoutEffect, useEffectOnce, useNoInitialEffect, usePageVisibility, useSCFetchPrivateMessageSnippets, useSCFetchBroadcastMessages, useSCFetchUserBlockedBy, useSCUserIsBlocked, useSCFetchGroup, useSCFetchGroups, useSCFetchEvent, useSCFetchEvents, useSCFetchLiveStream, useSCGoogleApiLoader, useSCFetchCourse, useSCFetchCourses, useSCFetchLesson,
|
|
96
|
+
export { SCUserContextType, SCFollowedCategoriesManagerType, SCContextProviderType, SCContextType, SCSettingsType, SCSessionType, SCSettingsManagerType, SCFollowedManagerType, SCFollowersManagerType, SCConnectionsManagerType, SCSubscribedIncubatorsManagerType, SCLocaleType, SCNotificationContextType, SCPreferencesContextType, SCThemeContextType, SCRoutingContextType, SCLocaleContextType, SCAlertMessagesContextType, SCThemeAvatarVariableType, SCThemeCategoryIconVariableType, SCThemeCategoryVariableType, SCThemeVariablesType, SCThemeType, SCSubscribedGroupsManagerType, SCSubscribedEventsManagerType, SCJoinedCoursesManagerType, SCContext, SCUserContext, SCThemeContext, SCRoutingContext, SCLocaleContext, SCPreferencesContext, useSCContext, SCContextProvider, SCUserProvider, useSCUser, useSCPreferences, SCThemeProvider, useSCTheme, withSCTheme, getTheme, SCRoutingProvider, useSCRouting, SCLocaleProvider, useSCLocale, withSCLocale, SCPreferencesProvider, SCPreferences, SCFeatures, SCNotification, SCNotificationProvider, SCNotificationContext, useSCNotification, SCAlertMessagesProvider, SCAlertMessagesContext, useSCAlertMessages, Link, SCRoutes, SCCache, UserUtils, getEventStatus, Locale, Preferences, useSCFetchUser, useSCFetchUserProviders, useSCFetchVote, useSCFetchFeedObject, useSCFetchCommentObject, useSCFetchCommentObjects, useSCFetchLessonCommentObject, useSCFetchLessonCommentObjects, useSCFetchCustomAdv, useSCFetchTag, useSCFetchAddressingTagList, useSCFetchCategory, useSCFetchCategories, useSCFetchIncubator, useSCMediaClick, useSCFetchContributors, useSCFetchFeed, useIsComponentMountedRef, usePreviousValue, useIsomorphicLayoutEffect, useEffectOnce, useNoInitialEffect, usePageVisibility, useSCFetchPrivateMessageSnippets, useSCFetchBroadcastMessages, useSCFetchUserBlockedBy, useSCUserIsBlocked, useSCFetchGroup, useSCFetchGroups, useSCFetchEvent, useSCFetchEvents, useSCFetchLiveStream, useSCGoogleApiLoader, useSCFetchCourse, useSCFetchCourses, useSCFetchLesson, };
|
package/lib/esm/index.js
CHANGED
|
@@ -67,8 +67,6 @@ import useSCGoogleApiLoader from './hooks/useSCGoogleApiLoader';
|
|
|
67
67
|
import useSCFetchCourse from './hooks/useSCFetchCourse';
|
|
68
68
|
import useSCFetchCourses from './hooks/useSCFetchCourses';
|
|
69
69
|
import useSCFetchLesson from './hooks/useSCFetchLesson';
|
|
70
|
-
import useSCPaymentsEnabled from './hooks/useSCPaymentsEnabled';
|
|
71
|
-
import useSCFetchPaymentProduct from './hooks/useSCFetchPaymentProduct';
|
|
72
70
|
/**
|
|
73
71
|
* Routing component
|
|
74
72
|
*/
|
|
@@ -91,4 +89,4 @@ import * as Preferences from './constants/Preferences';
|
|
|
91
89
|
/**
|
|
92
90
|
* List all exports
|
|
93
91
|
*/
|
|
94
|
-
export { SCContext, SCUserContext, SCThemeContext, SCRoutingContext, SCLocaleContext, SCPreferencesContext, useSCContext, SCContextProvider, SCUserProvider, useSCUser, useSCPreferences, SCThemeProvider, useSCTheme, withSCTheme, getTheme, SCRoutingProvider, useSCRouting, SCLocaleProvider, useSCLocale, withSCLocale, SCPreferencesProvider, SCPreferences, SCFeatures, SCNotification, SCNotificationProvider, SCNotificationContext, useSCNotification, SCAlertMessagesProvider, SCAlertMessagesContext, useSCAlertMessages, Link, SCRoutes, SCCache, UserUtils, getEventStatus, Locale, Preferences, useSCFetchUser, useSCFetchUserProviders, useSCFetchVote, useSCFetchFeedObject, useSCFetchCommentObject, useSCFetchCommentObjects, useSCFetchLessonCommentObject, useSCFetchLessonCommentObjects, useSCFetchCustomAdv, useSCFetchTag, useSCFetchAddressingTagList, useSCFetchCategory, useSCFetchCategories, useSCFetchIncubator, useSCMediaClick, useSCFetchContributors, useSCFetchFeed, useIsComponentMountedRef, usePreviousValue, useIsomorphicLayoutEffect, useEffectOnce, useNoInitialEffect, usePageVisibility, useSCFetchPrivateMessageSnippets, useSCFetchBroadcastMessages, useSCFetchUserBlockedBy, useSCUserIsBlocked, useSCFetchGroup, useSCFetchGroups, useSCFetchEvent, useSCFetchEvents, useSCFetchLiveStream, useSCGoogleApiLoader, useSCFetchCourse, useSCFetchCourses, useSCFetchLesson,
|
|
92
|
+
export { SCContext, SCUserContext, SCThemeContext, SCRoutingContext, SCLocaleContext, SCPreferencesContext, useSCContext, SCContextProvider, SCUserProvider, useSCUser, useSCPreferences, SCThemeProvider, useSCTheme, withSCTheme, getTheme, SCRoutingProvider, useSCRouting, SCLocaleProvider, useSCLocale, withSCLocale, SCPreferencesProvider, SCPreferences, SCFeatures, SCNotification, SCNotificationProvider, SCNotificationContext, useSCNotification, SCAlertMessagesProvider, SCAlertMessagesContext, useSCAlertMessages, Link, SCRoutes, SCCache, UserUtils, getEventStatus, Locale, Preferences, useSCFetchUser, useSCFetchUserProviders, useSCFetchVote, useSCFetchFeedObject, useSCFetchCommentObject, useSCFetchCommentObjects, useSCFetchLessonCommentObject, useSCFetchLessonCommentObjects, useSCFetchCustomAdv, useSCFetchTag, useSCFetchAddressingTagList, useSCFetchCategory, useSCFetchCategories, useSCFetchIncubator, useSCMediaClick, useSCFetchContributors, useSCFetchFeed, useIsComponentMountedRef, usePreviousValue, useIsomorphicLayoutEffect, useEffectOnce, useNoInitialEffect, usePageVisibility, useSCFetchPrivateMessageSnippets, useSCFetchBroadcastMessages, useSCFetchUserBlockedBy, useSCUserIsBlocked, useSCFetchGroup, useSCFetchGroups, useSCFetchEvent, useSCFetchEvents, useSCFetchLiveStream, useSCGoogleApiLoader, useSCFetchCourse, useSCFetchCourses, useSCFetchLesson, };
|
package/lib/esm/themes/theme.js
CHANGED
|
@@ -48,18 +48,6 @@ const getTheme = (options, preferences) => {
|
|
|
48
48
|
sizeXLarge: 120,
|
|
49
49
|
},
|
|
50
50
|
},
|
|
51
|
-
contentProduct: {
|
|
52
|
-
icon: {
|
|
53
|
-
sizeSmall: 24,
|
|
54
|
-
sizeMedium: 40,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
contentProductPrice: {
|
|
58
|
-
icon: {
|
|
59
|
-
sizeSmall: 24,
|
|
60
|
-
sizeMedium: 40,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
51
|
};
|
|
64
52
|
const defaultOptions = preferences
|
|
65
53
|
? {
|
package/lib/esm/types/theme.d.ts
CHANGED
|
@@ -55,32 +55,6 @@ export interface SCThemeCategoryIconVariableType {
|
|
|
55
55
|
*/
|
|
56
56
|
sizeLarge: number;
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* Interface SCThemeContentProductIconVariableType
|
|
60
|
-
*/
|
|
61
|
-
export interface SCThemeContentProductIconVariableType {
|
|
62
|
-
/**
|
|
63
|
-
* ContentProduct size small
|
|
64
|
-
*/
|
|
65
|
-
sizeSmall: number;
|
|
66
|
-
/**
|
|
67
|
-
* ContentProduct size medium
|
|
68
|
-
*/
|
|
69
|
-
sizeMedium: number;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Interface SCThemeContentProductPriceIconVariableType
|
|
73
|
-
*/
|
|
74
|
-
export interface SCThemeContentProductPriceIconVariableType {
|
|
75
|
-
/**
|
|
76
|
-
* ContentProductPrice size small
|
|
77
|
-
*/
|
|
78
|
-
sizeSmall: number;
|
|
79
|
-
/**
|
|
80
|
-
* ContentProductPrice size medium
|
|
81
|
-
*/
|
|
82
|
-
sizeMedium: number;
|
|
83
|
-
}
|
|
84
58
|
/**
|
|
85
59
|
* Interface SCThemeCategoryVariableType
|
|
86
60
|
*/
|
|
@@ -90,24 +64,6 @@ export interface SCThemeCategoryVariableType {
|
|
|
90
64
|
*/
|
|
91
65
|
icon: SCThemeCategoryIconVariableType;
|
|
92
66
|
}
|
|
93
|
-
/**
|
|
94
|
-
* Interface SCThemeContentProductVariableType
|
|
95
|
-
*/
|
|
96
|
-
export interface SCThemeContentProductVariableType {
|
|
97
|
-
/**
|
|
98
|
-
* ContentProduct icon size
|
|
99
|
-
*/
|
|
100
|
-
icon: SCThemeContentProductIconVariableType;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Interface SCThemeContentProductPriceVariableType
|
|
104
|
-
*/
|
|
105
|
-
export interface SCThemeContentProductPriceVariableType {
|
|
106
|
-
/**
|
|
107
|
-
* ContentProductPrice icon size
|
|
108
|
-
*/
|
|
109
|
-
icon: SCThemeContentProductPriceIconVariableType;
|
|
110
|
-
}
|
|
111
67
|
/**
|
|
112
68
|
* Interface SCThemeVariablesType
|
|
113
69
|
*/
|
|
@@ -124,14 +80,6 @@ export interface SCThemeVariablesType {
|
|
|
124
80
|
* Group
|
|
125
81
|
*/
|
|
126
82
|
group: SCThemeGroupVariableType;
|
|
127
|
-
/**
|
|
128
|
-
* ContentProduct
|
|
129
|
-
*/
|
|
130
|
-
contentProduct: SCThemeContentProductVariableType;
|
|
131
|
-
/**
|
|
132
|
-
* ContentProductPrice
|
|
133
|
-
*/
|
|
134
|
-
contentProductPrice: SCThemeContentProductPriceVariableType;
|
|
135
83
|
}
|
|
136
84
|
export interface SCThemeType extends MuiTheme {
|
|
137
85
|
/**
|