@selfcommunity/react-core 0.4.1-alpha.3 → 0.4.1-alpha.5
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 +1 -1
- package/lib/cjs/components/provider/SCAlertMessagesProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCContextProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCContextProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCLocaleProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCNotificationProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCPreferencesProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCRoutingProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCThemeProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCUserProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCUserProvider/index.js +1 -1
- package/lib/cjs/components/provider/SCVoteProvider/index.d.ts +1 -1
- package/lib/cjs/components/provider/SCVoteProvider/index.js +1 -1
- package/lib/cjs/components/router/index.d.ts +1 -1
- package/lib/cjs/components/router/index.js +1 -1
- package/lib/cjs/hooks/useSCAuth.d.ts +1 -1
- package/lib/cjs/hooks/useSCAuth.js +1 -1
- package/lib/cjs/hooks/useSCBlockedUsersManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCBlockedUsersManager.js +1 -1
- package/lib/cjs/hooks/useSCConnectionsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCConnectionsManager.js +1 -1
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchBroadcastMessages.js +1 -1
- package/lib/cjs/hooks/useSCFetchCategories.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchCategories.js +1 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.d.ts +1 -1
- package/lib/cjs/hooks/useSCFetchPrivateMessageSnippets.js +1 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowedCategoriesManager.js +1 -1
- package/lib/cjs/hooks/useSCFollowedManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowedManager.js +1 -1
- package/lib/cjs/hooks/useSCFollowersManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCFollowersManager.js +1 -1
- package/lib/cjs/hooks/useSCSettingsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCSettingsManager.js +1 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.d.ts +1 -1
- package/lib/cjs/hooks/useSCSubscribedIncubatorsManager.js +1 -1
- package/lib/cjs/hooks/useSCUserIsBlocked.d.ts +1 -1
- package/lib/cjs/hooks/useSCUserIsBlocked.js +1 -1
- package/lib/cjs/utils/validator.js +1 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCAlertMessagesProvider/index.js +1 -1
- package/lib/esm/components/provider/SCContextProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCContextProvider/index.js +1 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCLocaleProvider/index.js +1 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCNotificationProvider/index.js +1 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCPreferencesProvider/index.js +1 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCRoutingProvider/index.js +1 -1
- package/lib/esm/components/provider/SCThemeProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCThemeProvider/index.js +1 -1
- package/lib/esm/components/provider/SCUserProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCUserProvider/index.js +1 -1
- package/lib/esm/components/provider/SCVoteProvider/index.d.ts +1 -1
- package/lib/esm/components/provider/SCVoteProvider/index.js +1 -1
- package/lib/esm/components/router/index.d.ts +1 -1
- package/lib/esm/components/router/index.js +1 -1
- package/lib/esm/hooks/useSCAuth.d.ts +1 -1
- package/lib/esm/hooks/useSCAuth.js +1 -1
- package/lib/esm/hooks/useSCBlockedUsersManager.d.ts +1 -1
- package/lib/esm/hooks/useSCBlockedUsersManager.js +1 -1
- package/lib/esm/hooks/useSCConnectionsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCConnectionsManager.js +1 -1
- package/lib/esm/hooks/useSCFetchBroadcastMessages.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchBroadcastMessages.js +1 -1
- package/lib/esm/hooks/useSCFetchCategories.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchCategories.js +1 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.d.ts +1 -1
- package/lib/esm/hooks/useSCFetchPrivateMessageSnippets.js +1 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowedCategoriesManager.js +2 -2
- package/lib/esm/hooks/useSCFollowedManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowedManager.js +1 -1
- package/lib/esm/hooks/useSCFollowersManager.d.ts +1 -1
- package/lib/esm/hooks/useSCFollowersManager.js +1 -1
- package/lib/esm/hooks/useSCSettingsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCSettingsManager.js +1 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.d.ts +1 -1
- package/lib/esm/hooks/useSCSubscribedIncubatorsManager.js +2 -2
- package/lib/esm/hooks/useSCUserIsBlocked.d.ts +1 -1
- package/lib/esm/hooks/useSCUserIsBlocked.js +1 -1
- package/lib/esm/utils/validator.js +1 -1
- package/lib/umd/react-core.js +1 -1
- package/package.json +3 -3
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
```jsx
|
|
12
12
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
13
13
|
````
|
|
14
|
-
:::
|
|
14
|
+
:::tip Usage Example:
|
|
15
15
|
|
|
16
16
|
```jsx
|
|
17
17
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -36,7 +36,7 @@ const Link = (_a, ref) => {
|
|
|
36
36
|
```jsx
|
|
37
37
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
38
38
|
````
|
|
39
|
-
:::
|
|
39
|
+
:::tip Usage Example:
|
|
40
40
|
|
|
41
41
|
```jsx
|
|
42
42
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -31,7 +31,7 @@ export declare const userActionTypes: {
|
|
|
31
31
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
32
32
|
````
|
|
33
33
|
|
|
34
|
-
:::
|
|
34
|
+
:::tip Usage Example:
|
|
35
35
|
|
|
36
36
|
```jsx
|
|
37
37
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -111,7 +111,7 @@ function stateInitializer(session) {
|
|
|
111
111
|
import {SCRoutingContextType, useSCRouting, Link, SCRoutes} from '@selfcommunity/react-core';
|
|
112
112
|
````
|
|
113
113
|
|
|
114
|
-
:::
|
|
114
|
+
:::tip Usage Example:
|
|
115
115
|
|
|
116
116
|
```jsx
|
|
117
117
|
const scRoutingContext: SCRoutingContextType = useSCRouting();
|
|
@@ -7,7 +7,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
7
7
|
@param object
|
|
8
8
|
@param object.cacheStrategy
|
|
9
9
|
|
|
10
|
-
:::
|
|
10
|
+
:::tip Context can be consumed in this way:
|
|
11
11
|
|
|
12
12
|
```jsx
|
|
13
13
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -22,7 +22,7 @@ const initialData = { results: [], next: broadcastMessagesRefreshUrl, previous:
|
|
|
22
22
|
@param object
|
|
23
23
|
@param object.cacheStrategy
|
|
24
24
|
|
|
25
|
-
:::
|
|
25
|
+
:::tip Context can be consumed in this way:
|
|
26
26
|
|
|
27
27
|
```jsx
|
|
28
28
|
const {messages, isLoading} = useSCFetchBroadcastMessages();
|
|
@@ -6,7 +6,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
6
6
|
@param object
|
|
7
7
|
@param object.cacheStrategy
|
|
8
8
|
|
|
9
|
-
:::
|
|
9
|
+
:::tip Context can be consumed in this way:
|
|
10
10
|
|
|
11
11
|
```jsx
|
|
12
12
|
const {categories, isLoading} = useSCFetchCategories();
|
|
@@ -5,7 +5,7 @@ import { CacheStrategies } from '@selfcommunity/utils';
|
|
|
5
5
|
This custom hook is used to fetch snippets.
|
|
6
6
|
@param object.cacheStrategy
|
|
7
7
|
|
|
8
|
-
:::
|
|
8
|
+
:::tip Context can be consumed in this way:
|
|
9
9
|
|
|
10
10
|
```jsx
|
|
11
11
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -26,7 +26,7 @@ const hydrate = (ids) => {
|
|
|
26
26
|
This custom hook is used to fetch snippets.
|
|
27
27
|
@param object.cacheStrategy
|
|
28
28
|
|
|
29
|
-
:::
|
|
29
|
+
:::tip Context can be consumed in this way:
|
|
30
30
|
|
|
31
31
|
```jsx
|
|
32
32
|
const {snippets, isLoading} = useSCFetchPrivateMessageSnippets();
|
|
@@ -4,7 +4,7 @@ import { SCCategoryType, SCUserType } from '@selfcommunity/types';
|
|
|
4
4
|
This custom hook is used to manage the categories followed.
|
|
5
5
|
:::
|
|
6
6
|
|
|
7
|
-
:::
|
|
7
|
+
:::tip How to use it:
|
|
8
8
|
Follow these steps:
|
|
9
9
|
```jsx
|
|
10
10
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useMemo } from
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
2
|
import { http, Endpoints } from '@selfcommunity/api-services';
|
|
3
3
|
import useSCCachingManager from './useSCCachingManager';
|
|
4
4
|
import { SCOPE_SC_CORE } from '../constants/Errors';
|
|
@@ -8,7 +8,7 @@ import { Logger } from '@selfcommunity/utils';
|
|
|
8
8
|
This custom hook is used to manage the categories followed.
|
|
9
9
|
:::
|
|
10
10
|
|
|
11
|
-
:::
|
|
11
|
+
:::tip How to use it:
|
|
12
12
|
Follow these steps:
|
|
13
13
|
```jsx
|
|
14
14
|
1. const scUserContext: SCUserContextType = useSCUser();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useMemo } from
|
|
1
|
+
import { useEffect, useMemo } from 'react';
|
|
2
2
|
import { http, Endpoints } from '@selfcommunity/api-services';
|
|
3
3
|
import { Logger } from '@selfcommunity/utils';
|
|
4
4
|
import { SCOPE_SC_CORE } from '../constants/Errors';
|
|
@@ -7,7 +7,7 @@ import useSCCachingManager from './useSCCachingManager';
|
|
|
7
7
|
:::info
|
|
8
8
|
This custom hook is used to manage to manage subscribed incubators.
|
|
9
9
|
:::
|
|
10
|
-
:::
|
|
10
|
+
:::tip How to use it:
|
|
11
11
|
|
|
12
12
|
Follow these steps:
|
|
13
13
|
```jsx
|
|
@@ -546,7 +546,7 @@ export const validateReactions = (value, vote) => {
|
|
|
546
546
|
errors.push(ValidationError.ERROR_INVALID_VOTE_REACTIONS);
|
|
547
547
|
}
|
|
548
548
|
if (Array.isArray(value) && value.length > 0) {
|
|
549
|
-
let _validValuesCounts = value.filter((e) => e.id !== null && e.label !== null && e.sentiment && e.image && e.active !== null).length;
|
|
549
|
+
let _validValuesCounts = value.filter((e) => e.id !== null && e.label !== null && e.sentiment !== null && e.image && e.active !== null).length;
|
|
550
550
|
if (_validValuesCounts < value.length) {
|
|
551
551
|
errors.push(ValidationError.ERROR_INVALID_VOTE_REACTIONS_STRUCTURE);
|
|
552
552
|
}
|